本文整理汇总了C++中wxFocusEventHandler函数的典型用法代码示例。如果您正苦于以下问题:C++ wxFocusEventHandler函数的具体用法?C++ wxFocusEventHandler怎么用?C++ wxFocusEventHandler使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wxFocusEventHandler函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: wxFocusEventHandler
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 );
}
示例2: wxFocusEventHandler
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();
}
}
示例3: wxUpdateUIEventHandler
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 );
}
示例4: wxBitmap
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);
}
示例5: CheckParams
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;
}
示例6: wxCloseEventHandler
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 );
}
示例7: wxWindow
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));
}
示例8: wxPanel
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);
}
示例9: wxTextCtrl
/*****************************************************
**
** 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 ));
}
示例10: wxKeyEventHandler
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);
}
}
示例11: wxBoxSizer
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;
}
示例12:
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;
}
示例13: wxCloseEventHandler
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 );
}
示例14: wxPanel
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);
}
示例15: Connect
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);
}
}