]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/checkbox.cpp
Temporarily use self-made wxTextCtrl in wxX11 until
[wxWidgets.git] / src / univ / checkbox.cpp
index 95ddff4c9c272dc0a4fa9b7f4a8098281f5c24bc..c9a95a631868adeba3d47b40db4700e5ae5f7322 100644 (file)
@@ -5,7 +5,7 @@
 // Modified by:
 // Created:     25.08.00
 // RCS-ID:      $Id$
-// Copyright:   (c) 2000 Vadim Zeitlin
+// Copyright:   (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
@@ -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 wxStdCheckboxInputHandler::HandleActivation(wxInputConsumer *consumer,
                                                  bool activated)
 {
     // only the focused checkbox appearance changes when the app gains/loses
     // activation
-    return control->IsFocused();
+    return consumer->GetInputWindow()->IsFocused();
 }
 
 #endif // wxUSE_CHECKBOX