X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4c37f1248bda69718bc13e2fdaa1ebb86f3dfc93..3d63970769b32a93061989a38a00a5b6110bc7a5:/src/mac/carbon/radiobox.cpp diff --git a/src/mac/carbon/radiobox.cpp b/src/mac/carbon/radiobox.cpp index cf279d567b..2470710782 100644 --- a/src/mac/carbon/radiobox.cpp +++ b/src/mac/carbon/radiobox.cpp @@ -9,7 +9,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "radioboxbase.h" #pragma implementation "radiobox.h" #endif @@ -18,7 +18,8 @@ // headers //------------------------------------------------------------------------------------- -#include "wx/defs.h" +#include "wx/wxprec.h" + #include "wx/arrstr.h" #include "wx/radiobox.h" @@ -137,8 +138,10 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, if ( bounds.bottom <= bounds.top ) bounds.bottom = bounds.top + 100 ; + m_peer = new wxMacControl() ; + verify_noerr(CreateGroupBoxControl(MAC_WXHWND(parent->MacGetTopLevelWindowRef()),&bounds, CFSTR("") , - true /*primary*/ , (ControlRef*)&m_macControl ) ) ; + true /*primary*/ , m_peer->GetControlRefAddr() ) ) ; for (i = 0; i < n; i++) { @@ -481,7 +484,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) { if (i&&((i%m_majorDim)==0)) // not to do for the zero button! { - if (m_windowStyle & wxRA_VERTICAL) + if (m_windowStyle & wxRA_SPECIFY_ROWS) { x_offset += maxWidth + charWidth; y_offset = y_start; @@ -510,7 +513,7 @@ wxSize wxRadioBox::DoGetBestSize() const int eachWidth, eachHeight; int totWidth, totHeight; - wxFont font = GetParent()->GetFont(); + wxFont font = /*GetParent()->*/GetFont(); GetTextExtent(wxT("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), &charWidth, &charHeight, NULL, NULL, &font);