LibreOffice Module chart2 (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#pragma once
11
12#include <memory>
14
15#include "ChartWindow.hxx"
16
17class ChartUIObject final : public UIObject
18{
19public:
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
35private:
36
37 OUString maCID;
39 std::vector<std::unique_ptr<OUString>> maCommands;
40
41 DECL_LINK(PostCommand, void*, void);
42};
43
45{
47
48public:
49
51
52 virtual StringMap get_state() override;
53
54 virtual void execute(const OUString& rAction,
55 const StringMap& rParameters) override;
56
57 virtual std::unique_ptr<UIObject> get_child(const OUString& rID) override;
58
59 virtual std::set<OUString> get_children() const override;
60
61 static std::unique_ptr<UIObject> create(vcl::Window* pWindow);
62
63protected:
64
65 virtual OUString get_name() const override;
66};
67
68/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ChartUIObject(const VclPtr< chart::ChartWindow > &xChartWindow, OUString aCID)
Definition: uiobject.cxx:28
DECL_LINK(PostCommand, void *, void)
virtual OUString get_type() const override
Definition: uiobject.cxx:95
virtual std::unique_ptr< UIObject > get_child(const OUString &rID) override
Definition: uiobject.cxx:81
virtual std::set< OUString > get_children() const override
Definition: uiobject.cxx:88
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Definition: uiobject.cxx:43
OUString maCID
Definition: uiobject.hxx:37
VclPtr< chart::ChartWindow > mxChartWindow
Definition: uiobject.hxx:38
std::vector< std::unique_ptr< OUString > > maCommands
Definition: uiobject.hxx:39
StringMap get_state() override
Definition: uiobject.cxx:35
VclPtr< chart::ChartWindow > mxChartWindow
Definition: uiobject.hxx:46
virtual std::set< OUString > get_children() const override
Definition: uiobject.cxx:169
ChartWindowUIObject(const VclPtr< chart::ChartWindow > &xChartWindow)
Definition: uiobject.cxx:100
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Definition: uiobject.cxx:122
virtual StringMap get_state() override
Definition: uiobject.cxx:106
virtual std::unique_ptr< UIObject > get_child(const OUString &rID) override
Definition: uiobject.cxx:143
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
Definition: uiobject.cxx:189
virtual OUString get_name() const override
Definition: uiobject.cxx:197
std::map< OUString, OUString > StringMap