SyntaxHighlightDlg::SyntaxHighlightDlg( wxWindow* parent ) : SyntaxHighlightBaseDlg( parent ), restartRequired(false) { GetSizer()->Insert(0, CreateSyntaxHighlightPage(), 1, wxALL|wxEXPAND, 5); GetSizer()->Layout(); GetSizer()->Fit(this); m_buttonOk->SetFocus(); WindowAttrManager::Load(this, wxT("SyntaxHighlightDlgAttr"), NULL); }
OptionsDlg::OptionsDlg( wxWindow* parent, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->Centre( wxBOTH ); wxBoxSizer* mainSizer; mainSizer = new wxBoxSizer( wxVERTICAL ); long nbStyle = wxFNB_FF2 | wxFNB_NO_NAV_BUTTONS | wxFNB_NO_X_BUTTON | wxFNB_NODRAG | wxFNB_BACKGROUND_GRADIENT; m_book = new wxFlatNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, nbStyle ); m_book->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); m_book->AddPage( CreateGeneralPage(), wxT("General"), true ); m_book->AddPage( CreateSyntaxHighlightPage(), wxT("Syntax Highlight"), false ); mainSizer->Add( m_book, 1, wxEXPAND | wxALL, 5 ); m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); mainSizer->Add( m_staticline1, 0, wxALL|wxEXPAND, 5 ); wxBoxSizer* btnSizer; btnSizer = new wxBoxSizer( wxHORIZONTAL ); m_okButton = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); btnSizer->Add( m_okButton, 0, wxALIGN_RIGHT|wxALL, 5 ); m_cancelButton = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); btnSizer->Add( m_cancelButton, 0, wxALIGN_RIGHT|wxALL, 5 ); m_applyButton = new wxButton( this, wxID_APPLY, wxT("Apply"), wxDefaultPosition, wxDefaultSize, 0 ); btnSizer->Add( m_applyButton, 0, wxALIGN_RIGHT|wxALL, 5 ); mainSizer->Add( btnSizer, 0, wxALIGN_RIGHT, 5 ); this->SetSizer( mainSizer ); this->Layout(); }