Open Inventor
Release 2025.2.2
Loading...
Searching...
No Matches
SoXtColorPatch.h
1
/*=======================================================================
2
*** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3
*** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4
*** ***
5
*** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6
*** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7
*** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8
*** ***
9
*** RESTRICTED RIGHTS LEGEND ***
10
*** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11
*** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12
*** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13
*** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14
*** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15
*** ***
16
*** COPYRIGHT (C) 1996-2020 BY FEI S.A.S, ***
17
*** BORDEAUX, FRANCE ***
18
*** ALL RIGHTS RESERVED ***
19
**=======================================================================*/
20
/*=======================================================================
21
** Author : VSG (MMM YYYY)
22
**=======================================================================*/
23
24
#ifdef SOQT
25
# include <Inventor/Qt/SoQtColorPatch.h>
26
#elif defined(_WIN32)
27
# include <Inventor/Win/SoWinColorPatch.h>
28
#else
// _WIN32
29
30
#ifndef _SO_XT_COLOR_PATCH_
31
#define _SO_XT_COLOR_PATCH_
32
33
#include <Inventor/Xt/SoXtGLWidget.h>
34
#include <Inventor/SbColor.h>
35
36
38
//
39
// Class: SoXtColorPatch
40
//
41
// This class simply draws a 3D looking patch of color.
42
//
44
45
{
46
47
public
:
48
49
SoXtColorPatch(
50
SoWidget parent = NULL,
51
const
char
*name = NULL,
52
SbBool
buildInsideParent = TRUE);
53
~SoXtColorPatch();
54
55
//
56
// set/get routines to specify the patch top color
57
//
58
void
setColor(
const
SbColor
&rgb);
59
const
SbColor
& getColor() {
return
color; }
60
61
private
:
62
63
// This constructor takes a boolean whether to build the widget now.
64
// Subclasses can pass FALSE, then call SoXtSlider::buildWidget()
65
// when they are ready for it to be built.
66
SoEXTENDER
67
SoXtColorPatch(
68
SoWidget parent,
69
const
char
*name,
70
SbBool
buildInsideParent,
71
SbBool
buildNow);
72
73
private
:
74
75
// redefine to do ColorPatch specific things
76
virtual
void
redraw();
77
virtual
void
sizeChanged(
const
SbVec2s
&newSize);
78
79
// local variables
80
SbColor
color;
81
82
// this is called by both constructors
83
void
constructorCommon(
SbBool
buildNow);
84
};
85
86
87
#endif
// _SO_XT_COLOR_PATCH_
88
89
#endif
// _WIN32
SbColor
Color vector class.
Definition
SbColor.h:82
SbVec2s
2D vector class.
Definition
SbVec.h:700
SbBool
int SbBool
Boolean type.
Definition
SbBase.h:87
Inventor
Xt
SoXtColorPatch.h
Generated by
1.13.2