GRASS Programmer's Manual  6.4.4(2014)-r
prompt.TextCtrlAutoComplete Class Reference

Auto complete text area used by GPromptPopUp. More...

Inheritance diagram for prompt.TextCtrlAutoComplete:
Collaboration diagram for prompt.TextCtrlAutoComplete:

Public Member Functions

def __init__ (self, parent, statusbar, id=wx.ID_ANY, choices=[], kwargs)
 Constructor works just like wx.TextCtrl except you can pass in a list of choices. More...
 
def GetListCtrl (self)
 Method required by listmix.ColumnSorterMixin. More...
 
def SetChoices
 Sets the choices available in the popup wx.ListBox. More...
 
def OnClick (self, event)
 
def OnCommandSelect (self, event)
 Command selected from history. More...
 
def OnListClick (self, evt)
 Left mouse button pressed. More...
 
def OnListDClick (self, evt)
 Mouse button double click. More...
 
def OnListColClick (self, evt)
 Left mouse button pressed on column. More...
 
def OnListItemSelected (self, event)
 Item selected. More...
 
def OnEnteredText (self, event)
 Text entered. More...
 
def OnKeyDown (self, event)
 Do some work when the user press on the keys: up and down: move the cursor left and right: move the search. More...
 
def OnControlChanged (self, event)
 Control changed. More...
 

Data Fields

 statusbar
 
 itemDataMap
 
 dropdown
 
 dropdownlistbox
 
 popupsize
 

Detailed Description

Auto complete text area used by GPromptPopUp.

Definition at line 47 of file prompt.py.

Constructor & Destructor Documentation

def prompt.TextCtrlAutoComplete.__init__ (   self,
  parent,
  statusbar,
  id = wx.ID_ANY,
  choices = [],
  kwargs 
)

Constructor works just like wx.TextCtrl except you can pass in a list of choices.

You can also change the choice list at any time by calling setChoices.

Inspired by http://wiki.wxpython.org/TextCtrlAutoComplete

Definition at line 50 of file prompt.py.

Member Function Documentation

def prompt.TextCtrlAutoComplete.GetListCtrl (   self)

Method required by listmix.ColumnSorterMixin.

Definition at line 250 of file prompt.py.

References prompt.TextCtrlAutoComplete.dropdownlistbox.

def prompt.TextCtrlAutoComplete.OnClick (   self,
  event 
)
Left mouse button pressed

Definition at line 285 of file prompt.py.

References prompt.TextCtrlAutoComplete._listItemVisible(), and prompt.TextCtrlAutoComplete._showDropDown().

def prompt.TextCtrlAutoComplete.OnCommandSelect (   self,
  event 
)
def prompt.TextCtrlAutoComplete.OnControlChanged (   self,
  event 
)

Control changed.

Definition at line 461 of file prompt.py.

References prompt.TextCtrlAutoComplete._showDropDown(), and overlays.OverlayController.IsShown().

def prompt.TextCtrlAutoComplete.OnListClick (   self,
  evt 
)

Left mouse button pressed.

Definition at line 303 of file prompt.py.

def prompt.TextCtrlAutoComplete.OnListColClick (   self,
  evt 
)

Left mouse button pressed on column.

Definition at line 314 of file prompt.py.

References prompt.TextCtrlAutoComplete._ascending, and prompt.TextCtrlAutoComplete._colSearch.

def prompt.TextCtrlAutoComplete.OnListDClick (   self,
  evt 
)

Mouse button double click.

Definition at line 310 of file prompt.py.

References prompt.TextCtrlAutoComplete._setValueFromSelected().

def prompt.TextCtrlAutoComplete.OnListItemSelected (   self,
  event 
)

Item selected.

Definition at line 324 of file prompt.py.

References prompt.TextCtrlAutoComplete._setValueFromSelected().

def prompt.TextCtrlAutoComplete.SetChoices (   self,
  choices,
  type = 'module' 
)

Sets the choices available in the popup wx.ListBox.

The items will be sorted case insensitively.

Parameters
choiceslist of choices
typetype of choices (module, param, flag, raster, vector)

Definition at line 254 of file prompt.py.

References prompt.TextCtrlAutoComplete._choices, prompt.TextCtrlAutoComplete._choiceType, prompt.TextCtrlAutoComplete._colFetch, prompt.TextCtrlAutoComplete._colSearch, prompt.TextCtrlAutoComplete._setListSize(), prompt.TextCtrlAutoComplete._updateDataList(), and utils.ListSortLower().

Referenced by prompt.TextCtrlAutoComplete.OnEnteredText().

Field Documentation

prompt.TextCtrlAutoComplete.dropdown

Definition at line 79 of file prompt.py.

prompt.TextCtrlAutoComplete.dropdownlistbox

Definition at line 85 of file prompt.py.

Referenced by prompt.TextCtrlAutoComplete.GetListCtrl().

prompt.TextCtrlAutoComplete.popupsize

Definition at line 141 of file prompt.py.

prompt.TextCtrlAutoComplete.statusbar

Definition at line 57 of file prompt.py.


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