20 Margins() : m_left(0), m_top(0), m_right(0), m_bottom(0) {};
21 Margins(
int _left,
int _top,
int _right,
int _bottom) : m_left(_left), m_top(_top), m_right(_right), m_bottom(_bottom) {};
22 Margins(
const Margins& _other) : m_left(_other.m_left), m_top(_other.m_top), m_right(_other.m_right), m_bottom(_other.m_bottom) {};
35 virtual void setFromJsonObject(
const ConstJsonObject& _object)
override;
37 void setLeft(
int _margin) { m_left = _margin; };
38 int left(
void)
const {
return m_left; };
40 void setRight(
int _margin) { m_right = _margin; };
41 int right(
void)
const {
return m_right; };
43 void setTop(
int _margin) { m_top = _margin; };
44 int top(
void)
const {
return m_top; };
46 void setBottom(
int _margin) { m_bottom = _margin; };
47 int bottom(
void)
const {
return m_bottom; };
60 MarginsF() : m_left(0.f), m_top(0.f), m_right(0.f), m_bottom(0.f) {};
61 MarginsF(
float _left,
float _top,
float _right,
float _bottom) : m_left(_left), m_top(_top), m_right(_right), m_bottom(_bottom) {};
62 MarginsF(
const MarginsF& _other) : m_left(_other.m_left), m_top(_other.m_top), m_right(_other.m_right), m_bottom(_other.m_bottom) {};
75 virtual void setFromJsonObject(
const ConstJsonObject& _object)
override;
77 void setLeft(
float _margin) { m_left = _margin; };
78 float left(
void)
const {
return m_left; };
80 void setRight(
float _margin) { m_right = _margin; };
81 float right(
void)
const {
return m_right; };
83 void setTop(
float _margin) { m_top = _margin; };
84 float top(
void)
const {
return m_top; };
86 void setBottom(
float _margin) { m_bottom = _margin; };
87 float bottom(
void)
const {
return m_bottom; };
100 MarginsD() : m_left(0.), m_top(0.), m_right(0.), m_bottom(0.) {};
101 MarginsD(
double _left,
double _top,
double _right,
double _bottom) : m_left(_left), m_top(_top), m_right(_right), m_bottom(_bottom) {};
102 MarginsD(
const MarginsD& _other) : m_left(_other.m_left), m_top(_other.m_top), m_right(_other.m_right), m_bottom(_other.m_bottom) {};
115 virtual void setFromJsonObject(
const ConstJsonObject& _object)
override;
117 void setLeft(
double _margin) { m_left = _margin; };
118 double left(
void)
const {
return m_left; };
120 void setRight(
double _margin) { m_right = _margin; };
121 double right(
void)
const {
return m_right; };
123 void setTop(
double _margin) { m_top = _margin; };
124 double top(
void)
const {
return m_top; };
127 double bottom(
void)
const {
return m_bottom; };
This file contains defines that may be used simplyfy class creation.
#define OT_GUI_API_EXPORT
Definition OTGuiAPIExport.h:9
void setBottom(double _margin)
Definition Margins.h:126
double bottom(void) const
Definition Margins.h:127
double top(void) const
Definition Margins.h:124
MarginsD(double _left, double _top, double _right, double _bottom)
Definition Margins.h:101
MarginsD()
Definition Margins.h:100
double left(void) const
Definition Margins.h:118
void setTop(double _margin)
Definition Margins.h:123
MarginsD(const MarginsD &_other)
Definition Margins.h:102
void setLeft(double _margin)
Definition Margins.h:117
virtual ~MarginsD()
Definition Margins.h:103
double right(void) const
Definition Margins.h:121
void setRight(double _margin)
Definition Margins.h:120
MarginsF(const MarginsF &_other)
Definition Margins.h:62
void setRight(float _margin)
Definition Margins.h:80
MarginsF(float _left, float _top, float _right, float _bottom)
Definition Margins.h:61
float top(void) const
Definition Margins.h:84
MarginsF()
Definition Margins.h:60
void setLeft(float _margin)
Definition Margins.h:77
float bottom(void) const
Definition Margins.h:87
void setTop(float _margin)
Definition Margins.h:83
float left(void) const
Definition Margins.h:78
float right(void) const
Definition Margins.h:81
virtual ~MarginsF()
Definition Margins.h:63
void setBottom(float _margin)
Definition Margins.h:86
void setTop(int _margin)
Definition Margins.h:43
int right(void) const
Definition Margins.h:41
Margins(int _left, int _top, int _right, int _bottom)
Definition Margins.h:21
void setRight(int _margin)
Definition Margins.h:40
Margins()
Definition Margins.h:20
Margins(const Margins &_other)
Definition Margins.h:22
void setBottom(int _margin)
Definition Margins.h:46
int left(void) const
Definition Margins.h:38
int bottom(void) const
Definition Margins.h:47
void setLeft(int _margin)
Definition Margins.h:37
virtual ~Margins()
Definition Margins.h:23
int top(void) const
Definition Margins.h:44
The Serializable class is the default interface of serializable objects.
Definition Serializable.h:17
rapidjson::Value JsonValue
Writable JSON value.
Definition JSON.h:27
rapidjson::GenericObject< true, rapidjson::GenericValue< rapidjson::UTF8<>, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > > > ConstJsonObject
Read only JSON Object.
Definition JSON.h:35
rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > JsonAllocator
Allocator used for writing to JSON values.
Definition JSON.h:30