7#ifndef MYGUI_COMBO_BOX_H_
8#define MYGUI_COMBO_BOX_H_
37 size_t getItemCount()
const;
40 void insertItemAt(
size_t _index,
const UString& _item,
Any _data = Any::Null);
43 void addItem(
const UString& _name,
Any _data = Any::Null);
46 void removeItemAt(
size_t _index);
49 void removeAllItems();
53 size_t findItemIndexWith(
const UString& _name);
60 size_t getIndexSelected()
const;
63 void setIndexSelected(
size_t _index);
66 void clearIndexSelected();
73 void setItemDataAt(
size_t _index,
Any _data);
76 void clearItemDataAt(
size_t _index);
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;
154 size_t _getItemCount()
const override;
156 void _removeItemAt(
size_t _index)
override;
157 void _setItemNameAt(
size_t _index,
const UString& _name)
override;
158 const UString& _getItemNameAt(
size_t _index)
const override;
160 void _resetContainer(
bool _update)
override;
163 void initialiseOverride()
override;
164 void shutdownOverride()
override;
166 void onKeyButtonPressed(
KeyCode _key,
Char _char)
override;
168 void setPropertyOverride(std::string_view _key, std::string_view _value)
override;
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.
EventPairAddParameter< EventHandle_WidgetVoid, EventHandle_ComboBoxPtrSizeT > eventComboAccept
EventPair< EventHandle_WidgetSizeT, EventHandle_ComboBoxPtrSizeT > eventComboChangePosition
ValueType * getItemDataAt(size_t _index, bool _throw=true)
Get item data from specified position.
widget description should be here.
widget description should be here.
A UTF-16 string with implicit conversion to/from std::string and std::wstring.
constexpr size_t ITEM_NONE