Bases: sans.guiframe.plugin_base.PluginBase
This class defines the interface for invariant Plugin class that can be used by the gui_manager.
Adds color to a plugin
if return True, then call handler to laod data
This method is optional.
When the context menu of a plot is rendered, the get_context_menu method will be called to give you a chance to add a menu item to the context menu.
A ref to a Graph object is passed so that you can investigate the plot content and decide whether you need to add items to the context menu.
This method returns a list of menu items. Each item is itself a list defining the text to appear in the menu, a tool-tip help text, and a call-back method.
Parameters: | graph – the Graph object to which we attach the context menu |
---|---|
Returns: | a list of menu items with call-back function |
return state reader and its extensions
Create and return the list of wx.Panels for your plug-in. Define the plug-in perspective.
Panels should inherit from DefaultPanel defined below, or should present the same interface. They must define “window_caption” and “window_name”.
Parameters: | parent – parent window |
---|---|
Returns: | list of panels |
Get the list of panel names for this perspective
Returns a set of menu entries for tools
Show a general help dialog.
return True is this plugin is always active and it is local to guiframe even if the user is switching between perspectives
data_name = ‘None’ in_use = False example [(data_name, self.sub_menu)]
Load data
Load entire folder
need to be overwritten by the derivated class
Call back function for the perspective menu item. We notify the parent window that the perspective has changed.
Parameters: | event – menu event |
---|
Set the state when called by EVT_STATE_UPDATE event from guiframe after a .inv/.svs file is loaded
replot the current data if the user enters a new scale or background
Receive a data set and post a NewPlotEvent to parent.
Parameters: |
|
---|
Append menu item under file menu item of the frame
Create and return the list of application menu items for the plug-in.
Parameters: | parent – parent window |
---|---|
Returns: | plug-in menu |
Post initialization call back to close the loose ends
Save data in provided state object.
Parameters: |
|
---|
the plugin to its batch state if flag is True
receive a list of data and compute invariant
Call back method that True to notify the parent that the current plug-in can be set as default perspective. when returning False, the plug-in is not candidate for an automatic default perspective setting
Call-back method for the state reader. This method is called when a .inv/.svs file is loaded.
Parameters: | state – State object |
---|
Parameters: | theory_list – list of information related to available theory state |
---|
return True if these plugin use data