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"
23 #if defined(__WIN95__)
25 #include "wx/tabctrl.h"
27 #include "wx/palmos/imaglist.h"
29 IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl
, wxControl
)
30 IMPLEMENT_DYNAMIC_CLASS(wxTabEvent
, wxNotifyEvent
)
32 DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGED
)
33 DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGING
)
35 BEGIN_EVENT_TABLE(wxTabCtrl
, wxControl
)
38 wxTabCtrl::wxTabCtrl()
42 bool wxTabCtrl::Create(wxWindow
*parent
, wxWindowID id
, const wxPoint
& pos
, const wxSize
& size
,
43 long style
, const wxString
& name
)
48 wxTabCtrl::~wxTabCtrl()
52 bool wxTabCtrl::MSWOnNotify(int idCtrl
, WXLPARAM lParam
, WXLPARAM
*result
)
58 bool wxTabCtrl::DeleteAllItems()
64 bool wxTabCtrl::DeleteItem(int item
)
70 int wxTabCtrl::GetSelection() const
75 // Get the tab with the current keyboard focus
76 int wxTabCtrl::GetCurFocus() const
81 // Get the associated image list
82 wxImageList
* wxTabCtrl::GetImageList() const
87 // Get the number of items
88 int wxTabCtrl::GetItemCount() const
93 // Get the rect corresponding to the tab
94 bool wxTabCtrl::GetItemRect(int item
, wxRect
& wxrect
) const
99 // Get the number of rows
100 int wxTabCtrl::GetRowCount() const
106 wxString
wxTabCtrl::GetItemText(int item
) const
108 wxString
str(wxEmptyString
);
113 // Get the item image
114 int wxTabCtrl::GetItemImage(int item
) const
120 void* wxTabCtrl::GetItemData(int item
) const
126 int wxTabCtrl::HitTest(const wxPoint
& pt
, long& flags
)
132 bool wxTabCtrl::InsertItem(int item
, const wxString
& text
, int imageId
, void* data
)
138 int wxTabCtrl::SetSelection(int item
)
143 // Set the image list
144 void wxTabCtrl::SetImageList(wxImageList
* imageList
)
148 // Set the text for an item
149 bool wxTabCtrl::SetItemText(int item
, const wxString
& text
)
154 // Set the image for an item
155 bool wxTabCtrl::SetItemImage(int item
, int image
)
160 // Set the data for an item
161 bool wxTabCtrl::SetItemData(int item
, void* data
)
166 // Set the size for a fixed-width tab control
167 void wxTabCtrl::SetItemSize(const wxSize
& size
)
171 // Set the padding between tabs
172 void wxTabCtrl::SetPadding(const wxSize
& padding
)