listbox class

A widget displaying a list of items.
Inherits
object widget
Description
The listbox class is a widget displaying a list of string items.
The listbox can operate in four selection modes: single, multi, extended         and none. In the "single" mode only one item can be selected at a time         and that item is also the current one. In the "multi" mode multiple         items can be selected and unselected and the current item may or may not         be one of the selected items. In the "extended" mode multiple items         can be selected but they must be selected in a single mouse action         or by keeping the shift button pressed while clicking on the item.         In this mode the current item is always one of the selected items.
        In the "none" mode no items can be selected and the current item         may be any item in the list.
        In most situations you will operate the listwidget in "single" mode         (and this is the default mode set at widget creation).
Functions
$setSelectionMode(<selection_mode:string>)
Sets the current selection mode specified by the parameter <mode> that can be one of the following string:
"single" : only one item can be selected at a time
"multi" : multiple items can be selected at a time
"extended" : multiple items can be selected but only in a single mouse interaction
"none" : no items can be selected
The default mode is "single"
<string> $selectionMode()
Returns the current selection mode
$insertItem(<text:string>, <index:uint>)
Inserts a text item at position <index>. If index is negative or not specified the item is appended.
$changeItem(<text:string>, <index:uint>)
Changes text of item at <index> to <text>.
$removeItem(<index:iIndex>)
Removes item at given index.
$count()
Returns number of items in the widget.
<string> $currentText()
Returns the text of the currently selected item.
<integer> $currentItem()
Returns index of current item or -1 if no item is current.
$textAt(<index:integer>)
Returns item at given index.
$setCurrentItem(<index:integer>)
Sets the current listbox item.
$clear()
Removes all the items
$itemEnteredEvent()
This function is called by KVIrc when the mouse cursor enters an item.
$selectionChangeEvent()
This function is called by KVIrc when the selection in the listbox changes.
$currentItemChangeEvent()
This function is called by KVIrc when the current item changes.
<index:integer> $onItemEvent()
This function is called by KVIrc when the current item pointed by the mouse changes and gives in $0 the item index.
<array:x,y,width,height> $itemRect(<item:index>)
Returns the rectangle on the screen that item occupies, or an invalid rectangle if item is 0 or is not currently visible.
Signals
<string> $currentItemChanged()
This signal is emitted by the default implementation of $currentItemChangeEvent().
<string> $itemEntered()
This signal is emitted by the default implementation of $itemEnteredEvent().

Index, Object Classes
KVIrc 4.0.0 Documentation
Generated by mockbuild at Sun Apr 18 14:58:16 2010