diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-06-12 11:22:15 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-06-12 17:46:27 +0200 |
commit | f8480defc137d0eb9f9cd20294909546c2cfc598 (patch) | |
tree | 0211fbac81c7fea32477e243bebc4238c2214b3c /include | |
parent | 5f42787232a5a2ece35d4c018df8a9b7c856919f (diff) |
weld SvxTransparenceTabPage
Change-Id: If8c8a6cf74664f9acd360d877c57e8dd9de2f2b5
Reviewed-on: https://gerrit.libreoffice.org/55694
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/dlgctrl.hxx | 51 | ||||
-rw-r--r-- | include/vcl/customweld.hxx | 1 |
2 files changed, 52 insertions, 0 deletions
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx index c7a1e1087765..e45f31db5193 100644 --- a/include/svx/dlgctrl.hxx +++ b/include/svx/dlgctrl.hxx @@ -382,6 +382,41 @@ public: } }; +class SAL_WARN_UNUSED SAL_DLLPUBLIC_RTTI PreviewBase : public weld::CustomWidgetController +{ +private: + std::unique_ptr<SdrModel> mpModel; + VclPtr<VirtualDevice> mpBufferDevice; + +protected: + void InitSettings(); + + // prepare buffered paint + void LocalPrePaint(vcl::RenderContext const & rRenderContext); + + // end and output buffered paint + void LocalPostPaint(vcl::RenderContext& rRenderContext); + +public: + PreviewBase(); + virtual void SetDrawingArea(weld::DrawingArea*) override; + virtual ~PreviewBase() override; + + // change support + virtual void StyleUpdated() override; + + // dada read access + SdrModel& getModel() const + { + return *mpModel; + } + OutputDevice& getBufferDevice() const + { + return *mpBufferDevice; + } +}; + + /************************************************************************* |* |* SvxLinePreview @@ -437,6 +472,22 @@ public: virtual void Resize() override; }; +class SAL_WARN_UNUSED SVX_DLLPUBLIC XRectPreview : public PreviewBase +{ +private: + SdrObject* mpRectangleObject; + +public: + XRectPreview(); + virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; + virtual ~XRectPreview() override; + + void SetAttributes(const SfxItemSet& rItemSet); + + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; + virtual void Resize() override; +}; + /************************************************************************* |* |* SvxXShadowPreview diff --git a/include/vcl/customweld.hxx b/include/vcl/customweld.hxx index 2d6089871ef3..622b20c256c5 100644 --- a/include/vcl/customweld.hxx +++ b/include/vcl/customweld.hxx @@ -104,6 +104,7 @@ public: m_xDrawingArea->set_size_request(nWidth, nHeight); } void show() { m_xDrawingArea->show(); } + void hide() { m_xDrawingArea->hide(); } void set_margin_top(int nMargin) { m_xDrawingArea->set_margin_top(nMargin); } void set_margin_bottom(int nMargin) { m_xDrawingArea->set_margin_bottom(nMargin); } void set_sensitive(bool bSensitive) { m_xDrawingArea->set_sensitive(bSensitive); } |