summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-06-18 21:30:10 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-06-20 16:34:13 +0200
commitd148e5c5db3f3ea32abd6f7bed30665a3931e937 (patch)
tree7d1f69735f8846bf2f966fd1f878ba9aee76dd7a /include
parent361434e4e8fa58e02e694ec8cfa8187eecdf8c7f (diff)
weld SvxColorTabPage
Change-Id: I5dc6f949edcb34aa110dfa9415e2ac886d0dfa4c Reviewed-on: https://gerrit.libreoffice.org/56155 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/svtools/valueset.hxx15
-rw-r--r--include/svx/Palette.hxx1
-rw-r--r--include/svx/PaletteManager.hxx2
-rw-r--r--include/svx/SvxColorValueSet.hxx2
-rw-r--r--include/svx/hexcolorcontrol.hxx15
-rw-r--r--include/vcl/vclenum.hxx7
-rw-r--r--include/vcl/weld.hxx3
7 files changed, 20 insertions, 25 deletions
diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx
index 5530adf33da8..290c347c8f10 100644
--- a/include/svtools/valueset.hxx
+++ b/include/svtools/valueset.hxx
@@ -416,6 +416,7 @@ private:
css::uno::Reference<css::accessibility::XAccessible> mxAccessible;
SvtValueItemList mItemList;
std::unique_ptr<SvtValueSetItem> mpNoneItem;
+ std::unique_ptr<weld::ScrolledWindow> mxScrolledWindow;
tools::Rectangle maNoneItemRect;
tools::Rectangle maItemListRect;
long mnItemWidth;
@@ -439,7 +440,6 @@ private:
WinBits mnStyle;
Link<SvtValueSet*,void> maDoubleClickHdl;
Link<SvtValueSet*,void> maSelectHdl;
- Link<SvtValueSet*,void> maHighlightHdl;
bool mbFormat : 1;
bool mbNoSelection : 1;
@@ -471,7 +471,7 @@ private:
SVT_DLLPRIVATE tools::Rectangle ImplGetItemRect( size_t nPos ) const;
SVT_DLLPRIVATE void ImplFireAccessibleEvent( short nEventId, const css::uno::Any& rOldValue, const css::uno::Any& rNewValue );
SVT_DLLPRIVATE bool ImplHasAccessibleListeners();
- DECL_DLLPRIVATE_LINK( ImplScrollHdl, ScrollBar*, void );
+ DECL_DLLPRIVATE_LINK(ImplScrollHdl, weld::ScrolledWindow&, void);
SvtValueSet (const SvtValueSet &) = delete;
SvtValueSet & operator= (const SvtValueSet &) = delete;
@@ -480,7 +480,7 @@ protected:
virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override;
public:
- SvtValueSet();
+ SvtValueSet(weld::ScrolledWindow* pScrolledWindow);
virtual ~SvtValueSet() override;
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
@@ -495,11 +495,10 @@ public:
virtual OUString RequestHelp(tools::Rectangle& rHelpRect) override;
virtual void Select();
- virtual void UserDraw( const UserDrawEvent& rUDEvt );
OUString GetText() const { return maText; }
void SetText(const OUString& rText) { maText = rText; }
- void SetStyle(WinBits nStyle) { mnStyle = nStyle; }
+ void SetStyle(WinBits nStyle);
WinBits GetStyle() const { return mnStyle; }
/// Insert @rImage item.
@@ -510,10 +509,6 @@ public:
/// Insert an @rColor item with @rStr tooltip.
void InsertItem(sal_uInt16 nItemId, const Color& rColor,
const OUString& rStr);
- /// Insert an User Drawn item.
- void InsertItem(sal_uInt16 nItemId, size_t nPos = VALUESET_APPEND);
- /// Insert an User Drawn item with @rStr tooltip.
- void InsertItem(sal_uInt16 nItemId, const OUString& rStr, size_t nPos);
void RemoveItem(sal_uInt16 nItemId);
void Clear();
@@ -586,11 +581,13 @@ public:
sal_uInt16 nCalcCols = 0,
sal_uInt16 nCalcLines = 0) const;
Size CalcItemSizePixel(const Size& rSize) const;
+ int GetScrollWidth() const;
void SetSelectHdl(const Link<SvtValueSet*,void>& rLink)
{
maSelectHdl = rLink;
}
+
void SetDoubleClickHdl(const Link<SvtValueSet*,void>& rLink)
{
maDoubleClickHdl = rLink;
diff --git a/include/svx/Palette.hxx b/include/svx/Palette.hxx
index a2d00f2ed166..3b9835bc739e 100644
--- a/include/svx/Palette.hxx
+++ b/include/svx/Palette.hxx
@@ -35,6 +35,7 @@ public:
virtual const OUString& GetName() = 0;
virtual const OUString& GetPath() = 0;
virtual void LoadColorSet( SvxColorValueSet& rColorSet ) = 0;
+ virtual void LoadColorSet( ColorValueSet& rColorSet ) = 0;
virtual bool IsValid() = 0;
};
diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx
index 09662558ffdf..d4b6fd1a2298 100644
--- a/include/svx/PaletteManager.hxx
+++ b/include/svx/PaletteManager.hxx
@@ -56,7 +56,9 @@ public:
PaletteManager& operator=(const PaletteManager&) = delete;
void LoadPalettes();
void ReloadColorSet(SvxColorValueSet& rColorSet);
+ void ReloadColorSet(ColorValueSet& rColorSet);
void ReloadRecentColorSet(SvxColorValueSet& rColorSet);
+ void ReloadRecentColorSet(ColorValueSet& rColorSet);
std::vector<OUString> GetPaletteList();
void SetPalette( sal_Int32 nPos );
sal_Int32 GetPalette();
diff --git a/include/svx/SvxColorValueSet.hxx b/include/svx/SvxColorValueSet.hxx
index 32026c351814..a1098fb7bd91 100644
--- a/include/svx/SvxColorValueSet.hxx
+++ b/include/svx/SvxColorValueSet.hxx
@@ -45,7 +45,7 @@ public:
class SVX_DLLPUBLIC ColorValueSet : public SvtValueSet
{
public:
- ColorValueSet();
+ ColorValueSet(weld::ScrolledWindow* pWindow);
virtual void Resize() override;
diff --git a/include/svx/hexcolorcontrol.hxx b/include/svx/hexcolorcontrol.hxx
index a39bb5941626..30302374d52b 100644
--- a/include/svx/hexcolorcontrol.hxx
+++ b/include/svx/hexcolorcontrol.hxx
@@ -32,21 +32,6 @@
#include <svx/svxdllapi.h>
#include <tools/color.hxx>
-class SVX_DLLPUBLIC HexColorControl : public Edit
-{
-public:
- HexColorControl( vcl::Window* pParent, WinBits nStyle );
-
- virtual bool PreNotify( NotifyEvent& rNEvt ) override;
- virtual void Paste() override;
-
- void SetColor( ::Color nColor );
- ::Color GetColor();
-
-private:
- static bool ImplProcessKeyInput( const KeyEvent& rKEv );
-};
-
namespace weld {
class SVX_DLLPUBLIC HexColorControl
diff --git a/include/vcl/vclenum.hxx b/include/vcl/vclenum.hxx
index 0de6703f6aba..0cf180cb6bc8 100644
--- a/include/vcl/vclenum.hxx
+++ b/include/vcl/vclenum.hxx
@@ -250,6 +250,13 @@ enum class VclSizeGroupMode
Both
};
+enum class VclPolicyType
+{
+ ALWAYS,
+ AUTOMATIC,
+ NEVER
+};
+
#endif // INCLUDED_VCL_VCLENUM_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index b15b77d0aff8..07360e8a43e5 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -129,10 +129,13 @@ public:
virtual void vadjustment_set_value(int value) = 0;
virtual int vadjustment_get_upper() const = 0;
virtual void vadjustment_set_upper(int upper) = 0;
+ virtual void set_vpolicy(VclPolicyType eVPolicy) = 0;
+ virtual VclPolicyType get_vpolicy() const = 0;
void connect_vadjustment_changed(const Link<ScrolledWindow&, void>& rLink)
{
m_aVChangeHdl = rLink;
}
+ virtual int get_vscroll_width() const = 0;
};
class VCL_DLLPUBLIC Frame : virtual public Container