]>
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"
16 #include "wx/control.h"
17 #include "wx/tabctrl.h"
18 #include "wx/mac/uma.h"
20 #if !USE_SHARED_LIBRARY
21 IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl
, wxControl
)
23 BEGIN_EVENT_TABLE(wxTabCtrl
, wxControl
)
27 wxTabCtrl::wxTabCtrl()
32 bool wxTabCtrl::Create(wxWindow
*parent
, wxWindowID id
, const wxPoint
& pos
, const wxSize
& size
,
33 long style
, const wxString
& name
)
40 MacPreControlCreate( parent
, id
, "" , pos
, size
,style
, *((wxValidator
*)NULL
) , name
, &bounds
, title
) ;
42 m_macControl
= UMANewControl( parent
->GetMacRootWindow() , &bounds
, title
, true , 0 , 0 , 1,
43 kControlTabSmallProc
, (long) this ) ;
45 MacPostControlCreate() ;
49 wxTabCtrl::~wxTabCtrl()
53 void wxTabCtrl::Command(wxCommandEvent
& event
)
58 bool wxTabCtrl::DeleteAllItems()
65 bool wxTabCtrl::DeleteItem(int item
)
72 int wxTabCtrl::GetSelection() const
78 // Get the tab with the current keyboard focus
79 int wxTabCtrl::GetCurFocus() const
85 // Get the associated image list
86 wxImageList
* wxTabCtrl::GetImageList() const
91 // Get the number of items
92 int wxTabCtrl::GetItemCount() const
98 // Get the rect corresponding to the tab
99 bool wxTabCtrl::GetItemRect(int item
, wxRect
& wxrect
) const
105 // Get the number of rows
106 int wxTabCtrl::GetRowCount() const
113 wxString
wxTabCtrl::GetItemText(int item
) const
119 // Get the item image
120 int wxTabCtrl::GetItemImage(int item
) const
127 void* wxTabCtrl::GetItemData(int item
) const
134 int wxTabCtrl::HitTest(const wxPoint
& pt
, long& flags
)
141 bool wxTabCtrl::InsertItem(int item
, const wxString
& text
, int imageId
, void* data
)
148 int wxTabCtrl::SetSelection(int item
)
154 // Set the image list
155 void wxTabCtrl::SetImageList(wxImageList
* imageList
)
160 // Set the text for an item
161 bool wxTabCtrl::SetItemText(int item
, const wxString
& text
)
167 // Set the image for an item
168 bool wxTabCtrl::SetItemImage(int item
, int image
)
174 // Set the data for an item
175 bool wxTabCtrl::SetItemData(int item
, void* data
)
181 // Set the size for a fixed-width tab control
182 void wxTabCtrl::SetItemSize(const wxSize
& size
)
187 // Set the padding between tabs
188 void wxTabCtrl::SetPadding(const wxSize
& padding
)
194 IMPLEMENT_DYNAMIC_CLASS(wxTabEvent
, wxCommandEvent
)
196 wxTabEvent::wxTabEvent(wxEventType commandType
, int id
):
197 wxCommandEvent(commandType
, id
)