summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/svtools/accessibilityoptions.hxx14
-rw-r--r--include/svx/SvxColorChildWindow.hxx40
-rw-r--r--include/svx/SvxColorValueSet.hxx51
-rw-r--r--include/svx/colrctrl.hxx36
-rw-r--r--include/vcl/bitmap.hxx31
5 files changed, 146 insertions, 26 deletions
diff --git a/include/svtools/accessibilityoptions.hxx b/include/svtools/accessibilityoptions.hxx
index 4c168143aff9..52b12b9b60b4 100644
--- a/include/svtools/accessibilityoptions.hxx
+++ b/include/svtools/accessibilityoptions.hxx
@@ -49,6 +49,15 @@ public:
sal_Bool IsSelectionInReadonly() const;
sal_Bool GetAutoDetectSystemHC() const;
+ // options for configuring the look and feel for the ColorValueSet (color selector)
+ sal_Int16 GetColorValueSetMaximumRowCount() const;
+ sal_Int16 GetColorValueSetEntryEdgeLength() const;
+ sal_Int16 GetColorValueSetColumnCount() const;
+
+ // option to activate EdgeBlending for previews in the UI (ColorValueSet, ColorDropDown,
+ // FillStyle/LineStyle previews, etc...). 0 == off, 100% == full paint, in-between == alpha
+ sal_Int16 GetEdgeBlending() const;
+
void SetIsForPagePreviews(sal_Bool bSet);
void SetIsHelpTipsDisappear(sal_Bool bSet);
void SetIsAllowAnimatedGraphics(sal_Bool bSet);
@@ -59,6 +68,11 @@ public:
void SetSelectionInReadonly(sal_Bool bSet);
void SetAutoDetectSystemHC(sal_Bool bSet);
+ void SetColorValueSetMaximumRowCount(sal_Int16 nSet);
+ void SetColorValueSetEntryEdgeLength(sal_Int16 nSet);
+ void SetColorValueSetColumnCount(sal_Int16 nSet);
+ void SetEdgeBlending(sal_Int16 nSet);
+
sal_Bool IsModified() const;
void Commit();
diff --git a/include/svx/SvxColorChildWindow.hxx b/include/svx/SvxColorChildWindow.hxx
new file mode 100644
index 000000000000..0b9b320aad96
--- /dev/null
+++ b/include/svx/SvxColorChildWindow.hxx
@@ -0,0 +1,40 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef _SVX_COLORCHILDWINDOW_HXX
+#define _SVX_COLORCHILDWINDOW_HXX
+
+#include <sfx2/childwin.hxx>
+#include "svx/svxdllapi.h"
+
+/*************************************************************************
+|*
+|* Ableitung vom SfxChildWindow als "Behaelter" fuer Controller
+|*
+\************************************************************************/
+
+class SVX_DLLPUBLIC SvxColorChildWindow : public SfxChildWindow
+{
+ public:
+ SvxColorChildWindow( Window*, sal_uInt16, SfxBindings*,
+ SfxChildWinInfo* );
+
+ SFX_DECL_CHILDWINDOW_WITHID(SvxColorChildWindow);
+};
+
+
+#endif // _SVX_COLORCHILDWINDOW_HXX
diff --git a/include/svx/SvxColorValueSet.hxx b/include/svx/SvxColorValueSet.hxx
new file mode 100644
index 000000000000..819de02d7483
--- /dev/null
+++ b/include/svx/SvxColorValueSet.hxx
@@ -0,0 +1,51 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef _SVX_COLORVALUESET_HXX
+#define _SVX_COLORVALUESET_HXX
+
+#include <svtools/valueset.hxx>
+#include "svx/svxdllapi.h"
+
+//////////////////////////////////////////////////////////////////////////////
+
+class XColorList;
+
+//////////////////////////////////////////////////////////////////////////////
+
+class SVX_DLLPUBLIC SvxColorValueSet : public ValueSet
+{
+private:
+protected:
+public:
+ SvxColorValueSet(Window* pParent, WinBits nWinStyle = WB_ITEMBORDER);
+ SvxColorValueSet(Window* pParent, const ResId& rResId);
+
+ sal_uInt32 getMaxRowCount() const;
+ sal_uInt32 getEntryEdgeLength() const;
+ sal_uInt32 getColumnCount() const;
+
+ void addEntriesForXColorList(const XColorList& rXColorList, sal_uInt32 nStartIndex = 1);
+ Size layoutAllVisible(sal_uInt32 nEntryCount);
+ Size layoutToGivenHeight(sal_uInt32 nHeight, sal_uInt32 nEntryCount);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif // _SVX_COLORVALUESET_HXX
+
+// eof
diff --git a/include/svx/colrctrl.hxx b/include/svx/colrctrl.hxx
index ee3451bc857c..cd0fa07d2748 100644
--- a/include/svx/colrctrl.hxx
+++ b/include/svx/colrctrl.hxx
@@ -21,7 +21,7 @@
#include <sfx2/dockwin.hxx>
#include <sfx2/childwin.hxx>
-#include <svtools/valueset.hxx>
+#include <svx/SvxColorValueSet.hxx>
#include <svtools/transfer.hxx>
#include <svl/lstner.hxx>
#include <svx/svxdllapi.h>
@@ -31,17 +31,16 @@ class SvData;
/*************************************************************************
|*
-|* SvxColorValueSet
+|* SvxColorValueSet_docking
|*
\************************************************************************/
-class SvxColorValueSet : public ValueSet, public DragSourceHelper
+class SvxColorValueSet_docking : public SvxColorValueSet, public DragSourceHelper
{
- using ValueSet::StartDrag;
-
private:
+ using SvxColorValueSet::StartDrag;
- sal_Bool bLeft;
+ bool mbLeftButton;
Point aDragPosPixel;
protected:
@@ -56,27 +55,13 @@ protected:
// DragSourceHelper
virtual void StartDrag( sal_Int8 nAction, const Point& rPtPixel );
- DECL_STATIC_LINK(SvxColorValueSet, ExecDragHdl, void*);
+ DECL_STATIC_LINK(SvxColorValueSet_docking, ExecDragHdl, void*);
public:
- SvxColorValueSet( Window* pParent, const ResId& rResId );
-
- sal_Bool IsLeftButton() const { return bLeft; }
-};
-
-/*************************************************************************
-|*
-|* Derivation from SfxChildWindow as "container" for Controller
-|*
-\************************************************************************/
-
-class SVX_DLLPUBLIC SvxColorChildWindow : public SfxChildWindow
-{
- public:
- SvxColorChildWindow( Window*, sal_uInt16, SfxBindings*,
- SfxChildWinInfo* );
+ SvxColorValueSet_docking( Window* pParent, WinBits nWinStyle = WB_ITEMBORDER );
+ SvxColorValueSet_docking( Window* pParent, const ResId& rResId );
- SFX_DECL_CHILDWINDOW_WITHID(SvxColorChildWindow);
+ bool IsLeftButton() const { return mbLeftButton; }
};
/*************************************************************************
@@ -91,13 +76,12 @@ class SvxColorDockingWindow : public SfxDockingWindow, public SfxListener
private:
XColorListRef pColorList;
- SvxColorValueSet aColorSet;
+ SvxColorValueSet_docking aColorSet;
sal_uInt16 nLeftSlot;
sal_uInt16 nRightSlot;
sal_uInt16 nCols;
sal_uInt16 nLines;
long nCount;
- Size aColorSize;
Size aItemSize;
void FillValueSet();
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index 292c3fb4480f..bacec110ab1a 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -20,6 +20,7 @@
#ifndef _SV_BITMAP_HXX
#define _SV_BITMAP_HXX
+#include <tools/color.hxx>
#include <tools/link.hxx>
#include <tools/solar.h>
#include <vcl/dllapi.h>
@@ -823,6 +824,36 @@ public:
bool HasAlpha();
public:
+ /** Draw a blend frame to the Bitmap
+
+ @param nAlpha
+ The blend value defines how strong the frame will be blended with the
+ existing content, 255 == full coverage, 0 == no frame will be drawn
+
+ @param aColorTopLeft, aColorBottomRight, aColorTopRight, aColorBottomLeft
+ The colors defining the frame. If the version without aColorTopRight and
+ aColorBottomLeft is used, these colors are linearly interpolated from
+ aColorTopLeft and aColorBottomRight using the width and height of the area
+
+ @param rTopLeft
+ The start point of the frame in pixels
+
+ @param rSize
+ The size of the frame in pixels
+ */
+ void DrawBlendFrame(
+ sal_uInt8 nAlpha = 128,
+ Color aColorTopLeft = Color(COL_WHITE),
+ Color aColorBottomRight = Color(COL_BLACK));
+ void DrawBlendFrame(
+ const Point& rTopLeft,
+ const Size& rSize,
+ sal_uInt8 nAlpha = 128,
+ Color aColorTopLeft = Color(COL_WHITE),
+ Color aColorTopRight = Color(COL_GRAY),
+ Color aColorBottomRight = Color(COL_BLACK),
+ Color aColorBottomLeft = Color(COL_GRAY));
+
BitmapReadAccess* AcquireReadAccess();
BitmapWriteAccess* AcquireWriteAccess();
void ReleaseAccess( BitmapReadAccess* pAccess );