-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathListview.hpp
More file actions
115 lines (97 loc) · 3.47 KB
/
Listview.hpp
File metadata and controls
115 lines (97 loc) · 3.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
//
// AmigaOS MUI C++ wrapper
//
// (c) 2022-2026 TDolphin
//
#pragma once
#include "Group.hpp"
#include "List.hpp"
#include "ValueTypes/Listview/DragType.hpp"
#include "ValueTypes/Listview/MultiSelect.hpp"
#include "ValueTypes/Listview/ScrollerPos.hpp"
namespace MUI
{
class Listview : public Group
{
public:
explicit Listview(Object *pMuiObject)
: Group(pMuiObject)
{
}
Listview(const Root &root)
: Group(root.muiObject())
{
}
// instanceOf
const static std::string className;
static inline bool instanceOf(Object *pMuiObject)
{
return MUI::instanceOf(pMuiObject, className.c_str());
}
static inline bool instanceOf(const Root &object)
{
return MUI::instanceOf(object.muiObject(), className.c_str());
}
// is/get/set (attributes), all setters return object reference
#ifdef MUIA_Listview_AgainClick
/// @brief [ @b MUIA_Listview_AgainClick ]
bool isAgainClick() const;
#endif
/// @brief [ @b MUIA_Listview_ClickColumn ]
long getClickColumn() const;
/// @brief [ @b MUIA_Listview_DefClickColumn ]
long getDefClickColumn() const;
/// @brief [ @b MUIA_Listview_DoubleClick ]
bool isDoubleClick() const;
/// @brief [ @b MUIA_Listview_DragType ]
enum Listview_DragType getDragType() const;
/// @brief [ @b MUIA_Listview_List ]
/// @return MUI::List object
List getList() const;
/// @brief [ @b MUIA_Listview_SelectChange ]
bool isSelectChange() const;
/// @brief [ @b MUIA_Listview_DefClickColumn ]
Listview &setDefClickColumn(const long defClickColumn);
/// @brief [ @b MUIA_Listview_DragType ]
Listview &setDragType(const Listview_DragType dragType);
};
template <typename T, typename U> class ListviewBuilderTemplate : public GroupBuilderTemplate<T, U>
{
bool hasListObject { false };
public:
ListviewBuilderTemplate(const std::string &uniqueId = MUI::EmptyUniqueId, const std::string &muiClassName = MUIC_Listview)
: GroupBuilderTemplate<T, U>(uniqueId, muiClassName)
{
}
#ifdef MUIA_Listview_AgainClick
/// @brief [ @b MUIA_Listview_AgainClick ]
T &tagAgainClick(const bool againClick);
#endif
/// @brief [ @b MUIA_Listview_DefClickColumn ]
T &tagDefClickColumn(const long defClickColumn);
/// @brief [ @b MUIA_Listview_DoubleClick ]
T &tagDoubleClick(const bool doubleClick);
/// @brief [ @b MUIA_Listview_DragType ]
T &tagDragType(const enum Listview_DragType dragType);
/// @brief [ @b MUIA_Listview_Input ]
T &tagInput(const bool input);
/// @brief [ @b MUIA_Listview_List ]
T &tagList(const MUI::List &list);
/// @brief [ @b MUIA_Listview_List ]
T &tagList(const Object *pList);
/// @brief [ @b MUIA_Listview_MultiSelect ]
T &tagMultiSelect(const enum Listview_MultiSelect multiSelect);
/// @brief [ @b MUIA_Listview_ScrollerPos ]
T &tagScrollerPos(const enum Listview_ScrollerPos scrollerPos);
protected:
bool Validate() const override;
};
class ListviewBuilder : public ListviewBuilderTemplate<ListviewBuilder, Listview>
{
public:
ListviewBuilder();
};
}
#define MUI_LISTVIEW_TPP_INCLUDE
#include "Listview.tpp"
#undef MUI_LISTVIEW_TPP_INCLUDE