]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlPrefs.h
fix
[lyx.git] / src / frontends / controllers / ControlPrefs.h
1 // -*- C++ -*-
2 /**
3  * \file ControlPrefs.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef CONTROLPREFS_H
13 #define CONTROLPREFS_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "ControlDialog_impl.h"
20 #include "LString.h"
21 #include "funcrequest.h"
22 #include "lyxrc.h"
23 #include "LColor.h"
24
25 #include <utility>
26  
27 class Converters;
28 class Formats;
29  
30 class ControlPrefs : public ControlDialogBI {
31 public:
32         ControlPrefs(LyXView &, Dialogs &);
33
34         // FIXME: we should probably devolve the individual
35         // settings to methods here. But for now, this will
36         // do
37  
38         LyXRC & rc() { return rc_; } 
39
40         LyXRC const & rc() const { return rc_; }
41  
42         /// make OK do the save
43         virtual void OKButton();
44  
45         /// various file pickers
46         string const browsebind(string const & file);
47         string const browseUI(string const & file);
48         string const browsekbmap(string const & file);
49         string const browsedict(string const & file);
50  
51         /// general browse
52         string const browse(string const & file, string const & title);
53
54         /// redraw widgets (for xforms color change)
55         void redrawGUI();
56  
57         /// set a color
58         void setColor(LColor::color col, string const & hex);
59  
60         /// update the screen fonts after change
61         void updateScreenFonts();
62  
63         /// set global converters
64         void setConverters(Converters const & conv);
65
66         /// set global formats
67         void setFormats(Formats const & form);
68
69 private:
70         /// get current lyxrc
71         virtual void setParams();
72  
73         /// apply current lyxrc
74         virtual void apply();
75  
76         /// temporary lyxrc
77         LyXRC rc_;
78 };
79
80 #endif // CONTROLPREFS_H