From bfb323227654cb712d5cc3b05774877201d59bd7 Mon Sep 17 00:00:00 2001 From: Daniel Gonzalez Date: Tue, 4 Dec 2012 15:11:13 +0100 Subject: [PATCH] Feature #1711 CreaDevManager application implementation Fix panels' size bug; --- appli/creaDevManager/creaDevManager.cpp | 2 +- lib/creaDevManagerLib/wxCDMMainFrame.cpp | 65 +++++++++++++----------- 2 files changed, 35 insertions(+), 32 deletions(-) diff --git a/appli/creaDevManager/creaDevManager.cpp b/appli/creaDevManager/creaDevManager.cpp index 74146c2..a4903d2 100644 --- a/appli/creaDevManager/creaDevManager.cpp +++ b/appli/creaDevManager/creaDevManager.cpp @@ -42,7 +42,7 @@ bool wxCreaDevManagerApp::OnInit() wxCDMMainFrame* mainWindow = new wxCDMMainFrame(NULL); SetTopWindow(mainWindow); - mainWindow->SetSize(800, 600); + mainWindow->SetSize(900, 700); mainWindow->Show(true); std::cout << "Crea DevManager opened." << std::endl; diff --git a/lib/creaDevManagerLib/wxCDMMainFrame.cpp b/lib/creaDevManagerLib/wxCDMMainFrame.cpp index acda55d..74999d6 100755 --- a/lib/creaDevManagerLib/wxCDMMainFrame.cpp +++ b/lib/creaDevManagerLib/wxCDMMainFrame.cpp @@ -195,17 +195,16 @@ void wxCDMMainFrame::CreateControls() this, ID_TREE_PROJECTS, wxDefaultPosition, - wxSize(300,400), + wxSize(200,400), wxTR_HAS_BUTTONS | wxTR_AQUA_BUTTONS ); - tree_Projects->SetMinSize(wxSize(200,200)); panel_Properties = new wxCDMMainDescriptionPanel( this, ID_WINDOW_PROPERTIES, wxT("Description Panel"), wxDefaultPosition, - wxSize(300, 400), + wxSize(400, 600), 0 ); @@ -213,11 +212,15 @@ void wxCDMMainFrame::CreateControls() - auiManager.AddPane(tree_Projects, wxLEFT, wxT("Projects Tree")); - auiManager.AddPane(panel_Properties, wxCENTER, wxT("Properties")); + + + auiManager.AddPane(panel_Properties, wxAuiPaneInfo().BestSize(600,400).CenterPane().Name(wxT("panel_Properties")).Caption(wxT("Properties"))); + auiManager.AddPane(tree_Projects, wxAuiPaneInfo().Left().MinSize(300,300).BestSize(300,400).CloseButton(false).Name(wxT("tree_Projects")).Caption(wxT("Projects Tree"))); + + wxString pers = auiManager.SavePerspective(); auiManager.Update(); - auiManager.GetPane(tree_Projects).CloseButton(false).MaximizeButton(true); + auiManager.LoadPerspective(pers,true); } //Event Handlers @@ -275,7 +278,7 @@ void wxCDMMainFrame::OnMenuNewProject(wxCommandEvent& event) ID_WINDOW_PROPERTIES, wxT("Description Panel"), wxDefaultPosition, - wxSize(300, 400), + wxSize(600, 400), 0); //show projectactions panel if(this->panel_ProjectActions != NULL) @@ -289,14 +292,14 @@ void wxCDMMainFrame::OnMenuNewProject(wxCommandEvent& event) ID_WINDOW_PROJ_ACTIONS, wxT("Project Actions Panel"), wxDefaultPosition, - wxSize(600,200), + wxSize(800,200), 0 ); panel_ProjectActions->SetMinSize(wxSize(500, 100)); - auiManager.AddPane(panel_Properties, wxCENTER, wxT("Properties")); - auiManager.AddPane(panel_ProjectActions, wxBOTTOM, wxT("Project Actions")); + auiManager.AddPane(panel_Properties, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("Properties")).BestSize(600,400)); + auiManager.AddPane(panel_ProjectActions, wxAuiPaneInfo().Bottom().MinSize(800,50).Name(wxT("panel_ProjectActions")).Caption(wxT("Project Actions")).BestSize(800,70).CloseButton(false)); auiManager.Update(); @@ -362,7 +365,7 @@ void wxCDMMainFrame::OnMenuOpenProject(wxCommandEvent& event) ID_WINDOW_PROPERTIES, wxT("Description Panel"), wxDefaultPosition, - wxSize(300, 400), + wxSize(600, 400), 0 ); @@ -377,14 +380,14 @@ void wxCDMMainFrame::OnMenuOpenProject(wxCommandEvent& event) ID_WINDOW_PROJ_ACTIONS, wxT("Project Actions Panel"), wxDefaultPosition, - wxSize(600,200), + wxSize(800,200), 0 ); panel_ProjectActions->SetMinSize(wxSize(500, 100)); - auiManager.AddPane(panel_Properties, wxCENTER, wxT("Properties")); - auiManager.AddPane(panel_ProjectActions, wxBOTTOM, wxT("Project Actions")); + auiManager.AddPane(panel_Properties, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("Properties")).BestSize(600,400)); + auiManager.AddPane(panel_ProjectActions, wxAuiPaneInfo().Bottom().MinSize(800,50).Name(wxT("panel_ProjectActions")).Caption(wxT("Project Actions")).BestSize(800,70).CloseButton(false)); auiManager.Update(); } @@ -424,11 +427,11 @@ void wxCDMMainFrame::OnMenuCloseProject(wxCommandEvent& event) ID_WINDOW_PROPERTIES, wxT("Description Panel"), wxDefaultPosition, - wxSize(300, 400), + wxSize(600, 400), 0 ); - auiManager.AddPane(panel_Properties, wxCENTER, wxT("Properties")); + auiManager.AddPane(panel_Properties, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("Properties")).BestSize(600,400)); auiManager.Update(); event.Skip(); @@ -460,11 +463,11 @@ void wxCDMMainFrame::OnMenuCloseAllProjects(wxCommandEvent& event) ID_WINDOW_PROPERTIES, wxT("Description Panel"), wxDefaultPosition, - wxSize(300, 400), + wxSize(600, 400), 0 ); - auiManager.AddPane(panel_Properties, wxCENTER, wxT("Properties")); + auiManager.AddPane(panel_Properties, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("Properties")).BestSize(600,400)); auiManager.Update(); event.Skip(); @@ -501,7 +504,7 @@ void wxCDMMainFrame::OnMenuExit(wxCommandEvent& event) ID_WINDOW_PROPERTIES, wxT("Description Panel"), wxDefaultPosition, - wxSize(300, 400), + wxSize(600, 400), 0 ); Close(); @@ -624,7 +627,7 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event) ID_WINDOW_PROPERTIES, wxT("Description Panel"), wxDefaultPosition, - wxSize(300, 400), + wxSize(600, 400), 0 ); @@ -642,7 +645,7 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event) ID_WINDOW_PROPERTIES, wxT("Description Panel"), wxDefaultPosition, - wxSize(300, 400), + wxSize(600, 400), 0 ); } @@ -659,7 +662,7 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event) ID_WINDOW_PROPERTIES, wxT("Description Panel"), wxDefaultPosition, - wxSize(300, 400), + wxSize(600, 400), 0 ); } @@ -676,7 +679,7 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event) ID_WINDOW_PROPERTIES, wxT("Description Panel"), wxDefaultPosition, - wxSize(300, 400), + wxSize(600, 400), 0 ); } @@ -693,7 +696,7 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event) ID_WINDOW_PROPERTIES, wxT("Description Panel"), wxDefaultPosition, - wxSize(300, 400), + wxSize(600, 400), 0 ); } @@ -710,7 +713,7 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event) ID_WINDOW_PROPERTIES, wxT("Description Panel"), wxDefaultPosition, - wxSize(300, 400), + wxSize(600, 400), 0 ); } @@ -727,7 +730,7 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event) ID_WINDOW_PROPERTIES, wxT("Description Panel"), wxDefaultPosition, - wxSize(300, 400), + wxSize(600, 400), 0 ); } @@ -744,7 +747,7 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event) ID_WINDOW_PROPERTIES, wxT("Description Panel"), wxDefaultPosition, - wxSize(300, 400), + wxSize(600, 400), 0 ); } @@ -761,7 +764,7 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event) ID_WINDOW_PROPERTIES, wxT("Description Panel"), wxDefaultPosition, - wxSize(300, 400), + wxSize(600, 400), 0 ); } @@ -778,7 +781,7 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event) ID_WINDOW_PROPERTIES, wxT("Description Panel"), wxDefaultPosition, - wxSize(300, 400), + wxSize(600, 400), 0 ); } @@ -792,7 +795,7 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event) ID_WINDOW_PROPERTIES, wxT("Description Panel"), wxDefaultPosition, - wxSize(300, 400), + wxSize(600, 400), 0 ); } @@ -817,7 +820,7 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event) //set new view this->panel_Properties = description; - auiManager.AddPane(panel_Properties, wxCENTER, wxT("Properties")); + auiManager.AddPane(panel_Properties, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("Properties")).BestSize(600,400)); auiManager.Update(); this->panel_Properties->Show(true); event.Skip(); -- 2.47.1