]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/carbon/tabctrl.cpp
1 /////////////////////////////////////////////////////////////////////////////
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "tabctrl.h"
16 #include "wx/control.h"
17 #include "wx/tabctrl.h"
18 #include "wx/mac/uma.h"
20 IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl
, wxControl
)
22 BEGIN_EVENT_TABLE(wxTabCtrl
, wxControl
)
25 wxTabCtrl::wxTabCtrl()
30 bool wxTabCtrl::Create(wxWindow
*parent
, wxWindowID id
, const wxPoint
& pos
, const wxSize
& size
,
31 long style
, const wxString
& name
)
38 MacPreControlCreate( parent
, id
, "" , pos
, size
,style
, *((wxValidator
*)NULL
) , name
, &bounds
, title
) ;
40 m_macControl
= UMANewControl( parent
->GetMacRootWindow() , &bounds
, title
, true , 0 , 0 , 1,
41 kControlTabSmallProc
, (long) this ) ;
43 MacPostControlCreate() ;
47 wxTabCtrl::~wxTabCtrl()
51 void wxTabCtrl::Command(wxCommandEvent
& event
)
56 bool wxTabCtrl::DeleteAllItems()
63 bool wxTabCtrl::DeleteItem(int item
)
70 int wxTabCtrl::GetSelection() const
76 // Get the tab with the current keyboard focus
77 int wxTabCtrl::GetCurFocus() const
83 // Get the associated image list
84 wxImageList
* wxTabCtrl::GetImageList() const
89 // Get the number of items
90 int wxTabCtrl::GetItemCount() const
96 // Get the rect corresponding to the tab
97 bool wxTabCtrl::GetItemRect(int item
, wxRect
& wxrect
) const
103 // Get the number of rows
104 int wxTabCtrl::GetRowCount() const
111 wxString
wxTabCtrl::GetItemText(int item
) const
117 // Get the item image
118 int wxTabCtrl::GetItemImage(int item
) const
125 void* wxTabCtrl::GetItemData(int item
) const
132 int wxTabCtrl::HitTest(const wxPoint
& pt
, long& flags
)
139 bool wxTabCtrl::InsertItem(int item
, const wxString
& text
, int imageId
, void* data
)
146 int wxTabCtrl::SetSelection(int item
)
152 // Set the image list
153 void wxTabCtrl::SetImageList(wxImageList
* imageList
)
158 // Set the text for an item
159 bool wxTabCtrl::SetItemText(int item
, const wxString
& text
)
165 // Set the image for an item
166 bool wxTabCtrl::SetItemImage(int item
, int image
)
172 // Set the data for an item
173 bool wxTabCtrl::SetItemData(int item
, void* data
)
179 // Set the size for a fixed-width tab control
180 void wxTabCtrl::SetItemSize(const wxSize
& size
)
185 // Set the padding between tabs
186 void wxTabCtrl::SetPadding(const wxSize
& padding
)
192 IMPLEMENT_DYNAMIC_CLASS(wxTabEvent
, wxCommandEvent
)
194 wxTabEvent::wxTabEvent(wxEventType commandType
, int id
):
195 wxCommandEvent(commandType
, id
)