1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
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 _OSGXWINDOWBASE_H_
55 #define _OSGXWINDOWBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGWindowXDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGWindow.h" // Parent
68 #include "OSGXWindowDataFields.h" // Display type
69 #include "OSGSysFields.h" // FbConfigId type
71 #include "OSGXWindowFields.h"
78 //! \brief XWindow Base Class.
80 class OSG_WINDOWX_DLLMAPPING XWindowBase
: public Window
84 typedef Window Inherited
;
85 typedef Window ParentContainer
;
87 typedef Inherited::TypeObject TypeObject
;
88 typedef TypeObject::InitPhase InitPhase
;
90 OSG_GEN_INTERNALPTR(XWindow
);
92 /*========================== PUBLIC =================================*/
98 DisplayFieldId
= Inherited::NextFieldId
,
99 WindowFieldId
= DisplayFieldId
+ 1,
100 ContextFieldId
= WindowFieldId
+ 1,
101 FbConfigIdFieldId
= ContextFieldId
+ 1,
102 NextFieldId
= FbConfigIdFieldId
+ 1
105 static const OSG::BitVector DisplayFieldMask
=
106 (TypeTraits
<BitVector
>::One
<< DisplayFieldId
);
107 static const OSG::BitVector WindowFieldMask
=
108 (TypeTraits
<BitVector
>::One
<< WindowFieldId
);
109 static const OSG::BitVector ContextFieldMask
=
110 (TypeTraits
<BitVector
>::One
<< ContextFieldId
);
111 static const OSG::BitVector FbConfigIdFieldMask
=
112 (TypeTraits
<BitVector
>::One
<< FbConfigIdFieldId
);
113 static const OSG::BitVector NextFieldMask
=
114 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
116 typedef SFDisplayP SFDisplayType
;
117 typedef SFX11Window SFWindowType
;
118 typedef SFGLXContext SFContextType
;
119 typedef SFInt32 SFFbConfigIdType
;
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 SFDisplayP
*editSFDisplay (void);
146 const SFDisplayP
*getSFDisplay (void) const;
148 SFX11Window
*editSFWindow (void);
149 const SFX11Window
*getSFWindow (void) const;
151 SFGLXContext
*editSFContext (void);
152 const SFGLXContext
*getSFContext (void) const;
154 SFInt32
*editSFFbConfigId (void);
155 const SFInt32
*getSFFbConfigId (void) const;
158 DisplayP
&editDisplay (void);
159 const DisplayP
&getDisplay (void) const;
161 X11Window
&editWindow (void);
162 const X11Window
&getWindow (void) const;
164 GLXContext
&editContext (void);
165 const GLXContext
&getContext (void) const;
167 Int32
&editFbConfigId (void);
168 Int32
getFbConfigId (void) const;
171 /*---------------------------------------------------------------------*/
172 /*! \name Field Set */
175 void setDisplay (const DisplayP
&value
);
176 void setWindow (const X11Window
&value
);
177 void setContext (const GLXContext
&value
);
178 void setFbConfigId (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 XWindowTransitPtr
create (void);
203 static XWindow
*createEmpty (void);
205 static XWindowTransitPtr
createLocal (
206 BitVector bFlags
= FCLocal::All
);
208 static XWindow
*createEmptyLocal(
209 BitVector bFlags
= FCLocal::All
);
211 static XWindowTransitPtr
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 /*---------------------------------------------------------------------*/
238 SFDisplayP _sfDisplay
;
239 SFX11Window _sfWindow
;
240 SFGLXContext _sfContext
;
241 SFInt32 _sfFbConfigId
;
244 /*---------------------------------------------------------------------*/
245 /*! \name Constructors */
249 XWindowBase(const XWindowBase
&source
);
252 /*---------------------------------------------------------------------*/
253 /*! \name Destructors */
256 virtual ~XWindowBase(void);
259 /*---------------------------------------------------------------------*/
260 /*! \name onCreate */
265 /*---------------------------------------------------------------------*/
266 /*! \name Generic Field Access */
269 GetFieldHandlePtr
getHandleDisplay (void) const;
270 EditFieldHandlePtr
editHandleDisplay (void);
271 GetFieldHandlePtr
getHandleWindow (void) const;
272 EditFieldHandlePtr
editHandleWindow (void);
273 GetFieldHandlePtr
getHandleContext (void) const;
274 EditFieldHandlePtr
editHandleContext (void);
275 GetFieldHandlePtr
getHandleFbConfigId (void) const;
276 EditFieldHandlePtr
editHandleFbConfigId (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 ( XWindowBase
*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 XWindowBase
&source
);
333 typedef XWindowBase
*XWindowBaseP
;
337 #endif /* _OSGXWINDOWBASE_H_ */