X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2646f485163f410baaad5bcf49028c604a352d19..b9d880d6382e24156cdce4ae0390c843cc6208d9:/src/mac/classic/checkbox.cpp diff --git a/src/mac/classic/checkbox.cpp b/src/mac/classic/checkbox.cpp index 6e6aa299b2..461c6d1cb9 100644 --- a/src/mac/classic/checkbox.cpp +++ b/src/mac/classic/checkbox.cpp @@ -1,26 +1,24 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: checkbox.cpp +// Name: src/mac/classic/checkbox.cpp // Purpose: wxCheckBox // Author: Stefan Csomor // Modified by: // Created: 04/01/98 // RCS-ID: $Id$ // Copyright: (c) Stefan Csomor -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "checkbox.h" -#endif +#include "wx/wxprec.h" -#include "wx/defs.h" +#ifdef __BORLANDC__ + #pragma hdrstop +#endif #include "wx/checkbox.h" -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox) -#endif #include "wx/mac/uma.h" @@ -36,7 +34,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, Rect bounds ; Str255 title ; - + MacPreControlCreate( parent , id , label , pos , size ,style, validator , name , &bounds , title ) ; SInt16 maxValue = 1 /* kControlCheckboxCheckedValue */; @@ -45,12 +43,12 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, maxValue = 2 /* kControlCheckboxMixedValue */; } - m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , maxValue, + m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , maxValue, kControlCheckBoxProc , (long) this ) ; - + MacPostControlCreate() ; - return TRUE; + return true; } void wxCheckBox::SetValue(bool val) @@ -94,7 +92,7 @@ void wxCheckBox::DoSet3StateValue(wxCheckBoxState val) MacRedrawControl() ; } -void wxCheckBox::MacHandleControlClick( WXWidget WXUNUSED(control), wxInt16 WXUNUSED(controlpart) , bool WXUNUSED(mouseStillDown) ) +void wxCheckBox::MacHandleControlClick( WXWidget WXUNUSED(control), wxInt16 WXUNUSED(controlpart) , bool WXUNUSED(mouseStillDown) ) { wxCommandEvent event(wxEVT_COMMAND_CHECKBOX_CLICKED, m_windowId ); wxCheckBoxState state = Get3StateValue(); @@ -149,7 +147,7 @@ bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, // TODO: Create the bitmap checkbox - return FALSE; + return false; } void wxBitmapCheckBox::SetLabel(const wxBitmap *bitmap) @@ -173,7 +171,5 @@ bool wxBitmapCheckBox::GetValue() const { // TODO wxFAIL_MSG(wxT("wxBitmapCheckBox::GetValue() not yet implemented")); - return FALSE; + return false; } - -