1. corrected some owner-drawn buttons bugs
2. added generation of event for EVT_SPINCTRL handler to wxSpinCtrl git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -50,7 +50,11 @@
|
||||
// macros
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl, wxControl)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl, wxControl)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxSpinCtrl, wxSpinButton)
|
||||
EVT_SPIN(-1, wxSpinCtrl::OnSpinChange)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
@@ -201,6 +205,24 @@ bool wxSpinCtrl::SetFont(const wxFont& font)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// event processing
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void wxSpinCtrl::OnSpinChange(wxSpinEvent& eventSpin)
|
||||
{
|
||||
wxCommandEvent event(wxEVT_COMMAND_SPINCTRL_UPDATED, GetId());
|
||||
event.SetEventObject(this);
|
||||
event.SetInt(eventSpin.GetPosition());
|
||||
|
||||
(void)GetEventHandler()->ProcessEvent(event);
|
||||
|
||||
if ( eventSpin.GetSkipped() )
|
||||
{
|
||||
event.Skip();
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// size calculations
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user