]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlButtons.C
The reference dialog now disconnects from the inset on Apply. Its behaviour
[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 #include "lyxrc.h"
24
25 ControlButtons::ControlButtons()
26         : is_closing_(false)
27 {}
28
29
30 void ControlButtons::ApplyButton()
31 {
32         apply();
33         bc().apply();
34 }
35
36
37 void ControlButtons::OKButton()
38 {
39         is_closing_ = true;
40         apply();
41         is_closing_ = false;
42         hide();
43         bc().ok();
44 }
45
46
47 void ControlButtons::CancelButton()
48 {
49         hide();
50         bc().cancel();
51 }
52
53
54 void ControlButtons::RestoreButton()
55 {
56         update();
57         bc().restore();
58 }
59
60
61 bool ControlButtons::IconifyWithMain() const
62 {
63         return lyxrc.dialogs_iconify_with_main;
64 }