This object represents a single piece of text.
Constructor. |
|
Calculates the range of the object. |
|
Returns |
|
Returns |
|
Clones the object. |
|
Deletes the given range. |
|
Do a split from pos, returning an object containing the second part, and setting the first part in ‘this’. |
|
Draw the item, within the given range. |
|
Get the first position from pos that has a line break character. |
|
Returns the object size for the given range. |
|
Returns the text. |
|
Returns any text in this object for the given range. |
|
Returns the |
|
Imports this object from |
|
Returns |
|
Lay the item out at the specified position with the given size constraint. |
|
Returns |
|
Sets the text. |
|
Returns the final object in the split objects if this object was split due to differences between sub-object virtual attributes. |
|
Does this object take note of paragraph attributes? Text and image objects don’t. |
See |
Possible constructors:
RichTextPlainText(text: str='', parent: Optional[RichTextObject]=None,
style: Optional[RichTextAttr]=None) -> None
RichTextPlainText(obj : RichTextPlainText) -> None
This object represents a single piece of text.
__init__ (self, text: str=’’, parent: Optional[RichTextObject]=None, style: Optional[RichTextAttr]=None)
Constructor.
text (string)
parent (wx.richtext.RichTextObject)
style (wx.richtext.RichTextAttr)
None
__init__ (self, obj : RichTextPlainText)
Copy constructor.
None
Calculates the range of the object.
By default, guess that the object is 1 unit long.
start (long)
int
Returns True
if this object can merge itself with the given one.
object (wx.richtext.RichTextObject)
context (wx.richtext.RichTextDrawingContext)
bool
Returns True
if this object can potentially be split, by virtue of having different virtual attributes for individual sub-objects.
context (wx.richtext.RichTextDrawingContext)
bool
Clones the object.
None
Deletes the given range.
range (wx.richtext.RichTextRange)
bool
Do a split from pos, returning an object containing the second part, and setting the first part in ‘this’.
pos (long)
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
Get the first position from pos that has a line break character.
pos (long)
int
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 text.
str
Returns any text in this object for the given range.
range (wx.richtext.RichTextRange)
str
Returns the XML
node name of this object.
This must be overridden for XmlNode-base XML
export to work.
str
Imports this object from XML
.
buffer (wx.richtext.RichTextBuffer)
node (wx.xml.XmlNode)
handler (wx.richtext.RichTextXMLHandler)
recurse (bool)
bool
Returns True
if the object is empty.
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
Returns True
if this object merged itself with the given one.
The calling code will then delete the given object.
object (wx.richtext.RichTextObject)
context (wx.richtext.RichTextDrawingContext)
bool
Sets the text.
text (string)
None
Returns the final object in the split objects if this object was split due to differences between sub-object virtual attributes.
Returns itself if it was not split.
context (wx.richtext.RichTextDrawingContext)
Does this object take note of paragraph attributes? Text and image objects don’t.
bool
See GetXMLNodeName