1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/osx/tabctrl_osx.cpp
4 // Author: Stefan Csomor
7 // RCS-ID: $Id: tabctrl.cpp 54129 2008-06-11 19:30:52Z SC $
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/wxprec.h"
16 #include "wx/tabctrl.h"
19 #include "wx/control.h"
22 #include "wx/osx/private.h"
24 IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl
, wxControl
)
25 IMPLEMENT_DYNAMIC_CLASS(wxTabEvent
, wxNotifyEvent
)
27 // this control has been superseeded by the native wxNotebook implementation, but
28 // we leave the skeleton here, just in case it might become useful ...
30 DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGED
)
31 DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGING
)
34 BEGIN_EVENT_TABLE(wxTabCtrl
, wxControl
)
38 wxTabCtrl::wxTabCtrl()
40 m_macIsUserPane
= false;
44 bool wxTabCtrl::Create( wxWindow
*parent
,
45 wxWindowID id
, const wxPoint
& pos
, const wxSize
& size
,
46 long style
, const wxString
& name
)
48 m_macIsUserPane
= false;
51 if ( !wxControl::Create( parent
, id
, pos
, size
, style
, wxDefaultValidator
, name
) )
54 m_peer
= wxWidgetImpl::CreateTabView( this, parent
, id
, pos
, size
, style
, GetExtraStyle
);
56 MacPostControlCreate( pos
, size
);
61 wxTabCtrl::~wxTabCtrl()
65 void wxTabCtrl::Command(wxCommandEvent
& event
)
69 bool wxTabCtrl::DeleteAllItems()
75 bool wxTabCtrl::DeleteItem(int item
)
81 int wxTabCtrl::GetSelection() const
87 // Get the tab with the current keyboard focus
89 int wxTabCtrl::GetCurFocus() const
95 wxImageList
* wxTabCtrl::GetImageList() const
100 int wxTabCtrl::GetItemCount() const
106 // Get the rect corresponding to the tab
107 bool wxTabCtrl::GetItemRect(int item
, wxRect
& wxrect
) const
113 int wxTabCtrl::GetRowCount() const
119 wxString
wxTabCtrl::GetItemText(int item
) const
122 return wxEmptyString
;
125 int wxTabCtrl::GetItemImage(int item
) const
131 void* wxTabCtrl::GetItemData(int item
) const
137 int wxTabCtrl::HitTest(const wxPoint
& pt
, long& flags
)
143 bool wxTabCtrl::InsertItem(int item
, const wxString
& text
, int imageId
, void* data
)
149 int wxTabCtrl::SetSelection(int item
)
155 void wxTabCtrl::SetImageList(wxImageList
* imageList
)
160 bool wxTabCtrl::SetItemText(int item
, const wxString
& text
)
166 bool wxTabCtrl::SetItemImage(int item
, int image
)
172 bool wxTabCtrl::SetItemData(int item
, void* data
)
178 // Set the size for a fixed-width tab control
179 void wxTabCtrl::SetItemSize(const wxSize
& size
)
184 // Set the padding between tabs
185 void wxTabCtrl::SetPadding(const wxSize
& padding
)
190 #endif // wxUSE_TAB_DIALOG