Toggle navigation
ivorium
iv_components
Example project
GitHub
Main Page
Modules
Classes
Files
File List
File Members
ivorium_graphics
Elements
Slot.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Elem.hpp
"
4
#include "
VectorChildrenElem.hpp
"
5
6
namespace
iv
7
{
8
11
class
SlotChild
:
public
Pickable
12
{
13
public
:
14
ClientMarker
cm
;
15
16
SlotChild
(
Elem
*
elem
);
17
Instance
*
instance
()
const
;
18
19
void
status
(
iv::TableDebugView
* view );
20
21
// post-initialization parameters
29
DirtyAttr< float3 >
expectedSize
;
30
31
// synthesized parameters
32
DirtyAttr< float3 >
preferredSize
;
33
34
// inherited parameters
35
DirtyAttr< float3 >
size
;
36
37
// Pickable
38
virtual
bool
picking_test
(
int2
input_pos )
override
;
39
virtual
bool
picking_test_pixel_perfect
(
float2
local_pos ){
return
true
; }
40
};
41
42
50
class
Slot
:
public
VectorChildrenElem
< SlotChild >,
public
SlotChild
51
{
52
public
:
53
ClientMarker
cm
;
54
using
Elem::instance
;
55
using
SlotChild::elem
;
56
Slot
(
Instance
* );
57
void
status
(
iv::TableDebugView
* view );
58
59
protected
:
60
// Elem
61
virtual
void
first_pass_impl
(
ElementRenderer
* )
override
;
62
virtual
void
second_pass_impl
(
ElementRenderer
* )
override
;
63
};
64
65
72
class
ProtectedSlot
:
public
Elem
,
public
SlotChild
73
{
74
public
:
75
ClientMarker
cm
;
76
using
Elem::instance
;
77
ProtectedSlot
(
Instance
* inst );
78
79
protected
:
80
// Elem
81
virtual
void
first_pass_impl
(
ElementRenderer
* )
override
;
82
virtual
void
second_pass_impl
(
ElementRenderer
* )
override
;
83
84
virtual
void
elem_eachChild
( std::function<
void
(
Elem
* ) >
const
& )
override
;
85
virtual
void
elem_childDisconnect
(
Elem
* )
override
;
86
87
// InputNode
88
virtual
void
input_eachChild
( std::function<
void
(
InputNode
* ) >
const
& f )
override
;
89
virtual
void
input_childDisconnect
(
InputNode
* child )
override
;
90
91
protected
:
92
Slot
root
;
93
};
94
95
}