Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / chart2 / source / controller / inc / uiobject.hxx
blob31d1561b08f3e677dc5de91e13346f317cfb7aec
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_UIOBJECT_HXX
11 #define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_UIOBJECT_HXX
13 #include <memory>
14 #include <vcl/uitest/uiobject.hxx>
16 #include "ChartWindow.hxx"
18 class ChartUIObject : public UIObject
20 public:
22 ChartUIObject(const VclPtr<chart::ChartWindow>& xChartWindow,
23 const OUString& rCID);
25 StringMap get_state() override;
27 virtual void execute(const OUString& rAction,
28 const StringMap& rParameters) override;
30 virtual std::unique_ptr<UIObject> get_child(const OUString& rID) override;
32 virtual std::set<OUString> get_children() const override;
34 virtual OUString get_type() const override;
36 private:
38 OUString maCID;
39 VclPtr<chart::ChartWindow> mxChartWindow;
40 std::vector<std::unique_ptr<OUString>> maCommands;
42 DECL_LINK(PostCommand, void*, void);
45 class ChartWindowUIObject : public WindowUIObject
47 VclPtr<chart::ChartWindow> mxChartWindow;
49 public:
51 ChartWindowUIObject(const VclPtr<chart::ChartWindow>& xChartWindow);
53 virtual StringMap get_state() override;
55 virtual void execute(const OUString& rAction,
56 const StringMap& rParameters) override;
58 virtual std::unique_ptr<UIObject> get_child(const OUString& rID) override;
60 virtual std::set<OUString> get_children() const override;
62 static std::unique_ptr<UIObject> create(vcl::Window* pWindow);
64 protected:
66 virtual OUString get_name() const override;
69 #endif
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */