7#ifndef MYGUI_COMBO_BOX_H_
8#define MYGUI_COMBO_BOX_H_
79 template<
typename ValueType>
82 return mList->getItemDataAt<ValueType>(_index, _throw);
90 void setItemNameAt(
size_t _index,
const UString& _name);
93 const UString& getItemNameAt(
size_t _index)
const;
100 void beginToItemAt(
size_t _index);
103 void beginToItemFirst();
106 void beginToItemLast();
109 void beginToItemSelected();
116 void setComboModeDrop(
bool _drop);
118 bool getComboModeDrop()
const;
121 void setSmoothShow(
bool _value);
123 bool getSmoothShow()
const;
126 void setMaxListLength(
int _value);
128 int getMaxListLength()
const;
173 void notifyListSelectAccept(
ListBox* _widget,
size_t _position);
174 void notifyListMouseItemActivate(
ListBox* _widget,
size_t _position);
175 void notifyListChangePosition(
ListBox* _widget,
size_t _position);
176 void notifyMouseWheel(
Widget* _sender,
int _rel);
178 void notifyEditTextChange(
EditBox* _sender);
193 bool mListShow{
false};
194 int mMaxListLength{-1};
196 bool mModeDrop{
false};
197 bool mDropMouse{
false};
198 bool mShowSmooth{
false};
200 FlowDirection mFlowDirection{FlowDirection::TopToBottom};
#define MYGUI_RTTI_DERIVED(DerivedType)
widget description should be here.
void addItem(const UString &_name, Any _data=Any::Null)
Add an item to the end of a array.
EventPairAddParameter< EventHandle_WidgetVoid, EventHandle_ComboBoxPtrSizeT > eventComboAccept
size_t findItemIndexWith(const UString &_name)
Search item, returns the position of the first occurrence in array or ITEM_NONE if item not found.
void _setItemNameAt(size_t _index, const UString &_name) override
void clearIndexSelected()
Clear item selection.
void setIndexSelected(size_t _index)
Select specified _index.
void removeAllItems()
Remove all items.
void _addItem(const MyGUI::UString &_name) override
void onKeyButtonPressed(KeyCode _key, Char _char) override
const UString & _getItemNameAt(size_t _index) const override
void _removeItemAt(size_t _index) override
void shutdownOverride() override
void insertItemAt(size_t _index, const UString &_item, Any _data=Any::Null)
Insert an item into a array at a specified position.
size_t getIndexSelected() const
Get index of selected item (ITEM_NONE if none selected)
void initialiseOverride() override
EventPair< EventHandle_WidgetSizeT, EventHandle_ComboBoxPtrSizeT > eventComboChangePosition
void setItemDataAt(size_t _index, Any _data)
Replace an item data at a specified position.
size_t _getItemCount() const override
void removeItemAt(size_t _index)
Remove item at a specified position.
void clearItemDataAt(size_t _index)
Clear an item data at a specified position.
void _resetContainer(bool _update) override
size_t getItemCount() const
Get number of items.
void setPropertyOverride(std::string_view _key, std::string_view _value) override
ValueType * getItemDataAt(size_t _index, bool _throw=true)
Get item data from specified position.
widget description should be here.
A UTF-16 string with implicit conversion to/from std::string and std::wstring.
constexpr size_t ITEM_NONE
types::TCoord< int > IntCoord
delegates::MultiDelegate< ComboBox *, size_t > EventHandle_ComboBoxPtrSizeT