summaryrefslogtreecommitdiff
path: root/include/vcl/uitest/uiobject.hxx
diff options
context:
space:
mode:
authorAhmed ElShreif <aelshreif7@gmail.com>2020-07-18 17:56:27 +0200
committerAhmed ElShreif <aelshreif7@gmail.com>2020-08-06 03:06:19 +0200
commit8517c19410dde16b951d66a13d0ffa385f877d7a (patch)
tree981f76256e3209922268a826668a2cdefa3e4f03 /include/vcl/uitest/uiobject.hxx
parentf615a3366e502884a15bbbf07c2fb1e70eb9dbfa (diff)
uitest : Add support for Menu Button objects
This will help us test MenuButton like "gear button menu in Tools->Customize" You can test this type of button by excuting this actions: >>var_name.executeAction("OPENLIST", mkPropertyValues({})) >>var_name.executeAction("CLOSELIST", mkPropertyValues({})) >>var_name.executeAction("OPENFROMLIST", mkPropertyValues({"POS": "0" })) Then you can check on it using this lines: >>get_state_as_dict(var_name)["Label"] Change-Id: I189759d9c32237a9a34ee82cfde9611eedff4f3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98996 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'include/vcl/uitest/uiobject.hxx')
-rw-r--r--include/vcl/uitest/uiobject.hxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/vcl/uitest/uiobject.hxx b/include/vcl/uitest/uiobject.hxx
index 1797c9156aba..c5b3f07dbe75 100644
--- a/include/vcl/uitest/uiobject.hxx
+++ b/include/vcl/uitest/uiobject.hxx
@@ -35,6 +35,7 @@ class SpinButton;
class SpinField;
class VerticalTabControl;
class VclMultiLineEdit;
+class MenuButton;
class ToolBox;
typedef std::map<const OUString, OUString> StringMap;
@@ -504,6 +505,28 @@ private:
virtual OUString get_name() const override;
};
+class MenuButtonUIObject final : public WindowUIObject
+{
+ VclPtr<MenuButton> mxMenuButton;
+
+public:
+
+ MenuButtonUIObject(const VclPtr<MenuButton>& xMenuButton);
+ virtual ~MenuButtonUIObject() override;
+
+ virtual StringMap get_state() override;
+
+ virtual void execute(const OUString& rAction,
+ const StringMap& rParameters) override;
+
+ static std::unique_ptr<UIObject> create(vcl::Window* pWindow);
+
+private:
+
+ virtual OUString get_name() const override;
+};
+
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */