FloatWidgets.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Basic.h
"
4
5
namespace
armarx::RemoteGui::detail
6
{
7
template
<
typename
Derived>
8
struct
FloatMinMaxMixin
:
MinMaxMixin
<Derived, float>
9
{
10
Derived&
steps
(
int
steps
)
11
{
12
Derived& this_ = *
static_cast<
Derived*
>
(
this
);
13
this_.
widget
().steps =
steps
;
14
return
this_;
15
}
16
Derived&
steps
(std::array<int, 1>
v
)
17
{
18
return
steps
(
v
.at(0));
19
}
20
};
21
22
struct
FloatSpinBoxBuilder
23
:
public
ValueMixin
<FloatSpinBox, float, FloatSpinBoxBuilder>
24
,
public
FloatMinMaxMixin
<FloatSpinBoxBuilder>
25
,
public
ToolTipMixin
<FloatSpinBoxBuilder>
26
{
27
using
ValueMixin::ValueMixin;
28
29
FloatSpinBoxBuilder
&
decimals
(
int
decimals
)
30
{
31
widget
().decimals =
decimals
;
32
return
*
this
;
33
}
34
35
FloatSpinBoxBuilder
&
decimals
(std::array<int, 1> d)
36
{
37
return
decimals
(d.at(0));
38
}
39
};
40
41
struct
FloatSliderBuilder
42
:
public
ValueMixin
<FloatSlider, float, FloatSliderBuilder>
43
,
public
FloatMinMaxMixin
<FloatSliderBuilder>
44
,
public
ToolTipMixin
<FloatSliderBuilder>
45
{
46
using
ValueMixin::ValueMixin;
47
};
48
}
49
50
namespace
armarx::RemoteGui
51
{
52
inline
detail::FloatSpinBoxBuilder
makeFloatSpinBox
(std::string
const
& name)
53
{
54
return
detail::FloatSpinBoxBuilder
(name);
55
}
56
57
inline
detail::FloatSliderBuilder
makeFloatSlider
(std::string
const
& name)
58
{
59
return
detail::FloatSliderBuilder
(name);
60
}
61
}
Basic.h
armarx::RemoteGui
Definition:
LightweightRemoteGuiComponentPlugin.h:30
armarx::RemoteGui::detail
Definition:
Basic.h:10
armarx::RemoteGui::detail::MinMaxMixin
Definition:
Basic.h:86
armarx::RemoteGui::detail::FloatMinMaxMixin::steps
Derived & steps(std::array< int, 1 > v)
Definition:
FloatWidgets.h:16
armarx::RemoteGui::detail::FloatSliderBuilder
Definition:
FloatWidgets.h:41
armarx::RemoteGui::detail::WidgetMixin::widget
WidgetT & widget()
Definition:
Basic.h:50
armarx::RemoteGui::makeFloatSlider
detail::FloatSliderBuilder makeFloatSlider(std::string const &name)
Definition:
FloatWidgets.h:57
armarx::RemoteGui::detail::FloatSpinBoxBuilder::decimals
FloatSpinBoxBuilder & decimals(int decimals)
Definition:
FloatWidgets.h:29
armarx::RemoteGui::detail::FloatMinMaxMixin
Definition:
FloatWidgets.h:8
armarx::RemoteGui::detail::ToolTipMixin
Definition:
Basic.h:200
armarx::RemoteGui::detail::FloatSpinBoxBuilder::decimals
FloatSpinBoxBuilder & decimals(std::array< int, 1 > d)
Definition:
FloatWidgets.h:35
armarx::ctrlutil::v
double v(double t, double v0, double a0, double j)
Definition:
CtrlUtil.h:39
armarx::RemoteGui::detail::FloatSpinBoxBuilder
Definition:
FloatWidgets.h:22
armarx::RemoteGui::makeFloatSpinBox
detail::FloatSpinBoxBuilder makeFloatSpinBox(std::string const &name)
Definition:
FloatWidgets.h:52
armarx::RemoteGui::detail::ValueMixin
Definition:
Basic.h:68
armarx::RemoteGui::detail::FloatMinMaxMixin::steps
Derived & steps(int steps)
Definition:
FloatWidgets.h:10
ArmarXGui
libraries
RemoteGui
WidgetBuilder
FloatWidgets.h
Generated on Sat Oct 12 2024 09:14:04 for armarx_documentation by
1.8.17