]> git.saurik.com Git - wxWidgets.git/blame - src/mac/carbon/tabctrl.cpp
wxExecuteData is a struct, not class (warning fix)
[wxWidgets.git] / src / mac / carbon / tabctrl.cpp
CommitLineData
e9576ca5
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: tabctrl.cpp
3// Purpose: wxTabCtrl
a31a5f85 4// Author: Stefan Csomor
e9576ca5 5// Modified by:
a31a5f85 6// Created: 1998-01-01
e9576ca5 7// RCS-ID: $Id$
a31a5f85 8// Copyright: (c) Stefan Csomor
65571936 9// Licence: wxWindows licence
e9576ca5
SC
10/////////////////////////////////////////////////////////////////////////////
11
12#ifdef __GNUG__
13#pragma implementation "tabctrl.h"
14#endif
15
d8c736e5
GD
16#include "wx/defs.h"
17
e9576ca5
SC
18#include "wx/control.h"
19#include "wx/tabctrl.h"
519cb848 20#include "wx/mac/uma.h"
e9576ca5 21
e9576ca5 22IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl, wxControl)
5eee8dcf
SC
23IMPLEMENT_DYNAMIC_CLASS(wxTabEvent, wxNotifyEvent)
24
25DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGED)
26DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGING)
27
e9576ca5
SC
28
29BEGIN_EVENT_TABLE(wxTabCtrl, wxControl)
30END_EVENT_TABLE()
e9576ca5
SC
31
32wxTabCtrl::wxTabCtrl()
33{
34 m_imageList = NULL;
35}
36
37bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
38 long style, const wxString& name)
39{
facd6764
SC
40 m_macIsUserPane = FALSE ;
41
b45ed7a2
VZ
42 if ( !wxControl::Create(parent, id, pos, size,
43 style, wxDefaultValidator, name) )
44 return false;
45
e40298d5
JS
46 m_imageList = NULL;
47
facd6764 48 Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
4c37f124
SC
49
50 UInt16 tabstyle = kControlTabDirectionNorth ;
51 ControlTabSize tabsize = kControlTabSizeLarge ;
52 if ( GetWindowVariant() == wxWINDOW_VARIANT_SMALL )
53 tabsize = kControlTabSizeSmall ;
54 else if ( GetWindowVariant() == wxWINDOW_VARIANT_MINI )
55 {
56 if (UMAGetSystemVersion() >= 0x1030 )
57 tabsize = 3 ;
58 else
59 tabsize = kControlSizeSmall;
60 }
e40298d5 61
21fd5529 62 m_peer = new wxMacControl() ;
4c37f124 63 verify_noerr ( CreateTabsControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds ,
5ca0d812 64 tabsize , tabstyle, 0, NULL, m_peer->GetControlRefAddr() ) );
21fd5529 65
4c37f124 66
facd6764 67 MacPostControlCreate(pos,size) ;
e40298d5 68 return TRUE ;
e9576ca5
SC
69}
70
71wxTabCtrl::~wxTabCtrl()
72{
73}
74
75void wxTabCtrl::Command(wxCommandEvent& event)
76{
77}
78
79// Delete all items
80bool wxTabCtrl::DeleteAllItems()
81{
82 // TODO
83 return FALSE;
84}
85
86// Delete an item
87bool wxTabCtrl::DeleteItem(int item)
88{
89 // TODO
90 return FALSE;
91}
92
93// Get the selection
94int wxTabCtrl::GetSelection() const
95{
96 // TODO
97 return 0;
98}
99
100// Get the tab with the current keyboard focus
101int wxTabCtrl::GetCurFocus() const
102{
103 // TODO
104 return 0;
105}
106
107// Get the associated image list
108wxImageList* wxTabCtrl::GetImageList() const
109{
110 return m_imageList;
111}
112
113// Get the number of items
114int wxTabCtrl::GetItemCount() const
115{
116 // TODO
117 return 0;
118}
119
120// Get the rect corresponding to the tab
121bool wxTabCtrl::GetItemRect(int item, wxRect& wxrect) const
122{
123 // TODO
124 return FALSE;
125}
126
127// Get the number of rows
128int wxTabCtrl::GetRowCount() const
129{
130 // TODO
131 return 0;
132}
133
134// Get the item text
135wxString wxTabCtrl::GetItemText(int item) const
136{
137 // TODO
427ff662 138 return wxEmptyString;
e9576ca5
SC
139}
140
141// Get the item image
142int wxTabCtrl::GetItemImage(int item) const
143{
144 // TODO
145 return 0;
146}
147
148// Get the item data
149void* wxTabCtrl::GetItemData(int item) const
150{
151 // TODO
152 return NULL;
153}
154
155// Hit test
156int wxTabCtrl::HitTest(const wxPoint& pt, long& flags)
157{
158 // TODO
159 return 0;
160}
161
162// Insert an item
163bool wxTabCtrl::InsertItem(int item, const wxString& text, int imageId, void* data)
164{
165 // TODO
166 return FALSE;
167}
168
169// Set the selection
170int wxTabCtrl::SetSelection(int item)
171{
172 // TODO
173 return 0;
174}
175
176// Set the image list
177void wxTabCtrl::SetImageList(wxImageList* imageList)
178{
179 // TODO
180}
181
182// Set the text for an item
183bool wxTabCtrl::SetItemText(int item, const wxString& text)
184{
185 // TODO
186 return FALSE;
187}
188
189// Set the image for an item
190bool wxTabCtrl::SetItemImage(int item, int image)
191{
192 // TODO
193 return FALSE;
194}
195
196// Set the data for an item
197bool wxTabCtrl::SetItemData(int item, void* data)
198{
199 // TODO
200 return FALSE;
201}
202
203// Set the size for a fixed-width tab control
204void wxTabCtrl::SetItemSize(const wxSize& size)
205{
206 // TODO
207}
208
209// Set the padding between tabs
210void wxTabCtrl::SetPadding(const wxSize& padding)
211{
212 // TODO
213}
214