ChatPlexSDK-BS 1.0.1-v6.2.0
C++ ChatPlex BeatSaber SDK
Loading...
Searching...
No Matches
IListItem.hpp
1#pragma once
2
3#include "IListCell.hpp"
4
5#include <memory>
6
7namespace CP_SDK::UI::Data {
8
10 class IListItem : public std::enable_shared_from_this<IListItem>
11 {
12 CP_SDK_NO_COPYMOVE_CTORS(IListItem);
13
14 public:
15 using Ptr = std::shared_ptr<IListItem>;
16
17 private:
19
20 public:
21 IListCell* Cell();
22
23 public:
27 virtual ~IListItem();
28
29 public:
32 void SetCell(IListCell* p_Cell);
33
34 public:
36 virtual void OnShow();
38 virtual void OnHide();
39
40 public:
42 virtual void OnSelect();
44 virtual void OnUnselect();
45
46 protected:
50 template<class t_CellType>
51 t_CellType GetCellAsClassOf()
52 {
53 if (Cell() && classof(t_CellType) == Cell()->klass)
54 return reinterpret_cast<t_CellType>(Cell());
55
56 return nullptr;
57 }
58
59 };
60
61}
Abstract List Cell component.
Definition IListCell.hpp:38
Abstract List Item.
Definition IListItem.hpp:11
void SetCell(IListCell *p_Cell)
Set displayed Cell.
virtual void OnHide()
On hide.
virtual void OnUnselect()
On Unselect.
t_CellType GetCellAsClassOf()
Convert and test Cell to t_CellType.
Definition IListItem.hpp:51
virtual void OnSelect()
On select.
virtual ~IListItem()
Destructor.
virtual void OnShow()
On show.
< namespace CP_SDK::UI::Components
Definition IListCell.hpp:20