diff options
Diffstat (limited to 'include')
-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; |