GRASS Programmer's Manual  6.4.2(2012)
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.

Data Fields

 cmdDesc
 cmdindex
 autoCompList
 toComplete

Detailed Description

Styled wxGUI prompt with autocomplete and calltips.

Definition at line 682 of file prompt.py.


Constructor & Destructor Documentation

def gui_modules.prompt.GPromptSTC.__init__ (   self,
  parent,
  id = wx.ID_ANY,
  margin = False 
)

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 gui_modules.prompt.GPromptSTC.GetTextLeft(), and gui_modules.prompt.GPromptSTC.GetWordLeft().

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.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__().

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.

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

Definition at line 904 of file prompt.py.

References gui_modules.prompt.GPrompt.autoCompList, and gui_modules.prompt.GPromptSTC.autoCompList.

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().

Update command history.

Parameters:
cmdcommand given as a list

Definition at line 811 of file prompt.py.

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


Field Documentation

Reimplemented from gui_modules.prompt.GPrompt.

Definition at line 814 of file prompt.py.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines