]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlButtons.C
Distinguish between "Apply" when the dialog should be refreshed afterwards
[lyx.git] / src / frontends / controllers / ControlButtons.C
1 /* This file is part of
2  * ====================================================== 
3  *
4  *           LyX, The Document Processor
5  *
6  *           Copyright 2001 The LyX Team.
7  *
8  * ======================================================
9  *
10  * \file ControlButtons.C
11  * \author Angus Leeming <a.leeming@ic.ac.uk>
12  */
13
14 #include <config.h>
15
16 #ifdef __GNUG__
17 #pragma implementation
18 #endif
19
20 #include "ControlButtons.h"
21 #include "ButtonControllerBase.h"
22 #include "ViewBase.h"
23
24 ControlButtons::ControlButtons()
25         : is_closing_(false)
26 {}
27
28
29 void ControlButtons::ApplyButton()
30 {
31         apply();
32         bc().apply();
33 }
34
35
36 void ControlButtons::OKButton()
37 {
38         is_closing_ = true;
39         apply();
40         is_closing_ = false;
41         hide();
42         bc().ok();
43 }
44
45
46 void ControlButtons::CancelButton()
47 {
48         hide();
49         bc().cancel();
50 }
51
52
53 void ControlButtons::RestoreButton()
54 {
55         update();
56         bc().restore();
57 }