|
GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
Styled wxGUI prompt with autocomplete and calltips. More...


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 pressed capture special treatment for tabulator to show help. More... | |
| def | OnChar |
| Key char 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 | |
| def prompt.GPromptSTC.__init__ | ( | self, | |
| parent, | |||
id = wx.ID_ANY, |
|||
margin = False |
|||
| ) |
Definition at line 715 of file prompt.py.
References frame.ModelCanvas.OnChar(), prompt.GPromptSTC.OnChar(), prompt.GPromptSTC.OnDestroy(), goutput.GMStc.OnDestroy(), prompt.GPromptSTC.OnItemChanged(), menu.MenuTreeWindow.OnItemSelected(), manager.VirtualAttributeList.OnItemSelected(), prompt.GPromptSTC.OnItemSelected(), manager.GCPList.OnItemSelected(), prompt.GPromptSTC.OnKeyPressed(), goutput.PyStc.OnKeyPressed(), sqlbuilder.SQLFrame.panel, dialogs.ElementDialog.panel, gis_set.GRASSStartup.panel, dialogs.ModelSearchDialog.panel, dialogs.ModelRelationDialog.panel, forms.TaskFrame.panel, dialogs.ModelItemDialog.panel, prompt.GPrompt.panel, manager.AttributeManager.panel, dialogs.ImportDialog.panel, and dialogs.ImageSizeDialog.panel.
| def prompt.GPromptSTC.EntityToComplete | ( | self | ) |
Determines which part of command (flags, parameters) should be completed at current cursor position.
Definition at line 857 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 1159 of file prompt.py.
Referenced by prompt.GPromptSTC.EntityToComplete(), prompt.GPromptSTC.GetWordLeft(), prompt.GPromptSTC.OnItemSelected(), and prompt.GPromptSTC.OnKeyPressed().
| 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: .,-=
| withDelimiter | returns the word with the initial delimeter |
| ignoredDelimiter | finds the word ignoring certain delimeter |
Definition at line 912 of file prompt.py.
References prompt.GPromptSTC.GetTextLeft(), min, and main.set.
Referenced by prompt.GPromptSTC.EntityToComplete(), and prompt.GPromptSTC.OnItemSelected().
| def prompt.GPromptSTC.OnChar | ( | self, | |
| event | |||
| ) |
Key char capture for autocompletion, calltips, and command history.
Definition at line 996 of file prompt.py.
Referenced by prompt.GPromptSTC.__init__().
| def prompt.GPromptSTC.OnCmdErase | ( | self, | |
| event | |||
| ) |
Erase command prompt.
Definition at line 1174 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 1168 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 767 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 | |||
| ) |
Item selected from the list.
Definition at line 804 of file prompt.py.
References prompt.GPrompt.cmdDesc, prompt.GPromptSTC.GetTextLeft(), prompt.GPromptSTC.GetWordLeft(), prompt.GPromptPopUp.OnCmdErase(), prompt.GPromptSTC.OnCmdErase(), utils.split(), and prompt.GPromptSTC.UpdateCmdHistory().
Referenced by prompt.GPromptSTC.__init__().
| def prompt.GPromptSTC.OnKeyPressed | ( | self, | |
| event | |||
| ) |
Key pressed capture special treatment for tabulator to show help.
Definition at line 939 of file prompt.py.
References prompt.GPrompt._runCmd(), prompt.GPrompt.cmdbuffer, prompt.GPrompt.cmdindex, gcmd.GetRealCmd(), prompt.GPromptSTC.GetTextLeft(), and prompt.GPromptSTC.ShowStatusText().
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).
| def prompt.GPromptSTC.ShowList | ( | self | ) |
Show sorted auto-completion list if it is not empty.
Definition at line 933 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 1150 of file prompt.py.
Referenced by prompt.GPromptSTC.OnItemChanged(), and prompt.GPromptSTC.OnKeyPressed().
| def prompt.GPromptSTC.UpdateCmdHistory | ( | self, | |
| cmd | |||
| ) |
Update command history.
| cmd | command given as a list |
Definition at line 844 of file prompt.py.
References prompt.GPrompt.cmdbuffer.
Referenced by prompt.GPrompt.GetCommandItems(), and prompt.GPromptSTC.OnItemSelected().
| prompt.GPromptSTC.toComplete |
Definition at line 1009 of file prompt.py.
Referenced by prompt.GPromptSTC.OnItemChanged().