1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/tabctrl.cpp
4 // Author: William Osborne - minimal working wxPalmOS port
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
26 #if defined(__WIN95__)
28 #include "wx/tabctrl.h"
29 #include "wx/palmos/imaglist.h"
31 IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl
, wxControl
)
32 IMPLEMENT_DYNAMIC_CLASS(wxTabEvent
, wxNotifyEvent
)
34 DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGED
)
35 DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGING
)
37 BEGIN_EVENT_TABLE(wxTabCtrl
, wxControl
)
40 wxTabCtrl::wxTabCtrl()
44 bool wxTabCtrl::Create(wxWindow
*parent
, wxWindowID id
, const wxPoint
& pos
, const wxSize
& size
,
45 long style
, const wxString
& name
)
50 wxTabCtrl::~wxTabCtrl()
54 bool wxTabCtrl::MSWOnNotify(int idCtrl
, WXLPARAM lParam
, WXLPARAM
*result
)
60 bool wxTabCtrl::DeleteAllItems()
66 bool wxTabCtrl::DeleteItem(int item
)
72 int wxTabCtrl::GetSelection() const
77 // Get the tab with the current keyboard focus
78 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
95 // Get the rect corresponding to the tab
96 bool wxTabCtrl::GetItemRect(int item
, wxRect
& wxrect
) const
101 // Get the number of rows
102 int wxTabCtrl::GetRowCount() const
108 wxString
wxTabCtrl::GetItemText(int item
) const
110 wxString
str(wxEmptyString
);
115 // Get the item image
116 int wxTabCtrl::GetItemImage(int item
) const
122 void* wxTabCtrl::GetItemData(int item
) const
128 int wxTabCtrl::HitTest(const wxPoint
& pt
, long& flags
)
134 bool wxTabCtrl::InsertItem(int item
, const wxString
& text
, int imageId
, void* data
)
140 int wxTabCtrl::SetSelection(int item
)
145 // Set the image list
146 void wxTabCtrl::SetImageList(wxImageList
* imageList
)
150 // Set the text for an item
151 bool wxTabCtrl::SetItemText(int item
, const wxString
& text
)
156 // Set the image for an item
157 bool wxTabCtrl::SetItemImage(int item
, int image
)
162 // Set the data for an item
163 bool wxTabCtrl::SetItemData(int item
, void* data
)
168 // Set the size for a fixed-width tab control
169 void wxTabCtrl::SetItemSize(const wxSize
& size
)
173 // Set the padding between tabs
174 void wxTabCtrl::SetPadding(const wxSize
& padding
)
182 #endif // wxUSE_TAB_DIALOG