base_text_f::~base_text_f() { // Disconnect Events text_ed->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( base_text_f::text_edFocus ), NULL, this ); amount_ed->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( base_text_f::amount_edFocus ), NULL, this ); m_button1->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_button2->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_button3->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_button5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_button7->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_button0->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_button11->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); bs_btn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::bs_btnClick ), NULL, this ); m_buttonq->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttonw->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttonr->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttont->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttony->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttonu->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttoni->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttono->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttonp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_button12->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_button13->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); enter_btn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::enter_btnClick ), NULL, this ); m_buttona->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttons->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttond->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttonf->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttong->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttonh->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttonj->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttonk->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttonl->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_button14->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_button15->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_button16->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); shift1_btn->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( base_text_f::shift_btnClick ), NULL, this ); m_buttonz->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttonx->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttonc->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttonv->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttonb->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttonn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_buttonm->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_button17->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_button18->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); m_button19->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::btnClick ), NULL, this ); shift2_btn->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( base_text_f::shift_btnClick ), NULL, this ); kbd_btn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::kbd_btnClick ), NULL, this ); space_btn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::space_btnClick ), NULL, this ); ok_btn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::ok_btnClick ), NULL, this ); cancel_btn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( base_text_f::cancel_btnClick ), NULL, this ); }
void wxRibbonPanel::OnChildKillFocus(wxFocusEvent& evt) { if(m_child_with_focus == NULL) return; // Should never happen, but a check can't hurt m_child_with_focus->Disconnect(wxEVT_KILL_FOCUS, wxFocusEventHandler(wxRibbonPanel::OnChildKillFocus), NULL, this); m_child_with_focus = NULL; wxWindow *receiver = evt.GetWindow(); if(receiver == this || IsAncestorOf(this, receiver)) { m_child_with_focus = receiver; receiver->Connect(wxEVT_KILL_FOCUS, wxFocusEventHandler(wxRibbonPanel::OnChildKillFocus), NULL, this); evt.Skip(); } else if(receiver == NULL || receiver != m_expanded_dummy) { HideExpanded(); // Do not skip event, as the panel has been de-expanded, causing the // child with focus to be reparented (and hidden). If the event // continues propagation then bad things happen. } else { evt.Skip(); } }
DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::~DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE() { // Disconnect Events this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnUpdateUI ) ); m_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnSizeGrid ), NULL, this ); m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnAddField ), NULL, this ); m_bpMoveUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnMoveUp ), NULL, this ); m_bpMoveDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnMoveDown ), NULL, this ); m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnDeleteField ), NULL, this ); m_SymbolNameCtrl->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnSymbolNameKillFocus ), NULL, this ); m_SymbolNameCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnSymbolNameText ), NULL, this ); m_aliasListBox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnSelectAlias ), NULL, this ); m_addAliasButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnAddAlias ), NULL, this ); m_deleteAliasButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnDeleteAlias ), NULL, this ); m_aliasGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnSizeAliasGrid ), NULL, this ); m_AliasNameCtrl->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnAliasNameKillFocus ), NULL, this ); m_AliasNameCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnAliasNameText ), NULL, this ); m_FootprintFilterListBox->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnFilterDClick ), NULL, this ); m_FootprintFilterListBox->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnEditFootprintFilter ), NULL, this ); m_addFilterButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnAddFootprintFilter ), NULL, this ); m_editFilterButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnEditFootprintFilter ), NULL, this ); m_deleteFilterButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnDeleteFootprintFilter ), NULL, this ); m_spiceFieldsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnEditSpiceModel ), NULL, this ); m_stdSizerButtonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnCancelButtonClick ), NULL, this ); }
BoundaryPanel::~BoundaryPanel() { // Disconnect Events m_tBoundaryGUID->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( BoundaryPanel::OnBoundaryGUIDKillFocus ), NULL, this ); m_button12->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BoundaryPanel::OnGetBoundaryGUID ), NULL, this ); m_tGuardZoneGUID->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( BoundaryPanel::OnGuardZoneGUIDKillFocus ), NULL, this ); }
void MixerToolBar::Populate() { mPlayBitmap = new wxBitmap(theTheme.Bitmap(bmpSpeaker)); Add(new wxStaticBitmap(this, wxID_ANY, *mPlayBitmap), 0, wxALIGN_CENTER); mOutputSlider = new ASlider(this, wxID_ANY, _("Playback Volume"), wxDefaultPosition, wxSize(130, 25)); mOutputSlider->SetScroll(0.1f, 2.0f); mOutputSlider->SetName(_("Slider Playback")); Add(mOutputSlider, 0, wxALIGN_CENTER); mRecordBitmap = new wxBitmap(theTheme.Bitmap(bmpMic)); Add(new wxStaticBitmap(this, wxID_ANY, *mRecordBitmap), 0, wxALIGN_CENTER); mInputSlider = new ASlider(this, wxID_ANY, _("Recording Volume"), wxDefaultPosition, wxSize(130, 25)); mInputSlider->SetScroll(0.1f, 2.0f); mInputSlider->SetName(_("Slider Recording")); Add(mInputSlider, 0, wxALIGN_CENTER); // this bit taken from SelectionBar::Populate() mOutputSlider->Connect(wxEVT_SET_FOCUS, wxFocusEventHandler(MixerToolBar::OnFocus), NULL, this); mOutputSlider->Connect(wxEVT_KILL_FOCUS, wxFocusEventHandler(MixerToolBar::OnFocus), NULL, this); mInputSlider->Connect(wxEVT_SET_FOCUS, wxFocusEventHandler(MixerToolBar::OnFocus), NULL, this); mInputSlider->Connect(wxEVT_KILL_FOCUS, wxFocusEventHandler(MixerToolBar::OnFocus), NULL, this); // Show or hide the input slider based on whether it works mInputSlider->Enable(gAudioIO->InputMixerWorks()); UpdateControls(); // Add a little space Add(2, -1); }
bool wxGenericHyperlinkCtrl::Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxString& url, const wxPoint& pos, const wxSize& size, long style, const wxString& name) { // do validation checks: CheckParams(label, url, style); if ((style & wxHL_ALIGN_LEFT) == 0) style |= wxFULL_REPAINT_ON_RESIZE; if (!wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name)) return false; // set to non empty strings both the url and the label SetURL(url.empty() ? label : url); SetLabel(label.empty() ? url : label); Init(); SetForegroundColour(m_normalColour); // by default the font of an hyperlink control is underlined wxFont f = GetFont(); f.SetUnderlined(true); SetFont(f); SetInitialSize(size); // connect our event handlers: // NOTE: since this class is the base class of the GTK+'s native implementation // of wxHyperlinkCtrl, we cannot use the static macros in BEGIN/END_EVENT_TABLE // blocks, otherwise the GTK+'s native impl of wxHyperlinkCtrl would not // behave correctly (as we intercept events doing things which interfere // with GTK+'s native handling): Connect( wxEVT_PAINT, wxPaintEventHandler(wxGenericHyperlinkCtrl::OnPaint) ); Connect( wxEVT_SET_FOCUS, wxFocusEventHandler(wxGenericHyperlinkCtrl::OnFocus) ); Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler(wxGenericHyperlinkCtrl::OnFocus) ); Connect( wxEVT_CHAR, wxKeyEventHandler(wxGenericHyperlinkCtrl::OnChar) ); Connect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler(wxGenericHyperlinkCtrl::OnLeaveWindow) ); Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler(wxGenericHyperlinkCtrl::OnLeftDown) ); Connect( wxEVT_LEFT_UP, wxMouseEventHandler(wxGenericHyperlinkCtrl::OnLeftUp) ); Connect( wxEVT_MOTION, wxMouseEventHandler(wxGenericHyperlinkCtrl::OnMotion) ); ConnectMenuHandlers(); return true; }
DIALOG_POSITION_RELATIVE_BASE::~DIALOG_POSITION_RELATIVE_BASE() { // Disconnect Events this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClose ) ); m_polarCoords->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnPolarChanged ), NULL, this ); m_xEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnTextFocusLost ), NULL, this ); m_clearX->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClear ), NULL, this ); m_yEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnTextFocusLost ), NULL, this ); m_clearY->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClear ), NULL, this ); m_rotEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnTextFocusLost ), NULL, this ); m_clearRot->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClear ), NULL, this ); m_select_anchor_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnSelectItemClick ), NULL, this ); m_stdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnOkClick ), NULL, this ); }
GSPanel::GSPanel( wxWindow* parent ) : wxWindow() , m_HideMouseTimer( this ) , m_coreRunning(false) { m_CursorShown = true; m_HasFocus = false; if ( !wxWindow::Create(parent, wxID_ANY) ) throw Exception::RuntimeError().SetDiagMsg( L"GSPanel constructor explode!!" ); SetName( L"GSPanel" ); InitDefaultAccelerators(); SetBackgroundColour(wxColour((unsigned long)0)); if( g_Conf->GSWindow.AlwaysHideMouse ) { SetCursor( wxCursor(wxCURSOR_BLANK) ); m_CursorShown = false; } Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler (GSPanel::OnCloseWindow)); Connect(wxEVT_SIZE, wxSizeEventHandler (GSPanel::OnResize)); Connect(wxEVT_KEY_UP, wxKeyEventHandler (GSPanel::OnKeyDownOrUp)); Connect(wxEVT_KEY_DOWN, wxKeyEventHandler (GSPanel::OnKeyDownOrUp)); Connect(wxEVT_SET_FOCUS, wxFocusEventHandler (GSPanel::OnFocus)); Connect(wxEVT_KILL_FOCUS, wxFocusEventHandler (GSPanel::OnFocusLost)); Connect(m_HideMouseTimer.GetId(), wxEVT_TIMER, wxTimerEventHandler(GSPanel::OnHideMouseTimeout) ); // Any and all events which should result in the mouse cursor being made visible // are connected here. If I missed one, feel free to add it in! --air Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler (GSPanel::OnMouseEvent)); Connect(wxEVT_LEFT_UP, wxMouseEventHandler (GSPanel::OnMouseEvent)); Connect(wxEVT_MIDDLE_DOWN, wxMouseEventHandler (GSPanel::OnMouseEvent)); Connect(wxEVT_MIDDLE_UP, wxMouseEventHandler (GSPanel::OnMouseEvent)); Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler (GSPanel::OnMouseEvent)); Connect(wxEVT_RIGHT_UP, wxMouseEventHandler (GSPanel::OnMouseEvent)); Connect(wxEVT_MOTION, wxMouseEventHandler (GSPanel::OnMouseEvent)); Connect(wxEVT_LEFT_DCLICK, wxMouseEventHandler (GSPanel::OnMouseEvent)); Connect(wxEVT_LEFT_DCLICK, wxMouseEventHandler (GSPanel::OnLeftDclick)); Connect(wxEVT_MIDDLE_DCLICK, wxMouseEventHandler (GSPanel::OnMouseEvent)); Connect(wxEVT_RIGHT_DCLICK, wxMouseEventHandler (GSPanel::OnMouseEvent)); Connect(wxEVT_MOUSEWHEEL, wxMouseEventHandler (GSPanel::OnMouseEvent)); }
dc_gui_chatpanel::dc_gui_chatpanel(wxWindow *parent, wxString tabTitle, wxWindowID winid, const wxPoint& pos, const wxSize& size, long style, const wxString& name) : wxPanel(parent, winid, pos, size, style, name) { wxBoxSizer* bSizer2; bSizer2 = new wxBoxSizer(wxHORIZONTAL); txtMain = new wxRichTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_AUTO_URL | wxTE_READONLY | wxNO_BORDER | wxVSCROLL | wxWANTS_CHARS); bSizer2->Add(txtMain, 1, wxEXPAND | wxALL, 1); txtMain->Connect(wxEVT_SET_FOCUS, wxFocusEventHandler(dc_gui_chatpanel::on_richtext_focus), NULL, this); txtMain->BeginTextColour(wxColour(0, 90, 0, 0)); txtMain->WriteText(std::string("Joined channel ").append(tabTitle)); txtMain->EndTextColour(); m_listBox1 = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 | wxNO_BORDER); bSizer2->Add(m_listBox1, 0, wxALL | wxEXPAND, 1); this->SetSizer(bSizer2); this->Layout(); bSizer2->Fit(this); }
/***************************************************** ** ** BaseInputField --- Constructor ** ******************************************************/ BaseInputField::BaseInputField( wxWindow *parent, int id, const wxPoint& pos, const wxSize& size ) : wxTextCtrl( parent, id, wxEmptyString, pos, size, wxTE_PROCESS_ENTER ) { value = 0; Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( BaseInputField::OnKillFocus )); }
KeyConfigPrefs::~KeyConfigPrefs() { if (mKey) { mKey->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(KeyConfigPrefs::OnHotkeyKeyDown), NULL, this); mKey->Disconnect(wxEVT_CHAR, wxKeyEventHandler(KeyConfigPrefs::OnHotkeyChar), NULL, this); mKey->Disconnect(wxEVT_KILL_FOCUS, wxFocusEventHandler(KeyConfigPrefs::OnHotkeyKillFocus), NULL, this); } if (mFilter) { mKey->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(KeyConfigPrefs::OnFilterKeyDown), NULL, this); mKey->Disconnect(wxEVT_CHAR, wxKeyEventHandler(KeyConfigPrefs::OnFilterChar), NULL, this); } }
bool wxPickerBase::CreateBase(wxWindow *parent, wxWindowID id, const wxString &text, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator, const wxString& name) { // remove any border style from our style as wxPickerBase's window must be // invisible (user styles must be set on the textctrl or the platform-dependent picker) style &= ~wxBORDER_MASK; if (!wxControl::Create(parent, id, pos, size, style | wxNO_BORDER | wxTAB_TRAVERSAL, validator, name)) return false; m_sizer = new wxBoxSizer(wxHORIZONTAL); if (HasFlag(wxPB_USE_TEXTCTRL)) { // NOTE: the style of this class (wxPickerBase) and the style of the // attached text control are different: GetTextCtrlStyle() extracts // the styles related to the textctrl from the styles passed here m_text = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, GetTextCtrlStyle(style)); if (!m_text) { wxFAIL_MSG( wxT("wxPickerBase's textctrl creation failed") ); return false; } // set the maximum lenght allowed for this textctrl. // This is very important since any change to it will trigger an update in // the m_picker; for very long strings, this real-time synchronization could // become a CPU-blocker and thus should be avoided. // 32 characters will be more than enough for all common uses. m_text->SetMaxLength(32); // set the initial contents of the textctrl m_text->SetValue(text); m_text->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(wxPickerBase::OnTextCtrlUpdate), NULL, this); m_text->Connect(wxEVT_KILL_FOCUS, wxFocusEventHandler(wxPickerBase::OnTextCtrlKillFocus), NULL, this); m_text->Connect(wxEVT_DESTROY, wxWindowDestroyEventHandler(wxPickerBase::OnTextCtrlDelete), NULL, this); // the text control's proportion values defaults to 2 m_sizer->Add(m_text, 2, GetDefaultTextCtrlFlag(), 5); } return true; }
ManageFieldTextureDialog::~ManageFieldTextureDialog() { m_texturepicker->GetTextCtrl()->Disconnect(wxEVT_SET_FOCUS,wxFocusEventHandler(ManageFieldTextureDialog::OnFocusFileImage),NULL,this); Disconnect(wxEVT_TIMER,wxTimerEventHandler(ManageFieldTextureDialog::OnTimer),NULL,this); delete timer; delete[] anim_tick_time; delete[] anim_tile_pos; delete[] anim_play_flag; }
DIALOG_LIB_EDIT_TEXT_BASE::~DIALOG_LIB_EDIT_TEXT_BASE() { // Disconnect Events this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnCloseDialog ) ); m_TextValue->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnSetFocusText ), NULL, this ); m_TextValueSelectButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnTextValueSelectButtonClick ), NULL, this ); }
AnPickFromFs::AnPickFromFs(wxWindow *parent, wxWindowID id, const wxPoint & pos, const wxSize & size, long style, const wxString & name) : wxPanel(parent, id, pos, size, style, name) { wxFlexGridSizer *mainSizer; mainSizer = new wxFlexGridSizer(2, 3, 0, 0); mainSizer->AddGrowableCol(1); mainSizer->SetFlexibleDirection(wxBOTH); mainSizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED); label_ = new wxStaticText(this, wxID_ANY, wxT("<no title>"), wxDefaultPosition, wxDefaultSize, 0); label_->Wrap(-1); mainSizer->Add(label_, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); inputTextCtrl_ = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER); mainSizer->Add(inputTextCtrl_, 1, wxALL | wxALIGN_CENTER_VERTICAL | wxEXPAND, 5); pickButton_ = new wxButton(this, wxID_ANY, _("Pick..."), wxDefaultPosition, wxDefaultSize, 0); pickButton_->SetToolTip(_("use the right mouse button to choose between" " files and directories")); mainSizer->Add(pickButton_, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); fileMenuId_ = wxNewId(); pickButtonMenu_.AppendRadioItem(fileMenuId_, _("Pick a file")); dirMenuId_ = wxNewId(); pickButtonMenu_.AppendRadioItem(dirMenuId_, _("Pick a directory")); mainSizer->Add(0, 0, 1, wxEXPAND, 5); infoLabel_ = new wxStaticText(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0); infoLabel_->Wrap(-1); infoLabel_->Hide(); infoLabel_->SetFont(wxFont(8, 70, 90, 90, false, wxEmptyString)); infoLabel_->SetForegroundColour(wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT)); mainSizer->Add(infoLabel_, 1, wxALL|wxALIGN_CENTER_VERTICAL, 0); inputTextCtrl_->Connect(wxEVT_KILL_FOCUS, wxFocusEventHandler(AnPickFromFs::onTextKillFocus), NULL, this); inputTextCtrl_->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(AnPickFromFs::onTextEnter), NULL, this); pickButton_->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(AnPickFromFs::onPickButton), NULL, this); pickButton_->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(AnPickFromFs::onPickButtonMenu), NULL, this); this->SetSizer(mainSizer); this->Layout(); fileName_ = wxEmptyString; setMode(MODE_NONE); }
void wxCheckBox::MakeOwnerDrawn(bool ownerDrawn) { long style = ::GetWindowLong(GetHwnd(), GWL_STYLE); // note that BS_CHECKBOX & BS_OWNERDRAW != 0 so we can't operate on // them as on independent style bits if ( ownerDrawn ) { style &= ~(BS_CHECKBOX | BS_3STATE); style |= BS_OWNERDRAW; Connect(wxEVT_ENTER_WINDOW, wxMouseEventHandler(wxCheckBox::OnMouseEnterOrLeave)); Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(wxCheckBox::OnMouseEnterOrLeave)); Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(wxCheckBox::OnMouseLeft)); Connect(wxEVT_LEFT_UP, wxMouseEventHandler(wxCheckBox::OnMouseLeft)); Connect(wxEVT_SET_FOCUS, wxFocusEventHandler(wxCheckBox::OnFocus)); Connect(wxEVT_KILL_FOCUS, wxFocusEventHandler(wxCheckBox::OnFocus)); } else // reset to default colour { style &= ~BS_OWNERDRAW; style |= HasFlag(wxCHK_3STATE) ? BS_3STATE : BS_CHECKBOX; Disconnect(wxEVT_ENTER_WINDOW, wxMouseEventHandler(wxCheckBox::OnMouseEnterOrLeave)); Disconnect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(wxCheckBox::OnMouseEnterOrLeave)); Disconnect(wxEVT_LEFT_DOWN, wxMouseEventHandler(wxCheckBox::OnMouseLeft)); Disconnect(wxEVT_LEFT_UP, wxMouseEventHandler(wxCheckBox::OnMouseLeft)); Disconnect(wxEVT_SET_FOCUS, wxFocusEventHandler(wxCheckBox::OnFocus)); Disconnect(wxEVT_KILL_FOCUS, wxFocusEventHandler(wxCheckBox::OnFocus)); } ::SetWindowLong(GetHwnd(), GWL_STYLE, style); if ( !ownerDrawn ) { // ensure that controls state is consistent with internal state DoSet3StateValue(m_state); } }
EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWindowId, const wxPoint& aPosition, const wxSize& aSize, GAL_TYPE aGalType ) : wxScrolledCanvas( aParentWindow, aWindowId, aPosition, aSize ) { m_parent = aParentWindow; m_edaFrame = dynamic_cast<EDA_DRAW_FRAME*>( aParentWindow ); m_gal = NULL; m_backend = GAL_TYPE_NONE; m_view = NULL; m_painter = NULL; m_eventDispatcher = NULL; m_lostFocus = false; SetLayoutDirection( wxLayout_LeftToRight ); SwitchBackend( aGalType ); SetBackgroundStyle( wxBG_STYLE_CUSTOM ); // Scrollbars broken in GAL on OSX #ifdef __WXMAC__ ShowScrollbars( wxSHOW_SB_NEVER, wxSHOW_SB_NEVER ); #else ShowScrollbars( wxSHOW_SB_ALWAYS, wxSHOW_SB_ALWAYS ); #endif EnableScrolling( false, false ); // otherwise Zoom Auto disables GAL canvas m_painter = new KIGFX::PCB_PAINTER( m_gal ); m_view = new KIGFX::VIEW( true ); m_view->SetPainter( m_painter ); m_view->SetGAL( m_gal ); Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); Connect( wxEVT_ENTER_WINDOW, wxEventHandler( EDA_DRAW_PANEL_GAL::onEnter ), NULL, this ); Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( EDA_DRAW_PANEL_GAL::onLostFocus ), NULL, this ); const wxEventType events[] = { wxEVT_LEFT_UP, wxEVT_LEFT_DOWN, wxEVT_LEFT_DCLICK, wxEVT_RIGHT_UP, wxEVT_RIGHT_DOWN, wxEVT_RIGHT_DCLICK, wxEVT_MIDDLE_UP, wxEVT_MIDDLE_DOWN, wxEVT_MIDDLE_DCLICK, wxEVT_MOTION, wxEVT_MOUSEWHEEL, wxEVT_CHAR, #if wxCHECK_VERSION( 3, 1, 0 ) || defined( USE_OSX_MAGNIFY_EVENT ) wxEVT_MAGNIFY, #endif KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE }; BOOST_FOREACH( wxEventType eventType, events ) { Connect( eventType, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, m_eventDispatcher ); }
void HexEditorCtrl::Dynamic_Disconnector(){ this->Disconnect( idTagAddSelection, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( HexEditorCtrl::OnTagAddSelection ), NULL, this ); this->Disconnect( idTagQuick, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( HexEditorCtrl::OnTagQuick ), NULL, this ); this->Disconnect( idTagEdit, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( HexEditorCtrl::OnTagEdit ), NULL, this ); this->Disconnect( __idOffsetHex__, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( HexEditorCtrl::UpdateUI ) ); this->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler(HexEditorCtrl::OnKillFocus),NULL, this); hex_ctrl->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler(HexEditorCtrl::OnKillFocus),NULL, this); text_ctrl->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler(HexEditorCtrl::OnKillFocus),NULL, this); offset_ctrl->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler(HexEditorCtrl::OnMouseRight),NULL, this); offset_ctrl->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler(HexEditorCtrl::OnMouseLeft),NULL, this); hex_ctrl ->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler(HexEditorCtrl::OnMouseLeft),NULL, this); text_ctrl->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler(HexEditorCtrl::OnMouseLeft),NULL, this); hex_ctrl ->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler(HexEditorCtrl::OnMouseSelectionEnd),NULL, this); text_ctrl->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler(HexEditorCtrl::OnMouseSelectionEnd),NULL, this); hex_ctrl ->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler(HexEditorCtrl::OnMouseRight),NULL, this); text_ctrl->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler(HexEditorCtrl::OnMouseRight),NULL, this); hex_ctrl ->Disconnect( wxEVT_MOTION, wxMouseEventHandler(HexEditorCtrl::OnMouseMove),NULL, this); text_ctrl->Disconnect( wxEVT_MOTION, wxMouseEventHandler(HexEditorCtrl::OnMouseMove),NULL, this); }
void ParamBox::Initialise() { modparams = new ParamStore; modflags = new ParamStore; activepanel = panel; paramset = new ParamSet(activepanel); flagrefs = new RefStore(); checkrefs = new RefStore(); panelrefs = new RefStore(); paramstoretag = NULL; if(boxtype == 0 || boxtype == 1) { mainwin->diagbox->Write("Store Box initialise\n"); paramstoretag = TextInputCombo(100, 20, "", boxname, mod->GetPath()); paramstoretag->Show(false); } //flagset = new FlagSet(); //panel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize); //panel->SetFont(boxfont); //vbox1 = new wxBoxSizer(wxVERTICAL); //vbox2 = new wxBoxSizer(wxVERTICAL); //vbox3 = new wxBoxSizer(wxVERTICAL); //vbox4 = new wxBoxSizer(wxVERTICAL); //vbox5 = new wxBoxSizer(wxVERTICAL); if(boxtype == 0) parambox = new wxBoxSizer(wxHORIZONTAL); //mainbox = new wxBoxSizer(wxVERTICAL); //vbox1->AddSpacer(5); //vbox2->AddSpacer(5); //vbox3->AddSpacer(5); //vbox4->AddSpacer(5); //vbox5->AddSpacer(5); //panel->SetSizer(mainbox); Connect(ID_autorun, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ParamBox::OnAutorun)); Connect(ID_Run, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ParamBox::OnRun)); Connect(ID_Default, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ParamBox::OnDefault)); Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(ParamBox::OnRun)); //Connect(wxEVT_MOVE, wxMoveEventHandler(ParamBox::OnMove)); //Connect(wxEVT_SIZE, wxSizeEventHandler(ParamBox::OnSize)); Connect(wxEVT_SET_FOCUS, wxFocusEventHandler(ParamBox::OnFocus)); Connect(wxEVT_SPIN, wxSpinEventHandler(ParamBox::OnSpin)); Connect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(ParamBox::OnDClick)); Connect(ID_paramstore, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ParamBox::OnParamStore)); Connect(ID_paramload, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ParamBox::OnParamLoad)); Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(ParamBox::OnClose)); }
wxScintilla *OutputPane::CreateScintillaPage() { wxScintilla *win = new wxScintilla(m_book, wxID_ANY, wxDefaultPosition, wxDefaultSize); // Hide margins win->SetMarginWidth(0, 0); win->SetMarginWidth(1, 0); win->SetMarginWidth(2, 0); win->SetReadOnly(true); win->Connect(wxID_ANY, wxEVT_SET_FOCUS, wxFocusEventHandler(OutputPane::OnSetFocus), NULL, this); win->Connect(wxID_ANY, wxEVT_SCI_DOUBLECLICK, wxScintillaEventHandler(OutputPane::OnMouseDClick), NULL, this); wxFont font(8, wxFONTFAMILY_TELETYPE, wxNORMAL, wxNORMAL); win->StyleSetFont(wxSCI_STYLE_DEFAULT, font); return win; }
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 THISCLASS::OnInitialize(ConfigurationXML *config, ErrorList *errorlist) { // Read specific configuration config->SelectRootNode(); mValueDefault = config->ReadString(wxT("default"), wxT("")); // Create the controls wxStaticText *label = new wxStaticText(this, wxID_ANY, config->ReadString(wxT("label"), wxT("")), wxDefaultPosition, wxSize(scLabelWidth, -1), wxST_NO_AUTORESIZE); mTextCtrl = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(scTextBoxWidth + scUnitWidth, -1), wxTE_PROCESS_ENTER); mTextCtrl->Connect(wxID_ANY, wxEVT_KILL_FOCUS, wxFocusEventHandler(THISCLASS::OnKillFocus), 0, this); // Layout the controls wxBoxSizer *hs = new wxBoxSizer(wxHORIZONTAL); hs->Add(label, 0, wxALIGN_CENTER_VERTICAL, 0); hs->Add(mTextCtrl, 0, wxALIGN_CENTER_VERTICAL, 0); SetSizer(hs); }
DIALOG_NETLIST_BASE::~DIALOG_NETLIST_BASE() { // Disconnect Events m_NetlistFilenameCtrl->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_NETLIST_BASE::OnFilenameKillFocus ), NULL, this ); m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnOpenNetlistClick ), NULL, this ); m_matchByTimestamp->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnMatchChanged ), NULL, this ); m_cbUpdateFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnOptionChanged ), NULL, this ); m_cbDeleteShortingTracks->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnOptionChanged ), NULL, this ); m_cbDeleteExtraFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnOptionChanged ), NULL, this ); m_cbDeleteSinglePadNets->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnOptionChanged ), NULL, this ); m_buttonFPTest->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnTestFootprintsClick ), NULL, this ); m_buttonFPTest->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_BASE::OnUpdateUIValidNetlistFile ), NULL, this ); m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnCompileRatsnestClick ), NULL, this ); m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnUpdatePCB ), NULL, this ); }
SFTPBrowserBaseDlg::~SFTPBrowserBaseDlg() { m_textCtrlRemoteFolder->Disconnect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(SFTPBrowserBaseDlg::OnTextEnter), NULL, this); m_buttonRefresh->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SFTPBrowserBaseDlg::OnRefresh), NULL, this); m_buttonRefresh->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPBrowserBaseDlg::OnRefreshUI), NULL, this); this->Disconnect(ID_CD_UP, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SFTPBrowserBaseDlg::OnCdUp), NULL, this); this->Disconnect(ID_CD_UP, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPBrowserBaseDlg::OnCdUpUI), NULL, this); this->Disconnect(ID_SSH_ACCOUNT_MANAGER, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SFTPBrowserBaseDlg::OnSSHAccountManager), NULL, this); m_dataview->Disconnect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(SFTPBrowserBaseDlg::OnItemActivated), NULL, this); m_dataview->Disconnect(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler(SFTPBrowserBaseDlg::OnItemSelected), NULL, this); m_dataview->Disconnect(wxEVT_CHAR, wxKeyEventHandler(SFTPBrowserBaseDlg::OnKeyDown), NULL, this); m_textCtrlInlineSearch->Disconnect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(SFTPBrowserBaseDlg::OnTextUpdated), NULL, this); m_textCtrlInlineSearch->Disconnect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(SFTPBrowserBaseDlg::OnEnter), NULL, this); m_textCtrlInlineSearch->Disconnect(wxEVT_KILL_FOCUS, wxFocusEventHandler(SFTPBrowserBaseDlg::OnFocusLost), NULL, this); m_button59->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPBrowserBaseDlg::OnOKUI), NULL, this); }
ManageFieldTextureDialog::ManageFieldTextureDialog(wxWindow* parent, FieldTilesDataStruct& f) : ManageFieldTextureWindow(parent), timer(new wxTimer(this)), color_selected(-1), prevent_event(false) { unsigned int i; tim = f.parent->tim_data[f.id]; // Unused now field.Copy(f); for (i=0;i<field.tiles_amount;i++) { wstringstream buffer; buffer << "Tile Block " << i << endl; m_tilechecklist->Append(_(buffer.str())); m_tilechecklist->Check(i,field.tiles[i].is_static || field.tiles[i].is_first_of_anim); } animlist_img = new wxImageList(60,20,true,4); animcontrol_loopplay = wxBitmap(wxBITMAP(animcontrolloopplay_image)); animcontrol_looppause = wxBitmap(wxBITMAP(animcontrollooppause_image)); animcontrol_noloopplay = wxBitmap(wxBITMAP(animcontrolnoloopplay_image)); animcontrol_nolooppause = wxBitmap(wxBITMAP(animcontrolnolooppause_image)); animlist_img->Add(animcontrol_noloopplay); animlist_img->Add(animcontrol_nolooppause); animlist_img->Add(animcontrol_loopplay); animlist_img->Add(animcontrol_looppause); anim_tick_time = new unsigned int[field.anim_amount]; anim_tile_pos = new unsigned int[field.anim_amount]; anim_play_flag = new unsigned int[field.anim_amount]; for (i=0;i<field.anim_amount;i++) { anim_tick_time[i] = field.anim[i].tile_duration[0]; anim_tile_pos[i] = 0; anim_play_flag[i] = ANIM_PLAYFLAG_LOOP; } m_animlist->AssignImageList(animlist_img,wxIMAGE_LIST_SMALL); for (i=0;i<field.anim_amount;i++) m_animlist->InsertItem(i,_(L"Anim ")+wxString::Format(wxT("%u"),i),anim_play_flag[i]); m_animlist->SetColumnWidth(0,200); m_textureposx->Enable(false); m_textureposy->Enable(false); m_texturepaletteselection->Enable(false); imported_img = wxNullBitmap; main_img_base = wxNullImage; scale_ratio = 1.0; timer->Start(DEFAULT_SPEED); Connect(wxEVT_TIMER,wxTimerEventHandler(ManageFieldTextureDialog::OnTimer),NULL,this); m_texturepicker->GetTextCtrl()->Connect(wxEVT_SET_FOCUS,wxFocusEventHandler(ManageFieldTextureDialog::OnFocusFileImage),NULL,this); }
void wxRibbonPanel::OnKillFocus(wxFocusEvent& evt) { if(m_expanded_dummy) { wxWindow *receiver = evt.GetWindow(); if(IsAncestorOf(this, receiver)) { m_child_with_focus = receiver; receiver->Connect(wxEVT_KILL_FOCUS, wxFocusEventHandler(wxRibbonPanel::OnChildKillFocus), NULL, this); } else if(receiver == NULL || receiver != m_expanded_dummy) { HideExpanded(); } } }
DIALOG_FOOTPRINT_FP_EDITOR_BASE::~DIALOG_FOOTPRINT_FP_EDITOR_BASE() { // Disconnect Events this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnInitDlg ) ); this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnUpdateUI ) ); m_itemsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnGridSize ), NULL, this ); m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnAddField ), NULL, this ); m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnDeleteField ), NULL, this ); m_FootprintNameCtrl->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnFootprintNameKillFocus ), NULL, this ); m_FootprintNameCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnFootprintNameText ), NULL, this ); m_modelsGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::On3DModelCellChanged ), NULL, this ); m_modelsGrid->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::On3DModelSelected ), NULL, this ); m_button3DShapeAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnAdd3DRow ), NULL, this ); m_button3DShapeBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnAdd3DModel ), NULL, this ); m_button3DShapeRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnRemove3DModel ), NULL, this ); m_buttonConfig3DPaths->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::Cfg3DPath ), NULL, this ); }
GlobalPoseSensorPanelBase::~GlobalPoseSensorPanelBase() { // Disconnect Events this->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( GlobalPoseSensorPanelBase::OnSetFocus ) ); this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( GlobalPoseSensorPanelBase::OnUpdateUI ) ); mRefreshButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalPoseSensorPanelBase::OnRefreshList ), NULL, this ); mConnectButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalPoseSensorPanelBase::OnConnect ), NULL, this ); mZoomSlider->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this ); mZoomSlider->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this ); mZoomSlider->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this ); mZoomSlider->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this ); mZoomSlider->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this ); mZoomSlider->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this ); mZoomSlider->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this ); mZoomSlider->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this ); mZoomSlider->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this ); }
void THISCLASS::OnInitialize(ConfigurationXML *config, ErrorList *errorlist) { // Read specific configuration config->SelectRootNode(); mValueDefault = config->ReadString(wxT("default"), wxT("")); mFileFilter = config->ReadString(wxT("filefilter"), wxT("All files|*.*")); // Create the controls wxStaticText *label = new wxStaticText(this, wxID_ANY, config->ReadString(wxT("label"), wxT("")), wxDefaultPosition, wxSize(scLabelWidth, -1), wxST_NO_AUTORESIZE); mTextCtrl = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(scParameterWidth - 25, -1), wxTE_PROCESS_ENTER); mTextCtrl->Connect(wxID_ANY, wxEVT_KILL_FOCUS, wxFocusEventHandler(THISCLASS::OnKillFocus), 0, this); mButton = new wxButton(this, wxID_ANY, wxT("..."), wxDefaultPosition, wxSize(25, -1), wxST_NO_AUTORESIZE); // Layout the controls wxBoxSizer *hs = new wxBoxSizer(wxHORIZONTAL); hs->Add(mTextCtrl, 0, wxALIGN_CENTER_VERTICAL, 0); hs->Add(mButton, 0, wxALIGN_CENTER_VERTICAL, 0); wxBoxSizer *vs = new wxBoxSizer(wxVERTICAL); vs->Add(label, 0, wxBOTTOM, 2); vs->Add(hs, 0, 0, 0); SetSizer(vs); }
bool wxTimeSpinCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, long style, const wxString &name) { wxControl::Create(parent, id, pos, size, style & ~(wxSP_WRAP | wxSP_ARROW_KEYS), wxDefaultValidator, name); SetFont(parent->GetFont()); m_spn = new wxSpinButton(this, CTRLID_SPN, wxDefaultPosition, wxDefaultSize, wxSP_WRAP | wxSP_VERTICAL | (style & wxSP_ARROW_KEYS)); wxSize cs = GetClientSize(); wxSize ss = m_spn->GetBestSize(); m_txt = new wxTextCtrl(this, CTRLID_TXT, wxEmptyString, wxPoint(0, 0), wxSize(cs.x - ss.x, cs.y), wxWANTS_CHARS); m_txt->Connect(wxID_ANY, wxID_ANY, wxEVT_KEY_DOWN, wxKeyEventHandler(wxTimeSpinCtrl::OnEditKey), 0, this); m_txt->Connect(wxID_ANY, wxID_ANY, wxEVT_KILL_FOCUS, wxFocusEventHandler(wxTimeSpinCtrl::OnKillFocus), 0, this); wxArrayString valArray; wxChar c; for (c = '0'; c <= '9'; c++) valArray.Add(wxString(c, 1)); valArray.Add(wxT(":")); wxTextValidator tv(wxFILTER_INCLUDE_CHAR_LIST); tv.SetIncludes(valArray); m_txt->SetValidator(tv); m_spn->SetSize(ss.x, cs.y); m_spn->SetPosition(wxPoint(cs.x - ss.x, 0)); canWrap = (style & wxSP_WRAP) != 0; SetMax(24 * 60 * 60 - 1); SetInitialSize(size); return true; }