summaryrefslogtreecommitdiff
path: root/include/svtools
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-17 22:56:46 +0900
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-18 11:22:49 +0900
commitb4bbb5e5d7b31caad2fbcc00382ad27df3c81001 (patch)
tree8ac345712ff92a9b33a7d54651ed27ad88f1ec67 /include/svtools
parent2ca7795a6a723c701f295323fcc3f6c52ad37976 (diff)
refactor how font, fg. and bg. are applied in widgets/controls
- Move vcl::RenderContext to outdev. - Change some methods on vcl::Window to accept RenderContext as parameter. - Add ApplySettings to vcl::Window - This method is called before painting. Refactor existing classes that use InitSettings to have ApplySettings or mark the classes to be refactored later. - Add RenderSettings for adding defered settings to rendering. This is similar to ApplySettings but for more ad-hoc calls. Change-Id: I4ea58461f3b6b08ccfa3e0ddd1a4a3e04f8c4f45
Diffstat (limited to 'include/svtools')
-rw-r--r--include/svtools/calendar.hxx3
-rw-r--r--include/svtools/headbar.hxx2
-rw-r--r--include/svtools/ruler.hxx2
-rw-r--r--include/svtools/treelistbox.hxx3
-rw-r--r--include/svtools/valueset.hxx3
5 files changed, 13 insertions, 0 deletions
diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx
index 7e5751028d75..9aa1cdba9edb 100644
--- a/include/svtools/calendar.hxx
+++ b/include/svtools/calendar.hxx
@@ -228,6 +228,9 @@ private:
using Window::ImplInit;
SVT_DLLPRIVATE void ImplInit( WinBits nWinStyle );
SVT_DLLPRIVATE void ImplInitSettings();
+
+ virtual void ApplySettings(vcl::RenderContext& rRenderContext);
+
SVT_DLLPRIVATE void ImplGetWeekFont( vcl::Font& rFont ) const;
SVT_DLLPRIVATE void ImplFormat();
using Window::ImplHitTest;
diff --git a/include/svtools/headbar.hxx b/include/svtools/headbar.hxx
index cd99e317c9f0..9feeaa2500da 100644
--- a/include/svtools/headbar.hxx
+++ b/include/svtools/headbar.hxx
@@ -281,6 +281,8 @@ private:
SVT_DLLPRIVATE void ImplDrag( const Point& rPos );
SVT_DLLPRIVATE void ImplEndDrag( bool bCancel );
+ virtual void ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE;
+
public:
HeaderBar( vcl::Window* pParent, WinBits nWinBits = WB_STDHEADERBAR );
virtual ~HeaderBar();
diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx
index 537aa3bbde2f..b9510694ca33 100644
--- a/include/svtools/ruler.hxx
+++ b/include/svtools/ruler.hxx
@@ -690,6 +690,8 @@ private:
SVT_DLLPRIVATE void ImplDrawExtra(vcl::RenderContext& rRenderContext, bool bPaint = false);
SVT_DLLPRIVATE void ImplUpdate( bool bMustCalc = false );
+ virtual void ApplySettings(vcl::RenderContext& rRenderContext);
+
using Window::ImplHitTest;
SVT_DLLPRIVATE bool ImplHitTest( const Point& rPosition,
RulerSelection* pHitTest,
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 5babd96909d1..90d8eae36b60 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -621,6 +621,9 @@ protected:
virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
void InitSettings(bool bFont, bool bForeground, bool bBackground);
+
+ virtual void ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE;
+
bool IsCellFocusEnabled() const;
bool SetCurrentTabPos( sal_uInt16 _nNewPos );
sal_uInt16 GetCurrentTabPos() const;
diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx
index 0497bdd237ce..8c2cd2aa5106 100644
--- a/include/svtools/valueset.hxx
+++ b/include/svtools/valueset.hxx
@@ -247,6 +247,9 @@ private:
using Window::ImplInit;
SVT_DLLPRIVATE void ImplInit();
SVT_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
+
+ virtual void ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE;
+
SVT_DLLPRIVATE void ImplInitScrollBar();
SVT_DLLPRIVATE void ImplDeleteItems();
SVT_DLLPRIVATE void ImplFormatItem(vcl::RenderContext& rRenderContext, ValueSetItem* pItem, Rectangle aRect);