diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-05-28 14:33:42 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-05-29 10:07:40 +0200 |
commit | c4041a3b6c703254ee3977eef1a989992506772b (patch) | |
tree | f696f93baa565d865fd8a883da6d6e9d689e9eb2 /include/svx | |
parent | 66cd438e3545edecaa05aa27beb289c6a6df53fc (diff) |
weld SvxSwPosSizeTabPage
Change-Id: I51c83ec801884a07f7920309535a58b55171b0be
Reviewed-on: https://gerrit.libreoffice.org/54934
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/svx')
-rw-r--r-- | include/svx/swframeexample.hxx | 65 |
1 files changed, 64 insertions, 1 deletions
diff --git a/include/svx/swframeexample.hxx b/include/svx/swframeexample.hxx index 92b0e63add06..c2fbd5cdc198 100644 --- a/include/svx/swframeexample.hxx +++ b/include/svx/swframeexample.hxx @@ -19,11 +19,12 @@ #ifndef INCLUDED_SVX_SWFRAMEEXAMPLE_HXX #define INCLUDED_SVX_SWFRAMEEXAMPLE_HXX -#include <vcl/window.hxx> #include <tools/color.hxx> #include <tools/gen.hxx> #include <svx/svxdllapi.h> #include <svx/swframetypes.hxx> +#include <vcl/customweld.hxx> +#include <vcl/window.hxx> #include <com/sun/star/text/WrapTextMode.hpp> class SVX_DLLPUBLIC SvxSwFrameExample : public vcl::Window @@ -87,6 +88,68 @@ public: void SetRelPos(const Point& rP); }; +class SVX_DLLPUBLIC SwFrameExample : public weld::CustomWidgetController +{ + Color m_aTransColor; ///< transparency + Color m_aBgCol; ///< background + Color m_aFrameColor; ///< graphic frame + Color m_aAlignColor; ///< align anchor + Color m_aBorderCol; ///< frame of doc + Color m_aPrintAreaCol; ///< frame of printable area of doc + Color m_aTxtCol; ///< symbolised text + Color m_aBlankCol; ///< area of symbol for blank + Color m_aBlankFrameCol; ///< frame of symbol for blank + + tools::Rectangle aPage; + tools::Rectangle aPagePrtArea; + tools::Rectangle aTextLine; + tools::Rectangle aPara; + tools::Rectangle aParaPrtArea; + tools::Rectangle aFrameAtFrame; + tools::Rectangle aDrawObj; + tools::Rectangle aAutoCharFrame; + Size aFrmSize; + + short nHAlign; + short nHRel; + + short nVAlign; + short nVRel; + + css::text::WrapTextMode nWrap; + RndStdIds nAnchor; + bool bTrans; + + Point aRelPos; + + void InitColors_Impl(); + void InitAllRects_Impl(vcl::RenderContext& rRenderContext); + void CalcBoundRect_Impl(vcl::RenderContext& rRenderContext, tools::Rectangle &rRect); + tools::Rectangle DrawInnerFrame_Impl(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect, const Color &rFillColor, const Color &rBorderColor); + + virtual void StyleUpdated() override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; +public: + + SwFrameExample(); + + virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; + + void SetWrap(css::text::WrapTextMode nW) { nWrap = nW; } + + void SetHAlign(short nH) { nHAlign = nH; } + void SetHoriRel(short nR) { nHRel = nR; } + + void SetVAlign(short nV) { nVAlign = nV; } + void SetVertRel(short nR) { nVRel = nR; } + + void SetTransparent(bool bT) { bTrans = bT; } + void SetAnchor(RndStdIds nA) { nAnchor = nA; } + + void SetRelPos(const Point& rP); +}; + + #endif // INCLUDED_SVX_SWFRAMEEXAMPLE_HXX |