////////////////////////////////////////////////////////////////////// // This file was auto-generated by codelite's wxCrafter Plugin // wxCrafter project file: wxcrafter.wxcp // Do not modify this file by hand! ////////////////////////////////////////////////////////////////////// #include "wxcrafter.h" // Declare the bitmap loading function extern void wxC9ED9InitBitmapResources(); static bool bBitmapLoaded = false; MainFrameBaseClass::MainFrameBaseClass(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxFrame(parent, id, title, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxC9ED9InitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* boxSizer1 = new wxBoxSizer(wxVERTICAL); this->SetSizer(boxSizer1); m_mainPanel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxTAB_TRAVERSAL); boxSizer1->Add(m_mainPanel, 1, wxEXPAND, WXC_FROM_DIP(5)); wxBoxSizer* boxSizer11 = new wxBoxSizer(wxVERTICAL); m_mainPanel->SetSizer(boxSizer11); wxFlexGridSizer* flexGridSizer15 = new wxFlexGridSizer(0, 2, 0, 0); flexGridSizer15->SetFlexibleDirection( wxBOTH ); flexGridSizer15->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer15->AddGrowableCol(0); flexGridSizer15->AddGrowableCol(1); boxSizer11->Add(flexGridSizer15, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5)); m_buttonConnect = new wxButton(m_mainPanel, wxID_CONNECT, _("Connect"), wxDefaultPosition, wxDLG_UNIT(m_mainPanel, wxSize(-1,-1)), 0); flexGridSizer15->Add(m_buttonConnect, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5)); m_buttonDisconnect = new wxButton(m_mainPanel, wxID_DISCONNECT, _("Disconnect"), wxDefaultPosition, wxDLG_UNIT(m_mainPanel, wxSize(-1,-1)), 0); flexGridSizer15->Add(m_buttonDisconnect, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5)); m_buttonList = new wxButton(m_mainPanel, wxID_LIST, _("List folders"), wxDefaultPosition, wxDLG_UNIT(m_mainPanel, wxSize(-1,-1)), 0); flexGridSizer15->Add(m_buttonList, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5)); m_stc = new wxStyledTextCtrl(m_mainPanel, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_mainPanel, wxSize(-1,-1)), 0); // Configure the fold margin m_stc->SetMarginType (4, wxSTC_MARGIN_SYMBOL); m_stc->SetMarginMask (4, wxSTC_MASK_FOLDERS); m_stc->SetMarginSensitive(4, true); m_stc->SetMarginWidth (4, 16); m_stc->SetProperty(wxT("fold"),wxT("1")); m_stc->MarkerDefine(wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_ARROWDOWN); m_stc->MarkerDefine(wxSTC_MARKNUM_FOLDER, wxSTC_MARK_ARROW); m_stc->MarkerDefine(wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_BACKGROUND); m_stc->MarkerDefine(wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_BACKGROUND); m_stc->MarkerDefine(wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_ARROW); m_stc->MarkerDefine(wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_ARROWDOWN); m_stc->MarkerDefine(wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_BACKGROUND); // Configure the tracker margin m_stc->SetMarginWidth(1, 0); // Configure the symbol margin m_stc->SetMarginType (2, wxSTC_MARGIN_SYMBOL); m_stc->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS)); m_stc->SetMarginWidth(2, 0); m_stc->SetMarginSensitive(2, true); // Configure the line numbers margin int m_stc_PixelWidth = 4 + 5 *m_stc->TextWidth(wxSTC_STYLE_LINENUMBER, wxT("9")); m_stc->SetMarginType(0, wxSTC_MARGIN_NUMBER); m_stc->SetMarginWidth(0,m_stc_PixelWidth); // Configure the line symbol margin m_stc->SetMarginType(3, wxSTC_MARGIN_FORE); m_stc->SetMarginMask(3, 0); m_stc->SetMarginWidth(3,0); // Select the lexer m_stc->SetLexer(wxSTC_LEX_NULL); // Set default font / styles m_stc->StyleClearAll(); m_stc->SetWrapMode(0); m_stc->SetIndentationGuides(0); m_stc->SetKeyWords(0, wxT("")); m_stc->SetKeyWords(1, wxT("")); m_stc->SetKeyWords(2, wxT("")); m_stc->SetKeyWords(3, wxT("")); m_stc->SetKeyWords(4, wxT("")); boxSizer11->Add(m_stc, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5)); m_menuBar = new wxMenuBar(0); this->SetMenuBar(m_menuBar); m_name6 = new wxMenu(); m_menuBar->Append(m_name6, _("File")); m_menuItem7 = new wxMenuItem(m_name6, wxID_EXIT, _("Exit\tAlt-X"), _("Quit"), wxITEM_NORMAL); m_name6->Append(m_menuItem7); m_name8 = new wxMenu(); m_menuBar->Append(m_name8, _("Help")); m_menuItem9 = new wxMenuItem(m_name8, wxID_ABOUT, _("About..."), wxT(""), wxITEM_NORMAL); m_name8->Append(m_menuItem9); SetName(wxT("MainFrameBaseClass")); SetSize(-1,-1); if (GetSizer()) { GetSizer()->Fit(this); } if(GetParent()) { CentreOnParent(wxBOTH); } else { CentreOnScreen(wxBOTH); } #if wxVERSION_NUMBER >= 2900 if(!wxPersistenceManager::Get().Find(this)) { wxPersistenceManager::Get().RegisterAndRestore(this); } else { wxPersistenceManager::Get().Restore(this); } #endif // Connect events m_buttonConnect->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnConnect), NULL, this); m_buttonConnect->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBaseClass::OnConnectUI), NULL, this); m_buttonDisconnect->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnDisconnect), NULL, this); m_buttonDisconnect->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBaseClass::OnDisconnectUI), NULL, this); m_buttonList->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnList), NULL, this); m_buttonList->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBaseClass::OnListUI), NULL, this); this->Connect(m_menuItem7->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnExit), NULL, this); this->Connect(m_menuItem9->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnAbout), NULL, this); } MainFrameBaseClass::~MainFrameBaseClass() { m_buttonConnect->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnConnect), NULL, this); m_buttonConnect->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBaseClass::OnConnectUI), NULL, this); m_buttonDisconnect->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnDisconnect), NULL, this); m_buttonDisconnect->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBaseClass::OnDisconnectUI), NULL, this); m_buttonList->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnList), NULL, this); m_buttonList->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBaseClass::OnListUI), NULL, this); this->Disconnect(m_menuItem7->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnExit), NULL, this); this->Disconnect(m_menuItem9->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnAbout), NULL, this); }