X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6bc3b8e9680e8aa3d50ae4bb41dad22c6dd3ce1b..daebb84bff054d3833baca58a5dc506de56c64a1:/src/mac/classic/checkbox.cpp?ds=inline diff --git a/src/mac/classic/checkbox.cpp b/src/mac/classic/checkbox.cpp index ba85d2fe53..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 = (WXWidget) ::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; } - -