// headers
// ----------------------------------------------------------------------------
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "univslider.h"
#endif
{
if ( !wxSliderBase::Create(parent, id, pos, size, style,
validator, name) )
- return FALSE;
+ return false;
SetRange(minValue, maxValue);
SetValue(value);
CreateInputHandler(wxINP_HANDLER_SLIDER);
- return TRUE;
+ return true;
}
// ----------------------------------------------------------------------------
bool wxSlider::ChangeValueTo(int value)
{
// check if the value is going to change at all
- if (value == m_value) return FALSE;
+ if (value == m_value) return false;
// this method is protected and we should only call it with normalized
// value!
- wxCHECK_MSG( IsInRange(value), FALSE, _T("invalid slider value") );
+ wxCHECK_MSG( IsInRange(value), false, _T("invalid slider value") );
m_value = value;
(void)GetEventHandler()->ProcessEvent(event);
- return TRUE;
+ return true;
}
void wxSlider::SetValue(int value)
else if ( action == wxACTION_SLIDER_THUMB_DRAG )
{
// no special processing for it
- return TRUE;
+ return true;
}
else if ( action == wxACTION_SLIDER_THUMB_MOVE ||
action == wxACTION_SLIDER_THUMB_RELEASE )
return wxControl::PerformAction(action, numArg, strArg);
}
- return TRUE;
+ return true;
}
// ----------------------------------------------------------------------------
break;
}
- if ( !!action )
+ if ( !action.IsEmpty() )
{
consumer->PerformAction(action);
- return TRUE;
+ return true;
}
}
if ( slider->GetThumb().HandleMouse(event) )
{
// processed by the thumb
- return FALSE;
+ return false;
}
return wxStdInputHandler::HandleMouse(consumer, event);
if ( slider->GetThumb().HandleMouseMove(event) )
{
// processed by the thumb
- return FALSE;
+ return false;
}
return wxStdInputHandler::HandleMouseMove(consumer, event);
}
-bool wxStdSliderButtonInputHandler::HandleFocus(wxInputConsumer *consumer,
- const wxFocusEvent& event)
+bool
+wxStdSliderButtonInputHandler::HandleFocus(wxInputConsumer * WXUNUSED(consumer),
+ const wxFocusEvent& WXUNUSED(event))
{
// slider's appearance changes when it gets/loses focus
- return TRUE;
+ return true;
}
#endif // wxUSE_SLIDER