X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/010d343bb28bbfd7a702a3ac60be30d15e132ba3..cfeff6f71c716a19a9651b176dce26534c4da216:/src/cocoa/radiobox.mm?ds=inline diff --git a/src/cocoa/radiobox.mm b/src/cocoa/radiobox.mm index db1e609dca..93d5043e47 100644 --- a/src/cocoa/radiobox.mm +++ b/src/cocoa/radiobox.mm @@ -9,8 +9,12 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#include "wx/app.h" -#include "wx/radiobox.h" +#include "wx/wxprec.h" +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/radiobox.h" + #include "wx/arrstr.h" +#endif //WX_PRECOMP #import @@ -19,6 +23,21 @@ BEGIN_EVENT_TABLE(wxRadioBox, wxControl) END_EVENT_TABLE() // WX_IMPLEMENT_COCOA_OWNER(wxRadioBox,NSTextField,NSControl,NSView) +bool wxRadioBox::Create(wxWindow *parent, wxWindowID winid, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + int majorDim, + long style, const wxValidator& validator, + const wxString& name) +{ + wxCArrayString chs(choices); + + return Create(parent, winid, title, pos, size, chs.GetCount(), + chs.GetStrings(), majorDim, style, validator, name); +} + bool wxRadioBox::Create(wxWindow *parent, wxWindowID winid, const wxString& title, const wxPoint& pos, @@ -30,10 +49,12 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID winid, { if(!CreateControl(parent,winid,pos,size,style,validator,name)) return false; - SetNSView([[NSView alloc] initWithFrame: NSMakeRect(10,10,20,20)]); + SetNSView([[NSView alloc] initWithFrame: MakeDefaultNSRect(size)]); [m_cocoaNSView release]; if(m_parent) m_parent->CocoaAddChild(this); + SetInitialFrameRect(pos,size); + return true; } @@ -86,3 +107,8 @@ int wxRadioBox::GetRowCount() const return 0; } +wxSize wxRadioBox::DoGetBestSize() const +{ + return wxSize(50,50); +} +