GRASS Programmer's Manual
6.4.2(2012)
|
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. | |
![]() | |
def | __init__ |
def | GetCommandDesc |
Get description for given command. | |
def | GetCommandItems |
Get list of available commands. | |
def | OnRunCmd |
Run command. | |
def | OnUpdateStatusBar |
Update Layer Manager status bar. | |
def | GetPanel |
Get main widget panel. | |
def | GetInput |
Get main prompt widget. | |
def | SetFilter |
Set filter. |
Data Fields | |
cmdDesc | |
cmdindex | |
autoCompList | |
toComplete | |
![]() | |
parent | |
panel | |
standAlone | |
moduleDesc | |
moduleList | |
mapList | |
autoCompList | |
autoCompFilter | |
cmdDesc | |
cmdbuffer | |
cmdindex | |
dataList |
def gui_modules.prompt.GPromptSTC.__init__ | ( | self, | |
parent, | |||
id = wx.ID_ANY , |
|||
margin = False |
|||
) |
Definition at line 684 of file prompt.py.
References gui_modules.goutput.GMStc.OnDestroy(), gui_modules.prompt.GPromptSTC.OnDestroy(), gui_modules.prompt.GPromptSTC.OnItemChanged(), gui_modules.dbm.VirtualAttributeList.OnItemSelected(), gui_modules.ghelp.MenuTreeWindow.OnItemSelected(), gui_modules.location_wizard.ProjectionsPage.OnItemSelected(), gui_modules.prompt.GPromptSTC.OnItemSelected(), gui_modules.ghelp.InstallExtensionWindow.OnItemSelected(), gui_modules.location_wizard.EllipsePage.OnItemSelected(), gui_modules.location_wizard.EPSGPage.OnItemSelected(), gui_modules.gcpmanager.GCPList.OnItemSelected(), gui_modules.prompt.GPromptSTC.OnKeyPressed(), gui_modules.ogc_services.WMSDialog.panel, gui_modules.mcalc_builder.MapCalcFrame.panel, gui_modules.gdialogs.ElementDialog.panel, gis_set.GRASSStartup.panel, gui_modules.menuform.mainFrame.panel, gui_modules.prompt.GPrompt.panel, gui_modules.dbm.AttributeManager.panel, gui_modules.location_wizard.ProjParamsPage.panel, gui_modules.ghelp.InstallExtensionWindow.panel, gui_modules.gdialogs.ImportDialog.panel, gui_modules.ghelp.UninstallExtensionWindow.panel, gui_modules.gdialogs.ImageSizeDialog.panel, gui_modules.gmodeler.ModelSearchDialog.panel, gui_modules.gmodeler.ModelRelationDialog.panel, and gui_modules.gmodeler.ModelItemDialog.panel.
def gui_modules.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 gui_modules.prompt.GPromptSTC.GetTextLeft(), and gui_modules.prompt.GPromptSTC.GetWordLeft().
def gui_modules.prompt.GPromptSTC.GetTextLeft | ( | self | ) |
Returns all text left of the caret.
Definition at line 1140 of file prompt.py.
Referenced by gui_modules.prompt.GPromptSTC.EntityToComplete(), gui_modules.prompt.GPromptSTC.GetWordLeft(), and gui_modules.prompt.GPromptSTC.OnItemSelected().
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: .,-=
withDelimiter | returns the word with the initial delimeter |
ignoredDelimiter | finds 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.OnItemChanged | ( | self, | |
event | |||
) |
Change text in statusbar if the item selection in the auto-completion list is changed.
Definition at line 735 of file prompt.py.
References gui_modules.prompt.GPrompt.autoCompList, gui_modules.prompt.GPrompt.moduleDesc, gui_modules.prompt.GPromptSTC.ShowStatusText(), and gui_modules.prompt.GPromptSTC.toComplete.
Referenced by gui_modules.prompt.GPromptSTC.__init__().
def gui_modules.prompt.GPromptSTC.OnItemSelected | ( | self, | |
event | |||
) |
Item selected from the list.
Definition at line 772 of file prompt.py.
References gui_modules.prompt.GPrompt.cmdDesc, gui_modules.prompt.GPromptSTC.GetTextLeft(), gui_modules.prompt.GPromptSTC.GetWordLeft(), gui_modules.prompt.GPromptPopUp.OnCmdErase(), gui_modules.prompt.GPromptSTC.OnCmdErase(), gui_modules.utils.split(), and gui_modules.prompt.GPromptSTC.UpdateCmdHistory().
Referenced by gui_modules.prompt.GPromptSTC.__init__().
def gui_modules.prompt.GPromptSTC.OnKeyPressed | ( | self, | |
event | |||
) |
Key press capture for autocompletion, calltips, and command history.
Definition at line 910 of file prompt.py.
Referenced by gui_modules.prompt.GPromptSTC.__init__().
def gui_modules.prompt.GPromptSTC.OnTextSelectionChanged | ( | self, | |
event | |||
) |
Copy selected text to clipboard and skip event.
The same function is in GMStc class (goutput.py).
def gui_modules.prompt.GPromptSTC.ShowList | ( | self | ) |
Show sorted auto-completion list if it is not empty.
Definition at line 904 of file prompt.py.
References gui_modules.prompt.GPrompt.autoCompList.
def gui_modules.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 gui_modules.prompt.GPromptSTC.OnItemChanged().
def gui_modules.prompt.GPromptSTC.UpdateCmdHistory | ( | self, | |
cmd | |||
) |
Update command history.
cmd | command given as a list |
Definition at line 811 of file prompt.py.
References gui_modules.prompt.GPrompt.cmdbuffer.
Referenced by gui_modules.prompt.GPromptSTC.OnItemSelected().
gui_modules.prompt.GPromptSTC.toComplete |
Definition at line 923 of file prompt.py.
Referenced by gui_modules.prompt.GPromptSTC.OnItemChanged().