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

« back to all changes in this revision

Viewing changes to src/Inventor/Qt/common/editors/SoGuiColorEditor.h.in

  • 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
#ifndef COIN_SO@GUI@COLOREDITOR_H
 
2
#define COIN_SO@GUI@COLOREDITOR_H
 
3
 
 
4
// @configure_input@
 
5
 
 
6
/**************************************************************************\
 
7
 *
 
8
 *  This file is part of the Coin 3D visualization library.
 
9
 *  Copyright (C) 1998-2005 by Systems in Motion.  All rights reserved.
 
10
 *
 
11
 *  This library is free software; you can redistribute it and/or
 
12
 *  modify it under the terms of the GNU General Public License
 
13
 *  ("GPL") version 2 as published by the Free Software Foundation.
 
14
 *  See the file LICENSE.GPL at the root directory of this source
 
15
 *  distribution for additional information about the GNU GPL.
 
16
 *
 
17
 *  For using Coin with software that can not be combined with the GNU
 
18
 *  GPL, and for taking advantage of the additional benefits of our
 
19
 *  support services, please contact Systems in Motion about acquiring
 
20
 *  a Coin Professional Edition License.
 
21
 *
 
22
 *  See <URL:http://www.coin3d.org/> for more information.
 
23
 *
 
24
 *  Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
 
25
 *  <URL:http://www.sim.no/>.
 
26
 *
 
27
\**************************************************************************/
 
28
 
 
29
#include <Inventor/@Gui@/nodes/SoGuiColorEditor.h>
 
30
#include <Inventor/@Gui@/So@Gui@RenderArea.h>
 
31
 
 
32
typedef void So@Gui@ColorEditorCB(void * closure, const SbColor * color);
 
33
        
 
34
class SbColor;
 
35
class SoSFColor;
 
36
class SoMFColor;
 
37
class SoMFUInt32;
 
38
 
 
39
class So@Gui@ColorEditor : public So@Gui@RenderArea {
 
40
  SO@GUI@_OBJECT_HEADER(So@Gui@ColorEditor, So@Gui@RenderArea);
 
41
 
 
42
public:
 
43
  So@Gui@ColorEditor(@WIDGET@ parent = NULL, const char * name = NULL, SbBool embed = TRUE);
 
44
  ~So@Gui@ColorEditor(void);
 
45
 
 
46
  enum Sliders {
 
47
    NONE = SoGuiColorEditor::NONE, 
 
48
    INTENSITY = SoGuiColorEditor::INTENSITY,
 
49
    RGB = SoGuiColorEditor::RGB, 
 
50
    HSV = SoGuiColorEditor::HSV, 
 
51
    RGB_V = SoGuiColorEditor::RGB_V, 
 
52
    RGB_HSV = SoGuiColorEditor::RGB_HSV
 
53
  };
 
54
  
 
55
  enum UpdateFrequency {
 
56
    CONTINUOUS = SoGuiColorEditor::CONTINUOUS,
 
57
    AFTER_ACCEPT = SoGuiColorEditor::AFTER_ACCEPT
 
58
  };
 
59
  
 
60
  void attach(SoSFColor * color, SoBase * node = NULL);
 
61
  void attach(SoMFColor * color, int idx = 0, SoBase * node = NULL);
 
62
  void attach(SoMFUInt32 * color, int idx = 0, SoBase * node = NULL);
 
63
  void detach(void);
 
64
  SbBool isAttached(void) const;
 
65
  
 
66
  void addColorChangedCallback(So@Gui@ColorEditorCB * cb, void * closure = NULL);
 
67
  void removeColorChangedCallback(So@Gui@ColorEditorCB * cb, void * closure = NULL);
 
68
  
 
69
  void setColor(const SbColor & color);
 
70
  const SbColor & getColor(void) const;
 
71
  
 
72
  void setWYSIWYG(SbBool enable);
 
73
  SbBool isWYSIWYG(void) const;
 
74
  
 
75
  void setCurrentSliders(Sliders which);
 
76
  Sliders getCurrentSliders(void) const;
 
77
  
 
78
  void setUpdateFrequency(UpdateFrequency freq);
 
79
  UpdateFrequency getUpdateFrequency(void) const;
 
80
 
 
81
  SoGuiColorEditor * getEditor(void) const;
 
82
 
 
83
protected:
 
84
  virtual const char * getDefaultWidgetName(void) const;
 
85
  virtual const char * getDefaultTitle(void) const;
 
86
  virtual const char * getDefaultIconTitle(void) const;
 
87
 
 
88
private:
 
89
  void * internals;
 
90
 
 
91
};
 
92
 
 
93
#endif // !COIN_SO@GUI@COLOREDITOR_H