#include <ucombobox.hpp>
Inheritance diagram for ufo::UComboBox:
Public Types | |
typedef USignal2< UComboBox *, int > | sig_activated_t |
typedef USignal2< UComboBox *, int > | sig_highlighted_t |
typedef USignal3< UComboBox *, int, int > | sig_selection_change_t |
Public Member Functions | |
UComboBox (const std::vector< UString > &listDataA) | |
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 |
void | setVisibleRowCount (int visibleRowCountA) |
int | getVisibleRowCount () const |
int | getCurrentItem () const |
void | setCurrentItem (int index) |
std::string | getCurrentText () const |
void | setCurrentText (const std::string &text) |
virtual void | popup () |
virtual void | setListBox (UListBox *listBox) |
UListBox * | getListBox () const |
virtual void | setTextEdit (UTextEdit *textEdit) |
UTextEdit * | getTextEdit () const |
sig_activated_t & | sigActivated () |
sig_highlighted_t & | sigHighlighted () |
sig_selection_change_t & | sigSelectionChanged () |
Protected Member Functions | |
virtual UDimension | getContentsSize (const UDimension &maxSize) const |
virtual void | processMouseEvent (UMouseEvent *e) |
virtual void | processKeyEvent (UKeyEvent *e) |
Protected Attributes | |
UListBox * | m_listBox |
UTextEdit * | m_textEdit |
A UComboBox provides a list of options as choice to the user.
Currently it is implemented using a text edit and a list box widget. But this might change.
|
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 currently activated item. This item normally shows up as content of the text field. |
|
Returns the text representation of the current item.
|
|
Pops up the combo box menu |
|
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.
|
|
Removes item at index. |
|
Sets the row count which should be visible when the combo box pops up its menu. |