Package traylib :: Module icon_config :: Class IconConfig
[frames] | no frames]

Class IconConfig

source code

   object --+    
            |    
config.Config --+
                |
               IconConfig

Icon configuration object.

Instance Methods
 
__init__(self, size, edge, effects, pos_func, hidden)
Creates a new IconConfig.
source code
 
update_arrow(self, old_edge, edge) source code

Inherited from config.Config: add_attribute, add_configurable, get_attribute, has_configurable, remove_configurable, set_attribute

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

Class Variables
  arrow = property(lambda self: self.__arrow)
The arrow pixmap.
  edge = property(lambda self: self.get_attribute('edge'), lambd...
The edge of the screen where the icons are put.
  effects = property(lambda self: self.get_attribute('effects'),...
True if effects such as smooth zooming should be shown.
  pos_func = property(lambda self: self.get_attribute('pos_func'...
The function for positioning the menu (may be None).
  size = property(lambda self: self.get_attribute('size'), lambd...
The size of the icons.
  vertical = property(lambda self: self.edge in(LEFT, RIGHT))
True if the icons are on a vertical panel, that is: the edge is either LEFT or RIGHT.
  hidden = property(lambda self: self.get_attribute('hidden'), l...
True if all icons except the main icon should be hidden.
Properties

Inherited from object: __class__

Method Details

__init__(self, size, edge, effects, pos_func, hidden)
(Constructor)

source code 

Creates a new IconConfig.

Parameters:
  • size - The size of the icons.
  • edge - The edge of the screen where the icon is. Must be one of 0, TOP, BOTTOM, LEFT, RIGHT.
  • pos_func - The function to call for positioning an icon's menu.
Overrides: object.__init__

Class Variable Details

edge

The edge of the screen where the icons are put. One of 0, TOP, BOTTOM, LEFT, RIGHT.

Value:
property(lambda self: self.get_attribute('edge'), lambda self, edge: s\
elf.set_attribute('edge', edge))

effects

True if effects such as smooth zooming should be shown.

Value:
property(lambda self: self.get_attribute('effects'), lambda self, effe\
cts: self.set_attribute('effects', effects))

pos_func

The function for positioning the menu (may be None).

Value:
property(lambda self: self.get_attribute('pos_func'), lambda self, pos\
_func: self.set_attribute('pos_func', pos_func))

size

The size of the icons.

Value:
property(lambda self: self.get_attribute('size'), lambda self, size: s\
elf.set_attribute('size', size))

hidden

True if all icons except the main icon should be hidden.

Value:
property(lambda self: self.get_attribute('hidden'), lambda self, hidde\
n: self.set_attribute('hidden', hidden))