GRASS Programmer's Manual  6.4.2(2012)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
gui_modules.prompt.GPromptSTC Class Reference

Styled wxGUI prompt with autocomplete and calltips. More...

Inheritance diagram for gui_modules.prompt.GPromptSTC:
Collaboration diagram for gui_modules.prompt.GPromptSTC:

Public Member Functions

def __init__
def OnTextSelectionChanged
 Copy selected text to clipboard and skip event.
def OnItemChanged
 Change text in statusbar if the item selection in the auto-completion list is changed.
def OnItemSelected
 Item selected from the list.
def UpdateCmdHistory
 Update command history.
def EntityToComplete
 Determines which part of command (flags, parameters) should be completed at current cursor position.
def GetWordLeft
 Get word left from current cursor position.
def ShowList
 Show sorted auto-completion list if it is not empty.
def OnKeyPressed
 Key press capture for autocompletion, calltips, and command history.
def ShowStatusText
 Sets statusbar text, if it's too long, it is cut off.
def GetTextLeft
 Returns all text left of the caret.
def OnDestroy
 The clipboard contents can be preserved after the app has exited.
def OnCmdErase
 Erase command prompt.
- Public Member Functions inherited from gui_modules.prompt.GPrompt
def __init__
def GetCommandDesc
 Get description for given command.
def GetCommandItems
 Get list of available commands.
def OnRunCmd
 Run command.
def OnUpdateStatusBar
 Update Layer Manager status bar.
def GetPanel
 Get main widget panel.
def GetInput
 Get main prompt widget.
def SetFilter
 Set filter.

Data Fields

 cmdDesc
 cmdindex
 autoCompList
 toComplete
- Data Fields inherited from gui_modules.prompt.GPrompt
 parent
 panel
 standAlone
 moduleDesc
 moduleList
 mapList
 autoCompFilter
 cmdbuffer
 dataList

Detailed Description

Styled wxGUI prompt with autocomplete and calltips.

Definition at line 682 of file prompt.py.


Constructor & Destructor Documentation


Member Function Documentation

def gui_modules.prompt.GPromptSTC.EntityToComplete (   self)

Determines which part of command (flags, parameters) should be completed at current cursor position.

Definition at line 824 of file prompt.py.

References gui_modules.prompt.GPromptSTC.GetTextLeft(), and gui_modules.prompt.GPromptSTC.GetWordLeft().

def gui_modules.prompt.GPromptSTC.GetTextLeft (   self)
def gui_modules.prompt.GPromptSTC.GetWordLeft (   self,
  withDelimiter = False,
  ignoredDelimiter = None 
)

Get word left from current cursor position.

The beginning of the word is given by space or chars: .,-=

Parameters:
withDelimiterreturns the word with the initial delimeter
ignoredDelimiterfinds the word ignoring certain delimeter

Definition at line 883 of file prompt.py.

References gui_modules.prompt.GPromptSTC.GetTextLeft(), min, and gui_modules.debug.set.

Referenced by gui_modules.prompt.GPromptSTC.EntityToComplete(), and gui_modules.prompt.GPromptSTC.OnItemSelected().

def gui_modules.prompt.GPromptSTC.OnCmdErase (   self,
  event 
)

Erase command prompt.

Definition at line 1155 of file prompt.py.

Referenced by gui_modules.prompt.GPromptSTC.OnItemSelected().

def gui_modules.prompt.GPromptSTC.OnDestroy (   self,
  event 
)

The clipboard contents can be preserved after the app has exited.

Definition at line 1149 of file prompt.py.

Referenced by gui_modules.prompt.GPromptSTC.__init__().

def gui_modules.prompt.GPromptSTC.OnItemChanged (   self,
  event 
)

Change text in statusbar if the item selection in the auto-completion list is changed.

Definition at line 735 of file prompt.py.

References gui_modules.prompt.GPrompt.autoCompList, gui_modules.prompt.GPrompt.moduleDesc, gui_modules.prompt.GPromptSTC.ShowStatusText(), and gui_modules.prompt.GPromptSTC.toComplete.

Referenced by gui_modules.prompt.GPromptSTC.__init__().

def gui_modules.prompt.GPromptSTC.OnKeyPressed (   self,
  event 
)

Key press capture for autocompletion, calltips, and command history.

Todo:
event.ControlDown() for manual autocomplete

Definition at line 910 of file prompt.py.

Referenced by gui_modules.prompt.GPromptSTC.__init__().

def gui_modules.prompt.GPromptSTC.OnTextSelectionChanged (   self,
  event 
)

Copy selected text to clipboard and skip event.

The same function is in GMStc class (goutput.py).

Definition at line 728 of file prompt.py.

def gui_modules.prompt.GPromptSTC.ShowList (   self)

Show sorted auto-completion list if it is not empty.

Definition at line 904 of file prompt.py.

References gui_modules.prompt.GPrompt.autoCompList.

def gui_modules.prompt.GPromptSTC.ShowStatusText (   self,
  text 
)

Sets statusbar text, if it's too long, it is cut off.

Definition at line 1131 of file prompt.py.

Referenced by gui_modules.prompt.GPromptSTC.OnItemChanged().

def gui_modules.prompt.GPromptSTC.UpdateCmdHistory (   self,
  cmd 
)

Update command history.

Parameters:
cmdcommand given as a list

Definition at line 811 of file prompt.py.

References gui_modules.prompt.GPrompt.cmdbuffer.

Referenced by gui_modules.prompt.GPromptSTC.OnItemSelected().


Field Documentation

gui_modules.prompt.GPromptSTC.autoCompList

Reimplemented from gui_modules.prompt.GPrompt.

Definition at line 919 of file prompt.py.

gui_modules.prompt.GPromptSTC.cmdDesc

Reimplemented from gui_modules.prompt.GPrompt.

Definition at line 807 of file prompt.py.

gui_modules.prompt.GPromptSTC.cmdindex

Reimplemented from gui_modules.prompt.GPrompt.

Definition at line 822 of file prompt.py.

gui_modules.prompt.GPromptSTC.toComplete

Definition at line 923 of file prompt.py.

Referenced by gui_modules.prompt.GPromptSTC.OnItemChanged().


The documentation for this class was generated from the following file: