-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFontpanel.hpp
79 lines (63 loc) · 2.29 KB
/
Fontpanel.hpp
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
//
// AmigaOS MUI C++ wrapper
//
// (c) 2022-2024 TDolphin
//
#pragma once
#include "Panel.hpp"
#ifdef MUIC_Fontpanel
#include "ValueTypes/Fontpanel/ShowCollection.hpp"
#include <set>
namespace MUI
{
class Fontpanel : public Panel
{
public:
explicit Fontpanel(Object *pMuiObject)
: Panel(pMuiObject)
{
}
// instanceOf
const static std::string className;
static inline bool instanceOf(Object *pMuiObject)
{
return MUI::instanceOf(pMuiObject, className.c_str());
}
};
template <typename T, typename U> class FontpanelBuilderTemplate : public PanelBuilderTemplate<T, U>
{
public:
FontpanelBuilderTemplate(const std::string &uniqueId = MUI::EmptyUniqueId, const std::string &muiClassName = MUIC_Fontpanel)
: PanelBuilderTemplate<T, U>(uniqueId, muiClassName)
{
}
/// @brief [ @b MUIA_Fontpanel_ShowCollection ]
/// This attribute allows to specify the types of font families to select from. Just pass a value.
T &tagShowCollection(const enum Fontpanel_ShowCollection showCollection);
/// @brief [ @b MUIA_Fontpanel_ShowCollection ]
/// This attribute allows to specify the types of font families to select from.
/// Just pass set of values for logical OR of the suitable MUIV_Fontpanel_ShowCollection_#? values.
T &tagShowCollection(const std::set<enum Fontpanel_ShowCollection> showCollections);
};
class FontpanelBuilder : public FontpanelBuilderTemplate<FontpanelBuilder, Fontpanel>
{
public:
FontpanelBuilder();
};
template <typename T, typename U>
inline T &FontpanelBuilderTemplate<T, U>::tagShowCollection(const enum Fontpanel_ShowCollection showCollection)
{
this->PushTag(MUIA_Fontpanel_ShowCollection, (long)showCollection);
return (T &)*this;
}
template <typename T, typename U>
inline T &FontpanelBuilderTemplate<T, U>::tagShowCollection(const std::set<enum Fontpanel_ShowCollection> showCollections)
{
long showCollection = 0;
for (auto &value : showCollections)
showCollection |= (long)value;
this->PushTag(MUIA_Fontpanel_ShowCollection, showCollection);
return (T &)*this;
}
}
#endif