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 #include "navipi.hxx"
19 
20 #include <AnnotationWin.hxx>
21 
22 class SwEditWinUIObject final : public WindowUIObject
23 {
24 public:
25 
26  SwEditWinUIObject(const VclPtr<SwEditWin>& xEditWin);
27 
28  virtual StringMap get_state() override;
29 
30  virtual void execute(const OUString& rAction,
31  const StringMap& rParameters) override;
32 
33  static std::unique_ptr<UIObject> create(vcl::Window* pWindow);
34 
35  virtual OUString get_name() const override;
36 
37 private:
38 
40 
41 };
42 
43 // This class handles the Comments as a UIObject to be used in UITest Framework
44 class CommentUIObject final : public WindowUIObject
45 {
47 
48 public:
49 
51 
52  virtual StringMap get_state() override;
53 
54  virtual void execute(const OUString& rAction,
55  const StringMap& rParameters) override;
56 
57  static std::unique_ptr<UIObject> create(vcl::Window* pWindow);
58 
59 private:
60 
61  OUString get_name() const override;
62 
63 };
64 
65 class PageBreakUIObject final : public WindowUIObject
66 {
67 public:
68 
70 
71  virtual void execute(const OUString& rAction,
72  const StringMap& rParameters) override;
73 
74  static std::unique_ptr<UIObject> create(vcl::Window* pWindow);
75 
76 private:
77 
78  virtual OUString get_name() const override;
79 
81 
82 };
83 
84 #endif
85 
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString get_name() const override
Definition: uiobject.cxx:137
PageBreakUIObject(const VclPtr< SwPageBreakWin > &xEditWin)
Definition: uiobject.cxx:218
CommentUIObject(const VclPtr< sw::annotation::SwAnnotationWin > &xCommentUIObject)
Definition: uiobject.cxx:149
OUString get_name() const override
Definition: uiobject.cxx:213
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Definition: uiobject.cxx:224
VclPtr< SwEditWin > mxEditWin
Definition: uiobject.hxx:39
SwEditWinUIObject(const VclPtr< SwEditWin > &xEditWin)
Definition: uiobject.cxx:25
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Definition: uiobject.cxx:168
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
Definition: uiobject.cxx:206
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
Definition: uiobject.cxx:142
virtual StringMap get_state() override
Definition: uiobject.cxx:40
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
Definition: uiobject.cxx:233
VclPtr< SwPageBreakWin > mxPageBreakUIObject
Definition: uiobject.hxx:80
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Definition: uiobject.cxx:70
std::map< OUString, OUString > StringMap
VclPtr< sw::annotation::SwAnnotationWin > mxCommentUIObject
Definition: uiobject.hxx:46
virtual StringMap get_state() override
Definition: uiobject.cxx:155
virtual OUString get_name() const override
Definition: uiobject.cxx:240