Package peppy :: Module minor :: Class MinorMode
[frames] | no frames]

Class MinorMode

               object --+    
                        |    
lib.userparams.ClassPrefs --+
                            |
               object --+   |
                        |   |
         debug.debugmixin --+
                            |
                           MinorMode
Known Subclasses:


Mixin class for all minor modes.  A minor mode should generally be
a subclass of wx.Window (windowless minor modes are coming in the
future).  Minor modes may also have associated with them:

* menu, toolbar items -- by associating a check for the existence
  of the minor mode in the actions's worksWithMajorMode classmethod

* status buttons in the frame's statusbar (ala Mozilla) - not
  implemented yet, but it's coming.

Nested Classes

Inherited from lib.userparams.ClassPrefs: __metaclass__

Instance Methods
 
__init__(self, major, parent)
Classes using this mixin should call this method, or at least save the major mode.
 
deletePreHook(self)
Hook to clean up any resources before anything else is deleted.
 
getDefaultPaneInfo(self, caption=None)
Convenience method to create an AuiPaneInfo object.
 
getPaneInfo(self)
Create the AuiPaneInfo object for this minor mode.
 
paneInfoHook(self, paneinfo)
Hook to modify the paneinfo object before the major mode does anything with it.
 
setup(self)
Hook for minor modes that don't need any user inteface elements.

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

Class Methods
 
getValidMinorModes(cls, mode)
 
worksWithMajorMode(self, mode)

Inherited from debug.debugmixin: dprint

Class Variables
  classprefs = <peppy.lib.userparams.PrefsProxy object at 0x4305...
  default_classprefs = IntParam('best_width', 100, 'Desired widt...
  keyword = 'Abstract Minor Mode'

Inherited from lib.userparams.ClassPrefs: preferences_sort_weight

Inherited from debug.debugmixin: debuglevel

Properties

Inherited from object: __class__

Method Details

__init__(self, major, parent)
(Constructor)

 

Classes using this mixin should call this method, or at least save the major mode.

Overrides: object.__init__

deletePreHook(self)

 

Hook to clean up any resources before anything else is deleted.

This hook is called whether or not the minor mode has a window.

getDefaultPaneInfo(self, caption=None)

 

Convenience method to create an AuiPaneInfo object.

AuiPaneInfo objects are used by the BufferFrame to position the new subwindow within the managed area of the major mode. This hooks into the class settings (through the MinorMode's subclassing of ClassSettings) to allow the user to specify the initial size of the minor mode.

Parameters:
  • caption - text string that will become the caption bar of the Aui-managed window.

setup(self)

 

Hook for minor modes that don't need any user inteface elements.

Rather than overriding __init__, if you don't need to create any windows, you can override this method to register whatever you need to for your minor mode.


Class Variable Details

classprefs

Value:
<peppy.lib.userparams.PrefsProxy object at 0x4305d10>

default_classprefs

Value:
IntParam('best_width', 100, 'Desired width of minor mode in pixels'), \
IntParam('best_height', 100, 'Desired height of minor mode in pixels')\
, IntParam('min_width', 100, 'Minimum width of minor mode in pixels\ne\
nforced by the AuiManager'), IntParam('min_height', 100, 'Minimum heig\
ht of minor mode in pixels\nenforced by the AuiManager'),