virtual void SetPadding(const wxSize& padding);
// sets the size of the tabs (assumes all tabs are the same size)
virtual void SetTabSize(const wxSize& sz);
+
+ // calculate size for wxNotebookSizer
+ wxSize CalcSizeFromPage(const wxSize& sizePage);
/*
// get number of pages in the dialog
// course, totally bogus - just like the original code was
wxSize sizeTotal = sizePage;
- // Mac has large notebook borders.
-
if ( HasFlag(wxNB_LEFT) || HasFlag(wxNB_RIGHT) )
{
sizeTotal.x += 90;
-#ifdef __WXMAC__
- sizeTotal.y += 28;
-#else
sizeTotal.y += 10;
-#endif
}
else
{
-#ifdef __WXMAC__
- sizeTotal.x += 34; // This is OK for Aqua.
- sizeTotal.y += 46;
-#else
sizeTotal.x += 10;
sizeTotal.y += 40;
-#endif
}
return sizeTotal;
m_macControl = NULL ;
}
+wxSize wxNotebook::CalcSizeFromPage(const wxSize& sizePage)
+{
+ wxSize sizeTotal = sizePage;
+
+ int major,minor;
+ wxGetOsVersion( &major, &minor );
+
+ // Mac has large notebook borders. Aqua even more so.
+
+ if ( HasFlag(wxNB_LEFT) || HasFlag(wxNB_RIGHT) )
+ {
+ sizeTotal.x += 90;
+
+ if (major >= 10)
+ sizeTotal.y += 28;
+ else
+ sizeTotal.y += 20;
+ }
+ else
+ {
+ if (major >= 10)
+ {
+ sizeTotal.x += 34;
+ sizeTotal.y += 46;
+ }
+ else
+ {
+ sizeTotal.x += 22;
+ sizeTotal.y += 44;
+ }
+ }
+
+ return sizeTotal;
+}
+
// ----------------------------------------------------------------------------
// wxNotebook accessors
// ----------------------------------------------------------------------------
m_macControl = NULL ;
}
+wxSize wxNotebook::CalcSizeFromPage(const wxSize& sizePage)
+{
+ wxSize sizeTotal = sizePage;
+
+ int major,minor;
+ wxGetOsVersion( &major, &minor );
+
+ // Mac has large notebook borders. Aqua even more so.
+
+ if ( HasFlag(wxNB_LEFT) || HasFlag(wxNB_RIGHT) )
+ {
+ sizeTotal.x += 90;
+
+ if (major >= 10)
+ sizeTotal.y += 28;
+ else
+ sizeTotal.y += 20;
+ }
+ else
+ {
+ if (major >= 10)
+ {
+ sizeTotal.x += 34;
+ sizeTotal.y += 46;
+ }
+ else
+ {
+ sizeTotal.x += 22;
+ sizeTotal.y += 44;
+ }
+ }
+
+ return sizeTotal;
+}
+
// ----------------------------------------------------------------------------
// wxNotebook accessors
// ----------------------------------------------------------------------------