00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 #ifndef _OSGQTWINDOWBASE_H_
00055 #define _OSGQTWINDOWBASE_H_
00056 #ifdef __sgi
00057 #pragma once
00058 #endif
00059
00060
00061 #include <OSGConfig.h>
00062 #include <OSGWindowQTDef.h>
00063
00064 #include <OSGBaseTypes.h>
00065
00066 #include <OSGQTWindowDataFields.h>
00067
00068
00069 #ifdef WIN32
00070 #include "OSGWIN32Window.h"
00071 #else
00072 #include "OSGXWindow.h"
00073 #endif
00074
00075 #include <OSGQTWindowFields.h>
00076
00077 OSG_BEGIN_NAMESPACE
00078
00079 class QTWindow;
00080 class BinaryDataHandler;
00081
00083
00084 #ifdef WIN32
00085 class OSG_WINDOWQTLIB_DLLMAPPING QTWindowBase : public WIN32Window
00086 #else
00087 class OSG_WINDOWQTLIB_DLLMAPPING QTWindowBase : public XWindow
00088 #endif
00089 {
00090 private:
00091
00092 #ifdef WIN32
00093 typedef WIN32Window Inherited;
00094 #else
00095 typedef XWindow Inherited;
00096 #endif
00097
00098
00099 public:
00100
00101 enum
00102 {
00103 GlWidgetFieldId = Inherited::NextFieldId,
00104 NextFieldId = GlWidgetFieldId + 1
00105 };
00106
00107 static const OSG::BitVector GlWidgetFieldMask;
00108
00109
00113 static FieldContainerType &getClassType (void);
00114 static UInt32 getClassTypeId (void);
00115
00117
00121 virtual FieldContainerType &getType (void);
00122 virtual const FieldContainerType &getType (void) const;
00123
00124 virtual UInt32 getContainerSize(void) const;
00125
00127
00131 inline SFOSGQGLWidgetP *getSFGlWidget (void);
00132
00133 inline OSGQGLWidgetP &getGlWidget (void);
00134 inline const OSGQGLWidgetP &getGlWidget (void) const;
00135
00137
00141 inline void setGlWidget ( const OSGQGLWidgetP &value );
00142
00144
00148
00149
00150
00152
00156 virtual UInt32 getBinSize (const BitVector &whichField);
00157 virtual void copyToBin ( BinaryDataHandler &pMem,
00158 const BitVector &whichField);
00159 virtual void copyFromBin( BinaryDataHandler &pMem,
00160 const BitVector &whichField);
00161
00162
00164
00168 static QTWindowPtr create (void);
00169 static QTWindowPtr createEmpty (void);
00170
00173
00177 virtual FieldContainerPtr shallowCopy (void) const;
00178
00180
00181 protected:
00182
00183
00187 SFOSGQGLWidgetP _sfGlWidget;
00188
00190
00194 QTWindowBase(void);
00195 QTWindowBase(const QTWindowBase &source);
00196
00198
00202 virtual ~QTWindowBase(void);
00203
00205
00210 #if !defined(OSG_FIXED_MFIELDSYNC)
00211 void executeSyncImpl( QTWindowBase *pOther,
00212 const BitVector &whichField);
00213
00214 virtual void executeSync( FieldContainer &other,
00215 const BitVector &whichField);
00216 #else
00217 void executeSyncImpl( QTWindowBase *pOther,
00218 const BitVector &whichField,
00219 const SyncInfo &sInfo );
00220
00221 virtual void executeSync( FieldContainer &other,
00222 const BitVector &whichField,
00223 const SyncInfo &sInfo);
00224
00225 virtual void execBeginEdit (const BitVector &whichField,
00226 UInt32 uiAspect,
00227 UInt32 uiContainerSize);
00228
00229 void execBeginEditImpl (const BitVector &whichField,
00230 UInt32 uiAspect,
00231 UInt32 uiContainerSize);
00232
00233 virtual void onDestroyAspect(UInt32 uiId, UInt32 uiAspect);
00234 #endif
00235
00237
00238 private:
00239
00240 friend class FieldContainer;
00241
00242 static FieldDescription *_desc[];
00243 static FieldContainerType _type;
00244
00245
00246
00247 void operator =(const QTWindowBase &source);
00248 };
00249
00250
00251
00252
00253
00254
00255 typedef QTWindowBase *QTWindowBaseP;
00256
00257 OSG_END_NAMESPACE
00258
00259 #define OSGQTWINDOWBASE_HEADER_CVSID "@(#)$Id: $"
00260
00261 #endif