]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: tabctrl.cpp | |
3 | // Purpose: wxTabCtrl | |
4 | // Author: Stefan Csomor | |
5 | // Modified by: | |
6 | // Created: 1998-01-01 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Stefan Csomor | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifdef __GNUG__ | |
13 | #pragma implementation "tabctrl.h" | |
14 | #endif | |
15 | ||
16 | #include "wx/defs.h" | |
17 | ||
18 | #include "wx/control.h" | |
19 | #include "wx/tabctrl.h" | |
20 | #include "wx/mac/uma.h" | |
21 | ||
22 | #if !USE_SHARED_LIBRARY | |
23 | IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl, wxControl) | |
24 | ||
25 | BEGIN_EVENT_TABLE(wxTabCtrl, wxControl) | |
26 | END_EVENT_TABLE() | |
27 | #endif | |
28 | ||
29 | wxTabCtrl::wxTabCtrl() | |
30 | { | |
31 | m_imageList = NULL; | |
32 | } | |
33 | ||
34 | bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, | |
35 | long style, const wxString& name) | |
36 | { | |
37 | Rect bounds ; | |
38 | Str255 title ; | |
39 | ||
40 | m_imageList = NULL; | |
41 | ||
42 | MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ; | |
43 | ||
44 | m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1, | |
45 | kControlTabSmallProc , (long) this ) ; | |
46 | ||
47 | MacPostControlCreate() ; | |
48 | return TRUE ; | |
49 | } | |
50 | ||
51 | wxTabCtrl::~wxTabCtrl() | |
52 | { | |
53 | } | |
54 | ||
55 | void wxTabCtrl::Command(wxCommandEvent& event) | |
56 | { | |
57 | } | |
58 | ||
59 | // Delete all items | |
60 | bool wxTabCtrl::DeleteAllItems() | |
61 | { | |
62 | // TODO | |
63 | return FALSE; | |
64 | } | |
65 | ||
66 | // Delete an item | |
67 | bool wxTabCtrl::DeleteItem(int item) | |
68 | { | |
69 | // TODO | |
70 | return FALSE; | |
71 | } | |
72 | ||
73 | // Get the selection | |
74 | int wxTabCtrl::GetSelection() const | |
75 | { | |
76 | // TODO | |
77 | return 0; | |
78 | } | |
79 | ||
80 | // Get the tab with the current keyboard focus | |
81 | int wxTabCtrl::GetCurFocus() const | |
82 | { | |
83 | // TODO | |
84 | return 0; | |
85 | } | |
86 | ||
87 | // Get the associated image list | |
88 | wxImageList* wxTabCtrl::GetImageList() const | |
89 | { | |
90 | return m_imageList; | |
91 | } | |
92 | ||
93 | // Get the number of items | |
94 | int wxTabCtrl::GetItemCount() const | |
95 | { | |
96 | // TODO | |
97 | return 0; | |
98 | } | |
99 | ||
100 | // Get the rect corresponding to the tab | |
101 | bool wxTabCtrl::GetItemRect(int item, wxRect& wxrect) const | |
102 | { | |
103 | // TODO | |
104 | return FALSE; | |
105 | } | |
106 | ||
107 | // Get the number of rows | |
108 | int wxTabCtrl::GetRowCount() const | |
109 | { | |
110 | // TODO | |
111 | return 0; | |
112 | } | |
113 | ||
114 | // Get the item text | |
115 | wxString wxTabCtrl::GetItemText(int item) const | |
116 | { | |
117 | // TODO | |
118 | return wxEmptyString; | |
119 | } | |
120 | ||
121 | // Get the item image | |
122 | int wxTabCtrl::GetItemImage(int item) const | |
123 | { | |
124 | // TODO | |
125 | return 0; | |
126 | } | |
127 | ||
128 | // Get the item data | |
129 | void* wxTabCtrl::GetItemData(int item) const | |
130 | { | |
131 | // TODO | |
132 | return NULL; | |
133 | } | |
134 | ||
135 | // Hit test | |
136 | int wxTabCtrl::HitTest(const wxPoint& pt, long& flags) | |
137 | { | |
138 | // TODO | |
139 | return 0; | |
140 | } | |
141 | ||
142 | // Insert an item | |
143 | bool wxTabCtrl::InsertItem(int item, const wxString& text, int imageId, void* data) | |
144 | { | |
145 | // TODO | |
146 | return FALSE; | |
147 | } | |
148 | ||
149 | // Set the selection | |
150 | int wxTabCtrl::SetSelection(int item) | |
151 | { | |
152 | // TODO | |
153 | return 0; | |
154 | } | |
155 | ||
156 | // Set the image list | |
157 | void wxTabCtrl::SetImageList(wxImageList* imageList) | |
158 | { | |
159 | // TODO | |
160 | } | |
161 | ||
162 | // Set the text for an item | |
163 | bool wxTabCtrl::SetItemText(int item, const wxString& text) | |
164 | { | |
165 | // TODO | |
166 | return FALSE; | |
167 | } | |
168 | ||
169 | // Set the image for an item | |
170 | bool wxTabCtrl::SetItemImage(int item, int image) | |
171 | { | |
172 | // TODO | |
173 | return FALSE; | |
174 | } | |
175 | ||
176 | // Set the data for an item | |
177 | bool wxTabCtrl::SetItemData(int item, void* data) | |
178 | { | |
179 | // TODO | |
180 | return FALSE; | |
181 | } | |
182 | ||
183 | // Set the size for a fixed-width tab control | |
184 | void wxTabCtrl::SetItemSize(const wxSize& size) | |
185 | { | |
186 | // TODO | |
187 | } | |
188 | ||
189 | // Set the padding between tabs | |
190 | void wxTabCtrl::SetPadding(const wxSize& padding) | |
191 | { | |
192 | // TODO | |
193 | } | |
194 | ||
195 | // Tab event | |
196 | IMPLEMENT_DYNAMIC_CLASS(wxTabEvent, wxCommandEvent) | |
197 | ||
198 | wxTabEvent::wxTabEvent(wxEventType commandType, int id): | |
199 | wxCommandEvent(commandType, id) | |
200 | { | |
201 | } | |
202 |