summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/source/lib/init.cxx13
-rw-r--r--include/vcl/layout.hxx20
-rw-r--r--include/vcl/salvtables.hxx2
-rw-r--r--include/vcl/weld.hxx2
-rw-r--r--vcl/source/app/salvtables.cxx7
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx5
6 files changed, 39 insertions, 10 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 0c171784d40f..2d043e276a7c 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3664,6 +3664,19 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin
bContinueWithLOKWindow = true;
}
}
+ else if (sControlType == "drawingarea")
+ {
+ auto pArea = dynamic_cast<weld::DrawingArea*>(pWidget);
+ if (pArea)
+ {
+ if (sAction == "click")
+ {
+ pArea->click(Point(10, 10));
+ }
+ else
+ bContinueWithLOKWindow = true;
+ }
+ }
else if (sControlType == "spinfield")
{
auto pSpinField = dynamic_cast<weld::SpinButton*>(pWidget);
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index 48114541280e..736f653c7665 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -662,16 +662,6 @@ private:
if (!m_aMouseMotionHdl.Call(rMEvt))
Control::MouseMove(rMEvt);
}
- virtual void MouseButtonDown(const MouseEvent& rMEvt) override
- {
- if (!m_aMousePressHdl.Call(rMEvt))
- Control::MouseButtonDown(rMEvt);
- }
- virtual void MouseButtonUp(const MouseEvent& rMEvt) override
- {
- if (!m_aMouseReleaseHdl.Call(rMEvt))
- Control::MouseButtonUp(rMEvt);
- }
virtual void KeyInput(const KeyEvent& rKEvt) override
{
if (!m_aKeyPressHdl.Call(rKEvt))
@@ -742,6 +732,16 @@ public:
{
SetBackground();
}
+ virtual void MouseButtonDown(const MouseEvent& rMEvt) override
+ {
+ if (!m_aMousePressHdl.Call(rMEvt))
+ Control::MouseButtonDown(rMEvt);
+ }
+ virtual void MouseButtonUp(const MouseEvent& rMEvt) override
+ {
+ if (!m_aMouseReleaseHdl.Call(rMEvt))
+ Control::MouseButtonUp(rMEvt);
+ }
void SetUITestFactory(FactoryFunction pFactoryFunction, void* pUserData)
{
m_pFactoryFunction = pFactoryFunction;
diff --git a/include/vcl/salvtables.hxx b/include/vcl/salvtables.hxx
index 126b771b97bf..0b4266a45645 100644
--- a/include/vcl/salvtables.hxx
+++ b/include/vcl/salvtables.hxx
@@ -1008,6 +1008,8 @@ public:
virtual ~SalInstanceDrawingArea() override;
virtual OutputDevice& get_ref_device() override;
+
+ virtual void click(Point pos) override;
};
#endif \ No newline at end of file
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index a904269515ec..bc2b5d530334 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -1870,6 +1870,8 @@ public:
virtual a11yref get_accessible_parent() = 0;
virtual a11yrelationset get_accessible_relation_set() = 0;
virtual Point get_accessible_location() = 0;
+
+ virtual void click(Point pos) = 0;
};
class VCL_DLLPUBLIC Menu
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index e485d0ea770f..084c1714d711 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -5421,6 +5421,13 @@ OutputDevice& SalInstanceDrawingArea::get_ref_device()
return *m_xDrawingArea;
}
+void SalInstanceDrawingArea::click(Point pos)
+{
+ MouseEvent aEvent(pos);
+ m_xDrawingArea->MouseButtonDown(aEvent);
+ m_xDrawingArea->MouseButtonUp(aEvent);
+}
+
IMPL_LINK(SalInstanceDrawingArea, PaintHdl, target_and_area, aPayload, void)
{
m_aDrawHdl.Call(aPayload);
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index d8ec90389bce..99a708126ac5 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -11158,6 +11158,11 @@ public:
{
return *m_xDevice;
}
+
+ void click(Point /*pos*/) override
+ {
+ //TODO
+ }
};
#define g_signal_handlers_block_by_data(instance, data) \