GLXCurses.Style module

class GLXCurses.Style.Style[source]

Bases: GLXCurses.libs.Colors.Colors

Description:

Galaxie Curses Style is equivalent to a skin feature, the entire API receive a common Style from Application and each individual Widget can use it own separate one.

Yet it’s a bit hard to explain how create you own Style, in summary it consist to a dict() it have keys with a special name call Attribute, inside that dictionary we create a second level of dict() dedicated to store color value of each States

default_attributes_states

Return a default style, that will be use by the entire GLXCurses API via the __attribute_states object. every Widget’s will receive it style by default.

Returns:A Galaxie Curses Style dictionary
Return type:dict
attributes_states

Return the __attribute_states attribute, it consist to a dictionary it store a second level of dictionary with keys if have special name.

Returns:attribute states dictionary on Galaxie Curses Style format
Return type:dict
attribute_to_rgb(attribute='base', state='STATE_NORMAL')[source]

Return a text color, for a attribute and a state passed as argument, it’s use by widget for know which color use, when a state change.

By example: When color change if the button is pressed

Parameters:
  • attribute – accepted value: text_fg
  • state – accepted value: STATE_NORMAL, STATE_ACTIVE, STATE_PRELIGHT, STATE_SELECTED, STATE_INSENSITIVE
Returns:

text color

Return type:

str