As the name suggests, the gui module contains a collection of modules that make up the AvoPlot GUI.
This module is still under construction! Eventually, it will contain a set of data analysis tools for working with data.
Bases: wx._misc.ArtProvider
Customised art provider class for serving the AvoPlot specific icons.
Overrides CreateBitmap from wx.ArtProvider. This method looks in the AvoPlot icons directory (as returned by avoplot.get_avoplot_icons_dir()) for the icon specified by artid. The icons are split up into subfolders by size (for example “16x16”) and this method will only look in the relevant size subfolder for the requested icon.
Bases: wx.aui.AuiNotebook
Notebook control which holds all the controls for the currently selected element. Each set of controls (as returned by element.get_control_panels()) is added as a new tab in the notebook.
Event handler for element delete events. Removes any control panels associated with the deleted element from the notebook.
Event handler for element select events. Adds any relevant control panels for the newly selected element to the notebook.
Sets the control panels shown in the notebook. ‘control_panels’ should be a list of AvoPlotControlPanelBase objects.
The main module contains the code for the main frame of the AvoPlot GUI.
Bases: avoplot.core.AvoPlotElementBase
A session is the “root” element for an AvoPlot program instance. It doesn’t really do anything by itself, but provides a parent to any figures that get created.
Bases: wx._windows.Frame
Main frame of the GUI. This is set as the top level window when the AvoPlot App is created in the AvoPlot.py script.
Adds a figure element (an avoplot.figure.AvoPlotFigureBase instance) to the current session.
Create all the GUI elements and show the main window. Note that this needs to be separate from the __init__ method, since we need set the top level window for wx before calling launch().
All AvoPlot events (see the ‘core’ module) are posted to the MainFrame where they are handled by this method. All it does is to repost the event to all the GUI components so that they can react as needed.
Handler called when the MainFrame is closed. This performs all the tidy up operations such as saving program state. Note that all elements that can be reached through the AvoPlotSession - i.e. all those that have a parent that isn’t None, will have their delete() method called before the program exits.
Event handler for pane close events (where the panes are those managed by the AUI manager of the MainFrame object - currently just the control pane and the navigation pane).
Event handler for the “unhiding” of the control pane.
Event handler for the “unhiding” of the navigation pane.
Bases: wx.aui.AuiNotebook
AuiNotebook for displaying figures in. Multiple figures may be viewed simultaneously by splitting the notebook.
Event handler for AvoPlotElementDelete events. If the element is a figure then the notebook page associated with the figure is deleted - note that this destroys the window, and so future attempts to access the figure object will cause an exception.
Event handler for AvoPlotElementAdd events. Adds a page to the notebook for newly created figure objects.
Event handler for AvoPlotElementRename events. If the element is a figure then the relevant notebook page is renamed accordingly.
Event handler for AvoPlotElementSelect events. Changes the currently selected notebook page to that containing the newly selected element.
If the selected element is not a figure, then the figure which contains the element is selected.
Event handler for tab change events. Calls on set_selected() on the figure associated with the newly selected tab.
Event handler for tab close events. This vetos the event to prevent the notebook from destroying the window and then calls delete() on the figure object associated with the tab that has just been closed, relying on the event handlers for the AvoPlotElementDelete event to actually destroy the window when it is finished with (this is done by on_delete_element() in this class)
Event handler for right click events on the notebook tabs. Creates a popup menu allowing the user to close the tab, split the tab and rename the tab.
Event handler for rename events (from the tab right click menu) for notebook pages. Opens a rename dialog and then sets the name of the relevant figure object. Note that this generates an AvoPlotElementRename event and the actual renaming of the notebook tab is left up to the event handler for this event - on_rename_element()
Splits the selected pane horizontally.
Splits the selected pane vertically.
Unsplits all the panes.
Bases: wx._controls.ToolBar
Main program toolbar
Enables the plot tools if state=True or disables them if state=False
Event handler for new element events. If the element is not a figure then nothing gets done. For figures, their zoom and pan settings are updated depending on the toggle state of the zoom/pan tools.
This method also enables the plot navigation tools if they were previously disabled.
Event handler for element delete events.If the element is not a figure then nothing gets done. If the element being deleted was the last figure in the session, then this disables the plot navigation tools.
Event handler for element select events. Just keeps track of what the curretly selected element is.
Event handler for “home zoom level” events. Resets all subplots in the current figure to their default zoom levels.
Handle ‘new’ button pressed. Creates a popup menu over the tool button containing the same entries as the File->New menu.
Event handler for pan tool toggle events. Enables or disables panning in all figures accordingly.
Event handler for save tool events. Opens a file save dialog for saving the currently selected figure as an image file.
Event handler for zoom tool toggle events. Enables or disables zooming in all figures accordingly.
The widgets module contains a set of convenience widgets for building control panels for elements.
Bases: avoplot.gui.widgets.SettingBase
A text label next to a wx choice control.
Bases: avoplot.gui.widgets.SettingBase
A text label next to a wx colour picker control.
Bases: wx._core.BoxSizer
Base class for settings controls.
Bases: avoplot.gui.widgets.SettingBase
A text label next to a wx text entry control.