summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-05-10 16:42:15 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-05-10 21:57:53 +0200
commita4d35e9ed6b26d329d05bc4f39e21aac34510e0a (patch)
tree37907984b564d1818841fc0161c81885474faaf2 /include
parent8154d17893afff1b910dfe51cb6a6f9c78c301bb (diff)
weld SdVectorizeDlg
Change-Id: I15469be36807bcfca9882d04dd5d55933692abf7 Reviewed-on: https://gerrit.libreoffice.org/54092 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/graphctl.hxx53
-rw-r--r--include/vcl/weld.hxx8
2 files changed, 47 insertions, 14 deletions
diff --git a/include/svx/graphctl.hxx b/include/svx/graphctl.hxx
index f32454a56ae4..13d323c48a93 100644
--- a/include/svx/graphctl.hxx
+++ b/include/svx/graphctl.hxx
@@ -21,12 +21,27 @@
#include <vcl/ctrl.hxx>
#include <vcl/graph.hxx>
+#include <vcl/weld.hxx>
#include <svx/svxdllapi.h>
#include <svx/svdview.hxx>
#include <svx/svdobj.hxx>
-class GraphCtrlUserCall;
+class GraphCtrl;
+
+class GraphCtrlUserCall : public SdrObjUserCall
+{
+ GraphCtrl& rWin;
+
+public:
+
+ GraphCtrlUserCall(GraphCtrl& rGraphWin)
+ : rWin(rGraphWin)
+ {}
+
+ virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const tools::Rectangle& rOldBoundRect) override;
+};
+
class SvxGraphCtrlAccessibleContext;
class SVX_DLLPUBLIC GraphCtrl : public Control
@@ -71,7 +86,7 @@ protected:
virtual void SdrObjChanged( const SdrObject& rObj );
virtual void MarkListHasChanged();
- inline SdrObjUserCall* GetSdrUserCall();
+ SdrObjUserCall* GetSdrUserCall() { return pUserCall; }
public:
@@ -109,24 +124,34 @@ public:
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
};
-
-class GraphCtrlUserCall : public SdrObjUserCall
+class SVX_DLLPUBLIC SvxGraphCtrl
{
- GraphCtrl& rWin;
+ MapMode aMap100;
+ Graphic aGraphic;
+ Size aGraphSize;
+ Size maSize;
+
+ std::unique_ptr<weld::DrawingArea> mxDrawingArea;
+
+ DECL_LINK(DoPaint, weld::DrawingArea::draw_args, void);
+ DECL_LINK(DoResize, const Size& rSize, void);
public:
- GraphCtrlUserCall(GraphCtrl& rGraphWin)
- : rWin(rGraphWin)
- {}
+ SvxGraphCtrl(weld::Builder& rBuilder, const OString& rDrawingId);
+ virtual ~SvxGraphCtrl();
- virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const tools::Rectangle& rOldBoundRect) override;
-};
+ void SetGraphic( const Graphic& rGraphic );
+ const Graphic& GetGraphic() const { return aGraphic; }
+ const Size& GetGraphicSize() const { return aGraphSize; }
-SdrObjUserCall* GraphCtrl::GetSdrUserCall()
-{
- return pUserCall;
-}
+ const Size& GetSize() const { return maSize; }
+
+ void set_size_request(int nWidth, int nHeight)
+ {
+ mxDrawingArea->set_size_request(nWidth, nHeight);
+ }
+};
class GraphCtrlView : public SdrView
{
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index b7f53ab0e057..306dc4fedebf 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -444,6 +444,13 @@ public:
void connect_value_changed(const Link<Scale&, void>& rLink) { m_aValueChangedHdl = rLink; }
};
+class VCL_DLLPUBLIC ProgressBar : virtual public Widget
+{
+public:
+ //0-100
+ virtual void set_percentage(int value) = 0;
+};
+
class VCL_DLLPUBLIC Entry : virtual public Widget
{
private:
@@ -868,6 +875,7 @@ public:
virtual Expander* weld_expander(const OString& id, bool bTakeOwnership = false) = 0;
virtual Entry* weld_entry(const OString& id, bool bTakeOwnership = false) = 0;
virtual Scale* weld_scale(const OString& id, bool bTakeOwnership = false) = 0;
+ virtual ProgressBar* weld_progress_bar(const OString& id, bool bTakeOwnership = false) = 0;
virtual DrawingArea* weld_drawing_area(const OString& id, const a11yref& rA11yImpl = nullptr,
FactoryFunction pUITestFactoryFunction = nullptr,
void* pUserData = nullptr, bool bTakeOwnership = false)