X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e9576ca53db96b462ed4c0b4bdf47d64c40203e4..cd3c2375e6fddd3d478a6776900c21aaeb2d0f08:/src/mac/tabctrl.cpp diff --git a/src/mac/tabctrl.cpp b/src/mac/tabctrl.cpp index b3b45a72d1..db1992be6e 100644 --- a/src/mac/tabctrl.cpp +++ b/src/mac/tabctrl.cpp @@ -13,8 +13,11 @@ #pragma implementation "tabctrl.h" #endif +#include "wx/defs.h" + #include "wx/control.h" #include "wx/tabctrl.h" +#include "wx/mac/uma.h" #if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl, wxControl) @@ -31,20 +34,18 @@ wxTabCtrl::wxTabCtrl() bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name) { - m_imageList = NULL; - - SetName(name); - - m_windowStyle = style; + Rect bounds ; + Str255 title ; - SetParent(parent); + m_imageList = NULL; + + MacPreControlCreate( parent , id , "" , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ; - m_windowId = (id < 0 ? NewControlId() : id); - - if (parent) parent->AddChild(this); - - // TODO: create tab control - return FALSE; + m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1, + kControlTabSmallProc , (long) this ) ; + + MacPostControlCreate() ; + return TRUE ; } wxTabCtrl::~wxTabCtrl()