libyui
 
Loading...
Searching...
No Matches
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
38public:
44 class OptimizeChanges
45 {
46 public:
47 OptimizeChanges( YWidget & w ) : yw(w) { yw.startMultipleChanges(); }
48 ~OptimizeChanges() { yw.doneMultipleChanges(); }
49
50 private:
51 OptimizeChanges( const OptimizeChanges & ); // no copy
52 void operator=( const OptimizeChanges & ); // no assign
53 YWidget & yw;
54 };
55
56// }; // class YWidget
57
58
59#endif // YWidget_OptimizeChanges_h
Definition YWidget.h:55