]> git.saurik.com Git - wxWidgets.git/blame - src/osx/carbon/tabctrl.cpp
don't set SHOW_FILES, its value is yes by default anyhow and using it provokes a...
[wxWidgets.git] / src / osx / carbon / tabctrl.cpp
CommitLineData
489468fe
SC
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
1f0c8f31 22#include "wx/osx/uma.h"
489468fe
SC
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 tabsize = 3 ;
60 }
61
62 m_peer = new wxMacControl( this );
63 OSStatus err = CreateTabsControl(
64 MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds,
65 tabsize, tabstyle, 0, NULL, m_peer->GetControlRefAddr() );
66 verify_noerr( err );
67
68 MacPostControlCreate( pos, size );
69
70 return true;
71}
72
73wxTabCtrl::~wxTabCtrl()
74{
75}
76
77void wxTabCtrl::Command(wxCommandEvent& event)
78{
79}
80
81bool wxTabCtrl::DeleteAllItems()
82{
83 // TODO:
84 return false;
85}
86
87bool wxTabCtrl::DeleteItem(int item)
88{
89 // TODO:
90 return false;
91}
92
93int wxTabCtrl::GetSelection() const
94{
95 // TODO:
96 return 0;
97}
98
99// Get the tab with the current keyboard focus
100//
101int wxTabCtrl::GetCurFocus() const
102{
103 // TODO:
104 return 0;
105}
106
107wxImageList * wxTabCtrl::GetImageList() const
108{
109 return m_imageList;
110}
111
112int wxTabCtrl::GetItemCount() const
113{
114 // TODO:
115 return 0;
116}
117
118// Get the rect corresponding to the tab
119bool wxTabCtrl::GetItemRect(int item, wxRect& wxrect) const
120{
121 // TODO:
122 return false;
123}
124
125int wxTabCtrl::GetRowCount() const
126{
127 // TODO:
128 return 0;
129}
130
131wxString wxTabCtrl::GetItemText(int item) const
132{
133 // TODO:
134 return wxEmptyString;
135}
136
137int wxTabCtrl::GetItemImage(int item) const
138{
139 // TODO:
140 return 0;
141}
142
143void* wxTabCtrl::GetItemData(int item) const
144{
145 // TODO:
146 return NULL;
147}
148
149int wxTabCtrl::HitTest(const wxPoint& pt, long& flags)
150{
151 // TODO:
152 return 0;
153}
154
155bool wxTabCtrl::InsertItem(int item, const wxString& text, int imageId, void* data)
156{
157 // TODO:
158 return false;
159}
160
161int wxTabCtrl::SetSelection(int item)
162{
163 // TODO:
164 return 0;
165}
166
167void wxTabCtrl::SetImageList(wxImageList* imageList)
168{
169 // TODO:
170}
171
172bool wxTabCtrl::SetItemText(int item, const wxString& text)
173{
174 // TODO:
175 return false;
176}
177
178bool wxTabCtrl::SetItemImage(int item, int image)
179{
180 // TODO:
181 return false;
182}
183
184bool wxTabCtrl::SetItemData(int item, void* data)
185{
186 // TODO:
187 return false;
188}
189
190// Set the size for a fixed-width tab control
191void wxTabCtrl::SetItemSize(const wxSize& size)
192{
193 // TODO:
194}
195
196// Set the padding between tabs
197void wxTabCtrl::SetPadding(const wxSize& padding)
198{
199 // TODO:
200}
201
202#endif // wxUSE_TAB_DIALOG