wxControl* wx = (wxControl*) GetControlReference( control ) ;
if ( wx )
{
- wx->MacHandleControlClick( control , partCode ) ;
+ wx->MacHandleControlClick( control , partCode , true /* stillDown */ ) ;
}
}
}
m_macVerticalBorder = 0 ;
m_backgroundColour = *wxWHITE;
m_foregroundColour = *wxBLACK;
-#if WXWIN_COMPATIBILITY
- m_callback = 0;
-#endif // WXWIN_COMPATIBILITY
if ( wxMacLiveScrollbarActionUPP == NULL )
{
bool wxControl::ProcessCommand (wxCommandEvent & event)
{
- // Tries:
- // 1) A callback function (to become obsolete)
- // 2) OnCommand, starting at this window and working up parent hierarchy
- // 3) OnCommand then calls ProcessEvent to search the event tables.
-#if WXWIN_COMPATIBILITY
- if ( m_callback )
- {
- (void)(*m_callback)(this, event);
-
- return TRUE;
- }
- else
-#endif // WXWIN_COMPATIBILITY
- {
- return GetEventHandler()->ProcessEvent(event);
- }
+ // Tries:
+ // 1) OnCommand, starting at this window and working up parent hierarchy
+ // 2) OnCommand then calls ProcessEvent to search the event tables.
+ return GetEventHandler()->ProcessEvent(event);
}
// ------------------------
const wxString& name , WXRECTPTR outBounds , unsigned char* maclabel )
{
m_label = label ;
- SetName(name);
- if ( &validator )
- SetValidator(validator);
-
- m_windowStyle = style;
- parent->AddChild(this);
-
- m_backgroundColour = parent->GetBackgroundColour() ;
- m_foregroundColour = parent->GetForegroundColour() ;
-
- if (id == -1)
- m_windowId = NewControlId();
- else
- m_windowId = id;
-
- // These sizes will be adjusted in MacPostControlCreate
+ // These sizes will be adjusted in MacPostControlCreate
m_width = size.x ;
m_height = size.y ;
m_x = pos.x ;
{
ControlFontStyleRec controlstyle ;
controlstyle.flags = kControlUseFontMask ;
- controlstyle.font = kControlFontSmallSystemFont ;
+
+ if (IsKindOf( CLASSINFO( wxButton ) ) )
+ controlstyle.font = kControlFontSmallSystemFont ; // eventually kControlFontBigSystemFont ;
+ else
+ controlstyle.font = kControlFontSmallSystemFont ;
::SetControlFontStyle( (ControlHandle) m_macControl , &controlstyle ) ;
}
{
controlpart = ::HandleControlClick( control , localwhere , modifiers , (ControlActionUPP) -1 ) ;
wxTheApp->s_lastMouseDown = 0 ;
- if ( control && controlpart != kControlNoPart &&
- ! IsKindOf( CLASSINFO( wxScrollBar ) )
- ) // otherwise we will get the event twice for scrollbar
+ if ( control && controlpart != kControlNoPart )
{
- MacHandleControlClick( control , controlpart ) ;
+ MacHandleControlClick( control , controlpart , false /* mouse not down anymore */ ) ;
}
}
}
return false ;
}
-void wxControl::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
+void wxControl::MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool WXUNUSED( mouseStillDown ) )
{
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
}