]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlPrefs.h
Overhaul the branches code.
[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
16 #include "ControlDialog_impl.h"
17 #include "lyxrc.h"
18
19
20 class Converters;
21 class LColor_color;
22 class Formats;
23
24 class ControlPrefs : public ControlDialogBI {
25 public:
26         ControlPrefs(LyXView &, Dialogs &);
27
28         // FIXME: we should probably devolve the individual
29         // settings to methods here. But for now, this will
30         // do
31
32         LyXRC & rc() { return rc_; }
33
34         LyXRC const & rc() const { return rc_; }
35
36         /// various file pickers
37         std::string const browsebind(std::string const & file);
38         std::string const browseUI(std::string const & file);
39         std::string const browsekbmap(std::string const & file);
40         std::string const browsedict(std::string const & file);
41
42         /// general browse
43         std::string const browse(std::string const & file, std::string const & title);
44
45         /// browse directory
46         std::string const browsedir(std::string const & path, std::string const & title);
47
48         /// redraw widgets (for xforms color change)
49         void redrawGUI();
50
51         /// set a color
52         void setColor(LColor_color col, std::string const & hex);
53
54         /// update the screen fonts after change
55         void updateScreenFonts();
56
57         /// set global converters
58         void setConverters(Converters const & conv);
59
60         /// set global formats
61         void setFormats(Formats const & form);
62
63 private:
64         /// get current lyxrc
65         virtual void setParams();
66
67         /// apply current lyxrc
68         virtual void apply();
69
70         /// temporary lyxrc
71         LyXRC rc_;
72 };
73
74 #endif // CONTROLPREFS_H