GRASS Programmer's Manual  6.4.3(2013)-r
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
prompt.GPromptSTC Class Reference

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

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

Public Member Functions

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

Data Fields

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

Detailed Description

Styled wxGUI prompt with autocomplete and calltips.

Definition at line 713 of file prompt.py.

Constructor & Destructor Documentation

Member Function Documentation

def prompt.GPromptSTC.EntityToComplete (   self)

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

Definition at line 856 of file prompt.py.

References prompt.GPromptSTC.GetTextLeft(), prompt.GPromptSTC.GetWordLeft(), and utils.split().

def prompt.GPromptSTC.GetTextLeft (   self)

Returns all text left of the caret.

Definition at line 1150 of file prompt.py.

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

def 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 914 of file prompt.py.

References prompt.GPromptSTC.GetTextLeft(), min, and main.set.

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

def prompt.GPromptSTC.OnCmdErase (   self,
  event 
)

Erase command prompt.

Definition at line 1165 of file prompt.py.

Referenced by prompt.GPrompt.GetCommandItems(), and prompt.GPromptSTC.OnItemSelected().

def prompt.GPromptSTC.OnDestroy (   self,
  event 
)

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

Definition at line 1159 of file prompt.py.

Referenced by prompt.GPromptSTC.__init__().

def prompt.GPromptSTC.OnItemChanged (   self,
  event 
)

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

Definition at line 766 of file prompt.py.

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

Referenced by prompt.GPromptSTC.__init__().

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

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

Todo:
event.ControlDown() for manual autocomplete

Definition at line 941 of file prompt.py.

Referenced by prompt.GPromptSTC.__init__().

def 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 759 of file prompt.py.

def prompt.GPromptSTC.ShowList (   self)

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

Definition at line 935 of file prompt.py.

References prompt.GPrompt.autoCompList.

def prompt.GPromptSTC.ShowStatusText (   self,
  text 
)

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

Definition at line 1141 of file prompt.py.

Referenced by prompt.GPromptSTC.OnItemChanged().

def prompt.GPromptSTC.UpdateCmdHistory (   self,
  cmd 
)

Update command history.

Parameters
cmdcommand given as a list

Definition at line 843 of file prompt.py.

References prompt.GPrompt.cmdbuffer.

Referenced by prompt.GPrompt.GetCommandItems(), and prompt.GPromptSTC.OnItemSelected().

Field Documentation

prompt.GPromptSTC.autoCompList

Definition at line 950 of file prompt.py.

prompt.GPromptSTC.cmdDesc

Definition at line 839 of file prompt.py.

prompt.GPromptSTC.cmdindex

Definition at line 854 of file prompt.py.

prompt.GPromptSTC.toComplete

Definition at line 954 of file prompt.py.

Referenced by prompt.GPromptSTC.OnItemChanged().


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