-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRectangle.hpp
More file actions
65 lines (53 loc) · 1.61 KB
/
Rectangle.hpp
File metadata and controls
65 lines (53 loc) · 1.61 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
//
// AmigaOS MUI C++ wrapper
//
// (c) 2022-2026 TDolphin
//
#pragma once
#include "Area.hpp"
namespace MUI
{
class Rectangle : public Area
{
public:
explicit Rectangle(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_Rectangle_BarTitle ]
std::string getBarTitle() const;
/// @brief [ @b MUIA_Rectangle_HBar ]
bool isHBar() const;
/// @brief [ @b MUIA_Rectangle_VBar ]
bool isVBar() const;
};
template <typename T, typename U> class RectangleBuilderTemplate : public AreaBuilderTemplate<T, U>
{
public:
RectangleBuilderTemplate(const std::string &uniqueId = MUI::EmptyUniqueId, const std::string &muiClassName = MUIC_Rectangle)
: AreaBuilderTemplate<T, U>(uniqueId, muiClassName)
{
}
/// @brief [ @b MUIA_Rectangle_BarTitle ]
T &tagBarTitle(const char *barTitle);
/// @brief [ @b MUIA_Rectangle_HBar ]
T &tagHBar(const bool hBar);
/// @brief [ @b MUIA_Rectangle_VBar ]
T &tagVBar(const bool vBar);
};
class RectangleBuilder : public RectangleBuilderTemplate<RectangleBuilder, Rectangle>
{
public:
RectangleBuilder();
};
}
#define MUI_RECTANGLE_TPP_INCLUDE
#include "Rectangle.tpp"
#undef MUI_RECTANGLE_TPP_INCLUDE