]>
git.saurik.com Git - wxWidgets.git/blob - src/motif/tabctrl.cpp
   1 ///////////////////////////////////////////////////////////////////////////// 
   4 // Author:      Julian Smart 
   8 // Copyright:   (c) Julian Smart 
   9 // Licence:     wxWindows licence 
  10 ///////////////////////////////////////////////////////////////////////////// 
  13 #pragma implementation "tabctrl.h" 
  16 #include "wx/control.h" 
  17 #include "wx/tabctrl.h" 
  19 #if !USE_SHARED_LIBRARY 
  20 IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl
, wxControl
) 
  22 BEGIN_EVENT_TABLE(wxTabCtrl
, wxControl
) 
  26 wxTabCtrl::wxTabCtrl() 
  31 bool wxTabCtrl::Create(wxWindow 
*parent
, wxWindowID id
, const wxPoint
& pos
, const wxSize
& size
, 
  32             long style
, const wxString
& name
) 
  38     m_windowStyle 
= style
; 
  42     m_windowId 
= (id 
< 0 ? NewControlId() : id
); 
  44     if (parent
) parent
->AddChild(this); 
  46     // TODO: create tab control 
  50 wxTabCtrl::~wxTabCtrl() 
  54 void wxTabCtrl::Command(wxCommandEvent
& event
) 
  59 bool wxTabCtrl::DeleteAllItems() 
  66 bool wxTabCtrl::DeleteItem(int item
) 
  73 int wxTabCtrl::GetSelection() const 
  79 // Get the tab with the current keyboard focus 
  80 int wxTabCtrl::GetCurFocus() const 
  86 // Get the associated image list 
  87 wxImageList
* wxTabCtrl::GetImageList() const 
  92 // Get the number of items 
  93 int wxTabCtrl::GetItemCount() const 
  99 // Get the rect corresponding to the tab 
 100 bool wxTabCtrl::GetItemRect(int item
, wxRect
& wxrect
) const 
 106 // Get the number of rows 
 107 int wxTabCtrl::GetRowCount() const 
 114 wxString 
wxTabCtrl::GetItemText(int item
) const 
 120 // Get the item image 
 121 int wxTabCtrl::GetItemImage(int item
) const 
 128 void* wxTabCtrl::GetItemData(int item
) const 
 135 int wxTabCtrl::HitTest(const wxPoint
& pt
, long& flags
) 
 142 bool wxTabCtrl::InsertItem(int item
, const wxString
& text
, int imageId
, void* data
) 
 149 int wxTabCtrl::SetSelection(int item
) 
 155 // Set the image list 
 156 void wxTabCtrl::SetImageList(wxImageList
* imageList
) 
 161 // Set the text for an item 
 162 bool wxTabCtrl::SetItemText(int item
, const wxString
& text
) 
 168 // Set the image for an item 
 169 bool wxTabCtrl::SetItemImage(int item
, int image
) 
 175 // Set the data for an item 
 176 bool wxTabCtrl::SetItemData(int item
, void* data
) 
 182 // Set the size for a fixed-width tab control 
 183 void wxTabCtrl::SetItemSize(const wxSize
& size
) 
 188 // Set the padding between tabs 
 189 void wxTabCtrl::SetPadding(const wxSize
& padding
) 
 195 IMPLEMENT_DYNAMIC_CLASS(wxTabEvent
, wxCommandEvent
) 
 197 wxTabEvent::wxTabEvent(wxEventType commandType
, int id
): 
 198   wxCommandEvent(commandType
, id
)