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