This object represents a single paragraph containing various objects such as text content, images, and further paragraph layout objects.
Constructor taking a parent and style. |
|
Allocates or reuses a line object. |
|
Applies paragraph styles such as centering to the wrapped lines. |
|
Calculates the range of the object. |
|
Clears the default tabstop array. |
|
Clears the cached lines. |
|
Clears remaining unused line objects, if any. |
|
Clones the object. |
|
Copies the object. |
|
Draw the item, within the given range. |
|
Finds the object at the given position. |
|
Finds the absolute position and row height for the given character position. |
|
Finds a suitable wrap position. |
|
Returns the bullet text for this paragraph. |
|
Returns combined attributes of the base style, paragraph style and character style. |
|
Returns the plain text searching from the start or end of the range. |
|
Returns the default tabstop array. |
|
Returns the first position from pos that has a line break character. |
|
Whether the paragraph is impacted by floating objects from above. |
|
Returns the cached lines. |
|
Returns the object size for the given range. |
|
Returns the |
|
Hit-testing: returns a flag indicating hit test details, plus information about position. |
|
Creates a default tabstop array. |
|
Inserts text at the given position. |
|
Lay the item out at the specified position with the given size constraint. |
|
Lays out the floating objects. |
|
Adds content back from a list. |
|
Moves content to a list from this point. |
|
Sets whether the paragraph is impacted by floating objects from above. |
|
Splits an object at this position if necessary, and returns the previous object, or |
See |
|
See |
|
See |
|
See |
Possible constructors:
RichTextParagraph(parent: Optional[RichTextObject]=None, style:
Optional[RichTextAttr]=None) -> None
RichTextParagraph(text : str, parent: Optional[RichTextObject]=None,
paraStyle: Optional[RichTextAttr]=None, charStyle:
Optional[RichTextAttr]=None) -> None
RichTextParagraph(obj : RichTextParagraph) -> None
This object represents a single paragraph containing various objects such as text content, images, and further paragraph layout objects.
__init__ (self, parent: Optional[RichTextObject]=None, style: Optional[RichTextAttr]=None)
Constructor taking a parent and style.
parent (wx.richtext.RichTextObject)
style (wx.richtext.RichTextAttr)
None
__init__ (self, text : str, parent: Optional[RichTextObject]=None, paraStyle: Optional[RichTextAttr]=None, charStyle: Optional[RichTextAttr]=None)
Constructor taking a text string, a parent and paragraph and character attributes.
text (string)
parent (wx.richtext.RichTextObject)
paraStyle (wx.richtext.RichTextAttr)
charStyle (wx.richtext.RichTextAttr)
None
__init__ (self, obj : RichTextParagraph)
None
Allocates or reuses a line object.
pos (int)
Applies paragraph styles such as centering to the wrapped lines.
line (wx.richtext.RichTextLine)
attr (wx.richtext.RichTextAttr)
rect (wx.Rect)
dc (wx.DC)
None
Calculates the range of the object.
By default, guess that the object is 1 unit long.
start (long)
int
Clears the default tabstop array.
None
Clears the cached lines.
None
Clears remaining unused line objects, if any.
lineCount (int)
bool
Clones the object.
Copies the object.
None
Draw the item, within the given range.
Some objects may ignore the range (for example paragraphs) while others must obey it (lines, to implement wrapping)
dc (wx.DC)
context (wx.richtext.RichTextDrawingContext)
range (wx.richtext.RichTextRange)
selection (wx.richtext.RichTextSelection)
rect (wx.Rect)
descent (int)
style (int)
bool
Finds the object at the given position.
position (long)
Finds the absolute position and row height for the given character position.
dc (wx.DC)
context (wx.richtext.RichTextDrawingContext)
index (long)
forceLineStart (bool)
le[bool, wx.Point, int]
Finds a suitable wrap position.
wrapPosition is the last position in the line to the left of the split.
range (wx.richtext.RichTextRange)
dc (wx.DC)
context (wx.richtext.RichTextDrawingContext)
availableSpace (int)
wrapPosition (long)
partialExtents (list of integers)
bool
Returns the bullet text for this paragraph.
str
GetCombinedAttributes (self, contentStyle : RichTextAttr, includingBoxAttr: bool=False)
Returns combined attributes of the base style, paragraph style and character style.
We use this to dynamically retrieve the actual style.
contentStyle (wx.richtext.RichTextAttr)
includingBoxAttr (bool)
GetCombinedAttributes (self, includingBoxAttr: bool=False)
Returns the combined attributes of the base style and paragraph style.
includingBoxAttr (bool)
Returns the plain text searching from the start or end of the range.
The resulting string may be shorter than the range given.
text (string)
range (wx.richtext.RichTextRange)
fromStart (bool)
bool
Returns the default tabstop array.
List[int]
Returns the first position from pos that has a line break character.
pos (long)
int
Whether the paragraph is impacted by floating objects from above.
int
Returns the cached lines.
Any
Returns the object size for the given range.
Returns False
if the range is invalid for this object.
range (wx.richtext.RichTextRange)
size (wx.Size)
descent (int)
dc (wx.DC)
context (wx.richtext.RichTextDrawingContext)
flags (int)
position (wx.Point)
parentSize (wx.Size)
partialExtents (list of integers)
bool
Returns the XML
node name of this object.
This must be overridden for XmlNode-base XML
export to work.
str
Hit-testing: returns a flag indicating hit test details, plus information about position.
contextObj is returned to specify what object position is relevant to, since otherwise there’s an ambiguity. @ obj might not be a child of contextObj, since we may be referring to the container itself if we have no hit on a child - for example if we click outside an object.
The function puts the position in textPosition if one is found. pt is in logical units (a zero y position is at the beginning of the buffer).
dc (wx.DC)
context (wx.richtext.RichTextDrawingContext)
pt (wx.Point)
flags (int)
Tuple[int, int, RichTextObject, RichTextObject]
One of the wx.richtext.RichTextHitTestFlags values.
None
Creates a default tabstop array.
None
Inserts text at the given position.
pos (long)
text (string)
bool
Lay the item out at the specified position with the given size constraint.
Layout must set the cached size. rect is the available space for the object, and parentRect is the container that is used to determine a relative size or position (for example if a text box must be 50% of the parent text box).
dc (wx.DC)
context (wx.richtext.RichTextDrawingContext)
rect (wx.Rect)
parentRect (wx.Rect)
style (int)
bool
Lays out the floating objects.
dc (wx.DC)
context (wx.richtext.RichTextDrawingContext)
rect (wx.Rect)
parentRect (wx.Rect)
style (int)
floatCollector (RichTextFloatCollector)
None
Adds content back from a list.
list (RichTextObjectList_
)
None
Moves content to a list from this point.
list (RichTextObjectList_
)
None
Sets whether the paragraph is impacted by floating objects from above.
i (int)
None
Splits an object at this position if necessary, and returns the previous object, or None
if inserting at the beginning.
pos (long)
previousObject (RichTextObject)
See GetBulletText
See GetImpactedByFloatingObjects
and SetImpactedByFloatingObjects
See GetXMLNodeName