GRASS Programmer's Manual  6.5.svn(2012)-r51648
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
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.
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.

Data Fields

 cmdDesc
 cmdindex
 autoCompList
 toComplete

Detailed Description

Styled wxGUI prompt with autocomplete and calltips.

Definition at line 681 of file prompt.py.


Constructor & Destructor Documentation


Member Function Documentation

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

Definition at line 824 of file prompt.py.

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

Returns all text left of the caret.

Definition at line 1140 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 878 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 1155 of file prompt.py.

Referenced by prompt.GPromptSTC.OnItemSelected().

def 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 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 734 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.OnKeyPressed (   self,
  event 
)

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

Todo:
event.ControlDown() for manual autocomplete

Definition at line 905 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 727 of file prompt.py.

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

Definition at line 899 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 1131 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 811 of file prompt.py.

References prompt.GPrompt.cmdbuffer.

Referenced by prompt.GPromptSTC.OnItemSelected().


Field Documentation

Reimplemented from prompt.GPrompt.

Definition at line 914 of file prompt.py.

Reimplemented from prompt.GPrompt.

Definition at line 807 of file prompt.py.

Reimplemented from prompt.GPrompt.

Definition at line 822 of file prompt.py.


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