// Created: 25.08.00
// RCS-ID: $Id$
// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
// headers
// ----------------------------------------------------------------------------
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "univcheckbox.h"
#endif
void wxCheckBox::Init()
{
- m_isPressed = FALSE;
+ m_isPressed = false;
m_status = Status_Unchecked;
}
const wxValidator& validator,
const wxString &name)
{
- if ( !wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name) )
- return FALSE;
+ if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
+ return false;
SetLabel(label);
SetBestSize(size);
CreateInputHandler(wxINP_HANDLER_CHECKBOX);
- return TRUE;
+ return true;
}
// ----------------------------------------------------------------------------
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
{
if ( !m_isPressed )
{
- m_isPressed = TRUE;
+ m_isPressed = true;
Refresh();
}
{
if ( m_isPressed )
{
- m_isPressed = FALSE;
+ m_isPressed = false;
Refresh();
}
void wxCheckBox::Toggle()
{
- m_isPressed = FALSE;
+ m_isPressed = false;
ChangeValue(!GetValue());
}
else if ( action == wxACTION_BUTTON_RELEASE )
Release();
if ( action == wxACTION_CHECKBOX_CHECK )
- ChangeValue(TRUE);
+ ChangeValue(true);
else if ( action == wxACTION_CHECKBOX_CLEAR )
- ChangeValue(FALSE);
+ ChangeValue(false);
else if ( action == wxACTION_CHECKBOX_TOGGLE )
Toggle();
else
return wxControl::PerformAction(action, numArg, strArg);
- return TRUE;
+ return true;
}
// ----------------------------------------------------------------------------
}
bool wxStdCheckboxInputHandler::HandleActivation(wxInputConsumer *consumer,
- bool activated)
+ bool WXUNUSED(activated))
{
// only the focused checkbox appearance changes when the app gains/loses
// activation