]> git.saurik.com Git - wxWidgets.git/blob - src/common/nbkbase.cpp
use correct fallback file name in SaveFile() (patch 820884)
[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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
21 #pragma implementation "notebookbase.h"
22 #endif
23
24 // For compilers that support precompilation, includes "wx.h".
25 #include "wx/wxprec.h"
26
27 #ifdef __BORLANDC__
28 #pragma hdrstop
29 #endif
30
31 #if wxUSE_NOTEBOOK
32
33 #ifndef WX_PRECOMP
34 #endif //WX_PRECOMP
35
36 #include "wx/notebook.h"
37
38 // ============================================================================
39 // implementation
40 // ============================================================================
41
42 // ----------------------------------------------------------------------------
43 // geometry
44 // ----------------------------------------------------------------------------
45
46 wxSize wxNotebookBase::CalcSizeFromPage(const wxSize& sizePage) const
47 {
48 // this is, of course, totally bogus -- but we must do something by
49 // default because not all ports implement this
50 wxSize sizeTotal = sizePage;
51
52 if ( HasFlag(wxNB_LEFT) || HasFlag(wxNB_RIGHT) )
53 {
54 sizeTotal.x += 90;
55 sizeTotal.y += 10;
56 }
57 else // tabs on top/bottom side
58 {
59 sizeTotal.x += 10;
60 sizeTotal.y += 40;
61 }
62
63 return sizeTotal;
64 }
65
66 #endif // wxUSE_NOTEBOOK
67