In wxNotebook::Create setTabViewType based off of wxNB_TOP/LEFT/RIGHT/BOTTOM flags if given.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott
2007-08-08 03:06:53 +00:00
parent 022a8d0284
commit 94a2af7672

View File

@@ -147,6 +147,23 @@ bool wxNotebook::Create(wxWindow *parent, wxWindowID winid,
return false; return false;
m_cocoaNSView = NULL; m_cocoaNSView = NULL;
SetNSTabView([[NSTabView alloc] initWithFrame:MakeDefaultNSRect(size)]); SetNSTabView([[NSTabView alloc] initWithFrame:MakeDefaultNSRect(size)]);
do
{
NSTabViewType tabViewType;
if(style & wxNB_TOP)
tabViewType = NSTopTabsBezelBorder;
else if(style & wxNB_LEFT)
tabViewType = NSLeftTabsBezelBorder;
else if(style & wxNB_RIGHT)
tabViewType = NSRightTabsBezelBorder;
else if(style & wxNB_BOTTOM)
tabViewType = NSBottomTabsBezelBorder;
else
break;
[GetNSTabView() setTabViewType:tabViewType];
} while(0);
if(m_parent) if(m_parent)
m_parent->CocoaAddChild(this); m_parent->CocoaAddChild(this);
SetInitialFrameRect(pos,size); SetInitialFrameRect(pos,size);