X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FwxCDMCMakeListsDescriptionPanel.cpp;h=ea0d465b08fd266d7d2ce4e614e4f6c8b973fb47;hb=9877d27eb9a1339d97bc8e13ec5f1f75a5dc9e3f;hp=6fd19d595ef2b794a001d5f954ac71961125daec;hpb=5ff0bb2664c3cd508c1dd438666a71b8a96459c3;p=crea.git diff --git a/lib/creaDevManagerLib/wxCDMCMakeListsDescriptionPanel.cpp b/lib/creaDevManagerLib/wxCDMCMakeListsDescriptionPanel.cpp index 6fd19d5..ea0d465 100644 --- a/lib/creaDevManagerLib/wxCDMCMakeListsDescriptionPanel.cpp +++ b/lib/creaDevManagerLib/wxCDMCMakeListsDescriptionPanel.cpp @@ -75,6 +75,9 @@ bool wxCDMCMakeListsDescriptionPanel::Create( wxPanel::Create(parent, id, pos, size, style); this->cMakeLists = makefile; CreateControls(); + // this part makes the scrollbars show up + this->FitInside(); // ask the sizer about the needed size + this->SetScrollRate(5, 5); return TRUE; } @@ -85,16 +88,17 @@ void wxCDMCMakeListsDescriptionPanel::CreateControls() //Links to return wxBoxSizer *linksSizer = new wxBoxSizer(wxHORIZONTAL); std::vector parents = this->cMakeLists->GetParents(); - for (int i = 0; i < parents.size(); i++) + for (int i = 0; i < (int)(parents.size()); i++) { - wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath())); + wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE); + returnLnk->SetWindowStyle(wxNO_BORDER); returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + ".")); linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5); - if (i < parents.size()-1) - { - linksSizer->Add(new wxStaticText(this,wxID_ANY, wxT("/")), 0, wxALIGN_CENTER, 0); - } + linksSizer->Add(new wxStaticText(this,wxID_ANY, wxT("/")), 0, wxALIGN_CENTER, 0); } + + linksSizer->Add(new wxStaticText(this, wxID_ANY, crea::std2wx(this->cMakeLists->GetName())), 0, wxALIGN_CENTER, 0); + sizer->Add(linksSizer, 0, wxALIGN_CENTER | wxALL, 5); //Header @@ -144,7 +148,7 @@ void wxCDMCMakeListsDescriptionPanel::OnBtnReturn(wxHyperlinkEvent& event) std::vector parents = this->cMakeLists->GetParents(); std::string parentURL = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL()); //std::cout << parentURL << std::endl; - for (int i = 0; i < parents.size(); i++) + for (int i = 0; i < (int)(parents.size()); i++) { if (parents[i]->GetPath() == parentURL) {