From f3147db6a86be513dbb14c7d43b9312e96770558 Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Mon, 24 Nov 2008 15:11:19 +0000 Subject: [PATCH] *** empty log message *** --- bbtk/src/bbmaracasvisuViewerNV.cxx | 51 ++++++++++++++++++- bbtk/src/bbmaracasvisuViewerNV.h | 23 +++++++++ .../widgets/wxMaracas_ViewerWidget.cxx | 34 ++++++++++++- 3 files changed, 105 insertions(+), 3 deletions(-) diff --git a/bbtk/src/bbmaracasvisuViewerNV.cxx b/bbtk/src/bbmaracasvisuViewerNV.cxx index e50eed4..4530cae 100644 --- a/bbtk/src/bbmaracasvisuViewerNV.cxx +++ b/bbtk/src/bbmaracasvisuViewerNV.cxx @@ -3,6 +3,55 @@ namespace bbcreaMaracasVisu { + +BEGIN_EVENT_TABLE( bbwxMaracas_N_ViewersWidget, wxPanel ) + EVT_MENU( 12121, bbwxMaracas_N_ViewersWidget::OnRefreshView ) + EVT_MENU( 12122, bbwxMaracas_N_ViewersWidget::OnDClickLeft ) +END_EVENT_TABLE( ); + + +//------------------------------------------------------------- +//------------------------------------------------------------- +//------------------------------------------------------------- + +bbwxMaracas_N_ViewersWidget::bbwxMaracas_N_ViewersWidget(ViewerNV* box, + wxWindow *parent, + vtkImageData* imagedata, + std::vector *nTypeView) +:wxMaracas_N_ViewersWidget(parent,imagedata,nTypeView) +{ + mbbViewerNV=box; +} + +//------------------------------------------------------------- +bbwxMaracas_N_ViewersWidget::~bbwxMaracas_N_ViewersWidget() +{ +} + +//------------------------------------------------------------- +void bbwxMaracas_N_ViewersWidget::OnRefreshView(wxCommandEvent & event) +{ + wxMaracas_N_ViewersWidget::OnRefreshView(event); + mbbViewerNV->bbSetModifiedStatus(); + mbbViewerNV->bbSignalOutputModification("Point"); + +} + +//------------------------------------------------------------- +void bbwxMaracas_N_ViewersWidget::OnDClickLeft(wxCommandEvent & event) +{ + wxMaracas_N_ViewersWidget::OnDClickLeft(event); + mbbViewerNV->bbSetModifiedStatus(); + mbbViewerNV->bbSignalOutputModification("Point"); +} + +//------------------------------------------------------------- +//------------------------------------------------------------- +//------------------------------------------------------------- + + + + BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ViewerNV) BBTK_BLACK_BOX_IMPLEMENTATION(ViewerNV,bbtk::WxBlackBox); //------------------------------------------------------------- @@ -37,7 +86,7 @@ void ViewerNV::Process() void ViewerNV::CreateWidget() { bbtkDebugMessageInc("Core",9,"ViewerNV::CreateWidget()"< *nTypeView); + ~bbwxMaracas_N_ViewersWidget(); + + //if the MPR had generated the refresh event + void OnRefreshView(wxCommandEvent & event); + void OnDClickLeft(wxCommandEvent & event); + private: + ViewerNV *mbbViewerNV; + DECLARE_EVENT_TABLE( ); + }; + + +//------------------------------------------------------------------- +//------------------------------------------------------------------- +//------------------------------------------------------------------- + + class /*BBTK_EXPORT*/ ViewerNV : public bbtk::WxBlackBox diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx index 66b0d25..9c8cc59 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx @@ -3,8 +3,8 @@ Program: wxMaracas Module: $RCSfile: wxMaracas_ViewerWidget.cxx,v $ Language: C++ - Date: $Date: 2008/10/31 16:32:42 $ - Version: $Revision: 1.1 $ + Date: $Date: 2008/11/24 15:11:25 $ + Version: $Revision: 1.2 $ Copyright: (c) 2002, 2003 License: @@ -136,6 +136,36 @@ wxwindow=panelClipping3D; } + if (type==6) + { + wxSplitterWindow *panelClipping3D = new wxSplitterWindow( panel , -1); + mwxvtk3Dbaseview_Clipping3D = new wxVtk3DBaseView( panelClipping3D ); + + mwxvtkmpr3Dview = new wxVtkMPR3DView( mwxvtk3Dbaseview_Clipping3D ); + vtkMPR3DDataViewer *vtkmpr3Ddataviewer = new vtkMPR3DDataViewer(); + vtkmpr3Ddataviewer->SetVtkMPRBaseData(mvtkmprbasedata); + vtkmpr3Ddataviewer->Configure(); + mwxvtkmpr3Dview->SetVtkMPR3DDataViewer(vtkmpr3Ddataviewer); + + wxWindow *window3D = mwxvtk3Dbaseview_Clipping3D->GetWxVTKRenderWindowInteractor(); + + wxPanel *panelControl = new wxPanel(panelClipping3D,-1); + wxPanel *controlPanelMPR3D = mwxvtkmpr3Dview->CreateControlPanel(panelControl); + + wxFlexGridSizer *sizerCtrol = new wxFlexGridSizer(1); + sizerCtrol->Add(controlPanelMPR3D , 1, wxALL|wxEXPAND, 2); + + panelControl->SetAutoLayout(true); + panelControl->SetSizer(sizerCtrol); + panelControl->SetSize(400,350); + panelControl->Layout(); + panelClipping3D -> SetMinimumPaneSize( 5 ); + panelClipping3D -> SplitHorizontally( panelControl , window3D , 10 ); + wxwindow=panelClipping3D; + } + + + wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL); sizer->Add( wxwindow , 1, wxEXPAND, 0); panel->SetSizer(sizer); -- 2.47.1