Package libxyz :: Package core :: Module skin :: Class Skin
[hide private]
[frames] | no frames]

Class Skin

source code

object --+
         |
        Skin

Skin object. Provides simple interface to defined skin rulesets.

Instance Methods [hide private]
 
__init__(self, name=None, author=None, version=None, description=None, colors=None, rules=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__str__(self)
str(x)
source code
 
__repr__(self)
repr(x)
source code
 
__getitem__(self, key) source code
 
set_screen(self, screen) source code
 
_make_rules(self, raw_rules)
Internalize rules
source code
 
_make_name(self, block, resource) source code
 
get_palette_list(self, display=const.DEFAULT_DISPLAY_DRIVER)
Return list of defined palettes.
source code
 
attr(self, resolution, name, default=True)
Search for first matching attribute <name> according to resolution
source code
 
palette(self, resolution, name, default=True)
Search for first matching palette <name> according to resolution
source code
 
get_palette(self, block, name) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name=None, author=None, version=None, description=None, colors=None, rules=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

get_palette_list(self, display=const.DEFAULT_DISPLAY_DRIVER)

source code 

Return list of defined palettes. It is usually passed to register_palette() function

attr(self, resolution, name, default=True)

source code 

Search for first matching attribute <name> according to resolution

Parameters:
  • resolution - Sequence of ruleset names
  • name - Attribute name
  • default - If True, return default palette in case attr is not found, otherwise return None
Returns:
Registered palette name