/***************************************************** ** ** ChildWindow --- Constructor ** ******************************************************/ ChildWindow::ChildWindow( wxFrame *parent, Document *document, const wxSize &size, const bool ismain ) : wxFrame( parent, -1, wxT( "childwindow" ), wxDefaultPosition, size ), doc( document ) { isvalid = true; ismainwindow = false; showEphemFileWarning = false; setMainWindow( ismain ); if ( doc && ! ismain ) doc->addChildWindow( this ); SetMinSize( wxSize( 200, 200 )); Connect( wxEVT_ACTIVATE, wxActivateEventHandler( ChildWindow::OnActivate )); Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( ChildWindow::OnMouseWheelEvent )); Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ChildWindow::OnClose )); Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( ChildWindow::OnKeyDown )); Connect( wxEVT_CHAR, wxKeyEventHandler( ChildWindow::OnChar )); Connect( wxID_ANY, SHOW_EPHEM_FILE_WARNING, wxCommandEventHandler( ChildWindow::OnEphemFileWarning )); Connect( CMD_CHILD_FIRST+1, CMD_CHILD_GRAPHIC_STYLE+100, wxCommandEventHandler( ChildWindow::OnCommand )); }
RouteSearchDialog::RouteSearchDialog(wxWindow* parent) : wxDialog(parent, wxID_ANY, "Find route", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) { mPoints = new wxListBox(this, wxID_ANY, wxPoint(), wxSize(), 0, 0, wxLB_SORT); mAdd = new wxToggleButton(this, wxID_ANY, "+", wxPoint(), wxSize(25, 25)); mDelete = new wxButton(this, wxID_ANY, "-", wxPoint(), wxSize(25, 25)); mMaxSpeed = new wxRadioButton(this, wxID_ANY, "Maximal speed"); mAvgSpeed = new wxRadioButton(this, wxID_ANY, "Avarage speed"); mLenght = new wxRadioButton(this, wxID_ANY, "Lenght"); mSearch = new wxButton(this, wxID_ANY, "Find"); mResults = new wxListBox(this, wxID_ANY, wxPoint(), wxSize(), 0, 0, wxLB_SORT); mSearch->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(RouteSearchDialog::onSearchClick), NULL, this); mResults->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(RouteSearchDialog::onResultSelect), NULL, this); mButtonSizer = new wxBoxSizer(wxVERTICAL); mButtonSizer->Add(mAdd, 0, wxBOTTOM, 5); mButtonSizer->Add(mDelete); mListSizer = new wxBoxSizer(wxHORIZONTAL); mListSizer->Add(mPoints, 1, wxEXPAND | wxRIGHT, 5); mListSizer->Add(mButtonSizer); mSizer = new wxBoxSizer(wxVERTICAL); mSizer->Add(mListSizer, 1, wxEXPAND | wxALL, 5); mSizer->Add(new wxStaticLine(this, wxHORIZONTAL), 0, wxEXPAND | wxRIGHT | wxLEFT | wxBOTTOM, 5); mSizer->Add(mMaxSpeed, 0, wxEXPAND | wxRIGHT | wxLEFT | wxBOTTOM, 5); mSizer->Add(mAvgSpeed, 0, wxEXPAND | wxRIGHT | wxLEFT | wxBOTTOM, 5); mSizer->Add(mLenght, 0, wxEXPAND | wxRIGHT | wxLEFT | wxBOTTOM, 5); mSizer->Add(mSearch, 0, wxEXPAND | wxRIGHT | wxLEFT | wxBOTTOM, 5); mSizer->Add(mResults, 1, wxEXPAND | wxRIGHT | wxLEFT | wxBOTTOM, 5); Connect(wxEVT_ENTER_WINDOW, wxMouseEventHandler(RouteSearchDialog::onEnterWindow), NULL, this); mDelete->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(RouteSearchDialog::onDeleteClick), NULL, this); SetSizer(mSizer); }
/* * GraphicsImageCanvas. This will have the image painted on it.wxSize(width, height) */ GraphicsImageCanvas::GraphicsImageCanvas (wxWindow* owner) : wxPanel (owner) { width = 5; height = 5; length = (width * height); imageData = new float[length]; image = new wxBitmap (width, height, 32); fullscreen = (wxFrame*) NULL; for (int i = 0; i < length; i++) { imageData[i] = 0; } SetBackgroundStyle (wxBG_STYLE_CUSTOM); Connect (wxEVT_PAINT, wxPaintEventHandler (GraphicsImageCanvas::OnPaint)); Connect (wxEVT_LEFT_DCLICK, wxMouseEventHandler (GraphicsImageCanvas::OnDoubleClick)); }
CMakeHelpTabBase::~CMakeHelpTabBase() { m_staticTextVersion->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CMakeHelpTabBase::OnUpdateUi), NULL, this); m_staticTextVersionValue->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CMakeHelpTabBase::OnUpdateUi), NULL, this); m_buttonReload->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CMakeHelpTabBase::OnReload), NULL, this); m_buttonReload->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CMakeHelpTabBase::OnUpdateUi), NULL, this); m_radioBoxTopic->Disconnect(wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler(CMakeHelpTabBase::OnChangeTopic), NULL, this); m_radioBoxTopic->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CMakeHelpTabBase::OnUpdateUi), NULL, this); m_splitter->Disconnect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(CMakeHelpTabBase::OnRightClick), NULL, this); m_searchCtrlFilter->Disconnect(wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, wxCommandEventHandler(CMakeHelpTabBase::OnSearch), NULL, this); m_searchCtrlFilter->Disconnect(wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, wxCommandEventHandler(CMakeHelpTabBase::OnSearchCancel), NULL, this); m_searchCtrlFilter->Disconnect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(CMakeHelpTabBase::OnSearch), NULL, this); m_searchCtrlFilter->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CMakeHelpTabBase::OnUpdateUi), NULL, this); m_listBoxList->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(CMakeHelpTabBase::OnSelect), NULL, this); m_listBoxList->Disconnect(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler(CMakeHelpTabBase::OnInsert), NULL, this); m_listBoxList->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CMakeHelpTabBase::OnUpdateUi), NULL, this); m_htmlWinText->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CMakeHelpTabBase::OnUpdateUi), NULL, this); }
void ChatPanel::Init(const wxString& panelname) { m_chatpanelname = panelname; //Clear some controls pointer that can be used in ReadSettings m_say_text = nullptr; m_chatlog_text = nullptr; //Read settings ReadSettings(); CreateControls(); SetLogFile(panelname); GetAui().manager->AddPane(this, wxLEFT, _T("chatpanel-channel-") + panelname); m_chatlog_text->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(ChatPanel::OnMouseDown), 0, this); SUBSCRIBE_GLOBAL_EVENT(GlobalEventManager::OnLogin, ChatPanel::OnLogin); SUBSCRIBE_GLOBAL_EVENT(GlobalEventManager::ApplicationSettingsChangedEvent, ChatPanel::OnSettingsChanged); }
VisualEditor::VisualEditor(wxWindow *parent) : wxScrolledWindow(parent,-1,wxDefaultPosition,wxDefaultSize,wxSUNKEN_BORDER), m_stopSelectedEvent( false ), m_stopModifiedEvent( false ) { AppData()->AddHandler( this->GetEventHandler() ); #ifdef __WXMSW__ SetOwnBackgroundColour(wxColour(150,150,150)); #else SetOwnBackgroundColour(wxColour(192,192,192)); #endif SetScrollRate(5, 5); m_back = new DesignerWindow( this, wxID_ANY, wxPoint(10,10) ); m_back->GetEventHandler()->Connect( wxID_ANY, wxEVT_LEFT_DOWN, wxMouseEventHandler( VisualEditor::OnClickBackPanel ), NULL, this ); }
OpenWindowsPanelBase::OpenWindowsPanelBase(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); wxCrafterKq0OgDInitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(mainSizer); m_toolbarTabs = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTB_FLAT); m_toolbarTabs->SetToolBitmapSize(wxSize(16,16)); mainSizer->Add(m_toolbarTabs, 0, wxEXPAND, 0); m_toolbarTabs->AddTool(XRCID("TabsSortTool"), wxT(""), wxXmlResource::Get()->LoadBitmap(wxT("sort")), wxNullBitmap, wxITEM_CHECK, _("If checked, sort alphabetically. Otherwise display in the same order as the editors."), wxT(""), NULL); m_toolbarTabs->Realize(); wxArrayString m_fileListArr; m_fileList = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_fileListArr, wxLB_EXTENDED|wxWANTS_CHARS); mainSizer->Add(m_fileList, 1, wxALL|wxEXPAND, 0); SetSizeHints(500,300); if ( GetSizer() ) { GetSizer()->Fit(this); } Centre(wxBOTH); // Connect events this->Connect(XRCID("TabsSortTool"), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(OpenWindowsPanelBase::OnSortItems), NULL, this); this->Connect(XRCID("TabsSortTool"), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(OpenWindowsPanelBase::OnSortItemsUpdateUI), NULL, this); m_fileList->Connect(wxEVT_CHAR, wxKeyEventHandler(OpenWindowsPanelBase::OnChar), NULL, this); m_fileList->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(OpenWindowsPanelBase::OnKeyDown), NULL, this); m_fileList->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(OpenWindowsPanelBase::OnItemSelected), NULL, this); m_fileList->Connect(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler(OpenWindowsPanelBase::OnItemDClicked), NULL, this); m_fileList->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(OpenWindowsPanelBase::OnRightDown), NULL, this); }
MainFrameBase::~MainFrameBase() { // Disconnect Events this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainFrameBase::Closed ) ); CalendarCtrl->Disconnect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( MainFrameBase::CalendarCtrlChanged ), NULL, this ); ShowChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( MainFrameBase::ShowChanged ), NULL, this ); FromDatePicker->Disconnect( wxEVT_DATE_CHANGED, wxDateEventHandler( MainFrameBase::FromDateChanged ), NULL, this ); ToDatePicker->Disconnect( wxEVT_DATE_CHANGED, wxDateEventHandler( MainFrameBase::ToDateChanged ), NULL, this ); CategoriesText->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainFrameBase::QueryChanged ), NULL, this ); SearchText->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainFrameBase::QueryChanged ), NULL, this ); EventsList->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( MainFrameBase::ListDClick ), NULL, this ); EventsList->Disconnect( wxEVT_COMMAND_LIST_COL_CLICK, wxListEventHandler( MainFrameBase::ColumnClicked ), NULL, this ); EventsList->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( MainFrameBase::EventsDeselected ), NULL, this ); EventsList->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( MainFrameBase::EventsSelected ), NULL, this ); EventsList->Disconnect( wxEVT_COMMAND_LIST_KEY_DOWN, wxListEventHandler( MainFrameBase::DeleteKeyDown ), NULL, this ); this->Disconnect( wxID_NEW, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrameBase::NewClicked ) ); this->Disconnect( wxID_DELETE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrameBase::DeleteClicked ) ); this->Disconnect( wxID_PROPERTIES, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrameBase::EditClicked ) ); this->Disconnect( wxID_EXIT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrameBase::QuitClicked ) ); }
/** MemoryGrid * * Constructor */ MemoryGrid::MemoryGrid(wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, long style) : wxGrid(parent, id, pos, size, style), timer(this, MemoryToolTipTimer) { last_address = 0x3000; highlight = true; SetUseNativeColLabels(); SetDefaultRowSize(12); Connect(MemoryMenuBreakpoint, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MemoryGrid::OnBreakpoint)); Connect(MemoryMenuTemppoint, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MemoryGrid::OnTemppoint)); Connect(MemoryMenuWatchpoint, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MemoryGrid::OnWatchpoint)); Connect(MemoryMenuBlackbox, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MemoryGrid::OnBlackbox)); Connect(MemoryMenuAdvancedpoint, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MemoryGrid::OnAdvancedpoint)); Connect(MemoryMenuPCHere, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MemoryGrid::OnPCHere)); Connect(wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler(MemoryGrid::OnContextMenu), NULL, this); Connect(wxEVT_GRID_CELL_CHANGED, wxGridEventHandler(MemoryGrid::OnGridChanged), NULL, this); Connect(wxEVT_ACTIVATE, wxActivateEventHandler(MemoryGrid::OnActivate), NULL, this); GetGridWindow()->Connect(wxEVT_MOTION, wxMouseEventHandler(MemoryGrid::OnMotion), NULL, this); Connect(MemoryToolTipTimer, wxEVT_TIMER, wxTimerEventHandler(MemoryGrid::OnShowToolTip), NULL, this); }
BubbleParam::BubbleParam( wxWindow* parent, wxWindowID id, const wxString& dataType, const wxPoint& pos, const wxSize& size, const wxString& name): BubbleButton(parent, id, pos, size, name, true), dataType(dataType), firstBlock(NULL) { Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler(BubbleParam::onParamLeftDown), NULL, this ); }
SFMMainfram::~SFMMainfram() { // Disconnect Events this->Disconnect( wxEVT_CHAR, wxKeyEventHandler( SFMMainfram::framCharPressed ) ); this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( SFMMainfram::framKeyPressed ) ); this->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( SFMMainfram::framMouseClicked ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SFMMainfram::OpenPlyFile ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SFMMainfram::OpenCamCenter ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SFMMainfram::openOBJ ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SFMMainfram::ExitFunc ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SFMMainfram::toggleTriangles ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SFMMainfram::toggleNormals ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SFMMainfram::togglePointCloud ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SFMMainfram::toggleAxis ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SFMMainfram::increasePtSize ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SFMMainfram::decreasePtSize ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SFMMainfram::increaseTriSize ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SFMMainfram::decreaseTriSize ) ); }
GNC::GUI::StatusBarProgreso::StatusBarProgreso( wxWindow* pPadre, wxWindow* pPadrePanel, bool listenMessages, wxWindowID id, long style) : wxStatusBar(pPadre, id, style), m_dirty (true) { m_pPanelTareas = new PanelTareasBase(pPadrePanel); m_pPanelTareas->Show(false); SetFieldsCount(Field_Max); //uno para el texto y el otro para lo q yo quiera static const int widths[Field_Max] = { -1, 32, 250, 150}; SetStatusWidths(Field_Max, widths); //mensaje tarea m_pMensajeTarea = new wxStaticText(this,wxID_ANY,wxT(""), wxDefaultPosition, wxSize(250, -1), wxST_NO_AUTORESIZE); m_pMensajeTarea->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler( StatusBarProgreso::OnMostrarOcultarDialogoProgreso),NULL,this); //botoncico de progreso m_pIconoProgreso = new wxAnimationCtrl(this,wxID_ANY,GinkgoResourcesManager::ProgressBar::GetAniLoading()); m_pIconoProgreso->Hide(); m_pProgresoTarea = new wxGauge(this, wxID_ANY, 100); m_pProgresoTarea->Hide(); m_pIconoParado = new wxStaticBitmap(this,wxID_ANY,GinkgoResourcesManager::ProgressBar::GetIcoStopped()); m_pIconoParado->Show(true); //escuchamos el evento de mensajes if (listenMessages) { GNC::GCS::Events::EventoMensajes evt(NULL); GNC::GCS::ControladorEventos::Instance()->Registrar(this,evt); } wxSizeEvent event(pPadre->GetSize()); OnSize(event); //onsize this->Connect(wxEVT_IDLE, wxIdleEventHandler(StatusBarProgreso::OnIdle), NULL, this); this->Connect(wxEVT_SIZE,wxSizeEventHandler(StatusBarProgreso::OnSize),NULL,this); this->GetParent()->Connect(wxEVT_MOVE,wxMoveEventHandler(StatusBarProgreso::OnMove),NULL,this); this->Connect(wxEVT_MENSAJES_USUARIO_ASYNC, EventoMensajesUsuarioAsyncHandler(StatusBarProgreso::OnMensajeUsuario), NULL, this); }
SIM_PLOT_FRAME_BASE::~SIM_PLOT_FRAME_BASE() { // Disconnect Events this->Disconnect( wxID_NEW, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuNewPlot ) ); this->Disconnect( wxID_OPEN, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuOpenWorkbook ) ); this->Disconnect( wxID_SAVE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveWorkbook ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveImage ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveCsv ) ); this->Disconnect( wxID_CLOSE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuExit ) ); this->Disconnect( wxID_ZOOM_IN, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuZoomIn ) ); this->Disconnect( wxID_ZOOM_OUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuZoomOut ) ); this->Disconnect( wxID_ZOOM_FIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuZoomFit ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuShowGrid ) ); this->Disconnect( wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( SIM_PLOT_FRAME_BASE::menuShowGridUpdate ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuShowLegend ) ); this->Disconnect( wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( SIM_PLOT_FRAME_BASE::menuShowLegendUpdate ) ); m_plotNotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( SIM_PLOT_FRAME_BASE::onPlotChanged ), NULL, this ); m_plotNotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler( SIM_PLOT_FRAME_BASE::onPlotClose ), NULL, this ); m_signals->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::onSignalDblClick ), NULL, this ); m_signals->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( SIM_PLOT_FRAME_BASE::onSignalRClick ), NULL, this ); }
PCB_LAYER_WIDGET::PCB_LAYER_WIDGET( PCB_EDIT_FRAME* aParent, wxWindow* aFocusOwner, int aPointSize ) : LAYER_WIDGET( aParent, aFocusOwner, aPointSize ), myframe( aParent ) { ReFillRender(); // Update default tabs labels for GerbView SetLayersManagerTabsText(); //-----<Popup menu>------------------------------------------------- // handle the popup menu over the layer window. m_LayerScrolledWindow->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( PCB_LAYER_WIDGET::onRightDownLayers ), NULL, this ); // since Popupmenu() calls this->ProcessEvent() we must call this->Connect() // and not m_LayerScrolledWindow->Connect() Connect( ID_SHOW_ALL_COPPERS, ID_SHOW_NO_COPPERS_BUT_ACTIVE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( PCB_LAYER_WIDGET::onPopupSelection ), NULL, this ); // install the right click handler into each control at end of ReFill() // using installRightLayerClickHandler }
BaseExploreFrame::~BaseExploreFrame() { // Disconnect Events this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BaseExploreFrame::OnWindowClose ) ); this->Disconnect( wxID_OPEN, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( BaseExploreFrame::OnOpenClicked ) ); this->Disconnect( wxID_SAVE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( BaseExploreFrame::OnSaveClicked ) ); this->Disconnect( wxID_SAVEAS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( BaseExploreFrame::OnSaveAsClicked ) ); this->Disconnect( ID_OPEN_BASE_WAD, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( BaseExploreFrame::OnSwitchBaseWadClicked ) ); this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( BaseExploreFrame::OnQuitClicked ) ); this->Disconnect( ID_EXTRACT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( BaseExploreFrame::OnExtractClicked ) ); this->Disconnect( ID_REPLACE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( BaseExploreFrame::OnReplaceClicked ) ); this->Disconnect( wxID_ADD, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( BaseExploreFrame::OnAddClicked ) ); this->Disconnect( wxID_DELETE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( BaseExploreFrame::OnDeleteClicked ) ); this->Disconnect( wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( BaseExploreFrame::OnAboutClicked ) ); m_searchCtrl->Disconnect( wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, wxCommandEventHandler( BaseExploreFrame::OnSearchCtrlButton ), NULL, this ); m_searchCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BaseExploreFrame::OnSearchCtrlText ), NULL, this ); m_searchCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( BaseExploreFrame::OnSearchCtrlEnter ), NULL, this ); this->Disconnect( wxID_ANY, wxEVT_TIMER, wxTimerEventHandler( BaseExploreFrame::OnSearchTimer ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( BaseExploreFrame::OnFileListSelectionChanged ) ); m_fileListCtrl->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( BaseExploreFrame::OnFileListDoubleClick ), NULL, this ); }
void SettingsGuidingCalibrateDlg::OnPickStarButtonClick(wxCommandEvent& WXUNUSED(event)) { m_guide_timer.Stop(); m_elapsed_time->SetValue(wxT("0")); m_camera_angle->SetValue(wxT("0.0")); m_imageScale->SetValue(wxT("1.0")); if(wxCamera* camera = wxF()->cam()) { camera->Connect(camera->GetId(),wxEVT_LEFT_DOWN,wxMouseEventHandler(SettingsGuidingCalibrateDlg::OnvideoPanelLeftDown),0,this); #ifdef _WXMSW_ // make a 32x32 cross hair cursor with centereed hot spot wxImage cimage(cross_hair_32x32_xpm); cimage.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X,cimage.GetWidth()/2); cimage.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y,cimage.GetHeight()/2); camera->wxWindow::SetCursor(wxCursor(cimage)); #else // using stock cursor on Linux, as the MSW code makes a black crosshair and vice versa!! camera->wxWindow::SetCursor(wxCursor(wxCURSOR_BULLSEYE)); #endif } }
GERBER_LAYER_WIDGET::GERBER_LAYER_WIDGET( GERBVIEW_FRAME* aParent, wxWindow* aFocusOwner ) : LAYER_WIDGET( aParent, aFocusOwner ), myframe( aParent ) { m_alwaysShowActiveLayer = false; ReFillRender(); // Update default tabs labels for GerbView SetLayersManagerTabsText( ); //-----<Popup menu>------------------------------------------------- // handle the popup menu over the layer window. m_LayerScrolledWindow->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( GERBER_LAYER_WIDGET::onRightDownLayers ), NULL, this ); // since Popupmenu() calls this->ProcessEvent() we must call this->Connect() // and not m_LayerScrolledWindow->Connect() Connect( ID_LAYER_MANAGER_START, ID_LAYER_MANAGER_END, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GERBER_LAYER_WIDGET::onPopupSelection ), NULL, this ); }
PCB_LAYER_WIDGET::PCB_LAYER_WIDGET( PCB_BASE_FRAME* aParent, wxWindow* aFocusOwner, bool aFpEditorMode ) : LAYER_WIDGET( aParent, aFocusOwner ), myframe( aParent ) { m_alwaysShowActiveCopperLayer = false; m_fp_editor_mode = aFpEditorMode; // Update default tabs labels SetLayersManagerTabsText(); //-----<Popup menu>------------------------------------------------- // handle the popup menu over the layer window. m_LayerScrolledWindow->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( PCB_LAYER_WIDGET::onRightDownLayers ), NULL, this ); // since Popupmenu() calls this->ProcessEvent() we must call this->Connect() // and not m_LayerScrolledWindow->Connect() Connect( ID_SHOW_ALL_COPPER_LAYERS, ID_LAST_VALUE - 1, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( PCB_LAYER_WIDGET::onPopupSelection ), NULL, this ); }
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 ); }
void TrackPropDlg::OnDeleteLink( wxCommandEvent& event ) { wxHyperlinkListNode* nodeToDelete = NULL; wxString findurl = m_pEditedLink->GetURL(); wxString findlabel = m_pEditedLink->GetLabel(); m_scrolledWindowLinks->DestroyChildren(); int NbrOfLinks = m_pRoute->m_HyperlinkList->GetCount(); HyperlinkList *hyperlinklist = m_pRoute->m_HyperlinkList; // int len = 0; if( NbrOfLinks > 0 ) { wxHyperlinkListNode *linknode = hyperlinklist->GetFirst(); while( linknode ) { Hyperlink *link = linknode->GetData(); wxString Link = link->Link; wxString Descr = link->DescrText; if( Link == findurl && ( Descr == findlabel || ( Link == findlabel && Descr == wxEmptyString ) ) ) nodeToDelete = linknode; else { wxHyperlinkCtrl* ctrl = new wxHyperlinkCtrl( m_scrolledWindowLinks, wxID_ANY, Descr, Link, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); ctrl->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( TrackPropDlg::OnHyperLinkClick ), NULL, this ); ctrl->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( TrackPropDlg::m_hyperlinkContextMenu ), NULL, this ); bSizerLinks->Add( ctrl, 0, wxALL, 5 ); } linknode = linknode->GetNext(); } } if( nodeToDelete ) hyperlinklist->DeleteNode( nodeToDelete ); m_scrolledWindowLinks->InvalidateBestSize(); m_scrolledWindowLinks->Layout(); sbSizerLinks->Layout(); event.Skip(); }
ChatPanel::ChatPanel( wxWindow* parent, const User& user, wxImageList* imaglist ): wxPanel( parent, -1 ), m_show_nick_list( false ), m_nicklist(0), m_chat_tabs(( SLNotebook* )parent ), m_channel( 0 ), m_server( 0 ), m_user( &user ), m_battle( 0 ), m_type( CPT_User ), m_popup_menu( 0 ), m_chat_log(sett().GetDefaultServer(), user.GetNick()), m_icon_index( 3 ), m_imagelist( imaglist ), m_disable_append( false ), m_topic_set( false ) { GetAui().manager->AddPane( this, wxLEFT, _T("chatpanel-pm-") + user.GetNick() ); CreateControls( ); LoadLastLines(); m_chatlog_text->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( ChatPanel::OnMouseDown ), 0, this ); user.uidata.panel = this; }
TeacherMainFrame::~TeacherMainFrame() { // Disconnect Events m_WinRateChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( TeacherMainFrame::OnWinRate ), NULL, this ); m_PositionChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( TeacherMainFrame::OnPosition ), NULL, this ); m_BetSizeChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( TeacherMainFrame::OnPotRatio ), NULL, this ); m_PlayersChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( TeacherMainFrame::OnPlayers ), NULL, this ); m_DangerChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( TeacherMainFrame::OnPlayersStyle ), NULL, this ); m_BotAverageStyleChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( TeacherMainFrame::OnStyleChanges ), NULL, this ); m_BotStyleChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( TeacherMainFrame::OnBotStyle ), NULL, this ); m_BostStackSizeChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( TeacherMainFrame::OnBotStackSize ), NULL, this ); m_ActionRadio->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( TeacherMainFrame::OnAction ), NULL, this ); m_NextButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TeacherMainFrame::OnNext ), NULL, this ); m_SaveButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TeacherMainFrame::OnSave ), NULL, this ); m_LoadButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TeacherMainFrame::OnLoad ), NULL, this ); m_TeachButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TeacherMainFrame::OnTeach ), NULL, this ); m_TestButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TeacherMainFrame::OnTest ), NULL, this ); m_GenerateRange->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TeacherMainFrame::OnRange ), NULL, this ); m_ReadButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TeacherMainFrame::OnRead ), NULL, this ); m_WriteButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TeacherMainFrame::OnWrite ), NULL, this ); m_ExecuteButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TeacherMainFrame::OnExecute ), NULL, this ); m_Grid->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( TeacherMainFrame::OnKeyDown ), NULL, this ); m_Grid->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( TeacherMainFrame::OnGridScroll ), NULL, this ); }
DIALOG_DRC_CONTROL::~DIALOG_DRC_CONTROL() { m_config->Write( DrcRefillZonesKey, m_cbRefillZones->GetValue() ); m_config->Write( DrcTrackToZoneTestKey, m_cbReportTracksToZonesErrors->GetValue() ); m_config->Write( DrcTestFootprintsKey, m_cbTestFootprints->GetValue() ); // Disconnect events m_ClearanceListBox->Disconnect( ID_CLEARANCE_LIST, wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_DRC_CONTROL::OnLeftDClickClearance ), NULL, this ); m_ClearanceListBox->Disconnect( ID_CLEARANCE_LIST, wxEVT_RIGHT_UP, wxMouseEventHandler( DIALOG_DRC_CONTROL::OnRightUpClearance ), NULL, this ); m_UnconnectedListBox->Disconnect( ID_UNCONNECTED_LIST, wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_DRC_CONTROL::OnLeftDClickUnconnected ), NULL, this ); m_UnconnectedListBox->Disconnect( ID_UNCONNECTED_LIST, wxEVT_RIGHT_UP, wxMouseEventHandler( DIALOG_DRC_CONTROL::OnRightUpUnconnected ), NULL, this ); m_FootprintsListBox->Disconnect( ID_FOOTPRINTS_LIST, wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_DRC_CONTROL::OnLeftDClickFootprints ), NULL, this ); m_FootprintsListBox->Disconnect( ID_FOOTPRINTS_LIST, wxEVT_RIGHT_UP, wxMouseEventHandler( DIALOG_DRC_CONTROL::OnRightUpFootprints ), NULL, this ); }
DIALOG_DRC_CONTROL::DIALOG_DRC_CONTROL( DRC* aTester, PCB_EDIT_FRAME* aEditorFrame, wxWindow* aParent ) : DIALOG_DRC_CONTROL_BASE( aParent ), m_trackMinWidth( aEditorFrame, m_TrackMinWidthTitle, m_SetTrackMinWidthCtrl, m_TrackMinWidthUnit, true ), m_viaMinSize( aEditorFrame, m_ViaMinTitle, m_SetViaMinSizeCtrl, m_ViaMinUnit, true ), m_uviaMinSize( aEditorFrame, m_MicroViaMinTitle, m_SetMicroViakMinSizeCtrl, m_MicroViaMinUnit, true ) { m_config = Kiface().KifaceSettings(); m_tester = aTester; m_brdEditor = aEditorFrame; m_currentBoard = m_brdEditor->GetBoard(); m_BrdSettings = m_brdEditor->GetBoard()->GetDesignSettings(); m_BrowseButton->SetBitmap( KiBitmap( folder_xpm ) ); // We use a sdbSizer here to get the order right, which is platform-dependent m_sdbSizer1OK->SetLabel( _( "Run DRC" ) ); m_sdbSizer1Cancel->SetLabel( _( "Close" ) ); m_sizerButtons->Layout(); m_sdbSizer1OK->SetDefault(); InitValues(); // Connect events m_ClearanceListBox->Connect( ID_CLEARANCE_LIST, wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_DRC_CONTROL::OnLeftDClickClearance ), NULL, this ); m_ClearanceListBox->Connect( ID_CLEARANCE_LIST, wxEVT_RIGHT_UP, wxMouseEventHandler( DIALOG_DRC_CONTROL::OnRightUpClearance ), NULL, this ); m_UnconnectedListBox->Connect( ID_UNCONNECTED_LIST, wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_DRC_CONTROL::OnLeftDClickUnconnected ), NULL, this ); m_UnconnectedListBox->Connect( ID_UNCONNECTED_LIST, wxEVT_RIGHT_UP, wxMouseEventHandler( DIALOG_DRC_CONTROL::OnRightUpUnconnected ), NULL, this ); m_FootprintsListBox->Connect( ID_FOOTPRINTS_LIST, wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_DRC_CONTROL::OnLeftDClickFootprints ), NULL, this ); m_FootprintsListBox->Connect( ID_FOOTPRINTS_LIST, wxEVT_RIGHT_UP, wxMouseEventHandler( DIALOG_DRC_CONTROL::OnRightUpFootprints ), NULL, this ); // Now all widgets have the size fixed, call FinishDialogSettings FinishDialogSettings(); }
tabButton::tabButton( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) { this->SetBackgroundColour( NORMAL ); wxBoxSizer* bSizer4; bSizer4 = new wxBoxSizer( wxHORIZONTAL ); bSizer4->Add( 0, 30, 1, wxEXPAND, 5 ); m_labTitle = new wxStaticText( this, wxID_ANY, wxT("Text"), wxDefaultPosition, wxDefaultSize, 0 ); m_labTitle->Wrap( -1 ); m_labTitle->SetForegroundColour( wxColour( 255, 255, 255 ) ); bSizer4->Add( m_labTitle, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); bSizer4->Add( 0, 0, 1, wxEXPAND, 5 ); Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( tabButton::onMouseDown ) ); Connect( wxEVT_MOTION, wxMouseEventHandler( tabButton::onMouseEvent )); m_labTitle->Connect( wxEVT_MOTION, wxMouseEventHandler( tabButton::onMouseEvent ), nullptr, this ); m_labTitle->Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( tabButton::onMouseOver ), nullptr, this ); m_labTitle->Connect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( tabButton::onMouseOut ), nullptr, this ); m_labTitle->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( tabButton::onMouseDown ), nullptr, this ); parent->Connect( wxEVT_MOTION, wxMouseEventHandler( tabButton::onMouseEvent ), nullptr, this); this->SetSizer( bSizer4 ); this->Layout(); m_iId = 0; m_bSelected = false; }
/***************************************************** ** ** BasicWidget --- Constructor ** ******************************************************/ BasicWidget::BasicWidget( wxWindow *parent, ChartProperties *chartprops, wxWindowID id, const wxPoint& pos, const wxSize& size ) : wxScrolledWindow( parent, id, pos, size ), chartprops( chartprops ) { hborder = 10; vborder = 10; exportMode = false; dragMode = false; painter = 0; scrollx = scrolly = 1; SetScrollRate( scrollx, scrolly ); Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( BasicWidget::OnMouseWheelEvent )); Connect( wxEVT_MOTION, wxMouseEventHandler( BasicWidget::OnMouseMotion )); Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( BasicWidget::OnMouseRightDown )); Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( BasicWidget::OnMouseLeftDown )); Connect( wxEVT_LEFT_UP, wxMouseEventHandler( BasicWidget::OnMouseLeftUp )); Connect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( BasicWidget::OnMouseLeave )); Connect( wxEVT_PAINT, wxPaintEventHandler( BasicWidget::OnPaint )); Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( BasicWidget::OnKeyDown )); }
devFrame::devFrame( 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 ); devStatusBar = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY ); wxBoxSizer* devFrameSizer; devFrameSizer = new wxBoxSizer( wxVERTICAL ); m_panel3 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* bSizer4; bSizer4 = new wxBoxSizer( wxHORIZONTAL ); m_panel6 = new wxPanel( m_panel3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* bSizer6; bSizer6 = new wxBoxSizer( wxVERTICAL ); devTree = new wxTreeCtrl( m_panel6, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE ); devTree->Enable( false ); bSizer6->Add( devTree, 1, wxEXPAND|wxALIGN_RIGHT, 5 ); m_panel4 = new wxPanel( m_panel6, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* bSizer5; bSizer5 = new wxBoxSizer( wxHORIZONTAL ); m_addRemoteButton = new wxButton( m_panel4, wxID_ANY, wxT("Add Remote"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer5->Add( m_addRemoteButton, 1, wxALL, 5 ); m_useSelectedButton = new wxButton( m_panel4, wxID_ANY, wxT("Use Selected"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer5->Add( m_useSelectedButton, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_panel4->SetSizer( bSizer5 ); m_panel4->Layout(); bSizer5->Fit( m_panel4 ); bSizer6->Add( m_panel4, 0, wxEXPAND, 5 ); m_panel6->SetSizer( bSizer6 ); m_panel6->Layout(); bSizer6->Fit( m_panel6 ); bSizer4->Add( m_panel6, 1, wxEXPAND | wxALL, 5 ); m_panel61 = new wxPanel( m_panel3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* bSizer7; bSizer7 = new wxBoxSizer( wxVERTICAL ); m_staticText1 = new wxStaticText( m_panel61, wxID_ANY, wxT("SoapySDR Device Options"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText1->Wrap( -1 ); bSizer7->Add( m_staticText1, 0, wxALL, 5 ); m_propertyGrid = new wxPropertyGrid(m_panel61, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxPG_DEFAULT_STYLE); bSizer7->Add( m_propertyGrid, 1, wxALL|wxEXPAND, 5 ); m_panel61->SetSizer( bSizer7 ); m_panel61->Layout(); bSizer7->Fit( m_panel61 ); bSizer4->Add( m_panel61, 1, wxEXPAND | wxALL, 5 ); m_panel3->SetSizer( bSizer4 ); m_panel3->Layout(); bSizer4->Fit( m_panel3 ); devFrameSizer->Add( m_panel3, 1, wxEXPAND | wxALL, 5 ); this->SetSizer( devFrameSizer ); this->Layout(); m_deviceTimer.SetOwner( this, wxID_ANY ); this->Centre( wxBOTH ); // Connect Events this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( devFrame::OnClose ) ); devTree->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( devFrame::OnTreeDoubleClick ), NULL, this ); devTree->Connect( wxEVT_COMMAND_TREE_DELETE_ITEM, wxTreeEventHandler( devFrame::OnDeleteItem ), NULL, this ); devTree->Connect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( devFrame::OnSelectionChanged ), NULL, this ); m_addRemoteButton->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( devFrame::OnAddRemote ), NULL, this ); m_useSelectedButton->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( devFrame::OnUseSelected ), NULL, this ); this->Connect( wxID_ANY, wxEVT_TIMER, wxTimerEventHandler( devFrame::OnDeviceTimer ) ); }
ExplorerOutlineGeneratedPanelClass::ExplorerOutlineGeneratedPanelClass( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) { wxBoxSizer* BoxSizer; BoxSizer = new wxBoxSizer( wxVERTICAL ); wxFlexGridSizer* GridSizer; GridSizer = new wxFlexGridSizer( 3, 1, 0, 0 ); GridSizer->AddGrowableCol( 0 ); GridSizer->AddGrowableRow( 2 ); GridSizer->SetFlexibleDirection( wxBOTH ); GridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); wxBoxSizer* TopSizer; TopSizer = new wxBoxSizer( wxHORIZONTAL ); FilterButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); TopSizer->Add( FilterButton, 0, wxALL, 5 ); ParentButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); ParentButton->SetToolTip( wxT("Parent directory") ); ParentButton->SetToolTip( wxT("Parent directory") ); TopSizer->Add( ParentButton, 0, wxALL, 5 ); RefreshButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); TopSizer->Add( RefreshButton, 0, wxALL, 5 ); HelpButton = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW ); TopSizer->Add( HelpButton, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); GridSizer->Add( TopSizer, 1, wxEXPAND, 5 ); wxBoxSizer* DirSizer; DirSizer = new wxBoxSizer( wxVERTICAL ); Directory = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxTE_PROCESS_ENTER ); DirSizer->Add( Directory, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); GridSizer->Add( DirSizer, 1, wxEXPAND, 5 ); wxBoxSizer* FilesPanelSizer; FilesPanelSizer = new wxBoxSizer( wxVERTICAL ); List = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_EDIT_LABELS|wxLC_NO_HEADER|wxLC_REPORT ); FilesPanelSizer->Add( List, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 ); ListLabel = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); ListLabel->Wrap( -1 ); FilesPanelSizer->Add( ListLabel, 0, wxALL|wxEXPAND, 5 ); GridSizer->Add( FilesPanelSizer, 1, wxEXPAND, 5 ); BoxSizer->Add( GridSizer, 1, wxEXPAND, 5 ); this->SetSizer( BoxSizer ); this->Layout(); // Connect Events FilterButton->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( ExplorerOutlineGeneratedPanelClass::OnFilterButtonLeftDown ), NULL, this ); ParentButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ExplorerOutlineGeneratedPanelClass::OnParentButtonClick ), NULL, this ); RefreshButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ExplorerOutlineGeneratedPanelClass::OnRefreshClick ), NULL, this ); HelpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ExplorerOutlineGeneratedPanelClass::OnHelpButton ), NULL, this ); Directory->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( ExplorerOutlineGeneratedPanelClass::OnDirectorySelected ), NULL, this ); Directory->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( ExplorerOutlineGeneratedPanelClass::OnDirectoryEnter ), NULL, this ); List->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( ExplorerOutlineGeneratedPanelClass::OnListKeyDown ), NULL, this ); List->Connect( wxEVT_COMMAND_LIST_END_LABEL_EDIT, wxListEventHandler( ExplorerOutlineGeneratedPanelClass::OnListEndLabelEdit ), NULL, this ); List->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( ExplorerOutlineGeneratedPanelClass::OnListItemActivated ), NULL, this ); List->Connect( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, wxListEventHandler( ExplorerOutlineGeneratedPanelClass::OnListItemRightClick ), NULL, this ); List->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( ExplorerOutlineGeneratedPanelClass::OnListItemSelected ), NULL, this ); List->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( ExplorerOutlineGeneratedPanelClass::OnListRightDown ), NULL, this ); }
ChoiceFrame::ChoiceFrame(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* bSizer1; bSizer1 = new wxBoxSizer(wxVERTICAL); m_staticText28 = new wxStaticText( this, wxID_ANY, wxT("Select a directory with an Image \ndirectory and a Values.xml"), wxDefaultPosition, wxDefaultSize, 0); m_staticText28->Wrap(-1); bSizer1->Add(m_staticText28, 0, wxALL, 5); dirPicker = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, wxT("Select a folder"), wxDefaultPosition, wxSize(-1, -1), wxDIRP_DEFAULT_STYLE); bSizer1->Add(dirPicker, 0, wxALL | wxEXPAND, 5); wxBoxSizer* bSizer41; bSizer41 = new wxBoxSizer(wxVERTICAL); bSizer1->Add(bSizer41, 1, wxEXPAND, 5); m_staticline41 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL); bSizer1->Add(m_staticline41, 0, wxEXPAND | wxALL, 5); wxBoxSizer* bSizer11; bSizer11 = new wxBoxSizer(wxVERTICAL); MessageField = new wxStaticText( this, wxID_ANY, wxT("Choose wheter you want to load\nan existing .xml to add and edit it,\nor you want to start over."), wxDefaultPosition, wxDefaultSize, 0); MessageField->Wrap(-1); bSizer11->Add(MessageField, 1, wxEXPAND | wxALL, 5); bSizer1->Add(bSizer11, 0, wxEXPAND, 5); m_staticline4 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL); bSizer1->Add(m_staticline4, 0, wxEXPAND | wxALL, 5); wxBoxSizer* bSizer18; bSizer18 = new wxBoxSizer(wxVERTICAL); CreateNewXMLradioBtn = new wxRadioButton(this, wxID_ANY, wxT("Create new XML"), wxDefaultPosition, wxDefaultSize, 0); bSizer18->Add(CreateNewXMLradioBtn, 0, wxALL, 5); EditExistingXMLradioBtn = new wxRadioButton(this, wxID_ANY, wxT("Edit existing XML"), wxDefaultPosition, wxDefaultSize, 0); bSizer18->Add(EditExistingXMLradioBtn, 0, wxALL, 5); AddToExistingXMLradioBtn = new wxRadioButton(this, wxID_ANY, wxT("Add to existing XML"), wxDefaultPosition, wxDefaultSize, 0); bSizer18->Add(AddToExistingXMLradioBtn, 0, wxALL, 5); bSizer1->Add(bSizer18, 0, wxEXPAND, 5); m_staticline43 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL); bSizer1->Add(m_staticline43, 0, wxEXPAND | wxALL, 5); wxBoxSizer* bSizer12; bSizer12 = new wxBoxSizer(wxHORIZONTAL); ExitButton = new wxButton(this, wxID_ANY, wxT("Exit"), wxDefaultPosition, wxSize(100, -1), 0); bSizer12->Add(ExitButton, 0, wxALL, 5); OKButton = new wxButton(this, wxID_ANY, wxT("OK"), wxDefaultPosition, wxSize(100, -1), 0); bSizer12->Add(OKButton, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); bSizer1->Add(bSizer12, 0, wxEXPAND, 5); this->SetSizer(bSizer1); this->Layout(); bSizer1->Fit(this); // Connect Events CreateNewXMLradioBtn->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler( ChoiceFrame::OnXMLOption ), NULL, this); EditExistingXMLradioBtn->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler( ChoiceFrame::OnXMLOption ), NULL, this); AddToExistingXMLradioBtn->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler( ChoiceFrame::OnXMLOption ), NULL, this); ExitButton->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler( ChoiceFrame::OnExit ), NULL, this); OKButton->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler( ChoiceFrame::OnOK ), NULL, this); }
// // Constructor // ToolManager::ToolManager( AudacityProject *parent ) : wxEvtHandler() { wxPoint pt[ 3 ]; #if defined(__WXMAC__) // Save original transition mTransition = wxSystemOptions::GetOptionInt( wxMAC_WINDOW_PLAIN_TRANSITION ); #endif // Initialize everything mParent = parent; mLastPos.x = mBarPos.x = -1; mLastPos.y = mBarPos.y = -1; mDragWindow = NULL; mDragDock = NULL; mDragBar = NULL; // Create the down arrow pt[ 0 ].x = 0; pt[ 0 ].y = 0; pt[ 1 ].x = 9; pt[ 1 ].y = 9; pt[ 2 ].x = 18; pt[ 2 ].y = 0; // Create the shaped region mDown = new wxRegion( 3, &pt[0] ); // Create the down arrow pt[ 0 ].x = 9; pt[ 0 ].y = 0; pt[ 1 ].x = 0; pt[ 1 ].y = 9; pt[ 2 ].x = 9; pt[ 2 ].y = 18; // Create the shaped region mLeft = new wxRegion( 3, &pt[0] ); // Create the indicator frame mIndicator = new wxFrame( NULL, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 32, 32 ), wxFRAME_TOOL_WINDOW | wxFRAME_SHAPED | wxNO_BORDER | wxFRAME_NO_TASKBAR | wxSTAY_ON_TOP ); // Hook the creation event...only needed on GTK, but doesn't hurt for all mIndicator->Connect( wxEVT_CREATE, wxWindowCreateEventHandler( ToolManager::OnIndicatorCreate ), NULL, this ); // Hook the paint event...needed for all mIndicator->Connect( wxEVT_PAINT, wxPaintEventHandler( ToolManager::OnIndicatorPaint ), NULL, this ); // It's a little shy mIndicator->Hide(); // Hook the parents mouse events...using the parent helps greatly // under GTK mParent->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( ToolManager::OnMouse ), NULL, this ); mParent->Connect( wxEVT_MOTION, wxMouseEventHandler( ToolManager::OnMouse ), NULL, this ); mParent->Connect( wxEVT_MOUSE_CAPTURE_LOST, wxMouseCaptureLostEventHandler( ToolManager::OnCaptureLost ), NULL, this ); // Create the top and bottom docks mTopDock = new ToolDock( this, mParent, TopDockID ); mBotDock = new ToolDock( this, mParent, BotDockID ); // Create all of the toolbars mBars[ ToolsBarID ] = new ToolsToolBar(); mBars[ TransportBarID ] = new ControlToolBar(); mBars[ MeterBarID ] = new MeterToolBar(); mBars[ EditBarID ] = new EditToolBar(); mBars[ MixerBarID ] = new MixerToolBar(); mBars[ TranscriptionBarID ] = new TranscriptionToolBar(); mBars[ SelectionBarID ] = new SelectionBar(); mBars[ DeviceBarID ] = new DeviceToolBar(); // We own the timer mTimer.SetOwner( this ); // Process the toolbar config settings ReadConfig(); }