]> git.saurik.com Git - wxWidgets.git/blob - src/mac/carbon/tabctrl.cpp
applied patch 923858 (fixes crash in zlib streams)
[wxWidgets.git] / src / mac / carbon / tabctrl.cpp
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 m_macIsUserPane = FALSE ;
38
39 if ( !wxControl::Create(parent, id, pos, size,
40 style, wxDefaultValidator, name) )
41 return false;
42
43 m_imageList = NULL;
44
45 Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
46 m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , "\p" , true , 0 , 0 , 1,
47 kControlTabSmallProc , (long) this ) ;
48
49 MacPostControlCreate(pos,size) ;
50 return TRUE ;
51 }
52
53 wxTabCtrl::~wxTabCtrl()
54 {
55 }
56
57 void wxTabCtrl::Command(wxCommandEvent& event)
58 {
59 }
60
61 // Delete all items
62 bool wxTabCtrl::DeleteAllItems()
63 {
64 // TODO
65 return FALSE;
66 }
67
68 // Delete an item
69 bool wxTabCtrl::DeleteItem(int item)
70 {
71 // TODO
72 return FALSE;
73 }
74
75 // Get the selection
76 int wxTabCtrl::GetSelection() const
77 {
78 // TODO
79 return 0;
80 }
81
82 // Get the tab with the current keyboard focus
83 int wxTabCtrl::GetCurFocus() const
84 {
85 // TODO
86 return 0;
87 }
88
89 // Get the associated image list
90 wxImageList* wxTabCtrl::GetImageList() const
91 {
92 return m_imageList;
93 }
94
95 // Get the number of items
96 int wxTabCtrl::GetItemCount() const
97 {
98 // TODO
99 return 0;
100 }
101
102 // Get the rect corresponding to the tab
103 bool wxTabCtrl::GetItemRect(int item, wxRect& wxrect) const
104 {
105 // TODO
106 return FALSE;
107 }
108
109 // Get the number of rows
110 int wxTabCtrl::GetRowCount() const
111 {
112 // TODO
113 return 0;
114 }
115
116 // Get the item text
117 wxString wxTabCtrl::GetItemText(int item) const
118 {
119 // TODO
120 return wxEmptyString;
121 }
122
123 // Get the item image
124 int wxTabCtrl::GetItemImage(int item) const
125 {
126 // TODO
127 return 0;
128 }
129
130 // Get the item data
131 void* wxTabCtrl::GetItemData(int item) const
132 {
133 // TODO
134 return NULL;
135 }
136
137 // Hit test
138 int wxTabCtrl::HitTest(const wxPoint& pt, long& flags)
139 {
140 // TODO
141 return 0;
142 }
143
144 // Insert an item
145 bool wxTabCtrl::InsertItem(int item, const wxString& text, int imageId, void* data)
146 {
147 // TODO
148 return FALSE;
149 }
150
151 // Set the selection
152 int wxTabCtrl::SetSelection(int item)
153 {
154 // TODO
155 return 0;
156 }
157
158 // Set the image list
159 void wxTabCtrl::SetImageList(wxImageList* imageList)
160 {
161 // TODO
162 }
163
164 // Set the text for an item
165 bool wxTabCtrl::SetItemText(int item, const wxString& text)
166 {
167 // TODO
168 return FALSE;
169 }
170
171 // Set the image for an item
172 bool wxTabCtrl::SetItemImage(int item, int image)
173 {
174 // TODO
175 return FALSE;
176 }
177
178 // Set the data for an item
179 bool wxTabCtrl::SetItemData(int item, void* data)
180 {
181 // TODO
182 return FALSE;
183 }
184
185 // Set the size for a fixed-width tab control
186 void wxTabCtrl::SetItemSize(const wxSize& size)
187 {
188 // TODO
189 }
190
191 // Set the padding between tabs
192 void wxTabCtrl::SetPadding(const wxSize& padding)
193 {
194 // TODO
195 }
196
197 // Tab event
198 IMPLEMENT_DYNAMIC_CLASS(wxTabEvent, wxCommandEvent)
199
200 wxTabEvent::wxTabEvent(wxEventType commandType, int id):
201 wxCommandEvent(commandType, id)
202 {
203 }
204