summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-27 16:09:43 +0200
committerNoel Grandin <noel@peralex.com>2015-05-28 12:47:08 +0200
commitf3331f7694e74f349375c223ce7ed84838e92d89 (patch)
treeef238fa98153c756df201d26d15e0602638298cc
parent173aa749d50f904887e4aa1ce425c6807668bff0 (diff)
convert PARENTCLIPMODE constants to scoped enum
Change-Id: I36a53112e75fca9208b2f91e224a7c671695509b
-rw-r--r--avmedia/source/framework/mediacontrol.cxx2
-rw-r--r--canvas/source/directx/dx_9rm.cxx2
-rw-r--r--cui/source/dialogs/iconcdlg.cxx4
-rw-r--r--include/vcl/window.hxx16
-rw-r--r--reportdesign/source/ui/report/EndMarker.cxx2
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx2
-rw-r--r--reportdesign/source/ui/report/SectionWindow.cxx2
-rw-r--r--reportdesign/source/ui/report/StartMarker.cxx2
-rw-r--r--sd/source/ui/presenter/PresenterHelper.cxx4
-rw-r--r--slideshow/source/engine/shapes/viewmediashape.cxx2
-rw-r--r--vcl/inc/window.h3
-rw-r--r--vcl/source/app/help.cxx2
-rw-r--r--vcl/source/control/button.cxx14
-rw-r--r--vcl/source/control/fixed.cxx16
-rw-r--r--vcl/source/control/group.cxx4
-rw-r--r--vcl/source/control/prgsbar.cxx2
-rw-r--r--vcl/source/control/slider.cxx4
-rw-r--r--vcl/source/control/tabctrl.cxx4
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx6
-rw-r--r--vcl/source/window/clipping.cxx16
-rw-r--r--vcl/source/window/menubarwindow.cxx6
-rw-r--r--vcl/source/window/paint.cxx2
-rw-r--r--vcl/source/window/stacking.cxx2
-rw-r--r--vcl/source/window/syschild.cxx2
-rw-r--r--vcl/source/window/tabpage.cxx4
-rw-r--r--vcl/source/window/toolbox.cxx12
-rw-r--r--vcl/source/window/window.cxx2
27 files changed, 73 insertions, 66 deletions
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx
index 4c019e5ffc41..4a33e599a969 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -79,7 +79,7 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl
SetBackground();
SetPaintTransparent( true );
- SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ SetParentClipMode( ParentClipMode::NoClip );
if( MEDIACONTROLSTYLE_SINGLELINE != meControlStyle )
{
diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx
index ba03c5398563..6d4157b68325 100644
--- a/canvas/source/directx/dx_9rm.cxx
+++ b/canvas/source/directx/dx_9rm.cxx
@@ -673,7 +673,7 @@ namespace dxcanvas
mpWindow->SetMouseTransparent( TRUE );
// parent should receive paint messages as well
- // [PARENTCLIPMODE_NOCLIP], the argument is here
+ // [ParentClipMode::NoClip], the argument is here
// passed as plain numeric value since the stupid
// define utilizes a USHORT cast.
mpWindow->SetParentClipMode(0x0002);
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 0b77226a9512..686734d6e8a2 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -98,14 +98,14 @@ void IconChoicePage::ImplInitSettings()
if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() )
{
EnableChildTransparentMode( true );
- SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ SetParentClipMode( ParentClipMode::NoClip );
SetPaintTransparent( true );
SetBackground();
}
else
{
EnableChildTransparentMode( false );
- SetParentClipMode( 0 );
+ SetParentClipMode( ParentClipMode::NONE );
SetPaintTransparent( false );
if ( IsControlBackground() )
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 9654d340689d..9f9f73d0b4d1 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -269,8 +269,16 @@ namespace o3tl
}
// Flags for ParentClipMode
-#define PARENTCLIPMODE_CLIP ((sal_uInt16)0x0001)
-#define PARENTCLIPMODE_NOCLIP ((sal_uInt16)0x0002)
+enum class ParentClipMode
+{
+ NONE = 0x0000,
+ Clip = 0x0001,
+ NoClip = 0x0002,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<ParentClipMode> : is_typed_flags<ParentClipMode, 0x0003> {};
+}
// Flags for Invert()
enum class InvertFlags
@@ -1001,8 +1009,8 @@ public:
bool IsControlBackground() const;
void ApplyControlBackground(vcl::RenderContext& rRenderContext, const Color& rDefaultColor);
- void SetParentClipMode( sal_uInt16 nMode = 0 );
- sal_uInt16 GetParentClipMode() const;
+ void SetParentClipMode( ParentClipMode nMode = ParentClipMode::NONE );
+ ParentClipMode GetParentClipMode() const;
void SetWindowRegionPixel();
void SetWindowRegionPixel( const vcl::Region& rRegion );
diff --git a/reportdesign/source/ui/report/EndMarker.cxx b/reportdesign/source/ui/report/EndMarker.cxx
index a1ebc7a1f45b..d6137e3bbe79 100644
--- a/reportdesign/source/ui/report/EndMarker.cxx
+++ b/reportdesign/source/ui/report/EndMarker.cxx
@@ -80,7 +80,7 @@ void OEndMarker::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rR
void OEndMarker::ImplInitSettings()
{
EnableChildTransparentMode( true );
- SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ SetParentClipMode( ParentClipMode::NoClip );
SetPaintTransparent( true );
SetBackground( Wallpaper( svtools::ColorConfig().GetColorValue(::svtools::APPBACKGROUND).nColor) );
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index c6b92044a953..81850df4c4e0 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -92,7 +92,7 @@ OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< re
//EnableChildTransparentMode();
SetHelpId(HID_REPORTSECTION);
SetMapMode(MapMode(MAP_100TH_MM));
- SetParentClipMode(PARENTCLIPMODE_CLIP);
+ SetParentClipMode(ParentClipMode::Clip);
EnableChildTransparentMode( false );
SetPaintTransparent( false );
diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx
index 9d7b08d70b27..a495fe172b67 100644
--- a/reportdesign/source/ui/report/SectionWindow.cxx
+++ b/reportdesign/source/ui/report/SectionWindow.cxx
@@ -208,7 +208,7 @@ void OSectionWindow::ImplInitSettings()
if ( t )
{
EnableChildTransparentMode( true );
- SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ SetParentClipMode( ParentClipMode::NoClip );
SetPaintTransparent( true );
}
SetBackground( );
diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx
index 01f2fdbc3917..1409feb630e6 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -74,7 +74,7 @@ OStartMarker::OStartMarker(OSectionWindow* _pParent,const OUString& _sColorEntry
const MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum();
m_aVRuler->SetUnit(MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH);
EnableChildTransparentMode( true );
- SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ SetParentClipMode( ParentClipMode::NoClip );
SetPaintTransparent( true );
}
diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx
index 3de26d6c6418..390ea2b790b4 100644
--- a/sd/source/ui/presenter/PresenterHelper.cxx
+++ b/sd/source/ui/presenter/PresenterHelper.cxx
@@ -101,12 +101,12 @@ Reference<awt::XWindow> SAL_CALL PresenterHelper::createWindow (
pWindow->SetBackground();
if ( ! bEnableParentClip)
{
- pWindow->SetParentClipMode(PARENTCLIPMODE_NOCLIP);
+ pWindow->SetParentClipMode(ParentClipMode::NoClip);
pWindow->SetPaintTransparent(true);
}
else
{
- pWindow->SetParentClipMode(PARENTCLIPMODE_CLIP);
+ pWindow->SetParentClipMode(ParentClipMode::Clip);
pWindow->SetPaintTransparent(false);
}
diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx
index f026b21a8eb2..6e481d30f656 100644
--- a/slideshow/source/engine/shapes/viewmediashape.cxx
+++ b/slideshow/source/engine/shapes/viewmediashape.cxx
@@ -489,7 +489,7 @@ namespace slideshow
Size( aAWTRect.Width, aAWTRect.Height ) );
}
mpMediaWindow->SetBackground( Color( COL_BLACK ) );
- mpMediaWindow->SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ mpMediaWindow->SetParentClipMode( ParentClipMode::NoClip );
mpMediaWindow->EnableEraseBackground( false );
mpMediaWindow->EnablePaint( false );
mpMediaWindow->SetForwardKey( true );
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index 1b6cc55d96cc..dfa9a5ff90b7 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -61,6 +61,7 @@ enum class MouseNotifyEvent;
enum class ActivateModeFlags;
enum class DialogControlFlags;
enum class GetFocusFlags;
+enum class ParentClipMode;
namespace com { namespace sun { namespace star {
@@ -276,7 +277,7 @@ public:
sal_uInt16 mnWaitCount;
sal_uInt16 mnPaintFlags;
GetFocusFlags mnGetFocusFlags;
- sal_uInt16 mnParentClipMode;
+ ParentClipMode mnParentClipMode;
ActivateModeFlags mnActivateMode;
DialogControlFlags mnDlgCtrlFlags;
sal_uInt16 mnLockCount;
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index 0ad533a2272e..6483a977a874 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -279,7 +279,7 @@ void HelpTextWindow::ApplySettings(vcl::RenderContext& rRenderContext)
if (rRenderContext.IsNativeControlSupported(CTRL_TOOLTIP, PART_ENTIRE_CONTROL))
{
EnableChildTransparentMode(true);
- SetParentClipMode(PARENTCLIPMODE_NOCLIP);
+ SetParentClipMode(ParentClipMode::NoClip);
SetPaintTransparent(true);
rRenderContext.SetBackground();
}
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index b13ac6fd669f..35c0262db9f1 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -691,13 +691,13 @@ void PushButton::ImplInitSettings( bool bFont,
{
SetBackground();
// #i38498#: do not check for GetParent()->IsChildTransparentModeEnabled()
- // otherwise the formcontrol button will be overdrawn due to PARENTCLIPMODE_NOCLIP
+ // otherwise the formcontrol button will be overdrawn due to ParentClipMode::NoClip
// for radio and checkbox this is ok as they should appear transparent in documents
if ( IsNativeControlSupported( CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL ) ||
(GetStyle() & WB_FLATBUTTON) != 0 )
{
EnableChildTransparentMode( true );
- SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ SetParentClipMode( ParentClipMode::NoClip );
SetPaintTransparent( true );
mpWindowImpl->mbUseNativeFocus = (GetStyle() & WB_FLATBUTTON) == 0
&& ImplGetSVData()->maNWFData.mbNoFocusRects;
@@ -705,7 +705,7 @@ void PushButton::ImplInitSettings( bool bFont,
else
{
EnableChildTransparentMode( false );
- SetParentClipMode( 0 );
+ SetParentClipMode( ParentClipMode::NONE );
SetPaintTransparent( false );
}
}
@@ -1855,7 +1855,7 @@ void RadioButton::ImplInitSettings( bool bFont,
(pParent->IsChildTransparentModeEnabled() || IsNativeControlSupported( CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL ) ) )
{
EnableChildTransparentMode( true );
- SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ SetParentClipMode( ParentClipMode::NoClip );
SetPaintTransparent( true );
SetBackground();
if( IsNativeControlSupported( CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL ) )
@@ -1864,7 +1864,7 @@ void RadioButton::ImplInitSettings( bool bFont,
else
{
EnableChildTransparentMode( false );
- SetParentClipMode( 0 );
+ SetParentClipMode( ParentClipMode::NONE );
SetPaintTransparent( false );
if ( IsControlBackground() )
@@ -2993,7 +2993,7 @@ void CheckBox::ImplInitSettings( bool bFont,
(pParent->IsChildTransparentModeEnabled() || IsNativeControlSupported( CTRL_CHECKBOX, PART_ENTIRE_CONTROL ) ) )
{
EnableChildTransparentMode( true );
- SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ SetParentClipMode( ParentClipMode::NoClip );
SetPaintTransparent( true );
SetBackground();
if( IsNativeControlSupported( CTRL_CHECKBOX, PART_ENTIRE_CONTROL ) )
@@ -3002,7 +3002,7 @@ void CheckBox::ImplInitSettings( bool bFont,
else
{
EnableChildTransparentMode( false );
- SetParentClipMode( 0 );
+ SetParentClipMode( ParentClipMode::NONE );
SetPaintTransparent( false );
if ( IsControlBackground() )
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index c891061be18c..214db260083e 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -211,14 +211,14 @@ void FixedText::ApplySettings(vcl::RenderContext& rRenderContext)
if (pParent->IsChildTransparentModeEnabled() && !IsControlBackground())
{
EnableChildTransparentMode(true);
- SetParentClipMode(PARENTCLIPMODE_NOCLIP);
+ SetParentClipMode(ParentClipMode::NoClip);
SetPaintTransparent(true);
rRenderContext.SetBackground();
}
else
{
EnableChildTransparentMode(false);
- SetParentClipMode(0);
+ SetParentClipMode(ParentClipMode::NONE);
SetPaintTransparent(false);
if (IsControlBackground())
@@ -619,14 +619,14 @@ void FixedLine::ApplySettings(vcl::RenderContext& rRenderContext)
if (pParent->IsChildTransparentModeEnabled() && !IsControlBackground())
{
EnableChildTransparentMode(true);
- SetParentClipMode(PARENTCLIPMODE_NOCLIP);
+ SetParentClipMode(ParentClipMode::NoClip);
SetPaintTransparent(true);
rRenderContext.SetBackground();
}
else
{
EnableChildTransparentMode(false);
- SetParentClipMode(0);
+ SetParentClipMode(ParentClipMode::NONE);
SetPaintTransparent(false);
if (IsControlBackground())
@@ -751,14 +751,14 @@ void FixedBitmap::ApplySettings(vcl::RenderContext& rRenderContext)
if (pParent->IsChildTransparentModeEnabled() && !IsControlBackground())
{
EnableChildTransparentMode(true);
- SetParentClipMode(PARENTCLIPMODE_NOCLIP);
+ SetParentClipMode(ParentClipMode::NoClip);
SetPaintTransparent(true);
rRenderContext.SetBackground();
}
else
{
EnableChildTransparentMode(false);
- SetParentClipMode(0);
+ SetParentClipMode(ParentClipMode::NONE);
SetPaintTransparent(false);
if (IsControlBackground())
@@ -921,14 +921,14 @@ void FixedImage::ApplySettings(vcl::RenderContext& rRenderContext)
if (pParent && pParent->IsChildTransparentModeEnabled() && !IsControlBackground())
{
EnableChildTransparentMode(true);
- SetParentClipMode(PARENTCLIPMODE_NOCLIP);
+ SetParentClipMode(ParentClipMode::NoClip);
SetPaintTransparent(true);
rRenderContext.SetBackground();
}
else
{
EnableChildTransparentMode(false);
- SetParentClipMode(0);
+ SetParentClipMode(ParentClipMode::NONE);
SetPaintTransparent(false);
if (IsControlBackground())
diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx
index 69dcca532f4e..1c2ca0ca57f7 100644
--- a/vcl/source/control/group.cxx
+++ b/vcl/source/control/group.cxx
@@ -68,14 +68,14 @@ void GroupBox::ImplInitSettings( bool bFont,
!IsControlBackground() )
{
EnableChildTransparentMode( true );
- SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ SetParentClipMode( ParentClipMode::NoClip );
SetPaintTransparent( true );
SetBackground();
}
else
{
EnableChildTransparentMode( false );
- SetParentClipMode( 0 );
+ SetParentClipMode( ParentClipMode::NONE );
SetPaintTransparent( false );
if ( IsControlBackground() )
diff --git a/vcl/source/control/prgsbar.cxx b/vcl/source/control/prgsbar.cxx
index b9e8cb932a12..723a5e87ad20 100644
--- a/vcl/source/control/prgsbar.cxx
+++ b/vcl/source/control/prgsbar.cxx
@@ -83,7 +83,7 @@ void ProgressBar::ImplInitSettings( bool bFont,
EnableChildTransparentMode( true );
SetPaintTransparent( true );
SetBackground();
- SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ SetParentClipMode( ParentClipMode::NoClip );
}
else
{
diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index db264ee6b703..4feabab84e7e 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -99,14 +99,14 @@ void Slider::ImplInitSettings()
if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() )
{
EnableChildTransparentMode( true );
- SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ SetParentClipMode( ParentClipMode::NoClip );
SetPaintTransparent( true );
SetBackground();
}
else
{
EnableChildTransparentMode( false );
- SetParentClipMode( 0 );
+ SetParentClipMode( ParentClipMode::NONE );
SetPaintTransparent( false );
if ( IsControlBackground() )
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 76b9e391e6a4..3216d90d549d 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -145,7 +145,7 @@ void TabControl::ImplInitSettings( bool bFont,
// set transparent mode for NWF tabcontrols to have
// the background always cleared properly
EnableChildTransparentMode( true );
- SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ SetParentClipMode( ParentClipMode::NoClip );
SetPaintTransparent( true );
SetBackground();
ImplGetWindowImpl()->mbUseNativeFocus = ImplGetSVData()->maNWFData.mbNoFocusRects;
@@ -153,7 +153,7 @@ void TabControl::ImplInitSettings( bool bFont,
else
{
EnableChildTransparentMode( false );
- SetParentClipMode( 0 );
+ SetParentClipMode( ParentClipMode::NONE );
SetPaintTransparent( false );
if ( IsControlBackground() )
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 9beed939d8ef..ef6e1ac4d311 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -1088,7 +1088,7 @@ bool OpenGLContext::initWindow()
if( m_pChildWindow )
{
m_pChildWindow->SetMouseTransparent( true );
- m_pChildWindow->SetParentClipMode(PARENTCLIPMODE_CLIP);
+ m_pChildWindow->SetParentClipMode(ParentClipMode::Clip);
m_pChildWindow->EnableEraseBackground( false );
m_pChildWindow->SetControlForeground();
m_pChildWindow->SetControlBackground();
@@ -1115,7 +1115,7 @@ bool OpenGLContext::initWindow()
if( m_pChildWindow )
{
m_pChildWindow->SetMouseTransparent( true );
- m_pChildWindow->SetParentClipMode(PARENTCLIPMODE_CLIP);
+ m_pChildWindow->SetParentClipMode(ParentClipMode::Clip);
m_pChildWindow->EnableEraseBackground( false );
m_pChildWindow->SetControlForeground();
m_pChildWindow->SetControlBackground();
@@ -1152,7 +1152,7 @@ bool OpenGLContext::initWindow()
return false;
m_pChildWindow->SetMouseTransparent( true );
- m_pChildWindow->SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ m_pChildWindow->SetParentClipMode( ParentClipMode::NoClip );
m_pChildWindow->EnableEraseBackground( false );
m_pChildWindow->SetControlForeground();
m_pChildWindow->SetControlBackground();
diff --git a/vcl/source/window/clipping.cxx b/vcl/source/window/clipping.cxx
index ef56b63cff55..9b088c3fa868 100644
--- a/vcl/source/window/clipping.cxx
+++ b/vcl/source/window/clipping.cxx
@@ -63,9 +63,8 @@ void Window::InitClipRegion()
mbInitClipRegion = false;
}
-void Window::SetParentClipMode( sal_uInt16 nMode )
+void Window::SetParentClipMode( ParentClipMode nMode )
{
-
if ( mpWindowImpl->mpBorderWindow )
mpWindowImpl->mpBorderWindow->SetParentClipMode( nMode );
else
@@ -73,15 +72,14 @@ void Window::SetParentClipMode( sal_uInt16 nMode )
if ( !ImplIsOverlapWindow() )
{
mpWindowImpl->mnParentClipMode = nMode;
- if ( nMode & PARENTCLIPMODE_CLIP )
+ if ( nMode & ParentClipMode::Clip )
mpWindowImpl->mpParent->mpWindowImpl->mbClipChildren = true;
}
}
}
-sal_uInt16 Window::GetParentClipMode() const
+ParentClipMode Window::GetParentClipMode() const
{
-
if ( mpWindowImpl->mpBorderWindow )
return mpWindowImpl->mpBorderWindow->GetParentClipMode();
else
@@ -207,9 +205,9 @@ bool Window::ImplClipChildren( vcl::Region& rRegion )
if ( pWindow->mpWindowImpl->mbReallyVisible )
{
// read-out ParentClipMode-Flags
- sal_uInt16 nClipMode = pWindow->GetParentClipMode();
- if ( !(nClipMode & PARENTCLIPMODE_NOCLIP) &&
- ((nClipMode & PARENTCLIPMODE_CLIP) || (GetStyle() & WB_CLIPCHILDREN)) )
+ ParentClipMode nClipMode = pWindow->GetParentClipMode();
+ if ( !(nClipMode & ParentClipMode::NoClip) &&
+ ((nClipMode & ParentClipMode::Clip) || (GetStyle() & WB_CLIPCHILDREN)) )
pWindow->ImplExcludeWindowRegion( rRegion );
else
bOtherClip = true;
@@ -488,7 +486,7 @@ bool Window::ImplSetClipFlag( bool bSysObjOnlySmaller )
vcl::Window* pParent = ImplGetParent();
if ( pParent &&
- ((pParent->GetStyle() & WB_CLIPCHILDREN) || (mpWindowImpl->mnParentClipMode & PARENTCLIPMODE_CLIP)) )
+ ((pParent->GetStyle() & WB_CLIPCHILDREN) || (mpWindowImpl->mnParentClipMode & ParentClipMode::Clip)) )
{
pParent->mbInitClipRegion = true;
pParent->mpWindowImpl->mbInitChildRegion = true;
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index fc266f2c61f3..1f690fc7d8d3 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -144,7 +144,7 @@ MenuBarWindow::MenuBarWindow( vcl::Window* pParent ) :
aCloseBtn->SetOutStyle(TOOLBOX_STYLE_FLAT);
aCloseBtn->SetBackground();
aCloseBtn->SetPaintTransparent(true);
- aCloseBtn->SetParentClipMode(PARENTCLIPMODE_NOCLIP);
+ aCloseBtn->SetParentClipMode(ParentClipMode::NoClip);
aCloseBtn->InsertItem(IID_DOCUMENTCLOSE, aCloseBtn->maImage, ToolBoxItemBits::NONE);
aCloseBtn->SetSelectHdl(LINK(this, MenuBarWindow, CloseHdl));
@@ -1036,7 +1036,7 @@ void MenuBarWindow::ApplySettings(vcl::RenderContext& rRenderContext)
rRenderContext.SetBackground(aWallpaper);
SetPaintTransparent(false);
- SetParentClipMode(0);
+ SetParentClipMode(ParentClipMode::NONE);
}
else if (rRenderContext.IsNativeControlSupported(CTRL_MENUBAR, PART_ENTIRE_CONTROL))
{
@@ -1048,7 +1048,7 @@ void MenuBarWindow::ApplySettings(vcl::RenderContext& rRenderContext)
aWallpaper.SetStyle(WALLPAPER_APPLICATIONGRADIENT);
rRenderContext.SetBackground(aWallpaper);
SetPaintTransparent(false);
- SetParentClipMode(0);
+ SetParentClipMode(ParentClipMode::NONE);
}
rRenderContext.SetTextColor(rStyleSettings.GetMenuBarTextColor());
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index fd50a200e4f3..074f895e7a3e 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -1359,7 +1359,7 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP
// do the actual paint
// background
- if( ! IsPaintTransparent() && IsBackground() && ! (GetParentClipMode() & PARENTCLIPMODE_NOCLIP ) )
+ if( ! IsPaintTransparent() && IsBackground() && ! (GetParentClipMode() & ParentClipMode::NoClip ) )
Erase(*this);
// foreground
Paint(*this, aPaintRect);
diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx
index 71b7a99b3d00..0059b5577baa 100644
--- a/vcl/source/window/stacking.cxx
+++ b/vcl/source/window/stacking.cxx
@@ -941,7 +941,7 @@ void Window::SetParent( vcl::Window* pNewParent )
}
ImplRemoveWindow( bNewFrame );
ImplInsertWindow( pNewParent );
- if ( mpWindowImpl->mnParentClipMode & PARENTCLIPMODE_CLIP )
+ if ( mpWindowImpl->mnParentClipMode & ParentClipMode::Clip )
pNewParent->mpWindowImpl->mbClipChildren = true;
ImplUpdateWindowPtr();
if ( ImplUpdatePos() )
diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx
index c02cfc608ab7..0f16a49d717f 100644
--- a/vcl/source/window/syschild.cxx
+++ b/vcl/source/window/syschild.cxx
@@ -114,7 +114,7 @@ void SystemChildWindow::ImplInitSysChild( vcl::Window* pParent, WinBits nStyle,
if ( GetSystemData() )
{
mpWindowImpl->mpSysObj->SetCallback( this, ImplSysChildProc );
- SetParentClipMode( PARENTCLIPMODE_CLIP );
+ SetParentClipMode( ParentClipMode::Clip );
SetBackground();
}
}
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index 170dbcaf169b..d2c432ef5cdc 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -52,14 +52,14 @@ void TabPage::ImplInitSettings()
if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() )
{
EnableChildTransparentMode( true );
- SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ SetParentClipMode( ParentClipMode::NoClip );
SetPaintTransparent( true );
SetBackground();
}
else
{
EnableChildTransparentMode( false );
- SetParentClipMode( 0 );
+ SetParentClipMode( ParentClipMode::NONE );
SetPaintTransparent( false );
if ( IsControlBackground() )
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index a98380008563..18f4f833aa39 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1450,7 +1450,7 @@ void ToolBox::ApplySettings(vcl::RenderContext& rRenderContext)
aColor = GetControlBackground();
SetBackground( aColor );
SetPaintTransparent(false);
- SetParentClipMode( 0 );
+ SetParentClipMode( ParentClipMode::NONE );
}
else
{
@@ -1461,7 +1461,7 @@ void ToolBox::ApplySettings(vcl::RenderContext& rRenderContext)
rRenderContext.SetBackground();
rRenderContext.SetTextColor(rStyleSettings.GetMenuBarTextColor());
SetPaintTransparent(true);
- SetParentClipMode(PARENTCLIPMODE_NOCLIP);
+ SetParentClipMode(ParentClipMode::NoClip);
mpData->maDisplayBackground = Wallpaper(rStyleSettings.GetFaceColor());
}
else
@@ -1473,7 +1473,7 @@ void ToolBox::ApplySettings(vcl::RenderContext& rRenderContext)
rRenderContext.SetBackground(aColor);
SetPaintTransparent(false);
- SetParentClipMode(0);
+ SetParentClipMode(ParentClipMode::NONE);
}
}
}
@@ -1513,7 +1513,7 @@ void ToolBox::ImplInitSettings(bool bFont, bool bForeground, bool bBackground)
aColor = GetControlBackground();
SetBackground( aColor );
SetPaintTransparent(false);
- SetParentClipMode( 0 );
+ SetParentClipMode( ParentClipMode::NONE );
}
else
{
@@ -1524,7 +1524,7 @@ void ToolBox::ImplInitSettings(bool bFont, bool bForeground, bool bBackground)
SetBackground();
SetTextColor(rStyleSettings.GetMenuBarTextColor());
SetPaintTransparent( true );
- SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ SetParentClipMode( ParentClipMode::NoClip );
mpData->maDisplayBackground = Wallpaper( rStyleSettings.GetFaceColor() );
}
else
@@ -1536,7 +1536,7 @@ void ToolBox::ImplInitSettings(bool bFont, bool bForeground, bool bBackground)
SetBackground(aColor);
SetPaintTransparent(false);
- SetParentClipMode(0);
+ SetParentClipMode(ParentClipMode::NONE);
}
}
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index a26e42e259f7..c9129b6b03e4 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -646,7 +646,7 @@ WindowImpl::WindowImpl( WindowType nType )
mnGetFocusFlags = GetFocusFlags::NONE; // Flags fuer GetFocus()-Aufruf
mnWaitCount = 0; // Wait-Count (>1 == Warte-MousePointer)
mnPaintFlags = 0; // Flags for ImplCallPaint
- mnParentClipMode = 0; // Flags for Parent-ClipChildren-Mode
+ mnParentClipMode = ParentClipMode::NONE; // Flags for Parent-ClipChildren-Mode
mnActivateMode = ActivateModeFlags::NONE; // Will be converted in System/Overlap-Windows
mnDlgCtrlFlags = DialogControlFlags::NONE; // DialogControl-Flags
mnLockCount = 0; // LockCount