Package peppy :: Package plugins :: Package games :: Module hangman_mode :: Class HangmanMode
[frames] | no frames]

Class HangmanMode

          major.wx.Window --+    
                            |    
                   HangmanWnd --+
                                |
               object --+       |
                        |       |
lib.userparams.ClassPrefs --+   |
                            |   |
               object --+   |   |
                        |   |   |
         debug.debugmixin --+   |
                            |   |
              major.MajorMode --+
                                |
                               HangmanMode

Major mode for playing hangman. It uses the normal stc buffer as a backend for the dictionary of words.

Nested Classes

Inherited from major.MajorMode: stc_class

Inherited from lib.userparams.ClassPrefs: __metaclass__

Instance Methods
 
__init__(self, parent, wrapper, buffer, frame)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
createEventBindingsPostHook(self)
 
UpdateAverages(self, has_won)
 
OnChar(self, evt)
 
getWord(self)
 
restart(self)

Inherited from HangmanWnd: Draw, DrawVictim, EndGame, HandleKey, InProgress, OnPaint, OnSize, StartGame

Inherited from major.MajorMode: OnContextMenu, OnUpdateUI, OnUpdateUIHook, __del__, applySettings, createEditWindow, createEventBindings, createListeners, createListenersPostHook, createPostHook, createStatusBarInfo, createStatusIcons, createWindowPostHook, deleteWindow, deleteWindowPostHook, deleteWindowPre, deleteWindowPreHook, findMinorMode, focus, focusPostHook, getIcon, getPopupActions, getStatusBarWidths, getTabName, getTitle, getWelcomeMessage, idleHandler, idlePostHook, loadMinorModesPostHook, removeListeners, removeListenersPostHook, removeMinibuffer, resetStatusBar, save, savePostHook, savePreHook, setMinibuffer, setStatusText, settingsChanged, showBusy, showInitialPosition, showModified, tabActivatedHook, updateAui

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

Class Methods

Inherited from major.MajorMode: verifyEditraType, verifyFilename, verifyMagic, verifyMetadata, verifyMimetype, verifyProtocol

Inherited from debug.debugmixin: dprint

Class Variables
  debuglevel = 0
set to non-zero to activate debug printing for this class
  keyword = "Hangman"
The single-word keyword representing this major mode
  icon = 'hangman.png'
Pointer to the icon representing this major mode
  regex = "\.(hangman)"
Filenames are matched against this regex in the class method verifyFilename when peppy tries to determine which mode to use to edit the file.
  default_classprefs = IntParam('min_word_length', 5),
  won = 0
  played = 0
  average = 0.0
  history = []

Inherited from major.MajorMode: allow_threaded_loading, classprefs, emacs_synonyms, localkeymaps, mimetype, preferences_tab, temporary

Inherited from lib.userparams.ClassPrefs: preferences_sort_weight

Properties

Inherited from object: __class__

Method Details

__init__(self, parent, wrapper, buffer, frame)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

createEventBindingsPostHook(self)

 
Overrides: major.MajorMode.createEventBindingsPostHook