ASlider#
Slider control.
Header: | #include <AUI/View/ASlider.h> |
CMake: | aui_link(my_target PUBLIC aui::views) |
Examples#
examples/7guis/circle_drawer/src/main.cpp
7GUIs Circle Drawer - Undo, redo, dialog control.
auto radiusPopup = _new<AWindow>(
"", 200_dp, 50_dp, dynamic_cast<AWindow*>(AWindow::current()), WindowStyle::MODAL);
radiusPopup->setContents(Vertical {
Label { "Adjust diameter of circle at {}."_format(circle->position) },
_new<ASlider>() AUI_LET {
it->setValue(circle->radius / MAX_RADIUS);
connect(
it->valueChanging, [this, circle](aui::float_within_0_1 s) {
circle->radius = s * MAX_RADIUS;
mState->circles.notify();
examples/7guis/timer/src/main.cpp
7GUIs Timer - Timer example.
return "{:.1f}s"_format(duration_cast<milliseconds>(d).count() / 1000.f);
}),
Horizontal {
Label { "Duration:" },
_new<ASlider>() AUI_LET {
it&& mDuration.biProjected(aui::lambda_overloaded {
[](high_resolution_clock::duration d) -> aui::float_within_0_1 {
return float(d.count()) / float(MAX_DURATION.count());
},
[](aui::float_within_0_1 d) -> high_resolution_clock::duration {
Public Types#
Handle#
class ASlider::Handle
Empty structure.