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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
13 #pragma implementation "tabctrl.h"
16 // For compilers that support precompilation, includes "wx.h".
17 #include "wx/wxprec.h"
27 #if defined(__WIN95__)
29 #include "wx/tabctrl.h"
31 #include "wx/palmos/imaglist.h"
33 IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl
, wxControl
)
34 IMPLEMENT_DYNAMIC_CLASS(wxTabEvent
, wxNotifyEvent
)
36 DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGED
)
37 DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGING
)
39 BEGIN_EVENT_TABLE(wxTabCtrl
, wxControl
)
42 wxTabCtrl::wxTabCtrl()
46 bool wxTabCtrl::Create(wxWindow
*parent
, wxWindowID id
, const wxPoint
& pos
, const wxSize
& size
,
47 long style
, const wxString
& name
)
52 wxTabCtrl::~wxTabCtrl()
56 bool wxTabCtrl::MSWOnNotify(int idCtrl
, WXLPARAM lParam
, WXLPARAM
*result
)
62 bool wxTabCtrl::DeleteAllItems()
68 bool wxTabCtrl::DeleteItem(int item
)
74 int wxTabCtrl::GetSelection() const
79 // Get the tab with the current keyboard focus
80 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
97 // Get the rect corresponding to the tab
98 bool wxTabCtrl::GetItemRect(int item
, wxRect
& wxrect
) const
103 // Get the number of rows
104 int wxTabCtrl::GetRowCount() const
110 wxString
wxTabCtrl::GetItemText(int item
) const
112 wxString
str(wxEmptyString
);
117 // Get the item image
118 int wxTabCtrl::GetItemImage(int item
) const
124 void* wxTabCtrl::GetItemData(int item
) const
130 int wxTabCtrl::HitTest(const wxPoint
& pt
, long& flags
)
136 bool wxTabCtrl::InsertItem(int item
, const wxString
& text
, int imageId
, void* data
)
142 int wxTabCtrl::SetSelection(int item
)
147 // Set the image list
148 void wxTabCtrl::SetImageList(wxImageList
* imageList
)
152 // Set the text for an item
153 bool wxTabCtrl::SetItemText(int item
, const wxString
& text
)
158 // Set the image for an item
159 bool wxTabCtrl::SetItemImage(int item
, int image
)
164 // Set the data for an item
165 bool wxTabCtrl::SetItemData(int item
, void* data
)
170 // Set the size for a fixed-width tab control
171 void wxTabCtrl::SetItemSize(const wxSize
& size
)
175 // Set the padding between tabs
176 void wxTabCtrl::SetPadding(const wxSize
& padding
)