changed: gcc8 base update
[opensg.git] / Source / System / Window / Base / OSGViewarea.h
blob7ab5141556b95208e1e3eb055879a48a0adb2e80
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 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGVIEWAREA_H_
40 #define _OSGVIEWAREA_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGViewareaBase.h"
47 OSG_BEGIN_NAMESPACE
49 class RenderActionBase;
50 class TraversalValidator;
51 class FrameBufferObject;
52 class Window;
54 /*! \brief Viewarea base class. See \ref
55 PageSystemWindowViewareas for a description.
57 \ingroup GrpSystemWindowBase
58 \ingroup GrpLibOSGSystem
59 \includebasedoc
62 class OSG_SYSTEM_DLLMAPPING Viewarea : public ViewareaBase
64 /*========================== PUBLIC =================================*/
66 public:
68 typedef ViewareaBase Inherited;
70 /*---------------------------------------------------------------------*/
71 /*! \name access */
72 /*! \{ */
74 void setSize (Real32 left,
75 Real32 bottom,
76 Real32 right,
77 Real32 top );
79 void computePixelSizes(Window *pWin,
81 UInt32 &uiPixelWidth,
82 UInt32 &uiPixelHeight);
83 /*! \} */
84 /*---------------------------------------------------------------------*/
85 /*! \name your_category */
86 /*! \{ */
88 virtual void render (RenderActionBase *action);
90 /*! \} */
91 /*---------------------------------------------------------------------*/
92 /*! \name Sync */
93 /*! \{ */
95 virtual bool isPassive(void);
96 virtual FrameBufferObject *getTarget(void);
98 /*! \} */
99 /*---------------------------------------------------------------------*/
100 /*! \name Sync */
101 /*! \{ */
103 TraversalValidator *getTravValidator(void);
105 /*! \} */
106 /*---------------------------------------------------------------------*/
107 /*! \name change */
108 /*! \{ */
110 virtual void changed(ConstFieldMaskArg whichField,
111 UInt32 origin,
112 BitVector detail);
114 /*! \} */
115 /*---------------------------------------------------------------------*/
116 /*! \name dump */
117 /*! \{ */
119 virtual void dump( UInt32 uiIndent = 0,
120 const BitVector bvFlags = 0) const;
122 /*! \} */
123 /*========================= PROTECTED ===============================*/
125 protected:
127 TraversalValidator *_pTravValidator;
129 /*---------------------------------------------------------------------*/
130 /*! \name Constructors */
131 /*! \{ */
133 Viewarea(void);
134 Viewarea(const Viewarea &source);
136 /*! \} */
137 /*---------------------------------------------------------------------*/
138 /*! \name Destructors */
139 /*! \{ */
141 virtual ~Viewarea(void);
143 /*! \} */
144 /*---------------------------------------------------------------------*/
145 /*! \name Destructors */
146 /*! \{ */
148 static void initMethod(InitPhase ePhase);
150 /*! \} */
151 /*---------------------------------------------------------------------*/
152 /*! \name MT Construction */
153 /*! \{ */
155 /*! \} */
156 /*---------------------------------------------------------------------*/
157 /*! \name MT Construction */
158 /*! \{ */
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,
168 UInt32 uiAspect );
170 /*! \} */
171 /*========================= PRIVATE ===============================*/
173 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 //---------------------------------------------------------------------------
184 // Exported Types
185 //---------------------------------------------------------------------------
187 typedef Viewarea *ViewareaP;
189 OSG_END_NAMESPACE
191 #include "OSGViewareaBase.inl"
192 #include "OSGViewarea.inl"
194 #endif /* _OSGVIEWAREA_H_ */