virtual void SetConstraintSizes(bool recurse = true);
virtual bool DoPhase(int nPhase);
+ virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const;
+
// Implementation
// wxNotebook on Motif uses a generic wxTabView to implement itself.
//style |= wxNB_NOPAGETHEME;
m_book = new wxBookCtrl(m_panel, wxID_ANY, wxDefaultPosition,
- wxDefaultSize, style);
+#ifdef __WXMOTIF__
+ wxSize(500, -1), // under Motif, height is a function of the width...
+#else
+ wxDefaultSize,
+#endif
+ style);
InitBook();
#ifndef __SMARTPHONE__
m_tabView->Draw(dc);
}
+wxSize wxNotebook::CalcSizeFromPage(const wxSize& sizePage) const
+{
+ // MBN: since the total tab height is really a function of the
+ // width, this should really call
+ // GetTotalTabHeightPretendingWidthIs(), but the current
+ // implementation will suffice, provided the wxNotebook has been
+ // created with a sensible initial width.
+ return wxSize( sizePage.x + 12,
+ sizePage.y + m_tabView->GetTotalTabHeight() + 6 + 4 );
+}
+
wxRect wxNotebook::GetAvailableClientSize()
{
int cw, ch;