PYME.ui.AUIFrame module

class PYME.ui.AUIFrame.AUIFrame(*args, **kwargs)

Bases: mClass

A class which encapsulated the common frame layout code used by dsviewer, VisGUI, and PYMEAcquire.

Methods

AddMenuItem(menuName[, itemName, ...]) Add a menu item to dh5view, VisGUI, or PYMEAcquire.
AddPage([page, select, caption, update]) Add a page to the auto-notebook
CreateFoldPanel() Create a panel of folding ‘drawers’ on the left side of the frame.
OnSize(event)
AddMenuItem(menuName, itemName='', itemCallback=None, itemType='normal', helpText='', id=-1)

Add a menu item to dh5view, VisGUI, or PYMEAcquire.

Parameters:

menuName : basestring

The name of the menu to add an item to. Submenus are optionally designated by using > characters as a separator, e.g. "File>Recent". If a menu or submenu does not already exist it is created.

itemName : basestring

The name of the item to add. Required if itemType is ‘normal’ or ‘check’. wxpython accelerator specification is supported.

itemCallback : function

A function to call when the menu item is selected. Should accept a wx.Event as the first and only argument.

itemType : basestring

One of ‘normal’, ‘check’, or ‘separator’.

helpText : basestring

id : int

wx ID for the menu item. Should normally be ignored, and only set if there is a standard ID for the menu item, and facilitates using platform standard icons and shortcuts for open, save, quit, etc ....

AddPage(page=None, select=True, caption='Dummy', update=True)

Add a page to the auto-notebook

Parameters:

page : wx.Window instance

The page to add, usually a wx.Panel. The window should have been created with this window as the parent.

select : bool

Should the page be displayed above previous pages?

caption : string

The caption to appear in the notebook tab

CreateFoldPanel()

Create a panel of folding ‘drawers’ on the left side of the frame. loops over all the functions defined in self.paneHooks and calls them to generate the drawers.

OnSize(event)