LibreOffice Module reportdesign (master)  1
SectionWindow.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_SECTIONWINDOW_HXX
20 #define INCLUDED_REPORTDESIGN_SOURCE_UI_INC_SECTIONWINDOW_HXX
21 
22 #include <com/sun/star/report/XSection.hpp>
23 #include <vcl/window.hxx>
24 #include <vcl/split.hxx>
26 #include <cppuhelper/basemutex.hxx>
27 
28 #include <UndoActions.hxx>
29 #include "StartMarker.hxx"
30 #include "EndMarker.hxx"
31 #include "ReportSection.hxx"
32 
33 namespace comphelper
34 {
35  class OPropertyChangeMultiplexer;
36 }
37 namespace rptui
38 {
39  class OViewsWindow;
40  class OSectionWindow : public vcl::Window
41  , public ::cppu::BaseMutex
43  {
49 
52 
53  OSectionWindow(OSectionWindow const &) = delete;
54  void operator =(OSectionWindow const &) = delete;
55 
65  const css::uno::Reference<css::report::XGroup>& _xGroup, const char* pResId,
66  const ::std::function<css::uno::Reference<css::report::XSection>(OGroupHelper*)>&
67  _pGetSection,
68  const ::std::function<bool(OGroupHelper*)>& _pIsSectionOn);
69 
79  const css::uno::Reference<css::report::XReportDefinition>& _xReport, const char* pResId,
80  const ::std::function<css::uno::Reference<css::report::XSection>(OReportHelper*)>&
81  _pGetSection,
82  const ::std::function<bool(OReportHelper*)>& _pIsSectionOn);
83  void ImplInitSettings();
84 
85  DECL_LINK(Collapsed, OColorListener&, void);
86  DECL_LINK(StartSplitHdl, Splitter*, void);
87  DECL_LINK(SplitHdl, Splitter*, void);
88  DECL_LINK(EndSplitHdl, Splitter*, void);
89 
90 
91  virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
92  // Window overrides
93  virtual void Resize() override;
94 
95  protected:
96  virtual void _propertyChanged(const css::beans::PropertyChangeEvent& _rEvent) override;
97  public:
98  OSectionWindow( OViewsWindow* _pParent
99  ,const css::uno::Reference< css::report::XSection >& _xSection
100  ,const OUString& _sColorEntry);
101  virtual ~OSectionWindow() override;
102  virtual void dispose() override;
103 
108 
109  void setCollapsed(bool _bCollapsed);
110 
114  void showProperties();
115 
119  void setMarked(bool _bMark);
120 
123  void zoom(const Fraction& _aZoom);
124 
125  void scrollChildren(tools::Long _nThumbPosX);
126  };
127 
128 } // rptui
129 
130 #endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_SECTIONWINDOW_HXX
131 
132 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~OSectionWindow() override
Defines the right side of a graphical section.
Definition: EndMarker.hxx:29
void zoom(const Fraction &_aZoom)
zoom the ruler and view windows
virtual void dispose() override
long Long
OSectionWindow(OSectionWindow const &)=delete
DECL_LINK(Collapsed, OColorListener &, void)
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
Helper class to allow std::mem_fun for SAL_CALL.
Definition: UndoActions.hxx:70
void showProperties()
triggers the property browser with the section
void setCollapsed(bool _bCollapsed)
OEndMarker & getEndMarker()
OReportSection & getReportSection()
bool setGroupSectionTitle(const css::uno::Reference< css::report::XGroup > &_xGroup, const char *pResId, const ::std::function< css::uno::Reference< css::report::XSection >(OGroupHelper *)> &_pGetSection, const ::std::function< bool(OGroupHelper *)> &_pIsSectionOn)
set the title of the group header or footer
VclPtr< OReportSection > m_aReportSection
::rtl::Reference< comphelper::OPropertyChangeMultiplexer > m_pGroupMulti
virtual void _propertyChanged(const css::beans::PropertyChangeEvent &_rEvent) override
VclPtr< OViewsWindow > m_pParent
OViewsWindow * getViewsWindow()
VclPtr< OStartMarker > m_aStartMarker
bool setReportSectionTitle(const css::uno::Reference< css::report::XReportDefinition > &_xReport, const char *pResId, const ::std::function< css::uno::Reference< css::report::XSection >(OReportHelper *)> &_pGetSection, const ::std::function< bool(OReportHelper *)> &_pIsSectionOn)
set the title of the (report/page) header or footer
VclPtr< OEndMarker > m_aEndMarker
void operator=(OSectionWindow const &)=delete
::rtl::Reference< comphelper::OPropertyChangeMultiplexer > m_pSectionMulti
OStartMarker & getStartMarker()
VclPtr< Splitter > m_aSplitter
virtual void Resize() override
void setMarked(bool _bMark)
set the marker as marked or not marked
void scrollChildren(tools::Long _nThumbPosX)
Helper class to allow std::mem_fun for SAL_CALL.
Definition: UndoActions.hxx:47