GRASS Programmer's Manual  6.4.2(2012)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
gui_modules.prompt.TextCtrlAutoComplete Class Reference

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

Inheritance diagram for gui_modules.prompt.TextCtrlAutoComplete:

Public Member Functions

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

Data Fields

 statusbar
 itemDataMap
 dropdown
 dropdownlistbox
 popupsize

Detailed Description

Auto complete text area used by GPromptPopUp.

Definition at line 49 of file prompt.py.

Constructor & Destructor Documentation

def gui_modules.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 52 of file prompt.py.

Member Function Documentation

def gui_modules.prompt.TextCtrlAutoComplete.GetListCtrl (   self)

Method required by listmix.ColumnSorterMixin.

Definition at line 252 of file prompt.py.

References gui_modules.prompt.TextCtrlAutoComplete.dropdownlistbox.

def gui_modules.prompt.TextCtrlAutoComplete.OnClick (   self,
  event 
)
def gui_modules.prompt.TextCtrlAutoComplete.OnControlChanged (   self,
  event 
)

Control changed.

Definition at line 463 of file prompt.py.

References gui_modules.prompt.TextCtrlAutoComplete._showDropDown().

def gui_modules.prompt.TextCtrlAutoComplete.OnListClick (   self,
  evt 
)

Left mouse button pressed.

Definition at line 305 of file prompt.py.

def gui_modules.prompt.TextCtrlAutoComplete.OnListColClick (   self,
  evt 
)

Left mouse button pressed on column.

Definition at line 316 of file prompt.py.

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

def gui_modules.prompt.TextCtrlAutoComplete.OnListDClick (   self,
  evt 
)

Mouse button double click.

Definition at line 312 of file prompt.py.

References gui_modules.prompt.TextCtrlAutoComplete._setValueFromSelected().

def gui_modules.prompt.TextCtrlAutoComplete.OnListItemSelected (   self,
  event 
)

Item selected.

Definition at line 326 of file prompt.py.

References gui_modules.prompt.TextCtrlAutoComplete._setValueFromSelected().

def gui_modules.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 256 of file prompt.py.

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

Referenced by gui_modules.prompt.TextCtrlAutoComplete.OnEnteredText().

Field Documentation

gui_modules.prompt.TextCtrlAutoComplete.dropdown

Definition at line 81 of file prompt.py.

gui_modules.prompt.TextCtrlAutoComplete.dropdownlistbox

Definition at line 87 of file prompt.py.

Referenced by gui_modules.prompt.TextCtrlAutoComplete.GetListCtrl().

gui_modules.prompt.TextCtrlAutoComplete.popupsize

Definition at line 143 of file prompt.py.

gui_modules.prompt.TextCtrlAutoComplete.statusbar

Definition at line 59 of file prompt.py.


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