Toggle navigation
ivorium
iv_components
Example project
GitHub
Main Page
Modules
Classes
Files
File List
File Members
ivorium_graphics
Elements
Divider.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Slot.hpp
"
4
#include "
Axis.hpp
"
5
6
namespace
iv
7
{
8
13
class
DividerSlot
:
public
Slot
14
{
15
public
:
16
ClientMarker
cm
;
17
DividerSlot
(
Instance
* inst );
18
19
void
status
(
iv::TableDebugView
* view );
20
21
// initialization parameters
27
DirtyAttr< unsigned >
attr_lowerOrder
;
28
33
DirtyAttr< unsigned >
attr_higherOrder
;
34
35
// utility methods
36
DividerSlot
*
lowerOrder
(
unsigned
);
37
DividerSlot
*
higherOrder
(
unsigned
);
38
};
39
71
class
Divider
:
public
VectorChildrenElem
< DividerSlot >,
public
SlotChild
72
{
73
public
:
74
using
Elem::instance
;
75
ClientMarker
cm
;
76
77
Divider
(
Instance
* inst );
78
79
void
status
(
iv::TableDebugView
* view );
80
81
// initialization parameters
82
DirtyAttr< Axis >
attr_axis
;
83
DirtyAttr< AxisOrder >
attr_axisOrder
;
84
85
// utility methods
86
Divider
*
axis
(
Axis
);
87
Divider
*
axisOrder
(
AxisOrder
);
88
89
protected
:
90
// Elem
91
virtual
void
first_pass_impl
(
ElementRenderer
* )
override
;
92
virtual
void
second_pass_impl
(
ElementRenderer
* )
override
;
93
94
private
:
95
struct
Phase
96
{
97
// primary (filled when constructing phases)
98
size_t
segment;
99
bool
first;
100
bool
higher;
101
102
// secondary (filled when updating sizes and weights)
103
float
weight;
104
float
size
;
105
};
106
107
std::multimap< unsigned, Phase > phases;
108
109
private
:
110
bool
offsets_dirty;
111
};
112
113
}