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_PLANE_VIEWER
00025 #define SO_WX_PLANE_VIEWER
00026
00028
00029
00030
00032
00033 #include <Inventor/Wx/viewers/SoWxFullViewer.h>
00034
00035 #include <Inventor/Gui/viewers/SoGuiPlaneViewer.h>
00036 #include <Inventor/SbLinear.h>
00037
00038 class SoGuiPlaneViewer;
00039
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00070 class SoDEPRECATED SoWxPlaneViewer : public SoWxFullViewer
00130 {
00131
00132 public:
00141 SoWxPlaneViewer( wxWindow* parent = NULL,
00142 const char* name = NULL,
00143 SbBool buildInsideParent = TRUE,
00144 SoWxFullViewer::BuildFlag flag = SoWxFullViewer::BUILD_ALL,
00145 SoWxViewer::Type type = SoWxViewer::BROWSER );
00149 ~SoWxPlaneViewer();
00150
00154 void setPlane( const SbVec3f& newNormal, const SbVec3f& newRight );
00155
00156
00157 virtual void setViewing( SbBool onOrOff );
00158 virtual void setCamera( SoCamera* cam );
00159 virtual void setCursorEnabled( SbBool onOrOff );
00160 virtual void setSeekMode( SbBool onOrOff );
00161
00162
00163
00164
00165 private:
00166
00167 SoGuiPlaneViewer* getGuiPlaneViewer() const;
00168
00169 SoWxPlaneViewer( wxWindow* parent,
00170 const char* name,
00171 SbBool buildInsideParent,
00172 SoWxFullViewer::BuildFlag flag,
00173 SoWxViewer::Type type,
00174 SbBool buildNow,
00175 SbBool sync = true );
00176
00177 private:
00178
00179 void visibilityChangeCB( wxShowEvent& se );
00180
00181 private:
00182
00183 wxPanel* buildWidget(wxWindow* parent);
00184
00185
00186 virtual SbString getDefaultWidgetName() const;
00187 virtual SbString getDefaultTitle() const;
00188 virtual SbString getDefaultIconTitle() const;
00189
00190
00191 virtual void processEvent( wxEvent& anyEvent );
00192 virtual void actualRedraw();
00193
00194
00195 virtual void bottomWheelMotion( float newVal );
00196 virtual void leftWheelMotion( float newVal );
00197 virtual void rightWheelMotion( float newVal );
00198 virtual void mouseWheelMotion( float newVal );
00199
00200
00201 virtual void createPrefSheet();
00202
00203
00204 virtual void createViewerButtons( wxPanel* parent );
00205
00206
00207 virtual void openViewerHelpCard();
00208
00209
00210 virtual void computeSeekFinalOrientation();
00211
00212
00213
00214
00215
00216
00217
00218 virtual void pushButtonCB( int id );
00219
00220 private:
00221
00222 enum BUTTONS_ID
00223 {
00224 X_PUSH_ID = wxID_HIGHEST + 3001,
00225 Y_PUSH_ID,
00226 Z_PUSH_ID,
00227 CAM_PUSH_ID,
00228 };
00229
00230 wxBitmap X_PUSH;
00231 wxBitmap Y_PUSH;
00232 wxBitmap Z_PUSH;
00233 wxBitmap CAM_PUSH_PERSP;
00234 wxBitmap CAM_PUSH_ORTHO;
00235
00236 SoGuiPlaneViewer* m_guiPlaneViewer;
00237
00238
00239 wxBitmapButton* buttonList[10];
00240
00241
00242
00243
00244
00245 void updateViewerMode( wxMouseEvent& me );
00246 void switchMode( int newMode );
00247 void updateCursor();
00248
00249
00250 void constructorCommon( SbBool buildNow );
00251
00252
00253 void processPopupItem( int item );
00254
00255 void slot_xButton( wxCommandEvent& ce );
00256 void slot_yButton( wxCommandEvent& ce );
00257 void slot_zButton( wxCommandEvent& ce );
00258 void slotCamPushButton( wxCommandEvent& ce );
00259 };
00260
00261
00262 #endif // SO_WX_PLANE_VIEWER
00263
00264
00265