Program: bbtk
Module: $RCSfile: bbtkWxGUIPackageBrowser2.cxx,v $
Language: C++
-Date: $Date: 2008/04/04 08:04:05 $
-Version: $Revision: 1.1 $
+Date: $Date: 2008/04/04 09:45:04 $
+Version: $Revision: 1.2 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
- mName = new wxStaticText(this,-1,_T(""));
- sizer->Add(mName,0,wxGROW);
+ // mName = new wxStaticText(this,-1,_T(""));
+ // sizer->Add(mName,0,wxGROW);
mDescription = new wxStaticText(this,-1,_T(""));
sizer->Add(mDescription,0,wxGROW);
mAuthor = new wxStaticText(this,-1,_T(""));
| wxSUNKEN_BORDER);
- inputs->Add(mInputList,0,wxGROW);
- sizer->Add(inputs,0,wxGROW);
+ inputs->Add(mInputList,1,wxGROW);
+ sizer->Add(inputs,1,wxGROW);
wxBoxSizer *outputs =
new wxStaticBoxSizer
wxLC_REPORT //wxLC_LIST
| wxSUNKEN_BORDER);
- outputs->Add(mOutputList,0,wxGROW);
- sizer->Add(outputs,0,wxGROW);
+ outputs->Add(mOutputList,1,wxGROW);
+ sizer->Add(outputs,1,wxGROW);
SetSizer(sizer);
//================================================================
void WxGUIBlackBoxInfo::UpdateInfo(BlackBoxDescriptor* descr)
{
- std::cout << "UpdateInfo "<<descr<<std::endl;
- mName->SetLabel(std2wx(descr->GetTypeName()));
+
+ // mName->SetLabel(std2wx(descr->GetTypeName()));
mDescription->SetLabel(std2wx(descr->GetDescription()));
mAuthor->SetLabel(std2wx(descr->GetAuthor()));
mCategory->SetLabel(std2wx(descr->GetCategory()));
mUser(user),
mInterpreter(0)
{
+ m_mgr.SetManagedWindow(this);
- wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
+ // wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
mBoxList = new WxGUIBlackBoxList(this, LIST_CTRL,
wxDefaultPosition,
wxDefaultSize,
| wxSUNKEN_BORDER);
mBoxList->SetUser(this);
mBoxList->SetBackgroundColour(*wxWHITE);
- sizer->Add(mBoxList,5,wxGROW);
- mBoxInfo = new WxGUIBlackBoxInfo(this);
- sizer->Add(mBoxInfo,3,wxGROW);
+ m_mgr.AddPane(mBoxList,
+ wxAuiPaneInfo().Name(wxT("BoxList"))
+ .Caption(wxT("Black Boxes"))
+ .MinimizeButton(true)
+ .MaximizeButton(true)
+ .Center()
+ .MinSize(wxSize(100,100))
+ );
+ // sizer->Add(mBoxList,5,wxGROW);
+ mBoxInfo = new WxGUIBlackBoxInfo(this);
+ // sizer->Add(mBoxInfo,3,wxGROW);
+
+ m_mgr.AddPane(mBoxInfo,
+ wxAuiPaneInfo().Name(wxT("Box"))
+ .Caption(wxT(""))
+ .MinimizeButton(true)
+ .MaximizeButton(true)
+ .Bottom()
+ .MinSize(wxSize(100,100))
+ );
- wxBoxSizer *fsizer = new wxStaticBoxSizer
- ( new wxStaticBox(this, wxID_ANY, _T("Filters")), wxHORIZONTAL );
-
- mPackageFilter = new wxTextCtrl(this,id_f1,_T(""),
+ wxPanel* filters = new wxPanel(this,-1);
+ wxBoxSizer *fsizer = new wxBoxSizer(wxVERTICAL );
+ wxBoxSizer *fpack =
+ new wxStaticBoxSizer
+ ( new wxStaticBox(filters, wxID_ANY, _T("Package")), wxHORIZONTAL );
+ mPackageFilter = new wxTextCtrl(filters,id_f1,_T(""),
wxDefaultPosition,
wxDefaultSize,
wxTE_PROCESS_ENTER);
- fsizer->Add(mPackageFilter,1,wxGROW);
- mNameFilter = new wxTextCtrl(this,id_f2,_T(""),
+ fpack->Add(mPackageFilter,1,wxGROW);
+ fsizer->Add(fpack,0,wxGROW);
+ wxBoxSizer *fname =
+ new wxStaticBoxSizer
+ ( new wxStaticBox(filters, wxID_ANY, _T("Name")), wxHORIZONTAL );
+ mNameFilter = new wxTextCtrl(filters,id_f2,_T(""),
wxDefaultPosition,
wxDefaultSize,
wxTE_PROCESS_ENTER);
- fsizer->Add(mNameFilter,1,wxGROW);
- mDescriptionFilter = new wxTextCtrl(this,id_f3,_T(""),
+ fname->Add(mNameFilter,1,wxGROW);
+ fsizer->Add(fname,0,wxGROW);
+ wxBoxSizer *fdescr =
+ new wxStaticBoxSizer
+ ( new wxStaticBox(filters, wxID_ANY, _T("Description")), wxHORIZONTAL );
+ mDescriptionFilter = new wxTextCtrl(filters,id_f3,_T(""),
wxDefaultPosition,
wxDefaultSize,
wxTE_PROCESS_ENTER);
- fsizer->Add(mDescriptionFilter,1,wxGROW);
- mCategoryFilter = new wxTextCtrl(this,id_f4,_T(""),
+ fdescr->Add(mDescriptionFilter,1,wxGROW);
+ fsizer->Add(fdescr,0,wxGROW);
+ wxBoxSizer *fcat =
+ new wxStaticBoxSizer
+ ( new wxStaticBox(filters, wxID_ANY, _T("Category")), wxHORIZONTAL );
+ mCategoryFilter = new wxTextCtrl(filters,id_f4,_T(""),
wxDefaultPosition,
wxDefaultSize,
wxTE_PROCESS_ENTER);
- fsizer->Add(mCategoryFilter,1,wxGROW);
- mInputTypeFilter = new wxTextCtrl(this,id_f4,_T(""),
+ fcat->Add(mCategoryFilter,1,wxGROW);
+ fsizer->Add(fcat,0,wxGROW);
+ wxBoxSizer *fintype =
+ new wxStaticBoxSizer
+ ( new wxStaticBox(filters, wxID_ANY, _T("Input type")), wxHORIZONTAL );
+ mInputTypeFilter = new wxTextCtrl(filters,id_f4,_T(""),
wxDefaultPosition,
wxDefaultSize,
wxTE_PROCESS_ENTER);
- fsizer->Add(mInputTypeFilter,1,wxGROW);
- mOutputTypeFilter = new wxTextCtrl(this,id_f4,_T(""),
+ fintype->Add(mInputTypeFilter,1,wxGROW);
+ fsizer->Add(fintype,0,wxGROW);
+ wxBoxSizer *fouttype =
+ new wxStaticBoxSizer
+ ( new wxStaticBox(filters, wxID_ANY, _T("Output type")), wxHORIZONTAL );
+ mOutputTypeFilter = new wxTextCtrl(filters,id_f4,_T(""),
wxDefaultPosition,
wxDefaultSize,
wxTE_PROCESS_ENTER);
- fsizer->Add(mOutputTypeFilter,1,wxGROW);
+ fouttype->Add(mOutputTypeFilter,1,wxGROW);
+ fsizer->Add(fouttype,0,wxGROW);
+
+ filters->SetSizer(fsizer);
+
+ m_mgr.AddPane(filters,
+ wxAuiPaneInfo().Name(wxT("Filter"))
+ .Caption(wxT("Filter"))
+ .MinimizeButton(true)
+ .MaximizeButton(true)
+ .Right()
+ .MinSize(wxSize(100,100)) );
- sizer->Add(fsizer,1,wxGROW);
- SetSizer(sizer);
+ // sizer->Add(fsizer,1,wxGROW);
+ m_mgr.Update();
+
+ // SetSizer(sizer);
SetAutoLayout(true);
Layout();
void WxGUIPackageBrowser2::WxGUIBlackBoxListUserOnSelected( BlackBoxDescriptor* d)
{
mBoxInfo->UpdateInfo(d);
+ std::string title = d->GetPackage()->GetName()+"::"+d->GetTypeName();
+ m_mgr.GetPane(mBoxInfo).Caption(std2wx(title));
+ m_mgr.Update();
}
//================================================================