} // anonymous namespace
-IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl)
-
BEGIN_EVENT_TABLE(wxButton, wxControl)
EVT_ENTER_WINDOW(wxButton::OnEnterWindow)
EVT_LEAVE_WINDOW(wxButton::OnLeaveWindow)
void wxButton::DoSetBitmap(const wxBitmap& bitmap, State which)
{
m_bitmaps[which] = bitmap;
-
+
if ( which == State_Normal )
m_peer->SetBitmap(bitmap);
else if ( which == State_Pressed )
void wxButton::OnEnterWindow( wxMouseEvent& WXUNUSED(event))
{
if ( DoGetBitmap( State_Current ).IsOk() )
- m_peer->SetBitmap( DoGetBitmap( State_Current ) );
+ m_peer->SetBitmap( DoGetBitmap( State_Current ) );
}
void wxButton::OnLeaveWindow( wxMouseEvent& WXUNUSED(event))
{
if ( DoGetBitmap( State_Current ).IsOk() )
- m_peer->SetBitmap( DoGetBitmap( State_Normal ) );
+ m_peer->SetBitmap( DoGetBitmap( State_Normal ) );
}
bool wxButton::OSXHandleClicked( double WXUNUSED(timestampsec) )