]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/palmos/notebook.cpp
adapting to init pattern
[wxWidgets.git] / src / palmos / notebook.cpp
... / ...
CommitLineData
1///////////////////////////////////////////////////////////////////////////////
2// Name: src/palmos/notebook.cpp
3// Purpose: implementation of wxNotebook
4// Author: William Osborne - minimal working wxPalmOS port
5// Modified by:
6// Created: 10/13/04
7// RCS-ID: $Id$
8// Copyright: (c) William Osborne
9// Licence: wxWindows licence
10///////////////////////////////////////////////////////////////////////////////
11
12// For compilers that support precompilation, includes "wx.h".
13#include "wx/wxprec.h"
14
15#ifdef __BORLANDC__
16 #pragma hdrstop
17#endif
18
19#if wxUSE_NOTEBOOK
20
21// wxWidgets
22#ifndef WX_PRECOMP
23 #include "wx/string.h"
24#endif // WX_PRECOMP
25
26// ----------------------------------------------------------------------------
27// macros
28// ----------------------------------------------------------------------------
29
30// check that the page index is valid
31#define IS_VALID_PAGE(nPage) ((nPage) < GetPageCount())
32
33// ----------------------------------------------------------------------------
34// event table
35// ----------------------------------------------------------------------------
36
37BEGIN_EVENT_TABLE(wxNotebook, wxBookCtrlBase)
38 EVT_NOTEBOOK_PAGE_CHANGED(wxID_ANY, wxNotebook::OnSelChange)
39
40 EVT_SIZE(wxNotebook::OnSize)
41
42 EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey)
43END_EVENT_TABLE()
44
45// ============================================================================
46// implementation
47// ============================================================================
48
49// ----------------------------------------------------------------------------
50// wxNotebook construction
51// ----------------------------------------------------------------------------
52
53const wxNotebookPageInfoList& wxNotebook::GetPageInfos() const
54{
55 wxNotebookPageInfoList* list;
56
57 return m_pageInfos ;
58}
59
60// common part of all ctors
61void wxNotebook::Init()
62{
63}
64
65// default for dynamic class
66wxNotebook::wxNotebook()
67{
68}
69
70// the same arguments as for wxControl
71wxNotebook::wxNotebook(wxWindow *parent,
72 wxWindowID id,
73 const wxPoint& pos,
74 const wxSize& size,
75 long style,
76 const wxString& name)
77{
78}
79
80// Create() function
81bool wxNotebook::Create(wxWindow *parent,
82 wxWindowID id,
83 const wxPoint& pos,
84 const wxSize& size,
85 long style,
86 const wxString& name)
87{
88 return false;
89}
90
91// ----------------------------------------------------------------------------
92// wxNotebook accessors
93// ----------------------------------------------------------------------------
94
95size_t wxNotebook::GetPageCount() const
96{
97 return 0;
98}
99
100int wxNotebook::GetRowCount() const
101{
102 return 0;
103}
104
105int wxNotebook::SetSelection(size_t nPage)
106{
107 return 0;
108}
109
110int wxNotebook::ChangeSelection(size_t nPage)
111{
112 return 0;
113}
114
115bool wxNotebook::SetPageText(size_t nPage, const wxString& strText)
116{
117 return false;
118}
119
120wxString wxNotebook::GetPageText(size_t nPage) const
121{
122 return wxEmptyString;
123}
124
125int wxNotebook::GetPageImage(size_t nPage) const
126{
127 return -1;
128}
129
130bool wxNotebook::SetPageImage(size_t nPage, int nImage)
131{
132 return false;
133}
134
135void wxNotebook::SetImageList(wxImageList* imageList)
136{
137}
138
139// ----------------------------------------------------------------------------
140// wxNotebook size settings
141// ----------------------------------------------------------------------------
142
143void wxNotebook::SetPageSize(const wxSize& size)
144{
145}
146
147void wxNotebook::SetPadding(const wxSize& padding)
148{
149}
150
151void wxNotebook::SetTabSize(const wxSize& sz)
152{
153}
154
155wxSize wxNotebook::CalcSizeFromPage(const wxSize& sizePage) const
156{
157 return wxSize(0,0);
158}
159
160void wxNotebook::AdjustPageSize(wxNotebookPage *page)
161{
162}
163
164// ----------------------------------------------------------------------------
165// wxNotebook operations
166// ----------------------------------------------------------------------------
167
168// remove one page from the notebook, without deleting
169wxNotebookPage *wxNotebook::DoRemovePage(size_t nPage)
170{
171 return NULL;
172}
173
174// remove all pages
175bool wxNotebook::DeleteAllPages()
176{
177 return true;
178}
179
180// same as AddPage() but does it at given position
181bool wxNotebook::InsertPage(size_t nPage,
182 wxNotebookPage *pPage,
183 const wxString& strText,
184 bool bSelect,
185 int imageId)
186{
187 return false;
188}
189
190int wxNotebook::HitTest(const wxPoint& pt, long *flags) const
191{
192 return 0;
193}
194
195
196// ----------------------------------------------------------------------------
197// wxNotebook callbacks
198// ----------------------------------------------------------------------------
199
200void wxNotebook::OnSize(wxSizeEvent& event)
201{
202}
203
204void wxNotebook::OnSelChange(wxBookCtrlEvent& event)
205{
206}
207
208void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event)
209{
210}
211
212// ----------------------------------------------------------------------------
213// wxNotebook base class virtuals
214// ----------------------------------------------------------------------------
215
216#if wxUSE_CONSTRAINTS
217
218// override these 2 functions to do nothing: everything is done in OnSize
219
220void wxNotebook::SetConstraintSizes(bool WXUNUSED(recurse))
221{
222}
223
224bool wxNotebook::DoPhase(int WXUNUSED(nPhase))
225{
226 return true;
227}
228
229#endif // wxUSE_CONSTRAINTS
230
231#endif // wxUSE_NOTEBOOK