Documentation
¶
Overview ¶
Package paragraph contains models for paragraph elements and their components.
Index ¶
- type Compose
- type Ctrl
- func (c *Ctrl) AddAutoNum(autoNum *ctrl.AutoNum)
- func (c *Ctrl) AddBookmark(bookmark *ctrl.Bookmark)
- func (c *Ctrl) AddColPr(colPr *ctrl.ColPr)
- func (c *Ctrl) AddCtrlItem(item baseobject.HWPXObject)
- func (c *Ctrl) AddEndNote(endNote *ctrl.EndNote)
- func (c *Ctrl) AddFieldBegin(fieldBegin *ctrl.FieldBegin)
- func (c *Ctrl) AddFieldEnd(fieldEnd *ctrl.FieldEnd)
- func (c *Ctrl) AddFootNote(footNote *ctrl.FootNote)
- func (c *Ctrl) AddFooter(footer *ctrl.Footer)
- func (c *Ctrl) AddHeader(header *ctrl.Header)
- func (c *Ctrl) AddHiddenComment(hiddenComment *ctrl.HiddenComment)
- func (c *Ctrl) AddIndexmark(indexmark *ctrl.Indexmark)
- func (c *Ctrl) AddNewAutoNum() *ctrl.AutoNum
- func (c *Ctrl) AddNewBookmark() *ctrl.Bookmark
- func (c *Ctrl) AddNewColPr() *ctrl.ColPr
- func (c *Ctrl) AddNewEndNote() *ctrl.EndNote
- func (c *Ctrl) AddNewFieldBegin() *ctrl.FieldBegin
- func (c *Ctrl) AddNewFieldEnd() *ctrl.FieldEnd
- func (c *Ctrl) AddNewFootNote() *ctrl.FootNote
- func (c *Ctrl) AddNewFooter() *ctrl.Footer
- func (c *Ctrl) AddNewHeader() *ctrl.Header
- func (c *Ctrl) AddNewHiddenComment() *ctrl.HiddenComment
- func (c *Ctrl) AddNewIndexmark() *ctrl.Indexmark
- func (c *Ctrl) AddNewNewNum() *ctrl.NewNum
- func (c *Ctrl) AddNewNum(newNum *ctrl.NewNum)
- func (c *Ctrl) AddNewPageHiding() *ctrl.PageHiding
- func (c *Ctrl) AddNewPageNum() *ctrl.PageNum
- func (c *Ctrl) AddNewPageNumCtrl() *ctrl.PageNumCtrl
- func (c *Ctrl) AddPageHiding(pageHiding *ctrl.PageHiding)
- func (c *Ctrl) AddPageNum(pageNum *ctrl.PageNum)
- func (c *Ctrl) AddPageNumCtrl(pageNumCtrl *ctrl.PageNumCtrl)
- func (c *Ctrl) Clone() baseobject.HWPXObject
- func (c *Ctrl) CopyFrom(from *Ctrl)
- func (c *Ctrl) GetObjectType() baseobject.ObjectType
- type Dutmal
- type LineSeg
- type MarkpenBeginForRun
- type Para
- func (p *Para) AddNewLineSeg() *LineSeg
- func (p *Para) AddNewRun() *Run
- func (p *Para) AddRun(run *Run)
- func (p *Para) Clone() baseobject.HWPXObject
- func (p *Para) CopyFrom(from *Para)
- func (p *Para) CountOfRun() int
- func (p *Para) CreateLineSegArray()
- func (p *Para) GetObjectType() baseobject.ObjectType
- func (p *Para) GetRun(index int) *Run
- type Run
- func (r *Run) AddArc(arc baseobject.HWPXObject)
- func (r *Run) AddButton(btn baseobject.HWPXObject)
- func (r *Run) AddChart(chart baseobject.HWPXObject)
- func (r *Run) AddCheckButton(checkBtn baseobject.HWPXObject)
- func (r *Run) AddComboBox(comboBox baseobject.HWPXObject)
- func (r *Run) AddCompose(compose *Compose)
- func (r *Run) AddConnectLine(connectLine baseobject.HWPXObject)
- func (r *Run) AddContainer(container baseobject.HWPXObject)
- func (r *Run) AddCtrl(ctrl *Ctrl)
- func (r *Run) AddCurve(curve baseobject.HWPXObject)
- func (r *Run) AddDutmal(dutmal *Dutmal)
- func (r *Run) AddEdit(edit baseobject.HWPXObject)
- func (r *Run) AddEllipse(ellipse baseobject.HWPXObject)
- func (r *Run) AddEquation(equation baseobject.HWPXObject)
- func (r *Run) AddLine(line baseobject.HWPXObject)
- func (r *Run) AddListBox(listBox baseobject.HWPXObject)
- func (r *Run) AddMarkpenBegin(markpenBegin *MarkpenBeginForRun)
- func (r *Run) AddNewCtrl() *Ctrl
- func (r *Run) AddNewT() *T
- func (r *Run) AddOLE(ole baseobject.HWPXObject)
- func (r *Run) AddPicture(pic baseobject.HWPXObject)
- func (r *Run) AddPolygon(polygon baseobject.HWPXObject)
- func (r *Run) AddRadioButton(radioBtn baseobject.HWPXObject)
- func (r *Run) AddRectangle(rect baseobject.HWPXObject)
- func (r *Run) AddRunItem(item baseobject.HWPXObject)
- func (r *Run) AddScrollBar(scrollBar baseobject.HWPXObject)
- func (r *Run) AddT(t *T)
- func (r *Run) AddTable(table baseobject.HWPXObject)
- func (r *Run) AddTextArt(textArt baseobject.HWPXObject)
- func (r *Run) AddVideo(video baseobject.HWPXObject)
- func (r *Run) Clone() baseobject.HWPXObject
- func (r *Run) CopyFrom(from *Run)
- func (r *Run) CreateSecPr()
- func (r *Run) GetObjectType() baseobject.ObjectType
- type RunItem
- type T
- func (tObj *T) AddDeleteBegin(deleteBegin *t.DeleteBegin)
- func (tObj *T) AddDeleteEnd(deleteEnd *t.DeleteEnd)
- func (tObj *T) AddFWSpace()
- func (tObj *T) AddHyphen()
- func (tObj *T) AddInsertBegin(insertBegin *t.InsertBegin)
- func (tObj *T) AddInsertEnd(insertEnd *t.InsertEnd)
- func (tObj *T) AddLineBreak()
- func (tObj *T) AddMarkpenBegin(markpenBegin *t.MarkpenBegin)
- func (tObj *T) AddMarkpenEnd()
- func (tObj *T) AddNBSpace()
- func (tObj *T) AddTab(tab *t.Tab)
- func (tObj *T) AddText(text string)
- func (tObj *T) AddTitleMark(titleMark *t.TitleMark)
- func (tObj *T) Clone() baseobject.HWPXObject
- func (tObj *T) CopyFrom(from *T)
- func (tObj *T) GetObjectType() baseobject.ObjectType
- func (tObj *T) IsEmpty() bool
- func (tObj *T) IsOnlyText() bool
- func (tObj *T) OnlyText() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compose ¶
type Compose struct {
RunItem
CircleType enumtype.ComposeCircleType
CharSz *int16
ComposeType enumtype.ComposeType
ComposeText string
ComposeCharPrList *baseobject.ObjectList[*compose.ComposeCharPr]
}
func NewCompose ¶
func NewCompose() *Compose
func (*Compose) AddCharPr ¶
func (c *Compose) AddCharPr(charPr *compose.ComposeCharPr)
func (*Compose) Clone ¶
func (c *Compose) Clone() baseobject.HWPXObject
func (*Compose) CreateComposeCharPrList ¶
func (c *Compose) CreateComposeCharPrList()
func (*Compose) GetObjectType ¶
func (c *Compose) GetObjectType() baseobject.ObjectType
type Ctrl ¶
type Ctrl struct {
RunItem
ItemList []baseobject.HWPXObject
}
Ctrl represents a control container (hp:ctrl) that holds various document controls such as column definitions, fields, bookmarks, headers, and footers.
func (*Ctrl) AddAutoNum ¶
AddAutoNum adds an automatic numbering control.
func (*Ctrl) AddBookmark ¶
AddBookmark adds a bookmark control.
func (*Ctrl) AddCtrlItem ¶
func (c *Ctrl) AddCtrlItem(item baseobject.HWPXObject)
AddCtrlItem appends a generic control item to the list.
func (*Ctrl) AddEndNote ¶
AddEndNote adds an endnote control.
func (*Ctrl) AddFieldBegin ¶
func (c *Ctrl) AddFieldBegin(fieldBegin *ctrl.FieldBegin)
AddFieldBegin adds a field start control.
func (*Ctrl) AddFieldEnd ¶
AddFieldEnd adds a field end control.
func (*Ctrl) AddFootNote ¶
AddFootNote adds a footnote control.
func (*Ctrl) AddHiddenComment ¶
func (c *Ctrl) AddHiddenComment(hiddenComment *ctrl.HiddenComment)
AddHiddenComment adds a hidden comment control.
func (*Ctrl) AddIndexmark ¶
AddIndexmark adds an index mark control.
func (*Ctrl) AddNewAutoNum ¶
AddNewAutoNum creates and adds a new AutoNum control.
func (*Ctrl) AddNewBookmark ¶
AddNewBookmark creates and adds a new Bookmark control.
func (*Ctrl) AddNewColPr ¶
AddNewColPr creates and adds a new ColPr control.
func (*Ctrl) AddNewEndNote ¶
AddNewEndNote creates and adds a new EndNote control.
func (*Ctrl) AddNewFieldBegin ¶
func (c *Ctrl) AddNewFieldBegin() *ctrl.FieldBegin
AddNewFieldBegin creates and adds a new FieldBegin control.
func (*Ctrl) AddNewFieldEnd ¶
AddNewFieldEnd creates and adds a new FieldEnd control.
func (*Ctrl) AddNewFootNote ¶
AddNewFootNote creates and adds a new FootNote control.
func (*Ctrl) AddNewFooter ¶
AddNewFooter creates and adds a new Footer control.
func (*Ctrl) AddNewHeader ¶
AddNewHeader creates and adds a new Header control.
func (*Ctrl) AddNewHiddenComment ¶
func (c *Ctrl) AddNewHiddenComment() *ctrl.HiddenComment
AddNewHiddenComment creates and adds a new HiddenComment control.
func (*Ctrl) AddNewIndexmark ¶
AddNewIndexmark creates and adds a new Indexmark control.
func (*Ctrl) AddNewNewNum ¶
AddNewNewNum creates and adds a new NewNum control.
func (*Ctrl) AddNewPageHiding ¶
func (c *Ctrl) AddNewPageHiding() *ctrl.PageHiding
AddNewPageHiding creates and adds a new PageHiding control.
func (*Ctrl) AddNewPageNum ¶
AddNewPageNum creates and adds a new PageNum control.
func (*Ctrl) AddNewPageNumCtrl ¶
func (c *Ctrl) AddNewPageNumCtrl() *ctrl.PageNumCtrl
AddNewPageNumCtrl creates and adds a new PageNumCtrl control.
func (*Ctrl) AddPageHiding ¶
func (c *Ctrl) AddPageHiding(pageHiding *ctrl.PageHiding)
AddPageHiding adds a page element hiding control.
func (*Ctrl) AddPageNum ¶
AddPageNum adds a page number control.
func (*Ctrl) AddPageNumCtrl ¶
func (c *Ctrl) AddPageNumCtrl(pageNumCtrl *ctrl.PageNumCtrl)
AddPageNumCtrl adds a page number display control.
func (*Ctrl) Clone ¶
func (c *Ctrl) Clone() baseobject.HWPXObject
Clone returns a deep copy of the Ctrl container.
func (*Ctrl) GetObjectType ¶
func (c *Ctrl) GetObjectType() baseobject.ObjectType
GetObjectType returns the type identifier for the control element.
type Dutmal ¶
type Dutmal struct {
RunItem
PosType enumtype.DutmalPosType
SzRatio *int
Option *int
StyleIDRef string
Align enumtype.HorizontalAlign2
MainText *baseobject.HasOnlyText
SubText *baseobject.HasOnlyText
}
Dutmal represents a ruby text control (hp:dutmal), which places small characters above or below main text.
func (*Dutmal) Clone ¶
func (d *Dutmal) Clone() baseobject.HWPXObject
Clone returns a deep copy of the Dutmal object.
func (*Dutmal) CreateMainText ¶
func (d *Dutmal) CreateMainText()
CreateMainText initializes the main text container.
func (*Dutmal) CreateSubText ¶
func (d *Dutmal) CreateSubText()
CreateSubText initializes the ruby (sub) text container.
func (*Dutmal) GetObjectType ¶
func (d *Dutmal) GetObjectType() baseobject.ObjectType
GetObjectType returns the type identifier for the dutmal element.
type LineSeg ¶
type LineSeg struct {
Textpos *int
Vertpos *int
Vertsize *int
Textheight *int
Baseline *int
Spacing *int
Horzpos *int
Horzsize *int
Flags *int
}
LineSeg represents a line segment (hp:lineseg) within a paragraph, containing layout information such as position, size, and spacing.
func (*LineSeg) Clone ¶
func (l *LineSeg) Clone() baseobject.HWPXObject
Clone returns a deep copy of the LineSeg.
func (*LineSeg) GetObjectType ¶
func (l *LineSeg) GetObjectType() baseobject.ObjectType
GetObjectType returns the type identifier for the line segment element.
type MarkpenBeginForRun ¶
MarkpenBeginForRun represents a markpen start marker specifically designed to be placed directly within a run element.
func NewMarkpenBeginForRun ¶
func NewMarkpenBeginForRun() *MarkpenBeginForRun
NewMarkpenBeginForRun creates a new MarkpenBeginForRun object.
func (*MarkpenBeginForRun) Clone ¶
func (m *MarkpenBeginForRun) Clone() baseobject.HWPXObject
Clone returns a deep copy of the MarkpenBeginForRun object.
func (*MarkpenBeginForRun) GetObjectType ¶
func (m *MarkpenBeginForRun) GetObjectType() baseobject.ObjectType
GetObjectType returns the type identifier for the markpen element.
type Para ¶
type Para struct {
baseobject.SwitchableObject
Id string
ParaPrIDRef string
StyleIDRef string
PageBreak *bool
ColumnBreak *bool
Merged *bool
ParaTcId string
Runs []*Run
LineSegArray *baseobject.ObjectList[*LineSeg]
}
Para represents a single paragraph (hp:p) in an HWPX document. It consists of a collection of runs (hp:run) and optional line segment information.
func (*Para) AddNewLineSeg ¶
AddNewLineSeg creates and appends a new LineSeg to the paragraph.
func (*Para) Clone ¶
func (p *Para) Clone() baseobject.HWPXObject
func (*Para) CountOfRun ¶
CountOfRun returns the number of runs in the paragraph.
func (*Para) CreateLineSegArray ¶
func (p *Para) CreateLineSegArray()
CreateLineSegArray initializes the LineSegArray.
func (*Para) GetObjectType ¶
func (p *Para) GetObjectType() baseobject.ObjectType
GetObjectType returns the type identifier for the paragraph element.
type Run ¶
type Run struct {
baseobject.SwitchableObject
CharPrIDRef string
CharTcId string
SecPr *secpr.SecPr
RunItems []baseobject.HWPXObject
}
Run represents a run of text (hp:run) within a paragraph. It shares common properties via CharPrIDRef and contains a list of run items such as text (hp:t), controls (hp:ctrl), or shapes.
func (*Run) AddArc ¶
func (r *Run) AddArc(arc baseobject.HWPXObject)
AddArc adds an arc drawing object as a run item.
func (*Run) AddButton ¶
func (r *Run) AddButton(btn baseobject.HWPXObject)
AddButton adds a form button object as a run item.
func (*Run) AddChart ¶
func (r *Run) AddChart(chart baseobject.HWPXObject)
AddChart adds a chart object as a run item.
func (*Run) AddCheckButton ¶
func (r *Run) AddCheckButton(checkBtn baseobject.HWPXObject)
AddCheckButton adds a form check button object as a run item.
func (*Run) AddComboBox ¶
func (r *Run) AddComboBox(comboBox baseobject.HWPXObject)
AddComboBox adds a form combo box object as a run item.
func (*Run) AddCompose ¶
AddCompose adds a composite character object as a run item.
func (*Run) AddConnectLine ¶
func (r *Run) AddConnectLine(connectLine baseobject.HWPXObject)
AddConnectLine adds a connector line object as a run item.
func (*Run) AddContainer ¶
func (r *Run) AddContainer(container baseobject.HWPXObject)
AddContainer adds a container object as a run item.
func (*Run) AddCurve ¶
func (r *Run) AddCurve(curve baseobject.HWPXObject)
AddCurve adds a curve drawing object as a run item.
func (*Run) AddEdit ¶
func (r *Run) AddEdit(edit baseobject.HWPXObject)
AddEdit adds a form edit box object as a run item.
func (*Run) AddEllipse ¶
func (r *Run) AddEllipse(ellipse baseobject.HWPXObject)
AddEllipse adds an ellipse drawing object as a run item.
func (*Run) AddEquation ¶
func (r *Run) AddEquation(equation baseobject.HWPXObject)
AddEquation adds an equation object as a run item.
func (*Run) AddLine ¶
func (r *Run) AddLine(line baseobject.HWPXObject)
AddLine adds a line drawing object as a run item.
func (*Run) AddListBox ¶
func (r *Run) AddListBox(listBox baseobject.HWPXObject)
AddListBox adds a form list box object as a run item.
func (*Run) AddMarkpenBegin ¶
func (r *Run) AddMarkpenBegin(markpenBegin *MarkpenBeginForRun)
AddMarkpenBegin adds a markpen start marker as a run item.
func (*Run) AddNewCtrl ¶
AddNewCtrl creates and appends a new Ctrl container to the run.
func (*Run) AddOLE ¶
func (r *Run) AddOLE(ole baseobject.HWPXObject)
AddOLE adds an OLE object as a run item.
func (*Run) AddPicture ¶
func (r *Run) AddPicture(pic baseobject.HWPXObject)
AddPicture adds a picture object as a run item.
func (*Run) AddPolygon ¶
func (r *Run) AddPolygon(polygon baseobject.HWPXObject)
AddPolygon adds a polygon drawing object as a run item.
func (*Run) AddRadioButton ¶
func (r *Run) AddRadioButton(radioBtn baseobject.HWPXObject)
AddRadioButton adds a form radio button object as a run item.
func (*Run) AddRectangle ¶
func (r *Run) AddRectangle(rect baseobject.HWPXObject)
AddRectangle adds a rectangle drawing object as a run item.
func (*Run) AddRunItem ¶
func (r *Run) AddRunItem(item baseobject.HWPXObject)
AddRunItem appends a generic run item to the run.
func (*Run) AddScrollBar ¶
func (r *Run) AddScrollBar(scrollBar baseobject.HWPXObject)
AddScrollBar adds a form scroll bar object as a run item.
func (*Run) AddTable ¶
func (r *Run) AddTable(table baseobject.HWPXObject)
AddTable adds a table object as a run item.
func (*Run) AddTextArt ¶
func (r *Run) AddTextArt(textArt baseobject.HWPXObject)
AddTextArt adds a text art object as a run item.
func (*Run) AddVideo ¶
func (r *Run) AddVideo(video baseobject.HWPXObject)
AddVideo adds a video object as a run item.
func (*Run) Clone ¶
func (r *Run) Clone() baseobject.HWPXObject
Clone returns a deep copy of the Run.
func (*Run) CreateSecPr ¶
func (r *Run) CreateSecPr()
CreateSecPr initializes the section properties for this run.
func (*Run) GetObjectType ¶
func (r *Run) GetObjectType() baseobject.ObjectType
GetObjectType returns the type identifier for the run element.
type RunItem ¶
type RunItem struct {
baseobject.SwitchableObject
ObjectType baseobject.ObjectType
}
RunItem is a base structure for all elements that can be placed within a run (hp:run). It includes support for switch elements and identifies the specific object type.
func (*RunItem) GetObjectType ¶
func (r *RunItem) GetObjectType() baseobject.ObjectType
GetObjectType returns the type identifier for this run item.
type T ¶
type T struct {
baseobject.SwitchableObject
CharPrIDRef string
Items *baseobject.ObjectList[baseobject.TItem]
}
T represents a text container (hp:t) that holds plain text and text-related inline elements.
func (*T) AddDeleteBegin ¶
func (tObj *T) AddDeleteBegin(deleteBegin *t.DeleteBegin)
AddDeleteBegin appends a track change delete start marker.
func (*T) AddDeleteEnd ¶
AddDeleteEnd appends a track change delete end marker.
func (*T) AddInsertBegin ¶
func (tObj *T) AddInsertBegin(insertBegin *t.InsertBegin)
AddInsertBegin appends a track change insert start marker.
func (*T) AddInsertEnd ¶
AddInsertEnd appends a track change insert end marker.
func (*T) AddMarkpenBegin ¶
func (tObj *T) AddMarkpenBegin(markpenBegin *t.MarkpenBegin)
AddMarkpenBegin appends a markpen start marker.
func (*T) AddMarkpenEnd ¶
func (tObj *T) AddMarkpenEnd()
AddMarkpenEnd appends a markpen end marker.
func (*T) AddTitleMark ¶
AddTitleMark appends a title mark element.
func (*T) Clone ¶
func (tObj *T) Clone() baseobject.HWPXObject
Clone returns a deep copy of the T object.
func (*T) GetObjectType ¶
func (tObj *T) GetObjectType() baseobject.ObjectType
GetObjectType returns the type identifier for the text element.
func (*T) IsOnlyText ¶
IsOnlyText returns true if the container contains only a single plain text item.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package paraobject contains models for various objects that can be embedded in paragraphs, such as tables, pictures, and shapes.
|
Package paraobject contains models for various objects that can be embedded in paragraphs, such as tables, pictures, and shapes. |
|
combobox
Package combobox contains models for selection elements like combo boxes and list boxes.
|
Package combobox contains models for selection elements like combo boxes and list boxes. |
|
drawingobject
Package drawingobject provides base models for all drawing shapes like rectangles and lines.
|
Package drawingobject provides base models for all drawing shapes like rectangles and lines. |
|
formobject
Package formobject contains base models for interactive form elements like buttons and edit boxes.
|
Package formobject contains base models for interactive form elements like buttons and edit boxes. |
|
picture
Package picture contains models for image properties and drawing shapes.
|
Package picture contains models for image properties and drawing shapes. |
|
picture/effects
Package effects contains models for visual effects like shadows and glows.
|
Package effects contains models for visual effects like shadows and glows. |
|
shapeobject
Package shapeobject provides base models for all HWPX shape and control objects.
|
Package shapeobject provides base models for all HWPX shape and control objects. |
|
table
Package table contains models for table-specific components like rows and cells.
|
Package table contains models for table-specific components like rows and cells. |
|
Package secpr contains models for section properties, including page layout and notes.
|
Package secpr contains models for section properties, including page layout and notes. |
|
notepr
Package notepr contains models for footnote and endnote properties.
|
Package notepr contains models for footnote and endnote properties. |
|
pagepr
Package pagepr contains models for physical page properties like size and orientation.
|
Package pagepr contains models for physical page properties like size and orientation. |