1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/mac/carbon/private.h
3 // Purpose: Private declarations: as this header is only included by
4 // wxWidgets itself, it may contain identifiers which don't start
6 // Author: Stefan Csomor
10 // Copyright: (c) Stefan Csomor
11 // Licence: wxWindows licence
12 /////////////////////////////////////////////////////////////////////////////
14 #ifndef _WX_PRIVATE_H_
15 #define _WX_PRIVATE_H_
19 #include <Carbon/Carbon.h>
21 #include "wx/mac/corefoundation/cfstring.h"
22 #include "wx/mac/corefoundation/cfdataref.h"
24 #if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
25 typedef UInt32 URefCon
;
26 typedef SInt32 SRefCon
;
31 #include "wx/listbox.h"
35 class wxMacPortStateHelper
37 DECLARE_NO_COPY_CLASS(wxMacPortStateHelper
)
40 wxMacPortStateHelper( GrafPtr newport
);
41 wxMacPortStateHelper();
42 ~wxMacPortStateHelper();
44 void Setup( GrafPtr newport
);
46 bool IsCleared() { return m_clip
== NULL
; }
47 GrafPtr
GetCurrentPort() { return m_currentPort
; }
50 GrafPtr m_currentPort
;
53 ThemeDrawingState m_drawingState
;
60 class WXDLLEXPORT wxMacPortSaver
62 DECLARE_NO_COPY_CLASS(wxMacPortSaver
)
65 wxMacPortSaver( GrafPtr port
);
71 class WXDLLEXPORT wxMacPortSetter
73 DECLARE_NO_COPY_CLASS(wxMacPortSetter
)
76 wxMacPortSetter( const wxDC
* dc
);
79 wxMacPortStateHelper m_ph
;
84 Clips to the visible region of a control within the current port
87 class WXDLLEXPORT wxMacWindowClipper
: public wxMacPortSaver
89 DECLARE_NO_COPY_CLASS(wxMacWindowClipper
)
92 wxMacWindowClipper( const wxWindow
* win
);
93 ~wxMacWindowClipper();
96 RgnHandle m_formerClip
;
100 class WXDLLEXPORT wxMacWindowStateSaver
: public wxMacWindowClipper
102 DECLARE_NO_COPY_CLASS(wxMacWindowStateSaver
)
105 wxMacWindowStateSaver( const wxWindow
* win
);
106 ~wxMacWindowStateSaver();
109 ThemeDrawingState m_themeDrawingState
;
113 #if wxMAC_USE_CORE_GRAPHICS
114 class WXDLLEXPORT wxMacCGContextStateSaver
116 DECLARE_NO_COPY_CLASS(wxMacCGContextStateSaver
)
119 wxMacCGContextStateSaver( CGContextRef cg
)
122 CGContextSaveGState( cg
);
124 ~wxMacCGContextStateSaver()
126 CGContextRestoreGState( m_cg
);
134 class wxMacDrawingHelper
136 DECLARE_NO_COPY_CLASS(wxMacDrawingHelper)
139 wxMacDrawingHelper( wxWindowMac * theWindow , bool clientArea = false );
140 ~wxMacDrawingHelper();
141 bool Ok() const { return IsOk(); }
142 bool IsOk() { return m_ok; }
143 void LocalToWindow( Rect *rect) { OffsetRect( rect , m_origin.h , m_origin.v ); }
144 void LocalToWindow( Point *pt ) { AddPt( m_origin , pt ); }
145 void LocalToWindow( RgnHandle rgn ) { OffsetRgn( rgn , m_origin.h , m_origin.v ); }
146 const Point& GetOrigin() { return m_origin; }
149 GrafPtr m_formerPort;
150 GrafPtr m_currentPort;
151 PenState m_savedPenState;
157 bool wxMacConvertEventToRecord( EventRef event
, EventRecord
*rec
);
162 WXDLLIMPEXP_BASE wxString
wxMacFSSpec2MacFilename( const FSSpec
*spec
);
163 WXDLLIMPEXP_BASE
void wxMacFilename2FSSpec( const wxString
&path
, FSSpec
*spec
);
166 WXDLLIMPEXP_BASE wxString
wxMacFindFolderNoSeparator(short vRefNum
,
168 Boolean createFolder
);
169 WXDLLIMPEXP_BASE wxString
wxMacFindFolder(short vRefNum
,
171 Boolean createFolder
);
173 template<typename T
> EventParamType
wxMacGetEventParamType() { wxFAIL_MSG( wxT("Unknown Param Type") ); return 0; }
174 template<> inline EventParamType wxMacGetEventParamType
<RgnHandle
>() { return typeQDRgnHandle
; }
175 template<> inline EventParamType wxMacGetEventParamType
<ControlRef
>() { return typeControlRef
; }
176 template<> inline EventParamType wxMacGetEventParamType
<WindowRef
>() { return typeWindowRef
; }
177 template<> inline EventParamType wxMacGetEventParamType
<MenuRef
>() { return typeMenuRef
; }
178 template<> inline EventParamType wxMacGetEventParamType
<EventRef
>() { return typeEventRef
; }
179 template<> inline EventParamType wxMacGetEventParamType
<Point
>() { return typeQDPoint
; }
180 template<> inline EventParamType wxMacGetEventParamType
<Rect
>() { return typeQDRectangle
; }
181 template<> inline EventParamType wxMacGetEventParamType
<Boolean
>() { return typeBoolean
; }
182 template<> inline EventParamType wxMacGetEventParamType
<SInt16
>() { return typeSInt16
; }
183 template<> inline EventParamType wxMacGetEventParamType
<SInt32
>() { return typeSInt32
; }
184 template<> inline EventParamType wxMacGetEventParamType
<UInt32
>() { return typeUInt32
; }
185 template<> inline EventParamType wxMacGetEventParamType
<RGBColor
>() { return typeRGBColor
; }
186 template<> inline EventParamType wxMacGetEventParamType
<HICommand
>() { return typeHICommand
; }
187 template<> inline EventParamType wxMacGetEventParamType
<HIPoint
>() { return typeHIPoint
; }
188 template<> inline EventParamType wxMacGetEventParamType
<HISize
>() { return typeHISize
; }
189 template<> inline EventParamType wxMacGetEventParamType
<HIRect
>() { return typeHIRect
; }
190 template<> inline EventParamType wxMacGetEventParamType
<void*>() { return typeVoidPtr
; }
191 template<> inline EventParamType wxMacGetEventParamType
<CFDictionaryRef
>() { return typeCFDictionaryRef
; }
192 template<> inline EventParamType wxMacGetEventParamType
<Collection
>() { return typeCollection
; }
193 template<> inline EventParamType wxMacGetEventParamType
<CGContextRef
>() { return typeCGContextRef
; }
196 template<> EventParamType wxMacGetEventParamType<GrafPtr>() { return typeGrafPtr; }
197 template<> EventParamType wxMacGetEventParamType<OSStatus>() { return typeOSStatus; }
198 template<> EventParamType wxMacGetEventParamType<CFIndex>() { return typeCFIndex; }
199 template<> EventParamType wxMacGetEventParamType<GWorldPtr>() { return typeGWorldPtr; }
202 class wxMacCarbonEvent
212 wxMacCarbonEvent( EventRef event
, bool release
= false )
218 wxMacCarbonEvent(UInt32 inClassID
,UInt32 inKind
,EventTime inWhen
= 0 /*now*/,EventAttributes inAttributes
=kEventAttributeNone
)
221 verify_noerr( MacCreateEvent( NULL
, inClassID
, inKind
,inWhen
,inAttributes
,&m_eventRef
) );
228 ReleaseEvent( m_eventRef
);
231 OSStatus
Create(UInt32 inClassID
,UInt32 inKind
,EventTime inWhen
= 0 /*now*/,EventAttributes inAttributes
=kEventAttributeNone
)
233 verify( (m_eventRef
== NULL
) || m_release
);
234 if ( m_eventRef
&& m_release
)
236 ReleaseEvent( m_eventRef
);
240 OSStatus err
= MacCreateEvent( NULL
, inClassID
, inKind
,inWhen
,inAttributes
,&m_eventRef
);
246 OSStatus
GetParameter( EventParamName inName
, EventParamType inDesiredType
, UInt32 inBufferSize
, void * outData
);
248 template <typename T
> OSStatus
GetParameter( EventParamName inName
, EventParamType type
, T
*data
)
250 return GetParameter( inName
, type
, sizeof( T
) , data
);
252 template <typename T
> OSStatus
GetParameter( EventParamName inName
, T
*data
)
254 return GetParameter
<T
>( inName
, wxMacGetEventParamType
<T
>() , data
);
257 template <typename T
> T
GetParameter( EventParamName inName
)
260 verify_noerr( GetParameter
<T
>( inName
, &value
) );
263 template <typename T
> T
GetParameter( EventParamName inName
, EventParamType inDesiredType
)
266 verify_noerr( GetParameter
<T
>( inName
, inDesiredType
, &value
) );
270 OSStatus
SetParameter( EventParamName inName
, EventParamType inType
, UInt32 inSize
, const void * inData
);
271 template <typename T
> OSStatus
SetParameter( EventParamName inName
, EventParamType inDesiredType
, const T
*data
)
273 return SetParameter( inName
, inDesiredType
, sizeof( T
) , data
);
275 template <typename T
> OSStatus
SetParameter( EventParamName inName
, EventParamType inDesiredType
, const T
& data
)
277 return SetParameter
<T
>( inName
, inDesiredType
, &data
);
279 template <typename T
> OSStatus
SetParameter( EventParamName inName
, const T
*data
)
281 return SetParameter
<T
>( inName
, wxMacGetEventParamType
<T
>() , data
);
283 template <typename T
> OSStatus
SetParameter( EventParamName inName
, const T
& data
)
285 return SetParameter
<T
>( inName
, wxMacGetEventParamType
<T
>() , &data
);
289 return ::GetEventClass( m_eventRef
);
293 return ::GetEventKind( m_eventRef
);
297 return ::GetEventTime( m_eventRef
);
301 return EventTimeToTicks( GetTime() );
303 OSStatus
SetCurrentTime( )
305 return ::SetEventTime( m_eventRef
, GetCurrentEventTime() );
307 OSStatus
SetTime( EventTime when
)
309 return ::SetEventTime( m_eventRef
, when
);
311 operator EventRef () { return m_eventRef
; }
313 bool IsValid() { return m_eventRef
!= 0; }
320 // helper class for allocating and deallocating Universal Proc Ptrs
323 template <typename procType
, typename uppType
, uppType (*newUPP
)(procType
) , void (*disposeUPP
)(uppType
) > class wxMacUPP
326 wxMacUPP( procType
WXUNUSED(proc
) )
329 m_upp
= (*newUPP
)( NULL
);
336 operator uppType() { return m_upp
; }
341 typedef wxMacUPP
<NMProcPtr
,NMUPP
,NewNMUPP
,DisposeNMUPP
> wxMacNMUPP
;
343 template <typename refType
> class wxMacCFRefHolder
347 : m_ref(NULL
) , m_release(false)
351 wxMacCFRefHolder( refType ref
, bool release
= true )
352 : m_ref(ref
) , m_release(release
)
363 if ( m_release
&& m_ref
!= NULL
)
376 void Set( refType ref
, bool release
= true )
383 operator refType () const { return m_ref
; }
385 wxMacCFRefHolder
& operator=(refType r
)
394 DECLARE_NO_COPY_CLASS( wxMacCFRefHolder
)
399 class wxMacToolTipTimer
;
407 void Setup( WindowRef window
, const wxString
& text
, const wxPoint
& localPosition
) ;
422 PicHandle m_backpict
;
426 wxMacToolTipTimer
* m_timer
;
428 wxMacCFStringHolder m_helpTextRef
;
432 GWorldPtr wxMacCreateGWorld( int width , int height , int depth );
433 void wxMacDestroyGWorld( GWorldPtr gw );
434 PicHandle wxMacCreatePict( GWorldPtr gw , GWorldPtr mask = NULL );
435 CIconHandle wxMacCreateCIcon(GWorldPtr image , GWorldPtr mask , short dstDepth , short iconSize );
436 void wxMacSetColorTableEntry( CTabHandle newColors , int index , int red , int green , int blue );
437 CTabHandle wxMacCreateColorTable( int numColors );
439 void wxMacCreateBitmapButton( ControlButtonContentInfo
*info
, const wxBitmap
& bitmap
, int forceType
= 0 );
440 void wxMacReleaseBitmapButton( ControlButtonContentInfo
*info
);
441 CGImageRef
wxMacCreateCGImageFromBitmap( const wxBitmap
& bitmap
);
443 #define MAC_WXCOLORREF(a) (*((RGBColor*)&(a)))
444 #define MAC_WXHBITMAP(a) (GWorldPtr(a))
445 #define MAC_WXHMETAFILE(a) (PicHandle(a))
446 #define MAC_WXHICON(a) (IconRef(a))
447 #define MAC_WXHCURSOR(a) (CursHandle(a))
448 #define MAC_WXHRGN(a) (RgnHandle(a))
449 #define MAC_WXHWND(a) (WindowPtr(a))
450 #define MAC_WXRECPTR(a) ((Rect*)a)
451 #define MAC_WXPOINTPTR(a) ((Point*)a)
452 #define MAC_WXHMENU(a) ((MenuHandle)a)
454 struct wxOpaqueWindowRef
456 wxOpaqueWindowRef( WindowRef ref
) { m_data
= ref
; }
457 operator WindowRef() { return m_data
; }
462 void wxMacRectToNative( const wxRect
*wx
, Rect
*n
);
463 void wxMacNativeToRect( const Rect
*n
, wxRect
* wx
);
464 void wxMacPointToNative( const wxPoint
* wx
, Point
*n
);
465 void wxMacNativeToPoint( const Point
*n
, wxPoint
* wx
);
467 WXDLLIMPEXP_CORE wxWindow
* wxFindControlFromMacControl(ControlRef inControl
);
468 WXDLLIMPEXP_CORE wxTopLevelWindowMac
* wxFindWinFromMacWindow( WindowRef inWindow
);
469 WXDLLIMPEXP_CORE wxMenu
* wxFindMenuFromMacMenu(MenuRef inMenuRef
);
471 WXDLLIMPEXP_CORE
int wxMacCommandToId( UInt32 macCommandId
);
472 WXDLLIMPEXP_CORE UInt32
wxIdToMacCommand( int wxId
);
473 WXDLLIMPEXP_CORE wxMenu
* wxFindMenuFromMacCommand( const HICommand
&macCommandId
, wxMenuItem
* &item
);
475 extern wxWindow
* g_MacLastWindow
;
476 WXDLLIMPEXP_CORE
pascal OSStatus
wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler
, EventRef event
, void *data
);
477 WXDLLIMPEXP_CORE Rect
wxMacGetBoundsForControl( wxWindow
* window
, const wxPoint
& pos
, const wxSize
&size
, bool adjustForOrigin
= true );
479 ControlActionUPP
GetwxMacLiveScrollbarActionProc();
481 class wxMacControl
: public wxObject
484 wxMacControl( wxWindow
* peer
, bool isRootControl
= false );
485 wxMacControl( wxWindow
* peer
, ControlRef control
);
486 wxMacControl( wxWindow
* peer
, WXWidget control
);
488 virtual ~wxMacControl();
492 virtual void Dispose();
494 bool Ok() const { return IsOk(); }
495 bool IsOk() const { return GetControlRef() != NULL
; }
497 void SetReferenceInNativeControl();
498 static wxMacControl
* GetReferenceFromNativeControl(ControlRef control
);
500 virtual ControlRef
* GetControlRefAddr() { return &m_controlRef
; }
501 virtual ControlRef
GetControlRef() const { return m_controlRef
; }
503 virtual void SetReference( URefCon data
);
505 void operator= (ControlRef c) { m_controlRef = c; }
506 operator ControlRef () { return m_controlRef; }
507 operator ControlRef * () { return &m_controlRef; }
509 // accessing data and values
511 virtual OSStatus
SetData( ControlPartCode inPartCode
, ResType inTag
, Size inSize
, const void * inData
);
512 virtual OSStatus
GetData( ControlPartCode inPartCode
, ResType inTag
, Size inBufferSize
, void * inOutBuffer
, Size
* outActualSize
) const;
513 virtual OSStatus
GetDataSize( ControlPartCode inPartCode
, ResType inTag
, Size
* outActualSize
) const;
514 virtual OSStatus
SendEvent( EventRef ref
, OptionBits inOptions
= 0 );
515 virtual OSStatus
SendHICommand( HICommand
&command
, OptionBits inOptions
= 0 );
517 virtual OSStatus
SendHICommand( UInt32 commandID
, OptionBits inOptions
= 0 );
519 virtual SInt32
GetValue() const;
520 virtual SInt32
GetMaximum() const;
521 virtual SInt32
GetMinimum() const;
523 virtual void SetValue( SInt32 v
);
524 virtual void SetMinimum( SInt32 v
);
525 virtual void SetMaximum( SInt32 v
);
527 virtual void SetValueAndRange( SInt32 value
, SInt32 minimum
, SInt32 maximum
);
528 virtual void SetRange( SInt32 minimum
, SInt32 maximum
);
530 virtual OSStatus
SetFocus( ControlFocusPart focusPart
);
531 virtual bool HasFocus() const;
532 virtual bool NeedsFocusRect() const;
533 virtual void SetNeedsFocusRect( bool needs
);
537 Size
GetDataSize( ControlPartCode inPartCode
, ResType inTag
) const
540 verify_noerr( GetDataSize( inPartCode
, inTag
, &sz
) );
543 template <typename T
> OSStatus
SetData( ControlPartCode inPartCode
, ResType inTag
, const T
*data
)
545 return SetData( inPartCode
, inTag
, sizeof( T
) , data
);
547 template <typename T
> OSStatus
SetData( ControlPartCode inPartCode
, ResType inTag
, const T
& data
)
549 return SetData( inPartCode
, inTag
, sizeof( T
) , &data
);
551 template <typename T
> OSStatus
SetData( ResType inTag
, const T
*data
)
553 return SetData( kControlEntireControl
, inTag
, sizeof( T
) , data
);
555 template <typename T
> OSStatus
SetData( ResType inTag
, const T
& data
)
557 return SetData( kControlEntireControl
, inTag
, sizeof( T
) , &data
);
559 template <typename T
> OSStatus
GetData( ControlPartCode inPartCode
, ResType inTag
, T
*data
) const
562 return GetData( inPartCode
, inTag
, sizeof( T
) , data
, &dummy
);
564 template <typename T
> T
GetData( ControlPartCode inPartCode
, ResType inTag
) const
567 OSStatus err
= GetData
<T
>( inPartCode
, inTag
, &value
);
569 wxASSERT_MSG( err
== noErr
,
570 wxString::Format(wxT("GetData Failed for Part [%i] and Tag [%i]"),
571 inPartCode
, (int)inTag
) );
574 template <typename T
> OSStatus
GetData( ResType inTag
, T
*data
) const
577 return GetData( kControlEntireControl
, inTag
, sizeof( T
) , data
, &dummy
);
579 template <typename T
> T
GetData( ResType inTag
) const
581 return GetData
<T
>( kControlEntireControl
, inTag
);
584 // Flash the control for the specified amount of time
585 virtual void Flash( ControlPartCode part
, UInt32 ticks
= 8 );
587 virtual void VisibilityChanged( bool shown
);
588 virtual void SuperChangedPosition();
591 virtual void SetFont( const wxFont
& font
, const wxColour
& foreground
, long windowStyle
);
592 virtual void SetBackground( const wxBrush
&brush
);
593 virtual ControlPartCode
HandleKey( SInt16 keyCode
, SInt16 charCode
, EventModifiers modifiers
);
594 void SetActionProc( ControlActionUPP actionProc
);
595 void SetViewSize( SInt32 viewSize
);
596 SInt32
GetViewSize() const;
598 virtual bool IsVisible() const;
599 virtual void SetVisibility( bool visible
, bool redraw
);
600 virtual bool IsEnabled() const;
601 virtual bool IsActive() const;
602 virtual void Enable( bool enable
);
604 // invalidates this control and all children
605 virtual void InvalidateWithChildren();
606 virtual void SetDrawingEnabled( bool enable
);
607 virtual bool GetNeedsDisplay() const;
609 // where is in native window relative coordinates
610 virtual void SetNeedsDisplay( RgnHandle where
);
611 // where is in native window relative coordinates
612 virtual void SetNeedsDisplay( Rect
* where
= NULL
);
614 // if rect = NULL, entire view
615 virtual void ScrollRect( wxRect
*rect
, int dx
, int dy
);
617 // in native parent window relative coordinates
618 virtual void GetRect( Rect
*r
);
620 // in native parent window relative coordinates
621 virtual void SetRect( Rect
*r
);
623 virtual void GetRectInWindowCoords( Rect
*r
);
624 virtual void GetBestRect( Rect
*r
);
625 virtual void SetLabel( const wxString
&title
);
626 // converts from Toplevel-Content relative to local
627 static void Convert( wxPoint
*pt
, wxMacControl
*convert
, wxMacControl
*to
);
629 virtual void GetFeatures( UInt32
*features
);
630 virtual OSStatus
GetRegion( ControlPartCode partCode
, RgnHandle region
);
631 virtual OSStatus
SetZOrder( bool above
, wxMacControl
* other
);
633 bool IsRootControl() { return m_isRootControl
; }
635 wxWindow
* GetPeer() const
640 // to be moved into a tab control class
642 virtual OSStatus
SetTabEnabled( SInt16 tabNo
, bool enable
);
644 ControlRef m_controlRef
;
648 bool m_needsFocusRect
;
649 bool m_isRootControl
;
650 DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacControl
)
653 // ============================================================================
654 // DataBrowser Wrapper
655 // ============================================================================
657 // basing on DataBrowserItemIDs
660 class wxMacDataBrowserControl
: public wxMacControl
663 wxMacDataBrowserControl( wxWindow
* peer
, const wxPoint
& pos
, const wxSize
& size
, long style
);
664 wxMacDataBrowserControl() {}
666 OSStatus
SetCallbacks( const DataBrowserCallbacks
*callbacks
);
668 OSStatus
GetItemCount( DataBrowserItemID container
,
670 DataBrowserItemState state
,
671 ItemCount
*numItems
) const;
673 OSStatus
GetItems( DataBrowserItemID container
,
675 DataBrowserItemState state
,
679 OSStatus
AddColumn( DataBrowserListViewColumnDesc
*columnDesc
,
680 DataBrowserTableViewColumnIndex position
);
682 OSStatus
RemoveColumn( DataBrowserTableViewColumnIndex position
);
684 OSStatus
AutoSizeColumns();
686 OSStatus
SetHasScrollBars( bool horiz
, bool vert
);
687 OSStatus
SetHiliteStyle( DataBrowserTableViewHiliteStyle hiliteStyle
);
689 OSStatus
SetHeaderButtonHeight( UInt16 height
);
690 OSStatus
GetHeaderButtonHeight( UInt16
*height
);
692 OSStatus
UpdateItems( DataBrowserItemID container
, UInt32 numItems
,
693 const DataBrowserItemID
*items
,
694 DataBrowserPropertyID preSortProperty
,
695 DataBrowserPropertyID propertyID
) const;
697 OSStatus
AddItems( DataBrowserItemID container
, UInt32 numItems
,
698 const DataBrowserItemID
*items
,
699 DataBrowserPropertyID preSortProperty
);
700 OSStatus
RemoveItems( DataBrowserItemID container
, UInt32 numItems
,
701 const DataBrowserItemID
*items
,
702 DataBrowserPropertyID preSortProperty
);
703 OSStatus
RevealItem( DataBrowserItemID item
,
704 DataBrowserPropertyID propertyID
,
705 DataBrowserRevealOptions options
) const;
707 OSStatus
SetSelectionFlags( DataBrowserSelectionFlags
);
708 OSStatus
GetSelectionAnchor( DataBrowserItemID
*first
, DataBrowserItemID
*last
) const;
709 bool IsItemSelected( DataBrowserItemID item
) const;
710 OSStatus
SetSelectedItems( UInt32 numItems
,
711 const DataBrowserItemID
*items
,
712 DataBrowserSetOption operation
);
714 OSStatus
GetItemID( DataBrowserTableViewRowIndex row
,
715 DataBrowserItemID
* item
) const;
716 OSStatus
GetItemRow( DataBrowserItemID item
,
717 DataBrowserTableViewRowIndex
* row
) const;
719 OSStatus
SetDefaultRowHeight( UInt16 height
);
720 OSStatus
GetDefaultRowHeight( UInt16
* height
) const;
722 OSStatus
SetRowHeight( DataBrowserItemID item
, UInt16 height
);
723 OSStatus
GetRowHeight( DataBrowserItemID item
, UInt16
*height
) const;
725 OSStatus
GetColumnWidth( DataBrowserPropertyID column
, UInt16
*width
) const;
726 OSStatus
SetColumnWidth( DataBrowserPropertyID column
, UInt16 width
);
728 OSStatus
GetDefaultColumnWidth( UInt16
*width
) const;
729 OSStatus
SetDefaultColumnWidth( UInt16 width
);
731 OSStatus
GetColumnCount( UInt32
* numColumns
) const;
733 OSStatus
GetColumnIDFromIndex( DataBrowserTableViewColumnIndex position
, DataBrowserTableViewColumnID
* id
);
735 OSStatus
GetColumnPosition( DataBrowserPropertyID column
, DataBrowserTableViewColumnIndex
*position
) const;
736 OSStatus
SetColumnPosition( DataBrowserPropertyID column
, DataBrowserTableViewColumnIndex position
);
738 OSStatus
GetScrollPosition( UInt32
*top
, UInt32
*left
) const;
739 OSStatus
SetScrollPosition( UInt32 top
, UInt32 left
);
741 OSStatus
GetSortProperty( DataBrowserPropertyID
*column
) const;
742 OSStatus
SetSortProperty( DataBrowserPropertyID column
);
744 OSStatus
GetSortOrder( DataBrowserSortOrder
*order
) const;
745 OSStatus
SetSortOrder( DataBrowserSortOrder order
);
747 OSStatus
GetPropertyFlags( DataBrowserPropertyID property
, DataBrowserPropertyFlags
*flags
) const;
748 OSStatus
SetPropertyFlags( DataBrowserPropertyID property
, DataBrowserPropertyFlags flags
);
750 OSStatus
GetHeaderDesc( DataBrowserPropertyID property
, DataBrowserListViewHeaderDesc
*desc
) const;
751 OSStatus
SetHeaderDesc( DataBrowserPropertyID property
, DataBrowserListViewHeaderDesc
*desc
);
753 OSStatus
SetDisclosureColumn( DataBrowserPropertyID property
, Boolean expandableRows
);
756 static pascal void DataBrowserItemNotificationProc(
758 DataBrowserItemID itemID
,
759 DataBrowserItemNotification message
,
760 DataBrowserItemDataRef itemData
);
762 virtual void ItemNotification(
763 DataBrowserItemID itemID
,
764 DataBrowserItemNotification message
,
765 DataBrowserItemDataRef itemData
) = 0;
767 static pascal OSStatus
DataBrowserGetSetItemDataProc(
769 DataBrowserItemID itemID
,
770 DataBrowserPropertyID property
,
771 DataBrowserItemDataRef itemData
,
772 Boolean changeValue
);
774 virtual OSStatus
GetSetItemData(
775 DataBrowserItemID itemID
,
776 DataBrowserPropertyID property
,
777 DataBrowserItemDataRef itemData
,
778 Boolean changeValue
) = 0;
780 static pascal Boolean
DataBrowserCompareProc(
782 DataBrowserItemID itemOneID
,
783 DataBrowserItemID itemTwoID
,
784 DataBrowserPropertyID sortProperty
);
786 virtual Boolean
CompareItems(DataBrowserItemID itemOneID
,
787 DataBrowserItemID itemTwoID
,
788 DataBrowserPropertyID sortProperty
) = 0;
789 DECLARE_ABSTRACT_CLASS(wxMacDataBrowserControl
)
792 // ============================================================================
793 // Higher-level Databrowser
794 // ============================================================================
796 // basing on data item objects
801 class wxMacDataItemBrowserControl
;
802 class wxMacListBoxItem
;
804 const DataBrowserPropertyID kTextColumnId
= 1024;
805 const DataBrowserPropertyID kNumericOrderColumnId
= 1025;
807 // for multi-column controls, we will use this + the column ID to identify the
808 // column. We don't use kTextColumnId there, and ideally the two should merge.
809 const DataBrowserPropertyID kMinColumnId
= 1050;
811 // base API for high-level databrowser operations
813 class wxMacListControl
816 virtual void MacDelete( unsigned int n
) = 0;
817 virtual void MacInsert( unsigned int n
, const wxArrayStringsAdapter
& items
, int column
= -1 ) = 0;
818 // returns index of newly created line
819 virtual int MacAppend( const wxString
& item
) = 0;
820 virtual void MacSetString( unsigned int n
, const wxString
& item
) = 0;
821 virtual void MacClear() = 0;
822 virtual void MacDeselectAll() = 0;
823 virtual void MacSetSelection( unsigned int n
, bool select
, bool multi
) = 0;
824 virtual int MacGetSelection() const = 0;
825 virtual int MacGetSelections( wxArrayInt
& aSelections
) const = 0;
826 virtual bool MacIsSelected( unsigned int n
) const = 0;
827 virtual void MacScrollTo( unsigned int n
) = 0;
828 virtual wxString
MacGetString( unsigned int n
) const = 0;
829 virtual unsigned int MacGetCount() const = 0;
831 virtual void MacSetClientData( unsigned int n
, void * data
) = 0;
832 virtual void * MacGetClientData( unsigned int) const = 0;
834 virtual ~wxMacListControl() { }
837 // base class for databrowser items
847 virtual ~wxMacDataItem();
849 virtual bool IsLessThan(wxMacDataItemBrowserControl
*owner
,
850 const wxMacDataItem
*,
851 DataBrowserPropertyID property
) const;
853 // returns true if access was successful, otherwise false
854 virtual OSStatus
GetSetData(wxMacDataItemBrowserControl
*owner
,
855 DataBrowserPropertyID property
,
856 DataBrowserItemDataRef itemData
,
859 virtual void Notification(wxMacDataItemBrowserControl
*owner
,
860 DataBrowserItemNotification message
,
861 DataBrowserItemDataRef itemData
) const;
863 void SetLabel( const wxString
& str
);
864 const wxString
& GetLabel() const;
866 void SetOrder( SInt32 order
);
867 SInt32
GetOrder() const;
869 void SetData( void* data
);
870 void* GetData() const;
872 void SetColumn( short col
);
877 wxMacCFStringHolder m_cfLabel
;
880 DataBrowserPropertyID m_colId
;
886 SortOrder_Text_Ascending
,
887 SortOrder_Text_Descending
890 typedef wxMacDataItem
* wxMacDataItemPtr
;
891 const wxMacDataItemPtr wxMacDataBrowserRootContainer
= NULL
;
893 WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxMacDataItemPtr
, wxArrayMacDataItemPtr
, class WXDLLIMPEXP_CORE
);
895 class wxMacDataItemBrowserControl
: public wxMacDataBrowserControl
, public wxMacListControl
898 wxMacDataItemBrowserControl( wxWindow
* peer
, const wxPoint
& pos
, const wxSize
& size
, long style
);
899 wxMacDataItemBrowserControl() {}
900 // create a list item (can be a subclass of wxMacListBoxItem)
902 virtual wxMacDataItem
* CreateItem();
904 unsigned int GetItemCount(const wxMacDataItem
* container
, bool recurse
, DataBrowserItemState state
) const;
905 void GetItems(const wxMacDataItem
* container
, bool recurse
,
906 DataBrowserItemState state
, wxArrayMacDataItemPtr
&items
) const;
908 unsigned int GetSelectedItemCount( const wxMacDataItem
* container
, bool recurse
) const;
910 unsigned int GetLineFromItem(const wxMacDataItem
*item
) const;
911 wxMacDataItem
* GetItemFromLine(unsigned int n
) const;
913 void UpdateItem(const wxMacDataItem
*container
, const wxMacDataItem
*item
,
914 DataBrowserPropertyID property
) const;
915 void UpdateItems(const wxMacDataItem
*container
, wxArrayMacDataItemPtr
&items
,
916 DataBrowserPropertyID property
) const;
918 void InsertColumn(int colId
, DataBrowserPropertyType colType
,
919 const wxString
& title
, SInt16 just
= teFlushDefault
, int defaultWidth
= -1);
921 int GetColumnWidth(int colId
);
922 void SetColumnWidth(int colId
, int width
);
924 void AddItem(wxMacDataItem
*container
, wxMacDataItem
*item
);
925 void AddItems(wxMacDataItem
*container
, wxArrayMacDataItemPtr
&items
);
927 void RemoveAllItems(wxMacDataItem
*container
);
928 void RemoveItem(wxMacDataItem
*container
, wxMacDataItem
* item
);
929 void RemoveItems(wxMacDataItem
*container
, wxArrayMacDataItemPtr
&items
);
931 void SetSelectedItem( wxMacDataItem
* item
, DataBrowserSetOption option
);
932 void SetSelectedItems( wxArrayMacDataItemPtr
&items
, DataBrowserSetOption option
);
933 void SetSelectedAllItems( DataBrowserSetOption option
);
934 Boolean
IsItemSelected( const wxMacDataItem
* item
) const;
936 void RevealItem( wxMacDataItem
* item
, DataBrowserRevealOptions options
);
938 void GetSelectionAnchor( wxMacDataItemPtr
* first
, wxMacDataItemPtr
* last
) const;
940 // item aware methods, to be used in subclasses
942 virtual Boolean
CompareItems(const wxMacDataItem
* itemOneID
,
943 const wxMacDataItem
* itemTwoID
,
944 DataBrowserPropertyID sortProperty
);
946 virtual OSStatus
GetSetItemData(wxMacDataItem
* itemID
,
947 DataBrowserPropertyID property
,
948 DataBrowserItemDataRef itemData
,
949 Boolean changeValue
);
951 virtual void ItemNotification(
952 const wxMacDataItem
* itemID
,
953 DataBrowserItemNotification message
,
954 DataBrowserItemDataRef itemData
);
956 // as we are getting the same events for human and API selection we have to suppress
957 // events in the latter case, since this will be used from many subclasses we keep it here
959 bool IsSelectionSuppressed() const { return m_suppressSelection
; }
960 bool SuppressSelection( bool suppress
);
963 // wxMacListControl Methods
966 virtual void MacDelete( unsigned int n
);
967 virtual void MacInsert( unsigned int n
, const wxArrayStringsAdapter
& items
, int column
= -1 );
968 virtual int MacAppend( const wxString
& item
);
969 virtual void MacClear();
973 virtual void MacDeselectAll();
974 virtual void MacSetSelection( unsigned int n
, bool select
, bool multi
= false );
975 virtual int MacGetSelection() const;
976 virtual int MacGetSelections( wxArrayInt
& aSelections
) const;
977 virtual bool MacIsSelected( unsigned int n
) const;
981 virtual void MacScrollTo( unsigned int n
);
985 virtual void MacSetString( unsigned int n
, const wxString
& item
);
986 virtual void MacSetClientData( unsigned int n
, void * data
);
987 virtual wxString
MacGetString( unsigned int n
) const;
988 virtual void * MacGetClientData( unsigned int) const;
989 virtual unsigned int MacGetCount() const;
993 virtual wxClientDataType
GetClientDataType() const;
994 virtual void SetClientDataType(wxClientDataType clientDataItemsType
);
995 //virtual ListSortOrder GetSortOrder() const;
996 //virtual void SetSortOrder(const ListSortOrder sort);
1002 ListSortOrder m_sortOrder
;
1003 wxClientDataType m_clientDataItemsType
;
1005 // ID aware base methods, should be 'final' ie not changed in subclasses
1007 virtual Boolean
CompareItems(DataBrowserItemID itemOneID
,
1008 DataBrowserItemID itemTwoID
,
1009 DataBrowserPropertyID sortProperty
);
1011 virtual OSStatus
GetSetItemData(DataBrowserItemID itemID
,
1012 DataBrowserPropertyID property
,
1013 DataBrowserItemDataRef itemData
,
1014 Boolean changeValue
);
1016 virtual void ItemNotification(
1017 DataBrowserItemID itemID
,
1018 DataBrowserItemNotification message
,
1019 DataBrowserItemDataRef itemData
);
1024 bool m_suppressSelection
;
1025 DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacDataItemBrowserControl
)
1028 class wxMacDataItemBrowserSelectionSuppressor
1031 wxMacDataItemBrowserSelectionSuppressor(wxMacDataItemBrowserControl
*browser
);
1032 ~wxMacDataItemBrowserSelectionSuppressor();
1037 wxMacDataItemBrowserControl
* m_browser
;
1040 // ============================================================================
1041 // platform listbox implementation
1042 // ============================================================================
1044 // exposed for reuse in wxCheckListBox
1046 class wxMacListBoxItem
: public wxMacDataItem
1051 virtual ~wxMacListBoxItem();
1053 virtual void Notification(wxMacDataItemBrowserControl
*owner
,
1054 DataBrowserItemNotification message
,
1055 DataBrowserItemDataRef itemData
) const;
1058 class wxMacDataBrowserListControl
: public wxMacDataItemBrowserControl
1061 wxMacDataBrowserListControl( wxWindow
*peer
, const wxPoint
& pos
, const wxSize
& size
, long style
);
1062 wxMacDataBrowserListControl() {}
1063 virtual ~wxMacDataBrowserListControl();
1065 virtual wxMacDataItem
* CreateItem();
1069 wxWindow
* GetPeer() const;
1071 DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacDataBrowserListControl
)
1074 // ============================================================================
1075 // graphics implementation
1076 // ============================================================================
1078 // make sure we all use one class for all conversions from wx to native colour
1080 class wxMacCoreGraphicsColour
1083 wxMacCoreGraphicsColour();
1084 wxMacCoreGraphicsColour(const wxBrush
&brush
);
1085 ~wxMacCoreGraphicsColour();
1087 void Apply( CGContextRef cgContext
);
1090 wxMacCFRefHolder
<CGColorRef
> m_color
;
1091 wxMacCFRefHolder
<CGColorSpaceRef
> m_colorSpace
;
1094 wxMacCFRefHolder
<CGPatternRef
> m_pattern
;
1095 CGFloat
* m_patternColorComponents
;
1098 #if wxMAC_USE_CORE_GRAPHICS && !wxUSE_GRAPHICS_CONTEXT
1100 class WXDLLEXPORT wxMacCGPath
: public wxGraphicPath
1102 DECLARE_NO_COPY_CLASS(wxMacCGPath
)
1107 // Starts a new subpath at
1108 void MoveToPoint( wxCoord x1
, wxCoord y1
);
1109 void AddLineToPoint( wxCoord x1
, wxCoord y1
);
1110 void AddQuadCurveToPoint( wxCoord cx1
, wxCoord cy1
, wxCoord x1
, wxCoord y1
);
1111 void AddRectangle( wxCoord x
, wxCoord y
, wxCoord w
, wxCoord h
);
1112 void AddCircle( wxCoord x
, wxCoord y
, wxCoord r
);
1114 // draws a an arc to two tangents connecting (current) to (x1,y1) and (x1,y1) to (x2,y2)
1115 virtual void AddArcToPoint( wxCoord x1
, wxCoord y1
, wxCoord x2
, wxCoord y2
, wxCoord r
) ;
1116 virtual void AddArc( wxCoord x
, wxCoord y
, wxCoord r
, double startAngle
, double endAngle
, bool clockwise
) ;
1118 // closes the current subpath
1119 void CloseSubpath();
1121 CGPathRef
GetPath() const;
1123 CGMutablePathRef m_path
;
1126 class WXDLLEXPORT wxMacCGContext
: public wxGraphicContext
1128 DECLARE_NO_COPY_CLASS(wxMacCGContext
)
1131 wxMacCGContext( CGrafPtr port
);
1132 wxMacCGContext( CGContextRef cgcontext
);
1134 virtual ~wxMacCGContext();
1136 virtual void Clip( const wxRegion
®ion
);
1137 virtual void StrokePath( const wxGraphicPath
*p
);
1138 virtual void DrawPath( const wxGraphicPath
*p
, int fillStyle
= wxWINDING_RULE
);
1139 virtual void FillPath( const wxGraphicPath
*p
, const wxColor
&fillColor
, int fillStyle
= wxWINDING_RULE
);
1141 virtual wxGraphicPath
* CreatePath();
1142 virtual void SetPen( const wxPen
&pen
) ;
1143 virtual void SetBrush( const wxBrush
&brush
);
1144 CGContextRef
GetNativeContext();
1145 void SetNativeContext( CGContextRef cg
);
1146 CGPathDrawingMode
GetDrawingMode() const { return m_mode
; }
1148 virtual void Translate( wxCoord dx
, wxCoord dy
);
1149 virtual void Scale( wxCoord xScale
, wxCoord yScale
);
1150 virtual void DrawBitmap( const wxBitmap
&bmp
, wxCoord x
, wxCoord y
, wxCoord w
, wxCoord h
);
1151 virtual void DrawIcon( const wxIcon
&icon
, wxCoord x
, wxCoord y
, wxCoord w
, wxCoord h
);
1152 virtual void PushState();
1153 virtual void PopState();
1155 virtual void DrawText( const wxString
&str
, wxCoord x
, wxCoord y
, double angle
) ;
1157 virtual void GetTextExtent( const wxString
&str
, wxCoord
*width
, wxCoord
*height
,
1158 wxCoord
*descent
, wxCoord
*externalLeading
) const ;
1160 virtual void GetPartialTextExtents(const wxString
& text
, wxArrayInt
& widths
) const ;
1162 virtual void SetFont( const wxFont
&font
) ;
1164 virtual void SetTextColor( const wxColour
&col
) ;
1166 CGContextRef m_cgContext
;
1168 CGPathDrawingMode m_mode
;
1169 ATSUStyle m_macATSUIStyle
;
1172 wxColor m_textForegroundColor
;
1175 #endif // wxMAC_USE_CORE_GRAPHICS
1177 CGColorSpaceRef
wxMacGetGenericRGBColorSpace(void);
1178 void wxMacMemoryBufferReleaseProc(void *info
, const void *data
, size_t size
);
1180 class WXDLLEXPORT wxBitmapRefData
: public wxGDIRefData
1182 friend class WXDLLIMPEXP_FWD_CORE wxIcon
;
1183 friend class WXDLLIMPEXP_FWD_CORE wxCursor
;
1185 wxBitmapRefData(int width
, int height
, int depth
);
1187 wxBitmapRefData(const wxBitmapRefData
&tocopy
);
1189 virtual ~wxBitmapRefData();
1192 bool Ok() const { return IsOk(); }
1193 bool IsOk() const { return m_ok
; }
1194 void SetOk( bool isOk
) { m_ok
= isOk
; }
1196 void SetWidth( int width
) { m_width
= width
; }
1197 void SetHeight( int height
) { m_height
= height
; }
1198 void SetDepth( int depth
) { m_depth
= depth
; }
1200 int GetWidth() const { return m_width
; }
1201 int GetHeight() const { return m_height
; }
1202 int GetDepth() const { return m_depth
; }
1204 void *GetRawAccess() const;
1205 void *BeginRawAccess();
1206 void EndRawAccess();
1208 bool HasAlpha() const { return m_hasAlpha
; }
1209 void UseAlpha( bool useAlpha
);
1213 wxPalette m_bitmapPalette
;
1214 #endif // wxUSE_PALETTE
1216 wxMask
* m_bitmapMask
; // Optional mask
1217 CGImageRef
CGImageCreate() const;
1219 // returns true if the bitmap has a size that
1220 // can be natively transferred into a true icon
1221 // if no is returned GetIconRef will still produce
1222 // an icon but it will be generated via a PICT and
1223 // rescaled to 16 x 16
1224 bool HasNativeSize();
1226 // caller should increase ref count if needed longer
1227 // than the bitmap exists
1228 IconRef
GetIconRef();
1230 // returns a Pict from the bitmap content
1231 PicHandle
GetPictHandle();
1232 #if wxMAC_USE_CORE_GRAPHICS
1233 CGContextRef
GetBitmapContext() const;
1235 GWorldPtr
GetHBITMAP(GWorldPtr
* mask
= NULL
) const;
1236 void UpdateAlphaMask() const;
1238 int GetBytesPerRow() const { return m_bytesPerRow
; }
1240 bool Create(int width
, int height
, int depth
);
1248 wxMemoryBuffer m_memBuf
;
1249 int m_rawAccessCount
;
1251 mutable CGImageRef m_cgImageRef
;
1254 PicHandle m_pictHandle
;
1255 #if wxMAC_USE_CORE_GRAPHICS
1256 CGContextRef m_hBitmap
;
1258 GWorldPtr m_hBitmap
;
1259 GWorldPtr m_hMaskBitmap
;
1260 wxMemoryBuffer m_maskMemBuf
;
1261 int m_maskBytesPerRow
;
1265 class WXDLLEXPORT wxIconRefData
: public wxGDIRefData
1269 wxIconRefData( WXHICON
);
1270 virtual ~wxIconRefData() { Free(); }
1273 virtual void Free();
1275 void SetWidth( int width
) { m_width
= width
; }
1276 void SetHeight( int height
) { m_height
= height
; }
1278 int GetWidth() const { return m_width
; }
1279 int GetHeight() const { return m_height
; }
1281 WXHICON
GetHICON() const { return (WXHICON
) m_iconRef
; }
1290 class wxMacDeferredWindowDeleter
: public wxObject
1293 wxMacDeferredWindowDeleter( WindowRef windowRef
);
1294 virtual ~wxMacDeferredWindowDeleter();
1297 WindowRef m_macWindow
;
1302 #ifdef WORDS_BIGENDIAN
1303 inline Rect
* wxMacGetPictureBounds( PicHandle pict
, Rect
* rect
)
1305 *rect
= (**pict
).picFrame
;
1309 inline Rect
* wxMacGetPictureBounds( PicHandle pict
, Rect
* rect
)
1311 return QDGetPictureBounds( pict
, rect
);
1319 #define wxMAC_DEFINE_PROC_GETTER( UPP , x ) \
1322 static UPP sHandler = NULL; \
1323 if ( sHandler == NULL ) \
1324 sHandler = New##UPP( x ); \
1328 //---------------------------------------------------------------------------
1329 // wxMac string conversions
1330 //---------------------------------------------------------------------------
1332 void wxMacSetupConverters();
1333 void wxMacCleanupConverters();
1335 WXDLLIMPEXP_BASE
void wxMacStringToPascal( const wxString
&from
, StringPtr to
);
1336 WXDLLIMPEXP_BASE wxString
wxMacMakeStringFromPascal( ConstStringPtr from
);
1340 WXDLLIMPEXP_BASE wxString
wxMacFSRefToPath( const FSRef
*fsRef
, CFStringRef additionalPathComponent
= NULL
);
1341 WXDLLIMPEXP_BASE OSStatus
wxMacPathToFSRef( const wxString
&path
, FSRef
*fsRef
);
1342 WXDLLIMPEXP_BASE wxString
wxMacHFSUniStrToString( ConstHFSUniStr255Param uniname
);
1348 void wxMacLocalToGlobal( WindowRef window
, Point
*pt
);
1349 void wxMacGlobalToLocal( WindowRef window
, Point
*pt
);
1353 //---------------------------------------------------------------------------
1354 // cocoa bridging utilities
1355 //---------------------------------------------------------------------------
1357 bool wxMacInitCocoa();
1359 class wxMacAutoreleasePool
1362 wxMacAutoreleasePool();
1363 ~wxMacAutoreleasePool();
1370 void wxMacCocoaRelease( void* obj
);
1371 void wxMacCocoaAutorelease( void* obj
);
1372 void wxMacCocoaRetain( void* obj
);
1378 WX_NSCursor
wxMacCocoaCreateStockCursor( int cursor_type
);
1379 WX_NSCursor
wxMacCocoaCreateCursorFromCGImage( CGImageRef cgImageRef
, float hotSpotX
, float hotSpotY
);
1380 void wxMacCocoaSetCursor( WX_NSCursor cursor
);
1381 void wxMacCocoaHideCursor();
1382 void wxMacCocoaShowCursor();
1384 typedef struct tagClassicCursor
1391 #else // !wxMAC_USE_COCOA
1395 typedef Cursor ClassicCursor
;
1397 #endif // wxMAC_USE_COCOA
1405 const short kwxCursorBullseye
= 0;
1406 const short kwxCursorBlank
= 1;
1407 const short kwxCursorPencil
= 2;
1408 const short kwxCursorMagnifier
= 3;
1409 const short kwxCursorNoEntry
= 4;
1410 const short kwxCursorPaintBrush
= 5;
1411 const short kwxCursorPointRight
= 6;
1412 const short kwxCursorPointLeft
= 7;
1413 const short kwxCursorQuestionArrow
= 8;
1414 const short kwxCursorRightArrow
= 9;
1415 const short kwxCursorSizeNS
= 10;
1416 const short kwxCursorSize
= 11;
1417 const short kwxCursorSizeNESW
= 12;
1418 const short kwxCursorSizeNWSE
= 13;
1419 const short kwxCursorRoller
= 14;
1420 const short kwxCursorLast
= kwxCursorRoller
;
1422 // exposing our fallback cursor map
1424 extern ClassicCursor gMacCursors
[];