X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6feb95a79834836e88143b15d9f424ebe79621..d09dd96e31ab84de80d4560dfc7b0d77bb6248a3:/src/univ/checkbox.cpp diff --git a/src/univ/checkbox.cpp b/src/univ/checkbox.cpp index 95ddff4c9c..e80d036343 100644 --- a/src/univ/checkbox.cpp +++ b/src/univ/checkbox.cpp @@ -5,8 +5,8 @@ // Modified by: // Created: 25.08.00 // RCS-ID: $Id$ -// Copyright: (c) 2000 Vadim Zeitlin -// Licence: wxWindows license +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -17,7 +17,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "univcheckbox.h" #endif @@ -67,7 +67,7 @@ bool wxCheckBox::Create(wxWindow *parent, const wxValidator& validator, const wxString &name) { - if ( !wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name) ) + if ( !wxControl::Create(parent, id, pos, size, style, validator, name) ) return FALSE; SetLabel(label); @@ -154,10 +154,12 @@ void wxCheckBox::DoDraw(wxControlRenderer *renderer) if ( m_status == Status_Checked ) flags |= wxCONTROL_CHECKED; + wxBitmap bitmap(GetBitmap(GetState(flags), m_status)); + renderer->GetRenderer()-> DrawCheckButton(dc, GetLabel(), - GetBitmap(GetState(flags), m_status), + bitmap, renderer->GetRect(), flags, GetWindowStyle() & wxALIGN_RIGHT ? wxALIGN_RIGHT @@ -276,12 +278,12 @@ wxStdCheckboxInputHandler::wxStdCheckboxInputHandler(wxInputHandler *inphand) { } -bool wxStdCheckboxInputHandler::HandleActivation(wxControl *control, - bool activated) +bool wxStdCheckboxInputHandler::HandleActivation(wxInputConsumer *consumer, + bool WXUNUSED(activated)) { // only the focused checkbox appearance changes when the app gains/loses // activation - return control->IsFocused(); + return consumer->GetInputWindow()->IsFocused(); } #endif // wxUSE_CHECKBOX