changed: auto add updateData callback to stages so that stagedata can be updated...
[opensg.git] / Source / WindowSystem / WIN32 / OSGWIN32WindowBase.h
blob67318b2dedff5045d4d1a983cb01eb5d610ca976
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 WIN32Window
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGWIN32WINDOWBASE_H_
55 #define _OSGWIN32WINDOWBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGWindowWIN32Def.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGWindow.h" // Parent
68 #include "OSGWIN32WindowDataFields.h" // Hwnd type
69 #include "OSGSysFields.h" // Dummy0 type
71 #include "OSGWIN32WindowFields.h"
73 OSG_BEGIN_NAMESPACE
76 class WIN32Window;
78 //! \brief WIN32Window Base Class.
80 class OSG_WINDOWWIN32_DLLMAPPING WIN32WindowBase : public Window
82 public:
84 typedef Window Inherited;
85 typedef Window ParentContainer;
87 typedef Inherited::TypeObject TypeObject;
88 typedef TypeObject::InitPhase InitPhase;
90 OSG_GEN_INTERNALPTR(WIN32Window);
92 /*========================== PUBLIC =================================*/
94 public:
96 enum
98 HwndFieldId = Inherited::NextFieldId,
99 HdcFieldId = HwndFieldId + 1,
100 HglrcFieldId = HdcFieldId + 1,
101 Dummy0FieldId = HglrcFieldId + 1,
102 NextFieldId = Dummy0FieldId + 1
105 static const OSG::BitVector HwndFieldMask =
106 (TypeTraits<BitVector>::One << HwndFieldId);
107 static const OSG::BitVector HdcFieldMask =
108 (TypeTraits<BitVector>::One << HdcFieldId);
109 static const OSG::BitVector HglrcFieldMask =
110 (TypeTraits<BitVector>::One << HglrcFieldId);
111 static const OSG::BitVector Dummy0FieldMask =
112 (TypeTraits<BitVector>::One << Dummy0FieldId);
113 static const OSG::BitVector NextFieldMask =
114 (TypeTraits<BitVector>::One << NextFieldId);
116 typedef SFHWND SFHwndType;
117 typedef SFHDC SFHdcType;
118 typedef SFHGLRC SFHglrcType;
119 typedef SFInt32 SFDummy0Type;
121 /*---------------------------------------------------------------------*/
122 /*! \name Class Get */
123 /*! \{ */
125 static FieldContainerType &getClassType (void);
126 static UInt32 getClassTypeId (void);
127 static UInt16 getClassGroupId(void);
129 /*! \} */
130 /*---------------------------------------------------------------------*/
131 /*! \name FieldContainer Get */
132 /*! \{ */
134 virtual FieldContainerType &getType (void);
135 virtual const FieldContainerType &getType (void) const;
137 virtual UInt32 getContainerSize(void) const;
139 /*! \} */
140 /*---------------------------------------------------------------------*/
141 /*! \name Field Get */
142 /*! \{ */
145 SFHWND *editSFHwnd (void);
146 const SFHWND *getSFHwnd (void) const;
148 SFHDC *editSFHdc (void);
149 const SFHDC *getSFHdc (void) const;
151 SFHGLRC *editSFHglrc (void);
152 const SFHGLRC *getSFHglrc (void) const;
154 SFInt32 *editSFDummy0 (void);
155 const SFInt32 *getSFDummy0 (void) const;
158 HWND &editHwnd (void);
159 const HWND &getHwnd (void) const;
161 HDC &editHdc (void);
162 const HDC &getHdc (void) const;
164 HGLRC &editHglrc (void);
165 const HGLRC &getHglrc (void) const;
167 Int32 &editDummy0 (void);
168 Int32 getDummy0 (void) const;
170 /*! \} */
171 /*---------------------------------------------------------------------*/
172 /*! \name Field Set */
173 /*! \{ */
175 void setHwnd (const HWND &value);
176 void setHdc (const HDC &value);
177 void setHglrc (const HGLRC &value);
178 void setDummy0 (const Int32 value);
180 /*! \} */
181 /*---------------------------------------------------------------------*/
182 /*! \name Ptr MField Set */
183 /*! \{ */
185 /*! \} */
186 /*---------------------------------------------------------------------*/
187 /*! \name Binary Access */
188 /*! \{ */
190 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
191 virtual void copyToBin (BinaryDataHandler &pMem,
192 ConstFieldMaskArg whichField);
193 virtual void copyFromBin(BinaryDataHandler &pMem,
194 ConstFieldMaskArg whichField);
197 /*! \} */
198 /*---------------------------------------------------------------------*/
199 /*! \name Construction */
200 /*! \{ */
202 static WIN32WindowTransitPtr create (void);
203 static WIN32Window *createEmpty (void);
205 static WIN32WindowTransitPtr createLocal (
206 BitVector bFlags = FCLocal::All);
208 static WIN32Window *createEmptyLocal(
209 BitVector bFlags = FCLocal::All);
211 static WIN32WindowTransitPtr createDependent (BitVector bFlags);
213 /*! \} */
214 /*---------------------------------------------------------------------*/
215 /*! \name Copy */
216 /*! \{ */
218 virtual FieldContainerTransitPtr shallowCopy (void) const;
219 virtual FieldContainerTransitPtr shallowCopyLocal(
220 BitVector bFlags = FCLocal::All) const;
221 virtual FieldContainerTransitPtr shallowCopyDependent(
222 BitVector bFlags) const;
224 /*! \} */
225 /*========================= PROTECTED ===============================*/
227 protected:
229 static TypeObject _type;
231 static void classDescInserter(TypeObject &oType);
232 static const Char8 *getClassname (void );
234 /*---------------------------------------------------------------------*/
235 /*! \name Fields */
236 /*! \{ */
238 SFHWND _sfHwnd;
239 SFHDC _sfHdc;
240 SFHGLRC _sfHglrc;
241 SFInt32 _sfDummy0;
243 /*! \} */
244 /*---------------------------------------------------------------------*/
245 /*! \name Constructors */
246 /*! \{ */
248 WIN32WindowBase(void);
249 WIN32WindowBase(const WIN32WindowBase &source);
251 /*! \} */
252 /*---------------------------------------------------------------------*/
253 /*! \name Destructors */
254 /*! \{ */
256 virtual ~WIN32WindowBase(void);
258 /*! \} */
259 /*---------------------------------------------------------------------*/
260 /*! \name onCreate */
261 /*! \{ */
264 /*! \} */
265 /*---------------------------------------------------------------------*/
266 /*! \name Generic Field Access */
267 /*! \{ */
269 GetFieldHandlePtr getHandleHwnd (void) const;
270 EditFieldHandlePtr editHandleHwnd (void);
271 GetFieldHandlePtr getHandleHdc (void) const;
272 EditFieldHandlePtr editHandleHdc (void);
273 GetFieldHandlePtr getHandleHglrc (void) const;
274 EditFieldHandlePtr editHandleHglrc (void);
275 GetFieldHandlePtr getHandleDummy0 (void) const;
276 EditFieldHandlePtr editHandleDummy0 (void);
278 /*! \} */
279 /*---------------------------------------------------------------------*/
280 /*! \name Sync */
281 /*! \{ */
283 #ifdef OSG_MT_CPTR_ASPECT
284 virtual void execSyncV( FieldContainer &oFrom,
285 ConstFieldMaskArg whichField,
286 AspectOffsetStore &oOffsets,
287 ConstFieldMaskArg syncMode ,
288 const UInt32 uiSyncInfo);
290 void execSync ( WIN32WindowBase *pFrom,
291 ConstFieldMaskArg whichField,
292 AspectOffsetStore &oOffsets,
293 ConstFieldMaskArg syncMode ,
294 const UInt32 uiSyncInfo);
295 #endif
297 /*! \} */
298 /*---------------------------------------------------------------------*/
299 /*! \name Edit */
300 /*! \{ */
302 /*! \} */
303 /*---------------------------------------------------------------------*/
304 /*! \name Aspect Create */
305 /*! \{ */
307 #ifdef OSG_MT_CPTR_ASPECT
308 virtual FieldContainer *createAspectCopy(
309 const FieldContainer *pRefAspect) const;
310 #endif
312 /*! \} */
313 /*---------------------------------------------------------------------*/
314 /*! \name Edit */
315 /*! \{ */
316 /*! \} */
317 /*---------------------------------------------------------------------*/
318 /*! \name Sync */
319 /*! \{ */
321 virtual void resolveLinks(void);
323 /*! \} */
324 /*========================== PRIVATE ================================*/
326 private:
327 /*---------------------------------------------------------------------*/
329 // prohibit default functions (move to 'public' if you need one)
330 void operator =(const WIN32WindowBase &source);
333 typedef WIN32WindowBase *WIN32WindowBaseP;
335 OSG_END_NAMESPACE
337 #endif /* _OSGWIN32WINDOWBASE_H_ */