X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/489468feaa08b8f504735eecca522fb8d0f825d2..e7bed112b866057a27d3ab3ba76a5722a0dc2561:/src/osx/carbon/tabctrl.cpp diff --git a/src/osx/carbon/tabctrl.cpp b/src/osx/carbon/tabctrl.cpp index bd557b762d..16bb6fe4d3 100644 --- a/src/osx/carbon/tabctrl.cpp +++ b/src/osx/carbon/tabctrl.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/mac/carbon/tabctrl.cpp +// Name: src/osx/carbon/tabctrl.cpp // Purpose: wxTabCtrl // Author: Stefan Csomor // Modified by: @@ -13,190 +13,6 @@ #if wxUSE_TAB_DIALOG -#include "wx/tabctrl.h" - -#ifndef WX_PRECOMP - #include "wx/control.h" -#endif - -#include "wx/mac/uma.h" - -IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxTabEvent, wxNotifyEvent) - -DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGED) -DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGING) - - -BEGIN_EVENT_TABLE(wxTabCtrl, wxControl) -END_EVENT_TABLE() - - -wxTabCtrl::wxTabCtrl() -{ - m_macIsUserPane = false; - m_imageList = NULL; -} - -bool wxTabCtrl::Create( wxWindow *parent, - wxWindowID id, const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) -{ - m_macIsUserPane = false; - m_imageList = NULL; - - if ( !wxControl::Create( parent, id, pos, size, style, wxDefaultValidator, name ) ) - return false; - - Rect bounds = wxMacGetBoundsForControl( this, pos, size ); - - UInt16 tabstyle = kControlTabDirectionNorth; - ControlTabSize tabsize = kControlTabSizeLarge; - if ( GetWindowVariant() == wxWINDOW_VARIANT_SMALL ) - tabsize = kControlTabSizeSmall ; - else if ( GetWindowVariant() == wxWINDOW_VARIANT_MINI ) - { - tabsize = 3 ; - } - - m_peer = new wxMacControl( this ); - OSStatus err = CreateTabsControl( - MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds, - tabsize, tabstyle, 0, NULL, m_peer->GetControlRefAddr() ); - verify_noerr( err ); - - MacPostControlCreate( pos, size ); - - return true; -} - -wxTabCtrl::~wxTabCtrl() -{ -} - -void wxTabCtrl::Command(wxCommandEvent& event) -{ -} - -bool wxTabCtrl::DeleteAllItems() -{ - // TODO: - return false; -} - -bool wxTabCtrl::DeleteItem(int item) -{ - // TODO: - return false; -} - -int wxTabCtrl::GetSelection() const -{ - // TODO: - return 0; -} - -// Get the tab with the current keyboard focus -// -int wxTabCtrl::GetCurFocus() const -{ - // TODO: - return 0; -} - -wxImageList * wxTabCtrl::GetImageList() const -{ - return m_imageList; -} - -int wxTabCtrl::GetItemCount() const -{ - // TODO: - return 0; -} - -// Get the rect corresponding to the tab -bool wxTabCtrl::GetItemRect(int item, wxRect& wxrect) const -{ - // TODO: - return false; -} - -int wxTabCtrl::GetRowCount() const -{ - // TODO: - return 0; -} - -wxString wxTabCtrl::GetItemText(int item) const -{ - // TODO: - return wxEmptyString; -} - -int wxTabCtrl::GetItemImage(int item) const -{ - // TODO: - return 0; -} - -void* wxTabCtrl::GetItemData(int item) const -{ - // TODO: - return NULL; -} - -int wxTabCtrl::HitTest(const wxPoint& pt, long& flags) -{ - // TODO: - return 0; -} - -bool wxTabCtrl::InsertItem(int item, const wxString& text, int imageId, void* data) -{ - // TODO: - return false; -} - -int wxTabCtrl::SetSelection(int item) -{ - // TODO: - return 0; -} - -void wxTabCtrl::SetImageList(wxImageList* imageList) -{ - // TODO: -} - -bool wxTabCtrl::SetItemText(int item, const wxString& text) -{ - // TODO: - return false; -} - -bool wxTabCtrl::SetItemImage(int item, int image) -{ - // TODO: - return false; -} - -bool wxTabCtrl::SetItemData(int item, void* data) -{ - // TODO: - return false; -} - -// Set the size for a fixed-width tab control -void wxTabCtrl::SetItemSize(const wxSize& size) -{ - // TODO: -} - -// Set the padding between tabs -void wxTabCtrl::SetPadding(const wxSize& padding) -{ - // TODO: -} +// superseeded by wxNotebook implementation, skeleton moved to src/osx/ #endif // wxUSE_TAB_DIALOG