LibreOffice Module sw (master)  1
uiobject.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  */
9 
10 #ifndef SW_SOURCE_UIBASE_INC_UIOBJECT_HXX
11 #define SW_SOURCE_UIBASE_INC_UIOBJECT_HXX
12 
13 #include <memory>
14 #include <vcl/uitest/uiobject.hxx>
15 
16 #include "edtwin.hxx"
17 #include "PageBreakWin.hxx"
18 
19 #include <AnnotationWin.hxx>
20 
21 class SwEditWinUIObject final : public WindowUIObject
22 {
23 public:
24 
25  SwEditWinUIObject(const VclPtr<SwEditWin>& xEditWin);
26 
27  virtual StringMap get_state() override;
28 
29  virtual void execute(const OUString& rAction,
30  const StringMap& rParameters) override;
31 
32  static std::unique_ptr<UIObject> create(vcl::Window* pWindow);
33 
34  virtual OUString get_name() const override;
35 
36 private:
37 
39 
40 };
41 
42 // This class handles the Comments as a UIObject to be used in UITest Framework
43 class CommentUIObject final : public WindowUIObject
44 {
46 
47 public:
48 
50 
51  virtual StringMap get_state() override;
52 
53  virtual void execute(const OUString& rAction,
54  const StringMap& rParameters) override;
55 
56  static std::unique_ptr<UIObject> create(vcl::Window* pWindow);
57 
58 private:
59 
60  OUString get_name() const override;
61 
62 };
63 
64 class PageBreakUIObject final : public WindowUIObject
65 {
66 public:
67 
69 
70  virtual void execute(const OUString& rAction,
71  const StringMap& rParameters) override;
72 
73  static std::unique_ptr<UIObject> create(vcl::Window* pWindow);
74 
75 private:
76 
77  virtual OUString get_name() const override;
78 
80 
81 };
82 
83 #endif
84 
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString get_name() const override
Definition: uiobject.cxx:141
PageBreakUIObject(const VclPtr< SwPageBreakWin > &xEditWin)
Definition: uiobject.cxx:222
CommentUIObject(const VclPtr< sw::annotation::SwAnnotationWin > &xCommentUIObject)
Definition: uiobject.cxx:153
OUString get_name() const override
Definition: uiobject.cxx:217
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Definition: uiobject.cxx:228
VclPtr< SwEditWin > mxEditWin
Definition: uiobject.hxx:38
SwEditWinUIObject(const VclPtr< SwEditWin > &xEditWin)
Definition: uiobject.cxx:24
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Definition: uiobject.cxx:172
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
Definition: uiobject.cxx:210
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
Definition: uiobject.cxx:146
virtual StringMap get_state() override
Definition: uiobject.cxx:39
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
Definition: uiobject.cxx:237
VclPtr< SwPageBreakWin > mxPageBreakUIObject
Definition: uiobject.hxx:79
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Definition: uiobject.cxx:69
std::map< OUString, OUString > StringMap
VclPtr< sw::annotation::SwAnnotationWin > mxCommentUIObject
Definition: uiobject.hxx:45
virtual StringMap get_state() override
Definition: uiobject.cxx:159
virtual OUString get_name() const override
Definition: uiobject.cxx:244