//============================================================================== browsers::topedlay_list::topedlay_list(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style) : wxListCtrl(parent, id, pos, size, style) { InsertColumn(0, wxT(" No ")); InsertColumn(1, wxT(" Name ")); InsertColumn(2, wxT(" S ")); SetColumnWidth(0, wxLIST_AUTOSIZE_USEHEADER); SetColumnWidth(1, wxLIST_AUTOSIZE_USEHEADER); SetColumnWidth(2, wxLIST_AUTOSIZE_USEHEADER); _imageList = DEBUG_NEW wxImageList(16, 16, TRUE); #ifdef __WXMSW__ /*@TODO : Under windows - resource loading*/ // m_imageListNormal->Add( wxIcon(_T("icon1"), wxBITMAP_TYPE_ICO_RESOURCE) ); // #else //SGREM!!! Troubles with the gdb on Linux with threads! // I spent a night debugging a stupid mistake with traversing the tree // to realize finally that the gdb is doing some funny things when // stepping over next two lines. The troble comes from wxIcon constructor, // that internally is calling gdk_pixmap_create_from_xpm_d _imageList->Add( wxIcon( activelay ) ); _imageList->Add( wxIcon( lock ) ); #endif // SetBackgroundColour(wxColour("LIGHTGREY")); SetImageList(_imageList,wxIMAGE_LIST_SMALL); _llfont_normal.SetPointSize(9); _llfont_bold.SetPointSize(9); _llfont_bold.SetWeight(wxBOLD); }
ModelPanel::ModelPanel(wxWindow* parent, wxWindowID id /*= wxID_ANY*/, const wxPoint& pos /*= wxDefaultPosition*/, const wxSize& size /*= wxDefaultSize*/) :wxPanel(parent, id, pos, size) { mIconList = New wxImageList(16, 16, true); mIconList->Add(wxIcon(L"./Assets/Icons/model.ico", wxBITMAP_TYPE_ICO)); createWxCtrls(); }
//============================================================================== browsers::TDTbrowser::TDTbrowser(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style) : wxPanel(parent, id, pos, size) //, //style | wxTR_FULL_ROW_HIGHLIGHT) { wxBoxSizer *thesizer = DEBUG_NEW wxBoxSizer( wxVERTICAL ); wxBoxSizer *sizer1 = DEBUG_NEW wxBoxSizer( wxHORIZONTAL ); _hierButton = DEBUG_NEW wxButton( this, BT_CELLS_HIER, wxT("Hier") ); //Set bold font for _hierButton wxFont font = _hierButton->GetFont(); font.SetWeight(wxFONTWEIGHT_BOLD); _hierButton->SetFont(font); _flatButton = DEBUG_NEW wxButton( this, BT_CELLS_FLAT, wxT("Flat") ); sizer1->Add(_hierButton, 1, wxEXPAND|wxBOTTOM, 3); sizer1->Add(_flatButton, 1, wxEXPAND|wxBOTTOM, 3); fCellBrowser = DEBUG_NEW CellBrowser(this, tui::ID_TPD_CELLTREE_F,pos, size, style); hCellBrowser = DEBUG_NEW CellBrowser(this, tui::ID_TPD_CELLTREE_H, pos, size, style); thesizer->Add(hCellBrowser, 1, wxEXPAND | wxBOTTOM); thesizer->Add(fCellBrowser, 1, wxEXPAND | wxBOTTOM); fCellBrowser->Hide(); thesizer->Add(sizer1, 0, wxEXPAND | wxALL); _imageList = DEBUG_NEW wxImageList(16, 16, TRUE); #ifdef __WXMSW__ /*TODO : Under windows - resource loading*/ // m_imageListNormal->Add( wxIcon(_T("icon1"), wxBITMAP_TYPE_ICO_RESOURCE) ); // #else _imageList->Add( wxIcon( cell_normal ) ); _imageList->Add( wxIcon( cell_expanded ) ); #endif hCellBrowser->SetImageList(_imageList); // _llfont_bold.SetWeight(wxBOLD); // _llfont_normal.SetWeight(wxNORMAL); SetSizerAndFit(thesizer); thesizer->SetSizeHints( this ); }