Inherits from
- HasTraits: enthought.traits.has_traits.HasTraits
Attributes
- application
The application that the view is part of. This is a convenience property and is equivalent to 'self.window.application'.
application = Property(Instance(Application))
- busy
Is the view busy? (i.e., should the busy cursor (often an hourglass) be displayed?).
busy = Bool(False)
- control
The toolkit-specific control that represents the view.
The framework sets this to the value returned by 'create_control'.
control = Any
- has_focus
Does the view currently have the focus?
has_focus = Bool(False)
- height
The default height of the view (as a fraction of the window height).
e.g. 0.5 == half the window height.
Note that this is treated as a suggestion, and it may not be possible for the workbench to allocate space requested.
height = Float(-Const(1))
- id
The view's globally unique identifier.
id = Str
- name
The view's name.
name = Str
- position
The default position of the view relative to the item specified in the 'relative_to' trait.
'top' puts the view above the 'relative_to' item. 'bottom' puts the view below the 'relative_to' item. 'left' puts the view to the left of the 'relative_to' item. 'right' puts the view to the right of the 'relative_to' item. 'with' puts the view in the same region as the 'relative_to' item.
If the position is specified as 'with' you must specify a 'relative_to' item other than the editor area (i.e., you cannot position a view 'with' the editor area).
position = Enum('left', 'top', 'bottom', 'right', 'with')
- relative_to
The Id of the view to position this view relative to. If this is not specified (or if no view exists with this Id) then the view will be placed relative to the editor area.
relative_to = Str
- selection
The current selection within the view.
selection = List
- visible
Whether the view is visible or not.
visible = Bool(False)
- width
The default width of the view (as a fraction of the window width).
e.g. 0.5 == half the window width.
Note that this is treated as a suggestion, and it may not be possible for the workbench to allocate space requested.
width = Float(-Const(1))
- window
The workbench window that the view is in.
The framework sets this when the view is added to a window.
window = Instance('enthought.envisage.workbench.Window')
Inherited from base classes
Method summary
- create_control(self, parent)
- destroy_control(self)
- get_service(self, interface, query = None)
- get_services(self, interface, query = None)
- register_service(self, interface, obj, properties = None)
- set_focus(self)
- unregister_service(self, service_id)
Inherited from base classes
- __deepcopy__(self, memo)
- __getstate__(self)
- __prefix_trait__(self, name)
- __reduce_ex__(self, protocol)
- __setstate__(self, state)
- add_class_trait(cls, name, *trait)
- add_trait(self, name, *trait)
- add_trait_category(cls, category)
- add_trait_listener(self, object, prefix = '')
- all_trait_names(self)
- base_trait(self, name)
- class_default_traits_view(cls)
- class_editable_traits(cls)
- class_trait_names(cls, **metadata)
- class_trait_view(cls, name = None, view_element = None)
- class_trait_view_elements(cls)
- class_traits(cls, **metadata)
- clone_traits(self, traits = None, memo = None, copy = None, **metadata)
- configure_traits(self, filename = None, view = None, kind = None, edit = True, context = None, handler = None, id = '', scrollable = None, **args)
- copy_traits(self, other, traits = None, memo = None, copy = None, **metadata)
- copyable_trait_names(self, **metadata)
- default_traits_view(self)
- edit_traits(self, view = None, parent = None, kind = None, context = None, handler = None, id = '', scrollable = None, **args)
- editable_traits(self)
- get(self, *names, **metadata)
- on_trait_change(self, handler, name = None, remove = False, dispatch = 'same')
- print_traits(self, show_help = False, **metadata)
- remove_trait(self, name)
- remove_trait_listener(self, object, prefix = '')
- reset_traits(self, traits = None, **metadata)
- set(self, trait_change_notify = True, **traits)
- set_trait_dispatch_handler(cls, name, klass, override = False)
- sync_trait(self, trait_name, object, alias = None, mutual = True, remove = False)
- trait(self, name, force = False, copy = False)
- trait_context(self)
- trait_monitor(cls, handler, remove = False)
- trait_names(self, **metadata)
- trait_subclasses(cls, all = False)
- trait_view(self, name = None, view_element = None)
- trait_view_elements(self)
- trait_views(self, klass = None)
- traits(self, **metadata)
- validate_trait(self, name, value)
Methods
- create_control(self, parent)
Creates the toolkit-specific control that represents the view.
'parent' is the toolkit-specific control that is the view's parent.
View implementors should override this!
- destroy_control(self)
Destroys the toolkit-specific control that represents the view.
- get_service(self, interface, query = None)
Returns a service that implements the specified interface.
Raises a SystemError if no such service is found.
- get_services(self, interface, query = None)
Returns all services that match the specified query.
If no services match the query, then an empty list is returned.
- register_service(self, interface, obj, properties = None)
Registers a service that implements the specified interface.
Returns a service ID (a unique ID for the service within the application).
- set_focus(self)
Sets the focus to the appropriate control in the view.
By default we set the focus to be the view's top-level control. If you need to give focus to some child control then override.
- unregister_service(self, service_id)
Unregisters a service.