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 **
48 ** class PerfMonitorForeground
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGPERFMONITORFOREGROUNDBASE_H_
55 #define _OSGPERFMONITORFOREGROUNDBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGUtilDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGForeground.h" // Parent
68 #include "OSGSysFields.h" // Mode type
69 #include "OSGBaseFields.h" // Color type
70 #include "OSGVecFields.h" // BorderOffset type
72 #include "OSGPerfMonitorForegroundFields.h"
77 class PerfMonitorForeground
;
79 //! \brief PerfMonitorForeground Base Class.
81 class OSG_UTIL_DLLMAPPING PerfMonitorForegroundBase
: public Foreground
85 typedef Foreground Inherited
;
86 typedef Foreground ParentContainer
;
88 typedef Inherited::TypeObject TypeObject
;
89 typedef TypeObject::InitPhase InitPhase
;
91 OSG_GEN_INTERNALPTR(PerfMonitorForeground
);
93 /*========================== PUBLIC =================================*/
99 ModeFieldId
= Inherited::NextFieldId
,
100 MaxSizeFieldId
= ModeFieldId
+ 1,
101 ColorFieldId
= MaxSizeFieldId
+ 1,
102 BgColorFieldId
= ColorFieldId
+ 1,
103 FamilyFieldId
= BgColorFieldId
+ 1,
104 BorderColorFieldId
= FamilyFieldId
+ 1,
105 BorderOffsetFieldId
= BorderColorFieldId
+ 1,
106 TextMarginFieldId
= BorderOffsetFieldId
+ 1,
107 NextFieldId
= TextMarginFieldId
+ 1
110 static const OSG::BitVector ModeFieldMask
=
111 (TypeTraits
<BitVector
>::One
<< ModeFieldId
);
112 static const OSG::BitVector MaxSizeFieldMask
=
113 (TypeTraits
<BitVector
>::One
<< MaxSizeFieldId
);
114 static const OSG::BitVector ColorFieldMask
=
115 (TypeTraits
<BitVector
>::One
<< ColorFieldId
);
116 static const OSG::BitVector BgColorFieldMask
=
117 (TypeTraits
<BitVector
>::One
<< BgColorFieldId
);
118 static const OSG::BitVector FamilyFieldMask
=
119 (TypeTraits
<BitVector
>::One
<< FamilyFieldId
);
120 static const OSG::BitVector BorderColorFieldMask
=
121 (TypeTraits
<BitVector
>::One
<< BorderColorFieldId
);
122 static const OSG::BitVector BorderOffsetFieldMask
=
123 (TypeTraits
<BitVector
>::One
<< BorderOffsetFieldId
);
124 static const OSG::BitVector TextMarginFieldMask
=
125 (TypeTraits
<BitVector
>::One
<< TextMarginFieldId
);
126 static const OSG::BitVector NextFieldMask
=
127 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
129 typedef SFUInt32 SFModeType
;
130 typedef SFReal32 SFMaxSizeType
;
131 typedef SFColor4f SFColorType
;
132 typedef SFColor4f SFBgColorType
;
133 typedef SFString SFFamilyType
;
134 typedef SFColor4f SFBorderColorType
;
135 typedef SFVec2f SFBorderOffsetType
;
136 typedef SFVec2f SFTextMarginType
;
138 /*---------------------------------------------------------------------*/
139 /*! \name Class Get */
142 static FieldContainerType
&getClassType (void);
143 static UInt32
getClassTypeId (void);
144 static UInt16
getClassGroupId(void);
147 /*---------------------------------------------------------------------*/
148 /*! \name FieldContainer Get */
151 virtual FieldContainerType
&getType (void);
152 virtual const FieldContainerType
&getType (void) const;
154 virtual UInt32
getContainerSize(void) const;
157 /*---------------------------------------------------------------------*/
158 /*! \name Field Get */
162 SFUInt32
*editSFMode (void);
163 const SFUInt32
*getSFMode (void) const;
165 SFReal32
*editSFMaxSize (void);
166 const SFReal32
*getSFMaxSize (void) const;
168 SFColor4f
*editSFColor (void);
169 const SFColor4f
*getSFColor (void) const;
171 SFColor4f
*editSFBgColor (void);
172 const SFColor4f
*getSFBgColor (void) const;
174 SFString
*editSFFamily (void);
175 const SFString
*getSFFamily (void) const;
177 SFColor4f
*editSFBorderColor (void);
178 const SFColor4f
*getSFBorderColor (void) const;
180 SFVec2f
*editSFBorderOffset (void);
181 const SFVec2f
*getSFBorderOffset (void) const;
183 SFVec2f
*editSFTextMargin (void);
184 const SFVec2f
*getSFTextMargin (void) const;
187 UInt32
&editMode (void);
188 UInt32
getMode (void) const;
190 Real32
&editMaxSize (void);
191 Real32
getMaxSize (void) const;
193 Color4f
&editColor (void);
194 const Color4f
&getColor (void) const;
196 Color4f
&editBgColor (void);
197 const Color4f
&getBgColor (void) const;
199 std::string
&editFamily (void);
200 const std::string
&getFamily (void) const;
202 Color4f
&editBorderColor (void);
203 const Color4f
&getBorderColor (void) const;
205 Vec2f
&editBorderOffset (void);
206 const Vec2f
&getBorderOffset (void) const;
208 Vec2f
&editTextMargin (void);
209 const Vec2f
&getTextMargin (void) const;
212 /*---------------------------------------------------------------------*/
213 /*! \name Field Set */
216 void setMode (const UInt32 value
);
217 void setMaxSize (const Real32 value
);
218 void setColor (const Color4f
&value
);
219 void setBgColor (const Color4f
&value
);
220 void setFamily (const std::string
&value
);
221 void setBorderColor (const Color4f
&value
);
222 void setBorderOffset (const Vec2f
&value
);
223 void setTextMargin (const Vec2f
&value
);
226 /*---------------------------------------------------------------------*/
227 /*! \name Ptr MField Set */
231 /*---------------------------------------------------------------------*/
232 /*! \name Binary Access */
235 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
236 virtual void copyToBin (BinaryDataHandler
&pMem
,
237 ConstFieldMaskArg whichField
);
238 virtual void copyFromBin(BinaryDataHandler
&pMem
,
239 ConstFieldMaskArg whichField
);
243 /*---------------------------------------------------------------------*/
244 /*! \name Construction */
247 static PerfMonitorForegroundTransitPtr
create (void);
248 static PerfMonitorForeground
*createEmpty (void);
250 static PerfMonitorForegroundTransitPtr
createLocal (
251 BitVector bFlags
= FCLocal::All
);
253 static PerfMonitorForeground
*createEmptyLocal(
254 BitVector bFlags
= FCLocal::All
);
256 static PerfMonitorForegroundTransitPtr
createDependent (BitVector bFlags
);
259 /*---------------------------------------------------------------------*/
263 virtual FieldContainerTransitPtr
shallowCopy (void) const;
264 virtual FieldContainerTransitPtr
shallowCopyLocal(
265 BitVector bFlags
= FCLocal::All
) const;
266 virtual FieldContainerTransitPtr
shallowCopyDependent(
267 BitVector bFlags
) const;
270 /*========================= PROTECTED ===============================*/
274 static TypeObject _type
;
276 static void classDescInserter(TypeObject
&oType
);
277 static const Char8
*getClassname (void );
279 /*---------------------------------------------------------------------*/
286 SFColor4f _sfBgColor
;
288 SFColor4f _sfBorderColor
;
289 SFVec2f _sfBorderOffset
;
290 SFVec2f _sfTextMargin
;
293 /*---------------------------------------------------------------------*/
294 /*! \name Constructors */
297 PerfMonitorForegroundBase(void);
298 PerfMonitorForegroundBase(const PerfMonitorForegroundBase
&source
);
301 /*---------------------------------------------------------------------*/
302 /*! \name Destructors */
305 virtual ~PerfMonitorForegroundBase(void);
308 /*---------------------------------------------------------------------*/
309 /*! \name onCreate */
314 /*---------------------------------------------------------------------*/
315 /*! \name Generic Field Access */
318 GetFieldHandlePtr
getHandleMode (void) const;
319 EditFieldHandlePtr
editHandleMode (void);
320 GetFieldHandlePtr
getHandleMaxSize (void) const;
321 EditFieldHandlePtr
editHandleMaxSize (void);
322 GetFieldHandlePtr
getHandleColor (void) const;
323 EditFieldHandlePtr
editHandleColor (void);
324 GetFieldHandlePtr
getHandleBgColor (void) const;
325 EditFieldHandlePtr
editHandleBgColor (void);
326 GetFieldHandlePtr
getHandleFamily (void) const;
327 EditFieldHandlePtr
editHandleFamily (void);
328 GetFieldHandlePtr
getHandleBorderColor (void) const;
329 EditFieldHandlePtr
editHandleBorderColor (void);
330 GetFieldHandlePtr
getHandleBorderOffset (void) const;
331 EditFieldHandlePtr
editHandleBorderOffset (void);
332 GetFieldHandlePtr
getHandleTextMargin (void) const;
333 EditFieldHandlePtr
editHandleTextMargin (void);
336 /*---------------------------------------------------------------------*/
340 #ifdef OSG_MT_CPTR_ASPECT
341 virtual void execSyncV( FieldContainer
&oFrom
,
342 ConstFieldMaskArg whichField
,
343 AspectOffsetStore
&oOffsets
,
344 ConstFieldMaskArg syncMode
,
345 const UInt32 uiSyncInfo
);
347 void execSync ( PerfMonitorForegroundBase
*pFrom
,
348 ConstFieldMaskArg whichField
,
349 AspectOffsetStore
&oOffsets
,
350 ConstFieldMaskArg syncMode
,
351 const UInt32 uiSyncInfo
);
355 /*---------------------------------------------------------------------*/
360 /*---------------------------------------------------------------------*/
361 /*! \name Aspect Create */
364 #ifdef OSG_MT_CPTR_ASPECT
365 virtual FieldContainer
*createAspectCopy(
366 const FieldContainer
*pRefAspect
) const;
370 /*---------------------------------------------------------------------*/
374 /*---------------------------------------------------------------------*/
378 virtual void resolveLinks(void);
381 /*========================== PRIVATE ================================*/
384 /*---------------------------------------------------------------------*/
386 // prohibit default functions (move to 'public' if you need one)
387 void operator =(const PerfMonitorForegroundBase
&source
);
390 typedef PerfMonitorForegroundBase
*PerfMonitorForegroundBaseP
;
394 #endif /* _OSGPERFMONITORFOREGROUNDBASE_H_ */