]> Creatis software - crea.git/commitdiff
Feature #1711
authorDaniel Gonzalez <daniel@daniel.creatis>
Tue, 4 Dec 2012 14:11:13 +0000 (15:11 +0100)
committerDaniel Gonzalez <daniel@daniel.creatis>
Tue, 4 Dec 2012 14:11:13 +0000 (15:11 +0100)
CreaDevManager application implementation

Fix panels' size bug;

appli/creaDevManager/creaDevManager.cpp
lib/creaDevManagerLib/wxCDMMainFrame.cpp

index 74146c26374d30baa888ecff38154fc781adef1a..a4903d2b92fa0ae1f626a8240c7e8b8b63d9d059 100644 (file)
@@ -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;
index acda55d9ffcfef2276ad4e62f1bc0dae8ffcad73..74999d621a17a74e69468caedd1b6ca8c26eacae 100755 (executable)
@@ -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();