static WXFARPROC fnWndProcSpinCtrl = (WXFARPROC)NULL;
wxArraySpins wxSpinCtrl::m_svAllSpins;
-IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl, wxControl)
-
BEGIN_EVENT_TABLE(wxSpinCtrl, wxSpinButton)
EVT_CHAR(wxSpinCtrl::OnChar)
EVT_SPIN(wxID_ANY, wxSpinCtrl::OnSpinChange)
m_windowId = NewControlId();
else
m_windowId = vId;
- m_backgroundColour = pParent->GetBackgroundColour();
- m_foregroundColour = pParent->GetForegroundColour();
+ if (pParent)
+ {
+ m_backgroundColour = pParent->GetBackgroundColour();
+ m_foregroundColour = pParent->GetForegroundColour();
+ }
SetName(rsName);
SetParent(pParent);
m_windowStyle = lStyle;
// sanity check
wxASSERT_MSG( pSpin->m_hWndBuddy == hWndBuddy,
- _T("wxSpinCtrl has incorrect buddy HWND!") );
+ wxT("wxSpinCtrl has incorrect buddy HWND!") );
return pSpin;
} // end of wxSpinCtrl::GetSpinForTextCtrl
InitCommandEvent(vEvent);
vEvent.SetString(sVal);
vEvent.SetInt(GetValue());
- if (GetEventHandler()->ProcessEvent(vEvent))
+ if (HandleWindowEvent(vEvent))
return;
break;
}
vEventNav.SetDirection(!rEvent.ShiftDown());
vEventNav.SetWindowChange(rEvent.ControlDown());
vEventNav.SetEventObject(this);
- if (GetParent()->GetEventHandler()->ProcessEvent(vEventNav))
+ if (GetParent()->HandleWindowEvent(vEventNav))
return;
}
break;
vEvent.SetEventObject(this);
vEvent.SetInt(rEventSpin.GetPosition());
- (void)GetEventHandler()->ProcessEvent(vEvent);
+ (void)HandleWindowEvent(vEvent);
if (rEventSpin.GetSkipped())
{
vEvent.Skip();
vEvent.SetString(sVal);
vEvent.SetInt(GetValue());
- return (GetEventHandler()->ProcessEvent(vEvent));
+ return (HandleWindowEvent(vEvent));
}
case SPBN_SETFOCUS:
);
vEvent.SetEventObject(this);
- return(GetEventHandler()->ProcessEvent(vEvent));
+ return(HandleWindowEvent(vEvent));
}
default:
break;