1
#ifndef COIN_SO@GUI@COLOREDITOR_H
2
#define COIN_SO@GUI@COLOREDITOR_H
6
/**************************************************************************\
8
* This file is part of the Coin 3D visualization library.
9
* Copyright (C) 1998-2005 by Systems in Motion. All rights reserved.
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.
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.
22
* See <URL:http://www.coin3d.org/> for more information.
24
* Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
25
* <URL:http://www.sim.no/>.
27
\**************************************************************************/
29
#include <Inventor/@Gui@/nodes/SoGuiColorEditor.h>
30
#include <Inventor/@Gui@/So@Gui@RenderArea.h>
32
typedef void So@Gui@ColorEditorCB(void * closure, const SbColor * color);
39
class So@Gui@ColorEditor : public So@Gui@RenderArea {
40
SO@GUI@_OBJECT_HEADER(So@Gui@ColorEditor, So@Gui@RenderArea);
43
So@Gui@ColorEditor(@WIDGET@ parent = NULL, const char * name = NULL, SbBool embed = TRUE);
44
~So@Gui@ColorEditor(void);
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
55
enum UpdateFrequency {
56
CONTINUOUS = SoGuiColorEditor::CONTINUOUS,
57
AFTER_ACCEPT = SoGuiColorEditor::AFTER_ACCEPT
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);
64
SbBool isAttached(void) const;
66
void addColorChangedCallback(So@Gui@ColorEditorCB * cb, void * closure = NULL);
67
void removeColorChangedCallback(So@Gui@ColorEditorCB * cb, void * closure = NULL);
69
void setColor(const SbColor & color);
70
const SbColor & getColor(void) const;
72
void setWYSIWYG(SbBool enable);
73
SbBool isWYSIWYG(void) const;
75
void setCurrentSliders(Sliders which);
76
Sliders getCurrentSliders(void) const;
78
void setUpdateFrequency(UpdateFrequency freq);
79
UpdateFrequency getUpdateFrequency(void) const;
81
SoGuiColorEditor * getEditor(void) const;
84
virtual const char * getDefaultWidgetName(void) const;
85
virtual const char * getDefaultTitle(void) const;
86
virtual const char * getDefaultIconTitle(void) const;
93
#endif // !COIN_SO@GUI@COLOREDITOR_H