1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/mac/classic/control.cpp
3 // Purpose: wxControl class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/wxprec.h"
18 #include "wx/control.h"
22 #include "wx/dcclient.h"
23 #include "wx/notebook.h"
24 #include "wx/tabctrl.h"
25 #include "wx/radiobox.h"
26 #include "wx/spinbutt.h"
27 #include "wx/scrolbar.h"
28 #include "wx/button.h"
29 #include "wx/dialog.h"
30 #include "wx/statbox.h"
32 #include "wx/stattext.h"
34 IMPLEMENT_ABSTRACT_CLASS(wxControl
, wxWindow
)
36 BEGIN_EVENT_TABLE(wxControl
, wxWindow
)
37 EVT_MOUSE_EVENTS( wxControl::OnMouseEvent
)
38 EVT_PAINT( wxControl::OnPaint
)
41 #include "wx/mac/uma.h"
42 #include "wx/mac/private.h"
47 #if PRAGMA_STRUCT_ALIGN
48 #pragma options align=mac68k
49 #elif PRAGMA_STRUCT_PACKPUSH
51 #elif PRAGMA_STRUCT_PACK
56 unsigned short instruction
;
58 } cdefRec
, *cdefPtr
, **cdefHandle
;
60 #if PRAGMA_STRUCT_ALIGN
61 #pragma options align=reset
62 #elif PRAGMA_STRUCT_PACKPUSH
64 #elif PRAGMA_STRUCT_PACK
68 ControlActionUPP wxMacLiveScrollbarActionUPP
= NULL
;
69 wxControl
*wxFindControlFromMacControl(ControlHandle inControl
) ;
71 pascal void wxMacLiveScrollbarActionProc( ControlHandle control
, ControlPartCode partCode
) ;
72 pascal void wxMacLiveScrollbarActionProc( ControlHandle control
, ControlPartCode partCode
)
76 wxControl
* wx
= (wxControl
*) GetControlReference( control
) ;
79 wx
->MacHandleControlClick( (WXWidget
) control
, partCode
, true /* stillDown */ ) ;
84 ControlColorUPP wxMacSetupControlBackgroundUPP
= NULL
;
85 ControlDefUPP wxMacControlActionUPP
= NULL
;
87 pascal SInt32
wxMacControlDefinition(SInt16 varCode
, ControlRef theControl
, ControlDefProcMessage message
, SInt32 param
)
90 wxControl
* wx
= (wxControl
*) wxFindControlFromMacControl( theControl
) ;
91 if ( wx
!= NULL
&& wx
->IsKindOf( CLASSINFO( wxControl
) ) )
93 if( message
== drawCntl
)
95 wxMacWindowClipper
clip( wx
) ;
96 return InvokeControlDefUPP( varCode
, theControl
, message
, param
, (ControlDefUPP
) wx
->MacGetControlAction() ) ;
99 return InvokeControlDefUPP( varCode
, theControl
, message
, param
, (ControlDefUPP
) wx
->MacGetControlAction() ) ;
104 pascal OSStatus
wxMacSetupControlBackground( ControlRef iControl
, SInt16 iMessage
, SInt16 iDepth
, Boolean iIsColor
)
106 OSStatus status
= noErr
;
109 case kControlMsgSetUpBackground
:
111 wxControl
* wx
= (wxControl
*) GetControlReference( iControl
) ;
112 if ( wx
!= NULL
&& wx
->IsKindOf( CLASSINFO( wxControl
) ) )
114 wxDC::MacSetupBackgroundForCurrentPort( wx
->MacGetBackgroundBrush() ) ;
116 // under classic this would lead to partial redraws
117 RgnHandle clip
= NewRgn() ;
120 wx
->MacWindowToRootWindow( &x
,&y
) ;
121 CopyRgn( (RgnHandle
) wx
->MacGetVisibleRegion(false).GetWXHRGN() , clip
) ;
122 OffsetRgn( clip
, x
, y
) ;
140 wxControl::wxControl()
142 m_macControl
= NULL
;
143 m_macControlAction
= NULL
;
144 m_macHorizontalBorder
= 0 ; // additional pixels around the real control
145 m_macVerticalBorder
= 0 ;
146 m_backgroundColour
= *wxWHITE
;
147 m_foregroundColour
= *wxBLACK
;
149 if ( wxMacLiveScrollbarActionUPP
== NULL
)
151 #if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
152 wxMacLiveScrollbarActionUPP
= NewControlActionUPP( wxMacLiveScrollbarActionProc
);
154 wxMacLiveScrollbarActionUPP
= NewControlActionProc( wxMacLiveScrollbarActionProc
) ;
159 bool wxControl::Create(wxWindow
*parent
, wxWindowID id
,
161 const wxSize
& size
, long style
,
162 const wxValidator
& validator
,
163 const wxString
& name
)
165 m_macControl
= NULL
;
166 m_macHorizontalBorder
= 0 ; // additional pixels around the real control
167 m_macVerticalBorder
= 0 ;
169 bool rval
= wxWindow::Create(parent
, id
, pos
, size
, style
, name
);
172 m_backgroundColour
= parent
->GetBackgroundColour() ;
173 m_foregroundColour
= parent
->GetForegroundColour() ;
177 SetValidator(validator
);
183 wxControl::~wxControl()
185 m_isBeingDeleted
= true;
186 wxRemoveMacControlAssociation( this ) ;
187 // If we delete an item, we should initialize the parent panel,
188 // because it could now be invalid.
189 wxWindow
*parent
= GetParent() ;
192 if (parent
->GetDefaultItem() == (wxButton
*) this)
193 parent
->SetDefaultItem(NULL
);
195 if ( (ControlHandle
) m_macControl
)
197 // in case the callback might be called during destruction
198 ::SetControlColorProc( (ControlHandle
) m_macControl
, NULL
) ;
199 ::DisposeControl( (ControlHandle
) m_macControl
) ;
200 m_macControl
= NULL
;
204 void wxControl::SetLabel(const wxString
& title
)
206 m_label
= wxStripMenuCodes(title
) ;
210 UMASetControlTitle( (ControlHandle
) m_macControl
, m_label
, m_font
.GetEncoding() ) ;
215 wxSize
wxControl::DoGetBestSize() const
217 if ( (ControlHandle
) m_macControl
== NULL
)
218 return wxWindow::DoGetBestSize() ;
220 Rect bestsize
= { 0 , 0 , 0 , 0 } ;
221 short baselineoffset
;
222 int bestWidth
, bestHeight
;
223 ::GetBestControlRect( (ControlHandle
) m_macControl
, &bestsize
, &baselineoffset
) ;
225 if ( EmptyRect( &bestsize
) )
228 bestsize
.left
= bestsize
.top
= 0 ;
229 bestsize
.right
= 16 ;
230 bestsize
.bottom
= 16 ;
231 if ( IsKindOf( CLASSINFO( wxScrollBar
) ) )
233 bestsize
.bottom
= 16 ;
235 else if ( IsKindOf( CLASSINFO( wxSpinButton
) ) )
237 bestsize
.bottom
= 24 ;
241 bestWidth
= bestsize
.right
- bestsize
.left
;
243 bestWidth
+= 2 * m_macHorizontalBorder
;
245 bestHeight
= bestsize
.bottom
- bestsize
.top
;
246 if ( bestHeight
< 10 )
249 bestHeight
+= 2 * m_macVerticalBorder
;
252 return wxSize(bestWidth
, bestHeight
);
255 bool wxControl::ProcessCommand (wxCommandEvent
& event
)
258 // 1) OnCommand, starting at this window and working up parent hierarchy
259 // 2) OnCommand then calls ProcessEvent to search the event tables.
260 return GetEventHandler()->ProcessEvent(event
);
263 // ------------------------
264 wxList
*wxWinMacControlList
= NULL
;
265 wxControl
*wxFindControlFromMacControl(ControlHandle inControl
)
267 wxNode
*node
= wxWinMacControlList
->Find((long)inControl
);
270 return (wxControl
*)node
->GetData();
273 void wxAssociateControlWithMacControl(ControlHandle inControl
, wxControl
*control
)
275 // adding NULL WindowRef is (first) surely a result of an error and
276 // (secondly) breaks menu command processing
277 wxCHECK_RET( inControl
!= (ControlHandle
) NULL
, wxT("attempt to add a NULL WindowRef to window list") );
279 if ( !wxWinMacControlList
->Find((long)inControl
) )
280 wxWinMacControlList
->Append((long)inControl
, control
);
283 void wxRemoveMacControlAssociation(wxControl
*control
)
285 if ( wxWinMacControlList
)
286 wxWinMacControlList
->DeleteObject(control
);
289 void wxControl::MacPreControlCreate( wxWindow
*parent
, wxWindowID id
, wxString label
,
291 const wxSize
& size
, long style
,
292 const wxValidator
& validator
,
293 const wxString
& name
, WXRECTPTR outBounds
, unsigned char* maclabel
)
297 // These sizes will be adjusted in MacPostControlCreate
303 ((Rect
*)outBounds
)->top
= -10;
304 ((Rect
*)outBounds
)->left
= -10;
305 ((Rect
*)outBounds
)->bottom
= 0;
306 ((Rect
*)outBounds
)->right
= 0;
308 wxMacStringToPascal( wxStripMenuCodes(label
) , maclabel
) ;
311 void wxControl::MacPostControlCreate()
313 wxASSERT_MSG( (ControlHandle
) m_macControl
!= NULL
, wxT("No valid mac control") ) ;
314 DoSetWindowVariant( m_windowVariant
) ;
316 if ( IsKindOf( CLASSINFO( wxScrollBar ) ) )
320 else if ( !UMAHasAquaLayout() && (IsKindOf( CLASSINFO( wxStaticBox ) ) || IsKindOf( CLASSINFO( wxRadioBox ) ) || IsKindOf( CLASSINFO( wxButton ) ) ) )
322 ControlFontStyleRec controlstyle ;
323 controlstyle.flags = kControlUseFontMask ;
324 controlstyle.font = kControlFontSmallBoldSystemFont ;
326 ::SetControlFontStyle( (ControlHandle) m_macControl , &controlstyle ) ;
330 ControlFontStyleRec controlstyle ;
331 controlstyle.flags = kControlUseFontMask ;
333 if (IsKindOf( CLASSINFO( wxButton ) ) )
334 controlstyle.font = kControlFontBigSystemFont ; // eventually kControlFontBigSystemFont ;
336 controlstyle.font = kControlFontSmallSystemFont ;
338 ::SetControlFontStyle( (ControlHandle) m_macControl , &controlstyle ) ;
341 ControlHandle container
= (ControlHandle
) GetParent()->MacGetContainerForEmbedding() ;
342 wxASSERT_MSG( container
!= NULL
, wxT("No valid mac container control") ) ;
343 ::EmbedControl( (ControlHandle
) m_macControl
, container
) ;
344 m_macControlIsShown
= MacIsReallyShown() ;
346 wxAssociateControlWithMacControl( (ControlHandle
) m_macControl
, this ) ;
347 if ( wxMacSetupControlBackgroundUPP
== NULL
)
349 wxMacSetupControlBackgroundUPP
= NewControlColorUPP( wxMacSetupControlBackground
) ;
351 if ( wxMacControlActionUPP
== NULL
)
353 wxMacControlActionUPP
= NewControlDefUPP( wxMacControlDefinition
) ;
355 // The following block of code is responsible for crashes when switching
356 // back to windows, which can be seen in the dialogs sample.
357 // It is disabled until a proper solution can be found.
361 only working under classic carbon
362 m_macControlAction = *(**(ControlHandle)m_macControl).contrlDefProc ;
363 (**(ControlHandle)m_macControl).contrlDefProc = (Handle) &wxMacControlActionUPP ;
366 m_macControlAction
= *(**(ControlHandle
)m_macControl
).contrlDefProc
;
369 cdef
= (cdefHandle
) NewHandle( sizeof(cdefRec
) ) ;
370 if ( (**(ControlHandle
)m_macControl
).contrlDefProc
!= NULL
)
372 (**cdef
).instruction
= 0x4EF9; /* JMP instruction */
373 (**cdef
).function
= (void(*)()) wxMacControlActionUPP
;
374 (**(ControlHandle
)m_macControl
).contrlDefProc
= (Handle
) cdef
;
378 SetControlColorProc( (ControlHandle
) m_macControl
, wxMacSetupControlBackgroundUPP
) ;
380 // Adjust the controls size and position
381 wxPoint
pos(m_x
, m_y
);
382 wxSize
best_size( DoGetBestSize() );
383 wxSize
new_size( m_width
, m_height
);
385 m_x
= m_y
= m_width
= m_height
= -1; // Forces SetSize to move/size the control
387 if (new_size
.x
== -1) {
388 new_size
.x
= best_size
.x
;
390 if (new_size
.y
== -1) {
391 new_size
.y
= best_size
.y
;
394 SetSize(pos
.x
, pos
.y
, new_size
.x
, new_size
.y
);
397 UMASetControlTitle( (ControlHandle
) m_macControl
, wxStripMenuCodes(m_label
) , m_font
.GetEncoding() ) ;
400 if ( m_macControlIsShown
)
401 UMAShowControl( (ControlHandle
) m_macControl
) ;
403 SetCursor( *wxSTANDARD_CURSOR
) ;
408 void wxControl::MacAdjustControlRect()
410 wxASSERT_MSG( (ControlHandle
) m_macControl
!= NULL
, wxT("No valid mac control") ) ;
411 if ( m_width
== -1 || m_height
== -1 )
413 Rect bestsize
= { 0 , 0 , 0 , 0 } ;
414 short baselineoffset
;
416 ::GetBestControlRect( (ControlHandle
) m_macControl
, &bestsize
, &baselineoffset
) ;
418 if ( EmptyRect( &bestsize
) )
421 bestsize
.left
= bestsize
.top
= 0 ;
422 bestsize
.right
= 16 ;
423 bestsize
.bottom
= 16 ;
424 if ( IsKindOf( CLASSINFO( wxScrollBar
) ) )
426 bestsize
.bottom
= 16 ;
428 else if ( IsKindOf( CLASSINFO( wxSpinButton
) ) )
430 bestsize
.bottom
= 24 ;
436 if ( IsKindOf( CLASSINFO( wxButton
) ) )
438 m_width
= m_label
.Length() * 8 + 12 ;
442 else if ( IsKindOf( CLASSINFO( wxStaticText
) ) )
444 m_width
= m_label
.Length() * 8 ;
447 m_width
= bestsize
.right
- bestsize
.left
;
449 m_width
+= 2 * m_macHorizontalBorder
+ MacGetLeftBorderSize() + MacGetRightBorderSize() ;
451 if ( m_height
== -1 )
453 m_height
= bestsize
.bottom
- bestsize
.top
;
457 m_height
+= 2 * m_macVerticalBorder
+ MacGetTopBorderSize() + MacGetBottomBorderSize() ;
459 MacUpdateDimensions() ;
463 WXWidget
wxControl::MacGetContainerForEmbedding()
466 return m_macControl
;
468 return wxWindow::MacGetContainerForEmbedding() ;
471 void wxControl::MacUpdateDimensions()
473 // actually in the current systems this should never be possible, but later reparenting
474 // may become a reality
476 if ( (ControlHandle
) m_macControl
== NULL
)
479 if ( GetParent() == NULL
)
482 WindowRef rootwindow
= (WindowRef
) MacGetRootWindow() ;
483 if ( rootwindow
== NULL
)
487 GetControlBounds( (ControlHandle
) m_macControl
, &oldBounds
) ;
489 int new_x
= m_x
+ MacGetLeftBorderSize() + m_macHorizontalBorder
;
490 int new_y
= m_y
+ MacGetTopBorderSize() + m_macVerticalBorder
;
491 int new_width
= m_width
- MacGetLeftBorderSize() - MacGetRightBorderSize() - 2 * m_macHorizontalBorder
;
492 int new_height
= m_height
- MacGetTopBorderSize() - MacGetBottomBorderSize() - 2 * m_macVerticalBorder
;
494 GetParent()->MacWindowToRootWindow( & new_x
, & new_y
) ;
495 bool doMove
= new_x
!= oldBounds
.left
|| new_y
!= oldBounds
.top
;
496 bool doResize
= ( oldBounds
.right
- oldBounds
.left
) != new_width
|| (oldBounds
.bottom
- oldBounds
.top
) != new_height
;
497 if ( doMove
|| doResize
)
499 InvalWindowRect( rootwindow
, &oldBounds
) ;
502 UMAMoveControl( (ControlHandle
) m_macControl
, new_x
, new_y
) ;
506 UMASizeControl( (ControlHandle
) m_macControl
, new_width
, new_height
) ;
511 void wxControl::MacSuperChangedPosition()
513 MacUpdateDimensions() ;
514 wxWindow::MacSuperChangedPosition() ;
517 void wxControl::MacSuperEnabled( bool enabled
)
520 wxWindow::MacSuperEnabled( enabled
) ;
523 void wxControl::MacSuperShown( bool show
)
525 if ( (ControlHandle
) m_macControl
)
529 if ( m_macControlIsShown
)
531 ::UMAHideControl( (ControlHandle
) m_macControl
) ;
532 m_macControlIsShown
= false ;
537 if ( MacIsReallyShown() && !m_macControlIsShown
)
539 ::UMAShowControl( (ControlHandle
) m_macControl
) ;
540 m_macControlIsShown
= true ;
545 wxWindow::MacSuperShown( show
) ;
548 void wxControl::DoSetSize(int x
, int y
,
549 int width
, int height
,
552 wxWindow::DoSetSize( x
, y
,width
, height
,sizeFlags
) ;
555 Rect meta
, control
;
556 GetControlBounds( (ControlHandle
) m_macControl
, &control
) ;
557 RgnHandle rgn
= NewRgn() ;
558 GetControlRegion( (ControlHandle
) m_macControl
, kControlStructureMetaPart
, rgn
) ;
559 GetRegionBounds( rgn
, &meta
) ;
560 if ( !EmptyRect( &meta
) )
562 wxASSERT( meta
.left
>= control
.left
- m_macHorizontalBorder
) ;
563 wxASSERT( meta
.right
<= control
.right
+ m_macHorizontalBorder
) ;
564 wxASSERT( meta
.top
>= control
.top
- m_macVerticalBorder
) ;
565 wxASSERT( meta
.bottom
<= control
.bottom
+ m_macVerticalBorder
) ;
573 bool wxControl::Show(bool show
)
575 if ( !wxWindow::Show( show
) )
578 if ( (ControlHandle
) m_macControl
)
582 if ( m_macControlIsShown
)
584 ::UMAHideControl( (ControlHandle
) m_macControl
) ;
585 m_macControlIsShown
= false ;
590 if ( MacIsReallyShown() && !m_macControlIsShown
)
592 ::UMAShowControl( (ControlHandle
) m_macControl
) ;
593 m_macControlIsShown
= true ;
600 bool wxControl::Enable(bool enable
)
602 if ( !wxWindow::Enable(enable
) )
605 if ( (ControlHandle
) m_macControl
)
608 UMAActivateControl( (ControlHandle
) m_macControl
) ;
610 UMADeactivateControl( (ControlHandle
) m_macControl
) ;
615 void wxControl::Refresh(bool eraseBack
, const wxRect
*rect
)
617 wxWindow::Refresh( eraseBack
, rect
) ;
620 void wxControl::MacRedrawControl()
622 if ( (ControlHandle
) m_macControl
&& MacGetRootWindow() && m_macControlIsShown
)
624 wxClientDC
dc(this) ;
625 wxMacPortSetter
helper(&dc
) ;
626 wxMacWindowClipper
clipper(this) ;
627 wxDC::MacSetupBackgroundForCurrentPort( MacGetBackgroundBrush() ) ;
628 UMADrawControl( (ControlHandle
) m_macControl
) ;
632 void wxControl::OnPaint(wxPaintEvent
& event
)
634 if ( (ControlHandle
) m_macControl
)
637 wxMacPortSetter
helper(&dc
) ;
638 wxMacWindowClipper
clipper(this) ;
639 wxDC::MacSetupBackgroundForCurrentPort( MacGetBackgroundBrush() ) ;
640 UMADrawControl( (ControlHandle
) m_macControl
) ;
647 void wxControl::OnEraseBackground(wxEraseEvent
& event
)
649 wxWindow::OnEraseBackground( event
) ;
652 void wxControl::OnKeyDown( wxKeyEvent
&event
)
654 if ( (ControlHandle
) m_macControl
== NULL
)
663 GetEventParameter( (EventRef
) wxTheApp
->MacGetCurrentEvent(), kEventParamKeyMacCharCodes
, typeChar
, NULL
,sizeof(char), NULL
,&charCode
);
664 GetEventParameter( (EventRef
) wxTheApp
->MacGetCurrentEvent(), kEventParamKeyCode
, typeUInt32
, NULL
, sizeof(UInt32
), NULL
, &keyCode
);
665 GetEventParameter((EventRef
) wxTheApp
->MacGetCurrentEvent(), kEventParamKeyModifiers
, typeUInt32
, NULL
, sizeof(UInt32
), NULL
, &modifiers
);
667 ::HandleControlKey( (ControlHandle
) m_macControl
, keyCode
, charCode
, modifiers
) ;
670 EventRecord
*ev
= (EventRecord
*) wxTheApp
->MacGetCurrentEvent() ;
673 keychar
= short(ev
->message
& charCodeMask
);
674 keycode
= short(ev
->message
& keyCodeMask
) >> 8 ;
676 ::HandleControlKey( (ControlHandle
) m_macControl
, keycode
, keychar
, ev
->modifiers
) ;
680 void wxControl::OnMouseEvent( wxMouseEvent
&event
)
682 if ( (ControlHandle
) m_macControl
== NULL
)
688 if (event
.GetEventType() == wxEVT_LEFT_DOWN
|| event
.GetEventType() == wxEVT_LEFT_DCLICK
)
694 MacClientToRootWindow( &x
, &y
) ;
696 ControlHandle control
;
705 if ( !event
.m_leftDown
&& !event
.m_rightDown
)
706 modifiers
|= btnState
;
708 if ( event
.m_shiftDown
)
709 modifiers
|= shiftKey
;
711 if ( event
.m_controlDown
)
712 modifiers
|= controlKey
;
714 if ( event
.m_altDown
)
715 modifiers
|= optionKey
;
717 if ( event
.m_metaDown
)
718 modifiers
|= cmdKey
;
720 control
= (ControlHandle
) m_macControl
;
721 if ( control
&& ::IsControlActive( control
) )
724 controlpart
= ::HandleControlClick( control
, localwhere
, modifiers
, (ControlActionUPP
) -1 ) ;
725 wxTheApp
->s_lastMouseDown
= 0 ;
726 if ( control
&& controlpart
!= kControlNoPart
)
728 MacHandleControlClick( (WXWidget
) control
, controlpart
, false /* mouse not down anymore */ ) ;
740 bool wxControl::MacCanFocus() const
742 if ( (ControlHandle
) m_macControl
== NULL
)
748 void wxControl::MacHandleControlClick( WXWidget control
, wxInt16 controlpart
, bool WXUNUSED( mouseStillDown
) )
750 wxASSERT_MSG( (ControlHandle
) m_macControl
!= NULL
, wxT("No valid mac control") ) ;
753 void wxControl::DoSetWindowVariant( wxWindowVariant variant
)
755 if ( m_macControl
== NULL
)
757 wxWindow::SetWindowVariant( variant
) ;
761 m_windowVariant
= variant
;
764 ControlFontStyleRec fontStyle
;
765 fontStyle
.flags
= kControlUseFontMask
;
767 // we will get that from the settings later
768 // and make this NORMAL later, but first
769 // we have a few calculations that we must fix
771 if ( variant
== wxWINDOW_VARIANT_NORMAL
)
773 if ( IsKindOf( CLASSINFO( wxScrollBar
) ) )
774 variant
= wxWINDOW_VARIANT_NORMAL
;
776 variant
= wxWINDOW_VARIANT_SMALL
;
781 case wxWINDOW_VARIANT_NORMAL
:
782 size
= kControlSizeNormal
;
783 fontStyle
.font
= kControlFontBigSystemFont
;
785 case wxWINDOW_VARIANT_SMALL
:
786 size
= kControlSizeSmall
;
787 fontStyle
.font
= kControlFontSmallSystemFont
;
789 case wxWINDOW_VARIANT_MINI
:
790 if (UMAGetSystemVersion() >= 0x1030 )
792 size
= 3 ; // not always defined in the header
793 fontStyle
.font
= -5 ; // not always defined in the header
797 size
= kControlSizeSmall
;
798 fontStyle
.font
= kControlFontSmallSystemFont
;
802 case wxWINDOW_VARIANT_LARGE
:
803 size
= kControlSizeLarge
;
804 fontStyle
.font
= kControlFontBigSystemFont
;
807 wxFAIL_MSG(_T("unexpected window variant"));
810 ::SetControlData( (ControlHandle
) m_macControl
, kControlEntireControl
, kControlSizeTag
, sizeof( ControlSize
), &size
);
811 ::SetControlFontStyle( (ControlHandle
) m_macControl
, &fontStyle
);