bump product version to 6.3.0.0.beta1
[LibreOffice.git] / reportdesign / source / ui / inc / SectionWindow.hxx
blob726e4d513c84209f112c7e1e04750d18db188776
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_REPORTDESIGN_SOURCE_UI_INC_SECTIONWINDOW_HXX
20 #define INCLUDED_REPORTDESIGN_SOURCE_UI_INC_SECTIONWINDOW_HXX
22 #include <com/sun/star/report/XSection.hpp>
23 #include <vcl/window.hxx>
24 #include <vcl/split.hxx>
25 #include <svtools/colorcfg.hxx>
26 #include <comphelper/propmultiplex.hxx>
27 #include <cppuhelper/basemutex.hxx>
29 #include "UITools.hxx"
30 #include <UndoActions.hxx>
31 #include "StartMarker.hxx"
32 #include "EndMarker.hxx"
33 #include "ReportSection.hxx"
35 #include <list>
36 #include <map>
38 namespace comphelper
40 class OPropertyChangeMultiplexer;
42 namespace rptui
44 class OViewsWindow;
45 class OSectionWindow : public vcl::Window
46 , public ::cppu::BaseMutex
47 , public ::comphelper::OPropertyChangeListener
49 VclPtr<OViewsWindow> m_pParent;
50 VclPtr<OStartMarker> m_aStartMarker;
51 VclPtr<OReportSection> m_aReportSection;
52 VclPtr<Splitter> m_aSplitter;
53 VclPtr<OEndMarker> m_aEndMarker;
55 ::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pSectionMulti;
56 ::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pGroupMulti;
58 OSectionWindow(OSectionWindow const &) = delete;
59 void operator =(OSectionWindow const &) = delete;
61 /** set the title of the group header or footer
63 * \param _xGroup
64 * \param _nResId
65 * \param _pGetSection
66 * \param _pIsSectionOn
67 * @return sal_True when title was set otherwise FALSE
69 bool setGroupSectionTitle(
70 const css::uno::Reference<css::report::XGroup>& _xGroup, const char* pResId,
71 const ::std::function<css::uno::Reference<css::report::XSection>(OGroupHelper*)>&
72 _pGetSection,
73 const ::std::function<bool(OGroupHelper*)>& _pIsSectionOn);
75 /** set the title of the (report/page) header or footer
77 * \param _xGroup
78 * \param _nResId
79 * \param _pGetSection
80 * \param _pIsSectionOn
81 * @return sal_True when title was set otherwise FALSE
83 bool setReportSectionTitle(
84 const css::uno::Reference<css::report::XReportDefinition>& _xReport, const char* pResId,
85 const ::std::function<css::uno::Reference<css::report::XSection>(OReportHelper*)>&
86 _pGetSection,
87 const ::std::function<bool(OReportHelper*)>& _pIsSectionOn);
88 void ImplInitSettings();
90 DECL_LINK(Collapsed, OColorListener&, void);
91 DECL_LINK(StartSplitHdl, Splitter*, void);
92 DECL_LINK(SplitHdl, Splitter*, void);
93 DECL_LINK(EndSplitHdl, Splitter*, void);
96 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
97 // Window overrides
98 virtual void Resize() override;
100 protected:
101 virtual void _propertyChanged(const css::beans::PropertyChangeEvent& _rEvent) override;
102 public:
103 OSectionWindow( OViewsWindow* _pParent
104 ,const css::uno::Reference< css::report::XSection >& _xSection
105 ,const OUString& _sColorEntry);
106 virtual ~OSectionWindow() override;
107 virtual void dispose() override;
109 OStartMarker& getStartMarker() { return *m_aStartMarker.get(); }
110 OReportSection& getReportSection() { return *m_aReportSection.get(); }
111 OEndMarker& getEndMarker() { return *m_aEndMarker.get(); }
112 OViewsWindow* getViewsWindow() { return m_pParent; }
114 void setCollapsed(bool _bCollapsed);
116 /** triggers the property browser with the section
117 @param _pStartMarker
119 void showProperties();
121 /** set the marker as marked or not marked
122 @param _bMark set the new state of the marker
124 void setMarked(bool _bMark);
126 /** zoom the ruler and view windows
128 void zoom(const Fraction& _aZoom);
130 void scrollChildren(long _nThumbPosX);
133 } // rptui
135 #endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_SECTIONWINDOW_HXX
137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */