WebToolsSettingsBase::~WebToolsSettingsBase() { m_checkBoxEnableJsCC->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnModified), NULL, this); m_checkBoxEnableXmlCC->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnModified), NULL, this); m_checkBoxEnableHtmlCC->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnModified), NULL, this); m_pgMgr->Disconnect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(WebToolsSettingsBase::OnJSValueChanged), NULL, this); m_filePickerNodeJS->Disconnect(wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler(WebToolsSettingsBase::OnNodejsPath), NULL, this); m_button361->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnSuggestNodeJSPaths), NULL, this); m_filePickerNpm->Disconnect(wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler(WebToolsSettingsBase::OnNpmPath), NULL, this); m_button363->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnSuggestNodeJSPaths), NULL, this); m_checkBoxJSLint->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnLintOnSave), NULL, this); m_buttonOK->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(WebToolsSettingsBase::OnOKUI), NULL, this); m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnOK), NULL, this); m_buttonApply->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnApply), NULL, this); m_buttonApply->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(WebToolsSettingsBase::OnOKUI), NULL, this); }
MainDlg::~MainDlg() { // Disconnect Events m_filePickerVideo->Disconnect(wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( MainDlg::OnSelectVideo ), NULL, this); m_filePickerCal->Disconnect(wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( MainDlg::OnSelectCal ), NULL, this); m_start->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlg::OnStart ), NULL, this); m_exit->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlg::OnExit ), NULL, this); }
MyFrameBase::~MyFrameBase() { // Disconnect Events inDirPicker->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MyFrameBase::onInputSelect ), NULL, this ); outDirPicker->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MyFrameBase::onOutputSelect ), NULL, this ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrameBase::onUnused ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrameBase::onClose ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrameBase::onRun ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrameBase::onClear ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrameBase::onAbout ) ); }
PluginWizardBase::~PluginWizardBase() { this->Disconnect(wxEVT_WIZARD_PAGE_CHANGING, wxWizardEventHandler(PluginWizardBase::OnPageChanging), NULL, this); this->Disconnect(wxEVT_WIZARD_FINISHED, wxWizardEventHandler(PluginWizardBase::OnFinish), NULL, this); m_dirPickerPluginPath->Disconnect(wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler(PluginWizardBase::OnProjectPathChanged), NULL, this); }
ImportFilesDialogNewBase::~ImportFilesDialogNewBase() { m_dirPicker->Disconnect(wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler(ImportFilesDialogNewBase::OnDirChanged), NULL, this); m_dataview->Disconnect(wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler(ImportFilesDialogNewBase::OnValueChanged), NULL, this); m_dataview->Disconnect(wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING, wxDataViewEventHandler(ImportFilesDialogNewBase::OnItemExpanding), NULL, this); }
DIALOG_SELECT_PRETTY_LIB_BASE::~DIALOG_SELECT_PRETTY_LIB_BASE() { // Disconnect Events m_dirCtrl->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( DIALOG_SELECT_PRETTY_LIB_BASE::OnSelectFolder ), NULL, this ); m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SELECT_PRETTY_LIB_BASE::OnOKButton ), NULL, this ); }
NodeJSNewWorkspaceDlgBase::~NodeJSNewWorkspaceDlgBase() { m_textCtrllName->Disconnect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(NodeJSNewWorkspaceDlgBase::OnTextUpdate), NULL, this); m_dirPickerFolder->Disconnect(wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler(NodeJSNewWorkspaceDlgBase::OnFolderSelected), NULL, this); m_checkBoxNewFolder->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(NodeJSNewWorkspaceDlgBase::OnCheckNewFolder), NULL, this); m_button144->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NodeJSNewWorkspaceDlgBase::OnOKUI), NULL, this); }
CliCommandEditDialogGeneratedClass::~CliCommandEditDialogGeneratedClass() { // Disconnect Events ExecutableFilePicker->Disconnect( wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( CliCommandEditDialogGeneratedClass::OnFileChanged ), NULL, this ); Description->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( CliCommandEditDialogGeneratedClass::OnDescriptionText ), NULL, this ); ButtonsSizerHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CliCommandEditDialogGeneratedClass::OnHelpButton ), NULL, this ); ButtonsSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CliCommandEditDialogGeneratedClass::OnOkButton ), NULL, this ); }
MemCheckSettingsDialogBase::~MemCheckSettingsDialogBase() { m_bmpButton341->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemCheckSettingsDialogBase::ValgrindResetOptions), NULL, this); m_filePickerValgrindOutputFile->Disconnect(wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler(MemCheckSettingsDialogBase::OnValgrindOutputFileChanged), NULL, this); m_filePickerValgrindOutputFile->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MemCheckSettingsDialogBase::OnFilePickerValgrindOutputFileUI), NULL, this); m_listBoxSuppFiles->Disconnect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(MemCheckSettingsDialogBase::OnSuppListRightDown), NULL, this); m_button513->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemCheckSettingsDialogBase::OnOK), NULL, this); }
SpellCheckerSettings_base::~SpellCheckerSettings_base() { this->Disconnect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(SpellCheckerSettings_base::OnInitDialog), NULL, this); m_pDirPicker->Disconnect(wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler(SpellCheckerSettings_base::OnDirChanged), NULL, this); m_pLanguageList->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(SpellCheckerSettings_base::OnLanguageSelected), NULL, this); m_buttonClearIgnoreList->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SpellCheckerSettings_base::OnClearIgnoreList), NULL, this); m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SpellCheckerSettings_base::OnOk), NULL, this); m_buttonOK->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SpellCheckerSettings_base::OnUpdateOk), NULL, this); }
DIALOG_SELECT_PRETTY_LIB_BASE::DIALOG_SELECT_PRETTY_LIB_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); wxBoxSizer* bSizerMain; bSizerMain = new wxBoxSizer( wxVERTICAL ); m_staticText = new wxStaticText( this, wxID_ANY, _("The footprint library is a folder with a name ending with .pretty\nFootprints are .kicad_mod files inside this folder."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText->Wrap( -1 ); m_staticText->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); bSizerMain->Add( m_staticText, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); m_staticText3 = new wxStaticText( this, wxID_ANY, _("Path base:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText3->Wrap( -1 ); bSizerMain->Add( m_staticText3, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_dirCtrl = new wxDirPickerCtrl( this, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, wxDIRP_DEFAULT_STYLE ); bSizerMain->Add( m_dirCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_SizerNewLibName = new wxBoxSizer( wxVERTICAL ); m_staticTextDirname = new wxStaticText( this, wxID_ANY, _("Library folder (.pretty will be added to name, if missing)"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextDirname->Wrap( -1 ); m_SizerNewLibName->Add( m_staticTextDirname, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_libName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_SizerNewLibName->Add( m_libName, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bSizerMain->Add( m_SizerNewLibName, 0, wxEXPAND, 5 ); m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); bSizerMain->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); m_sdbSizer = new wxStdDialogButtonSizer(); m_sdbSizerOK = new wxButton( this, wxID_OK ); m_sdbSizer->AddButton( m_sdbSizerOK ); m_sdbSizerCancel = new wxButton( this, wxID_CANCEL ); m_sdbSizer->AddButton( m_sdbSizerCancel ); m_sdbSizer->Realize(); bSizerMain->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 ); this->SetSizer( bSizerMain ); this->Layout(); bSizerMain->Fit( this ); this->Centre( wxBOTH ); // Connect Events m_dirCtrl->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( DIALOG_SELECT_PRETTY_LIB_BASE::OnSelectFolder ), NULL, this ); m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SELECT_PRETTY_LIB_BASE::OnOKButton ), NULL, this ); }
otcurrentUIDialogBase::~otcurrentUIDialogBase() { // Disconnect Events this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( otcurrentUIDialogBase::OnClose ) ); this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( otcurrentUIDialogBase::OnSize ) ); m_datePickerDate->Disconnect( wxEVT_DATE_CHANGED, wxDateEventHandler( otcurrentUIDialogBase::OnDateTimeChanged ), NULL, this ); m_bpNow->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( otcurrentUIDialogBase::OnNow ), NULL, this ); m_dirPicker1->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( otcurrentUIDialogBase::OnFolderSelChanged ), NULL, this ); m_button1->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( otcurrentUIDialogBase::About ), NULL, this ); m_bpPrev->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( otcurrentUIDialogBase::OnPrev ), NULL, this ); m_bpNext->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( otcurrentUIDialogBase::OnNext ), NULL, this ); }
bool wxFileDirPickerCtrlBase::CreateBase(wxWindow *parent, wxWindowID id, const wxString &path, const wxString &message, const wxString &wildcard, const wxPoint &pos, const wxSize &size, long style, const wxValidator& validator, const wxString &name ) { wxASSERT_MSG(path.empty() || CheckPath(path), wxT("Invalid initial path!")); if (!wxPickerBase::CreateBase(parent, id, path, pos, size, style, validator, name)) return false; if (!HasFlag(wxFLP_OPEN) && !HasFlag(wxFLP_SAVE)) m_windowStyle |= wxFLP_OPEN; // wxFD_OPEN is the default // check that the styles are not contradictory wxASSERT_MSG( !(HasFlag(wxFLP_SAVE) && HasFlag(wxFLP_OPEN)), _T("can't specify both wxFLP_SAVE and wxFLP_OPEN at once") ); wxASSERT_MSG( !HasFlag(wxFLP_SAVE) || !HasFlag(wxFLP_FILE_MUST_EXIST), _T("wxFLP_FILE_MUST_EXIST can't be used with wxFLP_SAVE" ) ); wxASSERT_MSG( !HasFlag(wxFLP_OPEN) || !HasFlag(wxFLP_OVERWRITE_PROMPT), _T("wxFLP_OVERWRITE_PROMPT can't be used with wxFLP_OPEN") ); // create a wxFilePickerWidget or a wxDirPickerWidget... m_pickerIface = CreatePicker(this, path, message, wildcard); if ( !m_pickerIface ) return false; m_picker = m_pickerIface->AsControl(); // complete sizer creation wxPickerBase::PostCreation(); m_picker->Connect(GetEventType(), wxFileDirPickerEventHandler(wxFileDirPickerCtrlBase::OnFileDirChange), NULL, this); // default's wxPickerBase textctrl limit is too small for this control: // make it bigger if (m_text) m_text->SetMaxLength(512); return true; }
DbSelectionPanel::DbSelectionPanel(wxWindow* parent, const wxString& filePrompt, const wxString& filePickerCtrlTitle, bool autoValidate, PWScore* core, unsigned rowsep) : wxPanel(parent), m_filepicker(0), m_sc(0), m_bAutoValidate(autoValidate), m_core(core) { wxSizerFlags borderFlags = wxSizerFlags().Border(wxLEFT|wxRIGHT, SideMargin); /* This doesn't work since the second Border() call overwrites all the * previous border values. So now we have to insert separators by hand */ //wxSizerFlags rowFlags = borderFlags.Border(wxBOTTOM, RowSeparation); wxBoxSizer* panelSizer = new wxBoxSizer(wxVERTICAL); panelSizer->AddSpacer(TopMargin); panelSizer->Add(new wxStaticText(this, wxID_ANY, filePrompt), borderFlags); panelSizer->AddSpacer(RowSeparation); COpenFilePickerValidator validator(m_filepath); m_filepicker = new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString, filePickerCtrlTitle, _("Password Safe Databases (*.psafe4; *.psafe3; *.dat)|*.psafe4;*.psafe3;*.dat|Password Safe Backups (*.bak)|*.bak|Password Safe Intermediate Backups (*.ibak)|*.ibak|All files (*.*; *)|*.*;*"), wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE | wxFLP_USE_TEXTCTRL, validator); panelSizer->Add(m_filepicker, borderFlags.Expand()); panelSizer->AddSpacer(RowSeparation*rowsep); m_filepicker->Connect( m_filepicker->GetEventType(), wxFileDirPickerEventHandler(DbSelectionPanel::OnFilePicked), NULL, this); panelSizer->Add(new wxStaticText(this, wxID_ANY, _("Safe Combination:")), borderFlags); panelSizer->AddSpacer(RowSeparation); m_sc = new CSafeCombinationCtrl(this); m_sc->SetValidatorTarget(&m_combination); panelSizer->Add(m_sc, borderFlags.Expand()); SetSizerAndFit(panelSizer); //The parent window must call our TransferDataToWindow and TransferDataFromWindow m_parent->SetExtraStyle(wxWS_EX_VALIDATE_RECURSIVELY); }
wxBSAopt::~wxBSAopt() { // Disconnect Events this->Disconnect( wxID_AUTO, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeToAuto ) ); this->Disconnect( wxID_MORROWIND, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeToMorrowind ) ); this->Disconnect( wxID_OBLIVON, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeToOblivion ) ); this->Disconnect( wxID_FALLOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeToFallout ) ); this->Disconnect( wxID_FALLOUTXB, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeToFalloutXB ) ); this->Disconnect( wxID_SKYRIM, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeToSkyrim ) ); this->Disconnect( wxID_SKYRIMXB, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeToSkyrimXB ) ); this->Disconnect( wxID_FORCE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeForceCompression ) ); this->Disconnect( wxID_SKIPE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeSkipExisting ) ); this->Disconnect( wxID_SKIPN, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeSkipNewer ) ); this->Disconnect( wxID_SKIPH, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeSkipHidden ) ); this->Disconnect( wxID_SKIPC, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeSkipHash ) ); this->Disconnect( wxID_SKIPB, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeSkipBroken ) ); this->Disconnect( wxID_SKIPX, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeUnselectExtras ) ); this->Disconnect( wxID_LOGF, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeLogFile ) ); BOInput->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( wxBSAopt::ChangePluginDir ), NULL, this ); BOInText->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( wxBSAopt::TypedInDone ), NULL, this ); BOInText->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxBSAopt::TypedIn ), NULL, this ); BOInBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxBSAopt::BrowseIn ), NULL, this ); BOArchiveTree->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( wxBSAopt::DescentTreeItem ), NULL, this ); BOArchiveTree->Disconnect( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, wxTreeEventHandler( wxBSAopt::ActivateTreeItem ), NULL, this ); BOArchiveTree->Disconnect( wxEVT_COMMAND_TREE_ITEM_MENU, wxTreeEventHandler( wxBSAopt::MenuTreeItem ), NULL, this ); BOArchiveTree->Disconnect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( wxBSAopt::ChangeTreeItem ), NULL, this ); BOFilter->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeFilter ), NULL, this ); BOFilterApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxBSAopt::ApplyFilter ), NULL, this ); this->Disconnect( wxID_RESET, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( wxBSAopt::ResetFileList ) ); this->Disconnect( wxID_CLEAR, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( wxBSAopt::ClearFileList ) ); BORecursive->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( wxBSAopt::ChangeRecursion ), NULL, this ); BOOutText->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( wxBSAopt::TypedOutDone ), NULL, this ); BOOutText->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxBSAopt::TypedOut ), NULL, this ); BOOutBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxBSAopt::BrowseOut ), NULL, this ); BOConvert->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxBSAopt::ConversionStart ), NULL, this ); }
NodeJSNewWorkspaceDlgBase::NodeJSNewWorkspaceDlgBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxCD9C6InitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* boxSizer140 = new wxBoxSizer(wxVERTICAL); this->SetSizer(boxSizer140); wxFlexGridSizer* flexGridSizer148 = new wxFlexGridSizer(0, 2, 0, 0); flexGridSizer148->SetFlexibleDirection( wxBOTH ); flexGridSizer148->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer148->AddGrowableCol(1); boxSizer140->Add(flexGridSizer148, 1, wxALL|wxEXPAND, 5); m_staticText160 = new wxStaticText(this, wxID_ANY, _("Name:"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer148->Add(m_staticText160, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_textCtrllName = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0); m_textCtrllName->SetFocus(); #if wxVERSION_NUMBER >= 3000 m_textCtrllName->SetHint(wxT("")); #endif flexGridSizer148->Add(m_textCtrllName, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5); m_staticText150 = new wxStaticText(this, wxID_ANY, _("Path:"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer148->Add(m_staticText150, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_dirPickerFolder = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxSize(-1,-1), wxDIRP_SMALL|wxDIRP_DEFAULT_STYLE|wxDIRP_USE_TEXTCTRL); flexGridSizer148->Add(m_dirPickerFolder, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5); flexGridSizer148->Add(0, 0, 1, wxALL, 5); m_checkBoxNewFolder = new wxCheckBox(this, wxID_ANY, _("Create the workspace in a separate directory"), wxDefaultPosition, wxSize(-1,-1), 0); m_checkBoxNewFolder->SetValue(true); flexGridSizer148->Add(m_checkBoxNewFolder, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); m_staticTextPreview = new wxStaticText(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxALIGN_CENTRE); m_staticTextPreview->SetForegroundColour(wxColour(wxT("rgb(21,144,18)"))); boxSizer140->Add(m_staticTextPreview, 0, wxALL|wxEXPAND, 5); m_stdBtnSizer142 = new wxStdDialogButtonSizer(); boxSizer140->Add(m_stdBtnSizer142, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10); m_button144 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_button144->SetDefault(); m_stdBtnSizer142->AddButton(m_button144); m_button146 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_stdBtnSizer142->AddButton(m_button146); m_stdBtnSizer142->Realize(); SetName(wxT("NodeJSNewWorkspaceDlgBase")); 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_textCtrllName->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(NodeJSNewWorkspaceDlgBase::OnTextUpdate), NULL, this); m_dirPickerFolder->Connect(wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler(NodeJSNewWorkspaceDlgBase::OnFolderSelected), NULL, this); m_checkBoxNewFolder->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(NodeJSNewWorkspaceDlgBase::OnCheckNewFolder), NULL, this); m_button144->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NodeJSNewWorkspaceDlgBase::OnOKUI), NULL, this); }
WebToolsSettingsBase::WebToolsSettingsBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style) { if(!bBitmapLoaded) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxCD9C6InitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* boxSizer2 = new wxBoxSizer(wxVERTICAL); this->SetSizer(boxSizer2); m_notebook10 = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxBK_DEFAULT); m_notebook10->SetName(wxT("m_notebook10")); boxSizer2->Add(m_notebook10, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5)); m_panel56 = new wxPanel(m_notebook10, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook10, wxSize(-1, -1)), wxTAB_TRAVERSAL); m_notebook10->AddPage(m_panel56, _("Code Completion"), true); wxBoxSizer* boxSizer58 = new wxBoxSizer(wxVERTICAL); m_panel56->SetSizer(boxSizer58); m_checkBoxEnableJsCC = new wxCheckBox(m_panel56, wxID_ANY, _("Enable JavaScript code completion"), wxDefaultPosition, wxDLG_UNIT(m_panel56, wxSize(-1, -1)), 0); m_checkBoxEnableJsCC->SetValue(true); m_checkBoxEnableJsCC->SetToolTip(_("Enable JavaScript code completion")); boxSizer58->Add(m_checkBoxEnableJsCC, 0, wxALL, WXC_FROM_DIP(5)); m_checkBoxEnableXmlCC = new wxCheckBox(m_panel56, wxID_ANY, _("Enable XML code completion"), wxDefaultPosition, wxDLG_UNIT(m_panel56, wxSize(-1, -1)), 0); m_checkBoxEnableXmlCC->SetValue(true); m_checkBoxEnableXmlCC->SetToolTip(_("Enable XML code completion")); boxSizer58->Add(m_checkBoxEnableXmlCC, 0, wxALL, WXC_FROM_DIP(5)); m_checkBoxEnableHtmlCC = new wxCheckBox(m_panel56, wxID_ANY, _("Enable HTML code completion"), wxDefaultPosition, wxDLG_UNIT(m_panel56, wxSize(-1, -1)), 0); m_checkBoxEnableHtmlCC->SetValue(true); m_checkBoxEnableHtmlCC->SetToolTip(_("Enable HTML code completion")); boxSizer58->Add(m_checkBoxEnableHtmlCC, 0, wxALL, WXC_FROM_DIP(5)); m_panel12 = new wxPanel(m_notebook10, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook10, wxSize(-1, -1)), wxTAB_TRAVERSAL); m_notebook10->AddPage(m_panel12, _("JavaScript"), false); wxBoxSizer* boxSizer22 = new wxBoxSizer(wxVERTICAL); m_panel12->SetSizer(boxSizer22); wxArrayString m_pgMgrArr; wxUnusedVar(m_pgMgrArr); wxArrayInt m_pgMgrIntArr; wxUnusedVar(m_pgMgrIntArr); m_pgMgr = new wxPropertyGridManager(m_panel12, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel12, wxSize(400, 200)), wxPG_DESCRIPTION | wxPG_SPLITTER_AUTO_CENTER | wxPG_BOLD_MODIFIED); boxSizer22->Add(m_pgMgr, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5)); m_pgProp26 = m_pgMgr->Append(new wxPropertyCategory(_("General"))); m_pgProp26->SetHelpString(wxT("")); m_pgPropLogging = m_pgMgr->AppendIn(m_pgProp26, new wxBoolProperty(_("Verbose Logging"), wxPG_LABEL, 1)); m_pgPropLogging->SetHelpString( _("The JavaScript code completion uses the \"tern\" engine.\nCheck this option to start tern in verbose mode")); m_pgPropPortNumber = m_pgMgr->AppendIn(m_pgProp26, new wxIntProperty(_("Code completion engine port"), wxPG_LABEL, 12089)); m_pgPropPortNumber->SetHelpString(_("The port number on which 'tern' listens to\nTern is the code completion " "engine used by CodeLite for JavaScript")); m_pgProp32 = m_pgMgr->Append(new wxPropertyCategory(_("Libraries"))); m_pgProp32->SetHelpString(_("Enable Code Completion for the selected libraries")); m_pgPropEcma5 = m_pgMgr->AppendIn(m_pgProp32, new wxBoolProperty(_("Ecma5"), wxPG_LABEL, 1)); m_pgPropEcma5->SetHelpString(wxT("")); m_pgPropEcma6 = m_pgMgr->AppendIn(m_pgProp32, new wxBoolProperty(_("Ecma6"), wxPG_LABEL, 1)); m_pgPropEcma6->SetHelpString(wxT("")); m_pgPropJQuery = m_pgMgr->AppendIn(m_pgProp32, new wxBoolProperty(_("jQuery"), wxPG_LABEL, 1)); m_pgPropJQuery->SetHelpString(_("Support Code Completion for jQuery framework")); m_pgPropUnderscore = m_pgMgr->AppendIn(m_pgProp32, new wxBoolProperty(_("Underscore"), wxPG_LABEL, 1)); m_pgPropUnderscore->SetHelpString(_("Enable code completion for the Underscore library")); m_pgPropBrowser = m_pgMgr->AppendIn(m_pgProp32, new wxBoolProperty(_("Browser"), wxPG_LABEL, 1)); m_pgPropBrowser->SetHelpString(_("Enable code completion for browser mode (DOM, document, window etc)")); m_pgPropChai = m_pgMgr->AppendIn(m_pgProp32, new wxBoolProperty(_("Chai"), wxPG_LABEL, 1)); m_pgPropChai->SetHelpString(_("Enable code completion for the chain assertion library")); m_pgPropQML = m_pgMgr->AppendIn(m_pgProp32, new wxBoolProperty(_("QML"), wxPG_LABEL, 1)); m_pgPropQML->SetHelpString(_("Support for Qt's QML extension for JavaScript")); m_pgProp46 = m_pgMgr->Append(new wxPropertyCategory(_("Plugins"))); m_pgProp46->SetHelpString(wxT("")); m_pgPropAngular = m_pgMgr->AppendIn(m_pgProp46, new wxBoolProperty(_("Angular"), wxPG_LABEL, 1)); m_pgPropAngular->SetHelpString( _("Adds the angular object to the top-level environment, and tries to wire up some of the bizarre dependency " "management scheme from this library, so that dependency injections get the right types")); m_pgPropStrings = m_pgMgr->AppendIn(m_pgProp46, new wxBoolProperty(_("Strings"), wxPG_LABEL, 1)); m_pgPropStrings->SetHelpString( _("When enabled, this plugin will gather (short) strings in your code, and completing when inside a string " "will try to complete to previously seen strings")); m_pgPropNode = m_pgMgr->AppendIn(m_pgProp46, new wxBoolProperty(_("Node.js"), wxPG_LABEL, 1)); m_pgPropNode->SetHelpString( _("Provides variables that are part of the node environment, such as process and require, and hooks up require " "to try and find the dependencies that are being loaded, and assign them the correct types. It also includes " "types for the built-in modules that node.js provides (\"fs\", \"http\", etc)")); m_pgPropNodeExpress = m_pgMgr->AppendIn(m_pgProp46, new wxBoolProperty(_("Node Express"), wxPG_LABEL, 1)); m_pgPropNodeExpress->SetHelpString( _("A Tern plugin adding support for express web application framework for node. http://expressjs.com/")); m_pgPropWebPack = m_pgMgr->AppendIn(m_pgProp46, new wxBoolProperty(_("WebPack"), wxPG_LABEL, 1)); m_pgPropWebPack->SetHelpString(_("Support WebPack")); m_pgPropRequireJS = m_pgMgr->AppendIn(m_pgProp46, new wxBoolProperty(_("RequireJS"), wxPG_LABEL, 1)); m_pgPropRequireJS->SetHelpString( _("This plugin (\"requirejs\") teaches the server to understand RequireJS-style dependency management. It " "defines the global functions define and requirejs, and will do its best to resolve dependencies and give " "them their proper types")); m_panel237 = new wxPanel(m_notebook10, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook10, wxSize(-1, -1)), wxTAB_TRAVERSAL); m_notebook10->AddPage(m_panel237, _("Node.js"), false); wxBoxSizer* boxSizer239 = new wxBoxSizer(wxVERTICAL); m_panel237->SetSizer(boxSizer239); wxFlexGridSizer* flexGridSizer241 = new wxFlexGridSizer(0, 3, 0, 0); flexGridSizer241->SetFlexibleDirection(wxBOTH); flexGridSizer241->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED); flexGridSizer241->AddGrowableCol(1); boxSizer239->Add(flexGridSizer241, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5)); m_staticText243 = new wxStaticText(m_panel237, wxID_ANY, _("nodejs path:"), wxDefaultPosition, wxDLG_UNIT(m_panel237, wxSize(-1, -1)), 0); flexGridSizer241->Add(m_staticText243, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); m_filePickerNodeJS = new wxFilePickerCtrl(m_panel237, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*"), wxDefaultPosition, wxDLG_UNIT(m_panel237, wxSize(-1, -1)), wxFLP_DEFAULT_STYLE | wxFLP_USE_TEXTCTRL | wxFLP_SMALL); m_filePickerNodeJS->SetToolTip(_("Set the path to Node.js executable")); m_filePickerNodeJS->SetFocus(); flexGridSizer241->Add(m_filePickerNodeJS, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5)); m_button361 = new wxButton(m_panel237, wxID_ANY, _("Suggest..."), wxDefaultPosition, wxDLG_UNIT(m_panel237, wxSize(-1, -1)), wxBU_EXACTFIT); flexGridSizer241->Add(m_button361, 0, wxRIGHT | wxTOP | wxBOTTOM, WXC_FROM_DIP(5)); m_staticText247 = new wxStaticText(m_panel237, wxID_ANY, _("npm path:"), wxDefaultPosition, wxDLG_UNIT(m_panel237, wxSize(-1, -1)), 0); flexGridSizer241->Add(m_staticText247, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); m_filePickerNpm = new wxFilePickerCtrl(m_panel237, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*"), wxDefaultPosition, wxDLG_UNIT(m_panel237, wxSize(-1, -1)), wxFLP_DEFAULT_STYLE | wxFLP_USE_TEXTCTRL | wxFLP_SMALL); m_filePickerNpm->SetToolTip(_("Set the path to npm executable")); flexGridSizer241->Add(m_filePickerNpm, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5)); m_button363 = new wxButton(m_panel237, wxID_ANY, _("Suggest..."), wxDefaultPosition, wxDLG_UNIT(m_panel237, wxSize(-1, -1)), wxBU_EXACTFIT); flexGridSizer241->Add(m_button363, 0, wxRIGHT | wxTOP | wxBOTTOM, WXC_FROM_DIP(5)); flexGridSizer241->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5)); m_checkBoxJSLint = new wxCheckBox(m_panel237, wxID_ANY, _("Lint on file save"), wxDefaultPosition, wxDLG_UNIT(m_panel237, wxSize(-1, -1)), 0); m_checkBoxJSLint->SetValue(false); flexGridSizer241->Add(m_checkBoxJSLint, 0, wxALL, WXC_FROM_DIP(5)); m_stdBtnSizer4 = new wxStdDialogButtonSizer(); boxSizer2->Add(m_stdBtnSizer4, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(10)); m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0); m_stdBtnSizer4->AddButton(m_buttonCancel); m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0); m_buttonOK->SetDefault(); m_stdBtnSizer4->AddButton(m_buttonOK); m_buttonApply = new wxButton(this, wxID_APPLY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0); m_stdBtnSizer4->AddButton(m_buttonApply); m_stdBtnSizer4->Realize(); SetName(wxT("WebToolsSettingsBase")); SetSize(wxDLG_UNIT(this, wxSize(-1, -1))); if(GetSizer()) { GetSizer()->Fit(this); } if(GetParent()) { CentreOnParent(wxBOTH); } else { CentreOnScreen(wxBOTH); } // Connect events m_checkBoxEnableJsCC->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnModified), NULL, this); m_checkBoxEnableXmlCC->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnModified), NULL, this); m_checkBoxEnableHtmlCC->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnModified), NULL, this); m_pgMgr->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(WebToolsSettingsBase::OnJSValueChanged), NULL, this); m_filePickerNodeJS->Connect(wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler(WebToolsSettingsBase::OnNodejsPath), NULL, this); m_button361->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnSuggestNodeJSPaths), NULL, this); m_filePickerNpm->Connect(wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler(WebToolsSettingsBase::OnNpmPath), NULL, this); m_button363->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnSuggestNodeJSPaths), NULL, this); m_checkBoxJSLint->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnLintOnSave), NULL, this); m_buttonOK->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(WebToolsSettingsBase::OnOKUI), NULL, this); m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnOK), NULL, this); m_buttonApply->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnApply), NULL, this); m_buttonApply->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(WebToolsSettingsBase::OnOKUI), NULL, this); }
ImportFilesDialogNewBase::ImportFilesDialogNewBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxC945BInitBitmapResources(); bBitmapLoaded = true; } mainSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(mainSizer); m_banner1 = new wxBannerWindow(this, wxID_ANY, wxTOP, wxDefaultPosition, wxSize(-1,-1), wxBORDER_THEME); m_banner1->SetBitmap(wxNullBitmap); m_banner1->SetText(_("Import Files"), _("Select the directories to import from")); m_banner1->SetGradient(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE), wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)); m_banner1->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); mainSizer->Add(m_banner1, 0, wxALL|wxEXPAND, 5); m_dirPicker = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, wxT("Select a folder"), wxDefaultPosition, wxSize(-1,-1), wxDIRP_DEFAULT_STYLE); m_dirPicker->SetToolTip(_("Select the base folder for importing")); m_dirPicker->SetFocus(); mainSizer->Add(m_dirPicker, 0, wxALL|wxEXPAND, 5); m_dataview = new wxDataViewCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxDV_SINGLE); m_dataview->SetToolTip(_("Check the folders you wish to import\nfiles from")); m_dataviewModel = new FolderModel; m_dataviewModel->SetColCount( 2 ); m_dataview->AssociateModel(m_dataviewModel.get() ); mainSizer->Add(m_dataview, 1, wxALL|wxEXPAND, 5); m_dataview->AppendIconTextColumn(_("Folder"), m_dataview->GetColumnCount(), wxDATAVIEW_CELL_ACTIVATABLE, 300, wxALIGN_LEFT); m_dataview->AppendToggleColumn(_("Import?"), m_dataview->GetColumnCount(), wxDATAVIEW_CELL_ACTIVATABLE, 80, wxALIGN_LEFT); m_staticText1 = new wxStaticText(this, wxID_ANY, _("Files extension to import:"), wxDefaultPosition, wxSize(-1, -1), 0); mainSizer->Add(m_staticText1, 0, wxALL|wxEXPAND, 5); m_textCtrSpec = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); mainSizer->Add(m_textCtrSpec, 0, wxALL|wxEXPAND, 5); m_checkBoxFilesWOExt = new wxCheckBox(this, wxID_ANY, _("Import files without extensions"), wxDefaultPosition, wxSize(-1, -1), 0); m_checkBoxFilesWOExt->SetValue(false); m_checkBoxFilesWOExt->SetToolTip(_("If you wish to import files without extensions, tick this option")); mainSizer->Add(m_checkBoxFilesWOExt, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); m_staticline1 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxLI_HORIZONTAL); mainSizer->Add(m_staticline1, 0, wxALL|wxEXPAND, 5); buttonSizer = new wxBoxSizer(wxHORIZONTAL); mainSizer->Add(buttonSizer, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); m_buttonOk = new wxButton(this, wxID_OK, _("&Ok"), wxDefaultPosition, wxSize(-1, -1), 0); m_buttonOk->SetDefault(); buttonSizer->Add(m_buttonOk, 0, wxALL, 5); m_buttonCancel = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1, -1), 0); buttonSizer->Add(m_buttonCancel, 0, wxALL, 5); SetSizeHints(400,400); if ( GetSizer() ) { GetSizer()->Fit(this); } Centre(wxBOTH); // Connect events m_dirPicker->Connect(wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler(ImportFilesDialogNewBase::OnDirChanged), NULL, this); m_dataview->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler(ImportFilesDialogNewBase::OnValueChanged), NULL, this); m_dataview->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING, wxDataViewEventHandler(ImportFilesDialogNewBase::OnItemExpanding), NULL, this); }
/* * -pOuterSizer--------------------------------------------------- * | | * | -pMainSizer------------------------------------------------ | * | | | | | * | ------------------------------pButtonSizer----------------- | * | | | | | * | ----------------------------------------------------------- | * | | | | | * | ----------------------------------------------------------- | * | | | | | * | ----------------------------------------------------------- | * | | | | | * | ----------------------------------------------------------- | * | m_pButtonStart | * | m_pTextCtrlLog | * --------------------------------------------------------------- */ EasySplitMainFrame::EasySplitMainFrame(wxFrame* parent, const wxString& title) : wxFrame(parent, wxID_ANY, title, wxDefaultPosition, wxSize(800, 600), wxDEFAULT_FRAME_STYLE), m_pWorkerThread(NULL) { wxStaticText* pText; wxBoxSizer* pOuterSizer; wxFlexGridSizer* pMainSizer; wxBoxSizer* pButtonSizer; wxPanel *pPanel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL); pOuterSizer = new wxBoxSizer(wxVERTICAL); pMainSizer = new wxFlexGridSizer(5, 2, 8, 8); pMainSizer->AddGrowableCol(1); pOuterSizer->Add(pMainSizer, 0, wxEXPAND | wxALL, 20); // Input file pText = new wxStaticText(pPanel, wxID_ANY, _("Input File")); pMainSizer->Add(pText, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT); m_pInputFilePicker = new wxFilePickerCtrl(pPanel, wxID_ANY, wxEmptyString, _("Select a file"), _("*"), wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL | wxFLP_OPEN | wxFLP_FILE_MUST_EXIST); m_pInputFilePicker->SetMinSize(wxSize(300, m_pInputFilePicker->GetMinSize().GetHeight())); pMainSizer->Add(m_pInputFilePicker, 1, wxEXPAND); pMainSizer->AddSpacer(10); pMainSizer->AddSpacer(10); // Buttons for default sizes pText = new wxStaticText(pPanel, wxID_ANY, _("Default sizes")); pMainSizer->Add(pText, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT); pButtonSizer = new wxBoxSizer(wxHORIZONTAL); pMainSizer->Add(pButtonSizer, 1, wxEXPAND); m_pButtonSize170k = new wxButton(pPanel, wxID_ANY, _("170 KiB (1541)")); pButtonSizer->Add(m_pButtonSize170k); m_pButtonSize800k = new wxButton(pPanel, wxID_ANY, _("800 KiB (1581)")); pButtonSizer->Add(m_pButtonSize800k); // Size of first file pText = new wxStaticText(pPanel, wxID_ANY, _("First file [KiB]")); pMainSizer->Add(pText, 1, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT); m_pSliderSize1 = new wxSlider(pPanel, wxID_ANY, FILE_SIZE_1_1541, 50, 1024, wxDefaultPosition, wxDefaultSize, wxSL_LABELS); m_pSliderSize1->SetMinSize(wxSize(150, m_pSliderSize1->GetMinSize().GetHeight())); pMainSizer->Add(m_pSliderSize1, 1, wxEXPAND); // Size of subsequent files pText = new wxStaticText(pPanel, wxID_ANY, _("Subsequent files [KiB]")); pMainSizer->Add(pText, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT); m_pSliderSizeN = new wxSlider(pPanel, wxID_ANY, FILE_SIZE_N_1541, 50, 1024, wxDefaultPosition, wxDefaultSize, wxSL_LABELS); m_pSliderSizeN->SetMinSize(wxSize(300, m_pSliderSizeN->GetMinSize().GetHeight())); pMainSizer->Add(m_pSliderSizeN, 1, wxEXPAND); // Output file pMainSizer->AddSpacer(10); pMainSizer->AddSpacer(10); pText = new wxStaticText(pPanel, wxID_ANY, _("Output Files (+.01, .02,...)")); pMainSizer->Add(pText, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT); m_pOutputFilePicker = new wxFilePickerCtrl(pPanel, wxID_ANY, wxEmptyString, _("Select a file"), _("*"), wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL | wxFLP_SAVE); m_pOutputFilePicker->SetMinSize(wxSize(300, m_pInputFilePicker->GetMinSize().GetHeight())); pMainSizer->Add(m_pOutputFilePicker, 1, wxEXPAND); // Start Button pButtonSizer = new wxBoxSizer(wxHORIZONTAL); pOuterSizer->Add(pButtonSizer, 0, wxALIGN_CENTER_HORIZONTAL); m_pButtonQuit = new wxButton(pPanel, wxID_ANY, _("Quit")); pButtonSizer->Add(m_pButtonQuit, 0, wxALIGN_CENTER_HORIZONTAL); pButtonSizer->AddSpacer(20); m_pButtonStart = new wxButton(pPanel, wxID_ANY, _("Go!")); pButtonSizer->Add(m_pButtonStart, 0, wxALIGN_CENTER_HORIZONTAL); // Text Control for Log pOuterSizer->AddSpacer(10); m_pTextCtrlLog = new wxTextCtrl(pPanel, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY); m_pTextCtrlLog->SetMinSize(wxSize(500, 100)); //m_pTextCtrlLog-> pOuterSizer->Add(m_pTextCtrlLog, 1, wxEXPAND | wxALL); pPanel->SetSizer(pOuterSizer); pOuterSizer->SetSizeHints(this); Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(EasySplitMainFrame::OnButton)); Connect(wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler(EasySplitMainFrame::OnFilePickerChanged)); Connect(wxEVT_EASY_SPLIT_LOG, wxCommandEventHandler(EasySplitMainFrame::OnLog)); }
DIALOG_SELECT_PRETTY_LIB_BASE::~DIALOG_SELECT_PRETTY_LIB_BASE() { // Disconnect Events m_dirCtrl->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( DIALOG_SELECT_PRETTY_LIB_BASE::OnSelectFolder ), NULL, this ); }
//------------------------------------------------------------------- NewProjectDialog::NewProjectDialog(const wxString& defaultLocation) : wxDialog(0, wxID_ANY, wxT("New Project"), wxDefaultPosition, wxSize(500, 400), NEWPROJECTDIALOG_STYLE) { SetMinSize(wxSize(500, 400)); // create box 1 wxStaticBoxSizer* box1 = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Window Properties")); wxFlexGridSizer* fgs1 = new wxFlexGridSizer(2, 2, 5, 5); wxStaticText* windowWidthLabel = new wxStaticText(box1->GetStaticBox(), wxID_ANY, wxT("Width:")); wxStaticText* windowHeightLabel = new wxStaticText(box1->GetStaticBox(), wxID_ANY, wxT("Height:")); _windowWidthEntry = new wxTextCtrl(box1->GetStaticBox(), ID_WINDOW_WIDTH, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CENTRE); _windowHeightEntry = new wxTextCtrl(box1->GetStaticBox(), ID_WINDOW_HEIGHT, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CENTRE); // limit window dimensions to 4 digits _windowWidthEntry->SetMaxLength(4); _windowHeightEntry->SetMaxLength(4); fgs1->Add(windowWidthLabel); fgs1->Add(_windowWidthEntry); fgs1->Add(windowHeightLabel); fgs1->Add(_windowHeightEntry); _windowFullScreenCheckBox = new wxCheckBox(box1->GetStaticBox(), ID_WINDOW_FULL_SCREEN, wxT("Full Screen")); box1->Add(fgs1, 0, wxALL, 6); box1->Add(_windowFullScreenCheckBox, 0, wxALL, 6); // create box 2 wxFlexGridSizer* box2 = new wxFlexGridSizer(4, 3, 5, 5); wxStaticText* nameLabel = new wxStaticText(this, wxID_ANY, wxT("Name:")); wxStaticText* descriptionLabel = new wxStaticText(this, wxID_ANY, wxT("Description:")); wxStaticText* entryPointLabel = new wxStaticText(this, wxID_ANY, wxT("Entry Point:")); wxStaticText* locationLabel = new wxStaticText(this, wxID_ANY, wxT("Location:")); _nameEntry = new wxTextCtrl(this, ID_NAME); _descriptionEntry = new wxTextCtrl(this, ID_DESCRIPTION, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_DONTWRAP); _entryPointEntry = new wxTextCtrl(this, ID_ENTRY_POINT); _locationEntry = new wxTextCtrl(this, ID_LOCATION, defaultLocation); _locationPicker = new wxDirPickerCtrl(this, ID_BROWSE_LOCATION, defaultLocation, wxT("Project Location"), wxDefaultPosition, wxDefaultSize, wxDIRP_DIR_MUST_EXIST); box2->Add(nameLabel); box2->Add(_nameEntry, 1, wxEXPAND); box2->Add(new wxStaticText(this, wxID_ANY, wxT(""))); box2->Add(descriptionLabel); box2->Add(_descriptionEntry, 1, wxEXPAND); box2->Add(new wxStaticText(this, wxID_ANY, wxT(""))); box2->Add(entryPointLabel); box2->Add(_entryPointEntry, 1, wxEXPAND); box2->Add(new wxStaticText(this, wxID_ANY, wxT(""))); box2->Add(locationLabel); box2->Add(_locationEntry, 1, wxEXPAND); box2->Add(_locationPicker); box2->AddGrowableRow(1, 1); box2->AddGrowableCol(1, 1); // create box 3 wxBoxSizer* box3 = new wxBoxSizer(wxHORIZONTAL); _okButton = new wxButton(this, ID_OK, wxT("OK")); _cancelButton = new wxButton(this, ID_CANCEL, wxT("Cancel")); box3->Add(_okButton); box3->AddSpacer(5); box3->Add(_cancelButton); // create main sizer wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL); sizer->Add(box1, 0, wxEXPAND | wxALL, 10); sizer->Add(box2, 1, wxEXPAND | wxALL, 10); sizer->Add(box3, 0, wxALIGN_RIGHT | wxALL, 10); // apply sizer SetSizer(sizer); // initialize control values _nameEntry->SetValue(_projectProperties.Name); _descriptionEntry->SetValue(_projectProperties.Description); _entryPointEntry->SetValue(_projectProperties.EntryPoint); wxString windowHeightStr; windowHeightStr << _projectProperties.Window.Height; _windowHeightEntry->SetValue(windowHeightStr); wxString windowWidthStr; windowWidthStr << _projectProperties.Window.Width; _windowWidthEntry->SetValue(windowWidthStr); _windowFullScreenCheckBox->SetValue(_projectProperties.Window.FullScreen); // set icon SetIcon(wxIcon(wxT("system/developer/icons/project-new.png"), wxBITMAP_TYPE_PNG)); // connect events Connect(ID_OK, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(NewProjectDialog::onOk)); Connect(ID_CANCEL, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(NewProjectDialog::onCancel)); Connect(ID_BROWSE_LOCATION, wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler(NewProjectDialog::onLocationPicked)); }
MyFrameBase::MyFrameBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); wxBoxSizer* mainSizer; mainSizer = new wxBoxSizer( wxVERTICAL ); mainPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* vertSizer1; vertSizer1 = new wxBoxSizer( wxVERTICAL ); wxBoxSizer* horzSizer1; horzSizer1 = new wxBoxSizer( wxHORIZONTAL ); wxStaticBoxSizer* sbSizer1; sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( mainPanel, wxID_ANY, wxT("Input Directory") ), wxVERTICAL ); wxGridBagSizer* gbSizer2; gbSizer2 = new wxGridBagSizer( 0, 0 ); gbSizer2->SetFlexibleDirection( wxBOTH ); gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); inDirPicker = new wxDirPickerCtrl( mainPanel, wxID_ANY, wxEmptyString, wxT("Select a folder"), wxDefaultPosition, wxDefaultSize, wxDIRP_DEFAULT_STYLE ); gbSizer2->Add( inDirPicker, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 ); inDirTextCtrl = new wxTextCtrl( mainPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE ); gbSizer2->Add( inDirTextCtrl, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxALL|wxEXPAND, 5 ); gbSizer2->AddGrowableCol( 0 ); gbSizer2->AddGrowableRow( 1 ); sbSizer1->Add( gbSizer2, 1, wxEXPAND, 5 ); horzSizer1->Add( sbSizer1, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); wxStaticBoxSizer* sbSizer2; sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( mainPanel, wxID_ANY, wxT("Output Directory") ), wxVERTICAL ); wxGridBagSizer* gbSizer3; gbSizer3 = new wxGridBagSizer( 0, 0 ); gbSizer3->SetFlexibleDirection( wxBOTH ); gbSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); outDirPicker = new wxDirPickerCtrl( mainPanel, wxID_ANY, wxEmptyString, wxT("Select a folder"), wxDefaultPosition, wxDefaultSize, wxDIRP_DEFAULT_STYLE ); gbSizer3->Add( outDirPicker, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 ); outDirTextCtrl = new wxTextCtrl( mainPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE ); gbSizer3->Add( outDirTextCtrl, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxALL|wxEXPAND, 5 ); gbSizer3->AddGrowableCol( 0 ); gbSizer3->AddGrowableRow( 1 ); sbSizer2->Add( gbSizer3, 1, wxEXPAND, 5 ); horzSizer1->Add( sbSizer2, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); vertSizer1->Add( horzSizer1, 3, wxEXPAND, 5 ); m_staticline1 = new wxStaticLine( mainPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); vertSizer1->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); wxStaticBoxSizer* sbSizer3; sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( mainPanel, wxID_ANY, wxT("Debug") ), wxVERTICAL ); debugTextCtrl = new wxTextCtrl( mainPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE ); sbSizer3->Add( debugTextCtrl, 1, wxALL|wxEXPAND, 5 ); vertSizer1->Add( sbSizer3, 2, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); mainPanel->SetSizer( vertSizer1 ); mainPanel->Layout(); vertSizer1->Fit( mainPanel ); mainSizer->Add( mainPanel, 1, wxEXPAND, 5 ); this->SetSizer( mainSizer ); this->Layout(); menuBar = new wxMenuBar( 0 ); fileMenu = new wxMenu(); wxMenuItem* unusedItem; unusedItem = new wxMenuItem( fileMenu, wxID_ANY, wxString( wxT("Unused") ) , wxEmptyString, wxITEM_NORMAL ); fileMenu->Append( unusedItem ); wxMenuItem* closeItem; closeItem = new wxMenuItem( fileMenu, wxID_ANY, wxString( wxT("Close") ) , wxEmptyString, wxITEM_NORMAL ); fileMenu->Append( closeItem ); menuBar->Append( fileMenu, wxT("&File") ); runMenu = new wxMenu(); wxMenuItem* runMenuItem; runMenuItem = new wxMenuItem( runMenu, wxID_ANY, wxString( wxT("RUN!") ) , wxEmptyString, wxITEM_NORMAL ); runMenu->Append( runMenuItem ); wxMenuItem* clearMenu; clearMenu = new wxMenuItem( runMenu, wxID_ANY, wxString( wxT("Clear") ) , wxEmptyString, wxITEM_NORMAL ); runMenu->Append( clearMenu ); wxMenuItem* copyMenuItem; copyMenuItem = new wxMenuItem( runMenu, COPY_FILE, wxString( wxT("Copy Files") ) , wxEmptyString, wxITEM_CHECK ); runMenu->Append( copyMenuItem ); menuBar->Append( runMenu, wxT("&Run") ); helpMenu = new wxMenu(); wxMenuItem* aboutItem; aboutItem = new wxMenuItem( helpMenu, wxID_ANY, wxString( wxT("&About") ) , wxEmptyString, wxITEM_NORMAL ); helpMenu->Append( aboutItem ); menuBar->Append( helpMenu, wxT("&Help") ); this->SetMenuBar( menuBar ); statusBar = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY ); this->Centre( wxBOTH ); // Connect Events inDirPicker->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MyFrameBase::onInputSelect ), NULL, this ); outDirPicker->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MyFrameBase::onOutputSelect ), NULL, this ); this->Connect( unusedItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrameBase::onUnused ) ); this->Connect( closeItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrameBase::onClose ) ); this->Connect( runMenuItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrameBase::onRun ) ); this->Connect( clearMenu->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrameBase::onClear ) ); this->Connect( aboutItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrameBase::onAbout ) ); }
Addr2LineUIDialog::Addr2LineUIDialog(wxWindow* parent) : mFileConfig(), mCrashLog(), mCrashLogFileContent(), mAddr2Line(wxT("addr2line")), mDirPrepend() { //(*Initialize(Addr2LineUIDialog) wxStaticText* lblDirPrepend; wxBoxSizer* bszAddr2Line; wxButton* btnQuit; wxBoxSizer* bszMainV; wxStaticText* lblCrashLog; wxBoxSizer* bszReplace; wxBoxSizer* bszMainH; wxStaticText* lblAddr2Line; wxStaticLine* stlLine; Create(parent, wxID_ANY, _("Addr2LineUI"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxMAXIMIZE_BOX|wxMINIMIZE_BOX, _T("wxID_ANY")); bszMainH = new wxBoxSizer(wxHORIZONTAL); bszMainV = new wxBoxSizer(wxVERTICAL); bszAddr2Line = new wxBoxSizer(wxVERTICAL); lblCrashLog = new wxStaticText(this, wxID_ANY, _("Select crash log file:"), wxDefaultPosition, wxDefaultSize, 0, _T("wxID_ANY")); bszAddr2Line->Add(lblCrashLog, 0, wxEXPAND|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); m_FPCrashLog = new wxFilePickerCtrl(this, ID_CRASH_LOG, wxEmptyString, _("Select crash log"), _T("Report files (*.rpt)|*.rpt|Log files (*.log)|*.log|All files (*.*)|*.*"), wxDefaultPosition, wxDefaultSize, wxFLP_FILE_MUST_EXIST|wxFLP_OPEN|wxFLP_USE_TEXTCTRL, wxDefaultValidator, _T("ID_CRASH_LOG")); bszAddr2Line->Add(m_FPCrashLog, 0, wxEXPAND|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); lblAddr2Line = new wxStaticText(this, wxID_ANY, _("Select Addr2Line tool:"), wxDefaultPosition, wxDefaultSize, 0, _T("wxID_ANY")); bszAddr2Line->Add(lblAddr2Line, 0, wxTOP|wxEXPAND|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); m_FPAddr2Line = new wxFilePickerCtrl(this, ID_ADDR2LINE, wxEmptyString, _("Select addr2line tool"), _T("Executables (*.exe)|*.exe|All files (*.*)|*.*"), wxDefaultPosition, wxDefaultSize, wxFLP_FILE_MUST_EXIST|wxFLP_OPEN|wxFLP_USE_TEXTCTRL, wxDefaultValidator, _T("ID_ADDR2LINE")); bszAddr2Line->Add(m_FPAddr2Line, 0, wxEXPAND|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); lblDirPrepend = new wxStaticText(this, wxID_ANY, _("(Optionally) Select directory to prepend:"), wxDefaultPosition, wxDefaultSize, 0, _T("wxID_ANY")); bszAddr2Line->Add(lblDirPrepend, 0, wxTOP|wxEXPAND|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); m_DPDirPrepend = new wxDirPickerCtrl(this, ID_DIR_PREPEND, wxEmptyString, _("Select directory to prepend"), wxDefaultPosition, wxDefaultSize, wxDIRP_DIR_MUST_EXIST|wxDIRP_USE_TEXTCTRL, wxDefaultValidator, _T("ID_DIR_PREPEND")); bszAddr2Line->Add(m_DPDirPrepend, 0, wxEXPAND|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); bszMainV->Add(bszAddr2Line, 0, wxALL|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP, 5); bszReplace = new wxBoxSizer(wxHORIZONTAL); chkReplace = new wxCheckBox(this, ID_CHK_REPLACE, _("Replace:"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_CHK_REPLACE")); chkReplace->SetValue(false); bszReplace->Add(chkReplace, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); txtReplaceThis = new wxTextCtrl(this, ID_TXT_REPLACE_THIS, _("this"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TXT_REPLACE_THIS")); txtReplaceThis->Disable(); bszReplace->Add(txtReplaceThis, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP, 5); lblReplace = new wxStaticText(this, ID_LBL_REPLACE, _("...with:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_LBL_REPLACE")); lblReplace->Disable(); bszReplace->Add(lblReplace, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); txtReplaceThat = new wxTextCtrl(this, ID_TXT_REPLACE_THAT, _("that"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TXT_REPLACE_THAT")); txtReplaceThat->Disable(); bszReplace->Add(txtReplaceThat, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP, 5); chkSkipUnresolvable = new wxCheckBox(this, ID_CHK_SKIP_UNRESOLVABLE, _("Skip unresolvable"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_CHK_SKIP_UNRESOLVABLE")); chkSkipUnresolvable->SetValue(false); bszReplace->Add(chkSkipUnresolvable, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); bszMainV->Add(bszReplace, 0, wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP, 5); txtCrashLogContent = new wxTextCtrl(this, ID_TXT_CRASH_LOG_CONTENT, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE, wxDefaultValidator, _T("ID_TXT_CRASH_LOG_CONTENT")); txtCrashLogContent->SetMinSize(wxSize(450,200)); wxFont txtCrashLogContentFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT); if ( !txtCrashLogContentFont.Ok() ) txtCrashLogContentFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); txtCrashLogContent->SetFont(txtCrashLogContentFont); bszMainV->Add(txtCrashLogContent, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP, 5); txtResult = new wxTextCtrl(this, ID_TXT_RESULT, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE, wxDefaultValidator, _T("ID_TXT_RESULT")); txtResult->SetMinSize(wxSize(450,200)); wxFont txtResultFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT); if ( !txtResultFont.Ok() ) txtResultFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); txtResult->SetFont(txtResultFont); bszMainV->Add(txtResult, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP, 5); stlLine = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(10,-1), wxLI_HORIZONTAL, _T("wxID_ANY")); bszMainV->Add(stlLine, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP, 5); btnOperate = new wxButton(this, ID_BTN_OPERATE, _("Operate"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BTN_OPERATE")); btnOperate->Disable(); bszMainV->Add(btnOperate, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_TOP|wxALIGN_CENTER_HORIZONTAL, 5); btnQuit = new wxButton(this, ID_BTN_QUIT, _("Quit"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BTN_QUIT")); bszMainV->Add(btnQuit, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_TOP|wxALIGN_CENTER_HORIZONTAL, 5); bszMainH->Add(bszMainV, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 4); SetSizer(bszMainH); bszMainH->Fit(this); bszMainH->SetSizeHints(this); Connect(ID_CRASH_LOG,wxEVT_COMMAND_FILEPICKER_CHANGED,wxFileDirPickerEventHandler(Addr2LineUIDialog::OnCrashLogFile)); Connect(ID_ADDR2LINE,wxEVT_COMMAND_FILEPICKER_CHANGED,wxFileDirPickerEventHandler(Addr2LineUIDialog::OnAddr2LineFile)); Connect(ID_DIR_PREPEND,wxEVT_COMMAND_DIRPICKER_CHANGED,wxFileDirPickerEventHandler(Addr2LineUIDialog::OnDirPrependDir)); Connect(ID_CHK_REPLACE,wxEVT_COMMAND_CHECKBOX_CLICKED,wxCommandEventHandler(Addr2LineUIDialog::OnReplaceClick)); Connect(ID_BTN_OPERATE,wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(Addr2LineUIDialog::OnOperateClick)); Connect(ID_BTN_QUIT,wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(Addr2LineUIDialog::OnQuit)); //*) mFileConfig.Read(wxT("CrashLog"), &mCrashLog, wxT("")); m_FPCrashLog->SetPath(mCrashLog); mFileConfig.Read(wxT("Addr2Line"), &mAddr2Line, wxT("")); m_FPAddr2Line->SetPath(mAddr2Line); mFileConfig.Read(wxT("DirPrepend"), &mDirPrepend, wxT("")); m_DPDirPrepend->SetPath(mDirPrepend); bool Replace; mFileConfig.Read(wxT("Replace"), &Replace, false ); chkReplace->SetValue(Replace); if (Replace) { txtReplaceThis->Enable(); lblReplace->Enable(); txtReplaceThat->Enable(); } wxString ReplaceThis; mFileConfig.Read(wxT("ReplaceThis"), &ReplaceThis, wxT("")); txtReplaceThis->SetValue(ReplaceThis); wxString ReplaceThat; mFileConfig.Read(wxT("ReplaceThat"), &ReplaceThat, wxT("")); txtReplaceThat->SetValue(ReplaceThat); bool SkipUnresolvable; mFileConfig.Read(wxT("SkipUnresolvable"), &SkipUnresolvable, false ); chkSkipUnresolvable->SetValue(SkipUnresolvable); }
PluginWizardBase::PluginWizardBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxBitmap& bmp, const wxPoint& pos, long style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxC8028InitBitmapResources(); bBitmapLoaded = true; } Create(parent, id, title, wxXmlResource::Get()->LoadBitmap(wxT("plugin")), pos, style); m_wizardPage1 = new wxWizardPageSimple(this, NULL, NULL, wxNullBitmap); m_pages.push_back(m_wizardPage1); wxBoxSizer* boxSizer10 = new wxBoxSizer(wxVERTICAL); m_wizardPage1->SetSizer(boxSizer10); wxFlexGridSizer* flexGridSizer12 = new wxFlexGridSizer(0, 2, 0, 0); flexGridSizer12->SetFlexibleDirection( wxBOTH ); flexGridSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer12->AddGrowableCol(1); boxSizer10->Add(flexGridSizer12, 1, wxALL|wxEXPAND, 5); m_staticText14 = new wxStaticText(m_wizardPage1, wxID_ANY, _("Plugin name:"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer12->Add(m_staticText14, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlName = new wxTextCtrl(m_wizardPage1, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0); m_textCtrlName->SetToolTip(_("Set the plugin name.\nThe name should be a valid C++ variable name")); m_textCtrlName->SetFocus(); #if wxVERSION_NUMBER >= 3000 m_textCtrlName->SetHint(wxT("")); #endif flexGridSizer12->Add(m_textCtrlName, 0, wxALL|wxEXPAND, 5); m_staticText18 = new wxStaticText(m_wizardPage1, wxID_ANY, _("Description:"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer12->Add(m_staticText18, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlDescription = new wxTextCtrl(m_wizardPage1, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0); m_textCtrlDescription->SetToolTip(_("Provide the plugin a short description")); #if wxVERSION_NUMBER >= 3000 m_textCtrlDescription->SetHint(wxT("")); #endif flexGridSizer12->Add(m_textCtrlDescription, 0, wxALL|wxEXPAND, 5); m_wizardPage2 = new wxWizardPageSimple(this, NULL, NULL, wxNullBitmap); m_pages.push_back(m_wizardPage2); if (m_pages.size() > 1) { for(size_t i=1; i<m_pages.size(); i++) { wxWizardPageSimple::Chain(m_pages.at(i-1), m_pages.at(i)); } } GetPageAreaSizer()->Add(m_pages.at(0)); wxBoxSizer* boxSizer22 = new wxBoxSizer(wxVERTICAL); m_wizardPage2->SetSizer(boxSizer22); wxFlexGridSizer* flexGridSizer24 = new wxFlexGridSizer(0, 2, 0, 0); flexGridSizer24->SetFlexibleDirection( wxBOTH ); flexGridSizer24->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer24->AddGrowableCol(1); boxSizer22->Add(flexGridSizer24, 1, wxALL|wxEXPAND, 5); m_staticText42 = new wxStaticText(m_wizardPage2, wxID_ANY, _("codelite root dir:"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer24->Add(m_staticText42, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_dirPickerCodeliteDir = new wxDirPickerCtrl(m_wizardPage2, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxSize(-1,-1), wxDIRP_DEFAULT_STYLE|wxDIRP_USE_TEXTCTRL|wxDIRP_DIR_MUST_EXIST); m_dirPickerCodeliteDir->SetToolTip(_("Select the location of codelite's source tree")); flexGridSizer24->Add(m_dirPickerCodeliteDir, 0, wxALL|wxEXPAND, 5); m_staticText26 = new wxStaticText(m_wizardPage2, wxID_ANY, _("Project path:"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer24->Add(m_staticText26, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_dirPickerPluginPath = new wxDirPickerCtrl(m_wizardPage2, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxSize(350,-1), wxDIRP_DEFAULT_STYLE|wxDIRP_USE_TEXTCTRL|wxDIRP_DIR_MUST_EXIST); m_dirPickerPluginPath->SetToolTip(_("Select the plugin project path")); flexGridSizer24->Add(m_dirPickerPluginPath, 0, wxALL|wxEXPAND, 5); flexGridSizer24->Add(0, 0, 1, wxALL, 5); m_textCtrlPreview = new wxTextCtrl(m_wizardPage2, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_READONLY); #if wxVERSION_NUMBER >= 3000 m_textCtrlPreview->SetHint(wxT("")); #endif flexGridSizer24->Add(m_textCtrlPreview, 0, wxALL|wxEXPAND, 5); SetName(wxT("PluginWizardBase")); SetSizeHints(-1,-1); if ( GetSizer() ) { GetSizer()->Fit(this); } CentreOnParent(wxBOTH); #if wxVERSION_NUMBER >= 2900 if(!wxPersistenceManager::Get().Find(this)) { wxPersistenceManager::Get().RegisterAndRestore(this); } else { wxPersistenceManager::Get().Restore(this); } #endif // Connect events this->Connect(wxEVT_WIZARD_PAGE_CHANGING, wxWizardEventHandler(PluginWizardBase::OnPageChanging), NULL, this); this->Connect(wxEVT_WIZARD_FINISHED, wxWizardEventHandler(PluginWizardBase::OnFinish), NULL, this); m_dirPickerPluginPath->Connect(wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler(PluginWizardBase::OnProjectPathChanged), NULL, this); }
MainFrame_base::MainFrame_base( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->SetForegroundColour( wxColour( 238, 238, 242 ) ); this->SetBackgroundColour( wxColour( 238, 238, 242 ) ); m_mgr.SetManagedWindow(this); m_mgr.SetFlags(wxAUI_MGR_ALLOW_ACTIVE_PANE|wxAUI_MGR_ALLOW_FLOATING|wxAUI_MGR_HINT_FADE|wxAUI_MGR_LIVE_RESIZE|wxAUI_MGR_NO_VENETIAN_BLINDS_FADE|wxAUI_MGR_TRANSPARENT_DRAG|wxAUI_MGR_TRANSPARENT_HINT); m_statusbar = this->CreateStatusBar( 4, wxST_SIZEGRIP, wxID_ANY ); m_statusbar->SetForegroundColour( wxColour( 238, 238, 242 ) ); m_statusbar->SetBackgroundColour( wxColour( 238, 238, 242 ) ); m_menubar = new wxMenuBar( 0 ); m_file_menu = new wxMenu(); wxMenuItem* m_menu_exit; m_menu_exit = new wxMenuItem( m_file_menu, ID_MENU_EXIT, wxString( wxT("E&xit") ) + wxT('\t') + wxT("Alt+F4"), wxT("Exit the application"), wxITEM_NORMAL ); m_file_menu->Append( m_menu_exit ); m_menubar->Append( m_file_menu, wxT("&File") ); m_process_menu = new wxMenu(); wxMenuItem* m_menu_reconstruct; m_menu_reconstruct = new wxMenuItem( m_process_menu, ID_RECONSTRUCT, wxString( wxT("&Reconstruct") ) + wxT('\t') + wxT("Alt+r"), wxT("Compute 3d geometry from images"), wxITEM_NORMAL ); #ifdef __WXMSW__ m_menu_reconstruct->SetBitmaps( wxIcon("start_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) ); #elif defined( __WXGTK__ ) m_menu_reconstruct->SetBitmap( wxICON( start_icon ) ); #endif m_process_menu->Append( m_menu_reconstruct ); m_menubar->Append( m_process_menu, wxT("&Process") ); m_view_menu = new wxMenu(); wxMenuItem* m_menu_view_image_browser; m_menu_view_image_browser = new wxMenuItem( m_view_menu, ID_VIEW_IMAGE_BROWSER, wxString( wxT("&Image browser") ) + wxT('\t') + wxT("Alt+i"), wxT("Show image browser window"), wxITEM_NORMAL ); #ifdef __WXMSW__ m_menu_view_image_browser->SetBitmaps( wxIcon("image_browser_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) ); #elif defined( __WXGTK__ ) m_menu_view_image_browser->SetBitmap( wxICON( image_browser_icon ) ); #endif m_view_menu->Append( m_menu_view_image_browser ); wxMenuItem* m_menu_view_image_preview; m_menu_view_image_preview = new wxMenuItem( m_view_menu, ID_VIEW_IMAGE_PREVIEW, wxString( wxT("Image &preview") ) + wxT('\t') + wxT("Alt+p"), wxT("Show image preview window"), wxITEM_NORMAL ); #ifdef __WXMSW__ m_menu_view_image_preview->SetBitmaps( wxIcon("image_preview_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) ); #elif defined( __WXGTK__ ) m_menu_view_image_preview->SetBitmap( wxICON( image_preview_icon ) ); #endif m_view_menu->Append( m_menu_view_image_preview ); wxMenuItem* m_menu_view_options; m_menu_view_options = new wxMenuItem( m_view_menu, ID_VIEW_OPTIONS, wxString( wxT("&Options") ) + wxT('\t') + wxT("Alt+o"), wxT("Show options window"), wxITEM_NORMAL ); #ifdef __WXMSW__ m_menu_view_options->SetBitmaps( wxIcon("options_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) ); #elif defined( __WXGTK__ ) m_menu_view_options->SetBitmap( wxICON( options_icon ) ); #endif m_view_menu->Append( m_menu_view_options ); wxMenuItem* m_menu_view_log; m_menu_view_log = new wxMenuItem( m_view_menu, ID_VIEW_LOG, wxString( wxT("&Log") ) + wxT('\t') + wxT("Alt+l"), wxT("Show log window"), wxITEM_NORMAL ); #ifdef __WXMSW__ m_menu_view_log->SetBitmaps( wxIcon("log_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) ); #elif defined( __WXGTK__ ) m_menu_view_log->SetBitmap( wxICON( log_icon ) ); #endif m_view_menu->Append( m_menu_view_log ); m_view_menu->AppendSeparator(); wxMenuItem* m_menu_reset_3d_viewport; m_menu_reset_3d_viewport = new wxMenuItem( m_view_menu, ID_RESET_3D_VIEWPORT, wxString( wxT("Reset 3d viewport") ) + wxT('\t') + wxT("Alt+h"), wxT("Reset the 3d viewport"), wxITEM_NORMAL ); #ifdef __WXMSW__ m_menu_reset_3d_viewport->SetBitmaps( wxIcon("home_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) ); #elif defined( __WXGTK__ ) m_menu_reset_3d_viewport->SetBitmap( wxICON( home_icon ) ); #endif m_view_menu->Append( m_menu_reset_3d_viewport ); wxMenuItem* m_menu_toggle_turntable_animation; m_menu_toggle_turntable_animation = new wxMenuItem( m_view_menu, ID_TOGGLE_TURNTABLE_ANIMATION, wxString( wxT("Tur&ntable") ) + wxT('\t') + wxT("Alt+n"), wxT("Toggle turntable animation"), wxITEM_NORMAL ); #ifdef __WXMSW__ m_menu_toggle_turntable_animation->SetBitmaps( wxIcon("turntable_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) ); #elif defined( __WXGTK__ ) m_menu_toggle_turntable_animation->SetBitmap( wxICON( turntable_icon ) ); #endif m_view_menu->Append( m_menu_toggle_turntable_animation ); m_view_menu->AppendSeparator(); wxMenuItem* m_menu_toggle_trackball_visibility; m_menu_toggle_trackball_visibility = new wxMenuItem( m_view_menu, ID_TOGGLE_TRACKBALL_VISIBILITY, wxString( wxT("Trackball") ) + wxT('\t') + wxT("Alt+v"), wxT("Toggle trackball visibility"), wxITEM_NORMAL ); #ifdef __WXMSW__ m_menu_toggle_trackball_visibility->SetBitmaps( wxIcon("trackball_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) ); #elif defined( __WXGTK__ ) m_menu_toggle_trackball_visibility->SetBitmap( wxICON( trackball_icon ) ); #endif m_view_menu->Append( m_menu_toggle_trackball_visibility ); wxMenuItem* m_menu_toggle_grid_visibility; m_menu_toggle_grid_visibility = new wxMenuItem( m_view_menu, ID_TOGGLE_GRID_VISIBILITY, wxString( wxT("&Grid") ) + wxT('\t') + wxT("Alt+g"), wxT("Toggle grid visibility"), wxITEM_NORMAL ); #ifdef __WXMSW__ m_menu_toggle_grid_visibility->SetBitmaps( wxIcon("grid_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) ); #elif defined( __WXGTK__ ) m_menu_toggle_grid_visibility->SetBitmap( wxICON( grid_icon ) ); #endif m_view_menu->Append( m_menu_toggle_grid_visibility ); wxMenuItem* m_menu_toggle_points_visibility; m_menu_toggle_points_visibility = new wxMenuItem( m_view_menu, ID_TOGGLE_POINTS_VISIBILITY, wxString( wxT("Points") ) , wxT("Toggle points visibility"), wxITEM_NORMAL ); #ifdef __WXMSW__ m_menu_toggle_points_visibility->SetBitmaps( wxIcon("points_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) ); #elif defined( __WXGTK__ ) m_menu_toggle_points_visibility->SetBitmap( wxICON( points_icon ) ); #endif m_view_menu->Append( m_menu_toggle_points_visibility ); wxMenuItem* m_menu_toggle_cameras_visibility; m_menu_toggle_cameras_visibility = new wxMenuItem( m_view_menu, ID_TOGGLE_CAMERAS_VISIBILITY, wxString( wxT("Cameras") ) , wxT("Toggle cameras visibility"), wxITEM_NORMAL ); #ifdef __WXMSW__ m_menu_toggle_cameras_visibility->SetBitmaps( wxIcon("camera_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) ); #elif defined( __WXGTK__ ) m_menu_toggle_cameras_visibility->SetBitmap( wxICON( camera_icon ) ); #endif m_view_menu->Append( m_menu_toggle_cameras_visibility ); m_menubar->Append( m_view_menu, wxT("&View") ); m_export_menu = new wxMenu(); wxMenuItem* m_menu_export_tracks; m_menu_export_tracks = new wxMenuItem( m_export_menu, ID_EXPORT_TRACKS, wxString( wxT("Tracks") ) , wxT("Export tracks to textfile"), wxITEM_NORMAL ); m_export_menu->Append( m_menu_export_tracks ); wxMenuItem* m_menu_export_matches; m_menu_export_matches = new wxMenuItem( m_export_menu, ID_EXPORT_MATCHES, wxString( wxT("Matches") ) , wxT("Export matches to textfile"), wxITEM_NORMAL ); m_export_menu->Append( m_menu_export_matches ); m_export_menu->AppendSeparator(); wxMenuItem* m_menu_export_cmvs; m_menu_export_cmvs = new wxMenuItem( m_export_menu, ID_EXPORT_CMVS, wxString( wxT("CMVS") ) , wxT("Export to CMVS"), wxITEM_NORMAL ); m_export_menu->Append( m_menu_export_cmvs ); wxMenuItem* m_menu_export_bundle_file; m_menu_export_bundle_file = new wxMenuItem( m_export_menu, ID_EXPORT_BUNDLE_FILE, wxString( wxT("Bundle file") ) , wxT("Export to bundle.rd.out"), wxITEM_NORMAL ); m_export_menu->Append( m_menu_export_bundle_file ); wxMenuItem* m_menu_export_ply_file; m_menu_export_ply_file = new wxMenuItem( m_export_menu, ID_EXPORT_PLY_FILE, wxString( wxT("Ply file") ) , wxT("Export reconstruction as .ply file"), wxITEM_NORMAL ); m_export_menu->Append( m_menu_export_ply_file ); wxMenuItem* m_menu_export_meshlab_file; m_menu_export_meshlab_file = new wxMenuItem( m_export_menu, ID_EXPORT_MESHLAB_FILE, wxString( wxT("Meshlab file") ) , wxT("Export reconstruction as .mlp file"), wxITEM_NORMAL ); m_export_menu->Append( m_menu_export_meshlab_file ); wxMenuItem* m_menu_export_maya; m_menu_export_maya = new wxMenuItem( m_export_menu, ID_EXPORT_MAYA_FILE, wxString( wxT("Maya file") ) , wxT("Export reconstruction as .ma file"), wxITEM_NORMAL ); m_export_menu->Append( m_menu_export_maya ); m_menubar->Append( m_export_menu, wxT("&Export") ); m_help_menu = new wxMenu(); wxMenuItem* m_menu_about; m_menu_about = new wxMenuItem( m_help_menu, ID_VIEW_ABOUT, wxString( wxT("About RoboStruct...") ) + wxT('\t') + wxT("F1"), wxT("Show info about this application"), wxITEM_NORMAL ); m_help_menu->Append( m_menu_about ); m_menubar->Append( m_help_menu, wxT("&Help") ); this->SetMenuBar( m_menubar ); m_toolbar = new wxAuiToolBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_HORZ_LAYOUT|wxNO_BORDER ); m_toolbar->AddTool(ID_RECONSTRUCT, "Reconstruct", wxIcon("start_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Compute 3d geometry from images", "Compute 3d geometry from images", NULL); m_toolbar->AddSeparator(); m_toolbar->AddTool(ID_VIEW_IMAGE_BROWSER, "Browser", wxIcon("image_browser_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Show image browser window", "Show image browser window", NULL); m_toolbar->AddTool(ID_VIEW_IMAGE_PREVIEW, "Preview", wxIcon("image_preview_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Show image preview window", "Show image preview window", NULL); m_toolbar->AddTool(ID_VIEW_OPTIONS, "Options", wxIcon("options_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Show options window", "Show options window", NULL); m_toolbar->AddTool(ID_VIEW_LOG, "Log", wxIcon("log_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Show log window", "Show log window", NULL); m_toolbar->Realize(); m_mgr.AddPane( m_toolbar, wxAuiPaneInfo().Top().CaptionVisible( false ).CloseButton( false ).PaneBorder( false ).Movable( false ).Dock().Resizable().FloatingSize( wxSize( -1,-1 ) ).BottomDockable( false ).TopDockable( false ).LeftDockable( false ).RightDockable( false ).Floatable( false ).Layer( 10 ) ); m_window_viewport = new wxAuiMyNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_TAB_EXTERNAL_MOVE|wxAUI_NB_TAB_SPLIT|wxAUI_NB_BOTTOM|wxNO_BORDER); m_mgr.AddPane(m_window_viewport, wxAuiPaneInfo().CentrePane().Name("Viewport").Caption("Viewport").CaptionVisible(true).MaximizeButton(true).MinimizeButton(false).PinButton(false).CloseButton(false)); m_panel8 = new wxPanel( m_window_viewport, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL ); wxBoxSizer* bSizer8; bSizer8 = new wxBoxSizer( wxHORIZONTAL ); int GLCanvasAttributes[] = {WX_GL_RGBA, 1, WX_GL_DOUBLEBUFFER, 1, WX_GL_SAMPLES, 8, 0}; m_gl_canvas = new wxGLCanvas(m_panel8, -1, GLCanvasAttributes); m_gl_canvas->SetBackgroundColour( wxColour( 238, 238, 242 ) ); bSizer8->Add( m_gl_canvas, 1, wxEXPAND, 5 ); m_toolbar_viewport = new wxAuiToolBar( m_panel8, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_VERTICAL ); m_toolbar_viewport->AddTool(ID_RESET_3D_VIEWPORT, "Reset 3d viewport", wxIcon("home_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Reset the 3d viewport", "Reset the 3d viewport", NULL); m_toolbar_viewport->AddTool(ID_TOGGLE_TURNTABLE_ANIMATION, "Turntable", wxIcon("turntable_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Toggle turntable animation", "Toggle turntable animation", NULL); m_toolbar_viewport->AddTool(ID_TOGGLE_GRID_VISIBILITY, "Grid", wxIcon("grid_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Toggle grid visibility", "Toggle grid visibility", NULL); m_toolbar_viewport->AddTool(ID_TOGGLE_TRACKBALL_VISIBILITY, "Trackball", wxIcon("trackball_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Toggle trackball visibility", "Toggle trackball visibility", NULL); m_toolbar_viewport->AddTool(ID_TOGGLE_POINTS_VISIBILITY, "Points", wxIcon("points_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Toggle points visibility", "Toggle points visibility", NULL); m_toolbar_viewport->AddTool(ID_TOGGLE_CAMERAS_VISIBILITY, "Cameras", wxIcon("camera_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Toggle cameras visibility", "Toggle cameras visibility", NULL); m_toolbar_viewport->Realize(); bSizer8->Add( m_toolbar_viewport, 0, wxEXPAND, 5 ); m_panel8->SetSizer( bSizer8 ); m_panel8->Layout(); bSizer8->Fit( m_panel8 ); m_window_viewport->AddPage( m_panel8, wxT("3d view"), true, wxNullBitmap ); m_pane_matches = new wxPanel( m_window_viewport, ID_PANE_MATCHES, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL ); wxBoxSizer* bSizer5; bSizer5 = new wxBoxSizer( wxVERTICAL ); m_pane_matches_view = new wxPanel( m_pane_matches, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL ); m_pane_matches_view->Enable( false ); bSizer5->Add( m_pane_matches_view, 1, wxEXPAND, 5 ); wxBoxSizer* bSizer6; bSizer6 = new wxBoxSizer( wxHORIZONTAL ); m_cb_matches_left = new wxComboBox( m_pane_matches, wxID_ANY, wxT("Combo!"), wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY ); bSizer6->Add( m_cb_matches_left, 1, wxEXPAND|wxALL, 5 ); m_cb_matches_right = new wxComboBox( m_pane_matches, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY ); bSizer6->Add( m_cb_matches_right, 1, wxALL|wxEXPAND, 5 ); bSizer5->Add( bSizer6, 0, wxEXPAND, 5 ); m_pane_matches->SetSizer( bSizer5 ); m_pane_matches->Layout(); bSizer5->Fit( m_pane_matches ); m_window_viewport->AddPage( m_pane_matches, wxT("Matches"), false, wxNullBitmap ); m_window_image_browser = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 370,200 ), wxTAB_TRAVERSAL ); m_window_image_browser->SetMinSize( wxSize( 370,200 ) ); m_mgr.AddPane( m_window_image_browser, wxAuiPaneInfo() .Name( wxT("Image browser") ).Left() .Caption( wxT("Image browser") ).MaximizeButton( true ).PaneBorder( false ).Dock().Resizable().FloatingSize( wxSize( 386,234 ) ).DockFixed( false ).Layer( 1 ) ); wxBoxSizer* bSizer1; bSizer1 = new wxBoxSizer( wxVERTICAL ); m_dir_picker = new wxDirPickerCtrl( m_window_image_browser, wxID_ANY, wxT("D:\\Reconstruct\\TestData\\"), wxT("Select a folder"), wxDefaultPosition, wxDefaultSize, wxDIRP_DEFAULT_STYLE|wxNO_BORDER ); m_dir_picker->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); m_dir_picker->SetBackgroundColour( wxColour( 238, 238, 242 ) ); bSizer1->Add( m_dir_picker, 0, wxEXPAND|wxALL, 5 ); m_img_ctrl = new wxListCtrl( m_window_image_browser, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES|wxNO_BORDER ); m_img_ctrl->SetBackgroundColour( wxColour( 238, 238, 242 ) ); bSizer1->Add( m_img_ctrl, 1, wxEXPAND, 5 ); m_window_image_browser->SetSizer( bSizer1 ); m_window_image_browser->Layout(); m_window_image_preview = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 370,200 ), wxNO_BORDER|wxTAB_TRAVERSAL ); m_window_image_preview->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); m_window_image_preview->SetBackgroundColour( wxColour( 238, 238, 242 ) ); m_window_image_preview->SetMinSize( wxSize( 370,200 ) ); m_mgr.AddPane( m_window_image_preview, wxAuiPaneInfo() .Name( wxT("Image preview") ).Left() .Caption( wxT("Image preview") ).MaximizeButton( true ).PaneBorder( false ).Dock().Resizable().FloatingSize( wxSize( 386,234 ) ).DockFixed( false ).Layer( 1 ) ); m_window_options = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 370,200 ), wxNO_BORDER|wxTAB_TRAVERSAL ); m_window_options->SetBackgroundColour( wxColour( 238, 238, 242 ) ); m_window_options->SetMinSize( wxSize( 370,200 ) ); m_mgr.AddPane( m_window_options, wxAuiPaneInfo() .Name( wxT("Options") ).Left() .Caption( wxT("Options") ).MaximizeButton( true ).PaneBorder( false ).Dock().Resizable().FloatingSize( wxSize( 439,316 ) ).DockFixed( false ).Layer( 1 ) ); wxBoxSizer* bSizer2; bSizer2 = new wxBoxSizer( wxVERTICAL ); m_toolbar_options = new wxAuiToolBar( m_window_options, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_HORZ_LAYOUT|wxNO_BORDER ); m_toolbar_options->SetToolBitmapSize( wxSize( 22,22 ) ); m_toolbar_options->SetToolPacking( 2 ); m_toolbar_options->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); m_toolbar_options->AddTool(ID_RESET_OPTIONS, wxT("Reset options"), wxIcon("reset_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Reset options", "Reset options", NULL); m_toolbar_options->AddTool(ID_SAVE_OPTIONS, wxT("Save options"), wxIcon("floppy_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Save options", "Save options", NULL); m_toolbar_options->Realize(); bSizer2->Add( m_toolbar_options, 0, wxEXPAND, 5 ); m_pg_options = new wxPropertyGrid(m_window_options, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxPG_BOLD_MODIFIED | wxPG_DEFAULT_STYLE | wxNO_BORDER); m_pg_options->SetBackgroundColour( wxColour( 238, 238, 242 ) ); bSizer2->Add( m_pg_options, 1, wxEXPAND, 5 ); m_window_options->SetSizer( bSizer2 ); m_window_options->Layout(); m_window_log = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 150,150 ), wxTAB_TRAVERSAL ); m_window_log->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); m_window_log->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); m_window_log->SetMinSize( wxSize( 150,150 ) ); m_mgr.AddPane( m_window_log, wxAuiPaneInfo() .Name( wxT("Log") ).Bottom() .Caption( wxT("Log") ).MaximizeButton( true ).PaneBorder( false ).Dock().Resizable().FloatingSize( wxSize( 596,244 ) ).DockFixed( false ).Row( 0 ).Layer( 0 ) ); wxBoxSizer* bSizer3; bSizer3 = new wxBoxSizer( wxHORIZONTAL ); m_tc_log = new wxTextCtrl( m_window_log, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY|wxNO_BORDER ); m_tc_log->SetMaxLength( 0 ); m_tc_log->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ) ); m_tc_log->SetBackgroundColour( wxColour( 245, 245, 245 ) ); bSizer3->Add( m_tc_log, 1, wxEXPAND, 5 ); m_toolbar_log = new wxAuiToolBar( m_window_log, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_VERTICAL|wxNO_BORDER ); m_toolbar_log->SetToolBitmapSize( wxSize( 22,22 ) ); m_toolbar_log->SetToolPacking( 2 ); m_toolbar_log->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); m_toolbar_log->AddTool(ID_SAVE_LOG, "Save Log", wxIcon("floppy_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Save the log to a .txt file", "Save the log to a .txt file", NULL); m_toolbar_log->AddTool(ID_CLEAR_LOG, "Clear log", wxIcon("clear_log_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Clear the log window", "Clear the log window", NULL); m_toolbar_log->Realize(); bSizer3->Add( m_toolbar_log, 0, wxEXPAND, 5 ); m_window_log->SetSizer( bSizer3 ); m_window_log->Layout(); m_window_about = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL ); m_mgr.AddPane( m_window_about, wxAuiPaneInfo() .Name( wxT("About") ).Left() .Caption( wxT("About RoboStruct") ).Hide().Float().FloatingPosition( wxPoint( 643,334 ) ).Resizable().FloatingSize( wxSize( 300,300 ) ).DockFixed( false ).BottomDockable( false ).TopDockable( false ).LeftDockable( false ).RightDockable( false ).Floatable( false ) ); wxBoxSizer* bSizer7; bSizer7 = new wxBoxSizer( wxVERTICAL ); m_tc_about = new wxTextCtrl( m_window_about, wxID_ANY, wxT("This is awesome!\nLicense(s)\nIcons (Tango, Crystal project...)\nGLocyte"), wxDefaultPosition, wxDefaultSize, wxTE_CENTRE|wxTE_MULTILINE|wxTE_NO_VSCROLL|wxTE_READONLY|wxNO_BORDER ); m_tc_about->SetMaxLength( 0 ); bSizer7->Add( m_tc_about, 1, wxEXPAND, 5 ); m_window_about->SetSizer( bSizer7 ); m_window_about->Layout(); bSizer7->Fit( m_window_about ); m_mgr.Update(); this->Centre( wxBOTH ); // Connect Events this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( MainFrame_base::OnUpdateUI ) ); this->Connect( m_menu_exit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnMenuExit ) ); this->Connect( m_menu_reconstruct->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnReconstruct ) ); this->Connect( m_menu_view_image_browser->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) ); this->Connect( m_menu_view_image_preview->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) ); this->Connect( m_menu_view_options->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) ); this->Connect( m_menu_view_log->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) ); this->Connect( m_menu_reset_3d_viewport->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnReset3dViewport ) ); this->Connect( m_menu_toggle_turntable_animation->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnToggleTurntableAnimation ) ); this->Connect( m_menu_toggle_trackball_visibility->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) ); this->Connect( m_menu_toggle_grid_visibility->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) ); this->Connect( m_menu_toggle_points_visibility->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) ); this->Connect( m_menu_toggle_cameras_visibility->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) ); this->Connect( m_menu_export_tracks->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) ); this->Connect( m_menu_export_matches->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) ); this->Connect( m_menu_export_cmvs->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) ); this->Connect( m_menu_export_bundle_file->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) ); this->Connect( m_menu_export_ply_file->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) ); this->Connect( m_menu_export_meshlab_file->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) ); this->Connect( m_menu_export_maya->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) ); this->Connect( m_menu_about->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) ); this->Connect( ID_RECONSTRUCT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnReconstruct ) ); this->Connect( ID_VIEW_IMAGE_BROWSER, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) ); this->Connect( ID_VIEW_IMAGE_PREVIEW, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) ); this->Connect( ID_VIEW_OPTIONS, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) ); this->Connect( ID_VIEW_LOG, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) ); this->Connect( ID_RESET_3D_VIEWPORT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnReset3dViewport ) ); this->Connect( ID_TOGGLE_TURNTABLE_ANIMATION, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnToggleTurntableAnimation ) ); this->Connect( ID_TOGGLE_GRID_VISIBILITY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) ); this->Connect( ID_TOGGLE_TRACKBALL_VISIBILITY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) ); this->Connect( ID_TOGGLE_POINTS_VISIBILITY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) ); this->Connect( ID_TOGGLE_CAMERAS_VISIBILITY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) ); m_gl_canvas->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( MainFrame_base::OnGLCanvasEraseBackground ), NULL, this ); m_gl_canvas->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Connect( wxEVT_MIDDLE_UP, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Connect( wxEVT_MOTION, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Connect( wxEVT_MIDDLE_DCLICK, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Connect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Connect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Connect( wxEVT_PAINT, wxPaintEventHandler( MainFrame_base::OnGLCanvasPaint ), NULL, this ); m_gl_canvas->Connect( wxEVT_SIZE, wxSizeEventHandler( MainFrame_base::OnGLCanvasSize ), NULL, this ); m_pane_matches_view->Connect( wxEVT_PAINT, wxPaintEventHandler( MainFrame_base::OnMatchesViewPaint ), NULL, this ); m_pane_matches_view->Connect( wxEVT_SIZE, wxSizeEventHandler( MainFrame_base::OnMatchesViewResize ), NULL, this ); m_cb_matches_left->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainFrame_base::OnSelectMatchImage ), NULL, this ); m_cb_matches_right->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainFrame_base::OnSelectMatchImage ), NULL, this ); m_dir_picker->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainFrame_base::OnSelectDirectory ), NULL, this ); m_img_ctrl->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( MainFrame_base::OnSelectPreviewImage ), NULL, this ); m_window_image_preview->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Connect( wxEVT_MIDDLE_UP, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Connect( wxEVT_MOTION, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Connect( wxEVT_MIDDLE_DCLICK, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Connect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Connect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Connect( wxEVT_PAINT, wxPaintEventHandler( MainFrame_base::OnImagePreviewPaint ), NULL, this ); m_window_image_preview->Connect( wxEVT_SIZE, wxSizeEventHandler( MainFrame_base::OnImagePreviewResize ), NULL, this ); this->Connect( ID_RESET_OPTIONS, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnResetOptions ) ); this->Connect( ID_SAVE_LOG, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnSaveLog ) ); this->Connect( ID_CLEAR_LOG, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnClearLog ) ); }
CliCommandEditDialogGeneratedClass::CliCommandEditDialogGeneratedClass( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); wxFlexGridSizer* RightSizer; RightSizer = new wxFlexGridSizer( 5, 1, 0, 0 ); RightSizer->AddGrowableCol( 0 ); RightSizer->AddGrowableRow( 1 ); RightSizer->SetFlexibleDirection( wxBOTH ); RightSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); wxBoxSizer* FormSizer; FormSizer = new wxBoxSizer( wxVERTICAL ); wxFlexGridSizer* FormFlexSizer; FormFlexSizer = new wxFlexGridSizer( 2, 1, 0, 0 ); FormFlexSizer->AddGrowableCol( 0 ); FormFlexSizer->AddGrowableRow( 0 ); FormFlexSizer->AddGrowableRow( 1 ); FormFlexSizer->SetFlexibleDirection( wxBOTH ); FormFlexSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); wxBoxSizer* FormColumn1Sizer; FormColumn1Sizer = new wxBoxSizer( wxVERTICAL ); ExecutableLabel = new wxStaticText( this, wxID_ANY, _("Executable"), wxDefaultPosition, wxDefaultSize, 0 ); ExecutableLabel->Wrap( -1 ); FormColumn1Sizer->Add( ExecutableLabel, 0, wxALL, 5 ); wxBoxSizer* bSizer12; bSizer12 = new wxBoxSizer( wxHORIZONTAL ); Executable = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); bSizer12->Add( Executable, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); ExecutableFilePicker = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, _("Select an executable"), wxT("*.*"), wxDefaultPosition, wxDefaultSize, wxFLP_FILE_MUST_EXIST|wxFLP_OPEN ); bSizer12->Add( ExecutableFilePicker, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); FormColumn1Sizer->Add( bSizer12, 1, wxEXPAND, 5 ); FormFlexSizer->Add( FormColumn1Sizer, 1, wxEXPAND, 5 ); wxBoxSizer* WorkingDirectorySizer; WorkingDirectorySizer = new wxBoxSizer( wxVERTICAL ); WorkingDirectoryLabel = new wxStaticText( this, wxID_ANY, _("Working Directory"), wxDefaultPosition, wxDefaultSize, 0 ); WorkingDirectoryLabel->Wrap( -1 ); WorkingDirectorySizer->Add( WorkingDirectoryLabel, 0, wxALL, 5 ); WorkingDirectory = new wxDirPickerCtrl( this, wxID_ANY, wxEmptyString, _("Select a working directory"), wxDefaultPosition, wxDefaultSize, wxDIRP_DEFAULT_STYLE|wxDIRP_USE_TEXTCTRL ); WorkingDirectorySizer->Add( WorkingDirectory, 0, wxALL|wxEXPAND, 5 ); FormFlexSizer->Add( WorkingDirectorySizer, 1, wxEXPAND, 5 ); FormSizer->Add( FormFlexSizer, 1, wxEXPAND, 5 ); RightSizer->Add( FormSizer, 1, wxEXPAND, 5 ); wxBoxSizer* ArgumentsSizer; ArgumentsSizer = new wxBoxSizer( wxVERTICAL ); ArgumentsLabel = new wxStaticText( this, wxID_ANY, _("Arguments"), wxDefaultPosition, wxDefaultSize, 0 ); ArgumentsLabel->Wrap( -1 ); ArgumentsSizer->Add( ArgumentsLabel, 0, wxALL, 5 ); Arguments = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE ); ArgumentsSizer->Add( Arguments, 1, wxALL|wxEXPAND, 5 ); RightSizer->Add( ArgumentsSizer, 1, wxEXPAND, 5 ); wxBoxSizer* FormColumn2Sizer; FormColumn2Sizer = new wxBoxSizer( wxVERTICAL ); DescriptionLabel = new wxStaticText( this, wxID_ANY, _("Description"), wxDefaultPosition, wxDefaultSize, 0 ); DescriptionLabel->Wrap( -1 ); FormColumn2Sizer->Add( DescriptionLabel, 0, wxALL, 5 ); Description = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); FormColumn2Sizer->Add( Description, 0, wxALL|wxEXPAND, 5 ); RightSizer->Add( FormColumn2Sizer, 1, wxEXPAND, 5 ); wxBoxSizer* CheckSizer; CheckSizer = new wxBoxSizer( wxVERTICAL ); WaitForArguments = new wxCheckBox( this, wxID_ANY, _("Wait For Arguments"), wxDefaultPosition, wxDefaultSize, 0 ); CheckSizer->Add( WaitForArguments, 0, wxALL, 5 ); ShowInToolbar = new wxCheckBox( this, wxID_ANY, _("Show In Toolbar"), wxDefaultPosition, wxDefaultSize, 0 ); CheckSizer->Add( ShowInToolbar, 0, wxALL, 5 ); RightSizer->Add( CheckSizer, 1, wxEXPAND, 5 ); ButtonsSizer = new wxStdDialogButtonSizer(); ButtonsSizerOK = new wxButton( this, wxID_OK ); ButtonsSizer->AddButton( ButtonsSizerOK ); ButtonsSizerCancel = new wxButton( this, wxID_CANCEL ); ButtonsSizer->AddButton( ButtonsSizerCancel ); ButtonsSizerHelp = new wxButton( this, wxID_HELP ); ButtonsSizer->AddButton( ButtonsSizerHelp ); ButtonsSizer->Realize(); RightSizer->Add( ButtonsSizer, 1, wxEXPAND, 5 ); this->SetSizer( RightSizer ); this->Layout(); this->Centre( wxBOTH ); // Connect Events ExecutableFilePicker->Connect( wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( CliCommandEditDialogGeneratedClass::OnFileChanged ), NULL, this ); Description->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( CliCommandEditDialogGeneratedClass::OnDescriptionText ), NULL, this ); ButtonsSizerHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CliCommandEditDialogGeneratedClass::OnHelpButton ), NULL, this ); ButtonsSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CliCommandEditDialogGeneratedClass::OnOkButton ), NULL, this ); }
wxBSAopt::wxBSAopt( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); BOMenuBar = new wxMenuBar( 0 ); BOGame = new wxMenu(); wxMenuItem* BOAuto; BOAuto = new wxMenuItem( BOGame, wxID_AUTO, wxString( wxT("Automatic") ) , wxEmptyString, wxITEM_RADIO ); BOGame->Append( BOAuto ); BOAuto->Check( true ); wxMenuItem* BOMorrowind; BOMorrowind = new wxMenuItem( BOGame, wxID_MORROWIND, wxString( wxT("Morrowind") ) , wxEmptyString, wxITEM_RADIO ); BOGame->Append( BOMorrowind ); wxMenuItem* BOOblivion; BOOblivion = new wxMenuItem( BOGame, wxID_OBLIVON, wxString( wxT("Oblivion") ) , wxEmptyString, wxITEM_RADIO ); BOGame->Append( BOOblivion ); wxMenuItem* BOFallOut; BOFallOut = new wxMenuItem( BOGame, wxID_FALLOUT, wxString( wxT("Fallout 3") ) , wxEmptyString, wxITEM_RADIO ); BOGame->Append( BOFallOut ); wxMenuItem* BOFallOutXB; BOFallOutXB = new wxMenuItem( BOGame, wxID_FALLOUTXB, wxString( wxT("Fallout 3 (XBox 360)") ) , wxEmptyString, wxITEM_RADIO ); BOGame->Append( BOFallOutXB ); wxMenuItem* BOSkyrim; BOSkyrim = new wxMenuItem( BOGame, wxID_SKYRIM, wxString( wxT("Skyrim") ) , wxEmptyString, wxITEM_RADIO ); BOGame->Append( BOSkyrim ); wxMenuItem* BOSkyrimXB; BOSkyrimXB = new wxMenuItem( BOGame, wxID_SKYRIMXB, wxString( wxT("Skyrim (XBox 360)") ) , wxEmptyString, wxITEM_RADIO ); BOGame->Append( BOSkyrimXB ); BOMenuBar->Append( BOGame, wxT("Game") ); BOCompression = new wxMenu(); wxMenuItem* BOZ0; BOZ0 = new wxMenuItem( BOCompression, wxID_BOZ0, wxString( wxT("0 (off)") ) , wxEmptyString, wxITEM_RADIO ); BOCompression->Append( BOZ0 ); wxMenuItem* BOZ1; BOZ1 = new wxMenuItem( BOCompression, wxID_BOZ1, wxString( wxT("1") ) , wxEmptyString, wxITEM_RADIO ); BOCompression->Append( BOZ1 ); wxMenuItem* BOZ2; BOZ2 = new wxMenuItem( BOCompression, wxID_BOZ2, wxString( wxT("2") ) , wxEmptyString, wxITEM_RADIO ); BOCompression->Append( BOZ2 ); wxMenuItem* BOZ3; BOZ3 = new wxMenuItem( BOCompression, wxID_BOZ3, wxString( wxT("3") ) , wxEmptyString, wxITEM_RADIO ); BOCompression->Append( BOZ3 ); wxMenuItem* BOZ4; BOZ4 = new wxMenuItem( BOCompression, wxID_BOZ4, wxString( wxT("4") ) , wxEmptyString, wxITEM_RADIO ); BOCompression->Append( BOZ4 ); wxMenuItem* BOZ5; BOZ5 = new wxMenuItem( BOCompression, wxID_BOZ5, wxString( wxT("5") ) , wxEmptyString, wxITEM_RADIO ); BOCompression->Append( BOZ5 ); wxMenuItem* BOZ6; BOZ6 = new wxMenuItem( BOCompression, wxID_BOZ6, wxString( wxT("6") ) , wxEmptyString, wxITEM_RADIO ); BOCompression->Append( BOZ6 ); wxMenuItem* BOZ7; BOZ7 = new wxMenuItem( BOCompression, wxID_BOZ7, wxString( wxT("7") ) , wxEmptyString, wxITEM_RADIO ); BOCompression->Append( BOZ7 ); wxMenuItem* BOZ8; BOZ8 = new wxMenuItem( BOCompression, wxID_BOZ8, wxString( wxT("8") ) , wxEmptyString, wxITEM_RADIO ); BOCompression->Append( BOZ8 ); wxMenuItem* BOZ9; BOZ9 = new wxMenuItem( BOCompression, wxID_BOZ9, wxString( wxT("9") ) , wxEmptyString, wxITEM_RADIO ); BOCompression->Append( BOZ9 ); wxMenuItem* BOZ10Quick; BOZ10Quick = new wxMenuItem( BOCompression, wxID_BOZ10Q, wxString( wxT("10 (quick)") ) , wxEmptyString, wxITEM_RADIO ); BOCompression->Append( BOZ10Quick ); wxMenuItem* BOZ10Thorough; BOZ10Thorough = new wxMenuItem( BOCompression, wxID_BOZ10T, wxString( wxT("10 (maximum)") ) , wxEmptyString, wxITEM_RADIO ); BOCompression->Append( BOZ10Thorough ); BOZ10Thorough->Check( true ); BOCompression->AppendSeparator(); wxMenuItem* BOForce; BOForce = new wxMenuItem( BOCompression, wxID_FORCE, wxString( wxT("Forced") ) , wxEmptyString, wxITEM_CHECK ); BOCompression->Append( BOForce ); BOMenuBar->Append( BOCompression, wxT("Compression") ); BOSettings = new wxMenu(); wxMenuItem* BOSkipExisting; BOSkipExisting = new wxMenuItem( BOSettings, wxID_SKIPE, wxString( wxT("Skip existing files") ) , wxEmptyString, wxITEM_CHECK ); BOSettings->Append( BOSkipExisting ); BOSkipExisting->Check( true ); wxMenuItem* BOSkipNewer; BOSkipNewer = new wxMenuItem( BOSettings, wxID_SKIPN, wxString( wxT("Skip older files") ) , wxEmptyString, wxITEM_CHECK ); BOSettings->Append( BOSkipNewer ); BOSkipNewer->Check( true ); wxMenuItem* BOSkipHidden; BOSkipHidden = new wxMenuItem( BOSettings, wxID_SKIPH, wxString( wxT("Skip hidden files") ) , wxEmptyString, wxITEM_CHECK ); BOSettings->Append( BOSkipHidden ); BOSkipHidden->Check( true ); BOSettings->AppendSeparator(); wxMenuItem* BOSkipHash; BOSkipHash = new wxMenuItem( BOSettings, wxID_SKIPC, wxString( wxT("Skip hash-check") ) , wxEmptyString, wxITEM_CHECK ); BOSettings->Append( BOSkipHash ); wxMenuItem* BOSkipBroken; BOSkipBroken = new wxMenuItem( BOSettings, wxID_SKIPB, wxString( wxT("Skip broken files") ) , wxEmptyString, wxITEM_CHECK ); BOSettings->Append( BOSkipBroken ); BOSettings->AppendSeparator(); wxMenuItem* BOUnselectExtras; BOUnselectExtras = new wxMenuItem( BOSettings, wxID_SKIPX, wxString( wxT("Unselect inappropriate") ) , wxEmptyString, wxITEM_CHECK ); BOSettings->Append( BOUnselectExtras ); BOUnselectExtras->Check( true ); BOSettings->AppendSeparator(); wxMenuItem* BOLogfile; BOLogfile = new wxMenuItem( BOSettings, wxID_LOGF, wxString( wxT("Write logfile") ) , wxEmptyString, wxITEM_CHECK ); BOSettings->Append( BOLogfile ); BOMenuBar->Append( BOSettings, wxT("Settings") ); this->SetMenuBar( BOMenuBar ); wxBoxSizer* bSizer1; bSizer1 = new wxBoxSizer( wxVERTICAL ); m_notebook2 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); m_panel5 = new wxPanel( m_notebook2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* bSizer14; bSizer14 = new wxBoxSizer( wxVERTICAL ); m_splitter1 = new wxSplitterWindow( m_panel5, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); m_splitter1->SetSashGravity( 0 ); m_splitter1->Connect( wxEVT_IDLE, wxIdleEventHandler( wxBSAopt::m_splitter1OnIdle ), NULL, this ); BOPanelContents = new wxPanel( m_splitter1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* bSizer36; bSizer36 = new wxBoxSizer( wxVERTICAL ); BOInput = new wxDirPickerCtrl( BOPanelContents, wxID_ANY, wxT("./in"), wxT("Select a folder"), wxDefaultPosition, wxDefaultSize, wxDIRP_DIR_MUST_EXIST|wxDIRP_USE_TEXTCTRL ); BOInput->Enable( false ); BOInput->Hide(); bSizer36->Add( BOInput, 0, wxALL|wxEXPAND, 5 ); wxBoxSizer* bSizer32; bSizer32 = new wxBoxSizer( wxHORIZONTAL ); BOTypeIn = new wxStaticBitmap( BOPanelContents, wxID_ANY, wxBitmap( wxT("#116"), wxBITMAP_TYPE_RESOURCE ), wxDefaultPosition, wxSize( 16,16 ), 0 ); bSizer32->Add( BOTypeIn, 0, wxALL, 7 ); BOInText = new wxTextCtrl( BOPanelContents, wxID_ANY, wxT(".\\in"), wxDefaultPosition, wxDefaultSize, 0 ); BOInText->SetMaxLength( 0 ); bSizer32->Add( BOInText, 1, wxALL, 5 ); BOInBrowse = new wxButton( BOPanelContents, wxID_ANY, wxT("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer32->Add( BOInBrowse, 0, wxALL, 5 ); bSizer36->Add( bSizer32, 0, wxEXPAND, 5 ); BOArchiveTree = new wxTreeListCtrl( BOPanelContents, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxTR_FULL_ROW_HIGHLIGHT|wxSIMPLE_BORDER ); BOArchiveTree->SetToolTip( wxT("The directories present under the given source") ); BOArchiveTree->AddColumn( wxT("Path"), 260, wxALIGN_LEFT, -1, true, false ); BOArchiveTree->AddColumn( wxT("Children"), 100, wxALIGN_RIGHT, -1, true, false ); BOArchiveTree->AddColumn( wxT("Size"), 100, wxALIGN_RIGHT, -1, true, false ); bSizer36->Add( BOArchiveTree, 1, wxEXPAND | wxALL, 5 ); BOPanelContents->SetSizer( bSizer36 ); BOPanelContents->Layout(); bSizer36->Fit( BOPanelContents ); m_panel4 = new wxPanel( m_splitter1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* bSizer13; bSizer13 = new wxBoxSizer( wxVERTICAL ); wxBoxSizer* bSizer10; bSizer10 = new wxBoxSizer( wxHORIZONTAL ); BOFilter = new wxComboBox( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); BOFilter->Append( wxEmptyString ); BOFilter->Append( wxT("*.*") ); BOFilter->Append( wxT("*.dds") ); BOFilter->Append( wxT("*.nif") ); bSizer10->Add( BOFilter, 1, wxALL|wxEXPAND, 5 ); BOFilterApply = new wxButton( m_panel4, wxID_ANY, wxT("Apply"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer10->Add( BOFilterApply, 0, wxALL, 5 ); bSizer13->Add( bSizer10, 0, wxEXPAND, 5 ); wxBoxSizer* bSizer39; bSizer39 = new wxBoxSizer( wxHORIZONTAL ); BOPluginToolbar = new wxToolBar( m_panel4, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_HORIZONTAL ); BOPluginToolbar->AddTool( wxID_RESET, wxT("Reset"), wxBitmap( wxT("#112"), wxBITMAP_TYPE_RESOURCE ), wxNullBitmap, wxITEM_NORMAL, wxT("Selects all visible files"), wxEmptyString, NULL ); BOPluginToolbar->AddTool( wxID_CLEAR, wxT("tool"), wxBitmap( wxT("#110"), wxBITMAP_TYPE_RESOURCE ), wxNullBitmap, wxITEM_NORMAL, wxT("Clears all visible files from the selection"), wxEmptyString, NULL ); BOPluginToolbar->Realize(); bSizer39->Add( BOPluginToolbar, 0, wxEXPAND, 5 ); BORecursive = new wxCheckBox( m_panel4, wxID_ANY, wxT("Show recursive"), wxDefaultPosition, wxDefaultSize, 0 ); BORecursive->SetToolTip( wxT("Show files in sub-directories as well") ); bSizer39->Add( BORecursive, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); bSizer13->Add( bSizer39, 0, wxEXPAND, 5 ); BOArchiveList = new wxCheckedListCtrl( m_panel4, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT ); BOArchiveList->SetToolTip( wxT("The files in the currently selected directory") ); bSizer13->Add( BOArchiveList, 1, wxALL|wxEXPAND, 5 ); wxBoxSizer* bSizer42; bSizer42 = new wxBoxSizer( wxHORIZONTAL ); BOOutput = new wxFilePickerCtrl( m_panel4, wxID_ANY, wxT("./out"), wxT("Select a file"), wxT("*.land;*.raw"), wxDefaultPosition, wxDefaultSize, wxFLP_OVERWRITE_PROMPT|wxFLP_SAVE|wxFLP_USE_TEXTCTRL ); BOOutput->Enable( false ); BOOutput->Hide(); bSizer42->Add( BOOutput, 1, wxALL, 5 ); wxBoxSizer* bSizer321; bSizer321 = new wxBoxSizer( wxHORIZONTAL ); BOTypeOut = new wxStaticBitmap( m_panel4, wxID_ANY, wxBitmap( wxT("#116"), wxBITMAP_TYPE_RESOURCE ), wxDefaultPosition, wxSize( 16,16 ), 0 ); bSizer321->Add( BOTypeOut, 0, wxALL, 7 ); BOOutText = new wxTextCtrl( m_panel4, wxID_ANY, wxT(".\\out"), wxDefaultPosition, wxDefaultSize, 0 ); BOOutText->SetMaxLength( 0 ); bSizer321->Add( BOOutText, 1, wxALL, 5 ); BOOutBrowse = new wxButton( m_panel4, wxID_ANY, wxT("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer321->Add( BOOutBrowse, 0, wxALL, 5 ); bSizer42->Add( bSizer321, 1, wxEXPAND, 5 ); BOConvert = new wxButton( m_panel4, wxID_ANY, wxT("Convert"), wxDefaultPosition, wxDefaultSize, 0 ); BOConvert->Enable( false ); BOConvert->SetToolTip( wxT("Copy/Convert all files from the source into the destination") ); bSizer42->Add( BOConvert, 0, wxALL, 5 ); bSizer13->Add( bSizer42, 0, wxEXPAND, 5 ); m_panel4->SetSizer( bSizer13 ); m_panel4->Layout(); bSizer13->Fit( m_panel4 ); m_splitter1->SplitHorizontally( BOPanelContents, m_panel4, 0 ); bSizer14->Add( m_splitter1, 1, wxEXPAND, 5 ); m_panel5->SetSizer( bSizer14 ); m_panel5->Layout(); bSizer14->Fit( m_panel5 ); m_notebook2->AddPage( m_panel5, wxT("Browser"), false ); bSizer1->Add( m_notebook2, 1, wxEXPAND | wxALL, 0 ); this->SetSizer( bSizer1 ); this->Layout(); BOStatusBar = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY ); this->Centre( wxBOTH ); // Connect Events this->Connect( BOAuto->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeToAuto ) ); this->Connect( BOMorrowind->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeToMorrowind ) ); this->Connect( BOOblivion->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeToOblivion ) ); this->Connect( BOFallOut->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeToFallout ) ); this->Connect( BOFallOutXB->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeToFalloutXB ) ); this->Connect( BOSkyrim->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeToSkyrim ) ); this->Connect( BOSkyrimXB->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeToSkyrimXB ) ); this->Connect( BOForce->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeForceCompression ) ); this->Connect( BOSkipExisting->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeSkipExisting ) ); this->Connect( BOSkipNewer->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeSkipNewer ) ); this->Connect( BOSkipHidden->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeSkipHidden ) ); this->Connect( BOSkipHash->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeSkipHash ) ); this->Connect( BOSkipBroken->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeSkipBroken ) ); this->Connect( BOUnselectExtras->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeUnselectExtras ) ); this->Connect( BOLogfile->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeLogFile ) ); BOInput->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( wxBSAopt::ChangePluginDir ), NULL, this ); BOInText->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( wxBSAopt::TypedInDone ), NULL, this ); BOInText->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxBSAopt::TypedIn ), NULL, this ); BOInBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxBSAopt::BrowseIn ), NULL, this ); BOArchiveTree->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( wxBSAopt::DescentTreeItem ), NULL, this ); BOArchiveTree->Connect( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, wxTreeEventHandler( wxBSAopt::ActivateTreeItem ), NULL, this ); BOArchiveTree->Connect( wxEVT_COMMAND_TREE_ITEM_MENU, wxTreeEventHandler( wxBSAopt::MenuTreeItem ), NULL, this ); BOArchiveTree->Connect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( wxBSAopt::ChangeTreeItem ), NULL, this ); BOFilter->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( wxBSAopt::ChangeFilter ), NULL, this ); BOFilterApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxBSAopt::ApplyFilter ), NULL, this ); this->Connect( wxID_RESET, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( wxBSAopt::ResetFileList ) ); this->Connect( wxID_CLEAR, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( wxBSAopt::ClearFileList ) ); BORecursive->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( wxBSAopt::ChangeRecursion ), NULL, this ); BOOutText->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( wxBSAopt::TypedOutDone ), NULL, this ); BOOutText->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxBSAopt::TypedOut ), NULL, this ); BOOutBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxBSAopt::BrowseOut ), NULL, this ); BOConvert->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxBSAopt::ConversionStart ), NULL, this ); }
SpellCheckerSettings_base::SpellCheckerSettings_base(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxC9A94InitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* bSizer5 = new wxBoxSizer(wxVERTICAL); this->SetSizer(bSizer5); wxBoxSizer* bSizer51 = new wxBoxSizer(wxHORIZONTAL); bSizer5->Add(bSizer51, 0, wxEXPAND, 5); m_staticText2 = new wxStaticText(this, wxID_ANY, _("Dictionary path:"), wxDefaultPosition, wxSize(-1, -1), 0); bSizer51->Add(m_staticText2, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_pDirPicker = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, wxT("Select a folder"), wxDefaultPosition, wxSize(-1, -1), wxDIRP_DEFAULT_STYLE|wxDIRP_USE_TEXTCTRL); m_pDirPicker->SetToolTip(_("Select the location of the installed dictionaries")); bSizer51->Add(m_pDirPicker, 1, wxALL, 2); m_pHyperlink = new wxHyperlinkCtrl(this, wxID_ANY, _("Find dictionaries on the web.."), wxT("http://wiki.services.openoffice.org/wiki/Dictionaries"), wxDefaultPosition, wxSize(-1, -1), wxHL_DEFAULT_STYLE); bSizer5->Add(m_pHyperlink, 0, wxBOTTOM|wxALIGN_CENTER_HORIZONTAL, 5); wxBoxSizer* bSizer6 = new wxBoxSizer(wxHORIZONTAL); bSizer5->Add(bSizer6, 1, wxEXPAND, 5); wxBoxSizer* boxSizer9 = new wxBoxSizer(wxVERTICAL); bSizer6->Add(boxSizer9, 1, wxALL|wxEXPAND, 5); wxBoxSizer* bSizer7 = new wxBoxSizer(wxHORIZONTAL); boxSizer9->Add(bSizer7, 0, wxEXPAND, 5); m_staticText4 = new wxStaticText(this, wxID_ANY, _("Dictionary base name:"), wxDefaultPosition, wxSize(-1, -1), 0); bSizer7->Add(m_staticText4, 0, wxALL, 5); m_pCurrentLanguage = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(60,-1), wxTE_READONLY|wxTE_CENTRE); wxFont m_pCurrentLanguageFont(8, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxT("Tahoma")); m_pCurrentLanguage->SetFont(m_pCurrentLanguageFont); #if wxVERSION_NUMBER >= 3000 m_pCurrentLanguage->SetHint(wxT("")); #endif bSizer7->Add(m_pCurrentLanguage, 1, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 3); wxArrayString m_pLanguageListArr; m_pLanguageList = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxSize(200,-1), m_pLanguageListArr, wxLB_SINGLE); boxSizer9->Add(m_pLanguageList, 1, wxALL|wxEXPAND, 3); m_pLanguageList->SetMinSize(wxSize(200,-1)); wxStaticBoxSizer* staticBoxSizer17 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Check The Following:")), wxVERTICAL); bSizer6->Add(staticBoxSizer17, 0, wxALL|wxEXPAND, 5); m_pStrings = new wxCheckBox(this, wxID_ANY, _("Strings"), wxDefaultPosition, wxSize(-1, -1), 0); m_pStrings->SetValue(false); staticBoxSizer17->Add(m_pStrings, 0, wxALL, 2); m_pCppComments = new wxCheckBox(this, wxID_ANY, _("CPP comments"), wxDefaultPosition, wxSize(-1, -1), 0); m_pCppComments->SetValue(false); staticBoxSizer17->Add(m_pCppComments, 0, wxALL, 2); m_pC_Comments = new wxCheckBox(this, wxID_ANY, _("C comments"), wxDefaultPosition, wxSize(-1, -1), 0); m_pC_Comments->SetValue(false); staticBoxSizer17->Add(m_pC_Comments, 0, wxALL, 2); m_pDox1 = new wxCheckBox(this, wxID_ANY, _("doxygen */"), wxDefaultPosition, wxSize(-1, -1), 0); m_pDox1->SetValue(false); staticBoxSizer17->Add(m_pDox1, 0, wxALL, 2); m_pDox2 = new wxCheckBox(this, wxID_ANY, _("doxygen ///"), wxDefaultPosition, wxSize(-1, -1), 0); m_pDox2->SetValue(false); staticBoxSizer17->Add(m_pDox2, 0, wxALL, 2); m_buttonClearIgnoreList = new wxButton(this, wxID_CLEAR, _("Clear ignore list"), wxDefaultPosition, wxSize(-1,-1), 0); m_buttonClearIgnoreList->SetToolTip(_("Clear the ignore list")); bSizer5->Add(m_buttonClearIgnoreList, 0, wxALL|wxEXPAND, 5); m_stdBtnSizer12 = new wxStdDialogButtonSizer(); bSizer5->Add(m_stdBtnSizer12, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_buttonOK->SetDefault(); m_stdBtnSizer12->AddButton(m_buttonOK); m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_stdBtnSizer12->AddButton(m_buttonCancel); m_stdBtnSizer12->Realize(); SetSizeHints(-1,-1); if ( GetSizer() ) { GetSizer()->Fit(this); } Centre(); // Connect events this->Connect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(SpellCheckerSettings_base::OnInitDialog), NULL, this); m_pDirPicker->Connect(wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler(SpellCheckerSettings_base::OnDirChanged), NULL, this); m_pLanguageList->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(SpellCheckerSettings_base::OnLanguageSelected), NULL, this); m_buttonClearIgnoreList->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SpellCheckerSettings_base::OnClearIgnoreList), NULL, this); m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SpellCheckerSettings_base::OnOk), NULL, this); m_buttonOK->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SpellCheckerSettings_base::OnUpdateOk), NULL, this); }
void Panel_Remaps::Constructor() { // Could by use by subobjects panel_Remaps = this; curr_ind_remap = -1; mode8bit = false; // Some inits entityAnimation_time = -1; itState = 0; //****************** //* MAIN SIZERS //****************** //top level sizer wxBoxSizer *sizer_main = new wxBoxSizer( wxVERTICAL ); //Top part of the panel wxBoxSizer *sizer_top = new wxBoxSizer( wxHORIZONTAL ); sizer_main->Add( sizer_top, 1, wxALL | wxEXPAND); wxBoxSizer *sizer_topLeft = new wxBoxSizer( wxHORIZONTAL ); sizer_top->Add( sizer_topLeft, 0, wxALL | wxEXPAND); wxBoxSizer *sizer_scrollWndFrameProps = new wxBoxSizer( wxVERTICAL ); sizer_top->Add( sizer_scrollWndFrameProps, 0, wxALL | wxEXPAND); wxBoxSizer *sizer_topRight = new wxBoxSizer( wxVERTICAL ); sizer_top->Add( sizer_topRight, 1, wxALL | wxEXPAND ); //Bottom part of the panel wxSizer *sizer_bottom = new wxBoxSizer( wxHORIZONTAL ); sizer_main->Add( sizer_bottom, 0, wxALL | wxEXPAND ); //****************** //* OBJECTS //****************** //************************** // LIST OF ANIMS //************************** list_Anims = new wListAnims(this); list_Anims->SetMinSize( wxSize(150,50)); sizer_topLeft->Add( list_Anims, 0, wxALL |wxEXPAND ); //************************** // CENTER PANEL //************************** scrollPanel = new AScrollPanel( this ); sizer_scrollWndFrameProps->Add( scrollPanel, 1, wxALL, 0 ); wxBoxSizer *sizer_topmiddle = new wxBoxSizer( wxVERTICAL ); // int fix_spacer_height = 12; //************************** // Remaps drop-down box //************************** sizer_remaps_choice = new wxBoxSizer( wxHORIZONTAL ); sizer_topmiddle->Add( sizer_remaps_choice, 0, wxALL | wxEXPAND ); txt_remaps = new wxStaticText( scrollPanel, wxID_ANY, wxT("Remap :" )); sizer_remaps_choice->Add( txt_remaps, 0, wxALIGN_CENTER | wxALL , 4 ); wxString lst_choices[] = {}; choiceBox_remaps = new wxChoice( scrollPanel, REMAP_CHOICE, wxDefaultPosition, wxDefaultSize , t_size_of(lst_choices), lst_choices); choiceBox_remaps->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(Panel_Remaps::EvtRemapChange), NULL, this); sizer_remaps_choice->Add( choiceBox_remaps, 0, wxALL, 4 ); sizer_remaps_choice->AddSpacer( 20 ); chckbx_8bit = new wxCheckBox(scrollPanel,B_8BIT, wxT("8Bit-Mode"), wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL); chckbx_8bit->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler(Panel_Remaps::Evt8BitModeChange), new wxVariant((long) B_BLOK), this); chckbx_8bit->MoveAfterInTabOrder( choiceBox_remaps ); sizer_remaps_choice->Add( chckbx_8bit, 1, wxALIGN_CENTER | wxALL ); wxBitmapButton *help_butt = new wxBitmapButton( scrollPanel, ID_HELP_REMAPS, wxBitmap( wxImage( GetRessourceFile_String(wxT("help.png"))))); help_butt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(Panel_Remaps::EvtButtonClick), NULL, this); sizer_remaps_choice->Add( help_butt, 0, wxALL, 2 ); //************************** // Butttons new/rename/del //************************** wxGridSizer *sizer_edit_btns = new wxGridSizer( 1, 3, 5, 5 ); sizer_topmiddle->Add( sizer_edit_btns, 0, wxTOP | wxBOTTOM | wxEXPAND, 10 ); //--------------------- // New Remap wxButton *btn_new_remap = new wxButton(scrollPanel, ID_NEW_REMAP, wxT("New"), wxDefaultPosition, wxSize( wxDefaultCoord, 30) ); btn_new_remap->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(Panel_Remaps::EvtButtonClick), NULL, this ); sizer_edit_btns->Add( btn_new_remap, 0, wxALL | wxEXPAND, 5 ); //--------------------- // Rename Remap btn_rename_remap = new wxButton(scrollPanel, ID_RENAME_REMAP, wxT("Rename"), wxDefaultPosition, wxSize( wxDefaultCoord, 30) ); btn_rename_remap->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(Panel_Remaps::EvtButtonClick), NULL, this ); sizer_edit_btns->Add( btn_rename_remap, 0, wxALL | wxEXPAND, 5 ); //--------------------- // Delete Remap btn_delete_remap = new wxButton(scrollPanel, ID_DELETE_REMAP, wxT("Delete"), wxDefaultPosition, wxSize( wxDefaultCoord, 30) ); btn_delete_remap->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(Panel_Remaps::EvtButtonClick), NULL, this ); sizer_edit_btns->Add( btn_delete_remap, 0, wxALL | wxEXPAND, 5 ); //************************** // Paths //************************** wxStaticBoxSizer *sizer_PATHS = new wxStaticBoxSizer( wxVERTICAL, scrollPanel, wxT("Paths") ); staticBoxPath = sizer_PATHS->GetStaticBox(); wxColour _colour; sizer_topmiddle->Add( sizer_PATHS, 0, wxRIGHT | wxEXPAND ); //--------------------- // BASE IMAGE //--------------------- wxBoxSizer *sizer_baseimg = new wxBoxSizer( wxHORIZONTAL ); sizer_PATHS->Add( sizer_baseimg, 0 , wxEXPAND ); txt_base_img = new wxStaticText( scrollPanel, wxID_ANY, wxT("Base"), wxPoint(wxDefaultCoord,8), wxSize( 80, wxDefaultCoord) ); sizer_baseimg->Add( txt_base_img, 0, wxALL, 4 ); txtctrl_imgBase = new wxTextCtrl(scrollPanel, IMG_BASE, wxString(),wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER | wxTE_RIGHT ); txtctrl_imgBase->Connect( wxEVT_COMMAND_TEXT_ENTER , wxCommandEventHandler(Panel_Remaps::EvtCommand), NULL, this); txtctrl_imgBase->SetInsertionPointEnd(); txtctrl_imgBase->MoveAfterInTabOrder( chckbx_8bit ); sizer_baseimg->Add( txtctrl_imgBase, 1, wxEXPAND ); pickerBaseImg = new wxFilePickerCtrl( scrollPanel, ID_PICKER_BASE_IMG, dataDirPath.GetFullPath(), wxT("Select the image base for the remap"), wxT("*.*"), wxDefaultPosition, wxDefaultSize, wxFLP_OPEN | wxFLP_FILE_MUST_EXIST ); pickerBaseImg->Connect(wxEVT_COMMAND_FILEPICKER_CHANGED , wxFileDirPickerEventHandler(Panel_Remaps::EvtPickerImgBaseChg), NULL, this); pickerBaseImg->SetMaxSize( wxSize(30, wxDefaultCoord )); pickerBaseImg->SetInitialSize(wxSize(30, 30 )); sizer_baseimg->Add( pickerBaseImg, 0, wxALL ); /* //--------------------- // Create base imgage for remaps button wxButton *btn_create_base = new wxButton(scrollPanel, ID_CREATE_BASEIMG_REMAP, "Create a base for Remaps" ); btn_create_base->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(Panel_Remaps::EvtButtonClick), NULL, this ); sizer_PATHS->Add( btn_create_base, 0, wxALL | wxEXPAND, 5 ); */ //--------------------- // DEST IMG //--------------------- wxBoxSizer *sizer_dest_img = new wxBoxSizer( wxHORIZONTAL ); sizer_PATHS->Add( sizer_dest_img, 1 , wxEXPAND ); txt_result = new wxStaticText( scrollPanel, wxID_ANY, wxT("Result"), wxPoint(wxDefaultCoord,8), wxSize( 80, wxDefaultCoord) ); sizer_dest_img->Add( txt_result, 0, wxALL, 4 ); txtctrl_destimg = new wxTextCtrl(scrollPanel, IMG_DEST, wxString(),wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER | wxTE_RIGHT ); txtctrl_destimg->Connect( wxEVT_COMMAND_TEXT_ENTER , wxCommandEventHandler(Panel_Remaps::EvtCommand), NULL, this); txtctrl_destimg->SetInsertionPointEnd(); txtctrl_destimg->MoveAfterInTabOrder( txtctrl_imgBase ); sizer_dest_img->Add( txtctrl_destimg, 1, wxEXPAND ); pickerDestImg = new wxFilePickerCtrl( scrollPanel, ID_PICKER_DEST_IMG, dataDirPath.GetFullPath(), wxT("Select the sound for this frame"), wxT("*.*"), wxDefaultPosition, wxDefaultSize, wxFLP_OPEN | wxFLP_FILE_MUST_EXIST ); pickerDestImg->Connect(wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler(Panel_Remaps::EvtPickerImgDestChg), NULL, this); pickerDestImg->SetMaxSize( wxSize(30, wxDefaultCoord )); pickerDestImg->SetInitialSize(wxSize(30, 30 )); sizer_dest_img->Add( pickerDestImg, 0, wxALL ); //************************** // TOOLS BUTTONS //************************** sizer_tools_btns = new wxGridSizer( 2, 2, 0, 0 ); sizer_topmiddle->Add( sizer_tools_btns, 0, wxTOP | wxBOTTOM | wxEXPAND, 10 ); //--------------------- // Guess the colours from the current frame btn_guess_cols = new wxButton(scrollPanel, ID_GUESS_COLORS, wxT("Guess Cols"), wxDefaultPosition, wxSize( wxDefaultCoord, 30) ); btn_guess_cols->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(Panel_Remaps::EvtButtonClick), NULL, this ); sizer_tools_btns->Add( btn_guess_cols, 0, wxALL | wxEXPAND, 5 ); //--------------------- // Save the remap btn_save_remap = new wxButton(scrollPanel, ID_SAVE_REMAP, wxT("Save"), wxDefaultPosition, wxSize( wxDefaultCoord, 30) ); btn_save_remap->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(Panel_Remaps::EvtButtonClick), NULL, this ); sizer_tools_btns->Add( btn_save_remap, 0, wxALL | wxEXPAND, 5 ); //--------------------- // Set the selection to the selected colors btn_set_sel = new wxButton(scrollPanel, ID_SET_SEL_COLS, wxT("Set Selects"), wxDefaultPosition, wxSize( wxDefaultCoord, 30) ); btn_set_sel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(Panel_Remaps::EvtButtonClick), NULL, this ); sizer_tools_btns->Add( btn_set_sel, 0, wxALL | wxEXPAND, 5 ); //--------------------- // UnSet the selection btn_unset_sel = new wxButton(scrollPanel, ID_UNSET_SEL_COLS, wxT("UnSet them"), wxDefaultPosition, wxSize( wxDefaultCoord, 30) ); btn_unset_sel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(Panel_Remaps::EvtButtonClick), NULL, this ); sizer_tools_btns->Add( btn_unset_sel, 0, wxALL | wxEXPAND, 5 ); //************************** // Palette Object //************************** paletteCtrl = new MyPaletteCtrl( scrollPanel ); sizer_topmiddle->Add(paletteCtrl, 0, wxALL | wxEXPAND ); //************************** // MODIF COLORS SLIDERS //************************** sizer_HSV = new wxStaticBoxSizer( wxVERTICAL, scrollPanel, wxT("Colours Modifications") ); sizer_topmiddle->Add( sizer_HSV, 0, wxTOP | wxEXPAND, 10 ); //--------------------- // Label RGB txt_RGB = new wxStaticText( scrollPanel, wxID_ANY, wxT("Red / Green / Blue" )); sizer_HSV->Add( txt_RGB, 0, wxALIGN_CENTER | wxTOP, 10 ); //--------------------- // Red red_ctrl = new wxSlider( scrollPanel, ID_RED_CTRL, 0, -100, 100 ); red_ctrl->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); red_ctrl->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); red_ctrl->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); red_ctrl->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); red_ctrl->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); red_ctrl->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); sizer_HSV->Add( red_ctrl, 0, wxTOP | wxEXPAND, 10 ); //--------------------- // Green green_ctrl = new wxSlider( scrollPanel, ID_GREEN_CTRL, 0, -100, 100 ); green_ctrl->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); green_ctrl->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); green_ctrl->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); green_ctrl->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); green_ctrl->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); green_ctrl->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); sizer_HSV->Add( green_ctrl, 0, wxALL | wxEXPAND, 1 ); //--------------------- // Blue blue_ctrl = new wxSlider( scrollPanel, ID_BLUE_CTRL, 0, -100, 100 ); blue_ctrl->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); blue_ctrl->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); blue_ctrl->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); blue_ctrl->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); blue_ctrl->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); blue_ctrl->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); sizer_HSV->Add( blue_ctrl, 0, wxALL | wxEXPAND, 1 ); //--------------------- // Label HSV txt_HSL = new wxStaticText( scrollPanel, wxID_ANY, wxT("Hue / Saturation / Brightness") ); sizer_HSV->Add( txt_HSL, 0, wxALIGN_CENTER | wxTOP, 10 ); //--------------------- // Hue hue_ctrl = new wxSlider( scrollPanel, ID_HUE_CTRL, 0, -50, 50 ); hue_ctrl->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); hue_ctrl->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); hue_ctrl->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); hue_ctrl->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); hue_ctrl->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); hue_ctrl->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); sizer_HSV->Add( hue_ctrl, 0, wxTOP | wxEXPAND, 10 ); //--------------------- // Saturation sat_ctrl = new wxSlider( scrollPanel, ID_SAT_CTRL, 0, -50, 50 ); sat_ctrl->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); sat_ctrl->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); sat_ctrl->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); sat_ctrl->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); sat_ctrl->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); sat_ctrl->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); sizer_HSV->Add( sat_ctrl, 0, wxALL | wxEXPAND, 1 ); //--------------------- // Luz lum_ctrl = new wxSlider( scrollPanel, ID_LUM_CTRL, 0, -50, 50 ); lum_ctrl->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); lum_ctrl->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); lum_ctrl->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); lum_ctrl->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); lum_ctrl->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); lum_ctrl->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler(Panel_Remaps::EvtSlidersChg), NULL, this ); sizer_HSV->Add( lum_ctrl, 0, wxALL | wxEXPAND, 1 ); //************************** // BUTTONS APPLY/CANCEL //************************** wxGridSizer *sizer_btns_AppCanc = new wxGridSizer( 1, 2, 5, 5 ); sizer_topmiddle->Add( sizer_btns_AppCanc, 0, wxALL |wxEXPAND); btn_apply_cols = new wxButton(scrollPanel, ID_APPLY_COLORS, wxT("Apply") ); btn_apply_cols->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(Panel_Remaps::EvtButtonClick), NULL, this ); sizer_btns_AppCanc->Add( btn_apply_cols, 1, wxALL | wxEXPAND, 5 ); btn_cancel_cols = new wxButton(scrollPanel, ID_CANCEL_COLORS, wxT("Cancel") ); btn_cancel_cols->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(Panel_Remaps::EvtButtonClick), NULL, this ); sizer_btns_AppCanc->Add( btn_cancel_cols, 1, wxALL | wxEXPAND, 5 ); //************************** // Frame View //************************** wxBoxSizer *sizer_btns_Zoom = new wxBoxSizer( wxHORIZONTAL ); sizer_topRight->Add(sizer_btns_Zoom, 0,wxEXPAND ); sizer_btns_Zoom->AddStretchSpacer(); wxBitmapButton *butt_Zoom_M = new wxBitmapButton( this, ID_ZOOM_M, wxBitmap( wxImage( GetRessourceFile_String(wxT("zoom-out.png"))))); butt_Zoom_M->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(Panel_Remaps::EvtButtonClick), NULL, this); sizer_btns_Zoom->Add( butt_Zoom_M, 0, wxALL|wxALIGN_CENTER_VERTICAL, 2 ); wxBitmapButton *butt_Zoom_P = new wxBitmapButton( this, ID_ZOOM_P, wxBitmap( wxImage( GetRessourceFile_String(wxT("zoom-in.png"))))); butt_Zoom_P->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(Panel_Remaps::EvtButtonClick), NULL, this); sizer_btns_Zoom->Add( butt_Zoom_P, 0, wxALL|wxALIGN_CENTER_VERTICAL, 2 ); sizer_btns_Zoom->AddStretchSpacer(); frameView = new MyRemapViewerCtrl( this ); sizer_topRight->Add(frameView, 1, wxEXPAND ); //************************** // LIST OF FRAMES //************************** wList_frames = new wListFrames( this ); sizer_bottom->Add( wList_frames, 1, wxALL ); //************************** // INITIALISATIONS //************************** scrollPanel->SetSizer( sizer_topmiddle); SetSizer( sizer_main ); wList_frames->AssociateToListAnims( list_Anims); list_Anims->AssociateToListFrame( wList_frames); Layout(); }
MainFrame_base::~MainFrame_base() { // Disconnect Events this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( MainFrame_base::OnUpdateUI ) ); this->Disconnect( ID_MENU_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnMenuExit ) ); this->Disconnect( ID_RECONSTRUCT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnReconstruct ) ); this->Disconnect( ID_VIEW_IMAGE_BROWSER, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) ); this->Disconnect( ID_VIEW_IMAGE_PREVIEW, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) ); this->Disconnect( ID_VIEW_OPTIONS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) ); this->Disconnect( ID_VIEW_LOG, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) ); this->Disconnect( ID_RESET_3D_VIEWPORT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnReset3dViewport ) ); this->Disconnect( ID_TOGGLE_TURNTABLE_ANIMATION, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnToggleTurntableAnimation ) ); this->Disconnect( ID_TOGGLE_TRACKBALL_VISIBILITY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) ); this->Disconnect( ID_TOGGLE_GRID_VISIBILITY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) ); this->Disconnect( ID_TOGGLE_POINTS_VISIBILITY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) ); this->Disconnect( ID_TOGGLE_CAMERAS_VISIBILITY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) ); this->Disconnect( ID_EXPORT_TRACKS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) ); this->Disconnect( ID_EXPORT_MATCHES, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) ); this->Disconnect( ID_EXPORT_CMVS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) ); this->Disconnect( ID_EXPORT_BUNDLE_FILE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) ); this->Disconnect( ID_EXPORT_PLY_FILE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) ); this->Disconnect( ID_EXPORT_MESHLAB_FILE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) ); this->Disconnect( ID_EXPORT_MAYA_FILE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) ); this->Disconnect( ID_VIEW_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) ); this->Disconnect( ID_RECONSTRUCT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnReconstruct ) ); this->Disconnect( ID_VIEW_IMAGE_BROWSER, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) ); this->Disconnect( ID_VIEW_IMAGE_PREVIEW, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) ); this->Disconnect( ID_VIEW_OPTIONS, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) ); this->Disconnect( ID_VIEW_LOG, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) ); this->Disconnect( ID_RESET_3D_VIEWPORT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnReset3dViewport ) ); this->Disconnect( ID_TOGGLE_TURNTABLE_ANIMATION, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnToggleTurntableAnimation ) ); this->Disconnect( ID_TOGGLE_GRID_VISIBILITY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) ); this->Disconnect( ID_TOGGLE_TRACKBALL_VISIBILITY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) ); this->Disconnect( ID_TOGGLE_POINTS_VISIBILITY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) ); this->Disconnect( ID_TOGGLE_CAMERAS_VISIBILITY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) ); m_gl_canvas->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( MainFrame_base::OnGLCanvasEraseBackground ), NULL, this ); m_gl_canvas->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Disconnect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Disconnect( wxEVT_MIDDLE_UP, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Disconnect( wxEVT_MOTION, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Disconnect( wxEVT_MIDDLE_DCLICK, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Disconnect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Disconnect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Disconnect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this ); m_gl_canvas->Disconnect( wxEVT_PAINT, wxPaintEventHandler( MainFrame_base::OnGLCanvasPaint ), NULL, this ); m_gl_canvas->Disconnect( wxEVT_SIZE, wxSizeEventHandler( MainFrame_base::OnGLCanvasSize ), NULL, this ); m_pane_matches_view->Disconnect( wxEVT_PAINT, wxPaintEventHandler( MainFrame_base::OnMatchesViewPaint ), NULL, this ); m_pane_matches_view->Disconnect( wxEVT_SIZE, wxSizeEventHandler( MainFrame_base::OnMatchesViewResize ), NULL, this ); m_cb_matches_left->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainFrame_base::OnSelectMatchImage ), NULL, this ); m_cb_matches_right->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainFrame_base::OnSelectMatchImage ), NULL, this ); m_dir_picker->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainFrame_base::OnSelectDirectory ), NULL, this ); m_img_ctrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( MainFrame_base::OnSelectPreviewImage ), NULL, this ); m_window_image_preview->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Disconnect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Disconnect( wxEVT_MIDDLE_UP, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Disconnect( wxEVT_MOTION, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Disconnect( wxEVT_MIDDLE_DCLICK, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Disconnect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Disconnect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Disconnect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this ); m_window_image_preview->Disconnect( wxEVT_PAINT, wxPaintEventHandler( MainFrame_base::OnImagePreviewPaint ), NULL, this ); m_window_image_preview->Disconnect( wxEVT_SIZE, wxSizeEventHandler( MainFrame_base::OnImagePreviewResize ), NULL, this ); this->Disconnect( ID_RESET_OPTIONS, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnResetOptions ) ); this->Disconnect( ID_SAVE_LOG, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnSaveLog ) ); this->Disconnect( ID_CLEAR_LOG, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnClearLog ) ); m_mgr.UnInit(); }