#include <ulistbox.hpp>
Inheritance diagram for ufo::UListBox:
Public Types | |
typedef USignal3< UListBox *, int, int > | sig_selection_change_t |
enum | SelectionMode { SingleSelection, MultipleSelection, NoSelection } |
Public Member Functions | |
UListBox (const std::vector< UString > &listDataA) | |
virtual int | getUnitIncrement (Orientation orientation=Horizontal) const |
virtual int | getBlockIncrement (Orientation orientation=Horizontal) const |
virtual UDimension | getPreferredViewportSize () const |
void | addList (const std::vector< UString > &listData) |
void | addItem (UItem *itemA, int index=-1) |
void | addItem (const UString &itemA, int index=-1) |
void | addItem (UIcon *itemA, int index=-1) |
void | removeItem (unsigned int index) |
void | removeAllItems () |
UItem * | getItemAt (unsigned int n) const |
const std::vector< UItem * > & | getItems () const |
unsigned int | getItemCount () const |
SelectionMode | getSelectionMode () const |
void | setSelectionMode (SelectionMode modeA) |
int | getSelectedIndex () const |
void | setSelectedIndex (int indexA) |
void | invertSelection () |
void | selectAll () |
std::vector< unsigned int > | getSelectedIndices () const |
void | setSelectedIndices (const std::vector< unsigned int > &indicesA) |
bool | isSelectedIndex (unsigned int indexA) |
UItem * | getSelectedItem () |
std::vector< UItem * > | getSelectedItems () |
void | setVisibleRowCount (int visibleRowCountA) |
int | getVisibleRowCount () const |
UPoint | indexToLocation (unsigned int indexA) |
int | locationToIndex (const UPoint &locationA) |
sig_selection_change_t & | sigSelectionChanged () |
Protected Member Functions | |
virtual void | paintWidget (UGraphics *g) |
virtual UDimension | getContentsSize (const UDimension &maxSize) const |
virtual void | processMouseEvent (UMouseEvent *e) |
virtual void | processKeyEvent (UKeyEvent *e) |
virtual void | processWidgetEvent (UWidgetEvent *e) |
void | addItemImpl (UItem *itemA, int index) |
void | fireSelectionEvent (int firstIndexA, int lastIndexA) |
This widget may be added to a scroll pane.
|
UListBox * listBox, int firstIndex, int lastIndex |
|
Allow either single selection or multiple selection. So far, multiple selection isn't fully implemented (or should I say not at all). |
|
Adds item at index. References item. |
|
Adds item at index. References item. |
|
Adds item at index. References item. |
|
Appends the strings of list data to the list box. Using add prefix instead of insert to match UWidget and other classes. |
|
Returns the positive increment for scrolling one block (page up/down) Reimplemented from ufo::UScrollableWidget.
|
|
The size of the visible viewport for this scrollable widget. Reimplemented from ufo::UScrollableWidget.
|
|
Returns the positive increment for scrolling one "unit" Reimplemented from ufo::UScrollableWidget.
|
|
|
|
|
|
Paints the widget itsself. Normally, this means drawing the UI. This is the method which should be overriden if you want to use your own drawing code (and don't want to create custom UI classes). Reimplemented from ufo::UWidget.
|
|
Processes key events. Primarily, it is used to notify listeners. Reimplemented from ufo::UWidget.
|
|
Processes focus events. Primarily, it is used to notify listeners. Reimplemented from ufo::UWidget.
|
|
Processes widget events. Primarily, it is used to notify listeners. Reimplemented from ufo::UWidget.
|
|
Removes item at index. |
|
Sets the row count which should be visible when this list is shown within a scrollpane. |