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<int> *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);
//-------------------------------------------------------------
void ViewerNV::CreateWidget()
{
bbtkDebugMessageInc("Core",9,"ViewerNV::CreateWidget()"<<std::endl);
- mwxwidget = new wxMaracas_N_ViewersWidget( bbGetWxParent() , bbGetInputIn() , &(bbGetInputnTypeView()) ); // taking address of temporary JPRx
+ mwxwidget = new bbwxMaracas_N_ViewersWidget( this,bbGetWxParent() , bbGetInputIn() , &(bbGetInputnTypeView()) );
bbtkDebugDecTab("Core",9);
bbSetOutputWidget( mwxwidget );
}
namespace bbcreaMaracasVisu
{
+
+
+ class ViewerNV;
+ class bbwxMaracas_N_ViewersWidget : public wxMaracas_N_ViewersWidget
+ {
+ public:
+ bbwxMaracas_N_ViewersWidget(ViewerNV* box,wxWindow *parent, vtkImageData* imagedata, std::vector<int> *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
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:
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);