7#ifndef MYGUI_LIST_BOX_H_
8#define MYGUI_LIST_BOX_H_
45 size_t getItemCount()
const;
54 void removeItemAt(
size_t _index);
57 void removeAllItems();
75 size_t getIndexSelected()
const;
78 void setIndexSelected(
size_t _index);
81 void clearIndexSelected();
95 void clearItemDataAt(
size_t _index);
98 template <
typename ValueType>
124 void beginToItemAt(
size_t _index);
127 void beginToItemFirst();
130 void beginToItemLast();
133 void beginToItemSelected();
146 bool isItemVisibleAt(
size_t _index,
bool _fill =
true);
148 bool isItemSelectedVisible(
bool _fill =
true);
152 void setScrollVisible(
bool _visible);
154 void setScrollPosition(
size_t _position);
170 using Widget::setPosition;
171 using Widget::setSize;
172 using Widget::setCoord;
176 int getOptimalHeight()
const;
243 void _sendEventChangeScroll(
size_t _position);
246 size_t _getItemCount()
const override;
248 void _removeItemAt(
size_t _index)
override;
252 void _resetContainer(
bool _update)
override;
256 void initialiseOverride()
override;
257 void shutdownOverride()
override;
259 void onMouseWheel(
int _rel)
override;
275 void updateLine(
bool _reset =
false);
282 void _redrawItemRange(
size_t _start = 0);
285 void _redrawItem(
size_t _index);
291 size_t _getItemIndex(
Widget*
_item)
const override;
293 void setPropertyOverride(
const std::string&
_key,
const std::string&
_value)
override;
299 std::string mSkinLine;
303 typedef std::vector<Button*> VectorButton;
304 VectorButton mWidgetLines;
306 bool mActivateOnClick;
312 size_t mLastRedrawLine;
317 typedef std::pair<UString, Any> PairItem;
318 typedef std::vector<PairItem> VectorItemInfo;
319 VectorItemInfo mItemsInfo;
322 bool mNeedVisibleScroll;
#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.
delegates::CMultiDelegate2< ListBox *, size_t > EventHandle_ListPtrSizeT
delegates::CMultiDelegate2< ListBox *, const IBNotifyItemData & > EventHandle_ListBoxPtrCIBNotifyCellDataRef