//---------------------------------------------------------------------------------------------------------------- // Class definition include //---------------------------------------------------------------------------------------------------------------- #include "wxContourMainFrame.h" //---------------------------------------------------------------------------------------------------------------- // Includes //---------------------------------------------------------------------------------------------------------------- #include "NameWrapper.h" #include "wx/artprov.h" #include "ConceptDataWrap.h" #include #include "ImageSourceThing.h" #include "vtkImageData.h" #include "wxContour_ActionCommandsID.h" //---------------------------------------------------------------------------------------------------------------- // Class implementation //---------------------------------------------------------------------------------------------------------------- /** @file wxContourMainFrame.cxx */ //------------------------------------------------------------------------------------------------------------ // Constructors & Destructors //------------------------------------------------------------------------------------------------------------ wxContourMainFrame :: wxContourMainFrame(wxWindow* parent, wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size,long style) //: wxPanel(parent, id, title, pos, size, style) //: wxWindow(parent, id, pos, size, style) : wxPanel(parent, id, pos, size, style) { m_mgr.SetManagedWindow(this); _creatingContoursActive = false; _theViewPanel = NULL; _modelManager = NULL; _instantPanel = NULL; _buttonsBar = NULL; _gridPanel = NULL; _drawToolsPanel = NULL; _operationsToolsPanel = NULL; _autoFormsPanel = NULL; _standardToolsPanel = NULL; _editionToolsPanel = NULL; _listViewPanel = NULL; _sceneManager = NULL; _actualInstant = NULL; // set up default notebook style m_notebook_style =wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER; m_notebook_theme = 0; wxContour_ActionCommandsID a; } wxContourMainFrame :: ~wxContourMainFrame() { m_mgr.UnInit(); //El problema al cerrar la aplicacion puede estar asociado //a que wxAUINotebook esta en la aplicacion //principal (wxContourGUIExample)tambien //EED???? delete _theViewPanel; //EED???? delete _instantPanel; //EED???? delete _buttonsBar; //EED???? delete _actualInstant; //EED???? delete _sceneManager; } //------------------------------------------------------------------------------------------------------------ // Creational and initialization methods using WxAui //------------------------------------------------------------------------------------------------------------ // wxAuiNotebook * wxContourMainFrame :: createNotebook() { wxSize client_size = GetClientSize(); wxAuiNotebook* noteBook = new wxAuiNotebook(this, -1, wxPoint(client_size.x, client_size.y), wxSize(430,200), m_notebook_style); wxBitmap page_bmp = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16)); return noteBook; } //------------------------------------------------------------------------------------------------------------ // Creational and initialization methods //------------------------------------------------------------------------------------------------------------ bool wxContourMainFrame :: configurePanels(wxAuiNotebook* theNoteBook) { bool configured = _theViewPanel!=NULL; configured &= _theViewPanel!=NULL; if( _theViewPanel!=NULL ) { theNoteBook->AddPage( _theViewPanel, wxT(" View ") ); m_mgr.Update(); } if( configured ) { theNoteBook->AddPage( _instantPanel, wxT("Instant Page") ); m_mgr.Update(); } m_mgr.AddPane(theNoteBook, wxAuiPaneInfo().Name(wxT("notebook_content")).CenterPane().PaneBorder(false)); m_mgr.Update(); configured &= _buttonsBar!=NULL; if( _buttonsBar!=NULL ) { m_mgr.AddPane(_buttonsBar, wxAuiPaneInfo(). Name(wxT("TB")).Caption(wxT("Buttons Bar")). ToolbarPane().Top(). LeftDockable( ).RightDockable( false ).CloseButton(false)); m_mgr.Update(); } //CreateStatusBar(); SetMinSize(wxSize(300,300)); m_mgr.Update(); return configured; } void wxContourMainFrame :: setNotebook( wxAuiNotebook * noteBook ) { } //------------------------------------------------------------------------------------------------------------ // Attributes getters and setters //------------------------------------------------------------------------------------------------------------ void wxContourMainFrame :: setViewPanel( wxContourViewPanel * theViewPanel ) { _theViewPanel = theViewPanel; } void wxContourMainFrame :: setInstantChooserPanel( wxInstantChooserPanel * theInstantChooserPanel ) { _instantPanel = theInstantChooserPanel; } void wxContourMainFrame :: setButtonsBar( wxContour_ButtonsBar * theButtonsBar ) { _buttonsBar = theButtonsBar; } void wxContourMainFrame :: setGrid( wxContour_Grid * theGridPanel ) { _gridPanel = theGridPanel; } void wxContourMainFrame :: setDrawToolsPanel( wxContour_DrawToolsPanel * theDrawToolsPanel ) { _drawToolsPanel = theDrawToolsPanel; } void wxContourMainFrame :: setOperationsToolsPanel( wxContour_OperationsToolsPanel * theOperationsToolsPanel ) { _operationsToolsPanel = theOperationsToolsPanel; } void wxContourMainFrame :: setAutomaticFormsPanel( wxContour_AutomaticFormsToolsPanel * theAutoFormsPanel ) { _autoFormsPanel = theAutoFormsPanel; } void wxContourMainFrame :: setStandardToolsPanel( wxContour_StandardToolsPanel * theStandardToolsPanel ) { _standardToolsPanel= theStandardToolsPanel; } void wxContourMainFrame :: setEditionToolsPanel( wxContour_EdtionToolsPanel * theEditionToolsPanel ) { _editionToolsPanel = theEditionToolsPanel; } void wxContourMainFrame :: setListViewPanel( wxContour_ListViewPanel * theListViewPanel ) { _listViewPanel = theListViewPanel; }