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