diff options
Diffstat (limited to 'include/test')
-rw-r--r-- | include/test/testdllapi.hxx | 6 | ||||
-rw-r--r-- | include/test/uiobject.hxx | 35 | ||||
-rw-r--r-- | include/test/uitest.hxx | 6 |
3 files changed, 43 insertions, 4 deletions
diff --git a/include/test/testdllapi.hxx b/include/test/testdllapi.hxx index 3e33b0b51ec0..b7af82c72e4e 100644 --- a/include/test/testdllapi.hxx +++ b/include/test/testdllapi.hxx @@ -28,6 +28,12 @@ #define OOO_DLLPUBLIC_TEST SAL_DLLPUBLIC_IMPORT #endif +#if defined DLLIMPLEMENTATION_UITEST +#define UITEST_DLLPUBLIC SAL_DLLPUBLIC_EXPORT +#else +#define UITEST_DLLPUBLIC SAL_DLLPUBLIC_IMPORT +#endif + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/uiobject.hxx b/include/test/uiobject.hxx index 8f0c04568dce..c33bd4380790 100644 --- a/include/test/uiobject.hxx +++ b/include/test/uiobject.hxx @@ -9,20 +9,27 @@ #include <rtl/ustring.hxx> #include <map> +#include <memory> + +#include <vcl/window.hxx> +#include <test/testdllapi.hxx> enum class UIObjectType { + WINDOW, DIALOG, UNKNOWN }; +typedef std::map<const OUString, OUString> StringMap; + /** * This class wraps a UI object like vcl::Window and provides * an interface for the UI testing. * * This class should only have virtual methods. */ -class UIObject +class UITEST_DLLPUBLIC UIObject { public: @@ -31,16 +38,36 @@ public: /** * returns the state of the wrapped UI object */ - virtual std::map<const OUString, OUString> get_state(); + virtual StringMap get_state(); /** * executes an action on the wrapped UI object, * possibly with some additional parameters */ virtual void execute(const OUString& rAction, - const std::map<const OUString, OUString>& rParameters); + const StringMap& rParameters); + + virtual UIObjectType getType() const; + + virtual std::unique_ptr<UIObject> get_child(const OUString& rID); +}; + +class WindowUIObject : public UIObject +{ + VclPtr<vcl::Window> mxWindow; + +public: + + WindowUIObject(VclPtr<vcl::Window> xWindow); + + virtual StringMap get_state() override; + + virtual void execute(const OUString& rAction, + const StringMap& rParameters) override; + + virtual UIObjectType getType() const override; - virtual UIObjectType getType(); + virtual std::unique_ptr<UIObject> get_child(const OUString& rID); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/uitest.hxx b/include/test/uitest.hxx index b090651ac6a1..2fb08f5ff6a2 100644 --- a/include/test/uitest.hxx +++ b/include/test/uitest.hxx @@ -7,6 +7,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include <test/testdllapi.hxx> + +class UITEST_DLLPUBLIC UITest +{ +public: +}; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |