2002-11-13 02:22:48 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file ControlPrefs.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author John Levon
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-11-13 02:22:48 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONTROLPREFS_H
|
|
|
|
#define CONTROLPREFS_H
|
|
|
|
|
2004-03-31 18:51:11 +00:00
|
|
|
#include "Dialog.h"
|
2004-03-31 16:50:59 +00:00
|
|
|
#include "converter.h"
|
|
|
|
#include "format.h"
|
2002-11-13 02:22:48 +00:00
|
|
|
#include "lyxrc.h"
|
|
|
|
|
2004-03-31 16:50:59 +00:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2003-09-18 11:48:11 +00:00
|
|
|
class LColor_color;
|
2004-03-31 16:50:59 +00:00
|
|
|
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2004-03-31 18:51:11 +00:00
|
|
|
class ControlPrefs : public Dialog::Controller {
|
2002-11-13 02:22:48 +00:00
|
|
|
public:
|
2004-03-31 18:51:11 +00:00
|
|
|
ControlPrefs(Dialog &);
|
|
|
|
///
|
|
|
|
virtual bool initialiseParams(std::string const &);
|
|
|
|
///
|
|
|
|
virtual void clearParams() {}
|
|
|
|
///
|
|
|
|
virtual void dispatchParams();
|
|
|
|
///
|
|
|
|
virtual bool isBufferDependent() const { return false; }
|
2002-11-13 02:22:48 +00:00
|
|
|
|
2002-12-01 22:59:25 +00:00
|
|
|
LyXRC & rc() { return rc_; }
|
2002-11-13 02:22:48 +00:00
|
|
|
LyXRC const & rc() const { return rc_; }
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2004-03-31 16:50:59 +00:00
|
|
|
Converters & converters() { return converters_; }
|
|
|
|
Converters const & converters() const { return converters_; }
|
|
|
|
|
|
|
|
Formats & formats() { return formats_; }
|
|
|
|
Formats const & formats() const { return formats_; }
|
|
|
|
|
2002-11-15 02:41:54 +00:00
|
|
|
/// various file pickers
|
2004-01-08 10:59:51 +00:00
|
|
|
std::string const browsebind(std::string const & file) const;
|
|
|
|
std::string const browseUI(std::string const & file) const;
|
|
|
|
std::string const browsekbmap(std::string const & file) const;
|
|
|
|
std::string const browsedict(std::string const & file) const;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-11-15 02:41:54 +00:00
|
|
|
/// general browse
|
2004-01-08 10:59:51 +00:00
|
|
|
std::string const browse(std::string const & file,
|
|
|
|
std::string const & title) const;
|
2003-02-21 15:36:29 +00:00
|
|
|
|
2003-01-14 21:51:34 +00:00
|
|
|
/// browse directory
|
2004-01-08 10:59:51 +00:00
|
|
|
std::string const browsedir(std::string const & path,
|
|
|
|
std::string const & title) const;
|
2002-11-15 02:41:54 +00:00
|
|
|
|
|
|
|
/// redraw widgets (for xforms color change)
|
|
|
|
void redrawGUI();
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-11-15 02:41:54 +00:00
|
|
|
/// set a color
|
2003-10-06 15:43:21 +00:00
|
|
|
void setColor(LColor_color col, std::string const & hex);
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-11-15 02:41:54 +00:00
|
|
|
/// update the screen fonts after change
|
|
|
|
void updateScreenFonts();
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-11-13 02:22:48 +00:00
|
|
|
private:
|
|
|
|
/// temporary lyxrc
|
|
|
|
LyXRC rc_;
|
2004-03-31 16:50:59 +00:00
|
|
|
|
|
|
|
/// temporary converters
|
|
|
|
Converters converters_;
|
|
|
|
|
|
|
|
/// temporary formats
|
|
|
|
Formats formats_;
|
|
|
|
|
|
|
|
/// A list of colors to be dispatched
|
|
|
|
std::vector<std::string> colors_;
|
|
|
|
|
|
|
|
bool redraw_gui_;
|
|
|
|
bool update_screen_font_;
|
2002-11-13 02:22:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CONTROLPREFS_H
|