]> git.saurik.com Git - wxWidgets.git/blame - src/palmos/notebook.cpp
Fixed wxMessageBox with only an OK button returning wxCANCEL under MSW.
[wxWidgets.git] / src / palmos / notebook.cpp
CommitLineData
ffecfa5a 1///////////////////////////////////////////////////////////////////////////////
e2731512 2// Name: src/palmos/notebook.cpp
ffecfa5a 3// Purpose: implementation of wxNotebook
e2731512 4// Author: William Osborne - minimal working wxPalmOS port
ffecfa5a
JS
5// Modified by:
6// Created: 10/13/04
e2731512 7// RCS-ID: $Id$
ffecfa5a
JS
8// Copyright: (c) William Osborne
9// Licence: wxWindows licence
10///////////////////////////////////////////////////////////////////////////////
11
ffecfa5a
JS
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
ffecfa5a
JS
26// ----------------------------------------------------------------------------
27// macros
28// ----------------------------------------------------------------------------
29
30// check that the page index is valid
31#define IS_VALID_PAGE(nPage) ((nPage) < GetPageCount())
32
ffecfa5a
JS
33// ----------------------------------------------------------------------------
34// event table
35// ----------------------------------------------------------------------------
36
8dba4c72 37BEGIN_EVENT_TABLE(wxNotebook, wxBookCtrlBase)
90c0f5a9 38 EVT_NOTEBOOK_PAGE_CHANGED(wxID_ANY, wxNotebook::OnSelChange)
ffecfa5a
JS
39
40 EVT_SIZE(wxNotebook::OnSize)
41
42 EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey)
43END_EVENT_TABLE()
44
ffecfa5a
JS
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
ffecfa5a
JS
91// ----------------------------------------------------------------------------
92// wxNotebook accessors
93// ----------------------------------------------------------------------------
94
95size_t wxNotebook::GetPageCount() const
96{
630ad6c6 97 return 0;
ffecfa5a
JS
98}
99
100int wxNotebook::GetRowCount() const
101{
630ad6c6 102 return 0;
ffecfa5a
JS
103}
104
105int wxNotebook::SetSelection(size_t nPage)
106{
107 return 0;
108}
109
1d6fcbcc
VZ
110int wxNotebook::ChangeSelection(size_t nPage)
111{
112 return 0;
113}
114
ffecfa5a
JS
115bool wxNotebook::SetPageText(size_t nPage, const wxString& strText)
116{
117 return false;
118}
119
120wxString wxNotebook::GetPageText(size_t nPage) const
121{
630ad6c6 122 return wxEmptyString;
ffecfa5a
JS
123}
124
125int wxNotebook::GetPageImage(size_t nPage) const
126{
630ad6c6 127 return -1;
ffecfa5a
JS
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{
630ad6c6 177 return true;
ffecfa5a
JS
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
3e97a905 204void wxNotebook::OnSelChange(wxBookCtrlEvent& event)
ffecfa5a
JS
205{
206}
207
ffecfa5a
JS
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
ffecfa5a 231#endif // wxUSE_NOTEBOOK