Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Slider.h
Go to the documentation of this file.
1
/* Project nGenEx
2
Destroyer Studios LLC
3
Copyright © 1997-2004. All Rights Reserved.
4
5
SUBSYSTEM: nGenEx.lib
6
FILE: Slider.h
7
AUTHOR: John DiCamillo
8
9
10
OVERVIEW
11
========
12
Slider/Gauge ActiveWindow class
13
*/
14
15
#ifndef Slider_h
16
#define Slider_h
17
18
#include "
Types.h
"
19
#include "
ActiveWindow.h
"
20
21
// +--------------------------------------------------------------------+
22
23
class
Slider
:
public
ActiveWindow
24
{
25
public
:
26
static
const
char
*
TYPENAME
() {
return
"Slider"
; }
27
28
enum
{
MAX_VAL
=8,
ORIENT_HORIZONTAL
=0,
ORIENT_VERTICAL
=1 };
29
30
Slider
(
ActiveWindow
* p,
int
ax,
int
ay,
int
aw,
int
ah, DWORD aid);
31
Slider
(
Screen
* s,
int
ax,
int
ay,
int
aw,
int
ah, DWORD aid);
32
virtual
~Slider
();
33
34
// Operations:
35
virtual
void
Draw
();
36
37
// Event Target Interface:
38
virtual
int
OnMouseMove
(
int
x,
int
y);
39
virtual
int
OnLButtonDown
(
int
x,
int
y);
40
virtual
int
OnLButtonUp
(
int
x,
int
y);
41
virtual
int
OnClick
();
42
43
// Property accessors:
44
bool
GetActive
();
45
void
SetActive
(
bool
bNewValue);
46
Color
GetFillColor
();
47
void
SetFillColor
(
Color
c);
48
bool
GetBorder
();
49
void
SetBorder
(
bool
bNewValue);
50
Color
GetBorderColor
();
51
void
SetBorderColor
(
Color
c);
52
53
int
GetNumLeds
();
54
void
SetNumLeds
(
int
nNewValue);
55
int
GetOrientation
();
56
void
SetOrientation
(
int
nNewValue);
57
58
int
GetRangeMin
();
59
void
SetRangeMin
(
int
nNewValue);
60
int
GetRangeMax
();
61
void
SetRangeMax
(
int
nNewValue);
62
int
GetStepSize
();
63
void
SetStepSize
(
int
nNewValue);
64
int
GetThumbSize
();
65
void
SetThumbSize
(
int
nNewValue);
66
bool
GetShowThumb
();
67
void
SetShowThumb
(
bool
bNewValue);
68
69
int
NumValues
();
70
int
GetValue
(
int
index=0);
71
void
SetValue
(
int
nNewValue,
int
index=0);
72
double
FractionalValue
(
int
index=0);
73
74
void
SetMarker
(
int
nNewValue,
int
index=0);
75
76
// Methods:
77
void
StepUp
(
int
index=0);
78
void
StepDown
(
int
index=0);
79
80
protected
:
81
int
captured
;
82
int
dragging
;
83
int
mouse_x
;
84
int
mouse_y
;
85
86
bool
active
;
// true => slider; false => gauge
87
bool
border
;
88
Color
border_color
;
89
Color
fill_color
;
// default: dark blue
90
91
int
num_leds
;
// default: 1
92
int
orientation
;
// 0 => horizontal; !0 => vertical
93
94
int
range_min
;
95
int
range_max
;
96
int
step_size
;
97
int
show_thumb
;
98
int
thumb_size
;
99
int
thumb_pos
;
100
101
int
nvalues
;
102
int
value
[
MAX_VAL
];
103
int
marker
[2];
104
};
105
106
#endif Slider_h
107
nGenEx
Slider.h
Generated on Tue Jun 5 2012 20:46:31 for Starshatter_Open by
1.8.1