LibreOffice Module reportdesign (master) 1
ColorListener.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 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#ifndef INCLUDED_REPORTDESIGN_SOURCE_UI_INC_COLORLISTENER_HXX
20#define INCLUDED_REPORTDESIGN_SOURCE_UI_INC_COLORLISTENER_HXX
21
22#include <vcl/window.hxx>
23#include <svtools/colorcfg.hxx>
25#include <tools/link.hxx>
26
27namespace rptui
28{
29 class OColorListener : public vcl::Window, public SfxListener
30 {
32 void operator =(const OColorListener&) = delete;
33 protected:
37 OUString m_sColorEntry;
42
43 virtual void ImplInitSettings() = 0;
44 protected:
45 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
46 public:
47 OColorListener(vcl::Window* _pParent,OUString _sColorEntry);
48 virtual ~OColorListener() override;
49 virtual void dispose() override;
50
51 // SfxListener
52 virtual void Notify(SfxBroadcaster & rBc, SfxHint const & rHint) override;
53
57 void setMarked(bool _bMark);
58
61 bool isMarked() const { return m_bMarked; }
62
64 bool isCollapsed() const { return m_bCollapsed; }
65
70 virtual void setCollapsed(bool _bCollapsed);
71 };
72}
73#endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_COLORLISTENER_HXX
74
75/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void dispose() override
virtual void setCollapsed(bool _bCollapsed)
collapse or expand
Link< OColorListener &, void > m_aCollapsedLink
bool isCollapsed() const
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
void operator=(const OColorListener &)=delete
virtual ~OColorListener() override
void setMarked(bool _bMark)
set the marker as marked or not marked
svtools::ExtendedColorConfig m_aExtendedColorConfig
bool isMarked() const
returns if the section is marked
virtual void Notify(SfxBroadcaster &rBc, SfxHint const &rHint) override
OColorListener(const OColorListener &)=delete
virtual void ImplInitSettings()=0
void setCollapsedHdl(const Link< OColorListener &, void > &_aLink)
svtools::ColorConfig m_aColorConfig