00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef SO_WX
00025 #define SO_WX
00026
00028
00029
00030
00032
00033 #ifndef SOWX
00034 #define SOWX
00035 #endif
00036
00037
00038 #include <wx/wxprec.h>
00039
00040
00041 #ifdef __BORLANDC__
00042 #pragma hdrstop
00043 #endif
00044
00045 #include <Inventor/Wx/SoInventorWxLibName.h>
00046
00047 #if defined(_WIN32)
00048 # ifndef InventorWx_EXPORTS
00049 # ifndef OIV_DISABLE_AUTOLINK
00050 # pragma comment(lib,__INVENTORWXLIB)
00051 # endif
00052 # endif
00053 #endif
00054
00055
00056 #ifndef WX_PRECOMP
00057 #include <wx/wx.h>
00058 #endif
00059
00060 #include <Inventor/SbLinear.h>
00061 #include <Inventor/Wx/SoWxDef.h>
00062 #include <Inventor/helpers/SbGlContextHelper.h>
00063
00064 #if !defined(_WIN32) && !defined(APPLE)
00065 #include <X11/Xlib.h>
00066 #endif
00067
00068 #include <Inventor/SoModule.h>
00069 SO_MODULE_HEADER(SoInventorWx, __INVENTORWXDLL)
00070
00071 class SoWxSensorHandler;
00072 class SbPList;
00073 class SoAction;
00074 class SoDEPRECATED SoWx
00094 {
00095
00096 public:
00097
00105 static void init( wxApp* app, wxFrame* topLevelWidget );
00106
00111 static wxWindow* init( const char* appName, const char* className = NULL );
00112
00113 #if 1 SoDEPRECATED
00119 static void threadInit( wxApp* app, wxFrame* topLevelWidget );
00120 #endif
00125 static bool isInitialized();
00126
00132 static void show( wxWindow* widget );
00133
00139 static void hide( wxWindow* widget );
00140
00144 static void mainLoop();
00145
00149 static SbGlContextHelper::Display getDisplay();
00150
00155 static wxFrame* getTopLevelWidget();
00156
00160 static void setWidgetSize( wxWindow* widget, const SbVec2s& size );
00161
00165 static SbVec2s getWidgetSize( wxWindow* widget );
00166
00172 static void createSimpleErrorDialog( wxWindow* widget, char *dialogTitle,
00173 char *errorStr1, char *errorStr2 = NULL );
00174
00183 static void finish();
00184
00185 private:
00186
00187
00188 static wxFrame* m_mainWidget;
00189
00190 static wxApp* m_wxApplication;
00191 static wxApp* getWxApp() { return m_wxApplication; }
00192
00193 private:
00194
00195 static SoWxSensorHandler* m_sensorHandler;
00196
00197 private:
00198 static void constructorCommon();
00199 static int m_wxInitCount;
00200 static int s_initRefCount;
00201 static const char *s_versionString;
00202 };
00203
00204 #endif // SO_WX
00205
00206
00207