fixed: compile issue
[opensg.git] / Source / System / Window / Background / OSGGradientBackground.h
blobda8138d6eb667c23e0a3877bfc13509153c30b85
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
18 * *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
40 #ifndef _OSGGRADIENTBACKGROUND_H_
41 #define _OSGGRADIENTBACKGROUND_H_
42 #ifdef __sgi
43 #pragma once
44 #endif
46 #include "OSGConfig.h"
48 #include "OSGGradientBackgroundBase.h"
50 OSG_BEGIN_NAMESPACE
52 class Viewport;
53 class DrawEnv;
55 /*! \brief Background clearing with a color gradient. See \ref
56 PageSystemWindowBackground for a description.
57 \ingroup GrpWindowBackgroundObj
58 \ingroup GrpLibOSGWindow
59 \includebasedoc
62 class OSG_WINDOW_DLLMAPPING GradientBackground :
63 public GradientBackgroundBase
65 /*========================== PUBLIC =================================*/
66 public:
68 static const OSG::BitVector LineFieldMask;
70 /*---------------------------------------------------------------------*/
71 /*! \name Enum */
72 /*! \{ */
74 enum
76 VERTICAL = 1,
77 HORIZONTAL = 2
80 /*---------------------------------------------------------------------*/
81 /*! \name your_category */
82 /*! \{ */
84 #ifdef OSG_OLD_RENDER_ACTION
85 void clear(DrawActionBase *, Viewport *);
86 #endif
88 void clear(DrawEnv *);
91 void addLine (Color3f color, Real32 position);
92 void clearLines(void);
94 const MFColor3f *getMFColor ( void ) const;
95 const Color3f &getColor (const UInt32 index) const;
97 const MFReal32 *getMFPosition( void ) const;
98 const Real32 &getPosition (const UInt32 index) const;
100 /*! \} */
101 /*---------------------------------------------------------------------*/
102 /*! \name transformation */
103 /*! \{ */
105 virtual void changed(ConstFieldMaskArg whichField,
106 UInt32 origin,
107 BitVector detail);
109 /*! \} */
110 /*---------------------------------------------------------------------*/
111 /*! \name dump */
112 /*! \{ */
114 virtual void dump( UInt32 uiIndent = 0,
115 const BitVector bvFlags = 0) const;
117 /*! \} */
118 /*========================= PROTECTED ===============================*/
119 protected:
122 /*---------------------------------------------------------------------*/
123 /*! \name Constructors */
124 /*! \{ */
126 GradientBackground(void);
127 GradientBackground(const GradientBackground &source);
129 /*! \} */
130 /*---------------------------------------------------------------------*/
131 /*! \name Destructors */
132 /*! \{ */
134 virtual ~GradientBackground(void);
136 /*! \} */
137 /*========================== PRIVATE ================================*/
138 private:
140 typedef GradientBackgroundBase Inherited;
142 friend class FieldContainer;
143 friend class GradientBackgroundBase;
145 static void initMethod(InitPhase ePhase);
147 void operator =(const GradientBackground &source);
150 //---------------------------------------------------------------------------
151 // Exported Types
152 //---------------------------------------------------------------------------
154 typedef GradientBackground *GradientBackgroundP;
156 OSG_END_NAMESPACE
158 #include "OSGGradientBackgroundBase.inl"
159 #include "OSGGradientBackground.inl"
161 #endif /* _OSGGRADIENTBACKGROUND_H_ */