]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/qt/notebook.cpp
fixed mysterious mistakes
[wxWidgets.git] / src / qt / notebook.cpp
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: notebook.cpp
3// Purpose:
4// Author: Robert Roebling
5// Created: 01/02/97
6// Id:
7// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11#ifdef __GNUG__
12#pragma implementation "notebook.h"
13#endif
14
15#include "wx/notebook.h"
16#include "wx/panel.h"
17#include "wx/utils.h"
18#include "wx/imaglist.h"
19#include "wx/log.h"
20
21//-----------------------------------------------------------------------------
22// wxNotebookPage
23//-----------------------------------------------------------------------------
24
25class wxNotebookPage: public wxObject
26{
27public:
28 wxNotebookPage()
29 {
30 m_id = -1;
31 m_text = "";
32 m_image = -1;
33 m_page = NULL;
34 m_client = NULL;
35 m_parent = NULL;
36 };
37
38//private:
39 int m_id;
40 wxString m_text;
41 int m_image;
42 wxWindow *m_client;
43};
44
45//-----------------------------------------------------------------------------
46// wxNotebook
47//-----------------------------------------------------------------------------
48
49IMPLEMENT_DYNAMIC_CLASS(wxNotebook,wxControl)
50
51void wxNotebook::Init()
52{
53 m_imageList = NULL;
54 m_pages.DeleteContents( TRUE );
55}
56
57wxNotebook::wxNotebook()
58{
59 Init();
60};
61
62wxNotebook::wxNotebook( wxWindow *parent, wxWindowID id,
63 const wxPoint& pos, const wxSize& size,
64 long style, const wxString& name )
65{
66 Init();
67 Create( parent, id, pos, size, style, name );
68};
69
70wxNotebook::~wxNotebook()
71{
72 DeleteAllPages();
73};
74
75bool wxNotebook::Create(wxWindow *parent, wxWindowID id,
76 const wxPoint& pos, const wxSize& size,
77 long style, const wxString& name )
78{
79 PreCreation( parent, id, pos, size, style, name );
80
81 PostCreation();
82
83 Show( TRUE );
84
85 return TRUE;
86};
87
88int wxNotebook::GetSelection() const
89{
90};
91
92int wxNotebook::GetPageCount() const
93{
94};
95
96int wxNotebook::GetRowCount() const
97{
98};
99
100wxString wxNotebook::GetPageText( int page ) const
101{
102};
103
104int wxNotebook::GetPageImage( int page ) const
105{
106};
107
108wxNotebookPage* wxNotebook::GetNotebookPage(int page) const
109{
110 return NULL;
111};
112
113int wxNotebook::SetSelection( int page )
114{
115};
116
117void wxNotebook::AdvanceSelection(bool bForward)
118{
119}
120
121void wxNotebook::SetImageList( wxImageList* imageList )
122{
123 m_imageList = imageList;
124};
125
126bool wxNotebook::SetPageText( int page, const wxString &text )
127{
128 return TRUE;
129};
130
131bool wxNotebook::SetPageImage( int page, int image )
132{
133 return TRUE;
134};
135
136void wxNotebook::SetPageSize( const wxSize &WXUNUSED(size) )
137{
138};
139
140void wxNotebook::SetPadding( const wxSize &WXUNUSED(padding) )
141{
142};
143
144bool wxNotebook::DeleteAllPages()
145{
146 return TRUE;
147};
148
149bool wxNotebook::DeletePage( int page )
150{
151 return TRUE;
152};
153
154bool wxNotebook::AddPage(wxWindow* win, const wxString& text,
155 bool bSelect, int imageId)
156{
157 return TRUE;
158};
159
160wxWindow *wxNotebook::GetPage( int page ) const
161{
162 return NULL;
163};
164
165void wxNotebook::AddChild( wxWindow *win )
166{
167};
168
169// override these 2 functions to do nothing: everything is done in OnSize
170void wxNotebook::SetConstraintSizes( bool WXUNUSED(recurse) )
171{
172 // don't set the sizes of the pages - their correct size is not yet known
173 wxControl::SetConstraintSizes(FALSE);
174}
175
176bool wxNotebook::DoPhase( int WXUNUSED(nPhase) )
177{
178 return TRUE;
179}
180
181//-----------------------------------------------------------------------------
182// wxNotebookEvent
183//-----------------------------------------------------------------------------
184
185IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent)