LibreOffice Module sd (master) 1
WindowUpdater.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
20#pragma once
21
22#include <svl/ctloptions.hxx>
23#include <vcl/vclptr.hxx>
24
25#include <vector>
26
27namespace vcl
28{
29class Window;
30}
31class OutputDevice;
32class SdDrawDocument;
33
34namespace sd
35{
52{
53public:
54 explicit WindowUpdater();
55 virtual ~WindowUpdater() noexcept override;
56
63 void RegisterWindow(vcl::Window* pWindow);
64
71 void UnregisterWindow(vcl::Window* pWindow);
72
79 void SetDocument(SdDrawDocument* pDocument);
80
87 static void Update(OutputDevice* pDevice);
88
93 ConfigurationHints nHint) override;
94
95private:
98
101
102 WindowUpdater(const WindowUpdater& rUpdater) = delete;
103
104 WindowUpdater operator=(const WindowUpdater& rUpdater) = delete;
105
109 typedef ::std::vector<VclPtr<vcl::Window>> tWindowList;
111
119 static void UpdateWindow(OutputDevice* pDevice);
120};
121
122} // end of namespace sd
123
124/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
The purpose of the <type>WindowUpdater</type> is to update output devices to take care of modified gl...
virtual ~WindowUpdater() noexcept override
tWindowList maWindowList
void SetDocument(SdDrawDocument *pDocument)
Set the document so that it is reformatted when one of the monitored values changes.
void RegisterWindow(vcl::Window *pWindow)
Add the given device to the list of devices which will be updated when one of the monitored values ch...
static void Update(OutputDevice *pDevice)
Update the given output device and update all text objects of the view shell if not told otherwise.
void UnregisterWindow(vcl::Window *pWindow)
Remove the given device from the list of devices which will be updated when one of the monitored valu...
static void UpdateWindow(OutputDevice *pDevice)
The central method of this class.
WindowUpdater operator=(const WindowUpdater &rUpdater)=delete
SvtCTLOptions maCTLOptions
Options to monitor for changes.
WindowUpdater(const WindowUpdater &rUpdater)=delete
virtual void ConfigurationChanged(utl::ConfigurationBroadcaster *, ConfigurationHints nHint) override
Callback that waits for notifications of a <type>SvtCTLOptions</type> object.
SdDrawDocument * mpDocument
The document rendered in the output devices.
::std::vector< VclPtr< vcl::Window > > tWindowList
Type and data member for a list of devices that have to be kept up-to-date.
ConfigurationHints