]> git.saurik.com Git - wxWidgets.git/blame - src/common/nbkbase.cpp
Parts of wxSizer::Show() extracted into wxSizer::GetItem() (together with documentation).
[wxWidgets.git] / src / common / nbkbase.cpp
CommitLineData
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
14f355c2 20#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
07b8d7ec
VZ
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
07b8d7ec
VZ
34#endif //WX_PRECOMP
35
bd52bee1
JS
36#include "wx/notebook.h"
37
07b8d7ec
VZ
38// ============================================================================
39// implementation
40// ============================================================================
41
07b8d7ec
VZ
42// ----------------------------------------------------------------------------
43// geometry
44// ----------------------------------------------------------------------------
45
2ce7af35 46wxSize wxNotebookBase::CalcSizeFromPage(const wxSize& sizePage) const
07b8d7ec 47{
550e6c01
VZ
48 // this is, of course, totally bogus -- but we must do something by
49 // default because not all ports implement this
07b8d7ec 50 wxSize sizeTotal = sizePage;
550e6c01 51
07b8d7ec 52 if ( HasFlag(wxNB_LEFT) || HasFlag(wxNB_RIGHT) )
eaf336e0 53 {
07b8d7ec 54 sizeTotal.x += 90;
eaf336e0 55 sizeTotal.y += 10;
eaf336e0 56 }
550e6c01 57 else // tabs on top/bottom side
eaf336e0 58 {
eaf336e0 59 sizeTotal.x += 10;
07b8d7ec 60 sizeTotal.y += 40;
eaf336e0 61 }
07b8d7ec
VZ
62
63 return sizeTotal;
64}
65
07b8d7ec
VZ
66#endif // wxUSE_NOTEBOOK
67