Debian Codegraph @

chart2/source/controller/inc/uiobject.hxx

raw
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 #pragma once
11
12 #include <memory>
13 #include <vcl/uitest/uiobject.hxx>
14
15 #include "ChartWindow.hxx"
16
17 class ChartUIObject final : public UIObject
18 {
19 public:
20
21 ChartUIObject(const VclPtr<chart::ChartWindow>& xChartWindow,
22 OUString aCID);
23
24 StringMap get_state() override;
25
26 virtual void execute(const OUString& rAction,
27 const StringMap& rParameters) override;
28
29 virtual std::unique_ptr<UIObject> get_child(const OUString& rID) override;
30
31 virtual std::set<OUString> get_children() const override;
32
33 virtual OUString get_type() const override;
34
35 virtual bool equals(const UIObject& rOther) const override;
36
37 private:
38
39 OUString maCID;
40 VclPtr<chart::ChartWindow> mxChartWindow;
41 std::vector<std::unique_ptr<OUString>> maCommands;
42
43 DECL_LINK(PostCommand, void*, void);
44 };
45
46 class ChartWindowUIObject final : public WindowUIObject
47 {
48 VclPtr<chart::ChartWindow> mxChartWindow;
49
50 public:
51
52 ChartWindowUIObject(const VclPtr<chart::ChartWindow>& xChartWindow);
53
54 virtual StringMap get_state() override;
55
56 virtual void execute(const OUString& rAction,
57 const StringMap& rParameters) override;
58
59 virtual std::unique_ptr<UIObject> get_child(const OUString& rID) override;
60
61 virtual std::set<OUString> get_children() const override;
62
63 static std::unique_ptr<UIObject> create(vcl::Window* pWindow);
64
65 protected:
66
67 virtual OUString get_name() const override;
68 };
69
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */