Module component
[hide private]
[frames] | no frames]

Module component

source code

Component plugin classes.

This module defines base classes and for deriving component plugin classes and contains some global variables used to register components with XRCed.

Components are objects of Component class or one of the derived classes used to define specialized components (such as sizers). After a component object is constructed and configured it can be registered using the Manager global object.

Classes [hide private]
  Component
Base class for component plugins.
  SimpleComponent
Component without window attributes and styles.
  Container
Base class for containers.
  SimpleContainer
Container without window attributes and styles.
  RootComponent
Special root component.
  SmartContainer
Base class for containers with implicit nodes.
  Sizer
Sizers are not windows and have common implicit node.
  BoxSizer
Sizers are not windows and have common implicit node.
  _ComponentManager
Component manager used to register component plugins.
Variables [hide private]
  DEFAULT_POS = 1000, 1000
  parentChildGroups = {'root': ['top_level', 'component'], 'fram...
Definition of compatibility of component groups as key:group_list pairs, where key is a parent group name and group_list is a list of children group names or group names prefixed with '!' character to exclude components having corresponding primary group.
  Manager = _ComponentManager()
Singleton global object of _ComponentManager class.
Variables Details [hide private]

parentChildGroups

Definition of compatibility of component groups as key:group_list pairs, where key is a parent group name and group_list is a list of children group names or group names prefixed with '!' character to exclude components having corresponding primary group. This dictionary can be modified by component plugins directly (some care must be taken not to redefine existing relations or breake them).
Value:
{'root': ['top_level', 'component'], 'frame': ['toolbar', 'menubar', '\
statusbar'], 'wizard': ['wizard_page'], 'window': ['control', 'window'\
, 'sizer', 'btnsizer', '!frame'], 'sizer': ['control', 'sizer', 'btnsi\
zer', 'spacer'], 'book': ['control', 'window', '!sizer', '!btnsizer'],\
 'btnsizer': ['stdbtn'], 'menubar': ['menu'], 'toolbar': ['tool', 'sep\
arator'], 'menu': ['menu', 'menu_item', 'separator'],}