]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/mac/carbon/tabctrl.cpp
C/POSIX locales (or absence of locale information) corresponds to wxLANGUAGE_ENGLISH_...
[wxWidgets.git] / src / mac / carbon / tabctrl.cpp
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: src/mac/carbon/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#if wxUSE_TAB_DIALOG
15
16#include "wx/tabctrl.h"
17
18#ifndef WX_PRECOMP
19 #include "wx/control.h"
20#endif
21
22#include "wx/mac/uma.h"
23
24IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl, wxControl)
25IMPLEMENT_DYNAMIC_CLASS(wxTabEvent, wxNotifyEvent)
26
27DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGED)
28DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGING)
29
30
31BEGIN_EVENT_TABLE(wxTabCtrl, wxControl)
32END_EVENT_TABLE()
33
34
35wxTabCtrl::wxTabCtrl()
36{
37 m_macIsUserPane = false;
38 m_imageList = NULL;
39}
40
41bool wxTabCtrl::Create( wxWindow *parent,
42 wxWindowID id, const wxPoint& pos, const wxSize& size,
43 long style, const wxString& name )
44{
45 m_macIsUserPane = false;
46 m_imageList = NULL;
47
48 if ( !wxControl::Create( parent, id, pos, size, style, wxDefaultValidator, name ) )
49 return false;
50
51 Rect bounds = wxMacGetBoundsForControl( this, pos, size );
52
53 UInt16 tabstyle = kControlTabDirectionNorth;
54 ControlTabSize tabsize = kControlTabSizeLarge;
55 if ( GetWindowVariant() == wxWINDOW_VARIANT_SMALL )
56 tabsize = kControlTabSizeSmall ;
57 else if ( GetWindowVariant() == wxWINDOW_VARIANT_MINI )
58 {
59 if (UMAGetSystemVersion() >= 0x1030 )
60 tabsize = 3 ;
61 else
62 tabsize = kControlSizeSmall;
63 }
64
65 m_peer = new wxMacControl( this );
66 OSStatus err = CreateTabsControl(
67 MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds,
68 tabsize, tabstyle, 0, NULL, m_peer->GetControlRefAddr() );
69 verify_noerr( err );
70
71 MacPostControlCreate( pos, size );
72
73 return true;
74}
75
76wxTabCtrl::~wxTabCtrl()
77{
78}
79
80void wxTabCtrl::Command(wxCommandEvent& event)
81{
82}
83
84bool wxTabCtrl::DeleteAllItems()
85{
86 // TODO:
87 return false;
88}
89
90bool wxTabCtrl::DeleteItem(int item)
91{
92 // TODO:
93 return false;
94}
95
96int wxTabCtrl::GetSelection() const
97{
98 // TODO:
99 return 0;
100}
101
102// Get the tab with the current keyboard focus
103//
104int wxTabCtrl::GetCurFocus() const
105{
106 // TODO:
107 return 0;
108}
109
110wxImageList * wxTabCtrl::GetImageList() const
111{
112 return m_imageList;
113}
114
115int wxTabCtrl::GetItemCount() const
116{
117 // TODO:
118 return 0;
119}
120
121// Get the rect corresponding to the tab
122bool wxTabCtrl::GetItemRect(int item, wxRect& wxrect) const
123{
124 // TODO:
125 return false;
126}
127
128int wxTabCtrl::GetRowCount() const
129{
130 // TODO:
131 return 0;
132}
133
134wxString wxTabCtrl::GetItemText(int item) const
135{
136 // TODO:
137 return wxEmptyString;
138}
139
140int wxTabCtrl::GetItemImage(int item) const
141{
142 // TODO:
143 return 0;
144}
145
146void* wxTabCtrl::GetItemData(int item) const
147{
148 // TODO:
149 return NULL;
150}
151
152int wxTabCtrl::HitTest(const wxPoint& pt, long& flags)
153{
154 // TODO:
155 return 0;
156}
157
158bool wxTabCtrl::InsertItem(int item, const wxString& text, int imageId, void* data)
159{
160 // TODO:
161 return false;
162}
163
164int wxTabCtrl::SetSelection(int item)
165{
166 // TODO:
167 return 0;
168}
169
170void wxTabCtrl::SetImageList(wxImageList* imageList)
171{
172 // TODO:
173}
174
175bool wxTabCtrl::SetItemText(int item, const wxString& text)
176{
177 // TODO:
178 return false;
179}
180
181bool wxTabCtrl::SetItemImage(int item, int image)
182{
183 // TODO:
184 return false;
185}
186
187bool wxTabCtrl::SetItemData(int item, void* data)
188{
189 // TODO:
190 return false;
191}
192
193// Set the size for a fixed-width tab control
194void wxTabCtrl::SetItemSize(const wxSize& size)
195{
196 // TODO:
197}
198
199// Set the padding between tabs
200void wxTabCtrl::SetPadding(const wxSize& padding)
201{
202 // TODO:
203}
204
205#endif // wxUSE_TAB_DIALOG