Package diffpy :: Package pdfgui :: Package gui :: Module mainframe :: Class MainFrame
[hide private]
[frames] | no frames]

Class MainFrame

source code

     object --+                    
              |                    
wx._core.Object --+                
                  |                
wx._core.EvtHandler --+            
                      |            
        wx._core.Window --+        
                          |        
 wx._windows.TopLevelWindow --+    
                              |    
              wx._windows.Frame --+
                                  |
                                 MainFrame

The left pane is a FitTree (from fittree.py), the right is a dynamic
panel, accessed via the data member rightPanel, which can hold one of any
number of panels. The panels that can appear in the right pane must be
derived from PDFPanel (in pdfpanel.py) and are defined in the dynamicPanels
dictionary, which is defined in __customProperties. A panel is placed in the
right pane by passing its dynamicPanels dictionary key to the
switchRightPanel method.  This method takes care of displaying the panel,
giving the data it needs, and calling its refresh() method.

** NODE TYPES **
The FitTree is essential to the functionality of the Gui.
The tree contains one of five types of items:
"fit"           --  This represents a fit that is to be run by pdffit.
"dataset"       --  This represents a data for a fit.
"phase"         --  This represents the theoretical phases needed for a
                    dataset or a calculation.
"calculation"   --  This represents a calculation which is to be made from
                    using a configured fit.

Depending upon what type of item is selected in the tree, the right pane
will display the properties and configuration of that item (if in "fitting
mode", see below.) More on these item types is given in the documentation
for the FitTree in fittree.py. See r

** MODES **
The program has various modes of operation.
"fitting"       --  In this mode the right pane changes depending upon what
                    type of item is selected in the FitTree. When the
                    fitting button is pressed, the program is in "fitting"
                    mode.
"addingdata"    --  This mode is for adding data. 
"addingphase"   --  This mode is for adding the phase
"config"        --  This mode is used for preferences and server
                    configuration. 
"rseries"       --  The mode used when configuring an r-series macro.
"tseries"       --  The mode used when configuring a temperature series
                    macro.
"dseries"       --  The mode used when configuring a doping series macro.

The mode determines how the tree and other widgets react to user
interaction. The mode of the program is changed with the method setMode.
This method outright enables or disables certain widgets that should not be
used when in certain modes.

** DATA MEMBERS **
dynamicPanels -- The dictionary of right panels. This is used to change the
                 right panel in the method switchRightPanel. The panels held
                 by the dynamicPanels dictionary are listed below by their
                 dictionary keys:

                * Miscellaneous panels:
                "blank"         --  A blank panel
                "rseries"       --  The r-series macro panel
                "tseries"       --  The temperature series macro panel
                "dseries"       --  The doping series macro panel
                "welcome"       --  A welcome panel

                * 'fitting' mode panels
                "fit"           --  The panel for 'fit' nodes
                "phase"         --  The panel for 'phase' nodes
                "dataset"       --  The panel for 'dataset' nodes
                "calculation"   --  The panel for 'calculation' nodes 

                * Panels specific to other program modes
                "adddata"       --  The panel used in 'addingdata' mode
                "addphase"      --  The panel used in 'addingphase' mode
                "serverconfig"  --  The panel used in 'config' mode

                * Panels for future implementation
                "configuration" --  Another 'config' mode panel

rightPanel  --  The current right panel.
fullpath    --  The full path to the most recently accessed project file.
workpath    --  The full path to the working directory. This is modified
                whenever something is loaded or saved to file. It is
                preserved in the current session and across new projects.
cP          --  A python SafeConfigurationParser object. This is in charge
                of storing configuration information about the most recently
                used files list. It is also used by serverpanel to store
                server configuration and by addphasepanel and adddatapanel
                to store their respective fullpath variables.  The code that
                handles the MRU files interacts directly with cP.
mode        --  The current mode of the program. This is modified using the
                setMode method. See the MODES section above.
name        --  The name of the program as defined in pdfguiglobals.
control     --  The pdfguicontrol object needed for interfacing with the
                engine pdffit2 code.
isAltered   --  A Boolean flag that indicates when the program has been
                altered. This should be changed with the method needsSave so
                that the save menu item and toolbar button can be updated
                accordingly.
runningDict --  A dictionary of running fits and calculations indexed by
                name. This dictionary is used to change the status colors of
                running fits and to keep the user from editing a running
                fit.
quitting    --  A boolean that is set when the program is quitting. This
                flag tells the error handlers to ignore any errors that take
                place during shutdown.



Instance Methods [hide private]
 
__init__(self, *args, **kwds)
__init__(self, Window parent, int id=-1, String title=EmptyString, ...
source code
 
__cmdLineLoad(self)
Open file loaded from the command line.
source code
 
__defineLocalIds(self)
Several user functions are duplicated many times throughout the gui.
source code
 
__customProperties(self)
Custom Properties go here.
source code
 
__setupMainMenu(self)
This sets up the menu in the main frame.
source code
 
__setupToolBar(self)
This sets up the tool bar in the parent window.
source code
 
__customBindings(self)
Custom user bindings go here.
source code
 
__menuBindings(self)
Setup bindings for the main menu and toolbar.
source code
 
__fittingRightMenuBindings(self)
Bindings for the fitting-mode right-click menu.
source code
 
switchRightPanel(self, paneltype)
Switch the panel which is visible in the right hand side.
source code
 
setPanelSpecificData(self, paneltype)
This method sets the panel specific data for the right panel.
source code
 
setMode(self, mode)
Set the mode of the program.
source code
 
loadConfiguration(self)
Load the configuration from file.
source code
 
updateConfiguration(self)
Update the configuration information.
source code
 
writeConfiguration(self)
Write the program configuration to file.
source code
 
checkForSave(self)
Pop up a dialog if the project needs to be saved.
source code
 
updateTitle(self)
Update the title according to the name of the current file.
source code
 
onMainMenu(self, event)
Prepare the main menu whenever it is activated.
source code
 
makeTreeSelection(self, node)
Manually select a node of the tree and update according to selection.
source code
 
treeSelectionUpdate(self, node)
Update the widgets based on a tree selection.
source code
 
onTreeSelChanged(self, event)
Set the click behavior for each mode.
source code
 
onTreeSelChanging(self, event)
Set the click behavior for each mode.
source code
 
onBeginLabelEdit(self, event)
Veto editing of some items and in some modes.
source code
 
onEndLabelEdit(self, event)
Allow only certain types of renaming.
source code
 
onRightClick(self, event)
Bring up the right-click menu.
source code
 
onMiddleClick(self, event)
Quickplot on item middle click.
source code
 
onDoubleClick2(self, event)
Select-all type on item double click.
source code
 
onDoubleClick(self, event)
Select-all type on item double click.
source code
 
onKey(self, event)
Catch key events in the panel.
source code
 
updateToolbar(self)
Update the toolbar based upon the status of the program.
source code
 
needsSave(self, altered=True)
Tell the gui that the program needs to be saved.
source code
 
disableSharedMenuItems(self, menu)
Disable some menu items based upon what is selected in the tree.
source code
 
disableMainMenuItems(self)
Disable main menu items.
source code
 
onNewFit(self, event)
Start a new fit tree.
source code
 
onCopy(self, event)
Copy the subtree of the current selected item into the clipboard.
source code
 
onPaste(self, event)
Paste the subtree from the clipboard into the tree.
source code
 
onPasteLink(self, event)
Paste a copied fit and link it to the original.
source code
 
onInsData(self, event)
Insert a new dataset item.
source code
 
onInsPhase(self, event)
Insert a new phase item.
source code
 
onInsCalc(self, event)
Insert a new calculation item.
source code
 
onDelete(self, event)
Remove the subtrees starting from the selected nodes.
source code
 
onRun(self, event)
Run the selected fits/calculations and disable their tree entries.
source code
 
onStop(self, event)
Stop all fits.
source code
 
onPreferences(self, event)
Switch the right panel to the 'preferences' panel.
source code
 
onServerConfig(self, event)
Switch the right panel to the 'serverconfig' panel.
source code
 
onDefaultLayout(self, event)
Place the fit tree and plot panel in default locations.
source code
 
onShowFit(self, event)
Make sure the fit tree is visible.
source code
 
onShowPlot(self, event)
Make sure the plot panel is visible.
source code
 
onShowOutput(self, event)
Make sure the output panel is visible.
source code
 
onShowJournal(self, event)
Bring up or hide the journal window.
source code
 
onPlotIStruct(self, event)
Plots the phase structure.
source code
 
onPlotFStruct(self, event)
Plots the phase structure.
source code
 
onPrintBL(self, event)
Print the bond lengths of a selected structure to the output panel.
source code
 
onPrintBA(self, event)
Print the bond angles of a selected structure to the output panel.
source code
 
onQuickPlot(self, event)
Quickly plot information for the selected node.
source code
 
onAbout(self, event) source code
 
onRequest(self, event) source code
 
onCommunity(self, event)
Open the brower and go to...
source code
 
onNew(self, event)
Create a new project.
source code
 
onOpen(self, event)
Open a file dialog so an existing project can be opened.
source code
 
onSave(self, event)
Save the project to a predetermined location.
source code
 
onSaveAs(self, event)
Open a save dialog so the current project can be saved.
source code
 
onQuit(self, event)
Shut down gracefully.
source code
 
onMRUFile(self, event)
Open a recently used file.
source code
 
onExportRes(self, event)
Export the results file for the selected calculation.
source code
 
onImportScript(self, event) source code
 
onRSeries(self, event)
Open up the r-series panel.
source code
 
onTSeries(self, event)
Open up the temperature series panel.
source code
 
onDSeries(self, event)
Open up the doping series panel.
source code
 
onExportNewStruct(self, event)
Export a structure that was created from scratch.
source code
 
onExportStruct(self, event)
Export a fit structure.
source code
 
onExportPDF(self, event)
Export a fit PDF.
source code
 
onSaveCalc(self, event)
Export a calculated PDF.
source code
 
onDocumentation(self, event)
Show information about the documentation.
source code
 
showMessage(self, info, title='PDF Control Error')
showMessage(self, info) --> tell user about an exception and so on...
source code
 
lock(self) source code
 
unlock(self) source code
 
postEvent(self, type, info)
This method is called by the control.
source code
 
onCustom(self, event)
This handles the custom events sent by the control.
source code
 
updateFittingStatus(self, job)
Update the fitting status.
source code
 
updateOutput(self)
Update text in outputPanel with text in stdout.
source code

Inherited from wx._windows.Frame: Command, Create, CreateStatusBar, CreateToolBar, DoGiveHelp, DoMenuUpdates, GetMenuBar, GetStatusBar, GetStatusBarPane, GetToolBar, PopStatusText, ProcessCommand, PushStatusText, SendSizeEvent, SetMenuBar, SetStatusBar, SetStatusBarPane, SetStatusText, SetStatusWidths, SetToolBar

Inherited from wx._windows.TopLevelWindow: CenterOnScreen, CentreOnScreen, EnableCloseButton, GetDefaultItem, GetIcon, GetTitle, GetTmpDefaultItem, Iconize, IsActive, IsAlwaysMaximized, IsFullScreen, IsIconized, IsMaximized, MacGetMetalAppearance, MacGetUnifiedAppearance, MacSetMetalAppearance, Maximize, RequestUserAttention, Restore, SetDefaultItem, SetIcon, SetIcons, SetShape, SetTitle, SetTmpDefaultItem, ShowFullScreen, __repr__

Inherited from wx._core.Window: AcceptsFocus, AcceptsFocusFromKeyboard, AddChild, AdjustForLayoutDirection, AssociateHandle, CacheBestSize, CanSetTransparent, CaptureMouse, Center, CenterOnParent, Centre, CentreOnParent, ClearBackground, ClientToScreen, ClientToScreenXY, Close, ConvertDialogPointToPixels, ConvertDialogSizeToPixels, ConvertPixelPointToDialog, ConvertPixelSizeToDialog, DLG_PNT, DLG_SZE, Destroy, DestroyChildren, Disable, DissociateHandle, DragAcceptFiles, Enable, FindWindowById, FindWindowByName, Fit, FitInside, Freeze, GetAcceleratorTable, GetAdjustedBestSize, GetAutoLayout, GetBackgroundColour, GetBackgroundStyle, GetBestFittingSize, GetBestSize, GetBestSizeTuple, GetBestVirtualSize, GetBorder, GetCaret, GetCharHeight, GetCharWidth, GetChildren, GetClientAreaOrigin, GetClientRect, GetClientSize, GetClientSizeTuple, GetConstraints, GetContainingSizer, GetCursor, GetDefaultAttributes, GetDropTarget, GetEffectiveMinSize, GetEventHandler, GetExtraStyle, GetFont, GetForegroundColour, GetFullTextExtent, GetGrandParent, GetGtkWidget, GetHandle, GetHelpText, GetHelpTextAtPoint, GetId, GetLabel, GetLayoutDirection, GetMaxHeight, GetMaxSize, GetMaxWidth, GetMinHeight, GetMinSize, GetMinWidth, GetName, GetParent, GetPosition, GetPositionTuple, GetRect, GetScreenPosition, GetScreenPositionTuple, GetScreenRect, GetScrollPos, GetScrollRange, GetScrollThumb, GetSize, GetSizeTuple, GetSizer, GetTextExtent, GetThemeEnabled, GetToolTip, GetTopLevelParent, GetUpdateClientRect, GetUpdateRegion, GetValidator, GetVirtualSize, GetVirtualSizeTuple, GetWindowBorderSize, GetWindowStyle, GetWindowStyleFlag, GetWindowVariant, HasCapture, HasFlag, HasMultiplePages, HasScrollbar, HasTransparentBackground, Hide, HitTest, HitTestXY, InheritAttributes, InheritsBackgroundColour, InitDialog, InvalidateBestSize, IsBeingDeleted, IsDoubleBuffered, IsEnabled, IsExposed, IsExposedPoint, IsExposedRect, IsFrozen, IsRetained, IsShown, IsShownOnScreen, IsTopLevel, Layout, LineDown, LineUp, Lower, MakeModal, Move, MoveAfterInTabOrder, MoveBeforeInTabOrder, MoveXY, Navigate, PageDown, PageUp, PopEventHandler, PopupMenu, PopupMenuXY, PostCreate, PrepareDC, PushEventHandler, Raise, Refresh, RefreshRect, RegisterHotKey, ReleaseMouse, RemoveChild, RemoveEventHandler, Reparent, ScreenToClient, ScreenToClientXY, ScrollLines, ScrollPages, ScrollWindow, SetAcceleratorTable, SetAutoLayout, SetBackgroundColour, SetBackgroundStyle, SetBestFittingSize, SetCaret, SetClientRect, SetClientSize, SetClientSizeWH, SetConstraints, SetContainingSizer, SetCursor, SetDimensions, SetDoubleBuffered, SetDropTarget, SetEventHandler, SetExtraStyle, SetFocus, SetFocusFromKbd, SetFont, SetForegroundColour, SetHelpText, SetHelpTextForId, SetId, SetInitialSize, SetLabel, SetLayoutDirection, SetMaxSize, SetMinSize, SetName, SetOwnBackgroundColour, SetOwnFont, SetOwnForegroundColour, SetPosition, SetRect, SetScrollPos, SetScrollbar, SetSize, SetSizeHints, SetSizeHintsSz, SetSizeWH, SetSizer, SetSizerAndFit, SetThemeEnabled, SetToolTip, SetToolTipString, SetTransparent, SetValidator, SetVirtualSize, SetVirtualSizeHints, SetVirtualSizeHintsSz, SetVirtualSizeWH, SetWindowStyle, SetWindowStyleFlag, SetWindowVariant, ShouldInheritColours, Show, Thaw, ToggleWindowStyle, TransferDataFromWindow, TransferDataToWindow, UnregisterHotKey, Update, UpdateWindowUI, UseBgCol, Validate, WarpPointer

Inherited from wx._core.EvtHandler: AddPendingEvent, Bind, Connect, Disconnect, GetEvtHandlerEnabled, GetNextHandler, GetPreviousHandler, ProcessEvent, ProcessPendingEvents, SetEvtHandlerEnabled, SetNextHandler, SetPreviousHandler, Unbind

Inherited from wx._core.EvtHandler (private): _setOORInfo

Inherited from wx._core.Object: GetClassName, IsSameAs

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Static Methods [hide private]

Inherited from wx._windows.Frame: GetClassDefaultAttributes

Inherited from wx._core.Window: FindFocus, GetCapture, NewControlId, NextControlId, PrevControlId

Properties [hide private]

Inherited from wx._windows.Frame: MenuBar, StatusBar, StatusBarPane, ToolBar, thisown

Inherited from wx._windows.TopLevelWindow: DefaultItem, Icon, Title, TmpDefaultItem

Inherited from wx._core.Window: AcceleratorTable, AutoLayout, BackgroundColour, BackgroundStyle, BestSize, BestVirtualSize, Border, Caret, CharHeight, CharWidth, Children, ClientAreaOrigin, ClientRect, ClientSize, Constraints, ContainingSizer, Cursor, DefaultAttributes, DropTarget, EffectiveMinSize, Enabled, EventHandler, ExtraStyle, Font, ForegroundColour, GrandParent, GtkWidget, Handle, HelpText, Id, Label, LayoutDirection, MaxHeight, MaxSize, MaxWidth, MinHeight, MinSize, MinWidth, Name, Parent, Position, Rect, ScreenPosition, ScreenRect, Shown, Size, Sizer, ThemeEnabled, ToolTip, TopLevel, TopLevelParent, UpdateClientRect, UpdateRegion, Validator, VirtualSize, WindowStyle, WindowStyleFlag, WindowVariant

Inherited from wx._core.EvtHandler: EvtHandlerEnabled, NextHandler, PreviousHandler

Inherited from wx._core.Object: ClassName

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwds)
(Constructor)

source code 

__init__(self, Window parent, int id=-1, String title=EmptyString, 
    Point pos=DefaultPosition, Size size=DefaultSize, 
    long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> Frame

Overrides: wx._windows.Frame.__init__
(inherited documentation)

__cmdLineLoad(self)

source code 
Open file loaded from the command line.

This opens a file without any checking for existing projects. This
should only be called after all initializations. It will open a file
whose name is specified in pdfguiglobals.cmdargs.

__defineLocalIds(self)

source code 
Several user functions are duplicated many times throughout the gui.
This occurrs mostly between the main menu, the right-click menu, and the
many buttons in the gui. This method defines local Ids that can be used
for all of these.  

__customBindings(self)

source code 
Custom user bindings go here. 

These bindings are not present in wxglade. 

__menuBindings(self)

source code 
Setup bindings for the main menu and toolbar.

Since all toolbar functions use the same Ids as main menu items, the
toolbar events do not need their own bindings.

switchRightPanel(self, paneltype)

source code 
Switch the panel which is visible in the right hand side.

This sets any panel-specific data and calls the refresh() method of the
new rightPanel. All right panels must be derived from wxPanel and
PDFPanel (in pdfpanel module).

Inputs:
paneltype   --  The code used in self.dynamicPanels that indicates the
                panel to be displayed. If paneltype is None, the blank
                panel is displayed.

setPanelSpecificData(self, paneltype)

source code 
This method sets the panel specific data for the right panel.

This method gets panel-specific data and sends it to the rightPanel. The
different types of data assignment are listed below.

"fit" type:
* Give the fit object to the panel

"phase" type:
* initialize constraints dictionary and configuration and results
* Structure objects.

"dataset" type:
* initialize configuration, constraints, and results objects

"calculation" type:
* Give the calculation object to the panel

"rseries" type:
* Give the fit object to the panel

"tseries" type:
* Give the fit object to the panel

"dseries" type:
* Give the fit object to the panel

setMode(self, mode)

source code 
Set the mode of the program.

This method takes care of any widget properties that must change when
the mode is changed. If the mode is changing due to the change in the
right panel, always call setMode before switchRightPanel.
    
"fitting" mode:
    * treeCtrlMain is enabled
    * plotPanel panel is enabled
    * toolBar is enabled
    * menuBar is enabled

"addingdata" mode: 
"addingphase" mode:
"config" mode:
    * treeCtrlMain is disabled
    * plotPanel panel is disabled
    * toolBar is disabled
    * menuBar is disabled

"rseries" mode:
"tseries" mode:
"dseries" mode:
    * treeCtrlMain is enabled
    * plotPanel panel is disabled
    * toolBar is disabled
    * menuBar is disabled

loadConfiguration(self)

source code 
Load the configuration from file.

The MRU list is handled by the local member fileHistory, which is a
wxFileHistory object.

updateConfiguration(self)

source code 
Update the configuration information.

This updates the 'MRU' section of the configuration.

checkForSave(self)

source code 
Pop up a dialog if the project needs to be saved.

returns:
wx.ID_YES if the user chose to save the project.
wx.ID_NO if the user chose not to save the project.
wx.ID_CANCEL if they changed their mind about their action.

makeTreeSelection(self, node)

source code 
Manually select a node of the tree and update according to selection.

This makes sure that the node is visible after selection.

If node is None, this does nothing.

treeSelectionUpdate(self, node)

source code 
Update the widgets based on a tree selection.

"fitting" mode:
* Right panel changes depending upon the type of item selected from the
tree.

"rseries", "tseries", "dseries" mode:
* The behavior is defined in the associated panel

onTreeSelChanging(self, event)

source code 
Set the click behavior for each mode.

Note that this doesn't work on Windows. Be sure to build in redundancy
so that the program behaves as if this does not even get called. If the
Windows bug does not get fixed, this method will probably be
eliminated.

"addingdata" mode:
    * can select nothing

"addingphase" mode:
    * can select nothing

 "config" mode:
    * can select nothing

 "rseries" mode:
    * can only select fit items

 "tseries" mode:
    * can only select fit items

 "dseries" mode:
    * can only select fit items

onBeginLabelEdit(self, event)

source code 
Veto editing of some items and in some modes.

The following editing attempts are Veto()'d
* Editing any item in "addingdata", "addingphase", or "config" mode.

onEndLabelEdit(self, event)

source code 
Allow only certain types of renaming.

The following rename attempts are Veto()'d
* Giving a node the same name as a sibling. Cousins can share names.
* Giving a node the name ''. Everything needs a name.

onRightClick(self, event)

source code 
Bring up the right-click menu.

This menu can give a different menu depending upon which mode the
program is in. It can even give a different menu depending upon what
part of the tree is selected. 

"fitting" mode
The menu appears for right-clicks both on and off of tree items.
The menu has the following items:
"New Fit"           --  Append a new fit from anywhere on the tree.
"Copy"              --  Copy a fit, phase, dataset, or calc branch
"Paste"             --  Paste a copied branch into the tree. Branches
                        of a given type can only be pasted in certain
                        places.
"Delete"            --  Delete a branch from the tree.
"Insert Phase"      --  Insert a phase in the phase section of a fit or
                        calculation branch.
"Insert Data Set"   --  Insert a dataset in the dataset section of a fit
                        branch.
"Insert Calculation"--  Insert a calculation in the calculation section
                        of a fit.

The menu appears for right-clicks both on and off of tree items.
The menu has the following items:
"Select All"        --  The tree automatically selects all items of the
                        type the user clicked on.

needsSave(self, altered=True)

source code 
Tell the gui that the program needs to be saved.

This changes the state of the save menu and tool bar items.

altered     --  Whether or not the program needs saving (default True).

disableSharedMenuItems(self, menu)

source code 
Disable some menu items based upon what is selected in the tree.

menu        --  The menu which to apply the changes. 

Note that this method is meant to disable only the shared menu items,
that is, those that use the same menu item Ids. These are defined in the
top part of __defineLocalIds().  Putting this logic into a single method
makes it easier to make changes with the menus. If a specific menu needs
additional logic, put that in a separate method.

onNewFit(self, event)

source code 
Start a new fit tree.

A fit is given the name "Fit n", where n is the smallest
positive integer such that the name is not already taken.

onPasteLink(self, event)

source code 
Paste a copied fit and link it to the original.

This should only be called on a 'fit' node, and only if the original
'fit' node, or at least one with the same name as the original still
exists in the tree.

onInsData(self, event)

source code 
Insert a new dataset item.

This opens up the new data set panel from adddatapanel.py. That panel
is in charge of inserting a new phase. See the module for details.

onInsPhase(self, event)

source code 
Insert a new phase item.

This opens up the new phase panel from addphasepanel.py. That panel is
in charge of inserting a new phase. See the module for details.

onInsCalc(self, event)

source code 
Insert a new calculation item.

A calculation is given the name "Calculation n", where n is the smallest
positive integer such that the name is not already taken.

onRun(self, event)

source code 
Run the selected fits/calculations and disable their tree entries.

This also runs calculations that are children of a running fit.

onStop(self, event)

source code 
Stop all fits.

This removes all items from the runningDict and changes the status
colors back to wxWHITE.

onPreferences(self, event)

source code 
Switch the right panel to the 'preferences' panel.

The 'preferences' panel uses the 'config' mode.

onServerConfig(self, event)

source code 
Switch the right panel to the 'serverconfig' panel.

The 'serverconfig' panel uses the 'config' mode.

onPlotIStruct(self, event)

source code 
Plots the phase structure.

Opens Atomeye and plots the structure.

onPlotFStruct(self, event)

source code 
Plots the phase structure.

Opens Atomeye and plots the structure.

onCommunity(self, event)

source code 
Open the brower and go to

http://groups.google.com/group/diffpy-users

showMessage(self, info, title='PDF Control Error')

source code 
showMessage(self, info) --> tell user about an exception and so on

title -- window title
info -- message

postEvent(self, type, info)

source code 
This method is called by the control. 

Whenever the control needs to communicate directly with the gui it can
call this method. The event is processed by onCustom and then handled by
the gui on its own terms.

updateFittingStatus(self, job)

source code 
Update the fitting status.

This will alter the local member runningDict so that the running items
cannot be altered. The following status ids are defined in the fitting
module. Some are given a color which gives the user an indication of the
fit status. job is actually a fitting or a calculation object.

Fit status
INITIALIZED     --  'LIGHT GRAY'
CONNECTED       --  'GREEN'
CONFIGURED      --  'GREEN'
DONE            --  'WHITE'

JOB Status
VOID       
QUEUED     
RUNNING    
PAUSED