1
/**************************************************************************\
3
* This file is part of the Coin 3D visualization library.
4
* Copyright (C) 1998-2005 by Systems in Motion. All rights reserved.
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* ("GPL") version 2 as published by the Free Software Foundation.
9
* See the file LICENSE.GPL at the root directory of this source
10
* distribution for additional information about the GNU GPL.
12
* For using Coin with software that can not be combined with the GNU
13
* GPL, and for taking advantage of the additional benefits of our
14
* support services, please contact Systems in Motion about acquiring
15
* a Coin Professional Edition License.
17
* See <URL:http://www.coin3d.org/> for more information.
19
* Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
20
* <URL:http://www.sim.no/>.
22
\**************************************************************************/
24
// src/Inventor/Qt/widgets/SoAnyThumbWheel.h. Generated from SoAnyThumbWheel.h.in by configure.
26
#ifndef SOANY_THUMBWHEEL_H
27
#define SOANY_THUMBWHEEL_H
29
// ************************************************************************
31
class SoAnyThumbWheel {
33
enum State { DISABLED, ENABLED };
34
enum Alignment { VERTICAL, HORIZONTAL };
35
enum BoundaryHandling { MODULATE, ACCUMULATE, CLAMP };
36
enum Movement { UNIFORM, AUTHENTIC };
37
enum GraphicsByteOrder { ABGR, RGBA, ARGB, BGRA };
39
SoAnyThumbWheel(void);
40
~SoAnyThumbWheel(void);
42
void setSize(const int diameter, const int width);
43
void getSize(int & diameter, int & width) const;
45
void setColor(const float red, const float green, const float blue);
46
void getColor(float & red, float & green, float & blue) const;
47
void setColorFactors(const float light, const float front, const float normal, const float shade);
48
void getColorFactors(float & light, float & front, float & normal, float & shade) const;
50
int getNumBitmaps(void) const;
51
void drawBitmap(const int number, void * bitmap, Alignment alignment) const;
52
float calculateValue(const float origValue, const int origPosition, const int deltaPosition) const;
53
int getBitmapForValue(const float value, const State state) const;
55
void setGraphicsByteOrder(const GraphicsByteOrder byteorder);
56
GraphicsByteOrder getGraphicsByteOrder(void) const;
58
void setMovement(const Movement movement);
59
Movement getMovement(void) const;
61
void setBoundaryHandling(const BoundaryHandling handling);
62
BoundaryHandling getBoundaryHandling(void) const;
65
unsigned int swapWord(unsigned int) const;
68
// float disabledred, disabledgreen, disabledblue; // not implemented
69
float red, green, blue;
70
float light, front, normal, shade;
72
GraphicsByteOrder byteorder;
73
BoundaryHandling boundaryhandling;
76
enum Tables { SIN, COS, RAD, NUMTABLES };
78
mutable float * tables [ NUMTABLES ];
79
mutable int dirtyTables;
80
mutable int dirtyVariables;
81
mutable float squarelength, squarespacing, shadelength, unistep, numsquares;
83
void drawDisabledWheel(const int number, void * bitmap, Alignment alignment) const;
84
void drawEnabledWheel(const int number, void * bitmap, Alignment alignment) const;
86
void validate(void) const;
88
}; // class SoAnyThumbWheel
90
// ************************************************************************
92
#endif // ! SOANY_THUMBWHEEL_H