.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. _wx.richtext.TextAttrBorder:
==========================================================================================================================================
|phoenix_title| **wx.richtext.TextAttrBorder**
==========================================================================================================================================
A class representing a rich text object border.
.. seealso:: :ref:`wx.richtext.RichTextAttr`, :ref:`wx.richtext.RichTextCtrl`, RichTextAttrBorders
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
TextAttrBorder:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.richtext.TextAttrBorder.__init__` Default constructor.
:meth:`~wx.richtext.TextAttrBorder.AddFlag` Adds a border flag.
:meth:`~wx.richtext.TextAttrBorder.Apply` Applies the border to this object, but not if the same as `compareWith`.
:meth:`~wx.richtext.TextAttrBorder.CollectCommonAttributes` Collects the attributes that are common to a range of content, building up a note of which attributes are absent in some objects and which clash in some objects.
:meth:`~wx.richtext.TextAttrBorder.EqPartial` Partial equality test.
:meth:`~wx.richtext.TextAttrBorder.GetColour` Gets the colour.
:meth:`~wx.richtext.TextAttrBorder.GetColourLong` Gets the colour as a long.
:meth:`~wx.richtext.TextAttrBorder.GetFlags` Returns the border flags.
:meth:`~wx.richtext.TextAttrBorder.GetStyle` Gets the border style.
:meth:`~wx.richtext.TextAttrBorder.GetWidth` Gets the border width.
:meth:`~wx.richtext.TextAttrBorder.HasColour` True if the border has a valid colour.
:meth:`~wx.richtext.TextAttrBorder.HasStyle` True if the border has a valid style.
:meth:`~wx.richtext.TextAttrBorder.HasWidth` True if the border has a valid width.
:meth:`~wx.richtext.TextAttrBorder.IsDefault` True if the border has no attributes set.
:meth:`~wx.richtext.TextAttrBorder.IsValid` True if the border is valid.
:meth:`~wx.richtext.TextAttrBorder.MakeValid` Set the valid flag for this border.
:meth:`~wx.richtext.TextAttrBorder.RemoveFlag` Removes a border flag.
:meth:`~wx.richtext.TextAttrBorder.RemoveStyle` Removes the specified attributes from this object.
:meth:`~wx.richtext.TextAttrBorder.Reset` Resets the border style, colour, width and flags.
:meth:`~wx.richtext.TextAttrBorder.SetColour` Sets the border colour.
:meth:`~wx.richtext.TextAttrBorder.SetFlags` Sets the border flags.
:meth:`~wx.richtext.TextAttrBorder.SetStyle` Sets the border style.
:meth:`~wx.richtext.TextAttrBorder.SetWidth` Sets the border width.
:meth:`~wx.richtext.TextAttrBorder.__bool__`
:meth:`~wx.richtext.TextAttrBorder.__nonzero__`
:meth:`~wx.richtext.TextAttrBorder.__eq__` Equality operator.
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.richtext.TextAttrBorder.Colour` See :meth:`~wx.richtext.TextAttrBorder.GetColour` and :meth:`~wx.richtext.TextAttrBorder.SetColour`
:attr:`~wx.richtext.TextAttrBorder.ColourLong` See :meth:`~wx.richtext.TextAttrBorder.GetColourLong`
:attr:`~wx.richtext.TextAttrBorder.Flags` See :meth:`~wx.richtext.TextAttrBorder.GetFlags` and :meth:`~wx.richtext.TextAttrBorder.SetFlags`
:attr:`~wx.richtext.TextAttrBorder.Style` See :meth:`~wx.richtext.TextAttrBorder.GetStyle` and :meth:`~wx.richtext.TextAttrBorder.SetStyle`
:attr:`~wx.richtext.TextAttrBorder.Width` See :meth:`~wx.richtext.TextAttrBorder.GetWidth` and :meth:`~wx.richtext.TextAttrBorder.SetWidth`
:attr:`~wx.richtext.TextAttrBorder.m_borderColour` A public C++ attribute of type ``long``.
:attr:`~wx.richtext.TextAttrBorder.m_borderStyle` A public C++ attribute of type ``int``.
:attr:`~wx.richtext.TextAttrBorder.m_borderWidth` A public C++ attribute of type `~wx.richtext.TextAttrDimension` .
:attr:`~wx.richtext.TextAttrBorder.m_flags` A public C++ attribute of type ``int``.
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.richtext.TextAttrBorder(object)
**Possible constructors**::
TextAttrBorder() -> None
A class representing a rich text object border.
.. method:: __init__(self)
Default constructor.
:rtype: `None`
.. method:: AddFlag(self, flag : int)
Adds a border flag.
:param `flag`:
:type `flag`: int
:rtype: `None`
.. method:: Apply(self, border : TextAttrBorder, compareWith: Optional[TextAttrBorder]=None)
Applies the border to this object, but not if the same as `compareWith`.
:param `border`:
:type `border`: wx.richtext.TextAttrBorder
:param `compareWith`:
:type `compareWith`: wx.richtext.TextAttrBorder
:rtype: `bool`
.. method:: CollectCommonAttributes(self, attr : TextAttrBorder, clashingAttr : TextAttrBorder, absentAttr : TextAttrBorder)
Collects the attributes that are common to a range of content, building up a note of which attributes are absent in some objects and which clash in some objects.
:param `attr`:
:type `attr`: wx.richtext.TextAttrBorder
:param `clashingAttr`:
:type `clashingAttr`: wx.richtext.TextAttrBorder
:param `absentAttr`:
:type `absentAttr`: wx.richtext.TextAttrBorder
:rtype: `None`
.. method:: EqPartial(self, border : TextAttrBorder, weakTest: bool=True)
Partial equality test.
If `weakTest` is ``True``, attributes of this object do not have to be present if those attributes of `border` are present. If `weakTest` is ``False``, the function will fail if an attribute is present in `border` but not in this object.
:param `border`:
:type `border`: wx.richtext.TextAttrBorder
:param `weakTest`:
:type `weakTest`: bool
:rtype: `bool`
.. method:: GetColour(self)
Gets the colour.
:rtype: `Colour`
.. method:: GetColourLong(self)
Gets the colour as a long.
:rtype: `int`
.. method:: GetFlags(self)
Returns the border flags.
:rtype: `int`
.. method:: GetStyle(self)
Gets the border style.
:rtype: `int`
.. method:: GetWidth(self)
Gets the border width.
:rtype: :ref:`wx.richtext.TextAttrDimension`
.. method:: HasColour(self)
True if the border has a valid colour.
:rtype: `bool`
.. method:: HasStyle(self)
True if the border has a valid style.
:rtype: `bool`
.. method:: HasWidth(self)
True if the border has a valid width.
:rtype: `bool`
.. method:: IsDefault(self)
True if the border has no attributes set.
:rtype: `bool`
.. method:: IsValid(self)
True if the border is valid.
:rtype: `bool`
.. method:: MakeValid(self)
Set the valid flag for this border.
:rtype: `None`
.. method:: RemoveFlag(self, flag : int)
Removes a border flag.
:param `flag`:
:type `flag`: int
:rtype: `None`
.. method:: RemoveStyle(self, attr : TextAttrBorder)
Removes the specified attributes from this object.
:param `attr`:
:type `attr`: wx.richtext.TextAttrBorder
:rtype: `bool`
.. method:: Reset(self)
Resets the border style, colour, width and flags.
:rtype: `None`
.. method:: SetColour(self, *args, **kw)
Sets the border colour.
|overload| **Overloaded Implementations:**
:html:`
`
**SetColour** `(self, colour : int)`
:param `colour`:
:type `colour`: long
:rtype: `None`
:html:`
`
**SetColour** `(self, colour : Colour)`
:param `colour`:
:type `colour`: wx.Colour
:rtype: `None`
:html:`
`
.. method:: SetFlags(self, flags : int)
Sets the border flags.
:param `flags`:
:type `flags`: int
:rtype: `None`
.. method:: SetStyle(self, style : int)
Sets the border style.
:param `style`:
:type `style`: int
:rtype: `None`
.. method:: SetWidth(self, *args, **kw)
Sets the border width.
|overload| **Overloaded Implementations:**
:html:`
`
**SetWidth** `(self, width : TextAttrDimension)`
:param `width`:
:type `width`: wx.richtext.TextAttrDimension
:rtype: `None`
:html:`
`
**SetWidth** `(self, value : int, units: TextAttrUnits=TEXT_ATTR_UNITS_TENTHS_MM)`
:param `value`:
:type `value`: int
:param `units`:
:type `units`: wx.richtext.TextAttrUnits
:rtype: `None`
:html:`
`
.. method:: __bool__(self)
:rtype: `int`
.. method:: __nonzero__(self)
:rtype: `int`
.. method:: __eq__(self)
Equality operator.
:param `border`:
:type `border`: wx.richtext.TextAttrBorder
.. attribute:: Colour
See :meth:`~wx.richtext.TextAttrBorder.GetColour` and :meth:`~wx.richtext.TextAttrBorder.SetColour`
.. attribute:: ColourLong
See :meth:`~wx.richtext.TextAttrBorder.GetColourLong`
.. attribute:: Flags
See :meth:`~wx.richtext.TextAttrBorder.GetFlags` and :meth:`~wx.richtext.TextAttrBorder.SetFlags`
.. attribute:: Style
See :meth:`~wx.richtext.TextAttrBorder.GetStyle` and :meth:`~wx.richtext.TextAttrBorder.SetStyle`
.. attribute:: Width
See :meth:`~wx.richtext.TextAttrBorder.GetWidth` and :meth:`~wx.richtext.TextAttrBorder.SetWidth`
.. attribute:: m_borderColour
A public C++ attribute of type ``long``.
.. attribute:: m_borderStyle
A public C++ attribute of type ``int``.
.. attribute:: m_borderWidth
A public C++ attribute of type `~wx.richtext.TextAttrDimension` .
.. attribute:: m_flags
A public C++ attribute of type ``int``.