Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sw / source / core / inc / ptqueue.hxx
bloba5e40f2e3f774a367603b913ddb334a275ebf84f
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_SW_SOURCE_CORE_INC_PTQUEUE_HXX
20 #define INCLUDED_SW_SOURCE_CORE_INC_PTQUEUE_HXX
22 /**
23 * Unfortunately we have some problems with processing more than one Paint()
24 * at a time. This happens especially often during printing.
26 * SwRootFrame::PaintSwFrame() determines that it's called a second time and adds the
27 * rectangle and the corresponding Shell to the PaintCollector.
28 * The call sites that are causing the double Paint() only need to process the
29 * collected Paint()s at the right point in time.
30 * Doing this during printing (after having printed one page) is very suitable
31 * for doing that.
33 * Invalidating windows directly from the RootFrame::PaintSwFrame was not a successful
34 * approach, because the Paint()s arrive at a very unfavourable point in time.
35 * Triggering an update for all windows after printing each page does not seem
36 * appropriate either: on the one hand we don't have direct access to the edit
37 * windows and on the other hand the updates can become very costly on some
38 * platforms.
41 class SwQueuedPaint;
42 class SwViewShell;
43 class SwRect;
45 class SwPaintQueue
47 public:
48 static SwQueuedPaint* s_pPaintQueue;
50 static void Add(SwViewShell* pSh, const SwRect& rNew);
51 static void Remove(SwViewShell const* pSh);
52 static void Repaint();
55 #endif
57 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */