Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OSGWindowBase.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002  *                                OpenSG                                     *
00003  *                                                                           *
00004  *                                                                           *
00005  *               Copyright (C) 2000-2002 by the OpenSG Forum                 *
00006  *                                                                           *
00007  *                            www.opensg.org                                 *
00008  *                                                                           *
00009  *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          *
00010  *                                                                           *
00011 \*---------------------------------------------------------------------------*/
00012 /*---------------------------------------------------------------------------*\
00013  *                                License                                    *
00014  *                                                                           *
00015  * This library is free software; you can redistribute it and/or modify it   *
00016  * under the terms of the GNU Library General Public License as published    *
00017  * by the Free Software Foundation, version 2.                               *
00018  *                                                                           *
00019  * This library is distributed in the hope that it will be useful, but       *
00020  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00022  * Library General Public License for more details.                          *
00023  *                                                                           *
00024  * You should have received a copy of the GNU Library General Public         *
00025  * License along with this library; if not, write to the Free Software       *
00026  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
00027  *                                                                           *
00028 \*---------------------------------------------------------------------------*/
00029 /*---------------------------------------------------------------------------*\
00030  *                                Changes                                    *
00031  *                                                                           *
00032  *                                                                           *
00033  *                                                                           *
00034  *                                                                           *
00035  *                                                                           *
00036  *                                                                           *
00037 \*---------------------------------------------------------------------------*/
00038 
00039 /*****************************************************************************\
00040  *****************************************************************************
00041  **                                                                         **
00042  **                  This file is automatically generated.                  **
00043  **                                                                         **
00044  **          Any changes made to this file WILL be lost when it is          **
00045  **           regenerated, which can become necessary at any time.          **
00046  **                                                                         **
00047  **     Do not change this file, changes should be done in the derived      **
00048  **     class Window
00049  **                                                                         **
00050  *****************************************************************************
00051 \*****************************************************************************/
00052 
00053 
00054 #ifndef _OSGWINDOWBASE_H_
00055 #define _OSGWINDOWBASE_H_
00056 #ifdef __sgi
00057 #pragma once
00058 #endif
00059 
00060 
00061 #include <OSGConfig.h>
00062 #include <OSGSystemDef.h>
00063 
00064 #include <OSGBaseTypes.h>
00065 #include <OSGRefPtr.h>
00066 #include <OSGCoredNodePtr.h>
00067 
00068 #include <OSGAttachmentContainer.h> // Parent
00069 
00070 #include <OSGUInt16Fields.h> // Width type
00071 #include <OSGUInt16Fields.h> // Height type
00072 #include <OSGViewportFields.h> // Port type
00073 #include <OSGBoolFields.h> // ResizePending type
00074 #include <OSGUInt32Fields.h> // GlObjectEventCounter type
00075 #include <OSGUInt32Fields.h> // GlObjectLastRefresh type
00076 #include <OSGUInt32Fields.h> // GlObjectLastReinitialize type
00077 
00078 #include <OSGWindowFields.h>
00079 
00080 OSG_BEGIN_NAMESPACE
00081 
00082 class Window;
00083 class BinaryDataHandler;
00084 
00086 
00087 class OSG_SYSTEMLIB_DLLMAPPING WindowBase : public AttachmentContainer
00088 {
00089   private:
00090 
00091     typedef AttachmentContainer    Inherited;
00092 
00093     /*==========================  PUBLIC  =================================*/
00094   public:
00095 
00096     typedef WindowPtr  Ptr;
00097 
00098     enum
00099     {
00100         WidthFieldId                    = Inherited::NextFieldId,
00101         HeightFieldId                   = WidthFieldId                    + 1,
00102         PortFieldId                     = HeightFieldId                   + 1,
00103         ResizePendingFieldId            = PortFieldId                     + 1,
00104         GlObjectEventCounterFieldId     = ResizePendingFieldId            + 1,
00105         GlObjectLastRefreshFieldId      = GlObjectEventCounterFieldId     + 1,
00106         GlObjectLastReinitializeFieldId = GlObjectLastRefreshFieldId      + 1,
00107         NextFieldId                     = GlObjectLastReinitializeFieldId + 1
00108     };
00109 
00110     static const OSG::BitVector WidthFieldMask;
00111     static const OSG::BitVector HeightFieldMask;
00112     static const OSG::BitVector PortFieldMask;
00113     static const OSG::BitVector ResizePendingFieldMask;
00114     static const OSG::BitVector GlObjectEventCounterFieldMask;
00115     static const OSG::BitVector GlObjectLastRefreshFieldMask;
00116     static const OSG::BitVector GlObjectLastReinitializeFieldMask;
00117 
00118 
00119     static const OSG::BitVector MTInfluenceMask;
00120 
00121     /*---------------------------------------------------------------------*/
00125     static        FieldContainerType &getClassType    (void); 
00126     static        UInt32              getClassTypeId  (void); 
00127 
00129     /*---------------------------------------------------------------------*/
00133     virtual       FieldContainerType &getType  (void); 
00134     virtual const FieldContainerType &getType  (void) const; 
00135 
00136     virtual       UInt32              getContainerSize(void) const;
00137 
00139     /*---------------------------------------------------------------------*/
00143            SFUInt16            *getSFWidth          (void);
00144            SFUInt16            *getSFHeight         (void);
00145            MFViewportPtr       *getMFPort           (void);
00146            SFBool              *getSFResizePending  (void);
00147 
00148            UInt16              &getWidth          (void);
00149      const UInt16              &getWidth          (void) const;
00150            UInt16              &getHeight         (void);
00151      const UInt16              &getHeight         (void) const;
00152            bool                &getResizePending  (void);
00153      const bool                &getResizePending  (void) const;
00154            ViewportPtr         &getPort           (const UInt32 index);
00155            MFViewportPtr       &getPort           (void);
00156      const MFViewportPtr       &getPort           (void) const;
00157 
00159     /*---------------------------------------------------------------------*/
00163      void setWidth          ( const UInt16 &value );
00164      void setHeight         ( const UInt16 &value );
00165      void setResizePending  ( const bool &value );
00166 
00168     /*---------------------------------------------------------------------*/
00173     /*---------------------------------------------------------------------*/
00177     virtual UInt32 getBinSize (const BitVector         &whichField);
00178     virtual void   copyToBin  (      BinaryDataHandler &pMem,
00179                                const BitVector         &whichField);
00180     virtual void   copyFromBin(      BinaryDataHandler &pMem,
00181                                const BitVector         &whichField);
00182 
00183 
00185     /*=========================  PROTECTED  ===============================*/
00186   protected:
00187 
00188     /*---------------------------------------------------------------------*/
00192     SFUInt16            _sfWidth;
00193     SFUInt16            _sfHeight;
00194     MFViewportPtr       _mfPort;
00195     SFBool              _sfResizePending;
00196     SFUInt32            _sfGlObjectEventCounter;
00197     MFUInt32            _mfGlObjectLastRefresh;
00198     MFUInt32            _mfGlObjectLastReinitialize;
00199 
00201     /*---------------------------------------------------------------------*/
00205     WindowBase(void);
00206     WindowBase(const WindowBase &source);
00207 
00209     /*---------------------------------------------------------------------*/
00213     virtual ~WindowBase(void); 
00214 
00216     /*---------------------------------------------------------------------*/
00220            SFUInt32            *getSFGlObjectEventCounter(void);
00221            MFUInt32            *getMFGlObjectLastRefresh(void);
00222            MFUInt32            *getMFGlObjectLastReinitialize(void);
00223 
00224            UInt32              &getGlObjectEventCounter(void);
00225      const UInt32              &getGlObjectEventCounter(void) const;
00226            UInt32              &getGlObjectLastRefresh(UInt32 index);
00227            MFUInt32            &getGlObjectLastRefresh(void);
00228      const MFUInt32            &getGlObjectLastRefresh(void) const;
00229            UInt32              &getGlObjectLastReinitialize(UInt32 index);
00230            MFUInt32            &getGlObjectLastReinitialize(void);
00231      const MFUInt32            &getGlObjectLastReinitialize(void) const;
00232 
00234     /*---------------------------------------------------------------------*/
00238      void setGlObjectEventCounter(const UInt32 &value);
00239 
00241     /*---------------------------------------------------------------------*/
00245 #if !defined(OSG_FIXED_MFIELDSYNC)
00246     void executeSyncImpl(      WindowBase *pOther,
00247                          const BitVector         &whichField);
00248 
00249     virtual void   executeSync(      FieldContainer    &other,
00250                                const BitVector         &whichField);
00251 #else
00252     void executeSyncImpl(      WindowBase *pOther,
00253                          const BitVector         &whichField,
00254                          const SyncInfo          &sInfo     );
00255 
00256     virtual void   executeSync(      FieldContainer    &other,
00257                                const BitVector         &whichField,
00258                                const SyncInfo          &sInfo);
00259 
00260     virtual void execBeginEdit     (const BitVector &whichField,
00261                                           UInt32     uiAspect,
00262                                           UInt32     uiContainerSize);
00263 
00264             void execBeginEditImpl (const BitVector &whichField,
00265                                           UInt32     uiAspect,
00266                                           UInt32     uiContainerSize);
00267 
00268     virtual void onDestroyAspect(UInt32 uiId, UInt32 uiAspect);
00269 #endif
00270 
00272     /*==========================  PRIVATE  ================================*/
00273   private:
00274 
00275     friend class FieldContainer;
00276 
00277     static FieldDescription   *_desc[];
00278     static FieldContainerType  _type;
00279 
00280 
00281     // prohibit default functions (move to 'public' if you need one)
00282     void operator =(const WindowBase &source);
00283 };
00284 
00285 //---------------------------------------------------------------------------
00286 //   Exported Types
00287 //---------------------------------------------------------------------------
00288 
00289 
00290 typedef WindowBase *WindowBaseP;
00291 
00292 typedef osgIF<WindowBase::isNodeCore,
00293               CoredNodePtr<Window>,
00294               FieldContainer::attempt_to_create_CoredNodePtr_on_non_NodeCore_FC
00295               >::_IRet WindowNodePtr;
00296 
00297 typedef RefPtr<WindowPtr> WindowRefPtr;
00298 
00299 OSG_END_NAMESPACE
00300 
00301 #define OSGWINDOWBASE_HEADER_CVSID "@(#)$Id: FCBaseTemplate_h.h,v 1.38 2005/07/08 06:37:35 vossg Exp $"
00302 
00303 #endif /* _OSGWINDOWBASE_H_ */

Generated on Thu Aug 25 04:12:16 2005 for OpenSG by  doxygen 1.4.3