]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/tabctrl.cpp
1 /////////////////////////////////////////////////////////////////////////////
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "tabctrl.h"
18 #include "wx/control.h"
19 #include "wx/tabctrl.h"
20 #include "wx/mac/uma.h"
22 #if !USE_SHARED_LIBRARY
23 IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl
, wxControl
)
25 BEGIN_EVENT_TABLE(wxTabCtrl
, wxControl
)
29 wxTabCtrl::wxTabCtrl()
34 bool wxTabCtrl::Create(wxWindow
*parent
, wxWindowID id
, const wxPoint
& pos
, const wxSize
& size
,
35 long style
, const wxString
& name
)
42 MacPreControlCreate( parent
, id
, "" , pos
, size
,style
, wxDefaultValidator
, name
, &bounds
, title
) ;
44 m_macControl
= ::NewControl( parent
->MacGetRootWindow() , &bounds
, title
, false , 0 , 0 , 1,
45 kControlTabSmallProc
, (long) this ) ;
47 MacPostControlCreate() ;
51 wxTabCtrl::~wxTabCtrl()
55 void wxTabCtrl::Command(wxCommandEvent
& event
)
60 bool wxTabCtrl::DeleteAllItems()
67 bool wxTabCtrl::DeleteItem(int item
)
74 int wxTabCtrl::GetSelection() const
80 // Get the tab with the current keyboard focus
81 int wxTabCtrl::GetCurFocus() const
87 // Get the associated image list
88 wxImageList
* wxTabCtrl::GetImageList() const
93 // Get the number of items
94 int wxTabCtrl::GetItemCount() const
100 // Get the rect corresponding to the tab
101 bool wxTabCtrl::GetItemRect(int item
, wxRect
& wxrect
) const
107 // Get the number of rows
108 int wxTabCtrl::GetRowCount() const
115 wxString
wxTabCtrl::GetItemText(int item
) const
121 // Get the item image
122 int wxTabCtrl::GetItemImage(int item
) const
129 void* wxTabCtrl::GetItemData(int item
) const
136 int wxTabCtrl::HitTest(const wxPoint
& pt
, long& flags
)
143 bool wxTabCtrl::InsertItem(int item
, const wxString
& text
, int imageId
, void* data
)
150 int wxTabCtrl::SetSelection(int item
)
156 // Set the image list
157 void wxTabCtrl::SetImageList(wxImageList
* imageList
)
162 // Set the text for an item
163 bool wxTabCtrl::SetItemText(int item
, const wxString
& text
)
169 // Set the image for an item
170 bool wxTabCtrl::SetItemImage(int item
, int image
)
176 // Set the data for an item
177 bool wxTabCtrl::SetItemData(int item
, void* data
)
183 // Set the size for a fixed-width tab control
184 void wxTabCtrl::SetItemSize(const wxSize
& size
)
189 // Set the padding between tabs
190 void wxTabCtrl::SetPadding(const wxSize
& padding
)
196 IMPLEMENT_DYNAMIC_CLASS(wxTabEvent
, wxCommandEvent
)
198 wxTabEvent::wxTabEvent(wxEventType commandType
, int id
):
199 wxCommandEvent(commandType
, id
)