7#ifndef MYGUI_LIST_BOX_H_
8#define MYGUI_LIST_BOX_H_
40 size_t getItemCount()
const;
49 void removeItemAt(
size_t _index);
52 void removeAllItems();
70 size_t getIndexSelected()
const;
73 void setIndexSelected(
size_t _index);
76 void clearIndexSelected();
90 void clearItemDataAt(
size_t _index);
93 template<
typename ValueType>
119 void beginToItemAt(
size_t _index);
122 void beginToItemFirst();
125 void beginToItemLast();
128 void beginToItemSelected();
141 bool isItemVisibleAt(
size_t _index,
bool _fill =
true);
143 bool isItemSelectedVisible(
bool _fill =
true);
147 void setScrollVisible(
bool _visible);
149 void setScrollPosition(
size_t _position);
165 using Widget::setPosition;
166 using Widget::setSize;
167 using Widget::setCoord;
171 int getOptimalHeight()
const;
238 void _sendEventChangeScroll(
size_t _position);
241 size_t _getItemCount()
const override;
243 void _removeItemAt(
size_t _index)
override;
247 void _resetContainer(
bool _update)
override;
251 void initialiseOverride()
override;
252 void shutdownOverride()
override;
254 void onMouseWheel(
int _rel)
override;
270 void updateLine(
bool _reset =
false);
277 void _redrawItemRange(
size_t _start = 0);
280 void _redrawItem(
size_t _index);
286 size_t _getItemIndex(
Widget*
_item)
const override;
288 void setPropertyOverride(std::string_view
_key, std::string_view
_value)
override;
294 std::string mSkinLine;
298 using VectorButton = std::vector<Button*>;
299 VectorButton mWidgetLines;
301 bool mActivateOnClick{
false};
307 size_t mLastRedrawLine{0};
312 using PairItem = std::pair<UString, Any>;
313 using VectorItemInfo = std::vector<PairItem>;
314 VectorItemInfo mItemsInfo;
317 bool mNeedVisibleScroll{
true};
#define MYGUI_ASSERT_RANGE(index, size, owner)
#define MYGUI_RTTI_DERIVED(DerivedType)
widget description should be here.
EventHandle_ListBoxPtrCIBNotifyCellDataRef eventNotifyItem
ValueType * getItemDataAt(size_t _index, bool _throw=true) const
Get item data from specified position.
EventPair< EventHandle_WidgetSizeT, EventHandle_ListPtrSizeT > eventListChangePosition
EventPair< EventHandle_WidgetSizeT, EventHandle_ListPtrSizeT > eventListMouseItemFocus
EventPair< EventHandle_WidgetSizeT, EventHandle_ListPtrSizeT > eventListChangeScroll
EventPair< EventHandle_WidgetSizeT, EventHandle_ListPtrSizeT > eventListSelectAccept
EventPair< EventHandle_WidgetSizeT, EventHandle_ListPtrSizeT > eventListMouseItemActivate
A UTF-16 string with implicit conversion to/from std::string and std::wstring.
constexpr size_t ITEM_NONE
types::TSize< int > IntSize