]> git.saurik.com Git - wxWidgets.git/blame - src/mac/carbon/tabctrl.cpp
positioning of the insertion point at the end
[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
e40298d5 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
2f1ae414 22#if !USE_SHARED_LIBRARY
e9576ca5
SC
23IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl, wxControl)
24
25BEGIN_EVENT_TABLE(wxTabCtrl, wxControl)
26END_EVENT_TABLE()
2f1ae414 27#endif
e9576ca5
SC
28
29wxTabCtrl::wxTabCtrl()
30{
31 m_imageList = NULL;
32}
33
34bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
35 long style, const wxString& name)
36{
facd6764
SC
37 m_macIsUserPane = FALSE ;
38
b45ed7a2
VZ
39 if ( !wxControl::Create(parent, id, pos, size,
40 style, wxDefaultValidator, name) )
41 return false;
42
e40298d5
JS
43 m_imageList = NULL;
44
facd6764 45 Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
4c37f124
SC
46
47 UInt16 tabstyle = kControlTabDirectionNorth ;
48 ControlTabSize tabsize = kControlTabSizeLarge ;
49 if ( GetWindowVariant() == wxWINDOW_VARIANT_SMALL )
50 tabsize = kControlTabSizeSmall ;
51 else if ( GetWindowVariant() == wxWINDOW_VARIANT_MINI )
52 {
53 if (UMAGetSystemVersion() >= 0x1030 )
54 tabsize = 3 ;
55 else
56 tabsize = kControlSizeSmall;
57 }
e40298d5 58
4c37f124
SC
59 verify_noerr ( CreateTabsControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds ,
60 tabsize , tabstyle, 0, NULL, (ControlRef*) &m_macControl) );
61
facd6764 62 MacPostControlCreate(pos,size) ;
e40298d5 63 return TRUE ;
e9576ca5
SC
64}
65
66wxTabCtrl::~wxTabCtrl()
67{
68}
69
70void wxTabCtrl::Command(wxCommandEvent& event)
71{
72}
73
74// Delete all items
75bool wxTabCtrl::DeleteAllItems()
76{
77 // TODO
78 return FALSE;
79}
80
81// Delete an item
82bool wxTabCtrl::DeleteItem(int item)
83{
84 // TODO
85 return FALSE;
86}
87
88// Get the selection
89int wxTabCtrl::GetSelection() const
90{
91 // TODO
92 return 0;
93}
94
95// Get the tab with the current keyboard focus
96int wxTabCtrl::GetCurFocus() const
97{
98 // TODO
99 return 0;
100}
101
102// Get the associated image list
103wxImageList* wxTabCtrl::GetImageList() const
104{
105 return m_imageList;
106}
107
108// Get the number of items
109int wxTabCtrl::GetItemCount() const
110{
111 // TODO
112 return 0;
113}
114
115// Get the rect corresponding to the tab
116bool wxTabCtrl::GetItemRect(int item, wxRect& wxrect) const
117{
118 // TODO
119 return FALSE;
120}
121
122// Get the number of rows
123int wxTabCtrl::GetRowCount() const
124{
125 // TODO
126 return 0;
127}
128
129// Get the item text
130wxString wxTabCtrl::GetItemText(int item) const
131{
132 // TODO
427ff662 133 return wxEmptyString;
e9576ca5
SC
134}
135
136// Get the item image
137int wxTabCtrl::GetItemImage(int item) const
138{
139 // TODO
140 return 0;
141}
142
143// Get the item data
144void* wxTabCtrl::GetItemData(int item) const
145{
146 // TODO
147 return NULL;
148}
149
150// Hit test
151int wxTabCtrl::HitTest(const wxPoint& pt, long& flags)
152{
153 // TODO
154 return 0;
155}
156
157// Insert an item
158bool wxTabCtrl::InsertItem(int item, const wxString& text, int imageId, void* data)
159{
160 // TODO
161 return FALSE;
162}
163
164// Set the selection
165int wxTabCtrl::SetSelection(int item)
166{
167 // TODO
168 return 0;
169}
170
171// Set the image list
172void wxTabCtrl::SetImageList(wxImageList* imageList)
173{
174 // TODO
175}
176
177// Set the text for an item
178bool wxTabCtrl::SetItemText(int item, const wxString& text)
179{
180 // TODO
181 return FALSE;
182}
183
184// Set the image for an item
185bool wxTabCtrl::SetItemImage(int item, int image)
186{
187 // TODO
188 return FALSE;
189}
190
191// Set the data for an item
192bool wxTabCtrl::SetItemData(int item, void* data)
193{
194 // TODO
195 return FALSE;
196}
197
198// Set the size for a fixed-width tab control
199void wxTabCtrl::SetItemSize(const wxSize& size)
200{
201 // TODO
202}
203
204// Set the padding between tabs
205void wxTabCtrl::SetPadding(const wxSize& padding)
206{
207 // TODO
208}
209
210// Tab event
211IMPLEMENT_DYNAMIC_CLASS(wxTabEvent, wxCommandEvent)
212
213wxTabEvent::wxTabEvent(wxEventType commandType, int id):
214 wxCommandEvent(commandType, id)
215{
216}
217