summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/salnativewidgets.hxx26
-rw-r--r--svtools/source/contnr/svlbitm.cxx8
-rw-r--r--svtools/source/contnr/treelistbox.cxx6
-rw-r--r--svtools/source/control/headbar.cxx2
-rw-r--r--svtools/source/control/toolbarmenu.cxx2
-rw-r--r--vcl/osx/salnativewidgets.cxx24
-rw-r--r--vcl/source/control/button.cxx10
-rw-r--r--vcl/source/window/menu.cxx2
-rw-r--r--vcl/source/window/toolbox.cxx2
-rw-r--r--vcl/unx/gtk/salnativewidgets-gtk.cxx12
-rw-r--r--vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx10
-rw-r--r--vcl/unx/kde/salnativewidgets-kde.cxx6
-rw-r--r--vcl/unx/kde4/KDESalGraphics.cxx8
-rw-r--r--vcl/win/gdi/salnativewidgets-luna.cxx24
14 files changed, 71 insertions, 71 deletions
diff --git a/include/vcl/salnativewidgets.hxx b/include/vcl/salnativewidgets.hxx
index 7c2ce42cde22..37487f4923d7 100644
--- a/include/vcl/salnativewidgets.hxx
+++ b/include/vcl/salnativewidgets.hxx
@@ -288,11 +288,11 @@ public:
* that buttons allow
*/
-enum ButtonValue {
- BUTTONVALUE_DONTKNOW,
- BUTTONVALUE_ON,
- BUTTONVALUE_OFF,
- BUTTONVALUE_MIXED
+enum class ButtonValue {
+ DontKnow,
+ On,
+ Off,
+ Mixed
};
/* ImplControlValue:
@@ -311,7 +311,7 @@ class VCL_DLLPUBLIC ImplControlValue
protected:
ImplControlValue( ControlType i_eType, long i_nNumber )
: mType( i_eType )
- , mTristate( BUTTONVALUE_DONTKNOW )
+ , mTristate( ButtonValue::DontKnow )
, mNumber( i_nNumber )
{}
@@ -319,9 +319,9 @@ class VCL_DLLPUBLIC ImplControlValue
explicit ImplControlValue( ButtonValue nTristate )
: mType( ControlType::Generic ), mTristate(nTristate), mNumber(0) {}
explicit ImplControlValue( long nNumeric )
- : mType( ControlType::Generic ), mTristate(BUTTONVALUE_DONTKNOW), mNumber( nNumeric) {}
- inline ImplControlValue()
- : mType( ControlType::Generic ), mTristate(BUTTONVALUE_DONTKNOW), mNumber(0) {}
+ : mType( ControlType::Generic ), mTristate(ButtonValue::DontKnow), mNumber( nNumeric) {}
+ ImplControlValue()
+ : mType( ControlType::Generic ), mTristate(ButtonValue::DontKnow), mNumber(0) {}
virtual ~ImplControlValue();
@@ -329,11 +329,11 @@ class VCL_DLLPUBLIC ImplControlValue
ControlType getType() const { return mType; }
- inline ButtonValue getTristateVal() const { return mTristate; }
- inline void setTristateVal( ButtonValue nTristate ) { mTristate = nTristate; }
+ ButtonValue getTristateVal() const { return mTristate; }
+ void setTristateVal( ButtonValue nTristate ) { mTristate = nTristate; }
- inline long getNumericVal() const { return mNumber; }
- inline void setNumericVal( long nNumeric ) { mNumber = nNumeric; }
+ long getNumericVal() const { return mNumber; }
+ void setNumericVal( long nNumeric ) { mNumber = nNumeric; }
};
/* ScrollbarValue:
diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx
index 341827fd2615..9392dce6f052 100644
--- a/svtools/source/contnr/svlbitm.cxx
+++ b/svtools/source/contnr/svlbitm.cxx
@@ -353,11 +353,11 @@ void SvLBoxButton::Paint(
if (nStyle != DrawImageFlags::Disable)
nState |= ControlState::ENABLED;
if (IsStateChecked())
- aControlValue.setTristateVal(BUTTONVALUE_ON);
+ aControlValue.setTristateVal(ButtonValue::On);
else if (IsStateUnchecked())
- aControlValue.setTristateVal(BUTTONVALUE_OFF);
+ aControlValue.setTristateVal(ButtonValue::Off);
else if (IsStateTristate())
- aControlValue.setTristateVal( BUTTONVALUE_MIXED );
+ aControlValue.setTristateVal( ButtonValue::Mixed );
if (isVis)
bNativeOK = rRenderContext.DrawNativeControl(eCtrlType, PART_ENTIRE_CONTROL,
@@ -386,7 +386,7 @@ void SvLBoxButton::ImplAdjustBoxSize(Size& io_rSize, ControlType i_eType, vcl::R
Rectangle aCtrlRegion( Point( 0, 0 ), io_rSize );
ControlState nState = ControlState::ENABLED;
- aControlValue.setTristateVal( BUTTONVALUE_ON );
+ aControlValue.setTristateVal( ButtonValue::On );
Rectangle aNativeBounds, aNativeContent;
bool bNativeOK = rRenderContext.GetNativeControlRegion( i_eType,
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index da643635b20f..29b5ee1d0ba5 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -3041,18 +3041,18 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::Render
nState |= ControlState::ENABLED;
if (IsExpanded(&rEntry))
- aControlValue.setTristateVal(BUTTONVALUE_ON); //expanded node
+ aControlValue.setTristateVal(ButtonValue::On); //expanded node
else
{
if ((!rEntry.HasChildren()) && rEntry.HasChildrenOnDemand() &&
(!(rEntry.GetFlags() & SvTLEntryFlags::HAD_CHILDREN)) &&
pImpl->GetDontKnowNodeBmp().GetSizePixel().Width())
{
- aControlValue.setTristateVal( BUTTONVALUE_DONTKNOW ); //don't know
+ aControlValue.setTristateVal( ButtonValue::DontKnow ); //don't know
}
else
{
- aControlValue.setTristateVal( BUTTONVALUE_OFF ); //collapsed node
+ aControlValue.setTristateVal( ButtonValue::Off ); //collapsed node
}
}
diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx
index cd35991e4179..3007ab0aa807 100644
--- a/svtools/source/control/headbar.cxx
+++ b/svtools/source/control/headbar.cxx
@@ -335,7 +335,7 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos
if (rRenderContext.IsNativeControlSupported(ControlType::ListHeader, PART_BUTTON))
{
aCtrlRegion = aRect;
- aControlValue.setTristateVal(BUTTONVALUE_ON);
+ aControlValue.setTristateVal(ButtonValue::On);
nState |= ControlState::ENABLED;
if (bHigh)
nState |= ControlState::PRESSED;
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index 58cc7d8d5afd..c919c6b51e2e 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -1173,7 +1173,7 @@ static void ImplPaintCheckBackground(vcl::RenderContext& rRenderContext, vcl::Wi
ImplControlValue aControlValue;
ControlState nState = ControlState::PRESSED | ControlState::ENABLED;
- aControlValue.setTristateVal(BUTTONVALUE_ON);
+ aControlValue.setTristateVal(ButtonValue::On);
bNativeOk = rRenderContext.DrawNativeControl(ControlType::Toolbar, PART_BUTTON,
i_rRect, nState, aControlValue, OUString());
diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx
index 901fbf250d96..80b847c9b6fc 100644
--- a/vcl/osx/salnativewidgets.cxx
+++ b/vcl/osx/salnativewidgets.cxx
@@ -101,16 +101,16 @@ static ThemeButtonValue ImplGetButtonValue( ButtonValue aButtonValue )
{
switch( aButtonValue )
{
- case BUTTONVALUE_ON:
+ case ButtonValue::On:
return kThemeButtonOn;
break;
- case BUTTONVALUE_OFF:
+ case ButtonValue::Off:
return kThemeButtonOff;
break;
- case BUTTONVALUE_MIXED:
- case BUTTONVALUE_DONTKNOW:
+ case ButtonValue::Mixed:
+ case ButtonValue::DontKnow:
default:
return kThemeButtonMixed;
break;
@@ -612,7 +612,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
{
ButtonValue aButtonValue = aValue.getTristateVal();
- if( AllSettings::GetLayoutRTL() && aButtonValue == BUTTONVALUE_OFF )
+ if( AllSettings::GetLayoutRTL() && aButtonValue == ButtonValue::Off )
{
// FIXME: a value of kThemeDisclosureLeft
// should draw a theme compliant left disclosure triangle
@@ -645,9 +645,9 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
aInfo.adornment = kThemeAdornmentNone;
switch( aButtonValue ) {
- case BUTTONVALUE_ON: aInfo.value = kThemeDisclosureDown;//expanded
+ case ButtonValue::On: aInfo.value = kThemeDisclosureDown;//expanded
break;
- case BUTTONVALUE_OFF:
+ case ButtonValue::Off:
// FIXME: this should have drawn a theme compliant disclosure triangle
// (see above)
if( AllSettings::GetLayoutRTL() )
@@ -655,7 +655,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
aInfo.value = kThemeDisclosureLeft;//collapsed, RTL
}
break;
- case BUTTONVALUE_DONTKNOW: //what to do?
+ case ButtonValue::DontKnow: //what to do?
default:
break;
}
@@ -978,12 +978,12 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
switch( aValue.getTristateVal() )
{
- case BUTTONVALUE_ON: aSpinInfo.value = kThemeButtonOn;
+ case ButtonValue::On: aSpinInfo.value = kThemeButtonOn;
break;
- case BUTTONVALUE_OFF: aSpinInfo.value = kThemeButtonOff;
+ case ButtonValue::Off: aSpinInfo.value = kThemeButtonOff;
break;
- case BUTTONVALUE_MIXED:
- case BUTTONVALUE_DONTKNOW:
+ case ButtonValue::Mixed:
+ case ButtonValue::DontKnow:
default: aSpinInfo.value = kThemeButtonMixed;
break;
}
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index cef59a47a28e..84d19f7ac71c 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1904,7 +1904,7 @@ void RadioButton::ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext)
// no native drawing for image radio buttons
if (!maImage && (bNativeOK = rRenderContext.IsNativeControlSupported(ControlType::Radiobutton, PART_ENTIRE_CONTROL)))
{
- ImplControlValue aControlValue( mbChecked ? BUTTONVALUE_ON : BUTTONVALUE_OFF );
+ ImplControlValue aControlValue( mbChecked ? ButtonValue::On : ButtonValue::Off );
Rectangle aCtrlRect(maStateRect.TopLeft(), maStateRect.GetSize());
ControlState nState = ControlState::NONE;
@@ -3023,7 +3023,7 @@ void CheckBox::ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext)
if ((bNativeOK = rRenderContext.IsNativeControlSupported(ControlType::Checkbox, PART_ENTIRE_CONTROL)))
{
- ImplControlValue aControlValue(meState == TRISTATE_TRUE ? BUTTONVALUE_ON : BUTTONVALUE_OFF);
+ ImplControlValue aControlValue(meState == TRISTATE_TRUE ? ButtonValue::On : ButtonValue::Off);
Rectangle aCtrlRegion(maStateRect);
ControlState nState = ControlState::NONE;
@@ -3037,9 +3037,9 @@ void CheckBox::ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext)
nState |= ControlState::ENABLED;
if (meState == TRISTATE_TRUE)
- aControlValue.setTristateVal(BUTTONVALUE_ON);
+ aControlValue.setTristateVal(ButtonValue::On);
else if (meState == TRISTATE_INDET)
- aControlValue.setTristateVal(BUTTONVALUE_MIXED);
+ aControlValue.setTristateVal(ButtonValue::Mixed);
if (IsMouseOver() && maMouseRect.IsInside(GetPointerPosPixel()))
nState |= ControlState::ROLLOVER;
@@ -3857,7 +3857,7 @@ void DisclosureButton::ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext)
Rectangle aStateRect(GetStateRect());
- ImplControlValue aControlValue(GetState() == TRISTATE_TRUE ? BUTTONVALUE_ON : BUTTONVALUE_OFF);
+ ImplControlValue aControlValue(GetState() == TRISTATE_TRUE ? ButtonValue::On : ButtonValue::Off);
Rectangle aCtrlRegion(aStateRect);
ControlState nState = ControlState::NONE;
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 38a627022d2a..e835c83940e6 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1683,7 +1683,7 @@ static void ImplPaintCheckBackground(vcl::RenderContext& rRenderContext, vcl::Wi
Rectangle aCtrlRegion( i_rRect );
ControlState nState = ControlState::PRESSED | ControlState::ENABLED;
- aControlValue.setTristateVal(BUTTONVALUE_ON);
+ aControlValue.setTristateVal(ButtonValue::On);
bNativeOk = rRenderContext.DrawNativeControl(ControlType::Toolbar, PART_BUTTON,
aCtrlRegion, nState, aControlValue,
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 903ea8c6d14b..7fdc8afd7158 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -2972,7 +2972,7 @@ void ToolBox::ImplDrawButton(vcl::RenderContext& rRenderContext, const Rectangle
if ( highlight == 2 ) nState |= ControlState::ROLLOVER;
if ( bEnabled ) nState |= ControlState::ENABLED;
- aControlValue.setTristateVal( bChecked ? BUTTONVALUE_ON : BUTTONVALUE_OFF );
+ aControlValue.setTristateVal( bChecked ? ButtonValue::On : ButtonValue::Off );
bNativeOk = rRenderContext.DrawNativeControl( ControlType::Toolbar, PART_BUTTON,
rRect, nState, aControlValue, OUString() );
diff --git a/vcl/unx/gtk/salnativewidgets-gtk.cxx b/vcl/unx/gtk/salnativewidgets-gtk.cxx
index 62ab80da5de0..e3badbc2205c 100644
--- a/vcl/unx/gtk/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/salnativewidgets-gtk.cxx
@@ -1844,7 +1844,7 @@ bool GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable,
{
GtkStateType stateType;
GtkShadowType shadowType;
- bool isChecked = (aValue.getTristateVal()==BUTTONVALUE_ON);
+ bool isChecked = (aValue.getTristateVal()==ButtonValue::On);
gint x, y;
GdkRectangle clipRect;
@@ -1900,8 +1900,8 @@ bool GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable,
{
GtkStateType stateType;
GtkShadowType shadowType;
- bool isChecked = (aValue.getTristateVal() == BUTTONVALUE_ON);
- bool isInconsistent = (aValue.getTristateVal() == BUTTONVALUE_MIXED);
+ bool isChecked = (aValue.getTristateVal() == ButtonValue::On);
+ bool isInconsistent = (aValue.getTristateVal() == ButtonValue::Mixed);
GdkRectangle clipRect;
gint x,y;
@@ -3081,7 +3081,7 @@ bool GtkSalGraphics::NWPaintGTKToolbar(
{
bool bPaintButton = (nState & ControlState::PRESSED)
|| (nState & ControlState::ROLLOVER);
- if( aValue.getTristateVal() == BUTTONVALUE_ON )
+ if( aValue.getTristateVal() == ButtonValue::On )
{
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pButtonWidget),TRUE);
bPaintButton = true;
@@ -3514,8 +3514,8 @@ bool GtkSalGraphics::NWPaintGTKListNode(
switch( aButtonValue )
{
- case BUTTONVALUE_ON: eStyle = GTK_EXPANDER_EXPANDED;break;
- case BUTTONVALUE_OFF: eStyle = GTK_EXPANDER_COLLAPSED; break;
+ case ButtonValue::On: eStyle = GTK_EXPANDER_EXPANDED;break;
+ case ButtonValue::Off: eStyle = GTK_EXPANDER_COLLAPSED; break;
default:
break;
}
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index 8f8ee83fdd26..74dffc921e21 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -1298,7 +1298,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
case PART_BUTTON:
/* For all checkbuttons in the toolbars */
flags = (GtkStateFlags)(flags |
- ( (rValue.getTristateVal() == BUTTONVALUE_ON) ? GTK_STATE_FLAG_ACTIVE : GTK_STATE_FLAG_NORMAL));
+ ( (rValue.getTristateVal() == ButtonValue::On) ? GTK_STATE_FLAG_ACTIVE : GTK_STATE_FLAG_NORMAL));
context = mpToolButtonStyle;
break;
case PART_SEPARATOR_VERT:
@@ -1311,14 +1311,14 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
break;
case ControlType::Radiobutton:
flags = (GtkStateFlags)(flags |
- ( (rValue.getTristateVal() == BUTTONVALUE_ON) ? CHECKED : GTK_STATE_FLAG_NORMAL));
+ ( (rValue.getTristateVal() == ButtonValue::On) ? CHECKED : GTK_STATE_FLAG_NORMAL));
context = mpRadioButtonStyle;
renderType = nPart == PART_FOCUS ? RENDER_FOCUS : RENDER_RADIO;
break;
case ControlType::Checkbox:
flags = (GtkStateFlags)(flags |
- ( (rValue.getTristateVal() == BUTTONVALUE_ON) ? CHECKED :
- (rValue.getTristateVal() == BUTTONVALUE_MIXED) ? GTK_STATE_FLAG_INCONSISTENT :
+ ( (rValue.getTristateVal() == ButtonValue::On) ? CHECKED :
+ (rValue.getTristateVal() == ButtonValue::Mixed) ? GTK_STATE_FLAG_INCONSISTENT :
GTK_STATE_FLAG_NORMAL));
context = mpCheckButtonStyle;
renderType = nPart == PART_FOCUS ? RENDER_FOCUS : RENDER_CHECK;
@@ -1389,7 +1389,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
{
context = mpTreeHeaderButtonStyle;
ButtonValue aButtonValue = rValue.getTristateVal();
- if (aButtonValue == BUTTONVALUE_ON)
+ if (aButtonValue == ButtonValue::On)
flags = (GtkStateFlags) (flags | CHECKED);
renderType = RENDER_EXPANDER;
break;
diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx
index 512a5d1fda60..624c9652876d 100644
--- a/vcl/unx/kde/salnativewidgets-kde.cxx
+++ b/vcl/unx/kde/salnativewidgets-kde.cxx
@@ -109,9 +109,9 @@ QStyle::SFlags vclStateValue2SFlags( ControlState nState,
switch ( aValue.getTristateVal() )
{
- case BUTTONVALUE_ON: nStyle |= QStyle::Style_On; break;
- case BUTTONVALUE_OFF: nStyle |= QStyle::Style_Off; break;
- case BUTTONVALUE_MIXED: nStyle |= QStyle::Style_NoChange; break;
+ case ButtonValue::On: nStyle |= QStyle::Style_On; break;
+ case ButtonValue::Off: nStyle |= QStyle::Style_Off; break;
+ case ButtonValue::Mixed: nStyle |= QStyle::Style_NoChange; break;
default: break;
}
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index 434b259fa7e3..cdf12925b24c 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -54,9 +54,9 @@ QStyle::State vclStateValue2StateFlag( ControlState nControlState,
switch ( aValue.getTristateVal() )
{
- case BUTTONVALUE_ON: nState |= QStyle::State_On; break;
- case BUTTONVALUE_OFF: nState |= QStyle::State_Off; break;
- case BUTTONVALUE_MIXED: nState |= QStyle::State_NoChange; break;
+ case ButtonValue::On: nState |= QStyle::State_On; break;
+ case ButtonValue::Off: nState |= QStyle::State_Off; break;
+ case ButtonValue::Mixed: nState |= QStyle::State_NoChange; break;
default: break;
}
@@ -411,7 +411,7 @@ bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
QStyleOption option;
option.state = QStyle::State_Item | QStyle::State_Children;
- if (value.getTristateVal() == BUTTONVALUE_ON)
+ if (value.getTristateVal() == ButtonValue::On)
option.state |= QStyle::State_Open;
draw( QStyle::PE_IndicatorBranch, &option, m_image.get(),
diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx
index ce41c62e960a..1aa9d18f205e 100644
--- a/vcl/win/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/gdi/salnativewidgets-luna.cxx
@@ -773,7 +773,7 @@ bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
if( nType == ControlType::Radiobutton )
{
iPart = BP_RADIOBUTTON;
- bool bChecked = ( aValue.getTristateVal() == BUTTONVALUE_ON );
+ bool bChecked = ( aValue.getTristateVal() == ButtonValue::On );
if( nState & ControlState::PRESSED )
iState = bChecked ? RBS_CHECKEDPRESSED : RBS_UNCHECKEDPRESSED;
@@ -796,17 +796,17 @@ bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
ButtonValue v = aValue.getTristateVal();
if( nState & ControlState::PRESSED )
- iState = (v == BUTTONVALUE_ON) ? CBS_CHECKEDPRESSED :
- ( (v == BUTTONVALUE_OFF) ? CBS_UNCHECKEDPRESSED : CBS_MIXEDPRESSED );
+ iState = (v == ButtonValue::On) ? CBS_CHECKEDPRESSED :
+ ( (v == ButtonValue::Off) ? CBS_UNCHECKEDPRESSED : CBS_MIXEDPRESSED );
else if( !(nState & ControlState::ENABLED) )
- iState = (v == BUTTONVALUE_ON) ? CBS_CHECKEDDISABLED :
- ( (v == BUTTONVALUE_OFF) ? CBS_UNCHECKEDDISABLED : CBS_MIXEDDISABLED );
+ iState = (v == ButtonValue::On) ? CBS_CHECKEDDISABLED :
+ ( (v == ButtonValue::Off) ? CBS_UNCHECKEDDISABLED : CBS_MIXEDDISABLED );
else if( nState & ControlState::ROLLOVER )
- iState = (v == BUTTONVALUE_ON) ? CBS_CHECKEDHOT :
- ( (v == BUTTONVALUE_OFF) ? CBS_UNCHECKEDHOT : CBS_MIXEDHOT );
+ iState = (v == ButtonValue::On) ? CBS_CHECKEDHOT :
+ ( (v == ButtonValue::Off) ? CBS_UNCHECKEDHOT : CBS_MIXEDHOT );
else
- iState = (v == BUTTONVALUE_ON) ? CBS_CHECKEDNORMAL :
- ( (v == BUTTONVALUE_OFF) ? CBS_UNCHECKEDNORMAL : CBS_MIXEDNORMAL );
+ iState = (v == ButtonValue::On) ? CBS_CHECKEDNORMAL :
+ ( (v == ButtonValue::Off) ? CBS_UNCHECKEDNORMAL : CBS_MIXEDNORMAL );
//if( nState & ControlState::FOCUSED )
// iState |= PBS_DEFAULTED; // may need to draw focus rect
@@ -904,7 +904,7 @@ bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
if( nPart == PART_BUTTON )
{
iPart = TP_BUTTON;
- bool bChecked = ( aValue.getTristateVal() == BUTTONVALUE_ON );
+ bool bChecked = ( aValue.getTristateVal() == ButtonValue::On );
if( !(nState & ControlState::ENABLED) )
//iState = TS_DISABLED;
// disabled buttons are typically not painted at all but we need visual
@@ -1051,10 +1051,10 @@ bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
iPart = TVP_GLYPH;
switch( aButtonValue )
{
- case BUTTONVALUE_ON:
+ case ButtonValue::On:
iState = GLPS_OPENED;
break;
- case BUTTONVALUE_OFF:
+ case ButtonValue::Off:
iState = GLPS_CLOSED;
break;
default: