]>
Commit | Line | Data |
---|---|---|
07b8d7ec VZ |
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 | |
65571936 | 9 | // Licence: wxWindows licence |
07b8d7ec VZ |
10 | /////////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | // ============================================================================ | |
13 | // declarations | |
14 | // ============================================================================ | |
15 | ||
16 | // ---------------------------------------------------------------------------- | |
17 | // headers | |
18 | // ---------------------------------------------------------------------------- | |
19 | ||
07b8d7ec VZ |
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 | |
07b8d7ec VZ |
30 | #endif //WX_PRECOMP |
31 | ||
bd52bee1 JS |
32 | #include "wx/notebook.h" |
33 | ||
07b8d7ec VZ |
34 | // ============================================================================ |
35 | // implementation | |
36 | // ============================================================================ | |
37 | ||
07b8d7ec VZ |
38 | // ---------------------------------------------------------------------------- |
39 | // geometry | |
40 | // ---------------------------------------------------------------------------- | |
41 | ||
2ce7af35 | 42 | wxSize wxNotebookBase::CalcSizeFromPage(const wxSize& sizePage) const |
07b8d7ec | 43 | { |
550e6c01 VZ |
44 | // this is, of course, totally bogus -- but we must do something by |
45 | // default because not all ports implement this | |
07b8d7ec | 46 | wxSize sizeTotal = sizePage; |
550e6c01 | 47 | |
2ddb4d13 | 48 | if ( HasFlag(wxBK_LEFT) || HasFlag(wxBK_RIGHT) ) |
eaf336e0 | 49 | { |
07b8d7ec | 50 | sizeTotal.x += 90; |
eaf336e0 | 51 | sizeTotal.y += 10; |
eaf336e0 | 52 | } |
550e6c01 | 53 | else // tabs on top/bottom side |
eaf336e0 | 54 | { |
eaf336e0 | 55 | sizeTotal.x += 10; |
07b8d7ec | 56 | sizeTotal.y += 40; |
eaf336e0 | 57 | } |
07b8d7ec VZ |
58 | |
59 | return sizeTotal; | |
60 | } | |
61 | ||
07b8d7ec | 62 | #endif // wxUSE_NOTEBOOK |