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


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 | |
| def prompt.GPromptSTC.__init__ | ( | self, | |
| parent, | |||
id = wx.ID_ANY, |
|||
margin = False |
|||
| ) |
Definition at line 683 of file prompt.py.
References goutput.GMStc.OnDestroy(), prompt.GPromptSTC.OnDestroy(), prompt.GPromptSTC.OnItemChanged(), ghelp.MenuTreeWindow.OnItemSelected(), manager.VirtualAttributeList.OnItemSelected(), prompt.GPromptSTC.OnItemSelected(), manager.GCPList.OnItemSelected(), prompt.GPromptSTC.OnKeyPressed(), goutput.PyStc.OnKeyPressed(), dialogs.ElementDialog.panel, gis_set.GRASSStartup.panel, sqlbuilder.SQLFrame.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 824 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 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: .,-=
| withDelimiter | returns the word with the initial delimeter |
| ignoredDelimiter | finds 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.OnItemSelected | ( | self, | |
| event | |||
| ) |
Item selected from the list.
Definition at line 771 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 press capture for autocompletion, calltips, and command history.
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).
| def prompt.GPromptSTC.ShowList | ( | self | ) |
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.
| cmd | command given as a list |
Definition at line 811 of file prompt.py.
References prompt.GPrompt.cmdbuffer.
Referenced by prompt.GPromptSTC.OnItemSelected().
Reimplemented from prompt.GPrompt.
Reimplemented from prompt.GPrompt.
Reimplemented from prompt.GPrompt.
Definition at line 918 of file prompt.py.
Referenced by prompt.GPromptSTC.OnItemChanged().