1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2006 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 /*****************************************************************************\
40 *****************************************************************************
42 ** This file is automatically generated. **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
47 ** Do not change this file, changes should be done in the derived **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGWIN32WINDOWBASE_H_
55 #define _OSGWIN32WINDOWBASE_H_
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"
78 //! \brief WIN32Window Base Class.
80 class OSG_WINDOWWIN32_DLLMAPPING WIN32WindowBase
: public Window
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 =================================*/
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 */
125 static FieldContainerType
&getClassType (void);
126 static UInt32
getClassTypeId (void);
127 static UInt16
getClassGroupId(void);
130 /*---------------------------------------------------------------------*/
131 /*! \name FieldContainer Get */
134 virtual FieldContainerType
&getType (void);
135 virtual const FieldContainerType
&getType (void) const;
137 virtual UInt32
getContainerSize(void) const;
140 /*---------------------------------------------------------------------*/
141 /*! \name Field Get */
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;
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;
171 /*---------------------------------------------------------------------*/
172 /*! \name Field Set */
175 void setHwnd (const HWND
&value
);
176 void setHdc (const HDC
&value
);
177 void setHglrc (const HGLRC
&value
);
178 void setDummy0 (const Int32 value
);
181 /*---------------------------------------------------------------------*/
182 /*! \name Ptr MField Set */
186 /*---------------------------------------------------------------------*/
187 /*! \name Binary Access */
190 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
191 virtual void copyToBin (BinaryDataHandler
&pMem
,
192 ConstFieldMaskArg whichField
);
193 virtual void copyFromBin(BinaryDataHandler
&pMem
,
194 ConstFieldMaskArg whichField
);
198 /*---------------------------------------------------------------------*/
199 /*! \name Construction */
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
);
214 /*---------------------------------------------------------------------*/
218 virtual FieldContainerTransitPtr
shallowCopy (void) const;
219 virtual FieldContainerTransitPtr
shallowCopyLocal(
220 BitVector bFlags
= FCLocal::All
) const;
221 virtual FieldContainerTransitPtr
shallowCopyDependent(
222 BitVector bFlags
) const;
225 /*========================= PROTECTED ===============================*/
229 static TypeObject _type
;
231 static void classDescInserter(TypeObject
&oType
);
232 static const Char8
*getClassname (void );
234 /*---------------------------------------------------------------------*/
244 /*---------------------------------------------------------------------*/
245 /*! \name Constructors */
248 WIN32WindowBase(void);
249 WIN32WindowBase(const WIN32WindowBase
&source
);
252 /*---------------------------------------------------------------------*/
253 /*! \name Destructors */
256 virtual ~WIN32WindowBase(void);
259 /*---------------------------------------------------------------------*/
260 /*! \name onCreate */
265 /*---------------------------------------------------------------------*/
266 /*! \name Generic Field Access */
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);
279 /*---------------------------------------------------------------------*/
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
);
298 /*---------------------------------------------------------------------*/
303 /*---------------------------------------------------------------------*/
304 /*! \name Aspect Create */
307 #ifdef OSG_MT_CPTR_ASPECT
308 virtual FieldContainer
*createAspectCopy(
309 const FieldContainer
*pRefAspect
) const;
313 /*---------------------------------------------------------------------*/
317 /*---------------------------------------------------------------------*/
321 virtual void resolveLinks(void);
324 /*========================== PRIVATE ================================*/
327 /*---------------------------------------------------------------------*/
329 // prohibit default functions (move to 'public' if you need one)
330 void operator =(const WIN32WindowBase
&source
);
333 typedef WIN32WindowBase
*WIN32WindowBaseP
;
337 #endif /* _OSGWIN32WINDOWBASE_H_ */