Dummy application. Allows the user to set an external data manager
Bases: sans.guiframe.gui_manager.ViewApp
IsActive(self) -> bool
Return True if our app has focus.
See GetAppName and SetAppName
See GetAssertMode and SetAssertMode
Bind an event to an event handler.
Parameters: |
|
---|
See GetClassName and SetClassName
Disconnect(self, int id, int lastId=-1, EventType eventType=wxEVT_NULL, PyObject func=None) -> bool
Process the first event in the event queue (blocks until an event appears if there are none currently)
See GetEvtHandlerEnabled and SetEvtHandlerEnabled
Exit the main loop thus terminating the application. :see: wx.Exit
Exit the main GUI loop during the next iteration of the main loop, (i.e. it does not stop the program immediately!)
See GetExitOnFrameDelete and SetExitOnFrameDelete
Filters all events. SetCallFilterEvent controls whether or not your override is called.
Get the application name.
Get the current OnAssert behaviour setting.
Returns the state of the Call FilterEvent flag.
Get the application’s class name.
Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if it wasn’t found at all. Raises an exception on non-Windows platforms.
Get the current exit behaviour setting.
Return the layout direction for the current locale.
Return the main top level window (if it hadn’t been set previously with SetTopWindow(), will return just some top level window and, if there not any, will return None)
Return (and create if necessary) the app traits object to which we delegate for everything which either should be configurable by the user (then he can change the default behaviour simply by overriding CreateTraits() and returning his own traits object) or which is GUI/console dependent as then wx.AppTraits allows us to abstract the differences behind the common facade.
Todo : | Add support for overriding CreateAppTraits in wxPython. |
---|
Get current UseBestVisual setting.
Get the application’s vendor name.
Return True if our app has focus.
Tests if it is possible to create a GUI in the current environment. This will mean different things on the different platforms.
- On X Windows systems this function will return False if it is not able to open a connection to the X display, which can happen if $DISPLAY is not set, or is not set correctly.
- On Mac OS X a False return value will mean that wx is not able to access the window manager, which can happen if logged in remotely or if running from the normal version of python instead of the framework version, (i.e., pythonw.)
- On MS Windows...
Returns True if we’re running the main loop, i.e. if the events can currently be dispatched.
For wx.Objects that use C++ reference counting internally, this method can be used to determine if two objects are referencing the same data object.
See GetLayoutDirection
Hide all application windows just as the user can do with the system Hide command. Mac only.
Execute the main GUI event loop
See GetNextHandler and SetNextHandler
Things that must be done after _BootstrapApp has done its thing, but would be nice if they were already done by the time that OnInit is called.
Returns True if there are unprocessed events in the event queue.
See GetPreviousHandler and SetPreviousHandler
See GetPrintMode and SetPrintMode
Called from the MainLoop when the application becomes idle (there are no pending events) and sends a wx.IdleEvent to all interested parties. Returns True if more idle events are needed, False if not.
Process all events in the Pending Events list – it is necessary to call this function to process posted events. This normally happens during each event loop iteration.
Redirect sys.stdout and sys.stderr to a file or a popup window.
Send idle event to window and all subwindows. Returns True if more idle time is requested.
Set the application name. This value may be used automatically by wx.Config and such.
Set the OnAssert behaviour for debug and hybrid builds.
Set the Call FilterEvent flag. When set your override of FilterEvent will be called. SetCallFilterEvent’s purpose is to avoid any performance penalty when you have overriden FilterEvent, but don’t want it to be called, and also to reduce the runtime overhead when it is not overridden.
Set the application’s class name. This value may be used for X-resources if applicable for the platform
Control the exit behaviour: by default, the program will exit the main loop (and so, usually, terminate) when the last top-level program window is deleted. Beware that if you disable this behaviour (with SetExitOnFrameDelete(False)), you’ll have to call ExitMainLoop() explicitly from somewhere.
Set the title, position and/or size of the output window if the stdio has been redirected. This should be called before any output would cause the output window to be created.
Set the “main” top level window
Set whether the app should try to use the best available visual on systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
Set the application’s vendor name. This value may be used automatically by wx.Config and such.
See GetTopWindow and SetTopWindow
See GetTraits
Disconnects the event handler binding for event from self. Returns True if successful.
See GetUseBestVisual and SetUseBestVisual
See GetVendorName and SetVendorName
Make sure that idle events are sent again. :see: wx.WakeUpIdle
Process all currently pending events right now, instead of waiting until return to the event loop. It is an error to call Yield recursively unless the value of onlyIfNeeded is True.
Warning : | This function is dangerous as it can lead to unexpected reentrancies (i.e. when called from an event handler it may result in calling the same event handler again), use with extreme care or, better, don’t use at all! |
---|---|
See : | wx.Yield, wx.YieldIfNeeded, wx.SafeYield |
For internal use only
alias of type
x.__delattr__(‘name’) <==> del x.name
x.__getattribute__(‘name’) <==> x.name
x.__hash__() <==> hash(x)
Construct a wx.App object.
Parameters: |
|
---|---|
Note : | You should override OnInit to do applicaition initialization to ensure that the system, toolkit and wxWidgets are fully initialized. |
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
x.__str__() <==> str(x)
list of weak references to the object (if defined)
Manually add a perspective to the application GUI
Build the GUI
Displays the splash screen. It will exactly cover the main frame.
open a state file at the start of the application
alias of PyOnDemandOutputWindow
Sets a reference to the application manager of the GUI manager (Frame)
Set the welcome panel
Parameters: | panel_class – class of the welcome panel to be instantiated |
---|
The membership flag
Determines the position and size of the application frame such that it fits on the user’s screen without obstructing (or being obstructed by) the Windows task bar. The maximum initial size in pixels is bounded by WIDTH x HEIGHT. For most monitors, the application will be centered on the screen; for very large monitors it will be placed on the left side of the screen.
Initialization
Bases: sans.guiframe.plugin_base.PluginBase
Abstract class for gui_manager Plugins.
Adds color to a plugin
if return True, then call handler to laod data
clear all related panels
Delete all references of data which id are in data_list.
Check if the plugin has a batch capability
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
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 |
---|
update state
Append menu item under file menu item of the frame
Create and return the list of application menu items for the plug-in. :param parent: parent window
Returns: | plug-in menu |
---|
Post initialization call back to close the loose ends
the plugin to its batch state if flag is True
receive a list of data and use it in the current perspective
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
update state
Parameters: | theory_list – list of information |
---|
related to available theory state
return True if these plugin use data