void MainBook::CreateGuiControls() { wxBoxSizer* sz = new wxBoxSizer(wxVERTICAL); SetSizer(sz); m_messagePane = new MessagePane(this); sz->Add(m_messagePane, 0, wxALL | wxEXPAND, 5, NULL); m_navBar = new NavBar(this); sz->Add(m_navBar, 0, wxEXPAND); long style = kNotebook_AllowDnD | // Allow tabs to move kNotebook_MouseMiddleClickClosesTab | // Handle mouse middle button when clicked on a tab kNotebook_MouseMiddleClickFireEvent | // instead of closing the tab, fire an event kNotebook_ShowFileListButton | // show drop down list of all open tabs kNotebook_EnableNavigationEvent | // Notify when user hit Ctrl-TAB or Ctrl-PGDN/UP kNotebook_UnderlineActiveTab; // Mark active tab with dedicated coloured line if(EditorConfigST::Get()->GetOptions()->IsTabHasXButton()) { style |= (kNotebook_CloseButtonOnActiveTabFireEvent | kNotebook_CloseButtonOnActiveTab); } // load the notebook style from the configuration settings m_book = new Notebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style); sz->Add(m_book, 1, wxEXPAND); m_quickFindBar = new QuickFindBar(this); DoPositionFindBar(2); sz->Layout(); }
void MainBook::CreateGuiControls() { wxBoxSizer *sz = new wxBoxSizer(wxVERTICAL); SetSizer(sz); m_messagePane = new MessagePane(this); sz->Add(m_messagePane, 0, wxALL|wxEXPAND, 5, NULL); m_navBar = new NavBar(this); sz->Add(m_navBar, 0, wxEXPAND); long style = wxVB_HAS_X|wxVB_MOUSE_MIDDLE_CLOSE_TAB; #if !CL_USE_NATIVEBOOK style |= wxAUI_NB_WINDOWLIST_BUTTON | wxAUI_NB_SCROLL_BUTTONS; #endif // load the notebook style from the configuration settings m_book = new Notebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style); m_book->SetRightClickMenu(wxXmlResource::Get()->LoadMenu(wxT("editor_tab_right_click"))); sz->Add(m_book, 1, wxEXPAND); m_quickFindBar = new QuickFindBar(this); DoPositionFindBar(2); sz->Layout(); }
void MainBook::ApplySettingsChanges() { std::vector<LEditor*> editors; GetAllEditors(editors, MainBook::kGetAll_IncludeDetached); for (size_t i = 0; i < editors.size(); i++) { editors[i]->SetSyntaxHighlight(editors[i]->GetContext()->GetName()); } clMainFrame::Get()->UpdateAUI(); // Last: reposition the findBar DoPositionFindBar(2); }