7#ifndef MYGUI_COMBO_BOX_H_
8#define MYGUI_COMBO_BOX_H_
36 size_t getItemCount()
const;
39 void insertItemAt(
size_t _index,
const UString& _item, Any _data = Any::Null);
42 void addItem(
const UString& _name, Any _data = Any::Null);
45 void removeItemAt(
size_t _index);
48 void removeAllItems();
52 size_t findItemIndexWith(
const UString& _name);
58 size_t getIndexSelected()
const;
61 void setIndexSelected(
size_t _index);
64 void clearIndexSelected();
70 void setItemDataAt(
size_t _index, Any _data);
73 void clearItemDataAt(
size_t _index);
76 template<
typename ValueType>
77 ValueType* getItemDataAt(
size_t _index,
bool _throw =
true)
79 return mList->getItemDataAt<ValueType>(_index, _throw);
86 void setItemNameAt(
size_t _index,
const UString& _name);
89 const UString& getItemNameAt(
size_t _index)
const;
95 void beginToItemAt(
size_t _index);
98 void beginToItemFirst();
101 void beginToItemLast();
104 void beginToItemSelected();
110 void setComboModeDrop(
bool _drop);
112 bool getComboModeDrop()
const;
115 void setSmoothShow(
bool _value);
117 bool getSmoothShow()
const;
122 void setItemHeight(
int _height);
124 int getItemHeight()
const;
127 void setMaxListLength(
int _value);
129 int getMaxListLength()
const;
133 void setFlowDirection(FlowDirection _value);
135 FlowDirection getFlowDirection()
const;
155 size_t _getItemCount()
const override;
156 void _addItem(
const MyGUI::UString& _name)
override;
157 void _removeItemAt(
size_t _index)
override;
158 void _setItemNameAt(
size_t _index,
const UString& _name)
override;
159 const UString& _getItemNameAt(
size_t _index)
const override;
161 void _resetContainer(
bool _update)
override;
164 void initialiseOverride()
override;
165 void shutdownOverride()
override;
167 void onKeyButtonPressed(KeyCode _key,
Char _char)
override;
169 void setPropertyOverride(std::string_view _key, std::string_view _value)
override;
172 void notifyButtonPressed(Widget* _sender,
int _left,
int _top, MouseButton _id);
173 void notifyListLostFocus(Widget* _sender, MyGUI::Widget* _new);
174 void notifyListSelectAccept(ListBox* _widget,
size_t _position);
175 void notifyListMouseItemActivate(ListBox* _widget,
size_t _position);
176 void notifyListChangePosition(ListBox* _widget,
size_t _position);
177 void notifyMouseWheel(Widget* _sender,
int _rel);
178 void notifyMousePressed(Widget* _sender,
int _left,
int _top, MouseButton _id);
179 void notifyEditTextChange(EditBox* _sender);
180 void notifyToolTip(Widget* _sender,
const ToolTipInfo& _info);
181 void notifyChangeCoord(Widget* _sender);
186 void actionWidgetHide(Widget* _widget, ControllerItem* _controller);
188 ControllerFadeAlpha* createControllerFadeAlpha(
float _alpha,
float _coef,
bool _enable);
192 Button* mButton{
nullptr};
193 ListBox* mList{
nullptr};
195 bool mListShow{
false};
196 int mMaxListLength{-1};
198 bool mModeDrop{
false};
199 bool mDropMouse{
false};
200 bool mShowSmooth{
false};
202 FlowDirection mFlowDirection{FlowDirection::TopToBottom};
#define MYGUI_RTTI_DERIVED(DerivedType)
constexpr size_t ITEM_NONE
types::TCoord< int > IntCoord
delegates::MultiDelegate< ComboBox *, size_t > EventHandle_ComboBoxPtrSizeT