Manages style definitions and provides them on request. Also provides
functionality for loading custom style sheets and modifying styles during
run time.
|
|
__init__(self,
custom=u'')
Initializes the Style Manager |
|
|
|
|
|
|
|
BlankStyleDictionary(self)
Returns a dictionary of unset style items based on the tags defined
in the current dictionary. |
|
|
|
|
GetFontDictionary(self,
default=True)
Does a system lookup to build a default set of fonts using ten point
fonts as the standards size. |
|
|
|
wx.Font
|
GetDefaultFont(self)
Constructs and returns a wxFont object from the settings of the
default_style object. |
|
|
|
wx.Colour or string
|
GetDefaultForeColour(self,
as_hex=False)
Gets the foreground color of the default style and returns a Colour
object. |
|
|
|
wx.Colour or string
|
GetDefaultBackColour(self,
as_hex=False)
Gets the background color of the default style and returns a Colour
object. |
|
|
|
StyleItem
|
GetItemByName(self,
name)
Gets and returns a style item using its name for the search |
|
|
|
|
GetStyleFont(self,
primary=True)
Returns the primary font facename by default |
|
|
|
string
|
GetStyleByName(self,
name)
Gets and returns a style string using its name for the search |
|
|
|
dict
|
GetStyleSet(self)
Returns the current set of styles or the default set if there is no
current set. |
|
|
|
|
HasNamedStyle(self,
name)
Checks if a style has been set/loaded or not |
|
|
|
bool
|
LoadStyleSheet(self,
style_sheet,
force=False)
Loads a custom style sheet and returns True on success |
|
|
|
|
MergeFonts(self,
style_dict,
font_dict)
Does any string substitution that the style dictionary may need to
have fonts and their sizes set. |
|
|
|
|
MergeStyles(self,
styles1,
styles2)
Merges the styles from styles2 into styles1 overwriting any duplicate
values already set in styles1 with the new data from styles2. |
|
|
|
|
PackStyleSet(self,
style_set)
Checks the difference of each item in the style set as compared to
the default_style tag and packs any unset value in the item to be
equal to the default style. |
|
|
|
|
ParseStyleData(self,
style_data,
strict=False)
Parses a string style definitions read from an Editra Style Sheet. |
|
|
|
|
SetGlobalFont(self,
font_tag,
fontface,
size=-1)
Sets one of the fonts in the global font set by tag and sets it to
the named font. |
|
|
|
|
SetStyleFont(self,
wx_font,
primary=True)
Sets the\primary or secondary font and their respective size values. |
|
|
|
|
SetStyleTag(self,
style_tag,
value)
Sets the value of style tag by name |
|
|
|
|
SetStyles(self,
style_dict,
nomerge=False)
Sets the managers style data and returns True on success. |
|
|
|
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
|