exopy.app.app_extensions module¶
App plugin extensions declarations.
-
class
exopy.app.app_extensions.
AppStartup
(parent=None, **kwargs)[source]¶ Bases:
enaml.core.declarative.Declarative
A declarative class for defining a workbench app start-up contribution.
AppStartup object can be contributed as extensions child to the ‘startup’ extension point of the ‘exopy.app’ plugin. AppStartup object are used to customize the application start up.
-
id
¶ The globally unique identifier for the start-up.
-
priority
¶ The priority determine the order in which AppStartup are called. The lowest this number the sooner the object will be called. Two AppStartup with the same priority are called in the order in which they have been discovered.
-
-
class
exopy.app.app_extensions.
AppClosing
(parent=None, **kwargs)[source]¶ Bases:
enaml.core.declarative.Declarative
A declarative class for defining a workbench app closing contribution.
AppClosing object can be contributed as extensions child to the ‘closing’ extension point of the ‘exopy.app’ plugin. AppClosing object are used to check whether or not the application can be exited safely.
-
id
¶ The globally unique identifier for the closing.
- Type
unicode
-
validate
[source]¶ A callable performing checks ensuring that the application can be safely exited and setting the event (CloseEvent) accordingly.
- Type
callable(window
,event)
-
id
¶ The globally unique identifier for the closing.
-
validate
(window, event)[source]¶ Check that the application can be safely exited.
If it is not the case the event should be ignored (by calling the ignore method)
- Parameters
window – Reference to the main application window.
event (
enaml.widgets.window.ClosedEvent
) – Closing event whose ignore method should be called to prevent application closing.
-
-
class
exopy.app.app_extensions.
AppClosed
(parent=None, **kwargs)[source]¶ Bases:
enaml.core.declarative.Declarative
A declarative class for defining a workbench app closed contribution.
AppClosed object can be contributed as extensions child to the ‘closed’ extension point of the ‘exopy.app’ plugin. AppClosed object are used to perform some clean up operation before stopping any plugin.
MOST of the time performing clean up when stopping the plugin is sufficient and should be the preferred solution.
-
id
¶ - Type
unicode
- validatecallable(window, event)
A callable performing checks ensuring that the application can be safely exited and setting the event (CloseEvent) accordingly.
-
id
¶ The globally unique identifier for the closing.
-
priority
¶ The priority determine the order in which AppClosed are called. The lowest this number the sooner the object will be called. Two AppClosed with the same priority are called in the order in which they have been discovered.
-