X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76a5e5d21ee1a6230d777ce0209b2df4c6075f0f..6a44bffd1ac68163e4c1cfe8aa8fe4f7f98a02e7:/src/mac/checklst.cpp diff --git a/src/mac/checklst.cpp b/src/mac/checklst.cpp index 743fea9aac..95f2e86fa1 100644 --- a/src/mac/checklst.cpp +++ b/src/mac/checklst.cpp @@ -36,11 +36,27 @@ const short kwxMacListWithVerticalScrollbar = 128 ; const short kwxMacListItemHeight = 14 ; const short kwxMacListCheckboxWidth = 14 ; +#if PRAGMA_STRUCT_ALIGN + #pragma options align=mac68k +#elif PRAGMA_STRUCT_PACKPUSH + #pragma pack(push, 2) +#elif PRAGMA_STRUCT_PACK + #pragma pack(2) +#endif + typedef struct { unsigned short instruction; void (*function)(); } ldefRec, *ldefPtr, **ldefHandle; +#if PRAGMA_STRUCT_ALIGN + #pragma options align=reset +#elif PRAGMA_STRUCT_PACKPUSH + #pragma pack(pop) +#elif PRAGMA_STRUCT_PACK + #pragma pack() +#endif + extern "C" { static pascal void wxMacCheckListDefinition( short message, Boolean isSelected, Rect *drawRect, @@ -52,7 +68,6 @@ static pascal void wxMacCheckListDefinition( short message, Boolean isSelected, Cell cell, short dataOffset, short dataLength, ListHandle listHandle ) { - FontInfo fontInfo; GrafPtr savePort; GrafPtr grafPtr; RgnHandle savedClipRegion; @@ -180,8 +195,8 @@ bool wxCheckListBox::Create(wxWindow *parent, Size asize; - CreateListBoxControl( parent->MacGetRootWindow(), &bounds, false, 0, 1, false, true, - 14, 14, false, &listDef, &m_macControl ); + CreateListBoxControl( MAC_WXHWND(parent->MacGetRootWindow()), &bounds, false, 0, 1, false, true, + 14, 14, false, &listDef, (ControlRef *)&m_macControl ); GetControlData( (ControlHandle) m_macControl, kControlNoPart, kControlListBoxListHandleTag, sizeof(ListHandle), (Ptr) &m_macList, &asize); @@ -193,6 +208,7 @@ bool wxCheckListBox::Create(wxWindow *parent, long result ; + wxStAppResource resload ; m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , kwxMacListWithVerticalScrollbar , 0 , 0, kControlListBoxProc , (long) this ) ; @@ -352,10 +368,10 @@ void wxCheckListBox::OnLeftClick(wxMouseEvent& event) int topcell ; #if TARGET_CARBON Point pt ; - GetListCellSize( m_macList , &pt ) ; + GetListCellSize( (ListHandle)m_macList , &pt ) ; lineheight = pt.v ; ListBounds visible ; - GetListVisibleCells( m_macList , &visible ) ; + GetListVisibleCells( (ListHandle)m_macList , &visible ) ; topcell = visible.top ; #else lineheight = (**(ListHandle)m_macList).cellSize.v ;