Package peppy :: Module buffers :: Class BufferListSort
[frames] | no frames]

Class BufferListSort

                  object --+    
                           |    
 actions.OnDemandActionMixin --+
                               |
      object --+               |
               |               |
debug.debugmixin --+           |
                   |           |
actions.SelectAction --+       |
                       |       |
      actions.ListAction --+   |
                           |   |
         actions.RadioAction --+
                               |
                              BufferListSort

Nested Classes

Inherited from actions.ListAction: IdCache

Instance Methods
 
getIndex(self)
 
getItems(self)
 
action(self, index=-1, multiplier=1)
Override this to provide the functionality of the action.
 
updateOnDemand(self)
Hook called before the menu is displayed.

Inherited from actions.RadioAction: __init__, insertIntoMenu, showCheck, showEnable

Inherited from actions.ListAction: dynamic, getHash, getIcons, getIndexOfId, getSubIds

Inherited from actions.SelectAction: __call__, getMenuItemName, getTooltip, initPostHook, initPreHook, insertIntoToolbar, isEnabled

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

Class Methods
 
getSortDecorator(cls, buffers)

Inherited from actions.SelectAction: getHelp, setAcceleratorText, worksWithMajorMode

Inherited from debug.debugmixin: dprint

Class Variables
  name = 'Sort Order'
This is the name of the menu entry as it appears in the menu bar.
  inline = False
  localize_items = True
Should the items in the list be localized? Dynamically generated lists in general won't be, because they represent filenames -- if a filename happened to be named "File" or "Edit" or "Cut" or a common string, they would be transformed to the localized version when they shouldn't be if that's the actual filename.
  tooltip = 'Sort document list'
Tooltip that is displayed when the mouse is hovering over the menu entry.
  default_menu = ('Documents', -999)
The default menu location is specified here as a tuple containing the menu path (separated by / characters) and a number between 1 and 1000 representing the position within the menu.
  items = ['By Name', 'By Mode', 'Order Loaded']
  sort_index = 0

Inherited from actions.RadioAction: menumax

Inherited from actions.ListAction: abbrev_width

Inherited from actions.SelectAction: alias, default_toolbar, global_id, icon, key_bindings, keyboard, stock_id

Inherited from debug.debugmixin: debuglevel

Properties

Inherited from object: __class__

Method Details

getIndex(self)

 
Overrides: actions.RadioAction.getIndex

getItems(self)

 
Overrides: actions.ListAction.getItems

action(self, index=-1, multiplier=1)

 

Override this to provide the functionality of the action.

This method gets called when the user initiates the action, whether it be from the menu bar, toolbar, or keyboard.

Parameters:
  • index - The index of the item in the list. This is only useful for list or radio items.
  • multiplier - the multiplier supplied by the keyboard handler. The keyboard handler allows for emacs-style repeat commands. For some actions, it makes sense to allow repetition of the command. For instance, in a command that uppercases words, the multiplier could be 4, would mean that the next 4 words get uppercased. The default is 1.
Overrides: actions.SelectAction.action
(inherited documentation)

updateOnDemand(self)

 

Hook called before the menu is displayed.

This method allows the subclass to catch the menu opening event before it anything is added to the menu bar. When used in combination with a list, the list may be reordered and menu items can be inserted or deleted.

Overrides: actions.OnDemandActionMixin.updateOnDemand
(inherited documentation)