X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=inline;f=lib%2FcreaDevManagerLib%2FwxCDMMainFrame.cpp;h=143d23977ce318ac20e1872eb64758304bbb624e;hb=752294dd30e2ee94f38be513d441f4716509ce13;hp=07ea08094331cedf025105631a6c5643ff2327ff;hpb=43a86caa77956a7638494a69499c17cff2b79538;p=crea.git diff --git a/lib/creaDevManagerLib/wxCDMMainFrame.cpp b/lib/creaDevManagerLib/wxCDMMainFrame.cpp index 07ea080..143d239 100755 --- a/lib/creaDevManagerLib/wxCDMMainFrame.cpp +++ b/lib/creaDevManagerLib/wxCDMMainFrame.cpp @@ -53,7 +53,6 @@ #include "wxCDMProjectActionsPanel.h" #include "wxCDMNewProjectDialog.h" -#include "wxCDMProjectHelpDialog.h" BEGIN_EVENT_TABLE(wxCDMMainFrame, wxFrame) @@ -81,12 +80,17 @@ EVT_MENU(ID_MENU_HELP, wxCDMMainFrame::OnMenuHelp) EVT_MENU(ID_MENU_REPORT_BUG, wxCDMMainFrame::OnMenuReportBug) EVT_MENU(ID_MENU_ABOUT_CREADEVMANAGER, wxCDMMainFrame::OnMenuAboutCreaDevManager) EVT_MENU(ID_MENU_ABOUT_CREATIS, wxCDMMainFrame::OnMenuAboutCreatis) + EVT_BUTTON(ID_BUTTON_NEWPROJECT, wxCDMMainFrame::OnMenuNewProject) EVT_BUTTON(ID_BUTTON_OPENPROJECT, wxCDMMainFrame::OnMenuOpenProject) + EVT_TREE_SEL_CHANGED(ID_TREE_PROJECTS, wxCDMMainFrame::OnTreeSelectionChanged) + EVT_COMMAND(wxID_ANY, wxEVT_DISPLAY_CHANGED, wxCDMMainFrame::OnCreationComplete) EVT_COMMAND(wxID_ANY, wxEVT_COMMAND_LIST_ITEM_SELECTED, wxCDMMainFrame::OnElementSelected) EVT_COMMAND(wxID_ANY, wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxCDMMainFrame::OnElementDeselected) + + EVT_CHECKBOX(ID_CHECKBOX_DISABLE_HELP, wxCDMMainFrame::OnDisableHelp) END_EVENT_TABLE() @@ -129,6 +133,16 @@ modelCDMMain* wxCDMMainFrame::GetModel() const return this->model; } +wxPanel* wxCDMMainFrame::GetPropertiesPanel() const +{ + return this->panel_Properties; +} + +bool wxCDMMainFrame::isHelp() const +{ + return this->help; +} + void wxCDMMainFrame::RefreshProject() { std::string* result; @@ -629,7 +643,6 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event) //project modelCDMProject* elementProject = dynamic_cast(element); wxPanel* description; - wxDialog* helpDialog = NULL; if(elementProject != NULL) { //create element description @@ -643,10 +656,6 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event) 0 ); - if(this->help) - { - helpDialog = new wxCDMProjectHelpDialog(this, wxID_ANY); - } } else { @@ -664,6 +673,7 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event) wxSize(600, 400), 0 ); + } else { @@ -841,10 +851,7 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event) //set new view this->panel_Properties = description; - if(this->help && helpDialog != NULL) - { - helpDialog->Show(true); - } + //auiManager.AddPane(panel_Properties, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("Properties")).BestSize(600,400).CloseButton(false)); auiManager.Update(); event.Skip(); @@ -860,6 +867,7 @@ void wxCDMMainFrame::OnCreationComplete(wxCommandEvent& event) { case 0: //select out old one to generate selection event + this->tree_Projects->SelectItem(event.GetInt(), false); this->tree_Projects->SelectItem(event.GetInt(), true); this->tree_Projects->Expand(event.GetInt()); break; @@ -934,6 +942,7 @@ void wxCDMMainFrame::OnElementSelected(wxCommandEvent& event) this->tree_Projects->EnsureVisible(event.GetInt()); this->tree_Projects->SetItemBold(event.GetInt(), true); this->tree_Projects->SetItemTextColour(event.GetInt(), wxColour(0,0,255)); + this->tree_Projects->SetItemBackgroundColour(event.GetInt(), wxColour(230,230,255)); this->tree_Projects->UpdateWindowUI(wxUPDATE_UI_RECURSE); auiManager.Update(); } @@ -942,6 +951,7 @@ void wxCDMMainFrame::OnElementDeselected(wxCommandEvent& event) { this->tree_Projects->SetItemBold(event.GetInt(), false); this->tree_Projects->SetItemTextColour(event.GetInt(), wxColour(0,0,0)); + this->tree_Projects->SetItemBackgroundColour(event.GetInt(), wxColour(255,255,255)); this->tree_Projects->UpdateWindowUI(wxUPDATE_UI_RECURSE); auiManager.Update(); }