guit
0.1
Main Page
Classes
Files
File List
All
Classes
Functions
Variables
Typedefs
Enumerations
Friends
gadgets
gslider.hpp
1
//
2
// Sliders & Scrollbars
3
// Guit GUI Toolkit
4
// Copyright © 2019/2020 Eric Lecolinet. All rights reserved.
5
// http://www.telecom-paris.fr/~elc
6
//
7
8
#ifndef Guit_Slider_hpp
9
#define Guit_Slider_hpp
10
#include <gvalueitem.hpp>
11
namespace
guit {
12
32
class
GSlider
:
public
GValueItem
{
33
protected
:
34
GSlider
(
GadgetType
&, GString
const
& css_and_value);
35
36
public
:
37
GSlider
(GString
const
& css_and_value =
""
);
38
GSlider
(
float
value
);
39
GSlider
&
clone
(GClone
const
&)
override
;
40
45
GSlider
&
setRange
(
float
min,
float
max);
46
47
using
GType
=
GadgetType_<GSlider,GValueItem>
;
48
static
GType
& Type();
49
GType
& type()
const override
{
return
Type();}
50
53
GFlow::Kind getFlow()
override
;
54
void
paintContent(GRenderGraphics&, GRender&, GFlow::Kind)
override
;
56
};
57
60
GSlider
& Slider(GString
const
& css_and_value =
""
);
61
GSlider
& Slider(
float
value);
63
64
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
65
68
class
GScrollBar
:
public
GSlider
{
69
protected
:
70
GScrollBar
(
GadgetType
&, GString
const
& css_and_value);
71
72
public
:
73
GScrollBar
(GString
const
& css_and_value =
""
);
74
GScrollBar
&
clone
(GClone
const
&)
override
;
75
76
Place
place()
const override
{
return
Place::ScrollBar;}
77
78
using
GType
=
GadgetType_<GScrollBar,GSlider>
;
79
static
GType
& Type();
80
GType
& type()
const override
{
return
Type();}
81
84
void
paintContent(GRenderGraphics&, GRender&, GFlow::Kind)
override
;
85
void
mouseDrag(
GMouseEvent
&)
override
;
87
};
88
90
GScrollBar
& ScrollBar(GString
const
& css_and_value =
""
);
91
92
}
93
#endif
Generated on Thu Feb 25 2021 16:42:45 for guit by
1.8.4