changed: auto add updateData callback to stages so that stagedata can be updated...
[opensg.git] / Source / WindowSystem / CoreGL / OSGCoreGLWindowBase.h
blobc938ce5bc27b4995970a413a792febab4669cdd5
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2006 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 /*****************************************************************************\
40 *****************************************************************************
41 ** **
42 ** This file is automatically generated. **
43 ** **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
46 ** **
47 ** Do not change this file, changes should be done in the derived **
48 ** class CoreGLWindow
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGCOREGLWINDOWBASE_H_
55 #define _OSGCOREGLWINDOWBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGWindowCoreGLDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGWindow.h" // Parent
68 #include "OSGCoreGLWindowDataFields.h" // Context type
70 #include "OSGCoreGLWindowFields.h"
72 OSG_BEGIN_NAMESPACE
74 class CoreGLWindow;
76 //! \brief CoreGLWindow Base Class.
78 class OSG_WINDOWCOREGL_DLLMAPPING CoreGLWindowBase : public Window
80 public:
82 typedef Window Inherited;
83 typedef Window ParentContainer;
85 typedef Inherited::TypeObject TypeObject;
86 typedef TypeObject::InitPhase InitPhase;
88 OSG_GEN_INTERNALPTR(CoreGLWindow);
90 /*========================== PUBLIC =================================*/
92 public:
94 enum
96 ContextFieldId = Inherited::NextFieldId,
97 NextFieldId = ContextFieldId + 1
100 static const OSG::BitVector ContextFieldMask =
101 (TypeTraits<BitVector>::One << ContextFieldId);
102 static const OSG::BitVector NextFieldMask =
103 (TypeTraits<BitVector>::One << NextFieldId);
105 typedef SFCGLContextObj SFContextType;
107 /*---------------------------------------------------------------------*/
108 /*! \name Class Get */
109 /*! \{ */
111 static FieldContainerType &getClassType (void);
112 static UInt32 getClassTypeId (void);
113 static UInt16 getClassGroupId(void);
115 /*! \} */
116 /*---------------------------------------------------------------------*/
117 /*! \name FieldContainer Get */
118 /*! \{ */
120 virtual FieldContainerType &getType (void);
121 virtual const FieldContainerType &getType (void) const;
123 virtual UInt32 getContainerSize(void) const;
125 /*! \} */
126 /*---------------------------------------------------------------------*/
127 /*! \name Field Get */
128 /*! \{ */
131 SFCGLContextObj *editSFContext (void);
132 const SFCGLContextObj *getSFContext (void) const;
135 CGLContextObj &editContext (void);
136 const CGLContextObj &getContext (void) const;
138 /*! \} */
139 /*---------------------------------------------------------------------*/
140 /*! \name Field Set */
141 /*! \{ */
143 void setContext (const CGLContextObj &value);
145 /*! \} */
146 /*---------------------------------------------------------------------*/
147 /*! \name Ptr MField Set */
148 /*! \{ */
150 /*! \} */
151 /*---------------------------------------------------------------------*/
152 /*! \name Binary Access */
153 /*! \{ */
155 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
156 virtual void copyToBin (BinaryDataHandler &pMem,
157 ConstFieldMaskArg whichField);
158 virtual void copyFromBin(BinaryDataHandler &pMem,
159 ConstFieldMaskArg whichField);
162 /*! \} */
163 /*---------------------------------------------------------------------*/
164 /*! \name Construction */
165 /*! \{ */
167 static CoreGLWindowTransitPtr create (void);
168 static CoreGLWindow *createEmpty (void);
170 static CoreGLWindowTransitPtr createLocal (
171 BitVector bFlags = FCLocal::All);
173 static CoreGLWindow *createEmptyLocal(
174 BitVector bFlags = FCLocal::All);
176 static CoreGLWindowTransitPtr createDependent (BitVector bFlags);
178 /*! \} */
179 /*---------------------------------------------------------------------*/
180 /*! \name Copy */
181 /*! \{ */
183 virtual FieldContainerTransitPtr shallowCopy (void) const;
184 virtual FieldContainerTransitPtr shallowCopyLocal(
185 BitVector bFlags = FCLocal::All) const;
186 virtual FieldContainerTransitPtr shallowCopyDependent(
187 BitVector bFlags) const;
189 /*! \} */
190 /*========================= PROTECTED ===============================*/
192 protected:
194 static TypeObject _type;
196 static void classDescInserter(TypeObject &oType);
197 static const Char8 *getClassname (void );
199 /*---------------------------------------------------------------------*/
200 /*! \name Fields */
201 /*! \{ */
203 SFCGLContextObj _sfContext;
205 /*! \} */
206 /*---------------------------------------------------------------------*/
207 /*! \name Constructors */
208 /*! \{ */
210 CoreGLWindowBase(void);
211 CoreGLWindowBase(const CoreGLWindowBase &source);
213 /*! \} */
214 /*---------------------------------------------------------------------*/
215 /*! \name Destructors */
216 /*! \{ */
218 virtual ~CoreGLWindowBase(void);
220 /*! \} */
221 /*---------------------------------------------------------------------*/
222 /*! \name onCreate */
223 /*! \{ */
226 /*! \} */
227 /*---------------------------------------------------------------------*/
228 /*! \name Generic Field Access */
229 /*! \{ */
231 GetFieldHandlePtr getHandleContext (void) const;
232 EditFieldHandlePtr editHandleContext (void);
234 /*! \} */
235 /*---------------------------------------------------------------------*/
236 /*! \name Sync */
237 /*! \{ */
239 #ifdef OSG_MT_CPTR_ASPECT
240 virtual void execSyncV( FieldContainer &oFrom,
241 ConstFieldMaskArg whichField,
242 AspectOffsetStore &oOffsets,
243 ConstFieldMaskArg syncMode ,
244 const UInt32 uiSyncInfo);
246 void execSync ( CoreGLWindowBase *pFrom,
247 ConstFieldMaskArg whichField,
248 AspectOffsetStore &oOffsets,
249 ConstFieldMaskArg syncMode ,
250 const UInt32 uiSyncInfo);
251 #endif
253 /*! \} */
254 /*---------------------------------------------------------------------*/
255 /*! \name Edit */
256 /*! \{ */
258 /*! \} */
259 /*---------------------------------------------------------------------*/
260 /*! \name Aspect Create */
261 /*! \{ */
263 #ifdef OSG_MT_CPTR_ASPECT
264 virtual FieldContainer *createAspectCopy(
265 const FieldContainer *pRefAspect) const;
266 #endif
268 /*! \} */
269 /*---------------------------------------------------------------------*/
270 /*! \name Edit */
271 /*! \{ */
272 /*! \} */
273 /*---------------------------------------------------------------------*/
274 /*! \name Sync */
275 /*! \{ */
277 virtual void resolveLinks(void);
279 /*! \} */
280 /*========================== PRIVATE ================================*/
282 private:
283 /*---------------------------------------------------------------------*/
285 // prohibit default functions (move to 'public' if you need one)
286 void operator =(const CoreGLWindowBase &source);
289 typedef CoreGLWindowBase *CoreGLWindowBaseP;
291 OSG_END_NAMESPACE
293 #endif /* _OSGCOREGLWINDOWBASE_H_ */