void ConfigurationManagerDlg::InitDialog() { // Connect events ConnectButton(m_buttonOK, ConfigurationManagerDlg::OnButtonOK); ConnectButton(m_buttonApply, ConfigurationManagerDlg::OnButtonApply); m_buttonApply->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( ConfigurationManagerDlg::OnButtonApplyUI ), NULL, this ); ConnectChoice(m_choiceConfigurations, ConfigurationManagerDlg::OnWorkspaceConfigSelected); }
void DependenciesDlg::Init() { //fill the pages of the choice book wxArrayString projects; ManagerST::Get()->GetProjectList(projects); wxString activeProj = ManagerST::Get()->GetActiveProjectName(); for(size_t i=0; i<projects.GetCount(); i++) { m_book->AddPage(new DependenciesPage(m_book, projects.Item(i)), projects.Item(i), m_projectName == projects.Item(i)); } //connect events ConnectButton(m_buttonOK, DependenciesDlg::OnButtonOK); ConnectButton(m_buttonCancel, DependenciesDlg::OnButtonCancel); }
void DependenciesDlg::Init() { // fill the pages of the choice book wxArrayString projects; ManagerST::Get()->GetProjectList(projects); for(size_t i = 0; i < projects.GetCount(); i++) { m_book->AddPage(new DependenciesPage(m_book, projects.Item(i)), projects.Item(i), false); } CallAfter(&DependenciesDlg::DoSelectProject); // connect events ConnectButton(m_buttonOK, DependenciesDlg::OnButtonOK); ConnectButton(m_buttonCancel, DependenciesDlg::OnButtonCancel); }
CloseAllDialog::CloseAllDialog( wxWindow* parent, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); wxBoxSizer* mainSizer; mainSizer = new wxBoxSizer( wxVERTICAL ); m_mainPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* panelSizer; panelSizer = new wxBoxSizer( wxVERTICAL ); m_staticMsg = new wxStaticText( m_mainPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); panelSizer->Add( m_staticMsg, 1, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); wxBoxSizer* buttonSizer; buttonSizer = new wxBoxSizer( wxHORIZONTAL ); m_buttonSave = new wxButton( m_mainPanel, wxID_ANY, wxT("Ask me for each file"), wxDefaultPosition, wxDefaultSize, 0 ); buttonSizer->Add( m_buttonSave, 0, wxALL, 5 ); m_buttonSaveAllFiles = new wxButton( m_mainPanel, wxID_ANY, wxT("Save all files"), wxDefaultPosition, wxDefaultSize, 0 ); buttonSizer->Add( m_buttonSaveAllFiles, 0, wxALL, 5 ); m_buttonDiscardChangesForAllFiles = new wxButton( m_mainPanel, wxID_ANY, wxT("Discard changes for all files"), wxDefaultPosition, wxDefaultSize, 0 ); buttonSizer->Add( m_buttonDiscardChangesForAllFiles, 0, wxALL, 5 ); panelSizer->Add( buttonSizer, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); m_mainPanel->SetSizer( panelSizer ); m_mainPanel->Layout(); panelSizer->Fit( m_mainPanel ); mainSizer->Add( m_mainPanel, 1, wxEXPAND | wxALL, 5 ); m_staticMsg->SetLabel(wxT("Some of the files are modified, what action should Lite Editor take?")); this->SetSizer( mainSizer ); this->Layout(); mainSizer->Fit(this); ConnectButton(m_buttonDiscardChangesForAllFiles, CloseAllDialog::OnDiscardAllClicked); ConnectButton(m_buttonSaveAllFiles, CloseAllDialog::OnSaveAll); ConnectButton(m_buttonSave, CloseAllDialog::OnAskForEachFile); }
DebuggerSettingsDlg::DebuggerSettingsDlg( wxWindow* parent ) :DebuggerSettingsBaseDlg( parent ) , m_selectedItem(wxNOT_FOUND) { //fill the notebook with the available debuggers Initialize(); ConnectButton(m_buttonOK, DebuggerSettingsDlg::OnOk); // center the dialog Centre(); m_listCtrl1->SetFocus(); GetSizer()->Fit(this); WindowAttrManager::Load(this, wxT("DbgSettingsDlg"), NULL); }
void DirPicker::ConnectEvents() { ConnectButton(m_button, DirPicker::OnButtonClicked); }
EditConfigurationDialog::EditConfigurationDialog( wxWindow* parent, const wxString &projectName, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style ) , m_projectName(projectName) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); wxBoxSizer* bSizer15; bSizer15 = new wxBoxSizer( wxVERTICAL ); m_panel6 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* bSizer17; bSizer17 = new wxBoxSizer( wxHORIZONTAL ); m_configurationsList = new wxListBox( m_panel6, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); bSizer17->Add( m_configurationsList, 1, wxALL|wxEXPAND, 5 ); ProjectSettingsPtr settings = ManagerST::Get()->GetProjectSettings(m_projectName); if(settings){ ProjectSettingsCookie cookie; BuildConfigPtr bldConf = settings->GetFirstBuildConfiguration(cookie); while(bldConf){ m_configurationsList->Append(bldConf->GetName()); bldConf = settings->GetNextBuildConfiguration(cookie); } } if(m_configurationsList->GetCount() > 0) m_configurationsList->SetSelection(0); wxBoxSizer* bSizer18; bSizer18 = new wxBoxSizer( wxVERTICAL ); m_buttonDelete = new wxButton( m_panel6, wxID_ANY, wxT("&Delete"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer18->Add( m_buttonDelete, 0, wxALL, 5 ); m_buttonRename = new wxButton( m_panel6, wxID_ANY, wxT("&Rename"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer18->Add( m_buttonRename, 0, wxALL, 5 ); bSizer17->Add( bSizer18, 0, wxEXPAND, 5 ); m_panel6->SetSizer( bSizer17 ); m_panel6->Layout(); bSizer17->Fit( m_panel6 ); bSizer15->Add( m_panel6, 1, wxALL|wxEXPAND, 5 ); m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); bSizer15->Add( m_staticline9, 0, wxEXPAND | wxALL, 5 ); wxBoxSizer* bSizer16; bSizer16 = new wxBoxSizer( wxHORIZONTAL ); m_buttonClose = new wxButton( this, wxID_OK, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer16->Add( m_buttonClose, 0, wxALL, 5 ); bSizer15->Add( bSizer16, 0, wxALIGN_CENTER, 5 ); this->SetSizer( bSizer15 ); this->Layout(); ConnectListBoxDClick(m_configurationsList, EditConfigurationDialog::OnItemDclick); ConnectButton(m_buttonClose, EditConfigurationDialog::OnButtonClose); ConnectButton(m_buttonRename, EditConfigurationDialog::OnButtonRename); ConnectButton(m_buttonDelete, EditConfigurationDialog::OnButtonDelete); }
TagsOptionsDlg::TagsOptionsDlg( wxWindow* parent, const TagsOptionsData& data, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style ) , m_data(data) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); wxBoxSizer* mainSizer; mainSizer = new wxBoxSizer( wxVERTICAL ); long bookStyle = wxFNB_FF2 | wxFNB_NO_NAV_BUTTONS | wxFNB_NO_X_BUTTON | wxFNB_BACKGROUND_GRADIENT; m_mainBook = new wxFlatNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, bookStyle); m_generalPage = new wxPanel( m_mainBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* bSizer4; bSizer4 = new wxBoxSizer( wxVERTICAL ); wxStaticBoxSizer* sbSizer2; sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( m_generalPage, -1, wxT("General:") ), wxVERTICAL ); m_checkParseComments = new wxCheckBox( m_generalPage, wxID_ANY, wxT("Parse comments"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer2->Add( m_checkParseComments, 0, wxALL, 5 ); m_checkDisplayComments = new wxCheckBox( m_generalPage, wxID_ANY, wxT("Display comments in tooltip"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer2->Add( m_checkDisplayComments, 0, wxALL, 5 ); m_checkDisplayTypeInfo = new wxCheckBox( m_generalPage, wxID_ANY, wxT("Display type info tooltips"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer2->Add( m_checkDisplayTypeInfo, 0, wxALL, 5 ); m_checkDisplayFunctionTip = new wxCheckBox( m_generalPage, wxID_ANY, wxT("Display function calltip"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer2->Add( m_checkDisplayFunctionTip, 0, wxALL, 5 ); bSizer4->Add( sbSizer2, 0, wxEXPAND, 5 ); wxStaticBoxSizer* sbSizer21; sbSizer21 = new wxStaticBoxSizer( new wxStaticBox( m_generalPage, -1, wxT("External Symbols Database:") ), wxVERTICAL ); m_checkLoadLastDB = new wxCheckBox( m_generalPage, wxID_ANY, wxT("Automatically load the recently used additional symbols database"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer21->Add( m_checkLoadLastDB, 0, wxALL, 5 ); m_checkLoadToMemory = new wxCheckBox( m_generalPage, wxID_ANY, wxT("Load external database symbols to memory"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer21->Add( m_checkLoadToMemory, 0, wxALL, 5 ); bSizer4->Add( sbSizer21, 0, wxEXPAND, 5 ); m_generalPage->SetSizer( bSizer4 ); m_generalPage->Layout(); bSizer4->Fit( m_generalPage ); m_mainBook->AddPage( m_generalPage, wxT("CodeLite"), false ); m_ctagsPage = new wxPanel( m_mainBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* bSizer6; bSizer6 = new wxBoxSizer( wxVERTICAL ); wxFlexGridSizer* fgSizer2; fgSizer2 = new wxFlexGridSizer( 2, 2, 0, 0 ); fgSizer2->AddGrowableCol( 1 ); fgSizer2->SetFlexibleDirection( wxBOTH ); fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); m_staticText1 = new wxStaticText( m_ctagsPage, wxID_ANY, wxT("Preprocessor file:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText1->Wrap( -1 ); fgSizer2->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_filePicker = new FilePicker(m_ctagsPage, wxID_ANY); fgSizer2->Add( m_filePicker, 0, wxEXPAND|wxALL, 5 ); m_staticText3 = new wxStaticText( m_ctagsPage, wxID_ANY, wxT("File Types:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText3->Wrap( -1 ); fgSizer2->Add( m_staticText3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_textFileSpec = new wxTextCtrl( m_ctagsPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizer2->Add( m_textFileSpec, 0, wxALL|wxEXPAND, 5 ); m_staticText5 = new wxStaticText( m_ctagsPage, wxID_ANY, wxT("Force Language:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText5->Wrap( -1 ); fgSizer2->Add( m_staticText5, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_comboBoxLang = new wxComboBox( m_ctagsPage, wxID_ANY, wxT("C++"), wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY ); m_comboBoxLang->Append( wxT("C++") ); m_comboBoxLang->Append( wxT("Java") ); fgSizer2->Add( m_comboBoxLang, 0, wxALL|wxEXPAND, 5 ); bSizer6->Add( fgSizer2, 0, wxEXPAND, 5 ); m_checkFilesWithoutExt = new wxCheckBox( m_ctagsPage, wxID_ANY, wxT("Parse files without extension"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer6->Add( m_checkFilesWithoutExt, 0, wxALL, 5 ); m_ctagsPage->SetSizer( bSizer6 ); m_ctagsPage->Layout(); bSizer6->Fit( m_ctagsPage ); m_mainBook->AddPage( m_ctagsPage, wxT("ctags"), true ); mainSizer->Add( m_mainBook, 1, wxEXPAND | wxALL, 5 ); m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); mainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); wxBoxSizer* bSizer3; bSizer3 = new wxBoxSizer( wxHORIZONTAL ); m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer3->Add( m_buttonOK, 0, wxALL, 5 ); m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer3->Add( m_buttonCancel, 0, wxALL, 5 ); mainSizer->Add( bSizer3, 0, wxALIGN_RIGHT, 5 ); this->SetSizer( mainSizer ); this->Layout(); InitValues(); ConnectButton(m_buttonOK, TagsOptionsDlg::OnButtonOK); }