void VideoDisplay::UpdateSize() { if (!con->videoController->IsLoaded() || !IsShownOnScreen()) return; videoSize.Set(con->videoController->GetWidth(), con->videoController->GetHeight()); videoSize *= zoomValue; if (con->videoController->GetAspectRatioType() != 0) videoSize.SetWidth(videoSize.GetHeight() * con->videoController->GetAspectRatioValue()); wxEventBlocker blocker(this); if (freeSize) { wxWindow *top = GetParent(); while (!top->IsTopLevel()) top = top->GetParent(); wxSize cs = GetClientSize(); wxSize oldSize = top->GetSize(); top->SetSize(top->GetSize() + videoSize - cs); SetClientSize(cs + top->GetSize() - oldSize); } else { SetMinClientSize(videoSize); SetMaxClientSize(videoSize); GetGrandParent()->Layout(); } PositionVideo(); }
LLDBLocalsViewBase::LLDBLocalsViewBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style) : wxPanel(parent, id, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxCrafternz79PnInitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* boxSizer67 = new wxBoxSizer(wxVERTICAL); this->SetSizer(boxSizer67); m_auibar199 = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxAUI_TB_PLAIN_BACKGROUND|wxAUI_TB_DEFAULT_STYLE); m_auibar199->SetToolBitmapSize(wxSize(16,16)); boxSizer67->Add(m_auibar199, 0, wxEXPAND, 5); m_auibar199->AddTool(wxID_NEW, _("Add Watch..."), wxXmlResource::Get()->LoadBitmap(wxT("16-plus")), wxNullBitmap, wxITEM_NORMAL, _("Add Watch..."), _("Add Watch..."), NULL); m_auibar199->AddTool(wxID_DELETE, _("Delete Watch"), wxXmlResource::Get()->LoadBitmap(wxT("16-clean")), wxNullBitmap, wxITEM_NORMAL, _("Delete Watch"), _("Delete Watch"), NULL); m_auibar199->Realize(); SetName(wxT("LLDBLocalsViewBase")); SetMinClientSize(wxSize(200,200)); SetSize(-1,-1); if (GetSizer()) { GetSizer()->Fit(this); } // Connect events this->Connect(wxID_NEW, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LLDBLocalsViewBase::OnNewWatch), NULL, this); this->Connect(wxID_DELETE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LLDBLocalsViewBase::OnDelete), NULL, this); this->Connect(wxID_DELETE, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LLDBLocalsViewBase::OnDeleteUI), NULL, this); }
WinFrame::WinFrame(const wxString& title, const wxPoint& pos, const wxSize& size) : wxFrame( nullptr, wxID_ANY, title, pos, size, GetStyle() ) { #ifdef AC_MULTI_THREADED computing_ = false; #endif #ifdef _WINDOWS SetIcon(wxICON(app_icon)); #endif Ac::SetFloatPrecision(50); /* Create window layout */ CreateStatBar(); CreateFont(); CreateInputCtrl(); CreateOutputCtrl(); CreateMenuItems(); SetMinClientSize(wxSize(300, 100)); Bind(wxEVT_CLOSE_WINDOW, &WinFrame::OnClose, this); Bind(wxEVT_SIZE, &WinFrame::OnResize, this); Centre(); ShowIntro(); LoadConfig(configFilename); }
void VideoDisplay::UpdateSize() { auto provider = con->project->VideoProvider(); if (!provider || !IsShownOnScreen()) return; videoSize.Set(provider->GetWidth(), provider->GetHeight()); videoSize *= zoomValue; if (con->videoController->GetAspectRatioType() != AspectRatio::Default) videoSize.SetWidth(videoSize.GetHeight() * con->videoController->GetAspectRatioValue()); wxEventBlocker blocker(this); if (freeSize) { wxWindow *top = GetParent(); while (!top->IsTopLevel()) top = top->GetParent(); wxSize cs = GetClientSize(); wxSize oldSize = top->GetSize(); top->SetSize(top->GetSize() + videoSize / scale_factor - cs); SetClientSize(cs + top->GetSize() - oldSize); } else { SetMinClientSize(videoSize / scale_factor); SetMaxClientSize(videoSize / scale_factor); GetGrandParent()->Layout(); } PositionVideo(); }
MainFrame::MainFrame(const wxString& title): wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(950, 600)) { InitializeMenubar(); InitializeControls(); Center(); SetMinClientSize(wxSize(300, 350)); }
NotebookNavigationDlgBase::NotebookNavigationDlgBase(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); wxC9D6CInitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* boxSizer157 = new wxBoxSizer(wxVERTICAL); this->SetSizer(boxSizer157); m_panel161 = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxWANTS_CHARS|wxTAB_TRAVERSAL); boxSizer157->Add(m_panel161, 1, wxEXPAND, 0); wxBoxSizer* boxSizer163 = new wxBoxSizer(wxVERTICAL); m_panel161->SetSizer(boxSizer163); m_dvListCtrl = new wxDataViewListCtrl(m_panel161, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxDV_NO_HEADER|wxDV_VERT_RULES|wxDV_ROW_LINES|wxDV_SINGLE|wxWANTS_CHARS|wxTAB_TRAVERSAL|wxBORDER_STATIC); m_dvListCtrl->SetFocus(); boxSizer163->Add(m_dvListCtrl, 1, wxALL|wxEXPAND, 2); m_dvListCtrl->AppendBitmapColumn(_("Modified"), m_dvListCtrl->GetColumnCount(), wxDATAVIEW_CELL_INERT, 20, wxALIGN_CENTER); m_dvListCtrl->AppendIconTextColumn(_("Text"), wxDATAVIEW_CELL_INERT, -2, wxALIGN_LEFT); SetName(wxT("NotebookNavigationDlgBase")); SetMinClientSize(wxSize(400,200)); SetSize(400,200); 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 this->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(NotebookNavigationDlgBase::OnKeyDown), NULL, this); this->Connect(wxEVT_KEY_UP, wxKeyEventHandler(NotebookNavigationDlgBase::OnKeyUp), NULL, this); m_dvListCtrl->Connect(wxEVT_KEY_UP, wxKeyEventHandler(NotebookNavigationDlgBase::OnKeyUp), NULL, this); m_dvListCtrl->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(NotebookNavigationDlgBase::OnKeyDown), NULL, this); m_dvListCtrl->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(NotebookNavigationDlgBase::OnItemActivated), NULL, this); }
mmAboutDialog::mmAboutDialog(wxWindow* parent, int TabToOpen, const wxString &name) : about_text_(nullptr) , developers_text_(nullptr) , artwork_text_(nullptr) , sponsors_text_(nullptr) , license_text_(nullptr) , privacy_text_(nullptr) { const wxString caption = (TabToOpen == 4) ? _("License agreement") : wxString::Format(_("About %s"), mmex::getProgramName()); Create(parent, wxID_ANY, caption, wxDefaultPosition , wxSize(440, 600), wxCAPTION | wxRESIZE_BORDER | wxCLOSE_BOX, TabToOpen, name); SetMinClientSize(wxSize(300, 400)); }
void SplitterWindow2::setMinSize(wxWindow* window, const wxSize& minSize) { assert(m_splitMode != SplitMode_Unset); assert(minSize.x >= 0 && minSize.y != 0); wxSize splitterMinSize; for (size_t i = 0; i < NumWindows; ++i) { if (m_windows[i] == window) m_minSizes[i] = minSize; setH(splitterMinSize, h(splitterMinSize) + h(m_minSizes[i])); setV(splitterMinSize, std::max(v(splitterMinSize), v(m_minSizes[i]))); } SetMinClientSize(splitterMinSize); }
BitmapToggleButton::BitmapToggleButton(wxWindow* parent, wxWindowID windowId, const wxBitmap& upBitmap, const wxBitmap& downBitmap) : wxPanel(parent, windowId), m_upBitmap(upBitmap), m_downBitmap(downBitmap), m_upDisabledBitmap(m_upBitmap.ConvertToDisabled()), m_downDisabledBitmap(m_downBitmap.ConvertToDisabled()), m_state(false) { assert(m_upBitmap.IsOk()); assert(m_downBitmap.IsOk()); SetMinClientSize(bitmapSize()); Bind(wxEVT_PAINT, &BitmapToggleButton::OnPaint, this); Bind(wxEVT_LEFT_DOWN, &BitmapToggleButton::OnMouseDown, this); }
QuickOutlineDlg::QuickOutlineDlg( wxWindow* parent, const wxString& fileName, int id, wxString title, wxPoint pos, wxSize size, int style) : wxDialog(parent, id, title, pos, size, style | wxRESIZE_BORDER) , m_fileName(fileName) { wxBoxSizer* dialogSizer = new wxBoxSizer(wxVERTICAL); SetSizer(dialogSizer); wxPanel* mainPanel = new wxPanel(this); dialogSizer->Add(mainPanel, 1, wxEXPAND); wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL); mainPanel->SetSizer(mainSizer); #ifdef __WXGTK__ wxColour bgCol = DrawingUtils::GetPanelBgColour(); wxColour fgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT); #else wxColour bgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK); wxColour fgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT); #endif mainPanel->SetBackgroundColour(bgCol); // build the outline view m_treeOutline = new CppSymbolTree(mainPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE | wxNO_BORDER); m_keyboard.reset(new clTreeKeyboardInput(m_treeOutline)); m_treeOutline->Bind(wxEVT_KEY_DOWN, &QuickOutlineDlg::OnKeyDown, this); m_treeOutline->SetBackgroundColour(bgCol); m_treeOutline->SetForegroundColour(fgCol); m_treeOutline->SetSymbolsImages(CreateSymbolTreeImages()); Connect(wxEVT_CMD_CPP_SYMBOL_ITEM_SELECTED, wxCommandEventHandler(QuickOutlineDlg::OnItemSelected), NULL, this); mainSizer->Add(m_treeOutline, 1, wxALL | wxEXPAND, 5); Layout(); SetName("QuickOutlineDlg"); SetMinClientSize(wxSize(500,400)); CentreOnParent(); // no hidden root m_treeOutline->BuildTree(m_fileName); m_treeOutline->ExpandAll(); m_treeOutline->SetFocus(); // Fix bug on GTK3 and prevent the window to shrink // indefinitely }
AudioDisplay::AudioDisplay(wxWindow *parent, AudioController *controller, agi::Context *context) : wxWindow(parent, -1, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS|wxBORDER_SIMPLE) , audio_open_connection(controller->AddAudioOpenListener(&AudioDisplay::OnAudioOpen, this)) , context(context) , audio_renderer(new AudioRenderer) , controller(controller) , scrollbar(new AudioDisplayScrollbar(this)) , timeline(new AudioDisplayTimeline(this)) , dragged_object(0) , scroll_left(0) , pixel_audio_width(0) , ms_per_pixel(0.0) , scale_amplitude(1.0f) , audio_top(0) , audio_height(0) , track_cursor_pos(-1) { style_ranges[0] = AudioStyle_Normal; audio_renderer->SetAmplitudeScale(scale_amplitude); SetZoomLevel(0); SetMinClientSize(wxSize(-1, 70)); SetBackgroundStyle(wxBG_STYLE_PAINT); SetThemeEnabled(false); Bind(wxEVT_LEFT_DOWN, &AudioDisplay::OnMouseEvent, this); Bind(wxEVT_MIDDLE_DOWN, &AudioDisplay::OnMouseEvent, this); Bind(wxEVT_RIGHT_DOWN, &AudioDisplay::OnMouseEvent, this); Bind(wxEVT_LEFT_UP, &AudioDisplay::OnMouseEvent, this); Bind(wxEVT_MIDDLE_UP, &AudioDisplay::OnMouseEvent, this); Bind(wxEVT_RIGHT_UP, &AudioDisplay::OnMouseEvent, this); Bind(wxEVT_MOTION, &AudioDisplay::OnMouseEvent, this); Bind(wxEVT_ENTER_WINDOW, &AudioDisplay::OnMouseEnter, this); Bind(wxEVT_LEAVE_WINDOW, &AudioDisplay::OnMouseLeave, this); Bind(wxEVT_PAINT, &AudioDisplay::OnPaint, this); Bind(wxEVT_SIZE, &AudioDisplay::OnSize, this); Bind(wxEVT_KILL_FOCUS, &AudioDisplay::OnFocus, this); Bind(wxEVT_SET_FOCUS, &AudioDisplay::OnFocus, this); Bind(wxEVT_CHAR_HOOK, &AudioDisplay::OnKeyDown, this); Bind(wxEVT_KEY_DOWN, &AudioDisplay::OnKeyDown, this); scroll_timer.Bind(wxEVT_TIMER, &AudioDisplay::OnScrollTimer, this); }
bool FindReplaceDialog::Create(wxWindow* parent, const FindReplaceData& data, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style) { m_kind = FIND_DLG; if(!wxDialog::Create(parent, id, caption, pos, size, style)) return false; m_data = data; m_owner = NULL; CreateGUIControls(); ConnectEvents(); SetName("FindAndReplaceDialog"); WindowAttrManager::Load(this); GetSizer()->Fit(this); SetMinClientSize(GetSize()); m_findString->SetFocus(); CentreOnParent(); return true; }
/* SectorSpecialDialog::SectorSpecialDialog * SectorSpecialDialog class constructor *******************************************************************/ SectorSpecialDialog::SectorSpecialDialog(wxWindow* parent) : SDialog(parent, "Select Sector Special", "sectorspecial") { // Setup sizer wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL); SetSizer(sizer); // Special panel panel_special = new SectorSpecialPanel(this); sizer->Add(panel_special, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 10); // Dialog buttons sizer->AddSpacer(4); sizer->Add(CreateButtonSizer(wxOK|wxCANCEL), 0, wxEXPAND|wxLEFT|wxRIGHT|wxBOTTOM, 10); // Bind Events panel_special->getSpecialsList()->Bind(wxEVT_LIST_ITEM_ACTIVATED, &SectorSpecialDialog::onSpecialsListViewItemActivated, this); SetMinClientSize(sizer->GetMinSize()); CenterOnParent(); }
clResizableTooltipBase::clResizableTooltipBase(wxWindow* parent,long style) : wxPopupWindow(parent, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxC9D6CInitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* boxSizer222 = new wxBoxSizer(wxVERTICAL); this->SetSizer(boxSizer222); m_mainPanel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(300,250), wxTAB_TRAVERSAL|wxBORDER_THEME); m_mainPanel->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK)); m_mainPanel->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT)); boxSizer222->Add(m_mainPanel, 1, wxALL|wxEXPAND, 2); wxBoxSizer* boxSizer230 = new wxBoxSizer(wxVERTICAL); m_mainPanel->SetSizer(boxSizer230); m_treeCtrl = new wxTreeCtrl(m_mainPanel, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTR_DEFAULT_STYLE|wxBORDER_NONE); m_treeCtrl->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK)); m_treeCtrl->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT)); boxSizer230->Add(m_treeCtrl, 1, wxEXPAND, 0); m_mainPanel->SetMinSize(wxSize(300,250)); m_panelStatus = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL); m_panelStatus->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK)); m_panelStatus->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT)); boxSizer222->Add(m_panelStatus, 0, wxALL|wxEXPAND, 0); wxBoxSizer* boxSizer234 = new wxBoxSizer(wxHORIZONTAL); m_panelStatus->SetSizer(boxSizer234); boxSizer234->Add(0, 0, 1, wxALL, 5); m_staticBitmap240 = new wxStaticBitmap(m_panelStatus, wxID_ANY, wxXmlResource::Get()->LoadBitmap(wxT("resize")), wxDefaultPosition, wxSize(-1,-1), 0 ); m_staticBitmap240->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK)); boxSizer234->Add(m_staticBitmap240, 0, wxALIGN_CENTER_VERTICAL, 5); m_timerCheckMousePos = new wxTimer; m_timerCheckMousePos->Start(25, false); SetName(wxT("clResizableTooltipBase")); SetMinClientSize(wxSize(300,200)); SetSize(300,200); if (GetSizer()) { GetSizer()->Fit(this); } // Connect events m_treeCtrl->Connect(wxEVT_COMMAND_TREE_ITEM_EXPANDING, wxTreeEventHandler(clResizableTooltipBase::OnItemExpanding), NULL, this); m_panelStatus->Connect(wxEVT_ENTER_WINDOW, wxMouseEventHandler(clResizableTooltipBase::OnStatusEnterWindow), NULL, this); m_panelStatus->Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(clResizableTooltipBase::OnStatusLeaveWindow), NULL, this); m_panelStatus->Connect(wxEVT_MOTION, wxMouseEventHandler(clResizableTooltipBase::OnStatusBarMotion), NULL, this); m_panelStatus->Connect(wxEVT_LEFT_UP, wxMouseEventHandler(clResizableTooltipBase::OnStatusBarLeftUp), NULL, this); m_panelStatus->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(clResizableTooltipBase::OnStatusBarLeftDown), NULL, this); m_panelStatus->Connect(wxEVT_MOUSE_CAPTURE_LOST, wxMouseCaptureLostEventHandler(clResizableTooltipBase::OnCaptureLost), NULL, this); m_staticBitmap240->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(clResizableTooltipBase::OnStatusBarLeftDown), NULL, this); m_staticBitmap240->Connect(wxEVT_LEFT_UP, wxMouseEventHandler(clResizableTooltipBase::OnStatusBarLeftUp), NULL, this); m_staticBitmap240->Connect(wxEVT_MOTION, wxMouseEventHandler(clResizableTooltipBase::OnStatusBarMotion), NULL, this); m_staticBitmap240->Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(clResizableTooltipBase::OnStatusLeaveWindow), NULL, this); m_staticBitmap240->Connect(wxEVT_ENTER_WINDOW, wxMouseEventHandler(clResizableTooltipBase::OnStatusEnterWindow), NULL, this); m_staticBitmap240->Connect(wxEVT_MOUSE_CAPTURE_LOST, wxMouseCaptureLostEventHandler(clResizableTooltipBase::OnCaptureLost), NULL, this); m_timerCheckMousePos->Connect(wxEVT_TIMER, wxTimerEventHandler(clResizableTooltipBase::OnCheckMousePosition), NULL, this); }
ManagerFrame::ManagerFrame( wxWindow* parent ): BaseManagerFrame(parent), m_replayProvider(NULL) { SetTitle(wxTheApp->GetAppDisplayName()); SetStatusBar(m_statusBar); #ifdef __WXMSW__ SetIcon(wxIcon("APPICON")); #endif // Initalize default size / position SetMinClientSize(wxDLG_UNIT(this, wxSize(200, 100))); SetClientSize(wxDLG_UNIT(this, wxSize(480, 280))); m_treeSplitter->SetSashPosition(wxDLG_UNIT(this, wxSize(120, -1)).GetWidth()); int sashHeight = GetClientSize().GetHeight() - m_toolBar->GetSize().GetHeight() - wxDLG_UNIT(this, wxSize(-1, 80)).GetHeight(); m_splitter->SetSashPosition(sashHeight); Center(); // Disconnect wxFormBuilder idle events m_treeSplitter->Disconnect(wxEVT_IDLE, wxIdleEventHandler(BaseManagerFrame::m_treeSplitterOnIdle), NULL, this); m_splitter->Disconnect(wxEVT_IDLE, wxIdleEventHandler(BaseManagerFrame::m_splitterOnIdle), NULL, this); wxPersistentRegisterAndRestore(this); wxPersistentRegisterAndRestore(m_treeSplitter); wxPersistentRegisterAndRestore(m_splitter); m_providerDV->AppendIconTextColumn(_("Category"), PCIDescription, wxDATAVIEW_CELL_INERT, wxDLG_UNIT(this, wxSize(80, -1)).GetWidth()); wxSizeEvent sizeEvt; OnProviderSizeChanged(sizeEvt); m_replayDV->AppendTextColumn(_("Arena"), RCIArena, wxDATAVIEW_CELL_INERT, wxDLG_UNIT(this, wxSize(80, -1)).GetWidth())->SetFlags(wxCOL_DEFAULT_FLAGS | wxCOL_SORTABLE); m_replayDV->AppendTextColumn(_("Team Size"), RCITeamSize, wxDATAVIEW_CELL_INERT, wxDLG_UNIT(this, wxSize(20, -1)).GetWidth(), wxALIGN_RIGHT)->SetFlags(wxCOL_DEFAULT_FLAGS | wxCOL_SORTABLE); m_replayDV->AppendTextColumn(_("Score"), RCIScore, wxDATAVIEW_CELL_INERT, wxDLG_UNIT(this, wxSize(28, -1)).GetWidth(), wxALIGN_CENTER)->SetFlags(wxCOL_DEFAULT_FLAGS | wxCOL_SORTABLE); m_replayDV->AppendTextColumn(_("Length"), RCILength, wxDATAVIEW_CELL_INERT, wxDLG_UNIT(this, wxSize(28, -1)).GetWidth())->SetFlags(wxCOL_DEFAULT_FLAGS | wxCOL_SORTABLE); wxDataViewColumn* dateColumn = m_replayDV->AppendTextColumn(_("Date"), RCIDate, wxDATAVIEW_CELL_INERT, wxDLG_UNIT(this, wxSize(60, -1)).GetWidth()); dateColumn->SetFlags(wxCOL_DEFAULT_FLAGS | wxCOL_SORTABLE); dateColumn->SetSortOrder(false); m_replayDV->AppendTextColumn(_("Description"), RCIDescription); m_goalListCtrl->AppendColumn(_("Player"), wxLIST_FORMAT_CENTER, wxDLG_UNIT(this, wxSize(80, -1)).GetWidth()); m_goalListCtrl->AppendColumn(_("Score"), wxLIST_FORMAT_CENTER, wxDLG_UNIT(this, wxSize(28, -1)).GetWidth()); m_goalListCtrl->AppendColumn(_("Team"), wxLIST_FORMAT_RIGHT, wxDLG_UNIT(this, wxSize(20, -1)).GetWidth()); m_goalListCtrl->AppendColumn(_("Time"), wxLIST_FORMAT_LEFT, wxDLG_UNIT(this, wxSize(28, -1)).GetWidth()); m_statsListCtrl->AppendColumn(_("Player"), wxLIST_FORMAT_LEFT, wxDLG_UNIT(this, wxSize(80, -1)).GetWidth()); m_statsListCtrl->AppendColumn(_("Score"), wxLIST_FORMAT_RIGHT, wxDLG_UNIT(this, wxSize(28, -1)).GetWidth()); m_statsListCtrl->AppendColumn(_("Goals"), wxLIST_FORMAT_RIGHT, wxDLG_UNIT(this, wxSize(28, -1)).GetWidth()); m_statsListCtrl->AppendColumn(_("Saves"), wxLIST_FORMAT_RIGHT, wxDLG_UNIT(this, wxSize(28, -1)).GetWidth()); m_statsListCtrl->AppendColumn(_("Assists"), wxLIST_FORMAT_RIGHT, wxDLG_UNIT(this, wxSize(28, -1)).GetWidth()); m_statsListCtrl->AppendColumn(_("Shots on Goal"), wxLIST_FORMAT_RIGHT, wxDLG_UNIT(this, wxSize(28, -1)).GetWidth()); m_statsListCtrl->AppendColumn(_("Team"), wxLIST_FORMAT_RIGHT, wxDLG_UNIT(this, wxSize(20, -1)).GetWidth()); wxFileName basePath(wxStandardPaths::Get().GetDocumentsDir(), ""); basePath.AppendDir("My Games"); basePath.AppendDir("Rocket League"); basePath.AppendDir("TAGame"); basePath.AppendDir("Demos"); // Prepare various UI elements m_menubar->Check(ID_AUTO_UPLOAD, wxConfig::Get()->ReadBool("AutoUpload", false)); m_toolBar->EnableTool(ID_EXPORT, false); m_toolBar->EnableTool(ID_UPLOAD, false); m_toolBar->EnableTool(wxID_DELETE, false); ReplayProvider::Ptr activeReplays(new ReplayProvider(&m_replayProvider, basePath.GetFullPath(), "Active Game Replays")); m_replayProvider.provider.push_back(activeReplays); if (activeReplays->replay.empty()) wxLogError(_("No replays could be found")); ReplayProvider::Ptr archiveRoot(new ReplayProvider(&m_replayProvider, "", "Replay Archive")); m_replayProvider.provider.push_back(archiveRoot); wxObjectDataPtr<ProviderDataModel> provModel(new ProviderDataModel(&m_replayProvider)); m_providerDV->AssociateModel(provModel.get()); m_providerDV->Select(wxDataViewItem(activeReplays.get())); wxDataViewEvent dvEvt; dvEvt.SetItem(wxDataViewItem(activeReplays.get())); OnProviderSelectionChanged(dvEvt); m_replayDV->SetFocus(); m_menubar->Enable(ID_NEW_CATEGORY, false); m_toolBar->EnableTool(ID_NEW_CATEGORY, false); m_replayProvider.Bind(wxEVT_REPLAY_ADDED, &ManagerFrame::OnReplayAdded, this); m_replayProvider.Bind(wxEVT_REPLAY_REMOVED, &ManagerFrame::OnReplayRemoved, this); TransferManager::Get().Bind(wxEVT_TRANSFER_UPDATE, &ManagerFrame::OnTransferUpdate, this); m_replayDV->SetDropTarget(new ReplayDropTarget(m_replayDV)); }
OpenResourceDialog::OpenResourceDialog(wxWindow* parent, IManager* manager, const wxString& initialSelection) : OpenResourceDialogBase(parent) , m_manager(manager) , m_needRefresh(false) , m_lineNumber(wxNOT_FOUND) { Hide(); BitmapLoader* bmpLoader = m_manager->GetStdIcons(); m_tagImgMap[wxT("class")] = bmpLoader->LoadBitmap(wxT("cc/16/class")); m_tagImgMap[wxT("struct")] = bmpLoader->LoadBitmap(wxT("cc/16/struct")); m_tagImgMap[wxT("namespace")] = bmpLoader->LoadBitmap(wxT("cc/16/namespace")); m_tagImgMap[wxT("typedef")] = bmpLoader->LoadBitmap(wxT("cc/16/typedef")); m_tagImgMap[wxT("member_private")] = bmpLoader->LoadBitmap(wxT("cc/16/member_private")); m_tagImgMap[wxT("member_public")] = bmpLoader->LoadBitmap(wxT("cc/16/member_public")); m_tagImgMap[wxT("member_protected")] = bmpLoader->LoadBitmap(wxT("cc/16/member_protected")); m_tagImgMap[wxT("function_private")] = bmpLoader->LoadBitmap(wxT("cc/16/function_private")); m_tagImgMap[wxT("function_public")] = bmpLoader->LoadBitmap(wxT("cc/16/function_public")); m_tagImgMap[wxT("function_protected")] = bmpLoader->LoadBitmap(wxT("cc/16/function_protected")); m_tagImgMap[wxT("enum")] = bmpLoader->LoadBitmap(wxT("cc/16/enum")); m_tagImgMap[wxT("cenum")] = bmpLoader->LoadBitmap(wxT("cc/16/enum")); m_tagImgMap[wxT("enumerator")] = bmpLoader->LoadBitmap(wxT("cc/16/enumerator")); m_tagImgMap[wxT("cpp")] = bmpLoader->LoadBitmap(wxT("mime-cpp")); m_tagImgMap[wxT("h")] = bmpLoader->LoadBitmap(wxT("mime-h")); m_tagImgMap[wxT("text")] = bmpLoader->LoadBitmap(wxT("mime-txt")); m_tagImgMap[wxT("c")] = bmpLoader->LoadBitmap(wxT("mime-c")); m_tagImgMap[wxT("wxfb")] = bmpLoader->LoadBitmap(wxT("blocks")); m_tagImgMap[wxT("wxcp")] = bmpLoader->LoadBitmap(wxT("blocks")); m_timer = new wxTimer(this, XRCID("OR_TIMER")); m_textCtrlResourceName->SetFocus(); SetLabel(_("Open resource...")); SetMinClientSize(wxSize(600, 400)); GetSizer()->Fit(this); SetName("OpenResourceDialog"); WindowAttrManager::Load(this); // load all files from the workspace if(m_manager->IsWorkspaceOpen()) { wxArrayString projects; m_manager->GetWorkspace()->GetProjectList(projects); for(size_t i = 0; i < projects.GetCount(); i++) { ProjectPtr p = m_manager->GetWorkspace()->GetProject(projects.Item(i)); if(p) { const Project::FilesMap_t& files = p->GetFiles(); // convert std::vector to wxArrayString std::for_each(files.begin(), files.end(), [&](const Project::FilesMap_t::value_type& vt) { wxFileName fn(vt.second->GetFilename()); m_files.insert(std::make_pair(fn.GetFullName(), fn.GetFullPath())); }); } } } wxString lastStringTyped = clConfig::Get().Read("OpenResourceDialog/SearchString", wxString()); // Set the initial selection // We use here 'SetValue' so an event will get fired and update the control if(!initialSelection.IsEmpty()) { m_textCtrlResourceName->SetValue(initialSelection); m_textCtrlResourceName->SelectAll(); } else if(!lastStringTyped.IsEmpty()) { m_textCtrlResourceName->SetValue(lastStringTyped); m_textCtrlResourceName->SelectAll(); } m_dataview->GetColumn(0)->SetWidth(400); m_dataview->GetColumn(1)->SetWidth(60); m_dataview->GetColumn(2)->SetWidth(500); bool showFiles = clConfig::Get().Read("OpenResourceDialog/ShowFiles", true); bool showSymbols = clConfig::Get().Read("OpenResourceDialog/ShowSymbols", true); m_checkBoxFiles->SetValue(showFiles); m_checkBoxShowSymbols->SetValue(showSymbols); CentreOnParent(); }
clSingleChoiceDialogBase::clSingleChoiceDialogBase(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); wxC9D6CInitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* boxSizer181 = new wxBoxSizer(wxVERTICAL); this->SetSizer(boxSizer181); m_searchCtrl = new wxSearchCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_PROCESS_ENTER); m_searchCtrl->SetToolTip(_("Filter the results.\nHit ENTER to apply the filter")); m_searchCtrl->SetFocus(); m_searchCtrl->ShowSearchButton(true); m_searchCtrl->ShowCancelButton(false); boxSizer181->Add(m_searchCtrl, 0, wxALL|wxEXPAND, 5); m_dvListCtrl = new wxDataViewListCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxDV_NO_HEADER|wxDV_ROW_LINES|wxDV_SINGLE); boxSizer181->Add(m_dvListCtrl, 1, wxALL|wxEXPAND, 5); m_dvListCtrl->AppendTextColumn(_("My Column"), wxDATAVIEW_CELL_INERT, -2, wxALIGN_LEFT); m_stdBtnSizer183 = new wxStdDialogButtonSizer(); boxSizer181->Add(m_stdBtnSizer183, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10); m_button185 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_button185->SetDefault(); m_stdBtnSizer183->AddButton(m_button185); m_button187 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_stdBtnSizer183->AddButton(m_button187); m_stdBtnSizer183->Realize(); SetName(wxT("clSingleChoiceDialogBase")); SetMinClientSize(wxSize(400,300)); SetSize(400,300); 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_searchCtrl->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(clSingleChoiceDialogBase::OnFilter), NULL, this); m_dvListCtrl->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(clSingleChoiceDialogBase::OnActivated), NULL, this); m_button185->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(clSingleChoiceDialogBase::OnOKUI), NULL, this); }
void OutputPane::CreateGUIControls() { wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL); SetSizer(mainSizer); SetMinClientSize(wxSize(-1, 250)); #if USE_AUI_NOTEBOOK long style = wxAUI_NB_TOP | wxAUI_NB_TAB_MOVE | wxAUI_NB_WINDOWLIST_BUTTON | wxAUI_NB_TAB_SPLIT; m_book = new Notebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style); m_book->SetTabDirection(EditorConfigST::Get()->GetOptions()->GetOutputTabsDirection()); #else long style = (kNotebook_Default | kNotebook_AllowDnD); if(EditorConfigST::Get()->GetOptions()->GetOutputTabsDirection() == wxBOTTOM) { style |= kNotebook_BottomTabs; } else if(EditorConfigST::Get()->GetOptions()->GetOutputTabsDirection() == wxLEFT) { #ifdef __WXOSX__ style &= ~(kNotebook_BottomTabs | kNotebook_LeftTabs | kNotebook_RightTabs); #else style |= kNotebook_LeftTabs; #endif } else if(EditorConfigST::Get()->GetOptions()->GetOutputTabsDirection() == wxRIGHT) { #ifdef __WXOSX__ style |= kNotebook_BottomTabs; #else style |= kNotebook_RightTabs; #endif } if(EditorConfigST::Get()->GetOptions()->IsTabColourDark()) { style &= ~kNotebook_LightTabs; style |= kNotebook_DarkTabs; } style |= kNotebook_UnderlineActiveTab; if(EditorConfigST::Get()->GetOptions()->IsMouseScrollSwitchTabs()) { style |= kNotebook_MouseScrollSwitchTabs; } m_book = new Notebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style); #endif BitmapLoader* bmpLoader = PluginManager::Get()->GetStdIcons(); // Calculate the widest tab (the one with the 'Workspace' label) TODO: What happens with translations? int xx, yy; wxFont fnt = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); wxWindow::GetTextExtent(wxGetTranslation(REPLACE_IN_FILES), &xx, &yy, NULL, NULL, &fnt); mainSizer->Add(m_book, 1, wxEXPAND | wxALL | wxGROW, 0); // the IManager instance IManager* mgr = PluginManager::Get(); // Build tab m_buildWin = new NewBuildTab(m_book); m_book->AddPage(m_buildWin, wxGetTranslation(BUILD_WIN), true, bmpLoader->LoadBitmap(wxT("build"))); m_tabs.insert(std::make_pair(wxGetTranslation(BUILD_WIN), Tab(wxGetTranslation(BUILD_WIN), m_buildWin, bmpLoader->LoadBitmap(wxT("build"))))); mgr->AddOutputTab(wxGetTranslation(BUILD_WIN)); // Find in files m_findResultsTab = new FindResultsTab(m_book, wxID_ANY, wxGetTranslation(FIND_IN_FILES_WIN)); m_book->AddPage(m_findResultsTab, wxGetTranslation(FIND_IN_FILES_WIN), false, bmpLoader->LoadBitmap(wxT("find"))); m_tabs.insert( std::make_pair(wxGetTranslation(FIND_IN_FILES_WIN), Tab(wxGetTranslation(FIND_IN_FILES_WIN), m_findResultsTab, bmpLoader->LoadBitmap(wxT("find"))))); mgr->AddOutputTab(wxGetTranslation(FIND_IN_FILES_WIN)); // Replace In Files m_replaceResultsTab = new ReplaceInFilesPanel(m_book, wxID_ANY, wxGetTranslation(REPLACE_IN_FILES)); m_book->AddPage(m_replaceResultsTab, wxGetTranslation(REPLACE_IN_FILES), false, bmpLoader->LoadBitmap(wxT("find_and_replace"))); m_tabs.insert(std::make_pair( REPLACE_IN_FILES, Tab(REPLACE_IN_FILES, m_replaceResultsTab, bmpLoader->LoadBitmap(wxT("find_and_replace"))))); mgr->AddOutputTab(REPLACE_IN_FILES); // Show Usage ("References") m_showUsageTab = new FindUsageTab(m_book, wxGetTranslation(SHOW_USAGE)); m_book->AddPage(m_showUsageTab, wxGetTranslation(SHOW_USAGE), false, bmpLoader->LoadBitmap(wxT("find"))); m_tabs.insert(std::make_pair(wxGetTranslation(SHOW_USAGE), Tab(wxGetTranslation(SHOW_USAGE), m_showUsageTab, bmpLoader->LoadBitmap(wxT("find"))))); mgr->AddOutputTab(wxGetTranslation(SHOW_USAGE)); // Output tab m_outputWind = new OutputTab(m_book, wxID_ANY, wxGetTranslation(OUTPUT_WIN)); m_book->AddPage(m_outputWind, wxGetTranslation(OUTPUT_WIN), false, bmpLoader->LoadBitmap(wxT("console"))); m_tabs.insert(std::make_pair(wxGetTranslation(OUTPUT_WIN), Tab(wxGetTranslation(OUTPUT_WIN), m_outputWind, bmpLoader->LoadBitmap(wxT("console"))))); mgr->AddOutputTab(wxGetTranslation(OUTPUT_WIN)); #if HAS_LIBCLANG // Clang tab NewProjImgList images; m_clangOutputTab = new ClangOutputTab(m_book); m_book->AddPage(m_clangOutputTab, wxGetTranslation(CLANG_TAB), false, bmpLoader->LoadBitmap("clang")); m_tabs.insert(std::make_pair(wxGetTranslation(CLANG_TAB), Tab(wxGetTranslation(CLANG_TAB), m_clangOutputTab, bmpLoader->LoadBitmap("clang")))); mgr->AddOutputTab(wxGetTranslation(CLANG_TAB)); #endif // Tasks panel m_taskPanel = new TaskPanel(m_book, wxID_ANY, wxGetTranslation(TASKS)); m_book->AddPage(m_taskPanel, wxGetTranslation(TASKS), false, bmpLoader->LoadBitmap("tasks")); m_tabs.insert(std::make_pair(wxGetTranslation(TASKS), Tab(wxGetTranslation(TASKS), m_taskPanel, bmpLoader->LoadBitmap("tasks")))); mgr->AddOutputTab(wxGetTranslation(TASKS)); SetMinSize(wxSize(200, 100)); mainSizer->Layout(); }
EditDlgBase::EditDlgBase(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); wxC9D6CInitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* boxSizer2 = new wxBoxSizer(wxVERTICAL); this->SetSizer(boxSizer2); m_stc10 = new wxStyledTextCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), 0); m_stc10->SetFocus(); // Configure the fold margin m_stc10->SetMarginType (4, wxSTC_MARGIN_SYMBOL); m_stc10->SetMarginMask (4, wxSTC_MASK_FOLDERS); m_stc10->SetMarginSensitive(4, true); m_stc10->SetMarginWidth (4, 0); // Configure the tracker margin m_stc10->SetMarginWidth(1, 0); // Configure the symbol margin m_stc10->SetMarginType (2, wxSTC_MARGIN_SYMBOL); m_stc10->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS)); m_stc10->SetMarginWidth(2, 0); m_stc10->SetMarginSensitive(2, true); // Configure the line numbers margin m_stc10->SetMarginType(0, wxSTC_MARGIN_NUMBER); m_stc10->SetMarginWidth(0,0); // Configure the line symbol margin m_stc10->SetMarginType(3, wxSTC_MARGIN_FORE); m_stc10->SetMarginMask(3, 0); m_stc10->SetMarginWidth(3,0); // Select the lexer m_stc10->SetLexer(wxSTC_LEX_NULL); // Set default font / styles m_stc10->StyleClearAll(); m_stc10->SetWrapMode(0); m_stc10->SetIndentationGuides(0); m_stc10->SetKeyWords(0, wxT("")); m_stc10->SetKeyWords(1, wxT("")); m_stc10->SetKeyWords(2, wxT("")); m_stc10->SetKeyWords(3, wxT("")); m_stc10->SetKeyWords(4, wxT("")); boxSizer2->Add(m_stc10, 1, wxALL|wxEXPAND, 5); wxBoxSizer* boxSizer4 = new wxBoxSizer(wxHORIZONTAL); boxSizer2->Add(boxSizer4, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); m_button6 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1,-1), 0); m_button6->SetDefault(); boxSizer4->Add(m_button6, 0, wxALL, 5); m_button8 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1,-1), 0); boxSizer4->Add(m_button8, 0, wxALL, 5); SetName(wxT("EditDlgBase")); SetMinClientSize(wxSize(300,300)); SetSize(300,300); 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 }
AddIncludeFileDlgBase::AddIncludeFileDlgBase(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); wxC10CDInitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* bSizer7 = new wxBoxSizer(wxVERTICAL); this->SetSizer(bSizer7); m_auibar6 = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxAUI_TB_PLAIN_BACKGROUND|wxAUI_TB_DEFAULT_STYLE); m_auibar6->SetToolBitmapSize(wxSize(16,16)); bSizer7->Add(m_auibar6, 0, wxEXPAND, 5); m_auibar6->AddLabel(wxID_ANY, _("Edit the line too add:"), -1); m_auibar6->AddStretchSpacer(1); m_auibar6->AddTool(ID_LINEUP, _("Move Up"), wxXmlResource::Get()->LoadBitmap(wxT("16-up")), wxNullBitmap, wxITEM_NORMAL, _("Move the #include statement one line up"), _("Move the #include statement one line up"), NULL); m_auibar6->AddTool(ID_LINEDOWN, _("Move Down"), wxXmlResource::Get()->LoadBitmap(wxT("16-down")), wxNullBitmap, wxITEM_NORMAL, _("Move the #include statement one line down"), _("Move the #include statement one line down"), NULL); m_auibar6->AddTool(wxID_CLEAR, _("Clear Cached Paths"), wxXmlResource::Get()->LoadBitmap(wxT("16-clear")), wxNullBitmap, wxITEM_NORMAL, _("Clear Cached Paths"), _("Clear Cached Paths"), NULL); m_auibar6->Realize(); m_mainPanel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL); bSizer7->Add(m_mainPanel, 1, wxALL|wxEXPAND, 5); wxBoxSizer* bSizer9 = new wxBoxSizer(wxVERTICAL); m_mainPanel->SetSizer(bSizer9); m_textCtrlPreview = new wxStyledTextCtrl(m_mainPanel, wxID_ANY, wxDefaultPosition, wxSize(400,300), 0); #ifdef __WXMSW__ // To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to wxFONTFAMILY_TELETYPE wxFont m_textCtrlPreviewFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_textCtrlPreviewFont.SetFamily(wxFONTFAMILY_TELETYPE); #else wxFont m_textCtrlPreviewFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT); m_textCtrlPreviewFont.SetFamily(wxFONTFAMILY_TELETYPE); #endif m_textCtrlPreview->SetFont(m_textCtrlPreviewFont); m_textCtrlPreview->SetFocus(); // Configure the fold margin m_textCtrlPreview->SetMarginType (4, wxSTC_MARGIN_SYMBOL); m_textCtrlPreview->SetMarginMask (4, wxSTC_MASK_FOLDERS); m_textCtrlPreview->SetMarginSensitive(4, true); m_textCtrlPreview->SetMarginWidth (4, 0); // Configure the tracker margin m_textCtrlPreview->SetMarginWidth(1, 0); // Configure the symbol margin m_textCtrlPreview->SetMarginType (2, wxSTC_MARGIN_SYMBOL); m_textCtrlPreview->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS)); m_textCtrlPreview->SetMarginWidth(2, 0); m_textCtrlPreview->SetMarginSensitive(2, true); // Configure the line numbers margin int m_textCtrlPreview_PixelWidth = 4 + 5 *m_textCtrlPreview->TextWidth(wxSTC_STYLE_LINENUMBER, wxT("9")); m_textCtrlPreview->SetMarginType(0, wxSTC_MARGIN_NUMBER); m_textCtrlPreview->SetMarginWidth(0,m_textCtrlPreview_PixelWidth); // Configure the line symbol margin m_textCtrlPreview->SetMarginType(3, wxSTC_MARGIN_FORE); m_textCtrlPreview->SetMarginMask(3, 0); m_textCtrlPreview->SetMarginWidth(3,0); // Select the lexer m_textCtrlPreview->SetLexer(wxSTC_LEX_CPP); // Set default font / styles m_textCtrlPreview->StyleClearAll(); for(int i=0; i<wxSTC_STYLE_MAX; ++i) { m_textCtrlPreview->StyleSetFont(i, m_textCtrlPreviewFont); } m_textCtrlPreview->SetWrapMode(0); m_textCtrlPreview->SetIndentationGuides(0); m_textCtrlPreview->SetKeyWords(0, wxT("")); m_textCtrlPreview->SetKeyWords(1, wxT("")); m_textCtrlPreview->SetKeyWords(2, wxT("")); m_textCtrlPreview->SetKeyWords(3, wxT("")); m_textCtrlPreview->SetKeyWords(4, wxT("")); bSizer9->Add(m_textCtrlPreview, 1, wxLEFT|wxRIGHT|wxEXPAND, 5); wxFlexGridSizer* flexGridSizer4 = new wxFlexGridSizer(0, 2, 0, 0); flexGridSizer4->SetFlexibleDirection( wxBOTH ); flexGridSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer4->AddGrowableCol(1); bSizer9->Add(flexGridSizer4, 0, wxALL|wxEXPAND, 5); m_staticText21 = new wxStaticText(m_mainPanel, wxID_ANY, _("Line to add:"), wxDefaultPosition, wxSize(-1,-1), 0); wxFont m_staticText21Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_staticText21Font.SetWeight(wxFONTWEIGHT_BOLD); m_staticText21->SetFont(m_staticText21Font); flexGridSizer4->Add(m_staticText21, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_staticTextPreview = new wxStaticText(m_mainPanel, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0); #ifdef __WXMSW__ // To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to wxFONTFAMILY_TELETYPE wxFont m_staticTextPreviewFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_staticTextPreviewFont.SetFamily(wxFONTFAMILY_TELETYPE); #else wxFont m_staticTextPreviewFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT); m_staticTextPreviewFont.SetFamily(wxFONTFAMILY_TELETYPE); #endif m_staticTextPreview->SetFont(m_staticTextPreviewFont); flexGridSizer4->Add(m_staticTextPreview, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5); m_staticText5 = new wxStaticText(m_mainPanel, wxID_ANY, _("File's full path:"), wxDefaultPosition, wxSize(-1, -1), 0); wxFont m_staticText5Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_staticText5Font.SetWeight(wxFONTWEIGHT_BOLD); m_staticText5->SetFont(m_staticText5Font); flexGridSizer4->Add(m_staticText5, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlFullPath = new wxTextCtrl(m_mainPanel, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(400,-1), wxTE_READONLY); #if wxVERSION_NUMBER >= 3000 m_textCtrlFullPath->SetHint(wxT("")); #endif flexGridSizer4->Add(m_textCtrlFullPath, 0, wxALL|wxEXPAND, 5); m_stdBtnSizer23 = new wxStdDialogButtonSizer(); bSizer7->Add(m_stdBtnSizer23, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10); m_button25 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_button25->SetDefault(); m_stdBtnSizer23->AddButton(m_button25); m_button27 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_stdBtnSizer23->AddButton(m_button27); m_stdBtnSizer23->Realize(); SetName(wxT("AddIncludeFileDlgBase")); SetMinClientSize(wxSize(250,-1)); SetSize(-1,-1); if (GetSizer()) { GetSizer()->Fit(this); } if(GetParent()) { CentreOnParent(); } else { CentreOnScreen(); } #if wxVERSION_NUMBER >= 2900 if(!wxPersistenceManager::Get().Find(this)) { wxPersistenceManager::Get().RegisterAndRestore(this); } else { wxPersistenceManager::Get().Restore(this); } #endif // Connect events this->Connect(ID_LINEUP, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(AddIncludeFileDlgBase::OnButtonUp), NULL, this); this->Connect(ID_LINEDOWN, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(AddIncludeFileDlgBase::OnButtonDown), NULL, this); this->Connect(wxID_CLEAR, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(AddIncludeFileDlgBase::OnClearCachedPaths), NULL, this); m_button25->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(AddIncludeFileDlgBase::OnButtonOK), NULL, this); }
HK_PROMPT_DIALOG( wxWindow* aParent, wxWindowID aId, const wxString& aTitle, const wxString& aName, const wxString& aCurrentKey ) : DIALOG_SHIM( aParent, aId, aTitle, wxDefaultPosition, wxDefaultSize ) { wxPanel* panel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize ); wxBoxSizer* sizer = new wxBoxSizer( wxVERTICAL ); /* Dialog layout: * * inst_label........................ * ---------------------------------- * * cmd_label_0 cmd_label_1 \ * | fgsizer * key_label_0 key_label_1 / */ wxStaticText* inst_label = new wxStaticText( panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE_HORIZONTAL ); inst_label->SetLabelText( _( "Press a new hotkey, or press Esc to cancel..." ) ); sizer->Add( inst_label, 0, wxALL, 5 ); sizer->Add( new wxStaticLine( panel ), 0, wxALL | wxEXPAND, 2 ); wxFlexGridSizer* fgsizer = new wxFlexGridSizer( 2 ); wxStaticText* cmd_label_0 = new wxStaticText( panel, wxID_ANY, _( "Command:" ) ); fgsizer->Add( cmd_label_0, 0, wxALL | wxALIGN_CENTRE_VERTICAL, 5 ); wxStaticText* cmd_label_1 = new wxStaticText( panel, wxID_ANY, wxEmptyString ); cmd_label_1->SetFont( cmd_label_1->GetFont().Bold() ); cmd_label_1->SetLabel( aName ); fgsizer->Add( cmd_label_1, 0, wxALL | wxALIGN_CENTRE_VERTICAL, 5 ); wxStaticText* key_label_0 = new wxStaticText( panel, wxID_ANY, _( "Current key:" ) ); fgsizer->Add( key_label_0, 0, wxALL | wxALIGN_CENTRE_VERTICAL, 5 ); wxStaticText* key_label_1 = new wxStaticText( panel, wxID_ANY, wxEmptyString ); key_label_1->SetFont( key_label_1->GetFont().Bold() ); key_label_1->SetLabel( aCurrentKey ); fgsizer->Add( key_label_1, 0, wxALL | wxALIGN_CENTRE_VERTICAL, 5 ); sizer->Add( fgsizer, 1, wxEXPAND ); // Wrap the sizer in a second to give a larger border around the whole dialog wxBoxSizer* outer_sizer = new wxBoxSizer( wxVERTICAL ); outer_sizer->Add( sizer, 0, wxALL | wxEXPAND, 10 ); panel->SetSizer( outer_sizer ); Layout(); outer_sizer->Fit( this ); Center(); SetMinClientSize( GetClientSize() ); // Binding both EVT_CHAR and EVT_CHAR_HOOK ensures that all key events, // including specials like Tab and Return, are received, particularly // on MSW. panel->Bind( wxEVT_CHAR, &HK_PROMPT_DIALOG::OnChar, this ); panel->Bind( wxEVT_CHAR_HOOK, &HK_PROMPT_DIALOG::OnCharHook, this ); }
void OutputPane::CreateGUIControls() { wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL); SetSizer(mainSizer); SetMinClientSize(wxSize(-1, 250)); long style = (kNotebook_Default | kNotebook_AllowDnD); if(EditorConfigST::Get()->GetOptions()->GetWorkspaceTabsDirection() == wxBOTTOM) { style |= kNotebook_BottomTabs; } else if(EditorConfigST::Get()->GetOptions()->GetWorkspaceTabsDirection() == wxLEFT) { #ifdef __WXOSX__ style &= ~(kNotebook_BottomTabs | kNotebook_LeftTabs | kNotebook_RightTabs); #else style |= kNotebook_LeftTabs; #endif } else if(EditorConfigST::Get()->GetOptions()->GetWorkspaceTabsDirection() == wxRIGHT) { #ifdef __WXOSX__ style |= kNotebook_BottomTabs; #else style |= kNotebook_RightTabs; #endif } //style |= kNotebook_UnderlineActiveTab; m_book = new Notebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style); BitmapLoader* bmpLoader = PluginManager::Get()->GetStdIcons(); // Calculate the widest tab (the one with the 'Workspace' label) TODO: What happens with translations? int xx, yy; wxFont fnt = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); wxWindow::GetTextExtent(wxGetTranslation(REPLACE_IN_FILES), &xx, &yy, NULL, NULL, &fnt); mainSizer->Add(m_book, 1, wxEXPAND | wxALL | wxGROW, 0); // the IManager instance IManager* mgr = PluginManager::Get(); // Build tab m_buildWin = new NewBuildTab(m_book); m_book->AddPage(m_buildWin, wxGetTranslation(BUILD_WIN), true, bmpLoader->LoadBitmap(wxT("build"))); m_tabs.insert(std::make_pair(wxGetTranslation(BUILD_WIN), Tab(wxGetTranslation(BUILD_WIN), m_buildWin, bmpLoader->LoadBitmap(wxT("build"))))); mgr->AddOutputTab(wxGetTranslation(BUILD_WIN)); // Find in files m_findResultsTab = new FindResultsTab(m_book, wxID_ANY, wxGetTranslation(FIND_IN_FILES_WIN)); m_book->AddPage(m_findResultsTab, wxGetTranslation(FIND_IN_FILES_WIN), false, bmpLoader->LoadBitmap(wxT("find"))); m_tabs.insert( std::make_pair(wxGetTranslation(FIND_IN_FILES_WIN), Tab(wxGetTranslation(FIND_IN_FILES_WIN), m_findResultsTab, bmpLoader->LoadBitmap(wxT("find"))))); mgr->AddOutputTab(wxGetTranslation(FIND_IN_FILES_WIN)); // Replace In Files m_replaceResultsTab = new ReplaceInFilesPanel(m_book, wxID_ANY, wxGetTranslation(REPLACE_IN_FILES)); m_book->AddPage( m_replaceResultsTab, wxGetTranslation(REPLACE_IN_FILES), false, bmpLoader->LoadBitmap(wxT("find_and_replace"))); m_tabs.insert(std::make_pair( REPLACE_IN_FILES, Tab(REPLACE_IN_FILES, m_replaceResultsTab, bmpLoader->LoadBitmap(wxT("find_and_replace"))))); mgr->AddOutputTab(REPLACE_IN_FILES); // Show Usage ("References") m_showUsageTab = new FindUsageTab(m_book, wxGetTranslation(SHOW_USAGE)); m_book->AddPage(m_showUsageTab, wxGetTranslation(SHOW_USAGE), false, bmpLoader->LoadBitmap(wxT("find"))); m_tabs.insert( std::make_pair(wxGetTranslation(SHOW_USAGE), Tab(wxGetTranslation(SHOW_USAGE), m_showUsageTab, bmpLoader->LoadBitmap(wxT("find"))))); mgr->AddOutputTab(wxGetTranslation(SHOW_USAGE)); // Output tab m_outputWind = new OutputTab(m_book, wxID_ANY, wxGetTranslation(OUTPUT_WIN)); m_book->AddPage(m_outputWind, wxGetTranslation(OUTPUT_WIN), false, bmpLoader->LoadBitmap(wxT("console"))); m_tabs.insert( std::make_pair(wxGetTranslation(OUTPUT_WIN), Tab(wxGetTranslation(OUTPUT_WIN), m_outputWind, bmpLoader->LoadBitmap(wxT("console"))))); mgr->AddOutputTab(wxGetTranslation(OUTPUT_WIN)); #if HAS_LIBCLANG // Clang tab NewProjImgList images; m_clangOutputTab = new ClangOutputTab(m_book); m_book->AddPage(m_clangOutputTab, wxGetTranslation(CLANG_TAB), false, images.Bitmap("clang16")); m_tabs.insert(std::make_pair(wxGetTranslation(CLANG_TAB), Tab(wxGetTranslation(CLANG_TAB), m_clangOutputTab, images.Bitmap("clang16")))); mgr->AddOutputTab(wxGetTranslation(CLANG_TAB)); #endif wxTextCtrl* text = new wxTextCtrl(m_book, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_RICH2 | wxTE_MULTILINE | wxTE_READONLY | wxHSCROLL); ///////////////////////////////////// // Set the trace's font & colors ///////////////////////////////////// m_book->AddPage(text, wxGetTranslation(TRACE_TAB), false, bmpLoader->LoadBitmap("log")); m_logTargetOld = wxLog::SetActiveTarget(new wxclTextCtrl(text)); m_tabs.insert(std::make_pair(wxGetTranslation(TRACE_TAB), Tab(wxGetTranslation(TRACE_TAB), text, bmpLoader->LoadBitmap("log")))); mgr->AddOutputTab(wxGetTranslation(TRACE_TAB)); // Now that we set up our own log target, re-enable the logging wxLog::EnableLogging(true); // Tasks panel m_taskPanel = new TaskPanel(m_book, wxID_ANY, wxGetTranslation(TASKS)); m_book->AddPage(m_taskPanel, wxGetTranslation(TASKS), false, bmpLoader->LoadBitmap("tasks")); m_tabs.insert(std::make_pair(wxGetTranslation(TASKS), Tab(wxGetTranslation(TASKS), m_taskPanel, bmpLoader->LoadBitmap("tasks")))); mgr->AddOutputTab(wxGetTranslation(TASKS)); SetMinSize(wxSize(200, 100)); mainSizer->Layout(); }
/* MapEditorConfigDialog::MapEditorConfigDialog * MapEditorConfigDialog class constructor *******************************************************************/ MapEditorConfigDialog::MapEditorConfigDialog(wxWindow* parent, Archive* archive, bool show_maplist, bool creating) : SDialog(parent, "Launch Map Editor", "") { // Init variables this->archive = archive; canvas_preview = NULL; game_current = theGameConfiguration->currentGame(); port_current = theGameConfiguration->currentPort(); this->creating = creating; // Setup main sizer wxBoxSizer* mainsizer = new wxBoxSizer(wxHORIZONTAL); SetSizer(mainsizer); // Left side sizer wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL); mainsizer->Add(sizer, 0, wxEXPAND|wxALL, 6); // Game configuration dropdown wxBoxSizer* hbox = new wxBoxSizer(wxHORIZONTAL); sizer->Add(hbox, 0, wxEXPAND|wxALL, 4); hbox->Add(new wxStaticText(this, -1, "Game:"), 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 4); choice_game_config = new wxChoice(this, -1); hbox->Add(choice_game_config, 1, wxEXPAND|wxRIGHT, 4); // Port configuration dropdown hbox->Add(new wxStaticText(this, -1, "Port:"), 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 4); choice_port_config = new wxChoice(this, -1); hbox->Add(choice_port_config, 1, wxEXPAND|wxRIGHT, 4); // Populate game/port lists populateGameList(); populatePortList(); wxStaticBox* frame; wxStaticBoxSizer* framesizer; // Setup image list img_list = new wxImageList(16, 16); img_list->Add(getIcon("i_tick")); img_list->Add(getIcon("t_close")); // Map section if (show_maplist) { frame = new wxStaticBox(this, -1, "Maps"); framesizer = new wxStaticBoxSizer(frame, wxVERTICAL); sizer->Add(framesizer, 1, wxEXPAND|wxLEFT|wxRIGHT|wxBOTTOM, 4); // Map list list_maps = new ListView(this, -1, wxLC_SINGLE_SEL|wxLC_LIST); list_maps->SetImageList(img_list, wxIMAGE_LIST_SMALL); framesizer->Add(list_maps, 1, wxEXPAND|wxALL, 4); // New map button btn_new_map = new wxButton(this, -1, "New Map"); framesizer->Add(btn_new_map, 0, wxLEFT|wxRIGHT|wxBOTTOM, 4); } else { list_maps = NULL; btn_new_map = NULL; } // Resources section frame = new wxStaticBox(this, -1, "Resources"); framesizer = new wxStaticBoxSizer(frame, wxVERTICAL); sizer->Add(framesizer, 1, wxEXPAND|wxLEFT|wxRIGHT|wxBOTTOM, 4); // Base resource dropdown hbox = new wxBoxSizer(wxHORIZONTAL); framesizer->Add(hbox, 0, wxEXPAND|wxALL, 4); hbox->Add(new wxStaticText(this, -1, "Base Resource:"), 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 4); choice_base_resource = new BaseResourceChooser(this); hbox->Add(choice_base_resource, 1, wxEXPAND, 0); rac_resources = new ResourceArchiveChooser(this, archive); framesizer->Add(rac_resources, 1, wxEXPAND|wxLEFT|wxRIGHT|wxBOTTOM, 4); // Right side (map preview) if (show_maplist) { frame = new wxStaticBox(this, -1, "Preview"); framesizer = new wxStaticBoxSizer(frame, wxVERTICAL); mainsizer->Add(framesizer, 1, wxEXPAND|wxALL, 10); // Add map preview canvas_preview = new MapPreviewCanvas(this); framesizer->Add(canvas_preview->toPanel(this), 1, wxEXPAND|wxALL, 4); canvas_preview->SetInitialSize(wxSize(400, 400)); } // Dialog buttons sizer->AddSpacer(4); hbox = new wxBoxSizer(wxHORIZONTAL); sizer->Add(hbox, 0, wxEXPAND|wxBOTTOM, 6); hbox->AddStretchSpacer(); btn_ok = new wxButton(this, -1, "OK"); hbox->Add(btn_ok, 0, wxEXPAND|wxRIGHT, 4); btn_cancel = new wxButton(this, wxID_CANCEL, "Cancel"); hbox->Add(btn_cancel, 0, wxEXPAND|wxRIGHT, 4); // Populate map list populateMapList(); // Bind events choice_game_config->Bind(wxEVT_CHOICE, &MapEditorConfigDialog::onChoiceGameConfigChanged, this); choice_port_config->Bind(wxEVT_CHOICE, &MapEditorConfigDialog::onChoicePortConfigChanged, this); if (show_maplist) { list_maps->Bind(wxEVT_LIST_ITEM_ACTIVATED, &MapEditorConfigDialog::onMapActivated, this); list_maps->Bind(wxEVT_LIST_ITEM_SELECTED, &MapEditorConfigDialog::onMapSelected, this); btn_new_map->Bind(wxEVT_BUTTON, &MapEditorConfigDialog::onBtnNewMap, this); } btn_ok->Bind(wxEVT_BUTTON, &MapEditorConfigDialog::onBtnOK, this); btn_cancel->Bind(wxEVT_BUTTON, &MapEditorConfigDialog::onBtnCancel, this); Layout(); SetMinClientSize(mainsizer->GetMinSize()); //mainsizer->Fit(this); CenterOnParent(); // Select first map if (show_maplist) list_maps->selectItem(0); }
/* GfxConvDialog::setupLayout * Sets up the dialog UI layout *******************************************************************/ void GfxConvDialog::setupLayout() { wxBoxSizer* msizer = new wxBoxSizer(wxVERTICAL); SetSizer(msizer); wxBoxSizer* m_vbox = new wxBoxSizer(wxVERTICAL); msizer->Add(m_vbox, 1, wxEXPAND|wxALL, 6); // Add current format label label_current_format = new wxStaticText(this, -1, "Current Format:"); m_vbox->Add(label_current_format, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 8); // Add 'Convert To' combo box wxBoxSizer* hbox = new wxBoxSizer(wxHORIZONTAL); m_vbox->Add(hbox, 0, wxEXPAND|wxTOP|wxLEFT|wxRIGHT, 4); hbox->Add(new wxStaticText(this, -1, "Convert to:"), 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); combo_target_format = new wxChoice(this, -1); hbox->Add(combo_target_format, 1, wxEXPAND|wxALL, 4); // Add Gfx previews wxStaticBox* frame = new wxStaticBox(this, -1, "Graphic"); wxStaticBoxSizer* framesizer = new wxStaticBoxSizer(frame, wxHORIZONTAL); m_vbox->Add(framesizer, 1, wxEXPAND|wxALL, 4); wxBoxSizer* vbox = new wxBoxSizer(wxVERTICAL); framesizer->Add(vbox, 1, wxEXPAND|wxALL, 0); vbox->Add(new wxStaticText(this, -1, "Current Graphic"), 0, wxEXPAND|wxLEFT|wxRIGHT, 4); gfx_current = new GfxCanvas(this, -1); gfx_current->SetInitialSize(wxSize(192, 192)); gfx_current->setViewType(GFXVIEW_CENTERED); vbox->Add(gfx_current->toPanel(this), 1, wxEXPAND|wxTOP|wxLEFT|wxRIGHT, 4); pal_chooser_current = new PaletteChooser(this, -1); pal_chooser_current->selectPalette(current_palette_name); vbox->Add(pal_chooser_current, 0, wxEXPAND|wxALL, 4); vbox = new wxBoxSizer(wxVERTICAL); framesizer->Add(vbox, 1, wxEXPAND|wxALL, 0); vbox->Add(new wxStaticText(this, -1, "Converted Graphic"), 0, wxEXPAND|wxLEFT|wxRIGHT, 4); gfx_target = new GfxCanvas(this, -1); gfx_target->SetInitialSize(wxSize(192, 192)); gfx_target->setViewType(1); vbox->Add(gfx_target->toPanel(this), 1, wxEXPAND|wxTOP|wxLEFT|wxRIGHT, 4); hbox = new wxBoxSizer(wxHORIZONTAL); pal_chooser_target = new PaletteChooser(this, -1); pal_chooser_target->selectPalette(target_palette_name); hbox->Add(pal_chooser_target, 1, wxEXPAND|wxRIGHT, 4); btn_colorimetry_settings = new wxBitmapButton(this, -1, Icons::getIcon(Icons::GENERAL, "settings"), wxDefaultPosition, wxDefaultSize); btn_colorimetry_settings->SetToolTip("Adjust Colorimetry Settings..."); hbox->Add(btn_colorimetry_settings, 0, wxEXPAND, 0); vbox->Add(hbox, 0, wxEXPAND | wxALL, 4); // 'Enable transparency' checkbox cb_enable_transparency = new wxCheckBox(this, -1, "Enable Transparency"); cb_enable_transparency->SetValue(true); cb_enable_transparency->SetToolTip("Uncheck this to remove any existing transparency from the graphic"); m_vbox->AddSpacer(4); m_vbox->Add(cb_enable_transparency, 0, wxEXPAND|wxALL, 4); // Add transparency options frame = new wxStaticBox(this, -1, "Transparency Options"); framesizer = new wxStaticBoxSizer(frame, wxVERTICAL); m_vbox->Add(framesizer, 0, wxEXPAND|wxALL, 4); wxBoxSizer* vbox_ttypes = new wxBoxSizer(wxVERTICAL); framesizer->Add(vbox_ttypes, 1, wxEXPAND|wxALL, 0); // Keep existing transparency hbox = new wxBoxSizer(wxHORIZONTAL); vbox_ttypes->Add(hbox, 0, wxEXPAND|wxALL, 0); rb_transparency_existing = new wxRadioButton(this, 100, "Existing w/Threshold:", wxDefaultPosition, wxDefaultSize, wxRB_GROUP); rb_transparency_existing->SetValue(true); hbox->Add(rb_transparency_existing, 0, wxEXPAND|wxALL, 4); // Alpha threshold slider_alpha_threshold = new wxSlider(this, -1, 0, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS|wxSL_BOTTOM); slider_alpha_threshold->SetToolTip("Specifies the 'cutoff' transparency level, anything above this will be fully opaque, anything equal or below will be completely transparent"); hbox->Add(slider_alpha_threshold, 1, wxEXPAND|wxALL, 4); // Transparent colour hbox = new wxBoxSizer(wxHORIZONTAL); vbox_ttypes->Add(hbox, 0, wxEXPAND|wxALL, 0); rb_transparency_colour = new wxRadioButton(this, 101, "Transparent Colour:", wxDefaultPosition, wxDefaultSize, 0); rb_transparency_colour->SetValue(false); hbox->Add(rb_transparency_colour, 0, wxEXPAND|wxALL, 4); colbox_transparent = new ColourBox(this, -1, false); colbox_transparent->setColour(rgba_t(0, 255, 255, 255)); hbox->Add(colbox_transparent, 0, wxEXPAND|wxALL, 4); // From brightness rb_transparency_brightness = new wxRadioButton(this, 102, "Transparency from Brightness"); rb_transparency_brightness->SetValue(false); vbox_ttypes->Add(rb_transparency_brightness, 0, wxEXPAND|wxALL, 4); // Buttons hbox = new wxBoxSizer(wxHORIZONTAL); m_vbox->Add(hbox, 0, wxEXPAND|wxALL, 4); btn_convert = new wxButton(this, -1, "Convert"); btn_convert_all = new wxButton(this, -1, "Convert All"); btn_skip = new wxButton(this, -1, "Skip"); btn_skip_all = new wxButton(this, -1, "Skip All"); hbox->AddStretchSpacer(1); hbox->Add(btn_convert, 0, wxEXPAND|wxRIGHT, 4); hbox->Add(btn_convert_all, 0, wxEXPAND|wxRIGHT, 4); hbox->Add(btn_skip, 0, wxEXPAND|wxRIGHT, 4); hbox->Add(btn_skip_all, 0, wxEXPAND, 0); // Bind events Bind(wxEVT_SIZE, &GfxConvDialog::onResize, this); btn_convert->Bind(wxEVT_BUTTON, &GfxConvDialog::onBtnConvert, this); btn_convert_all->Bind(wxEVT_BUTTON, &GfxConvDialog::onBtnConvertAll, this); btn_skip->Bind(wxEVT_BUTTON, &GfxConvDialog::onBtnSkip, this); btn_skip_all->Bind(wxEVT_BUTTON, &GfxConvDialog::onBtnSkipAll, this); combo_target_format->Bind(wxEVT_CHOICE, &GfxConvDialog::onTargetFormatChanged, this); pal_chooser_current->Bind(wxEVT_CHOICE, &GfxConvDialog::onCurrentPaletteChanged, this); pal_chooser_target->Bind(wxEVT_CHOICE, &GfxConvDialog::onTargetPaletteChanged, this); slider_alpha_threshold->Bind(wxEVT_SLIDER, &GfxConvDialog::onAlphaThresholdChanged, this); cb_enable_transparency->Bind(wxEVT_CHECKBOX, &GfxConvDialog::onEnableTransparencyChanged, this); rb_transparency_colour->Bind(wxEVT_RADIOBUTTON, &GfxConvDialog::onTransTypeChanged, this); rb_transparency_existing->Bind(wxEVT_RADIOBUTTON, &GfxConvDialog::onTransTypeChanged, this); rb_transparency_brightness->Bind(wxEVT_RADIOBUTTON, &GfxConvDialog::onTransTypeChanged, this); Bind(wxEVT_COLOURBOX_CHANGED, &GfxConvDialog::onTransColourChanged, this, colbox_transparent->GetId()); gfx_current->Bind(wxEVT_LEFT_DOWN, &GfxConvDialog::onPreviewCurrentMouseDown, this); btn_colorimetry_settings->Bind(wxEVT_BUTTON, &GfxConvDialog::onBtnColorimetrySettings, this); // Autosize to fit contents (and set this as the minimum size) //SetInitialSize(wxSize(-1, -1)); SetMinClientSize(msizer->GetMinSize()); }
NotebookNavigationDlg::NotebookNavigationDlg(wxWindow* parent, Notebook* book) : NotebookNavigationDlgBase(parent) , m_book(book) , m_selection(wxNOT_FOUND) { clTab::Vec_t allTabs; clTabHistory::Ptr_t history = m_book->GetHistory(); clGetManager()->GetAllTabs(allTabs); BitmapLoader::BitmapMap_t bmps = clGetManager()->GetStdIcons()->MakeStandardMimeMap(); #ifdef __WXOSX__ wxBitmap saveBmp = wxNullBitmap; #else wxBitmap saveBmp = clGetManager()->GetStdIcons()->LoadBitmap("file_save"); #endif std::map<void*, clTab> tabsInfoMap; for(size_t i = 0; i < allTabs.size(); ++i) { tabsInfoMap.insert(std::make_pair((void*)allTabs.at(i).window, allTabs.at(i))); } const wxArrayPtrVoid& windows = history->GetHistory(); // Populate the list for(size_t i = 0; i < windows.GetCount(); ++i) { int index = m_book->FindPage((wxWindow*)windows.Item(i)); if(index != wxNOT_FOUND) { wxString label = m_book->GetPageText(index); wxBitmap bmp = m_book->GetPageBitmap(index); wxVector<wxVariant> cols; TabData* d = new TabData; d->bmp = bmp; d->label = label; d->index = index; // add extra info wxVariant modifiedItem; wxVariant nullBmp; nullBmp << wxNullBitmap; std::map<void*, clTab>::iterator iter = tabsInfoMap.find(windows.Item(i)); if(iter != tabsInfoMap.end()) { d->isFile = iter->second.isFile; d->filename = iter->second.filename; if(iter->second.isModified) { modifiedItem << saveBmp; cols.push_back(modifiedItem); } else { cols.push_back(nullBmp); } } else { cols.push_back(nullBmp); } // Prepare the display item wxString text; if(d->isFile && d->filename.GetDirCount()) { wxFileName fn(d->filename.GetFullName()); fn.AppendDir(d->filename.GetDirs().Last()); text << fn.GetFullPath(); } else { text << d->label; } // If the tab has a bitmap - use it // otherwise, try to assign one if(!d->bmp.IsOk()) { if(d->isFile) { FileExtManager::FileType type = FileExtManager::GetType(d->filename.GetFullName(), FileExtManager::TypeText); if(bmps.count(type)) { d->bmp = bmps.find(type)->second; } } } #ifdef __WXOSX__ if(iter != tabsInfoMap.end() && iter->second.isModified) { text.Prepend("*"); } #endif cols.push_back(::MakeIconText(text, d->bmp)); m_dvListCtrl->AppendItem(cols, (wxUIntPtr)d); } } if(m_dvListCtrl->GetItemCount() > 1) { m_dvListCtrl->Select(m_dvListCtrl->RowToItem(1)); } else { m_dvListCtrl->Select(m_dvListCtrl->RowToItem(0)); } m_dvListCtrl->CallAfter(&wxDataViewCtrl::SetFocus); SetMinClientSize(wxSize(500, 300)); #ifdef __WXOSX__ SetSize(wxSize(500, 300)); #endif CentreOnParent(); wxTheApp->Bind(wxEVT_KEY_DOWN, &NotebookNavigationDlg::OnKeyDown, this); wxTheApp->Bind(wxEVT_KEY_UP, &NotebookNavigationDlg::OnKeyUp, this); }
CMakeSettingsDialogBase::CMakeSettingsDialogBase(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); wxCrafterR3nJ3cInitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* boxSizerMain = new wxBoxSizer(wxVERTICAL); this->SetSizer(boxSizerMain); wxFlexGridSizer* flexGridSizer = new wxFlexGridSizer(0, 2, 5, 5); flexGridSizer->SetFlexibleDirection( wxBOTH ); flexGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer->AddGrowableCol(1); boxSizerMain->Add(flexGridSizer, 1, wxALL|wxEXPAND, 5); m_staticTextProgram = new wxStaticText(this, wxID_ANY, _("CMake program:"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer->Add(m_staticTextProgram, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_filePickerProgram = new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*"), wxDefaultPosition, wxSize(-1,-1), wxFLP_DEFAULT_STYLE|wxFLP_USE_TEXTCTRL); m_filePickerProgram->SetToolTip(_("Path to cmake executable.")); flexGridSizer->Add(m_filePickerProgram, 1, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5); m_filePickerProgram->SetMinSize(wxSize(200,-1)); m_staticTextDefaultGenerator = new wxStaticText(this, wxID_ANY, _("Default Generator:"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer->Add(m_staticTextDefaultGenerator, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); wxArrayString m_choiceDefaultGeneratorArr; m_choiceDefaultGenerator = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_choiceDefaultGeneratorArr, 0); m_choiceDefaultGenerator->SetToolTip(_("You can specify default generator for all projects (if is not overridden by project settings). If generator is not selected the CMake uses platform's default.")); flexGridSizer->Add(m_choiceDefaultGenerator, 1, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5); m_stdBtnSizer = new wxStdDialogButtonSizer(); boxSizerMain->Add(m_stdBtnSizer, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); m_buttonOk = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_buttonOk->SetDefault(); m_stdBtnSizer->AddButton(m_buttonOk); m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_stdBtnSizer->AddButton(m_buttonCancel); m_stdBtnSizer->Realize(); SetName(wxT("CMakeSettingsDialogBase")); SetMinClientSize(wxSize(400,150)); 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 }
BaseEventStoreDialog::BaseEventStoreDialog(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); wxC629BInitBitmapResources(); bBitmapLoaded = true; } wxFlexGridSizer* flexGridSizer731 = new wxFlexGridSizer(0, 1, 0, 0); flexGridSizer731->SetFlexibleDirection( wxBOTH ); flexGridSizer731->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer731->AddGrowableCol(0); flexGridSizer731->AddGrowableRow(0); this->SetSizer(flexGridSizer731); wxBoxSizer* boxSizer134 = new wxBoxSizer(wxHORIZONTAL); flexGridSizer731->Add(boxSizer134, 1, wxALL|wxEXPAND, 0); wxFlexGridSizer* flexGridSizer853 = new wxFlexGridSizer(0, 1, 0, 0); flexGridSizer853->SetFlexibleDirection( wxBOTH ); flexGridSizer853->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer853->AddGrowableCol(0); flexGridSizer853->AddGrowableRow(0); boxSizer134->Add(flexGridSizer853, 2, wxALL|wxEXPAND, 0); templatesList = new wxSimpleHtmlListBox(this, wxID_ANY); flexGridSizer853->Add(templatesList, 0, wxALL|wxEXPAND, 5); templatesList->SetMinSize(wxSize(200,-1)); searchCtrl = new wxSearchCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0); searchCtrl->SetFocus(); #if wxVERSION_NUMBER >= 3000 searchCtrl->SetHint(wxT("")); #endif flexGridSizer853->Add(searchCtrl, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, 5); wxBoxSizer* boxSizer145 = new wxBoxSizer(wxVERTICAL); boxSizer134->Add(boxSizer145, 3, wxALL|wxEXPAND, 0); nameTxt = new wxStaticText(this, wxID_ANY, _("No template chosen"), wxDefaultPosition, wxSize(-1,-1), 0); wxFont nameTxtFont(14, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxT("Segoe UI")); nameTxt->SetFont(nameTxtFont); boxSizer145->Add(nameTxt, 0, wxALL|wxEXPAND, 5); nameTxt->SetMinSize(wxSize(350,-1)); authorTxt = new wxStaticText(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxALIGN_RIGHT); boxSizer145->Add(authorTxt, 0, wxLEFT|wxRIGHT|wxALIGN_RIGHT, 5); wxBoxSizer* boxSizer146 = new wxBoxSizer(wxVERTICAL); boxSizer145->Add(boxSizer146, 0, wxALL|wxEXPAND, 0); descriptionEdit = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_READONLY|wxTE_MULTILINE); boxSizer146->Add(descriptionEdit, 0, wxALL|wxEXPAND, 5); descriptionEdit->SetMinSize(wxSize(-1,55)); m_staticLine979 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxLI_HORIZONTAL); boxSizer145->Add(m_staticLine979, 0, wxLEFT|wxRIGHT|wxEXPAND, 5); parametersScrolledWindow = new wxScrolledWindow(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxVSCROLL); parametersScrolledWindow->SetScrollRate(0, 5); boxSizer145->Add(parametersScrolledWindow, 1, wxALL|wxEXPAND, 0); wxGridSizer* gridSizer150 = new wxGridSizer(0, 1, 0, 0); parametersScrolledWindow->SetSizer(gridSizer150); parametersSizer = new wxFlexGridSizer(0, 3, 0, 0); gridSizer150->Add(parametersSizer, 1, wxALL|wxEXPAND, 0); m_staticLine7911 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxLI_HORIZONTAL); flexGridSizer731->Add(m_staticLine7911, 0, wxALL|wxEXPAND, 0); wxFlexGridSizer* flexGridSizer7712 = new wxFlexGridSizer(0, 5, 0, 0); flexGridSizer7712->SetFlexibleDirection( wxBOTH ); flexGridSizer7712->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer7712->AddGrowableCol(2); flexGridSizer731->Add(flexGridSizer7712, 1, wxALL|wxEXPAND, 0); m_staticBitmap631 = new wxStaticBitmap(this, wxID_ANY, wxXmlResource::Get()->LoadBitmap(wxT("help16")), wxDefaultPosition, wxSize(-1,-1), 0 ); flexGridSizer7712->Add(m_staticBitmap631, 0, wxLEFT|wxTOP|wxBOTTOM|wxALIGN_CENTER_VERTICAL, 5); m_hyperLink652 = new wxHyperlinkCtrl(this, wxID_ANY, _("Help"), wxT("http://wiki.compilgames.net/doku.php/en/game_develop/documentation/manual/event_store"), wxDefaultPosition, wxSize(-1,-1), wxHL_DEFAULT_STYLE); m_hyperLink652->SetNormalColour(wxColour(wxT("#0000FF"))); m_hyperLink652->SetHoverColour(wxColour(wxT("#0000FF"))); m_hyperLink652->SetVisitedColour(wxColour(wxT("#FF0000"))); flexGridSizer7712->Add(m_hyperLink652, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); m_hyperLink154 = new wxHyperlinkCtrl(this, wxID_ANY, _("Publish your own events on GDevApp.com"), wxT("https://gdevapp.com"), wxDefaultPosition, wxSize(-1,-1), wxHL_DEFAULT_STYLE); m_hyperLink154->SetNormalColour(wxColour(wxT("#0000FF"))); m_hyperLink154->SetHoverColour(wxColour(wxT("#0000FF"))); m_hyperLink154->SetVisitedColour(wxColour(wxT("#FF0000"))); flexGridSizer7712->Add(m_hyperLink154, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); okBt = new wxButton(this, wxID_ANY, _("Ok"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer7712->Add(okBt, 0, wxALL|wxALIGN_RIGHT, 5); cancelBt = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer7712->Add(cancelBt, 0, wxALL, 5); SetName(wxT("BaseEventStoreDialog")); SetMinClientSize(wxSize(500,300)); SetSize(750,450); 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 searchCtrl->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(BaseEventStoreDialog::OnSearchCtrlText), NULL, this); okBt->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BaseEventStoreDialog::OnOkBtClick), NULL, this); cancelBt->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BaseEventStoreDialog::OnCancelBtClick), NULL, this); }
QuickDebugBase::QuickDebugBase(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); wxCrafterSFKMcrInitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* bSizer1 = new wxBoxSizer(wxVERTICAL); this->SetSizer(bSizer1); wxBoxSizer* bSizer3 = new wxBoxSizer(wxVERTICAL); bSizer1->Add(bSizer3, 1, wxALL|wxEXPAND, 5); wxFlexGridSizer* fgSizer1 = new wxFlexGridSizer(0, 3, 0, 0); fgSizer1->SetFlexibleDirection( wxBOTH ); fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer1->AddGrowableCol(1); bSizer3->Add(fgSizer1, 0, wxALL|wxEXPAND, 5); m_staticText2 = new wxStaticText(this, wxID_ANY, _("Select executable:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer1->Add(m_staticText2, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); wxArrayString m_ExeFilepathArr; m_ExeFilepath = new wxComboBox(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), m_ExeFilepathArr, 0); m_ExeFilepath->SetToolTip(_("Enter the filepath to the program that you want to debug.\nAlternatively, if you enter the path below, putting just the filename here will suffice.")); m_ExeFilepath->SetFocus(); #if wxVERSION_NUMBER >= 3000 m_ExeFilepath->SetHint(wxT("")); #endif fgSizer1->Add(m_ExeFilepath, 0, wxALL|wxEXPAND, 5); m_buttonBrowseExe = new wxButton(this, wxID_ANY, _("..."), wxDefaultPosition, wxSize(-1, -1), wxBU_EXACTFIT); m_buttonBrowseExe->SetToolTip(_("Select executale to debug")); fgSizer1->Add(m_buttonBrowseExe, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5); m_staticText5 = new wxStaticText(this, wxID_ANY, _("Working directory:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer1->Add(m_staticText5, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); wxArrayString m_WDArr; m_WD = new wxComboBox(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), m_WDArr, 0); m_WD->SetToolTip(_("Optionally, enter the path where the program that you want to debug can be found")); #if wxVERSION_NUMBER >= 3000 m_WD->SetHint(wxT("")); #endif fgSizer1->Add(m_WD, 0, wxALL|wxEXPAND, 5); m_buttonBrowseWD = new wxButton(this, wxID_ANY, _("..."), wxDefaultPosition, wxSize(-1, -1), wxBU_EXACTFIT); m_buttonBrowseWD->SetToolTip(_("Browse for working directory")); fgSizer1->Add(m_buttonBrowseWD, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5); m_staticText4 = new wxStaticText(this, wxID_ANY, _("Program arguments:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer1->Add(m_staticText4, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlArgs = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); #if wxVERSION_NUMBER >= 3000 m_textCtrlArgs->SetHint(wxT("")); #endif fgSizer1->Add(m_textCtrlArgs, 0, wxALL|wxEXPAND, 5); fgSizer1->Add(0, 0, 1, wxALL, 5); m_staticText3 = new wxStaticText(this, wxID_ANY, _("Select debugger:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer1->Add(m_staticText3, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); wxArrayString m_choiceDebuggersArr; m_choiceDebuggers = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_choiceDebuggersArr, 0); fgSizer1->Add(m_choiceDebuggers, 0, wxALL|wxEXPAND, 5); fgSizer1->Add(0, 0, 1, wxALL, 5); m_staticText12 = new wxStaticText(this, wxID_ANY, _("Alternate debugger executable:"), wxDefaultPosition, wxSize(-1,-1), 0); fgSizer1->Add(m_staticText12, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlDebuggerExec = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0); m_textCtrlDebuggerExec->SetToolTip(_("Provide an alternate debugger executable to use.\nThis is currently only supported for GDB")); #if wxVERSION_NUMBER >= 3000 m_textCtrlDebuggerExec->SetHint(wxT("")); #endif fgSizer1->Add(m_textCtrlDebuggerExec, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5); m_buttonBrowseDebugger = new wxButton(this, wxID_ANY, _("..."), wxDefaultPosition, wxSize(-1,-1), wxBU_EXACTFIT); m_buttonBrowseDebugger->SetToolTip(_("Select debugger executable")); fgSizer1->Add(m_buttonBrowseDebugger, 0, wxALIGN_CENTER_VERTICAL, 5); m_staticText6 = new wxStaticText(this, wxID_ANY, _("Startup commands:"), wxDefaultPosition, wxSize(-1, -1), 0); bSizer3->Add(m_staticText6, 0, wxALL, 5); m_textCtrlCmds = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_RICH2|wxTE_PROCESS_TAB|wxTE_MULTILINE); #ifdef __WXMSW__ // To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to wxFONTFAMILY_TELETYPE wxFont m_textCtrlCmdsFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_textCtrlCmdsFont.SetFamily(wxFONTFAMILY_TELETYPE); #else wxFont m_textCtrlCmdsFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT); m_textCtrlCmdsFont.SetFamily(wxFONTFAMILY_TELETYPE); #endif m_textCtrlCmds->SetFont(m_textCtrlCmdsFont); bSizer3->Add(m_textCtrlCmds, 1, wxALL|wxEXPAND, 5); m_textCtrlCmds->SetMinSize(wxSize(-1,150)); m_stdBtnSizer2 = new wxStdDialogButtonSizer(); bSizer1->Add(m_stdBtnSizer2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10); m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_buttonOK->SetDefault(); m_stdBtnSizer2->AddButton(m_buttonOK); m_buttonCancel1 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_stdBtnSizer2->AddButton(m_buttonCancel1); m_stdBtnSizer2->Realize(); SetName(wxT("QuickDebugBase")); SetMinClientSize(wxSize(500,400)); 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_buttonBrowseExe->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(QuickDebugBase::OnButtonBrowseExe), NULL, this); m_buttonBrowseWD->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(QuickDebugBase::OnButtonBrowseWD), NULL, this); m_buttonBrowseDebugger->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(QuickDebugBase::OnSelectAlternateDebugger), NULL, this); m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(QuickDebugBase::OnButtonDebug), NULL, this); m_buttonCancel1->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(QuickDebugBase::OnButtonCancel), NULL, this); }
OpenResourceDialog::OpenResourceDialog(wxWindow* parent, IManager* manager, const wxString& initialSelection) : OpenResourceDialogBase(parent) , m_manager(manager) , m_needRefresh(false) { Hide(); BitmapLoader* bmpLoader = m_manager->GetStdIcons(); m_tagImgMap[wxT("class")] = bmpLoader->LoadBitmap(wxT("cc/16/class")); m_tagImgMap[wxT("struct")] = bmpLoader->LoadBitmap(wxT("cc/16/struct")); m_tagImgMap[wxT("namespace")] = bmpLoader->LoadBitmap(wxT("cc/16/namespace")); m_tagImgMap[wxT("typedef")] = bmpLoader->LoadBitmap(wxT("cc/16/typedef")); m_tagImgMap[wxT("member_private")] = bmpLoader->LoadBitmap(wxT("cc/16/member_private")); m_tagImgMap[wxT("member_public")] = bmpLoader->LoadBitmap(wxT("cc/16/member_public")); m_tagImgMap[wxT("member_protected")] = bmpLoader->LoadBitmap(wxT("cc/16/member_protected")); m_tagImgMap[wxT("function_private")] = bmpLoader->LoadBitmap(wxT("cc/16/function_private")); m_tagImgMap[wxT("function_public")] = bmpLoader->LoadBitmap(wxT("cc/16/function_public")); m_tagImgMap[wxT("function_protected")] = bmpLoader->LoadBitmap(wxT("cc/16/function_protected")); m_tagImgMap[wxT("enum")] = bmpLoader->LoadBitmap(wxT("cc/16/enum")); m_tagImgMap[wxT("enumerator")] = bmpLoader->LoadBitmap(wxT("cc/16/enumerator")); m_tagImgMap[wxT("cpp")] = bmpLoader->LoadBitmap(wxT("mime/16/cpp")); m_tagImgMap[wxT("h")] = bmpLoader->LoadBitmap(wxT("mime/16/h")); m_tagImgMap[wxT("text")] = bmpLoader->LoadBitmap(wxT("mime/16/text")); m_tagImgMap[wxT("c")] = bmpLoader->LoadBitmap(wxT("mime/16/c")); m_tagImgMap[wxT("wxfb")] = bmpLoader->LoadBitmap(wxT("mime/16/wxfb")); m_tagImgMap[wxT("wxcp")] = bmpLoader->LoadBitmap(wxT("mime/16/wxcp")); m_timer = new wxTimer(this, XRCID("OR_TIMER")); m_textCtrlResourceName->SetFocus(); SetLabel(_("Open resource...")); SetMinClientSize(wxSize(600, 400)); GetSizer()->Fit(this); SetName("OpenResourceDialog"); WindowAttrManager::Load(this); // load all files from the workspace if(m_manager->IsWorkspaceOpen()) { wxArrayString projects; m_manager->GetWorkspace()->GetProjectList(projects); for(size_t i = 0; i < projects.GetCount(); i++) { std::vector<wxFileName> fileNames; wxString errmsg; ProjectPtr p = m_manager->GetWorkspace()->FindProjectByName(projects.Item(i), errmsg); if(p) { p->GetFiles(fileNames, true); // convert std::vector to wxArrayString for(std::vector<wxFileName>::iterator it = fileNames.begin(); it != fileNames.end(); it++) { wxString name = it->GetFullName().MakeLower(); m_files.insert(std::make_pair(name, it->GetFullPath())); } } } } // Set the initial selection // We use here 'SetValue' so an event will get fired and update the control if(!initialSelection.IsEmpty()) { m_textCtrlResourceName->SetValue(initialSelection); m_textCtrlResourceName->SelectAll(); } m_dataview->GetColumn(0)->SetWidth(400); m_dataview->GetColumn(1)->SetWidth(60); m_dataview->GetColumn(2)->SetWidth(500); bool showFiles = clConfig::Get().Read("OpenResourceDialog/ShowFiles", true); bool showSymbols = clConfig::Get().Read("OpenResourceDialog/ShowSymbols", true); m_checkBoxFiles->SetValue(showFiles); m_checkBoxShowSymbols->SetValue(showSymbols); CentreOnParent(); }
FindInFilesDialogBase::FindInFilesDialogBase(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); wxCABC4InitBitmapResources(); bBitmapLoaded = true; } // Set icon(s) to the application/dialog wxIconBundle app_icons; { wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-find_in_files")); wxIcon icn; icn.CopyFromBitmap(iconBmp); app_icons.AddIcon( icn ); } { wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-find_in_files@2x")); wxIcon icn; icn.CopyFromBitmap(iconBmp); app_icons.AddIcon( icn ); } SetIcons( app_icons ); wxBoxSizer* boxSizer7 = new wxBoxSizer(wxHORIZONTAL); this->SetSizer(boxSizer7); m_panelMainPanel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL); boxSizer7->Add(m_panelMainPanel, 1, wxBOTTOM|wxEXPAND, 10); wxBoxSizer* boxSizer95 = new wxBoxSizer(wxVERTICAL); m_panelMainPanel->SetSizer(boxSizer95); wxBoxSizer* boxSizer50 = new wxBoxSizer(wxHORIZONTAL); boxSizer95->Add(boxSizer50, 1, wxALL|wxEXPAND, 5); wxFlexGridSizer* fgSizer41 = new wxFlexGridSizer(0, 2, 0, 0); fgSizer41->SetFlexibleDirection( wxBOTH ); fgSizer41->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer41->AddGrowableCol(1); fgSizer41->AddGrowableRow(2); boxSizer50->Add(fgSizer41, 1, wxALL|wxEXPAND, 5); m_staticText1 = new wxStaticText(m_panelMainPanel, wxID_ANY, _("Find What :"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer41->Add(m_staticText1, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); wxArrayString m_findStringArr; m_findString = new wxComboBox(m_panelMainPanel, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), m_findStringArr, 0); m_findString->SetToolTip(_("Find what")); m_findString->SetFocus(); #if wxVERSION_NUMBER >= 3000 m_findString->SetHint(_("Find what")); #endif fgSizer41->Add(m_findString, 0, wxALL|wxEXPAND, 5); m_staticText102 = new wxStaticText(m_panelMainPanel, wxID_ANY, _("Replace With:"), wxDefaultPosition, wxSize(-1,-1), 0); fgSizer41->Add(m_staticText102, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); wxArrayString m_replaceStringArr; m_replaceString = new wxComboBox(m_panelMainPanel, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), m_replaceStringArr, 0); #if wxVERSION_NUMBER >= 3000 m_replaceString->SetHint(_("Replace with")); #endif fgSizer41->Add(m_replaceString, 0, wxALL|wxEXPAND, 5); m_staticText2 = new wxStaticText(m_panelMainPanel, wxID_ANY, _("Look in :"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer41->Add(m_staticText2, 0, wxALL|wxALIGN_RIGHT|wxALIGN_TOP, 5); wxBoxSizer* bSizer9 = new wxBoxSizer(wxHORIZONTAL); fgSizer41->Add(bSizer9, 0, wxEXPAND, 5); wxArrayString m_listPathsArr; m_listPaths = new wxListBox(m_panelMainPanel, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_listPathsArr, wxLB_SORT|wxLB_MULTIPLE); bSizer9->Add(m_listPaths, 1, wxLEFT|wxTOP|wxBOTTOM|wxEXPAND, 5); wxBoxSizer* boxSizer1 = new wxBoxSizer(wxVERTICAL); bSizer9->Add(boxSizer1, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, 5); m_btnAddPath = new wxButton(m_panelMainPanel, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxBU_EXACTFIT); #if wxVERSION_NUMBER >= 2904 m_btnAddPath->SetBitmap(wxXmlResource::Get()->LoadBitmap(wxT("16-plus")), wxLEFT); m_btnAddPath->SetBitmapMargins(2,2); #endif m_btnAddPath->SetToolTip(_("Add search path")); boxSizer1->Add(m_btnAddPath, 0, wxTOP|wxBOTTOM|wxEXPAND, 5); m_btnClearSelectedPath = new wxButton(m_panelMainPanel, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxBU_EXACTFIT); #if wxVERSION_NUMBER >= 2904 m_btnClearSelectedPath->SetBitmap(wxXmlResource::Get()->LoadBitmap(wxT("16-minus")), wxLEFT); m_btnClearSelectedPath->SetBitmapMargins(5,5); #endif m_btnClearSelectedPath->SetToolTip(_("Remove the selected path")); boxSizer1->Add(m_btnClearSelectedPath, 0, wxTOP|wxEXPAND, 5); m_staticText3 = new wxStaticText(m_panelMainPanel, wxID_ANY, _("File Mask:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer41->Add(m_staticText3, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); wxArrayString m_fileTypesArr; m_fileTypesArr.Add(wxT("*.c;*.cpp;*.cxx;*.cc;*.h;*.hpp;*.inc;*.mm;*.m;*.xrc")); m_fileTypes = new wxComboBox(m_panelMainPanel, wxID_ANY, wxT("*.c;*.cpp;*.cxx;*.cc;*.h;*.hpp;*.inc;*.mm;*.m;*.xrc"), wxDefaultPosition, wxSize(-1, -1), m_fileTypesArr, 0); m_fileTypes->SetToolTip(_("Search these file types")); #if wxVERSION_NUMBER >= 3000 m_fileTypes->SetHint(wxT("")); #endif m_fileTypes->SetSelection(0); fgSizer41->Add(m_fileTypes, 0, wxALL|wxEXPAND, 5); m_staticText5 = new wxStaticText(m_panelMainPanel, wxID_ANY, _("Files Encoding:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer41->Add(m_staticText5, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); wxArrayString m_choiceEncodingArr; m_choiceEncoding = new wxChoice(m_panelMainPanel, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_choiceEncodingArr, 0); m_choiceEncoding->SetToolTip(_("Use this file encoding when scanning files for matches")); fgSizer41->Add(m_choiceEncoding, 1, wxALL|wxEXPAND, 5); m_staticText97 = new wxStaticText(m_panelMainPanel, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0); fgSizer41->Add(m_staticText97, 0, wxALL|wxALIGN_RIGHT, 5); wxBoxSizer* boxSizer105 = new wxBoxSizer(wxVERTICAL); fgSizer41->Add(boxSizer105, 0, wxALL|wxEXPAND, 5); wxFlexGridSizer* fgSizer3 = new wxFlexGridSizer(0, 3, 0, 0); fgSizer3->SetFlexibleDirection( wxBOTH ); fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); boxSizer105->Add(fgSizer3, 0, wxEXPAND, 5); m_matchCase = new wxCheckBox(m_panelMainPanel, wxID_ANY, _("&Match case"), wxDefaultPosition, wxSize(-1, -1), 0); m_matchCase->SetValue(false); m_matchCase->SetToolTip(_("Toggle case sensitive search")); fgSizer3->Add(m_matchCase, 0, wxALL|wxEXPAND, 5); m_matchWholeWord = new wxCheckBox(m_panelMainPanel, wxID_ANY, _("Match &whole word"), wxDefaultPosition, wxSize(-1, -1), 0); m_matchWholeWord->SetValue(false); m_matchWholeWord->SetToolTip(_("Toggle whole word search")); fgSizer3->Add(m_matchWholeWord, 0, wxALL|wxEXPAND, 5); m_checkBoxPipeForGrep = new wxCheckBox(m_panelMainPanel, wxID_ANY, _("Enable pipe filtering"), wxDefaultPosition, wxSize(-1,-1), 0); m_checkBoxPipeForGrep->SetValue(false); m_checkBoxPipeForGrep->SetToolTip(_("Use the pipe character (\"|\") as a special separator for applying additional filters. This has the similar effect as using the \"grep\" command line tool")); fgSizer3->Add(m_checkBoxPipeForGrep, 0, wxALL, 5); m_regualrExpression = new wxCheckBox(m_panelMainPanel, wxID_ANY, _("Regular &expression"), wxDefaultPosition, wxSize(-1, -1), 0); m_regualrExpression->SetValue(false); m_regualrExpression->SetToolTip(_("The 'Find What' field is a regular expression")); fgSizer3->Add(m_regualrExpression, 0, wxALL|wxEXPAND, 5); m_checkBoxSaveFilesBeforeSearching = new wxCheckBox(m_panelMainPanel, wxID_ANY, _("&Save files before search"), wxDefaultPosition, wxSize(-1, -1), 0); m_checkBoxSaveFilesBeforeSearching->SetValue(false); m_checkBoxSaveFilesBeforeSearching->SetToolTip(_("Save any modified files before search starts")); fgSizer3->Add(m_checkBoxSaveFilesBeforeSearching, 0, wxALL|wxEXPAND, 5); wxBoxSizer* bSizer2 = new wxBoxSizer(wxVERTICAL); boxSizer50->Add(bSizer2, 0, wxALL, 5); m_find = new wxButton(m_panelMainPanel, wxID_FIND, _("&Find"), wxDefaultPosition, wxSize(-1, -1), 0); m_find->SetDefault(); m_find->SetToolTip(_("Begin search")); bSizer2->Add(m_find, 0, wxALL|wxEXPAND, 5); m_replaceAll = new wxButton(m_panelMainPanel, wxID_REPLACE, _("&Replace"), wxDefaultPosition, wxSize(-1, -1), 0); m_replaceAll->SetToolTip(_("Search for matches and place them in the 'Replace' window as candidates for possible replace operation")); bSizer2->Add(m_replaceAll, 0, wxALL|wxEXPAND, 5); m_stop = new wxButton(m_panelMainPanel, wxID_STOP, _("Sto&p"), wxDefaultPosition, wxSize(-1, -1), 0); m_stop->SetToolTip(_("Stop the current search")); bSizer2->Add(m_stop, 0, wxALL|wxEXPAND, 5); m_cancel = new wxButton(m_panelMainPanel, wxID_CANCEL, _("Close"), wxDefaultPosition, wxSize(-1, -1), 0); m_cancel->SetToolTip(_("Close this dialog")); bSizer2->Add(m_cancel, 0, wxALL|wxEXPAND, 5); SetName(wxT("FindInFilesDialogBase")); SetMinClientSize(wxSize(-1,400)); SetSize(-1,400); 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_btnAddPath->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindInFilesDialogBase::OnAddPath), NULL, this); m_btnClearSelectedPath->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindInFilesDialogBase::OnClearSelectedPath), NULL, this); m_btnClearSelectedPath->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(FindInFilesDialogBase::OnClearSelectedPathUI), NULL, this); m_find->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindInFilesDialogBase::OnFind), NULL, this); m_find->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(FindInFilesDialogBase::OnFindWhatUI), NULL, this); m_replaceAll->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindInFilesDialogBase::OnReplace), NULL, this); m_replaceAll->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(FindInFilesDialogBase::OnReplaceUI), NULL, this); m_stop->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindInFilesDialogBase::OnStop), NULL, this); m_cancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindInFilesDialogBase::OnButtonClose), NULL, this); }