-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gadget.hpp
50 lines (40 loc) · 1.08 KB
/
Gadget.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
//
// AmigaOS MUI C++ wrapper
//
// (c) 2022-2024 TDolphin
//
#pragma once
#include "Area.hpp"
namespace MUI
{
class Gadget : public Area
{
public:
explicit Gadget(Object *pMuiObject)
: Area(pMuiObject)
{
}
// instanceOf
const static std::string className;
static inline bool instanceOf(Object *pMuiObject)
{
return MUI::instanceOf(pMuiObject, className.c_str());
}
// is/get/set (attributes), all setters return object reference
/// @brief [ @b MUIA_Gadget_Gadget ]
::Gadget *getGadget() const;
};
template <typename T, typename U> class GadgetBuilderTemplate : public AreaBuilderTemplate<T, U>
{
public:
GadgetBuilderTemplate(const std::string &uniqueId = MUI::EmptyUniqueId, const std::string &muiClassName = MUIC_Gadget)
: AreaBuilderTemplate<T, U>(uniqueId, muiClassName)
{
}
};
class GadgetBuilder : public GadgetBuilderTemplate<GadgetBuilder, Gadget>
{
public:
GadgetBuilder();
};
}