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 \*****************************************************************************/
57 #pragma warning(disable: 4355) // turn off 'this' : used in base member initializer list warning
58 #pragma warning(disable: 4290) // disable exception specification warning
61 #include "OSGConfig.h"
65 #include "OSGFieldContainer.h" // Parent Class
66 #include "OSGCSMViewport.h" // Viewports Class
67 #include "OSGRenderOptions.h" // RenderOptions Class
69 #include "OSGCSMWindowBase.h"
70 #include "OSGCSMWindow.h"
72 #include <boost/bind.hpp>
76 /***************************************************************************\
78 \***************************************************************************/
80 /*! \class OSG::CSMWindow
84 /***************************************************************************\
85 * Field Documentation *
86 \***************************************************************************/
88 /*! \var FieldContainer * CSMWindowBase::_sfParent
92 /*! \var CSMViewport * CSMWindowBase::_mfViewports
96 /*! \var MouseData CSMWindowBase::_sfMouseData
100 /*! \var MTouchData CSMWindowBase::_sfMTouchData
104 /*! \var MTouchData CSMWindowBase::_sfMTouchDataWC
105 MTouchData in local window coordinates
108 /*! \var GestureData CSMWindowBase::_sfGestureData
112 /*! \var bool CSMWindowBase::_sfMouseAsMTouch
116 /*! \var Vec2f CSMWindowBase::_sfSize
120 /*! \var Vec2f CSMWindowBase::_sfPosition
124 /*! \var bool CSMWindowBase::_sfDecorEnabled
128 /*! \var Int32 CSMWindowBase::_sfRequestMajor
132 /*! \var Int32 CSMWindowBase::_sfRequestMinor
136 /*! \var bool CSMWindowBase::_sfEnableForwardCompatContext
140 /*! \var bool CSMWindowBase::_sfEnableDebugContext
144 /*! \var std::string CSMWindowBase::_mfIgnoreExtensions
148 /*! \var bool CSMWindowBase::_sfIgnoreAllExtensions
152 /*! \var UInt32 CSMWindowBase::_sfRequestSamples
156 /*! \var bool CSMWindowBase::_sfEnableFSAA
160 /*! \var UInt32 CSMWindowBase::_sfFsaaHint
164 /*! \var RenderOptions * CSMWindowBase::_sfRenderOptions
168 /*! \var UInt32 CSMWindowBase::_sfPartitionDrawMode
172 /*! \var bool CSMWindowBase::_sfRegisterMainLoop
176 /*! \var bool CSMWindowBase::_sfDumpContainer
180 /*! \var Int32 CSMWindowBase::_sfWindowState
185 /***************************************************************************\
186 * FieldType/FieldTrait Instantiation *
187 \***************************************************************************/
189 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
190 PointerType FieldTraits
<CSMWindow
*, nsOSG
>::_type(
192 "AttachmentContainerPtr",
193 CSMWindow::getClassType(),
197 OSG_FIELDTRAITS_GETTYPE_NS(CSMWindow
*, nsOSG
)
199 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
203 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
207 DataType
&FieldTraits
< CSMWindow
*, nsOSG
+ 1 >::getType(void)
209 return FieldTraits
<CSMWindow
*, nsOSG
>::getType();
213 OSG_EXPORT_PTR_SFIELD(ChildPointerSField
,
215 UnrecordedRefCountPolicy
,
219 OSG_EXPORT_PTR_MFIELD(ChildPointerMField
,
221 UnrecordedRefCountPolicy
,
225 /***************************************************************************\
226 * Field Description *
227 \***************************************************************************/
229 void CSMWindowBase::classDescInserter(TypeObject
&oType
)
231 FieldDescriptionBase
*pDesc
= NULL
;
234 pDesc
= new SFParentFieldContainerPtr::Description(
235 SFParentFieldContainerPtr::getClassType(),
238 ParentFieldId
, ParentFieldMask
,
240 (Field::SFDefaultFlags
| Field::FStdAccess
),
241 static_cast <FieldEditMethodSig
>(&CSMWindow::invalidEditField
),
242 static_cast <FieldGetMethodSig
>(&CSMWindow::invalidGetField
));
244 oType
.addInitialDesc(pDesc
);
246 pDesc
= new MFUnrecCSMViewportPtr::Description(
247 MFUnrecCSMViewportPtr::getClassType(),
250 ViewportsFieldId
, ViewportsFieldMask
,
252 (Field::MFDefaultFlags
| Field::FStdAccess
),
253 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandleViewports
),
254 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandleViewports
));
256 oType
.addInitialDesc(pDesc
);
258 pDesc
= new SFMouseData::Description(
259 SFMouseData::getClassType(),
262 MouseDataFieldId
, MouseDataFieldMask
,
264 (Field::SFDefaultFlags
| Field::FStdAccess
),
265 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandleMouseData
),
266 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandleMouseData
));
268 oType
.addInitialDesc(pDesc
);
270 pDesc
= new SFMTouchData::Description(
271 SFMTouchData::getClassType(),
274 MTouchDataFieldId
, MTouchDataFieldMask
,
276 (Field::SFDefaultFlags
| Field::FStdAccess
),
277 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandleMTouchData
),
278 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandleMTouchData
));
280 oType
.addInitialDesc(pDesc
);
282 pDesc
= new SFMTouchData::Description(
283 SFMTouchData::getClassType(),
285 "MTouchData in local window coordinates\n",
286 MTouchDataWCFieldId
, MTouchDataWCFieldMask
,
288 (Field::SFDefaultFlags
| Field::FStdAccess
),
289 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandleMTouchDataWC
),
290 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandleMTouchDataWC
));
292 oType
.addInitialDesc(pDesc
);
294 pDesc
= new SFGestureData::Description(
295 SFGestureData::getClassType(),
298 GestureDataFieldId
, GestureDataFieldMask
,
300 (Field::SFDefaultFlags
| Field::FStdAccess
),
301 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandleGestureData
),
302 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandleGestureData
));
304 oType
.addInitialDesc(pDesc
);
306 pDesc
= new SFBool::Description(
307 SFBool::getClassType(),
310 MouseAsMTouchFieldId
, MouseAsMTouchFieldMask
,
312 (Field::SFDefaultFlags
| Field::FStdAccess
),
313 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandleMouseAsMTouch
),
314 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandleMouseAsMTouch
));
316 oType
.addInitialDesc(pDesc
);
318 pDesc
= new SFVec2f::Description(
319 SFVec2f::getClassType(),
322 SizeFieldId
, SizeFieldMask
,
324 (Field::SFDefaultFlags
| Field::FStdAccess
),
325 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandleSize
),
326 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandleSize
));
328 oType
.addInitialDesc(pDesc
);
330 pDesc
= new SFVec2f::Description(
331 SFVec2f::getClassType(),
334 PositionFieldId
, PositionFieldMask
,
336 (Field::SFDefaultFlags
| Field::FStdAccess
),
337 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandlePosition
),
338 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandlePosition
));
340 oType
.addInitialDesc(pDesc
);
342 pDesc
= new SFBool::Description(
343 SFBool::getClassType(),
346 DecorEnabledFieldId
, DecorEnabledFieldMask
,
348 (Field::SFDefaultFlags
| Field::FStdAccess
),
349 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandleDecorEnabled
),
350 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandleDecorEnabled
));
352 oType
.addInitialDesc(pDesc
);
354 pDesc
= new SFInt32::Description(
355 SFInt32::getClassType(),
358 RequestMajorFieldId
, RequestMajorFieldMask
,
360 (Field::SFDefaultFlags
| Field::FStdAccess
),
361 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandleRequestMajor
),
362 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandleRequestMajor
));
364 oType
.addInitialDesc(pDesc
);
366 pDesc
= new SFInt32::Description(
367 SFInt32::getClassType(),
370 RequestMinorFieldId
, RequestMinorFieldMask
,
372 (Field::SFDefaultFlags
| Field::FStdAccess
),
373 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandleRequestMinor
),
374 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandleRequestMinor
));
376 oType
.addInitialDesc(pDesc
);
378 pDesc
= new SFBool::Description(
379 SFBool::getClassType(),
380 "enableForwardCompatContext",
382 EnableForwardCompatContextFieldId
, EnableForwardCompatContextFieldMask
,
384 (Field::SFDefaultFlags
| Field::FStdAccess
),
385 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandleEnableForwardCompatContext
),
386 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandleEnableForwardCompatContext
));
388 oType
.addInitialDesc(pDesc
);
390 pDesc
= new SFBool::Description(
391 SFBool::getClassType(),
392 "enableDebugContext",
394 EnableDebugContextFieldId
, EnableDebugContextFieldMask
,
396 (Field::SFDefaultFlags
| Field::FStdAccess
),
397 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandleEnableDebugContext
),
398 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandleEnableDebugContext
));
400 oType
.addInitialDesc(pDesc
);
402 pDesc
= new MFString::Description(
403 MFString::getClassType(),
406 IgnoreExtensionsFieldId
, IgnoreExtensionsFieldMask
,
408 (Field::MFDefaultFlags
| Field::FStdAccess
),
409 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandleIgnoreExtensions
),
410 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandleIgnoreExtensions
));
412 oType
.addInitialDesc(pDesc
);
414 pDesc
= new SFBool::Description(
415 SFBool::getClassType(),
416 "ignoreAllExtensions",
418 IgnoreAllExtensionsFieldId
, IgnoreAllExtensionsFieldMask
,
420 (Field::SFDefaultFlags
| Field::FStdAccess
),
421 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandleIgnoreAllExtensions
),
422 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandleIgnoreAllExtensions
));
424 oType
.addInitialDesc(pDesc
);
426 pDesc
= new SFUInt32::Description(
427 SFUInt32::getClassType(),
430 RequestSamplesFieldId
, RequestSamplesFieldMask
,
432 (Field::SFDefaultFlags
| Field::FStdAccess
),
433 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandleRequestSamples
),
434 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandleRequestSamples
));
436 oType
.addInitialDesc(pDesc
);
438 pDesc
= new SFBool::Description(
439 SFBool::getClassType(),
442 EnableFSAAFieldId
, EnableFSAAFieldMask
,
444 (Field::SFDefaultFlags
| Field::FStdAccess
),
445 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandleEnableFSAA
),
446 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandleEnableFSAA
));
448 oType
.addInitialDesc(pDesc
);
450 pDesc
= new SFUInt32::Description(
451 SFUInt32::getClassType(),
454 FsaaHintFieldId
, FsaaHintFieldMask
,
456 (Field::SFDefaultFlags
| Field::FStdAccess
),
457 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandleFsaaHint
),
458 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandleFsaaHint
));
460 oType
.addInitialDesc(pDesc
);
462 pDesc
= new SFUnrecRenderOptionsPtr::Description(
463 SFUnrecRenderOptionsPtr::getClassType(),
466 RenderOptionsFieldId
, RenderOptionsFieldMask
,
468 (Field::SFDefaultFlags
| Field::FStdAccess
),
469 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandleRenderOptions
),
470 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandleRenderOptions
));
472 oType
.addInitialDesc(pDesc
);
474 pDesc
= new SFUInt32::Description(
475 SFUInt32::getClassType(),
478 PartitionDrawModeFieldId
, PartitionDrawModeFieldMask
,
480 (Field::SFDefaultFlags
| Field::FStdAccess
),
481 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandlePartitionDrawMode
),
482 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandlePartitionDrawMode
));
484 oType
.addInitialDesc(pDesc
);
486 pDesc
= new SFBool::Description(
487 SFBool::getClassType(),
490 RegisterMainLoopFieldId
, RegisterMainLoopFieldMask
,
492 (Field::SFDefaultFlags
| Field::FStdAccess
),
493 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandleRegisterMainLoop
),
494 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandleRegisterMainLoop
));
496 oType
.addInitialDesc(pDesc
);
498 pDesc
= new SFBool::Description(
499 SFBool::getClassType(),
502 DumpContainerFieldId
, DumpContainerFieldMask
,
504 (Field::SFDefaultFlags
| Field::FStdAccess
),
505 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandleDumpContainer
),
506 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandleDumpContainer
));
508 oType
.addInitialDesc(pDesc
);
510 pDesc
= new SFInt32::Description(
511 SFInt32::getClassType(),
514 WindowStateFieldId
, WindowStateFieldMask
,
516 (Field::SFDefaultFlags
| Field::FStdAccess
),
517 static_cast<FieldEditMethodSig
>(&CSMWindow::editHandleWindowState
),
518 static_cast<FieldGetMethodSig
>(&CSMWindow::getHandleWindowState
));
520 oType
.addInitialDesc(pDesc
);
524 CSMWindowBase::TypeObject
CSMWindowBase::_type(
525 CSMWindowBase::getClassname(),
526 Inherited::getClassname(),
530 reinterpret_cast<InitContainerF
>(&CSMWindow::initMethod
),
531 reinterpret_cast<ExitContainerF
>(&CSMWindow::exitMethod
),
532 reinterpret_cast<InitalInsertDescFunc
>(
533 reinterpret_cast<void *>(&CSMWindow::classDescInserter
)),
536 "<?xml version=\"1.0\"?>\n"
539 " name=\"CSMWindow\"\n"
540 " parent=\"AttachmentContainer\"\n"
541 " library=\"ContribCSM\"\n"
542 " pointerfieldtypes=\"both\"\n"
543 " structure=\"abstract\"\n"
544 " systemcomponent=\"true\"\n"
545 " parentsystemcomponent=\"true\"\n"
546 " decoratable=\"false\"\n"
547 " useLocalIncludes=\"false\"\n"
548 " isNodeCore=\"false\"\n"
549 " isBundle=\"true\"\n"
550 " childFields=\"both\"\n"
554 " type=\"FieldContainer\"\n"
555 " cardinality=\"single\"\n"
556 " visibility=\"internal\"\n"
558 " category=\"parentpointer\"\n"
562 " name=\"viewports\"\n"
563 " type=\"CSMViewport\"\n"
564 " cardinality=\"multi\"\n"
565 " visibility=\"external\"\n"
566 " access=\"public\"\n"
567 " category=\"pointer\"\n"
571 " name=\"mouseData\"\n"
572 " type=\"MouseData\"\n"
573 " cardinality=\"single\"\n"
574 " visibility=\"internal\"\n"
575 " access=\"public\"\n"
579 " name=\"MTouchData\"\n"
580 " type=\"MTouchData\"\n"
581 " cardinality=\"single\"\n"
582 " visibility=\"internal\"\n"
583 " access=\"public\"\n"
587 " name=\"MTouchDataWC\"\n"
588 " type=\"MTouchData\"\n"
589 " cardinality=\"single\"\n"
590 " visibility=\"internal\"\n"
591 " access=\"public\"\n"
593 " MTouchData in local window coordinates\n"
596 " name=\"GestureData\"\n"
597 " type=\"GestureData\"\n"
598 " cardinality=\"single\"\n"
599 " visibility=\"internal\"\n"
600 " access=\"public\"\n"
604 " name=\"mouseAsMTouch\"\n"
606 " cardinality=\"single\"\n"
607 " visibility=\"internal\"\n"
608 " access=\"public\"\n"
609 " defaultValue=\"false\"\n"
615 " cardinality=\"single\"\n"
616 " visibility=\"internal\"\n"
617 " access=\"public\"\n"
618 " defaultValue=\"300, 300\"\n"
622 " name=\"position\"\n"
624 " cardinality=\"single\"\n"
625 " visibility=\"internal\"\n"
626 " access=\"public\"\n"
627 " defaultValue=\"100, 100\"\n"
631 " name=\"decorEnabled\"\n"
633 " cardinality=\"single\"\n"
634 " visibility=\"internal\"\n"
635 " access=\"public\"\n"
636 " defaultValue=\"true\"\n"
640 " name=\"requestMajor\"\n"
642 " cardinality=\"single\"\n"
643 " visibility=\"internal\"\n"
644 " access=\"public\"\n"
646 " defaultValue=\"-1\"\n"
650 " name=\"requestMinor\"\n"
652 " cardinality=\"single\"\n"
653 " visibility=\"internal\"\n"
654 " access=\"public\"\n"
656 " defaultValue=\"0\"\n"
660 " name=\"enableForwardCompatContext\"\n"
662 " cardinality=\"single\"\n"
663 " visibility=\"internal\"\n"
664 " access=\"public\"\n"
666 " defaultValue=\"false\"\n"
670 " name=\"enableDebugContext\"\n"
672 " cardinality=\"single\"\n"
673 " visibility=\"internal\"\n"
674 " access=\"public\"\n"
676 " defaultValue=\"false\"\n"
680 " name=\"ignoreExtensions\"\n"
681 " type=\"std::string\"\n"
682 " cardinality=\"multi\"\n"
683 " visibility=\"internal\"\n"
684 " access=\"public\"\n"
689 " name=\"ignoreAllExtensions\"\n"
691 " cardinality=\"single\"\n"
692 " visibility=\"internal\"\n"
693 " access=\"public\"\n"
695 " defaultValue=\"false\"\n"
699 " name=\"requestSamples\"\n"
701 " cardinality=\"single\"\n"
702 " visibility=\"internal\"\n"
703 " access=\"public\"\n"
705 " defaultValue=\"0\"\n"
710 " name=\"enableFSAA\"\n"
712 " cardinality=\"single\"\n"
713 " visibility=\"internal\"\n"
714 " access=\"public\"\n"
716 " defaultValue=\"false\"\n"
720 " name=\"fsaaHint\"\n"
722 " cardinality=\"single\"\n"
723 " visibility=\"internal\"\n"
724 " access=\"public\"\n"
726 " defaultValue=\"GL_FASTEST\"\n"
730 " name=\"renderOptions\"\n"
731 " type=\"RenderOptionsPtr\"\n"
732 " cardinality=\"single\"\n"
733 " visibility=\"internal\"\n"
734 " access=\"public\"\n"
735 " defaultValue=\"NULL\"\n"
739 " name=\"partitionDrawMode\"\n"
741 " cardinality=\"single\"\n"
742 " visibility=\"internal\"\n"
743 " access=\"public\"\n"
745 " defaultValue=\"Window::SequentialPartitionDraw\"\n"
749 " name=\"registerMainLoop\"\n"
751 " cardinality=\"single\"\n"
752 " visibility=\"internal\"\n"
753 " access=\"public\"\n"
755 " defaultValue=\"true\"\n"
759 " name=\"dumpContainer\"\n"
761 " cardinality=\"single\"\n"
762 " visibility=\"internal\"\n"
763 " access=\"public\"\n"
765 " defaultValue=\"false\"\n"
769 " name=\"windowState\"\n"
771 " cardinality=\"single\"\n"
772 " visibility=\"internal\"\n"
773 " access=\"public\"\n"
775 " defaultValue=\"0\"\n"
778 "</FieldContainer>\n",
782 /*------------------------------ get -----------------------------------*/
784 FieldContainerType
&CSMWindowBase::getType(void)
789 const FieldContainerType
&CSMWindowBase::getType(void) const
794 UInt32
CSMWindowBase::getContainerSize(void) const
796 return sizeof(CSMWindow
);
799 /*------------------------- decorator get ------------------------------*/
803 //! Get the CSMWindow::_mfViewports field.
804 const MFUnrecCSMViewportPtr
*CSMWindowBase::getMFViewports(void) const
806 return &_mfViewports
;
809 MFUnrecCSMViewportPtr
*CSMWindowBase::editMFViewports (void)
811 editMField(ViewportsFieldMask
, _mfViewports
);
813 return &_mfViewports
;
815 CSMViewport
* CSMWindowBase::getViewports(const UInt32 index
) const
817 return _mfViewports
[index
];
820 SFMouseData
*CSMWindowBase::editSFMouseData(void)
822 editSField(MouseDataFieldMask
);
824 return &_sfMouseData
;
827 const SFMouseData
*CSMWindowBase::getSFMouseData(void) const
829 return &_sfMouseData
;
833 SFMTouchData
*CSMWindowBase::editSFMTouchData(void)
835 editSField(MTouchDataFieldMask
);
837 return &_sfMTouchData
;
840 const SFMTouchData
*CSMWindowBase::getSFMTouchData(void) const
842 return &_sfMTouchData
;
846 SFMTouchData
*CSMWindowBase::editSFMTouchDataWC(void)
848 editSField(MTouchDataWCFieldMask
);
850 return &_sfMTouchDataWC
;
853 const SFMTouchData
*CSMWindowBase::getSFMTouchDataWC(void) const
855 return &_sfMTouchDataWC
;
859 SFGestureData
*CSMWindowBase::editSFGestureData(void)
861 editSField(GestureDataFieldMask
);
863 return &_sfGestureData
;
866 const SFGestureData
*CSMWindowBase::getSFGestureData(void) const
868 return &_sfGestureData
;
872 SFBool
*CSMWindowBase::editSFMouseAsMTouch(void)
874 editSField(MouseAsMTouchFieldMask
);
876 return &_sfMouseAsMTouch
;
879 const SFBool
*CSMWindowBase::getSFMouseAsMTouch(void) const
881 return &_sfMouseAsMTouch
;
885 SFVec2f
*CSMWindowBase::editSFSize(void)
887 editSField(SizeFieldMask
);
892 const SFVec2f
*CSMWindowBase::getSFSize(void) const
898 SFVec2f
*CSMWindowBase::editSFPosition(void)
900 editSField(PositionFieldMask
);
905 const SFVec2f
*CSMWindowBase::getSFPosition(void) const
911 SFBool
*CSMWindowBase::editSFDecorEnabled(void)
913 editSField(DecorEnabledFieldMask
);
915 return &_sfDecorEnabled
;
918 const SFBool
*CSMWindowBase::getSFDecorEnabled(void) const
920 return &_sfDecorEnabled
;
924 SFInt32
*CSMWindowBase::editSFRequestMajor(void)
926 editSField(RequestMajorFieldMask
);
928 return &_sfRequestMajor
;
931 const SFInt32
*CSMWindowBase::getSFRequestMajor(void) const
933 return &_sfRequestMajor
;
937 SFInt32
*CSMWindowBase::editSFRequestMinor(void)
939 editSField(RequestMinorFieldMask
);
941 return &_sfRequestMinor
;
944 const SFInt32
*CSMWindowBase::getSFRequestMinor(void) const
946 return &_sfRequestMinor
;
950 SFBool
*CSMWindowBase::editSFEnableForwardCompatContext(void)
952 editSField(EnableForwardCompatContextFieldMask
);
954 return &_sfEnableForwardCompatContext
;
957 const SFBool
*CSMWindowBase::getSFEnableForwardCompatContext(void) const
959 return &_sfEnableForwardCompatContext
;
963 SFBool
*CSMWindowBase::editSFEnableDebugContext(void)
965 editSField(EnableDebugContextFieldMask
);
967 return &_sfEnableDebugContext
;
970 const SFBool
*CSMWindowBase::getSFEnableDebugContext(void) const
972 return &_sfEnableDebugContext
;
976 MFString
*CSMWindowBase::editMFIgnoreExtensions(void)
978 editMField(IgnoreExtensionsFieldMask
, _mfIgnoreExtensions
);
980 return &_mfIgnoreExtensions
;
983 const MFString
*CSMWindowBase::getMFIgnoreExtensions(void) const
985 return &_mfIgnoreExtensions
;
989 SFBool
*CSMWindowBase::editSFIgnoreAllExtensions(void)
991 editSField(IgnoreAllExtensionsFieldMask
);
993 return &_sfIgnoreAllExtensions
;
996 const SFBool
*CSMWindowBase::getSFIgnoreAllExtensions(void) const
998 return &_sfIgnoreAllExtensions
;
1002 SFUInt32
*CSMWindowBase::editSFRequestSamples(void)
1004 editSField(RequestSamplesFieldMask
);
1006 return &_sfRequestSamples
;
1009 const SFUInt32
*CSMWindowBase::getSFRequestSamples(void) const
1011 return &_sfRequestSamples
;
1015 SFBool
*CSMWindowBase::editSFEnableFSAA(void)
1017 editSField(EnableFSAAFieldMask
);
1019 return &_sfEnableFSAA
;
1022 const SFBool
*CSMWindowBase::getSFEnableFSAA(void) const
1024 return &_sfEnableFSAA
;
1028 SFUInt32
*CSMWindowBase::editSFFsaaHint(void)
1030 editSField(FsaaHintFieldMask
);
1032 return &_sfFsaaHint
;
1035 const SFUInt32
*CSMWindowBase::getSFFsaaHint(void) const
1037 return &_sfFsaaHint
;
1041 //! Get the CSMWindow::_sfRenderOptions field.
1042 const SFUnrecRenderOptionsPtr
*CSMWindowBase::getSFRenderOptions(void) const
1044 return &_sfRenderOptions
;
1047 SFUnrecRenderOptionsPtr
*CSMWindowBase::editSFRenderOptions (void)
1049 editSField(RenderOptionsFieldMask
);
1051 return &_sfRenderOptions
;
1054 //! Get the value of the CSMWindow::_sfRenderOptions field.
1055 RenderOptions
* CSMWindowBase::getRenderOptions(void) const
1057 return _sfRenderOptions
.getValue();
1060 //! Set the value of the CSMWindow::_sfRenderOptions field.
1061 void CSMWindowBase::setRenderOptions(RenderOptions
* const value
)
1063 editSField(RenderOptionsFieldMask
);
1065 _sfRenderOptions
.setValue(value
);
1069 SFUInt32
*CSMWindowBase::editSFPartitionDrawMode(void)
1071 editSField(PartitionDrawModeFieldMask
);
1073 return &_sfPartitionDrawMode
;
1076 const SFUInt32
*CSMWindowBase::getSFPartitionDrawMode(void) const
1078 return &_sfPartitionDrawMode
;
1082 SFBool
*CSMWindowBase::editSFRegisterMainLoop(void)
1084 editSField(RegisterMainLoopFieldMask
);
1086 return &_sfRegisterMainLoop
;
1089 const SFBool
*CSMWindowBase::getSFRegisterMainLoop(void) const
1091 return &_sfRegisterMainLoop
;
1095 SFBool
*CSMWindowBase::editSFDumpContainer(void)
1097 editSField(DumpContainerFieldMask
);
1099 return &_sfDumpContainer
;
1102 const SFBool
*CSMWindowBase::getSFDumpContainer(void) const
1104 return &_sfDumpContainer
;
1108 SFInt32
*CSMWindowBase::editSFWindowState(void)
1110 editSField(WindowStateFieldMask
);
1112 return &_sfWindowState
;
1115 const SFInt32
*CSMWindowBase::getSFWindowState(void) const
1117 return &_sfWindowState
;
1123 void CSMWindowBase::pushToViewports(CSMViewport
* const value
)
1125 editMField(ViewportsFieldMask
, _mfViewports
);
1127 _mfViewports
.push_back(value
);
1130 void CSMWindowBase::assignViewports(const MFUnrecCSMViewportPtr
&value
)
1132 MFUnrecCSMViewportPtr::const_iterator elemIt
=
1134 MFUnrecCSMViewportPtr::const_iterator elemEnd
=
1137 static_cast<CSMWindow
*>(this)->clearViewports();
1139 while(elemIt
!= elemEnd
)
1141 this->pushToViewports(*elemIt
);
1147 void CSMWindowBase::removeFromViewports(UInt32 uiIndex
)
1149 if(uiIndex
< _mfViewports
.size())
1151 editMField(ViewportsFieldMask
, _mfViewports
);
1153 _mfViewports
.erase(uiIndex
);
1157 void CSMWindowBase::removeObjFromViewports(CSMViewport
* const value
)
1159 Int32 iElemIdx
= _mfViewports
.findIndex(value
);
1163 editMField(ViewportsFieldMask
, _mfViewports
);
1165 _mfViewports
.erase(iElemIdx
);
1168 void CSMWindowBase::clearViewports(void)
1170 editMField(ViewportsFieldMask
, _mfViewports
);
1173 _mfViewports
.clear();
1178 /*------------------------------ access -----------------------------------*/
1180 SizeT
CSMWindowBase::getBinSize(ConstFieldMaskArg whichField
)
1182 SizeT returnValue
= Inherited::getBinSize(whichField
);
1184 if(FieldBits::NoField
!= (ParentFieldMask
& whichField
))
1186 returnValue
+= _sfParent
.getBinSize();
1188 if(FieldBits::NoField
!= (ViewportsFieldMask
& whichField
))
1190 returnValue
+= _mfViewports
.getBinSize();
1192 if(FieldBits::NoField
!= (MouseDataFieldMask
& whichField
))
1194 returnValue
+= _sfMouseData
.getBinSize();
1196 if(FieldBits::NoField
!= (MTouchDataFieldMask
& whichField
))
1198 returnValue
+= _sfMTouchData
.getBinSize();
1200 if(FieldBits::NoField
!= (MTouchDataWCFieldMask
& whichField
))
1202 returnValue
+= _sfMTouchDataWC
.getBinSize();
1204 if(FieldBits::NoField
!= (GestureDataFieldMask
& whichField
))
1206 returnValue
+= _sfGestureData
.getBinSize();
1208 if(FieldBits::NoField
!= (MouseAsMTouchFieldMask
& whichField
))
1210 returnValue
+= _sfMouseAsMTouch
.getBinSize();
1212 if(FieldBits::NoField
!= (SizeFieldMask
& whichField
))
1214 returnValue
+= _sfSize
.getBinSize();
1216 if(FieldBits::NoField
!= (PositionFieldMask
& whichField
))
1218 returnValue
+= _sfPosition
.getBinSize();
1220 if(FieldBits::NoField
!= (DecorEnabledFieldMask
& whichField
))
1222 returnValue
+= _sfDecorEnabled
.getBinSize();
1224 if(FieldBits::NoField
!= (RequestMajorFieldMask
& whichField
))
1226 returnValue
+= _sfRequestMajor
.getBinSize();
1228 if(FieldBits::NoField
!= (RequestMinorFieldMask
& whichField
))
1230 returnValue
+= _sfRequestMinor
.getBinSize();
1232 if(FieldBits::NoField
!= (EnableForwardCompatContextFieldMask
& whichField
))
1234 returnValue
+= _sfEnableForwardCompatContext
.getBinSize();
1236 if(FieldBits::NoField
!= (EnableDebugContextFieldMask
& whichField
))
1238 returnValue
+= _sfEnableDebugContext
.getBinSize();
1240 if(FieldBits::NoField
!= (IgnoreExtensionsFieldMask
& whichField
))
1242 returnValue
+= _mfIgnoreExtensions
.getBinSize();
1244 if(FieldBits::NoField
!= (IgnoreAllExtensionsFieldMask
& whichField
))
1246 returnValue
+= _sfIgnoreAllExtensions
.getBinSize();
1248 if(FieldBits::NoField
!= (RequestSamplesFieldMask
& whichField
))
1250 returnValue
+= _sfRequestSamples
.getBinSize();
1252 if(FieldBits::NoField
!= (EnableFSAAFieldMask
& whichField
))
1254 returnValue
+= _sfEnableFSAA
.getBinSize();
1256 if(FieldBits::NoField
!= (FsaaHintFieldMask
& whichField
))
1258 returnValue
+= _sfFsaaHint
.getBinSize();
1260 if(FieldBits::NoField
!= (RenderOptionsFieldMask
& whichField
))
1262 returnValue
+= _sfRenderOptions
.getBinSize();
1264 if(FieldBits::NoField
!= (PartitionDrawModeFieldMask
& whichField
))
1266 returnValue
+= _sfPartitionDrawMode
.getBinSize();
1268 if(FieldBits::NoField
!= (RegisterMainLoopFieldMask
& whichField
))
1270 returnValue
+= _sfRegisterMainLoop
.getBinSize();
1272 if(FieldBits::NoField
!= (DumpContainerFieldMask
& whichField
))
1274 returnValue
+= _sfDumpContainer
.getBinSize();
1276 if(FieldBits::NoField
!= (WindowStateFieldMask
& whichField
))
1278 returnValue
+= _sfWindowState
.getBinSize();
1284 void CSMWindowBase::copyToBin(BinaryDataHandler
&pMem
,
1285 ConstFieldMaskArg whichField
)
1287 Inherited::copyToBin(pMem
, whichField
);
1289 if(FieldBits::NoField
!= (ParentFieldMask
& whichField
))
1291 _sfParent
.copyToBin(pMem
);
1293 if(FieldBits::NoField
!= (ViewportsFieldMask
& whichField
))
1295 _mfViewports
.copyToBin(pMem
);
1297 if(FieldBits::NoField
!= (MouseDataFieldMask
& whichField
))
1299 _sfMouseData
.copyToBin(pMem
);
1301 if(FieldBits::NoField
!= (MTouchDataFieldMask
& whichField
))
1303 _sfMTouchData
.copyToBin(pMem
);
1305 if(FieldBits::NoField
!= (MTouchDataWCFieldMask
& whichField
))
1307 _sfMTouchDataWC
.copyToBin(pMem
);
1309 if(FieldBits::NoField
!= (GestureDataFieldMask
& whichField
))
1311 _sfGestureData
.copyToBin(pMem
);
1313 if(FieldBits::NoField
!= (MouseAsMTouchFieldMask
& whichField
))
1315 _sfMouseAsMTouch
.copyToBin(pMem
);
1317 if(FieldBits::NoField
!= (SizeFieldMask
& whichField
))
1319 _sfSize
.copyToBin(pMem
);
1321 if(FieldBits::NoField
!= (PositionFieldMask
& whichField
))
1323 _sfPosition
.copyToBin(pMem
);
1325 if(FieldBits::NoField
!= (DecorEnabledFieldMask
& whichField
))
1327 _sfDecorEnabled
.copyToBin(pMem
);
1329 if(FieldBits::NoField
!= (RequestMajorFieldMask
& whichField
))
1331 _sfRequestMajor
.copyToBin(pMem
);
1333 if(FieldBits::NoField
!= (RequestMinorFieldMask
& whichField
))
1335 _sfRequestMinor
.copyToBin(pMem
);
1337 if(FieldBits::NoField
!= (EnableForwardCompatContextFieldMask
& whichField
))
1339 _sfEnableForwardCompatContext
.copyToBin(pMem
);
1341 if(FieldBits::NoField
!= (EnableDebugContextFieldMask
& whichField
))
1343 _sfEnableDebugContext
.copyToBin(pMem
);
1345 if(FieldBits::NoField
!= (IgnoreExtensionsFieldMask
& whichField
))
1347 _mfIgnoreExtensions
.copyToBin(pMem
);
1349 if(FieldBits::NoField
!= (IgnoreAllExtensionsFieldMask
& whichField
))
1351 _sfIgnoreAllExtensions
.copyToBin(pMem
);
1353 if(FieldBits::NoField
!= (RequestSamplesFieldMask
& whichField
))
1355 _sfRequestSamples
.copyToBin(pMem
);
1357 if(FieldBits::NoField
!= (EnableFSAAFieldMask
& whichField
))
1359 _sfEnableFSAA
.copyToBin(pMem
);
1361 if(FieldBits::NoField
!= (FsaaHintFieldMask
& whichField
))
1363 _sfFsaaHint
.copyToBin(pMem
);
1365 if(FieldBits::NoField
!= (RenderOptionsFieldMask
& whichField
))
1367 _sfRenderOptions
.copyToBin(pMem
);
1369 if(FieldBits::NoField
!= (PartitionDrawModeFieldMask
& whichField
))
1371 _sfPartitionDrawMode
.copyToBin(pMem
);
1373 if(FieldBits::NoField
!= (RegisterMainLoopFieldMask
& whichField
))
1375 _sfRegisterMainLoop
.copyToBin(pMem
);
1377 if(FieldBits::NoField
!= (DumpContainerFieldMask
& whichField
))
1379 _sfDumpContainer
.copyToBin(pMem
);
1381 if(FieldBits::NoField
!= (WindowStateFieldMask
& whichField
))
1383 _sfWindowState
.copyToBin(pMem
);
1387 void CSMWindowBase::copyFromBin(BinaryDataHandler
&pMem
,
1388 ConstFieldMaskArg whichField
)
1390 Inherited::copyFromBin(pMem
, whichField
);
1392 if(FieldBits::NoField
!= (ParentFieldMask
& whichField
))
1394 editSField(ParentFieldMask
);
1395 _sfParent
.copyFromBin(pMem
);
1397 if(FieldBits::NoField
!= (ViewportsFieldMask
& whichField
))
1399 editMField(ViewportsFieldMask
, _mfViewports
);
1400 _mfViewports
.copyFromBin(pMem
);
1402 if(FieldBits::NoField
!= (MouseDataFieldMask
& whichField
))
1404 editSField(MouseDataFieldMask
);
1405 _sfMouseData
.copyFromBin(pMem
);
1407 if(FieldBits::NoField
!= (MTouchDataFieldMask
& whichField
))
1409 editSField(MTouchDataFieldMask
);
1410 _sfMTouchData
.copyFromBin(pMem
);
1412 if(FieldBits::NoField
!= (MTouchDataWCFieldMask
& whichField
))
1414 editSField(MTouchDataWCFieldMask
);
1415 _sfMTouchDataWC
.copyFromBin(pMem
);
1417 if(FieldBits::NoField
!= (GestureDataFieldMask
& whichField
))
1419 editSField(GestureDataFieldMask
);
1420 _sfGestureData
.copyFromBin(pMem
);
1422 if(FieldBits::NoField
!= (MouseAsMTouchFieldMask
& whichField
))
1424 editSField(MouseAsMTouchFieldMask
);
1425 _sfMouseAsMTouch
.copyFromBin(pMem
);
1427 if(FieldBits::NoField
!= (SizeFieldMask
& whichField
))
1429 editSField(SizeFieldMask
);
1430 _sfSize
.copyFromBin(pMem
);
1432 if(FieldBits::NoField
!= (PositionFieldMask
& whichField
))
1434 editSField(PositionFieldMask
);
1435 _sfPosition
.copyFromBin(pMem
);
1437 if(FieldBits::NoField
!= (DecorEnabledFieldMask
& whichField
))
1439 editSField(DecorEnabledFieldMask
);
1440 _sfDecorEnabled
.copyFromBin(pMem
);
1442 if(FieldBits::NoField
!= (RequestMajorFieldMask
& whichField
))
1444 editSField(RequestMajorFieldMask
);
1445 _sfRequestMajor
.copyFromBin(pMem
);
1447 if(FieldBits::NoField
!= (RequestMinorFieldMask
& whichField
))
1449 editSField(RequestMinorFieldMask
);
1450 _sfRequestMinor
.copyFromBin(pMem
);
1452 if(FieldBits::NoField
!= (EnableForwardCompatContextFieldMask
& whichField
))
1454 editSField(EnableForwardCompatContextFieldMask
);
1455 _sfEnableForwardCompatContext
.copyFromBin(pMem
);
1457 if(FieldBits::NoField
!= (EnableDebugContextFieldMask
& whichField
))
1459 editSField(EnableDebugContextFieldMask
);
1460 _sfEnableDebugContext
.copyFromBin(pMem
);
1462 if(FieldBits::NoField
!= (IgnoreExtensionsFieldMask
& whichField
))
1464 editMField(IgnoreExtensionsFieldMask
, _mfIgnoreExtensions
);
1465 _mfIgnoreExtensions
.copyFromBin(pMem
);
1467 if(FieldBits::NoField
!= (IgnoreAllExtensionsFieldMask
& whichField
))
1469 editSField(IgnoreAllExtensionsFieldMask
);
1470 _sfIgnoreAllExtensions
.copyFromBin(pMem
);
1472 if(FieldBits::NoField
!= (RequestSamplesFieldMask
& whichField
))
1474 editSField(RequestSamplesFieldMask
);
1475 _sfRequestSamples
.copyFromBin(pMem
);
1477 if(FieldBits::NoField
!= (EnableFSAAFieldMask
& whichField
))
1479 editSField(EnableFSAAFieldMask
);
1480 _sfEnableFSAA
.copyFromBin(pMem
);
1482 if(FieldBits::NoField
!= (FsaaHintFieldMask
& whichField
))
1484 editSField(FsaaHintFieldMask
);
1485 _sfFsaaHint
.copyFromBin(pMem
);
1487 if(FieldBits::NoField
!= (RenderOptionsFieldMask
& whichField
))
1489 editSField(RenderOptionsFieldMask
);
1490 _sfRenderOptions
.copyFromBin(pMem
);
1492 if(FieldBits::NoField
!= (PartitionDrawModeFieldMask
& whichField
))
1494 editSField(PartitionDrawModeFieldMask
);
1495 _sfPartitionDrawMode
.copyFromBin(pMem
);
1497 if(FieldBits::NoField
!= (RegisterMainLoopFieldMask
& whichField
))
1499 editSField(RegisterMainLoopFieldMask
);
1500 _sfRegisterMainLoop
.copyFromBin(pMem
);
1502 if(FieldBits::NoField
!= (DumpContainerFieldMask
& whichField
))
1504 editSField(DumpContainerFieldMask
);
1505 _sfDumpContainer
.copyFromBin(pMem
);
1507 if(FieldBits::NoField
!= (WindowStateFieldMask
& whichField
))
1509 editSField(WindowStateFieldMask
);
1510 _sfWindowState
.copyFromBin(pMem
);
1517 /*------------------------- constructors ----------------------------------*/
1519 CSMWindowBase::CSMWindowBase(void) :
1527 _sfMouseAsMTouch (bool(false)),
1528 _sfSize (Vec2f(300, 300)),
1529 _sfPosition (Vec2f(100, 100)),
1530 _sfDecorEnabled (bool(true)),
1531 _sfRequestMajor (Int32(-1)),
1532 _sfRequestMinor (Int32(0)),
1533 _sfEnableForwardCompatContext(bool(false)),
1534 _sfEnableDebugContext (bool(false)),
1535 _mfIgnoreExtensions (),
1536 _sfIgnoreAllExtensions (bool(false)),
1537 _sfRequestSamples (UInt32(0)),
1538 _sfEnableFSAA (bool(false)),
1539 _sfFsaaHint (UInt32(GL_FASTEST
)),
1540 _sfRenderOptions (NULL
),
1541 _sfPartitionDrawMode (UInt32(Window::SequentialPartitionDraw
)),
1542 _sfRegisterMainLoop (bool(true)),
1543 _sfDumpContainer (bool(false)),
1544 _sfWindowState (Int32(0))
1548 CSMWindowBase::CSMWindowBase(const CSMWindowBase
&source
) :
1552 _sfMouseData (source
._sfMouseData
),
1553 _sfMTouchData (source
._sfMTouchData
),
1554 _sfMTouchDataWC (source
._sfMTouchDataWC
),
1555 _sfGestureData (source
._sfGestureData
),
1556 _sfMouseAsMTouch (source
._sfMouseAsMTouch
),
1557 _sfSize (source
._sfSize
),
1558 _sfPosition (source
._sfPosition
),
1559 _sfDecorEnabled (source
._sfDecorEnabled
),
1560 _sfRequestMajor (source
._sfRequestMajor
),
1561 _sfRequestMinor (source
._sfRequestMinor
),
1562 _sfEnableForwardCompatContext(source
._sfEnableForwardCompatContext
),
1563 _sfEnableDebugContext (source
._sfEnableDebugContext
),
1564 _mfIgnoreExtensions (source
._mfIgnoreExtensions
),
1565 _sfIgnoreAllExtensions (source
._sfIgnoreAllExtensions
),
1566 _sfRequestSamples (source
._sfRequestSamples
),
1567 _sfEnableFSAA (source
._sfEnableFSAA
),
1568 _sfFsaaHint (source
._sfFsaaHint
),
1569 _sfRenderOptions (NULL
),
1570 _sfPartitionDrawMode (source
._sfPartitionDrawMode
),
1571 _sfRegisterMainLoop (source
._sfRegisterMainLoop
),
1572 _sfDumpContainer (source
._sfDumpContainer
),
1573 _sfWindowState (source
._sfWindowState
)
1578 /*-------------------------- destructors ----------------------------------*/
1580 CSMWindowBase::~CSMWindowBase(void)
1583 /*-------------------------------------------------------------------------*/
1584 /* Parent linking */
1586 bool CSMWindowBase::linkParent(
1587 FieldContainer
* const pParent
,
1588 UInt16
const childFieldId
,
1589 UInt16
const parentFieldId
)
1591 if(parentFieldId
== ParentFieldId
)
1593 FieldContainer
* pTypedParent
=
1594 dynamic_cast< FieldContainer
* >(pParent
);
1596 if(pTypedParent
!= NULL
)
1598 FieldContainer
*pOldParent
=
1599 _sfParent
.getValue ();
1601 UInt16 oldChildFieldId
=
1602 _sfParent
.getParentFieldPos();
1604 if(pOldParent
!= NULL
)
1606 pOldParent
->unlinkChild(this, oldChildFieldId
);
1609 editSField(ParentFieldMask
);
1611 _sfParent
.setValue(static_cast<FieldContainer
*>(pParent
), childFieldId
);
1619 return Inherited::linkParent(pParent
, childFieldId
, parentFieldId
);
1622 bool CSMWindowBase::unlinkParent(
1623 FieldContainer
* const pParent
,
1624 UInt16
const parentFieldId
)
1626 if(parentFieldId
== ParentFieldId
)
1628 FieldContainer
* pTypedParent
=
1629 dynamic_cast< FieldContainer
* >(pParent
);
1631 if(pTypedParent
!= NULL
)
1633 if(_sfParent
.getValue() == pTypedParent
)
1635 editSField(ParentFieldMask
);
1637 _sfParent
.setValue(NULL
, 0xFFFF);
1642 SWARNING
<< "Child ([" << this
1643 << "] id [" << this->getId()
1644 << "] type [" << this->getType().getCName()
1645 << "] parentFieldId [" << parentFieldId
1646 << "]) - Parent ([" << pParent
1647 << "] id [" << pParent
->getId()
1648 << "] type [" << pParent
->getType().getCName()
1649 << "]): link inconsistent!"
1658 return Inherited::unlinkParent(pParent
, parentFieldId
);
1662 void CSMWindowBase::onCreate(const CSMWindow
*source
)
1664 Inherited::onCreate(source
);
1668 CSMWindow
*pThis
= static_cast<CSMWindow
*>(this);
1670 MFUnrecCSMViewportPtr::const_iterator ViewportsIt
=
1671 source
->_mfViewports
.begin();
1672 MFUnrecCSMViewportPtr::const_iterator ViewportsEnd
=
1673 source
->_mfViewports
.end ();
1675 while(ViewportsIt
!= ViewportsEnd
)
1677 pThis
->pushToViewports(*ViewportsIt
);
1682 pThis
->setRenderOptions(source
->getRenderOptions());
1686 GetFieldHandlePtr
CSMWindowBase::getHandleParent (void) const
1688 SFParentFieldContainerPtr::GetHandlePtr returnValue
;
1693 EditFieldHandlePtr
CSMWindowBase::editHandleParent (void)
1695 EditFieldHandlePtr returnValue
;
1700 GetFieldHandlePtr
CSMWindowBase::getHandleViewports (void) const
1702 MFUnrecCSMViewportPtr::GetHandlePtr
returnValue(
1703 new MFUnrecCSMViewportPtr::GetHandle(
1705 this->getType().getFieldDesc(ViewportsFieldId
),
1706 const_cast<CSMWindowBase
*>(this)));
1711 EditFieldHandlePtr
CSMWindowBase::editHandleViewports (void)
1713 MFUnrecCSMViewportPtr::EditHandlePtr
returnValue(
1714 new MFUnrecCSMViewportPtr::EditHandle(
1716 this->getType().getFieldDesc(ViewportsFieldId
),
1719 returnValue
->setAddMethod(
1720 boost::bind(&CSMWindow::pushToViewports
,
1721 static_cast<CSMWindow
*>(this), _1
));
1722 returnValue
->setRemoveMethod(
1723 boost::bind(&CSMWindow::removeFromViewports
,
1724 static_cast<CSMWindow
*>(this), _1
));
1725 returnValue
->setRemoveObjMethod(
1726 boost::bind(&CSMWindow::removeObjFromViewports
,
1727 static_cast<CSMWindow
*>(this), _1
));
1728 returnValue
->setClearMethod(
1729 boost::bind(&CSMWindow::clearViewports
,
1730 static_cast<CSMWindow
*>(this)));
1732 editMField(ViewportsFieldMask
, _mfViewports
);
1737 GetFieldHandlePtr
CSMWindowBase::getHandleMouseData (void) const
1739 SFMouseData::GetHandlePtr
returnValue(
1740 new SFMouseData::GetHandle(
1742 this->getType().getFieldDesc(MouseDataFieldId
),
1743 const_cast<CSMWindowBase
*>(this)));
1748 EditFieldHandlePtr
CSMWindowBase::editHandleMouseData (void)
1750 SFMouseData::EditHandlePtr
returnValue(
1751 new SFMouseData::EditHandle(
1753 this->getType().getFieldDesc(MouseDataFieldId
),
1757 editSField(MouseDataFieldMask
);
1762 GetFieldHandlePtr
CSMWindowBase::getHandleMTouchData (void) const
1764 SFMTouchData::GetHandlePtr
returnValue(
1765 new SFMTouchData::GetHandle(
1767 this->getType().getFieldDesc(MTouchDataFieldId
),
1768 const_cast<CSMWindowBase
*>(this)));
1773 EditFieldHandlePtr
CSMWindowBase::editHandleMTouchData (void)
1775 SFMTouchData::EditHandlePtr
returnValue(
1776 new SFMTouchData::EditHandle(
1778 this->getType().getFieldDesc(MTouchDataFieldId
),
1782 editSField(MTouchDataFieldMask
);
1787 GetFieldHandlePtr
CSMWindowBase::getHandleMTouchDataWC (void) const
1789 SFMTouchData::GetHandlePtr
returnValue(
1790 new SFMTouchData::GetHandle(
1792 this->getType().getFieldDesc(MTouchDataWCFieldId
),
1793 const_cast<CSMWindowBase
*>(this)));
1798 EditFieldHandlePtr
CSMWindowBase::editHandleMTouchDataWC (void)
1800 SFMTouchData::EditHandlePtr
returnValue(
1801 new SFMTouchData::EditHandle(
1803 this->getType().getFieldDesc(MTouchDataWCFieldId
),
1807 editSField(MTouchDataWCFieldMask
);
1812 GetFieldHandlePtr
CSMWindowBase::getHandleGestureData (void) const
1814 SFGestureData::GetHandlePtr
returnValue(
1815 new SFGestureData::GetHandle(
1817 this->getType().getFieldDesc(GestureDataFieldId
),
1818 const_cast<CSMWindowBase
*>(this)));
1823 EditFieldHandlePtr
CSMWindowBase::editHandleGestureData (void)
1825 SFGestureData::EditHandlePtr
returnValue(
1826 new SFGestureData::EditHandle(
1828 this->getType().getFieldDesc(GestureDataFieldId
),
1832 editSField(GestureDataFieldMask
);
1837 GetFieldHandlePtr
CSMWindowBase::getHandleMouseAsMTouch (void) const
1839 SFBool::GetHandlePtr
returnValue(
1840 new SFBool::GetHandle(
1842 this->getType().getFieldDesc(MouseAsMTouchFieldId
),
1843 const_cast<CSMWindowBase
*>(this)));
1848 EditFieldHandlePtr
CSMWindowBase::editHandleMouseAsMTouch (void)
1850 SFBool::EditHandlePtr
returnValue(
1851 new SFBool::EditHandle(
1853 this->getType().getFieldDesc(MouseAsMTouchFieldId
),
1857 editSField(MouseAsMTouchFieldMask
);
1862 GetFieldHandlePtr
CSMWindowBase::getHandleSize (void) const
1864 SFVec2f::GetHandlePtr
returnValue(
1865 new SFVec2f::GetHandle(
1867 this->getType().getFieldDesc(SizeFieldId
),
1868 const_cast<CSMWindowBase
*>(this)));
1873 EditFieldHandlePtr
CSMWindowBase::editHandleSize (void)
1875 SFVec2f::EditHandlePtr
returnValue(
1876 new SFVec2f::EditHandle(
1878 this->getType().getFieldDesc(SizeFieldId
),
1882 editSField(SizeFieldMask
);
1887 GetFieldHandlePtr
CSMWindowBase::getHandlePosition (void) const
1889 SFVec2f::GetHandlePtr
returnValue(
1890 new SFVec2f::GetHandle(
1892 this->getType().getFieldDesc(PositionFieldId
),
1893 const_cast<CSMWindowBase
*>(this)));
1898 EditFieldHandlePtr
CSMWindowBase::editHandlePosition (void)
1900 SFVec2f::EditHandlePtr
returnValue(
1901 new SFVec2f::EditHandle(
1903 this->getType().getFieldDesc(PositionFieldId
),
1907 editSField(PositionFieldMask
);
1912 GetFieldHandlePtr
CSMWindowBase::getHandleDecorEnabled (void) const
1914 SFBool::GetHandlePtr
returnValue(
1915 new SFBool::GetHandle(
1917 this->getType().getFieldDesc(DecorEnabledFieldId
),
1918 const_cast<CSMWindowBase
*>(this)));
1923 EditFieldHandlePtr
CSMWindowBase::editHandleDecorEnabled (void)
1925 SFBool::EditHandlePtr
returnValue(
1926 new SFBool::EditHandle(
1928 this->getType().getFieldDesc(DecorEnabledFieldId
),
1932 editSField(DecorEnabledFieldMask
);
1937 GetFieldHandlePtr
CSMWindowBase::getHandleRequestMajor (void) const
1939 SFInt32::GetHandlePtr
returnValue(
1940 new SFInt32::GetHandle(
1942 this->getType().getFieldDesc(RequestMajorFieldId
),
1943 const_cast<CSMWindowBase
*>(this)));
1948 EditFieldHandlePtr
CSMWindowBase::editHandleRequestMajor (void)
1950 SFInt32::EditHandlePtr
returnValue(
1951 new SFInt32::EditHandle(
1953 this->getType().getFieldDesc(RequestMajorFieldId
),
1957 editSField(RequestMajorFieldMask
);
1962 GetFieldHandlePtr
CSMWindowBase::getHandleRequestMinor (void) const
1964 SFInt32::GetHandlePtr
returnValue(
1965 new SFInt32::GetHandle(
1967 this->getType().getFieldDesc(RequestMinorFieldId
),
1968 const_cast<CSMWindowBase
*>(this)));
1973 EditFieldHandlePtr
CSMWindowBase::editHandleRequestMinor (void)
1975 SFInt32::EditHandlePtr
returnValue(
1976 new SFInt32::EditHandle(
1978 this->getType().getFieldDesc(RequestMinorFieldId
),
1982 editSField(RequestMinorFieldMask
);
1987 GetFieldHandlePtr
CSMWindowBase::getHandleEnableForwardCompatContext (void) const
1989 SFBool::GetHandlePtr
returnValue(
1990 new SFBool::GetHandle(
1991 &_sfEnableForwardCompatContext
,
1992 this->getType().getFieldDesc(EnableForwardCompatContextFieldId
),
1993 const_cast<CSMWindowBase
*>(this)));
1998 EditFieldHandlePtr
CSMWindowBase::editHandleEnableForwardCompatContext(void)
2000 SFBool::EditHandlePtr
returnValue(
2001 new SFBool::EditHandle(
2002 &_sfEnableForwardCompatContext
,
2003 this->getType().getFieldDesc(EnableForwardCompatContextFieldId
),
2007 editSField(EnableForwardCompatContextFieldMask
);
2012 GetFieldHandlePtr
CSMWindowBase::getHandleEnableDebugContext (void) const
2014 SFBool::GetHandlePtr
returnValue(
2015 new SFBool::GetHandle(
2016 &_sfEnableDebugContext
,
2017 this->getType().getFieldDesc(EnableDebugContextFieldId
),
2018 const_cast<CSMWindowBase
*>(this)));
2023 EditFieldHandlePtr
CSMWindowBase::editHandleEnableDebugContext(void)
2025 SFBool::EditHandlePtr
returnValue(
2026 new SFBool::EditHandle(
2027 &_sfEnableDebugContext
,
2028 this->getType().getFieldDesc(EnableDebugContextFieldId
),
2032 editSField(EnableDebugContextFieldMask
);
2037 GetFieldHandlePtr
CSMWindowBase::getHandleIgnoreExtensions (void) const
2039 MFString::GetHandlePtr
returnValue(
2040 new MFString::GetHandle(
2041 &_mfIgnoreExtensions
,
2042 this->getType().getFieldDesc(IgnoreExtensionsFieldId
),
2043 const_cast<CSMWindowBase
*>(this)));
2048 EditFieldHandlePtr
CSMWindowBase::editHandleIgnoreExtensions(void)
2050 MFString::EditHandlePtr
returnValue(
2051 new MFString::EditHandle(
2052 &_mfIgnoreExtensions
,
2053 this->getType().getFieldDesc(IgnoreExtensionsFieldId
),
2057 editMField(IgnoreExtensionsFieldMask
, _mfIgnoreExtensions
);
2062 GetFieldHandlePtr
CSMWindowBase::getHandleIgnoreAllExtensions (void) const
2064 SFBool::GetHandlePtr
returnValue(
2065 new SFBool::GetHandle(
2066 &_sfIgnoreAllExtensions
,
2067 this->getType().getFieldDesc(IgnoreAllExtensionsFieldId
),
2068 const_cast<CSMWindowBase
*>(this)));
2073 EditFieldHandlePtr
CSMWindowBase::editHandleIgnoreAllExtensions(void)
2075 SFBool::EditHandlePtr
returnValue(
2076 new SFBool::EditHandle(
2077 &_sfIgnoreAllExtensions
,
2078 this->getType().getFieldDesc(IgnoreAllExtensionsFieldId
),
2082 editSField(IgnoreAllExtensionsFieldMask
);
2087 GetFieldHandlePtr
CSMWindowBase::getHandleRequestSamples (void) const
2089 SFUInt32::GetHandlePtr
returnValue(
2090 new SFUInt32::GetHandle(
2092 this->getType().getFieldDesc(RequestSamplesFieldId
),
2093 const_cast<CSMWindowBase
*>(this)));
2098 EditFieldHandlePtr
CSMWindowBase::editHandleRequestSamples (void)
2100 SFUInt32::EditHandlePtr
returnValue(
2101 new SFUInt32::EditHandle(
2103 this->getType().getFieldDesc(RequestSamplesFieldId
),
2107 editSField(RequestSamplesFieldMask
);
2112 GetFieldHandlePtr
CSMWindowBase::getHandleEnableFSAA (void) const
2114 SFBool::GetHandlePtr
returnValue(
2115 new SFBool::GetHandle(
2117 this->getType().getFieldDesc(EnableFSAAFieldId
),
2118 const_cast<CSMWindowBase
*>(this)));
2123 EditFieldHandlePtr
CSMWindowBase::editHandleEnableFSAA (void)
2125 SFBool::EditHandlePtr
returnValue(
2126 new SFBool::EditHandle(
2128 this->getType().getFieldDesc(EnableFSAAFieldId
),
2132 editSField(EnableFSAAFieldMask
);
2137 GetFieldHandlePtr
CSMWindowBase::getHandleFsaaHint (void) const
2139 SFUInt32::GetHandlePtr
returnValue(
2140 new SFUInt32::GetHandle(
2142 this->getType().getFieldDesc(FsaaHintFieldId
),
2143 const_cast<CSMWindowBase
*>(this)));
2148 EditFieldHandlePtr
CSMWindowBase::editHandleFsaaHint (void)
2150 SFUInt32::EditHandlePtr
returnValue(
2151 new SFUInt32::EditHandle(
2153 this->getType().getFieldDesc(FsaaHintFieldId
),
2157 editSField(FsaaHintFieldMask
);
2162 GetFieldHandlePtr
CSMWindowBase::getHandleRenderOptions (void) const
2164 SFUnrecRenderOptionsPtr::GetHandlePtr
returnValue(
2165 new SFUnrecRenderOptionsPtr::GetHandle(
2167 this->getType().getFieldDesc(RenderOptionsFieldId
),
2168 const_cast<CSMWindowBase
*>(this)));
2173 EditFieldHandlePtr
CSMWindowBase::editHandleRenderOptions (void)
2175 SFUnrecRenderOptionsPtr::EditHandlePtr
returnValue(
2176 new SFUnrecRenderOptionsPtr::EditHandle(
2178 this->getType().getFieldDesc(RenderOptionsFieldId
),
2181 returnValue
->setSetMethod(
2182 boost::bind(&CSMWindow::setRenderOptions
,
2183 static_cast<CSMWindow
*>(this), _1
));
2185 editSField(RenderOptionsFieldMask
);
2190 GetFieldHandlePtr
CSMWindowBase::getHandlePartitionDrawMode (void) const
2192 SFUInt32::GetHandlePtr
returnValue(
2193 new SFUInt32::GetHandle(
2194 &_sfPartitionDrawMode
,
2195 this->getType().getFieldDesc(PartitionDrawModeFieldId
),
2196 const_cast<CSMWindowBase
*>(this)));
2201 EditFieldHandlePtr
CSMWindowBase::editHandlePartitionDrawMode(void)
2203 SFUInt32::EditHandlePtr
returnValue(
2204 new SFUInt32::EditHandle(
2205 &_sfPartitionDrawMode
,
2206 this->getType().getFieldDesc(PartitionDrawModeFieldId
),
2210 editSField(PartitionDrawModeFieldMask
);
2215 GetFieldHandlePtr
CSMWindowBase::getHandleRegisterMainLoop (void) const
2217 SFBool::GetHandlePtr
returnValue(
2218 new SFBool::GetHandle(
2219 &_sfRegisterMainLoop
,
2220 this->getType().getFieldDesc(RegisterMainLoopFieldId
),
2221 const_cast<CSMWindowBase
*>(this)));
2226 EditFieldHandlePtr
CSMWindowBase::editHandleRegisterMainLoop(void)
2228 SFBool::EditHandlePtr
returnValue(
2229 new SFBool::EditHandle(
2230 &_sfRegisterMainLoop
,
2231 this->getType().getFieldDesc(RegisterMainLoopFieldId
),
2235 editSField(RegisterMainLoopFieldMask
);
2240 GetFieldHandlePtr
CSMWindowBase::getHandleDumpContainer (void) const
2242 SFBool::GetHandlePtr
returnValue(
2243 new SFBool::GetHandle(
2245 this->getType().getFieldDesc(DumpContainerFieldId
),
2246 const_cast<CSMWindowBase
*>(this)));
2251 EditFieldHandlePtr
CSMWindowBase::editHandleDumpContainer (void)
2253 SFBool::EditHandlePtr
returnValue(
2254 new SFBool::EditHandle(
2256 this->getType().getFieldDesc(DumpContainerFieldId
),
2260 editSField(DumpContainerFieldMask
);
2265 GetFieldHandlePtr
CSMWindowBase::getHandleWindowState (void) const
2267 SFInt32::GetHandlePtr
returnValue(
2268 new SFInt32::GetHandle(
2270 this->getType().getFieldDesc(WindowStateFieldId
),
2271 const_cast<CSMWindowBase
*>(this)));
2276 EditFieldHandlePtr
CSMWindowBase::editHandleWindowState (void)
2278 SFInt32::EditHandlePtr
returnValue(
2279 new SFInt32::EditHandle(
2281 this->getType().getFieldDesc(WindowStateFieldId
),
2285 editSField(WindowStateFieldMask
);
2291 #ifdef OSG_MT_CPTR_ASPECT
2292 void CSMWindowBase::execSyncV( FieldContainer
&oFrom
,
2293 ConstFieldMaskArg whichField
,
2294 AspectOffsetStore
&oOffsets
,
2295 ConstFieldMaskArg syncMode
,
2296 const UInt32 uiSyncInfo
)
2298 CSMWindow
*pThis
= static_cast<CSMWindow
*>(this);
2300 pThis
->execSync(static_cast<CSMWindow
*>(&oFrom
),
2310 void CSMWindowBase::resolveLinks(void)
2312 Inherited::resolveLinks();
2314 static_cast<CSMWindow
*>(this)->clearViewports();
2316 static_cast<CSMWindow
*>(this)->setRenderOptions(NULL
);
2318 #ifdef OSG_MT_CPTR_ASPECT
2319 AspectOffsetStore oOffsets
;
2321 _pAspectStore
->fillOffsetArray(oOffsets
, this);
2324 #ifdef OSG_MT_CPTR_ASPECT
2325 _mfIgnoreExtensions
.terminateShare(Thread::getCurrentAspect(),