1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
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. *
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. *
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. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
40 #ifndef _OSGGRADIENTBACKGROUND_H_
41 #define _OSGGRADIENTBACKGROUND_H_
46 #include "OSGConfig.h"
48 #include "OSGGradientBackgroundBase.h"
55 /*! \brief Background clearing with a color gradient. See \ref
56 PageSystemWindowBackground for a description.
57 \ingroup GrpWindowBackgroundObj
58 \ingroup GrpLibOSGWindow
62 class OSG_WINDOW_DLLMAPPING GradientBackground
:
63 public GradientBackgroundBase
65 /*========================== PUBLIC =================================*/
68 static const OSG::BitVector LineFieldMask
;
70 /*---------------------------------------------------------------------*/
80 /*---------------------------------------------------------------------*/
81 /*! \name your_category */
84 #ifdef OSG_OLD_RENDER_ACTION
85 void clear(DrawActionBase
*, Viewport
*);
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;
101 /*---------------------------------------------------------------------*/
102 /*! \name transformation */
105 virtual void changed(ConstFieldMaskArg whichField
,
110 /*---------------------------------------------------------------------*/
114 virtual void dump( UInt32 uiIndent
= 0,
115 const BitVector bvFlags
= 0) const;
118 /*========================= PROTECTED ===============================*/
122 /*---------------------------------------------------------------------*/
123 /*! \name Constructors */
126 GradientBackground(void);
127 GradientBackground(const GradientBackground
&source
);
130 /*---------------------------------------------------------------------*/
131 /*! \name Destructors */
134 virtual ~GradientBackground(void);
137 /*========================== 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 //---------------------------------------------------------------------------
152 //---------------------------------------------------------------------------
154 typedef GradientBackground
*GradientBackgroundP
;
158 #include "OSGGradientBackgroundBase.inl"
159 #include "OSGGradientBackground.inl"
161 #endif /* _OSGGRADIENTBACKGROUND_H_ */