]>
Commit | Line | Data |
---|---|---|
7c78e7c7 RR |
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 | ||
25 | class wxNotebookPage: public wxObject | |
26 | { | |
27 | public: | |
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 | ||
49 | IMPLEMENT_DYNAMIC_CLASS(wxNotebook,wxControl) | |
50 | ||
51 | void wxNotebook::Init() | |
52 | { | |
53 | m_imageList = NULL; | |
54 | m_pages.DeleteContents( TRUE ); | |
55 | } | |
56 | ||
57 | wxNotebook::wxNotebook() | |
58 | { | |
59 | Init(); | |
60 | }; | |
61 | ||
62 | wxNotebook::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 | ||
70 | wxNotebook::~wxNotebook() | |
71 | { | |
72 | DeleteAllPages(); | |
73 | }; | |
74 | ||
75 | bool 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 | ||
88 | int wxNotebook::GetSelection() const | |
89 | { | |
90 | }; | |
91 | ||
92 | int wxNotebook::GetPageCount() const | |
93 | { | |
94 | }; | |
95 | ||
96 | int wxNotebook::GetRowCount() const | |
97 | { | |
98 | }; | |
99 | ||
100 | wxString wxNotebook::GetPageText( int page ) const | |
101 | { | |
102 | }; | |
103 | ||
104 | int wxNotebook::GetPageImage( int page ) const | |
105 | { | |
106 | }; | |
107 | ||
108 | wxNotebookPage* wxNotebook::GetNotebookPage(int page) const | |
109 | { | |
110 | return NULL; | |
111 | }; | |
112 | ||
113 | int wxNotebook::SetSelection( int page ) | |
114 | { | |
115 | }; | |
116 | ||
117 | void wxNotebook::AdvanceSelection(bool bForward) | |
118 | { | |
119 | } | |
120 | ||
121 | void wxNotebook::SetImageList( wxImageList* imageList ) | |
122 | { | |
123 | m_imageList = imageList; | |
124 | }; | |
125 | ||
126 | bool wxNotebook::SetPageText( int page, const wxString &text ) | |
127 | { | |
128 | return TRUE; | |
129 | }; | |
130 | ||
131 | bool wxNotebook::SetPageImage( int page, int image ) | |
132 | { | |
133 | return TRUE; | |
134 | }; | |
135 | ||
136 | void wxNotebook::SetPageSize( const wxSize &WXUNUSED(size) ) | |
137 | { | |
138 | }; | |
139 | ||
140 | void wxNotebook::SetPadding( const wxSize &WXUNUSED(padding) ) | |
141 | { | |
142 | }; | |
143 | ||
144 | bool wxNotebook::DeleteAllPages() | |
145 | { | |
146 | return TRUE; | |
147 | }; | |
148 | ||
149 | bool wxNotebook::DeletePage( int page ) | |
150 | { | |
151 | return TRUE; | |
152 | }; | |
153 | ||
154 | bool wxNotebook::AddPage(wxWindow* win, const wxString& text, | |
155 | bool bSelect, int imageId) | |
156 | { | |
157 | return TRUE; | |
158 | }; | |
159 | ||
160 | wxWindow *wxNotebook::GetPage( int page ) const | |
161 | { | |
162 | return NULL; | |
163 | }; | |
164 | ||
165 | void wxNotebook::AddChild( wxWindow *win ) | |
166 | { | |
167 | }; | |
168 | ||
169 | // override these 2 functions to do nothing: everything is done in OnSize | |
170 | void 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 | ||
176 | bool wxNotebook::DoPhase( int WXUNUSED(nPhase) ) | |
177 | { | |
178 | return TRUE; | |
179 | } | |
180 | ||
181 | //----------------------------------------------------------------------------- | |
182 | // wxNotebookEvent | |
183 | //----------------------------------------------------------------------------- | |
184 | ||
185 | IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent) |