]> git.saurik.com Git - wxWidgets.git/blob - src/common/nbkbase.cpp
fixed Fit() to call SetClientSize() and not SetSize()
[wxWidgets.git] / src / common / nbkbase.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/nbkbase.cpp
3 // Purpose: common wxNotebook methods
4 // Author: Vadim Zeitlin
5 // Modified by:
6 // Created: 02.07.01
7 // RCS-ID: $Id$
8 // Copyright: (c) 2001 Vadim Zeitlin
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 // ============================================================================
13 // declarations
14 // ============================================================================
15
16 // ----------------------------------------------------------------------------
17 // headers
18 // ----------------------------------------------------------------------------
19
20 // For compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
22
23 #ifdef __BORLANDC__
24 #pragma hdrstop
25 #endif
26
27 #if wxUSE_NOTEBOOK
28
29 #ifndef WX_PRECOMP
30 #endif //WX_PRECOMP
31
32 #include "wx/notebook.h"
33
34 // ============================================================================
35 // implementation
36 // ============================================================================
37
38 // ----------------------------------------------------------------------------
39 // geometry
40 // ----------------------------------------------------------------------------
41
42 wxSize wxNotebookBase::CalcSizeFromPage(const wxSize& sizePage) const
43 {
44 // this is, of course, totally bogus -- but we must do something by
45 // default because not all ports implement this
46 wxSize sizeTotal = sizePage;
47
48 if ( HasFlag(wxNB_LEFT) || HasFlag(wxNB_RIGHT) )
49 {
50 sizeTotal.x += 90;
51 sizeTotal.y += 10;
52 }
53 else // tabs on top/bottom side
54 {
55 sizeTotal.x += 10;
56 sizeTotal.y += 40;
57 }
58
59 return sizeTotal;
60 }
61
62 #endif // wxUSE_NOTEBOOK
63