{ return IsVert() ? wxVERTICAL : wxHORIZONTAL; }
// do we have labels?
- bool HasLabels() const
- { return ((GetWindowStyle() & wxSL_LABELS) != 0) &
+ bool HasLabels() const
+ { return ((GetWindowStyle() & wxSL_LABELS) != 0) &&
((GetWindowStyle() & (wxSL_TOP|wxSL_BOTTOM|wxSL_LEFT|wxSL_RIGHT)) != 0); }
// do we have ticks?
- bool HasTicks() const
- { return ((GetWindowStyle() & wxSL_TICKS) != 0) &
+ bool HasTicks() const
+ { return ((GetWindowStyle() & wxSL_TICKS) != 0) &&
((GetWindowStyle() & (wxSL_TOP|wxSL_BOTTOM|wxSL_LEFT|wxSL_RIGHT|wxSL_BOTH)) != 0); }
// implement wxControlWithThumb interface
if (label.empty() && wxIsStockID(id))
label = wxGetStockLabel(id);
- long ctrl_style = style & !wxBU_ALIGN_MASK;
+ long ctrl_style = style & ~wxBU_ALIGN_MASK;
wxASSERT_MSG( (ctrl_style & wxALIGN_MASK) == 0,
_T("Some style conflicts with align flags") );
long numArg,
const wxString& strArg)
{
- if ( action == wxACTION_SLIDER_START )
+ if ( action == wxACTION_SLIDER_START )
{
ChangeValueTo(m_min);
}
x3 = rectThumb.GetRight();
x4 = rectShaft.GetRight();
}
- if ((x1 <= x) & (x < x2))
+ if ((x1 <= x) && (x < x2))
{
// or to the left
return wxScrollThumb::Shaft_Above;
}
- if ((x3 < x) & (x <= x4)) {
+ if ((x3 < x) && (x <= x4)) {
// or to the right
return wxScrollThumb::Shaft_Below;
}
const wxKeyEvent& event,
bool pressed)
{
- if ( pressed )
+ if ( pressed )
{
int keycode = event.GetKeyCode();