pyface.action.schema.schema module¶
Schema class definitions
This module defines the Schema
- class pyface.action.schema.schema.Schema(*items, **traits)[source]¶
Bases:
HasTraits
The abstract base class for all action schemas.
- id = Str()¶
The schema’s identifier (unique within its parent schema).
- items = List(SubSchema)¶
The list of sub-items in the schema. These items can be other (non-top-level) schema or concrete instances from the Pyface API.
- class pyface.action.schema.schema.ActionSchema(*items, **traits)[source]¶
Bases:
Schema
Action schema for Pyface Actions.
An action schema cannot have children. It is used as an action factory to make sure a larger schema (e.g., a menu schema) can be used multiple times. Without using an ActionSchema, a reference to the action is added to every menu created from the schema. When one of the menus is destroyed, the action is also destroyed and is made unusable.
- action_factory = Callable()¶
A factory for the Action instance.
- items = Property()¶
Items is overwritten to be empty and read-only to avoid assigning to it by mistake.
- class pyface.action.schema.schema.GroupSchema(*items, **traits)[source]¶
Bases:
Schema
A schema for a Pyface Group.
- group_factory = Callable()¶
A factory for instantiating a pyface Group.
- separator = Bool(True)¶
Does the group require a separator when it is visualized?
- class pyface.action.schema.schema.MenuSchema(*items, **traits)[source]¶
Bases:
Schema
A schema for a Pyface MenuManager.
- name = Str()¶
The menu’s user visible name.
- separator = Bool(False)¶
Does the menu require a separator before the menu item?
- action = Instance("pyface.action.action.Action")¶
The default action for tool button when shown in a toolbar (Qt only)
A factory for instantiating a pyface MenuManager.
- class pyface.action.schema.schema.MenuBarSchema(*items, **traits)[source]¶
Bases:
Schema
A schema for a Pyface MenuBarManager.
- id = "MenuBar"¶
Assign a default ID for menu bar schemas.
A factory for instantiating a pyface MenuBarManager.
- class pyface.action.schema.schema.ToolBarSchema(*items, **traits)[source]¶
Bases:
Schema
A schema for a Pyface ToolBarManager.
- id = "ToolBar"¶
Assign a default ID for tool bar schemas.
- name = Str("Tool Bar")¶
The tool bar’s user visible name. Note that this name may not be used on all platforms.
- image_size = Tuple((16, 16))¶
The size of tool images (width, height).
- orientation = Enum("horizontal", "vertical")¶
The orientation of the toolbar.
- show_divider = Bool(True)¶
Should we display the horizontal divider?
- show_tool_names = Bool(True)¶
Should we display the name of each tool bar tool under its image?
- tool_bar_manager_factory = Callable()¶
A factory for instantiating a pyface ToolBarManager
- pyface.action.schema.schema.SGroup¶
alias of
GroupSchema
- pyface.action.schema.schema.SMenu¶
alias of
MenuSchema
- pyface.action.schema.schema.SMenuBar¶
alias of
MenuBarSchema
- pyface.action.schema.schema.SToolBar¶
alias of
ToolBarSchema