libyui
3.10.0
YWidget_OptimizeChanges.h
1
/*
2
Copyright (C) 2000-2012 Novell, Inc
3
This library is free software; you can redistribute it and/or modify
4
it under the terms of the GNU Lesser General Public License as
5
published by the Free Software Foundation; either version 2.1 of the
6
License, or (at your option) version 3.0 of the License. This library
7
is distributed in the hope that it will be useful, but WITHOUT ANY
8
WARRANTY; without even the implied warranty of MERCHANTABILITY or
9
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10
License for more details. You should have received a copy of the GNU
11
Lesser General Public License along with this library; if not, write
12
to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13
Floor, Boston, MA 02110-1301 USA
14
*/
15
16
17
/*-/
18
19
File: YWidget_OptimizeChanges.h
20
21
Author: Michael Andres <ma@suse.de>
22
23
/-*/
24
25
#ifndef YWidget_OptimizeChanges_h
26
#define YWidget_OptimizeChanges_h
27
28
29
// Moved out of YWidget.h because it's really utterly out of place there.
30
31
#ifndef YWidget_h
32
#error Do not include this file from anywhere outside YWidget.h!
33
#endif
34
35
// class YWidget
36
// {
37
38
public
:
39
/**
40
* Helper class that calls startMultipleChanges() in its constructor
41
* and cares about the necessary call to doneMultipleChanges() when it goes
42
* out of scope.
43
**/
44
class
OptimizeChanges
45
{
46
public
:
47
OptimizeChanges
(
YWidget
& w ) : yw(w) { yw.
startMultipleChanges
(); }
48
~
OptimizeChanges
() { yw.doneMultipleChanges(); }
49
private
:
50
OptimizeChanges
(
const
OptimizeChanges
& );
// no copy
51
void
operator=(
const
OptimizeChanges
& );
// no assign
52
YWidget
& yw;
53
};
54
55
// }; // class YWidget
56
57
58
#endif
// YWidget_OptimizeChanges_h
OptimizeChanges
Helper class that calls startMultipleChanges() in its constructor and cares about the necessary call ...
Definition:
YWidget_OptimizeChanges.h:45
YWidget
Abstract base class of all UI widgets.
Definition:
YWidget.h:55
YWidget::startMultipleChanges
virtual void startMultipleChanges()
In some UIs updating the screen content is an expensive operation.
Definition:
YWidget.h:640
src
YWidget_OptimizeChanges.h
Generated by
1.9.1