]>
git.saurik.com Git - wxWidgets.git/blob - src/stubs/tabctrl.cpp
3a84d4d66879efcb95bd03fcb9debb88ac33659c
1 /////////////////////////////////////////////////////////////////////////////
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "tabctrl.h"
16 #include "wx/tabctrl.h"
18 #if !USE_SHARED_LIBRARY
19 IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl
, wxControl
)
21 BEGIN_EVENT_TABLE(wxTabCtrl
, wxControl
)
22 EVT_SIZE(wxTabCtrl::OnSize
)
23 EVT_PAINT(wxTabCtrl::OnPaint
)
24 EVT_KILL_FOCUS(wxTabCtrl::OnKillFocus
)
25 EVT_MOUSE_EVENTS(wxTabCtrl::OnMouseEvent
)
26 EVT_SYS_COLOUR_CHANGED(wxTabCtrl::OnSysColourChanged
)
30 wxTabCtrl::wxTabCtrl()
35 bool wxTabCtrl::Create(wxWindow
*parent
, wxWindowID id
, const wxPoint
& pos
, const wxSize
& size
,
36 long style
, const wxString
& name
)
42 m_windowStyle
= style
;
46 m_windowId
= (id
< 0 ? NewControlId() : id
);
48 if (parent
) parent
->AddChild(this);
50 // TODO: create tab control
54 wxTabCtrl::~wxTabCtrl()
58 void wxTabCtrl::Command(wxCommandEvent
& event
)
63 bool wxTabCtrl::DeleteAllItems()
70 bool wxTabCtrl::DeleteItem(int item
)
77 int wxTabCtrl::GetSelection() const
83 // Get the tab with the current keyboard focus
84 int wxTabCtrl::GetCurFocus() const
90 // Get the associated image list
91 wxImageList
* wxTabCtrl::GetImageList() const
96 // Get the number of items
97 int wxTabCtrl::GetItemCount() const
103 // Get the rect corresponding to the tab
104 bool wxTabCtrl::GetItemRect(int item
, wxRect
& wxrect
) const
110 // Get the number of rows
111 int wxTabCtrl::GetRowCount() const
118 wxString
wxTabCtrl::GetItemText(int item
) const
124 // Get the item image
125 int wxTabCtrl::GetItemImage(int item
) const
132 void* wxTabCtrl::GetItemData(int item
) const
139 int wxTabCtrl::HitTest(const wxPoint
& pt
, long& flags
)
146 bool wxTabCtrl::InsertItem(int item
, const wxString
& text
, int imageId
, void* data
)
153 int wxTabCtrl::SetSelection(int item
)
159 // Set the image list
160 void wxTabCtrl::SetImageList(wxImageList
* imageList
)
165 // Set the text for an item
166 bool wxTabCtrl::SetItemText(int item
, const wxString
& text
)
172 // Set the image for an item
173 bool wxTabCtrl::SetItemImage(int item
, int image
)
179 // Set the data for an item
180 bool wxTabCtrl::SetItemData(int item
, void* data
)
186 // Set the size for a fixed-width tab control
187 void wxTabCtrl::SetItemSize(const wxSize
& size
)
192 // Set the padding between tabs
193 void wxTabCtrl::SetPadding(const wxSize
& padding
)
199 IMPLEMENT_DYNAMIC_CLASS(wxTabEvent
, wxCommandEvent
)
201 wxTabEvent::wxTabEvent(wxEventType commandType
, int id
):
202 wxCommandEvent(commandType
, id
)