X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76a5e5d21ee1a6230d777ce0209b2df4c6075f0f..7ac13b21fe95a726626ea554e9ba5a6d12bf3ce1:/src/mac/listbox.cpp diff --git a/src/mac/listbox.cpp b/src/mac/listbox.cpp index 9533882e9e..a5ef8163b0 100644 --- a/src/mac/listbox.cpp +++ b/src/mac/listbox.cpp @@ -32,12 +32,27 @@ END_EVENT_TABLE() #include "wx/mac/uma.h" +#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 wxMacListDefinition( short message, Boolean isSelected, Rect *drawRect, @@ -168,8 +183,8 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id, Size asize; - CreateListBoxControl( parent->MacGetRootWindow(), &bounds, false, 0, 1, false, true, - kwxMacListItemHeight, kwxMacListItemHeight, false, &listDef, &m_macControl ); + CreateListBoxControl( MAC_WXHWND(parent->MacGetRootWindow()), &bounds, false, 0, 1, false, true, + kwxMacListItemHeight, kwxMacListItemHeight, false, &listDef, (ControlRef *)&m_macControl ); GetControlData( (ControlHandle) m_macControl, kControlNoPart, kControlListBoxListHandleTag, sizeof(ListHandle), (Ptr) &m_macList, &asize); @@ -273,7 +288,7 @@ void wxListBox::DoSetSize(int x, int y, #if TARGET_CARBON Rect bounds ; GetControlBounds( (ControlHandle) m_macControl , &bounds ) ; - ControlRef control = GetListVerticalScrollBar( m_macList ) ; + ControlRef control = GetListVerticalScrollBar( (ListHandle)m_macList ) ; if ( control ) { Rect scrollbounds ; @@ -581,7 +596,7 @@ int wxListBox::GetCount() const void wxListBox::SetupColours() { - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW)); + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); SetForegroundColour(GetParent()->GetForegroundColour()); } @@ -737,7 +752,7 @@ void wxListBox::OnSize( const wxSizeEvent &event) Point pt; #if TARGET_CARBON - GetListCellSize(m_macList, &pt); + GetListCellSize((ListHandle)m_macList, &pt); #else pt = (**(ListHandle)m_macList).cellSize ; #endif