18 virtual void Create()
override;
19 virtual void Tick(
float deltaTime)
override;
24 void SetItemTemplate(
Scene* scene);
25 Scene* GetItemTemplate()
const;
28 void SetData(
const std::vector<Datum>& data);
29 void AddItem(
const Datum& data, int32_t index = -1);
30 void RemoveItem(int32_t index);
31 void UpdateItem(int32_t index,
const Datum& data);
33 int32_t GetItemCount()
const;
34 Datum GetItemData(int32_t index)
const;
37 void SetSpacing(
float spacing);
38 float GetSpacing()
const;
43 void SetItemWidth(
float width);
44 float GetItemWidth()
const;
45 void SetItemHeight(
float height);
46 float GetItemHeight()
const;
49 void SetSelectedIndex(int32_t index);
50 int32_t GetSelectedIndex()
const;
51 Datum GetSelectedData()
const;
52 void ClearSelection();
60 void ScrollToItem(int32_t index);
66 void EnsureContainers();
69 void DestroyItem(int32_t index);
70 void UpdateItemIndices();
75 void FireSelectionChanged(int32_t index);
79 void OnItemClicked(int32_t index);
80 void OnItemHoverEnter(int32_t index);
81 void OnItemHoverExit(int32_t index);
85 float mSpacing = 0.0f;
87 float mItemWidth = 0.0f;
88 float mItemHeight = 0.0f;
89 int32_t mSelectedIndex = -1;
97 std::vector<ListViewItemWidget*>
mItems;