- m_TreeCtrl = new EditorTreeCtrl(m_Splitter, ID_TREE, this);
- m_ImgList = new wxImageList(16, 16);
- m_ImgList->Add(wxICON(control));
- m_ImgList->Add(wxICON(panel));
- m_ImgList->Add(wxICON(vsizer));
- m_ImgList->Add(wxICON(hsizer));
- m_ImgList->Add(wxICON(gsizer));
- m_ImgList->Add(wxICON(resicon));
-
- m_TreeCtrl->SetImageList(m_ImgList);
-
-
- // Create properties panel:
- m_Splitter2 = new wxSplitterWindow(m_Splitter);
- m_PropsPanel = new wxPanel(m_Splitter2, -1, wxDefaultPosition,
- wxDefaultSize, wxTAB_TRAVERSAL);
-
- wxSizer *sizer3 = new wxBoxSizer(wxVERTICAL);
-
- wxSizer *sz = new wxBoxSizer(wxHORIZONTAL);
-
- sizer3->Add(new wxButton(m_PropsPanel, ID_EDITCODE, "Edit XML code"),
- 0, wxALL | wxEXPAND, 2);
- sz->Add(new wxStaticText(m_PropsPanel, -1, _("XMLID name:")),
- 0, wxLEFT | wxALIGN_CENTER_VERTICAL, 2);
- m_XMLIDCtrl = new wxTextCtrl(m_PropsPanel, ID_XMLIDEDIT, "");
- sz->Add(m_XMLIDCtrl, 1, wxLEFT|wxRIGHT, 2);
- sz->Add(new wxButton(m_PropsPanel, ID_XMLIDPICK, "...", wxDefaultPosition, wxSize(16,-1)),
- 0, wxRIGHT, 2);
- sizer3->Add(sz, 0, wxTOP|wxEXPAND, 2);
-
- m_PropsList = new wxListCtrl(m_PropsPanel, ID_PROPSLIST, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_SINGLE_SEL);
-
- m_ImgListProp = new wxImageList(16, 16);
- m_ImgListProp->Add(wxICON(unused));
- m_ImgListProp->Add(wxICON(used));
- m_PropsList->SetImageList(m_ImgListProp, wxIMAGE_LIST_SMALL);
-
- m_PropsList->InsertColumn(0, _("Property"));
- m_PropsList->InsertColumn(1, _("Value"));
- m_PropsList->SetColumnWidth(0, cfg->Read("editor_col0", wxLIST_AUTOSIZE_USEHEADER));
- m_PropsList->SetColumnWidth(1, cfg->Read("editor_col1", wxLIST_AUTOSIZE_USEHEADER));
-
- sizer3->Add(m_PropsList, 1, wxALL | wxEXPAND, 2);
-
- m_PropsPanel->SetAutoLayout(TRUE);
- m_PropsPanel->SetSizer(sizer3);
- m_PropsPanel->Layout();
-
- m_PropsEditPanel = new wxScrolledWindow(m_Splitter2, -1, wxDefaultPosition,
- wxDefaultSize, wxTAB_TRAVERSAL);
-
- m_Splitter->SplitVertically(m_TreeCtrl, m_Splitter2);
- m_Splitter->SetSashPosition(cfg->Read("editor_sash", 140));
-
- m_Splitter2->SplitHorizontally(m_PropsPanel, m_PropsEditPanel);
- m_Splitter2->SetSashPosition(cfg->Read("editor_sash2", 100));
-
- p->SetAutoLayout(TRUE);
- p->SetSizer(sizer2);
-
-
-
- SetAutoLayout(TRUE);
+ m_TreeCtrl = new EditorTreeCtrl(this, ID_TREE, this);
+ wxImageList *imgList = new wxImageList(16, 16);
+ imgList->Add(wxICON(control));
+ imgList->Add(wxICON(panel));
+ imgList->Add(wxICON(vsizer));
+ imgList->Add(wxICON(hsizer));
+ imgList->Add(wxICON(gsizer));
+ imgList->Add(wxICON(resicon));
+ m_TreeCtrl->AssignImageList(imgList);
+ sizer->Add(m_TreeCtrl, 1, wxEXPAND);
+