diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-11-28 16:52:14 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-11-29 09:52:26 +0100 |
commit | 62623f7604df0437316c101803098760f4fe4651 (patch) | |
tree | 7ee5c164a22af37302fcefe36d9c385398af1719 /include/svx/galctrl.hxx | |
parent | 7eaaf96e17c14ac49f98da9722a06c0c95f0c5c0 (diff) |
weld GalleryFilesPage
Change-Id: I5fa399144fb12bb19c3b88bf99f99dad6a64e052
Reviewed-on: https://gerrit.libreoffice.org/64188
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/svx/galctrl.hxx')
-rw-r--r-- | include/svx/galctrl.hxx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/svx/galctrl.hxx b/include/svx/galctrl.hxx index 8d60b8f4fc27..c2109ee521ce 100644 --- a/include/svx/galctrl.hxx +++ b/include/svx/galctrl.hxx @@ -26,6 +26,7 @@ #include <vcl/menu.hxx> #include <vcl/edit.hxx> #include <vcl/combobox.hxx> +#include <vcl/customweld.hxx> #include <svl/slstitm.hxx> #include <vcl/transfer.hxx> #include <svtools/valueset.hxx> @@ -75,6 +76,26 @@ public: static void PreviewMedia( const INetURLObject& rURL ); }; +class SVX_DLLPUBLIC SvxGalleryPreview : public weld::CustomWidgetController +{ +private: + GraphicObject aGraphicObj; + tools::Rectangle aPreviewRect; + + SVX_DLLPRIVATE bool ImplGetGraphicCenterRect( const Graphic& rGraphic, tools::Rectangle& rResultRect ) const; + SVX_DLLPRIVATE void InitSettings(); + + SVX_DLLPRIVATE virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; + +public: + + SvxGalleryPreview(); + + virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; + void SetGraphic( const Graphic& rGraphic ) { aGraphicObj.SetGraphic( rGraphic ); } + bool SetGraphic( const INetURLObject& ); +}; + class GalleryIconView : public ValueSet, public DropTargetHelper, public DragSourceHelper { using ValueSet::StartDrag; |