~ubuntu-branches/ubuntu/oneiric/soqt/oneiric

« back to all changes in this revision

Viewing changes to build/msvc8/src/Inventor/Qt/widgets/SoAnyThumbWheel.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2009-03-01 11:41:00 UTC
  • mfrom: (1.1.4 upstream) (5.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090301114100-f4zz3n1oasa52fgk
Tags: 1.4.2~svn20090224-2
* Upload upstream SVN head version containing fixes to build with Coin 3
  (Closes: #515729, #515736, #515742).  Upstream indicated to me that
  SVN is stable enough to release.

* control: Update Standards-Version to 3.8.0; no changes required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**************************************************************************\
2
 
 *
3
 
 *  This file is part of the Coin 3D visualization library.
4
 
 *  Copyright (C) 1998-2005 by Systems in Motion.  All rights reserved.
5
 
 *
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.
11
 
 *
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.
16
 
 *
17
 
 *  See <URL:http://www.coin3d.org/> for more information.
18
 
 *
19
 
 *  Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
20
 
 *  <URL:http://www.sim.no/>.
21
 
 *
22
 
\**************************************************************************/
23
 
 
24
 
// src/Inventor/Qt/widgets/SoAnyThumbWheel.h.  Generated from SoAnyThumbWheel.h.in by configure.
25
 
 
26
 
#ifndef SOANY_THUMBWHEEL_H
27
 
#define SOANY_THUMBWHEEL_H
28
 
 
29
 
// ************************************************************************
30
 
 
31
 
class SoAnyThumbWheel {
32
 
public:
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 };
38
 
 
39
 
  SoAnyThumbWheel(void);
40
 
  ~SoAnyThumbWheel(void);
41
 
 
42
 
  void setSize(const int diameter, const int width);
43
 
  void getSize(int & diameter, int & width) const;
44
 
 
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;
49
 
 
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;
54
 
 
55
 
  void setGraphicsByteOrder(const GraphicsByteOrder byteorder);
56
 
  GraphicsByteOrder getGraphicsByteOrder(void) const;
57
 
 
58
 
  void setMovement(const Movement movement);
59
 
  Movement getMovement(void) const;
60
 
 
61
 
  void setBoundaryHandling(const BoundaryHandling handling);
62
 
  BoundaryHandling getBoundaryHandling(void) const;
63
 
 
64
 
private:
65
 
  unsigned int swapWord(unsigned int) const;
66
 
 
67
 
  int diameter, width;
68
 
  // float disabledred, disabledgreen, disabledblue; // not implemented
69
 
  float red, green, blue;
70
 
  float light, front, normal, shade;
71
 
 
72
 
  GraphicsByteOrder  byteorder;
73
 
  BoundaryHandling   boundaryhandling;
74
 
  Movement           movement;
75
 
 
76
 
  enum Tables { SIN, COS, RAD, NUMTABLES };
77
 
 
78
 
  mutable float * tables [ NUMTABLES ];
79
 
  mutable int dirtyTables;
80
 
  mutable int dirtyVariables;
81
 
  mutable float squarelength, squarespacing, shadelength, unistep, numsquares;
82
 
 
83
 
  void drawDisabledWheel(const int number, void * bitmap, Alignment alignment) const;
84
 
  void drawEnabledWheel(const int number, void * bitmap, Alignment alignment) const;
85
 
 
86
 
  void validate(void) const;
87
 
 
88
 
}; // class SoAnyThumbWheel
89
 
 
90
 
// ************************************************************************
91
 
 
92
 
#endif // ! SOANY_THUMBWHEEL_H