#include "wxMaracasDialog_NViewers.h" //#include #include BEGIN_EVENT_TABLE( wxMaracasDialog_NViewers, wxFrame ) EVT_MENU( 12121, wxMaracasDialog_NViewers::OnRefreshView ) EVT_MENU( 12122, wxMaracasDialog_NViewers::OnDClickLeft ) END_EVENT_TABLE( ); /** ** Class constructor **/ wxMaracasDialog_NViewers::wxMaracasDialog_NViewers(wxWindow* parent, vtkImageData* img, std::vector* type, wxString title) : wxFrame(parent, -1, title) { viewer = new wxMaracas_N_ViewersWidget(this, img, type); wxFlexGridSizer* sizer = new wxFlexGridSizer(1); sizer->Add(viewer, 1, wxGROW); this->SetSizer( sizer, true ); this->SetAutoLayout( true ); //viewer->SetSize(wxSizer(wxFIXED_MINSIZE)); } /** ** Class destructor **/ wxMaracasDialog_NViewers::~wxMaracasDialog_NViewers(){ } /** ** Adds a new panel to the frame **/ void wxMaracasDialog_NViewers::AddPanel(wxPanel panel) { wxFlexGridSizer* sizer = new wxFlexGridSizer(1); //this->AddChild(panel); //sizer->Add(panel, wxFIXED_MINSIZE); this->SetSizer( sizer, true ); this->SetAutoLayout( true ); } void wxMaracasDialog_NViewers::OnRefreshView(wxCommandEvent & event) { point.clear(); point.push_back((int)viewer->GetX()); point.push_back((int)viewer->GetY()); point.push_back((int)viewer->GetZ()); viewer->OnRefreshView(event); } void wxMaracasDialog_NViewers::OnDClickLeft(wxCommandEvent & event) { viewer->OnDClickLeft(event); }