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 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGVIEWAREA_H_
40 #define _OSGVIEWAREA_H_
45 #include "OSGViewareaBase.h"
49 class RenderActionBase
;
50 class TraversalValidator
;
51 class FrameBufferObject
;
54 /*! \brief Viewarea base class. See \ref
55 PageSystemWindowViewareas for a description.
57 \ingroup GrpSystemWindowBase
58 \ingroup GrpLibOSGSystem
62 class OSG_SYSTEM_DLLMAPPING Viewarea
: public ViewareaBase
64 /*========================== PUBLIC =================================*/
68 typedef ViewareaBase Inherited
;
70 /*---------------------------------------------------------------------*/
74 void setSize (Real32 left
,
79 void computePixelSizes(Window
*pWin
,
82 UInt32
&uiPixelHeight
);
84 /*---------------------------------------------------------------------*/
85 /*! \name your_category */
88 virtual void render (RenderActionBase
*action
);
91 /*---------------------------------------------------------------------*/
95 virtual bool isPassive(void);
96 virtual FrameBufferObject
*getTarget(void);
99 /*---------------------------------------------------------------------*/
103 TraversalValidator
*getTravValidator(void);
106 /*---------------------------------------------------------------------*/
110 virtual void changed(ConstFieldMaskArg whichField
,
115 /*---------------------------------------------------------------------*/
119 virtual void dump( UInt32 uiIndent
= 0,
120 const BitVector bvFlags
= 0) const;
123 /*========================= PROTECTED ===============================*/
127 TraversalValidator
*_pTravValidator
;
129 /*---------------------------------------------------------------------*/
130 /*! \name Constructors */
134 Viewarea(const Viewarea
&source
);
137 /*---------------------------------------------------------------------*/
138 /*! \name Destructors */
141 virtual ~Viewarea(void);
144 /*---------------------------------------------------------------------*/
145 /*! \name Destructors */
148 static void initMethod(InitPhase ePhase
);
151 /*---------------------------------------------------------------------*/
152 /*! \name MT Construction */
156 /*---------------------------------------------------------------------*/
157 /*! \name MT Construction */
160 void onCreate (const Viewarea
*source
= NULL
);
162 void onCreateAspect (const Viewarea
*createAspect
,
163 const Viewarea
*source
= NULL
);
165 void onDestroy ( UInt32 uiContainerId
);
167 void onDestroyAspect( UInt32 uiContainerId
,
171 /*========================= PRIVATE ===============================*/
175 friend class FieldContainer
;
176 friend class ViewareaBase
;
177 friend class ViewareaDrawTask
;
179 // prohibit default functions (move to 'public' if you need one)
180 void operator =(const Viewarea
&source
);
183 //---------------------------------------------------------------------------
185 //---------------------------------------------------------------------------
187 typedef Viewarea
*ViewareaP
;
191 #include "OSGViewareaBase.inl"
192 #include "OSGViewarea.inl"
194 #endif /* _OSGVIEWAREA_H_ */