2000-06-12 11:55:12 +00:00
|
|
|
// -*- C++ -*-
|
2002-03-11 17:00:41 +00:00
|
|
|
/**
|
|
|
|
* \file FormPreferences.h
|
|
|
|
* Copyright 1995-2002 the LyX Team
|
|
|
|
* Copyright 1999-2001 Allan Rae
|
|
|
|
* Read the file COPYING
|
2000-06-12 11:55:12 +00:00
|
|
|
*
|
2002-03-11 17:00:41 +00:00
|
|
|
* \author Allan Rae, rae@lyx.org
|
|
|
|
* \author Angus Leeming, a.leeming@ic.ac.uk
|
2000-06-12 11:55:12 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FORMPREFERENCES_H
|
|
|
|
#define FORMPREFERENCES_H
|
|
|
|
|
2002-04-23 08:16:27 +00:00
|
|
|
#ifdef __GNUG__
|
2000-07-27 10:26:38 +00:00
|
|
|
#pragma interface
|
2000-06-12 11:55:12 +00:00
|
|
|
#endif
|
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
#include "FormBaseDeprecated.h"
|
2000-11-21 15:46:13 +00:00
|
|
|
#include "Color.h" // NamedColor
|
2001-03-15 13:37:04 +00:00
|
|
|
#include "xforms_helpers.h" // XformColor
|
2000-11-21 15:46:13 +00:00
|
|
|
|
2002-05-22 01:16:37 +00:00
|
|
|
#include <boost/scoped_ptr.hpp>
|
|
|
|
|
2002-06-13 13:43:51 +00:00
|
|
|
#include FORMS_H_LOCATION
|
2002-05-22 01:16:37 +00:00
|
|
|
#include <utility> // pair
|
|
|
|
|
2000-11-09 15:28:42 +00:00
|
|
|
class Combox;
|
2000-06-12 11:55:12 +00:00
|
|
|
class Dialogs;
|
2000-11-09 15:28:42 +00:00
|
|
|
class LyXView;
|
2000-11-15 18:02:45 +00:00
|
|
|
class RGBColor;
|
2002-06-13 13:43:51 +00:00
|
|
|
struct FD_preferences;
|
|
|
|
struct FD_preferences_colors;
|
|
|
|
struct FD_preferences_converters;
|
|
|
|
struct FD_preferences_formats;
|
|
|
|
struct FD_preferences_inputs_misc;
|
|
|
|
struct FD_preferences_interface;
|
|
|
|
struct FD_preferences_language;
|
|
|
|
struct FD_preferences_lnf_misc;
|
|
|
|
struct FD_preferences_inner_tab;
|
|
|
|
struct FD_preferences_outputs_misc;
|
|
|
|
struct FD_preferences_paths;
|
|
|
|
struct FD_preferences_printer;
|
|
|
|
struct FD_preferences_screen_fonts;
|
|
|
|
struct FD_preferences_spelloptions;
|
2000-06-12 11:55:12 +00:00
|
|
|
|
2000-11-13 10:35:02 +00:00
|
|
|
|
2000-06-12 11:55:12 +00:00
|
|
|
/** This class provides an XForms implementation of the FormPreferences Dialog.
|
|
|
|
The preferences dialog allows users to set/save their preferences.
|
|
|
|
*/
|
2000-10-13 05:57:05 +00:00
|
|
|
class FormPreferences : public FormBaseBI {
|
2000-06-12 11:55:12 +00:00
|
|
|
public:
|
2002-06-18 15:44:30 +00:00
|
|
|
friend void gui_ShowPreferences(LyXView &, Dialogs &);
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
FormPreferences(LyXView &, Dialogs &);
|
2000-10-30 21:53:29 +00:00
|
|
|
|
2000-11-08 09:39:46 +00:00
|
|
|
private:
|
2001-03-15 13:37:04 +00:00
|
|
|
/// Pointer to the actual instantiation of the ButtonController.
|
|
|
|
virtual xformsBC & bc();
|
2000-11-10 17:29:47 +00:00
|
|
|
/** Redraw the form (on receipt of a Signal indicating, for example,
|
2001-03-05 19:02:40 +00:00
|
|
|
that the xforms colours have been re-mapped). */
|
2000-11-10 17:29:47 +00:00
|
|
|
virtual void redraw();
|
2000-06-12 11:55:12 +00:00
|
|
|
/// Update the dialog.
|
2000-10-24 13:13:59 +00:00
|
|
|
virtual void update();
|
2000-11-15 18:02:45 +00:00
|
|
|
/// Hide the dialog.
|
2000-10-10 04:12:56 +00:00
|
|
|
virtual void hide();
|
2000-11-15 18:02:45 +00:00
|
|
|
/// OK (Save) from dialog
|
2000-10-02 00:10:25 +00:00
|
|
|
virtual void ok();
|
2000-06-12 11:55:12 +00:00
|
|
|
/// Apply from dialog
|
2000-10-02 00:10:25 +00:00
|
|
|
virtual void apply();
|
2000-08-14 05:24:35 +00:00
|
|
|
/// Filter the inputs -- return true if entries are valid
|
2000-10-05 07:57:00 +00:00
|
|
|
virtual bool input(FL_OBJECT *, long);
|
2000-06-12 11:55:12 +00:00
|
|
|
/// Build the dialog
|
2000-10-02 00:10:25 +00:00
|
|
|
virtual void build();
|
2001-03-05 19:02:40 +00:00
|
|
|
/// Pointer to the actual instantiation of the xforms form.
|
2000-10-03 05:53:25 +00:00
|
|
|
virtual FL_FORM * form() const;
|
2002-03-21 21:21:28 +00:00
|
|
|
/// control which feedback message is output
|
|
|
|
string const getFeedback(FL_OBJECT *);
|
2002-03-11 09:54:42 +00:00
|
|
|
///
|
2002-02-16 15:59:55 +00:00
|
|
|
void browse(FL_OBJECT * input,
|
2002-03-21 21:21:28 +00:00
|
|
|
string const & title, string const & pattern,
|
|
|
|
std::pair<string,string> const & dir1= std::make_pair(string(),string()),
|
2002-03-21 16:59:12 +00:00
|
|
|
std::pair<string,string> const & dir2 = std::make_pair(string(),string()));
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2000-06-12 11:55:12 +00:00
|
|
|
/// Real GUI implementation.
|
2002-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_preferences> dialog_;
|
2000-11-15 03:22:08 +00:00
|
|
|
/// Converters tabfolder
|
2002-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_preferences_inner_tab> converters_tab_;
|
2000-10-03 05:53:25 +00:00
|
|
|
/// reLyX and other import/input stuff
|
2002-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_preferences_inner_tab> inputs_tab_;
|
2000-11-03 17:05:42 +00:00
|
|
|
/// HCI configuration
|
2002-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_preferences_inner_tab> look_n_feel_tab_;
|
2000-11-03 17:05:42 +00:00
|
|
|
/// Outputs tabfolder
|
2002-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_preferences_inner_tab> outputs_tab_;
|
2000-10-27 10:04:51 +00:00
|
|
|
/// Spellchecker, language stuff, etc
|
2002-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_preferences_inner_tab> lang_opts_tab_;
|
2000-11-14 13:46:01 +00:00
|
|
|
|
|
|
|
/** Each tab folder is encapsulated in its own class.
|
|
|
|
*/
|
|
|
|
|
|
|
|
class Colors {
|
|
|
|
public:
|
2000-11-29 15:06:42 +00:00
|
|
|
///
|
|
|
|
enum GuiColors {
|
2002-03-11 09:54:42 +00:00
|
|
|
GUI_COLOR_CHOICE = FL_FREE_COL14,
|
|
|
|
GUI_COLOR_HUE_DIAL = FL_FREE_COL15,
|
|
|
|
GUI_COLOR_CURSOR = FL_FREE_COL16
|
2000-11-29 15:06:42 +00:00
|
|
|
};
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2002-02-16 15:59:55 +00:00
|
|
|
Colors(FormPreferences & p);
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
FD_preferences_colors const * dialog();
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2001-03-05 19:02:40 +00:00
|
|
|
void apply(); // not const as modifies modifiedXformsPrefs.
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
void build();
|
|
|
|
///
|
|
|
|
string const feedback(FL_OBJECT const * const) const;
|
|
|
|
///
|
2000-11-21 21:51:25 +00:00
|
|
|
void input(FL_OBJECT const * const);
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2000-11-21 15:46:13 +00:00
|
|
|
void update() { LoadBrowserLyX(); }
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2000-11-14 13:46:01 +00:00
|
|
|
/// Flag whether Xforms colors have changed since last file save
|
2001-03-05 19:02:40 +00:00
|
|
|
bool modifiedXformsPrefs;
|
2000-11-14 13:46:01 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
2002-02-16 15:59:55 +00:00
|
|
|
void AdjustVal(int, int, double) const;
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2000-11-21 21:51:25 +00:00
|
|
|
void InputBrowserLyX() const;
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2000-11-21 15:46:13 +00:00
|
|
|
void InputHSV();
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2000-12-04 14:10:44 +00:00
|
|
|
void InputRGB();
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2000-12-04 14:10:44 +00:00
|
|
|
void LoadBrowserLyX();
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2000-11-21 21:51:25 +00:00
|
|
|
void Modify();
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2000-12-04 14:10:44 +00:00
|
|
|
void SwitchColorSpace() const;
|
2000-11-21 15:46:13 +00:00
|
|
|
///
|
2000-12-04 14:10:44 +00:00
|
|
|
string const X11hexname(RGBColor const &) const;
|
2000-11-14 13:46:01 +00:00
|
|
|
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_preferences_colors> dialog_;
|
2000-11-21 15:46:13 +00:00
|
|
|
|
|
|
|
/// A vector of LyX LColor GUI name and associated RGB color.
|
|
|
|
std::vector<NamedColor> lyxColorDB;
|
2001-03-05 19:02:40 +00:00
|
|
|
/// A vector of xforms color ID, RGB colors and associated name.
|
|
|
|
std::vector<XformsColor> xformsColorDB;
|
2000-11-14 13:46:01 +00:00
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class Colors;
|
|
|
|
|
2000-10-03 05:53:25 +00:00
|
|
|
///
|
2000-11-14 13:46:01 +00:00
|
|
|
class Converters {
|
|
|
|
public:
|
|
|
|
///
|
2002-02-16 15:59:55 +00:00
|
|
|
Converters(FormPreferences & p);
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
FD_preferences_converters const * dialog();
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
void apply() const;
|
|
|
|
///
|
|
|
|
void build();
|
|
|
|
///
|
|
|
|
string const feedback(FL_OBJECT const * const) const;
|
|
|
|
///
|
2002-02-16 15:59:55 +00:00
|
|
|
bool input(FL_OBJECT const * const);
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
void update();
|
|
|
|
///
|
|
|
|
void UpdateBrowser();
|
|
|
|
///
|
|
|
|
void UpdateChoices() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
bool Add();
|
|
|
|
///
|
|
|
|
bool Browser();
|
|
|
|
///
|
2001-07-30 11:56:00 +00:00
|
|
|
bool erase();
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
bool Input();
|
|
|
|
///
|
|
|
|
string const GetFrom() const;
|
|
|
|
///
|
|
|
|
string const GetTo() const;
|
|
|
|
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_preferences_converters> dialog_;
|
2000-11-14 13:46:01 +00:00
|
|
|
};
|
2000-10-25 10:19:25 +00:00
|
|
|
///
|
2000-11-14 13:46:01 +00:00
|
|
|
friend class Converters;
|
|
|
|
|
2000-11-04 10:00:12 +00:00
|
|
|
///
|
2000-11-14 13:46:01 +00:00
|
|
|
class Formats {
|
|
|
|
public:
|
|
|
|
///
|
2002-02-16 15:59:55 +00:00
|
|
|
Formats(FormPreferences & p);
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
FD_preferences_formats const * dialog();
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
void apply() const;
|
|
|
|
///
|
|
|
|
void build();
|
|
|
|
///
|
|
|
|
string const feedback(FL_OBJECT const * const) const;
|
|
|
|
///
|
2002-02-16 15:59:55 +00:00
|
|
|
bool input(FL_OBJECT const * const);
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
void update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
bool Add();
|
|
|
|
///
|
|
|
|
bool Browser();
|
|
|
|
///
|
|
|
|
void UpdateBrowser();
|
|
|
|
///
|
2001-07-30 11:56:00 +00:00
|
|
|
bool erase();
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
bool Input();
|
|
|
|
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_preferences_formats> dialog_;
|
2000-11-14 13:46:01 +00:00
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class Formats;
|
|
|
|
|
|
|
|
///
|
|
|
|
class InputsMisc {
|
|
|
|
public:
|
|
|
|
///
|
2002-02-16 15:59:55 +00:00
|
|
|
InputsMisc(FormPreferences & p);
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
FD_preferences_inputs_misc const * dialog();
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
void apply() const;
|
|
|
|
///
|
|
|
|
void build();
|
|
|
|
///
|
|
|
|
string const feedback(FL_OBJECT const * const) const;
|
|
|
|
///
|
|
|
|
void update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_preferences_inputs_misc> dialog_;
|
2000-11-14 13:46:01 +00:00
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class InputsMisc;
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
class Interface {
|
|
|
|
public:
|
|
|
|
///
|
2002-02-16 15:59:55 +00:00
|
|
|
Interface(FormPreferences & p);
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
FD_preferences_interface const * dialog();
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
void apply() const;
|
|
|
|
///
|
|
|
|
void build();
|
|
|
|
///
|
|
|
|
string const feedback(FL_OBJECT const * const) const;
|
|
|
|
///
|
2002-02-16 15:59:55 +00:00
|
|
|
bool input(FL_OBJECT const * const);
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
void update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_preferences_interface> dialog_;
|
2000-11-14 13:46:01 +00:00
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class Interface;
|
|
|
|
|
|
|
|
///
|
|
|
|
class Language {
|
|
|
|
public:
|
|
|
|
///
|
2002-02-16 15:59:55 +00:00
|
|
|
Language(FormPreferences & p);
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
FD_preferences_language const * dialog();
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
void apply(); // not const because calls update()
|
|
|
|
///
|
|
|
|
void build();
|
|
|
|
///
|
|
|
|
string const feedback(FL_OBJECT const * const) const;
|
|
|
|
///
|
2002-02-16 15:59:55 +00:00
|
|
|
bool input(FL_OBJECT const * const);
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
void update();
|
|
|
|
///
|
|
|
|
static void ComboCB(int, void *, Combox *);
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_preferences_language> dialog_;
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
boost::scoped_ptr<Combox> combo_default_lang;
|
2002-04-29 16:16:35 +00:00
|
|
|
///
|
|
|
|
std::vector<string> lang_;
|
2000-11-14 13:46:01 +00:00
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class Language;
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
class LnFmisc {
|
|
|
|
public:
|
|
|
|
///
|
2002-02-16 15:59:55 +00:00
|
|
|
LnFmisc(FormPreferences & p);
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
FD_preferences_lnf_misc const * dialog();
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
void apply() const;
|
|
|
|
///
|
|
|
|
void build();
|
|
|
|
///
|
|
|
|
string const feedback(FL_OBJECT const * const) const;
|
|
|
|
///
|
|
|
|
void update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_preferences_lnf_misc> dialog_;
|
2000-11-14 13:46:01 +00:00
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class LnFmisc;
|
|
|
|
|
|
|
|
///
|
|
|
|
class OutputsMisc {
|
|
|
|
public:
|
|
|
|
///
|
2002-02-16 15:59:55 +00:00
|
|
|
OutputsMisc(FormPreferences & p);
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
FD_preferences_outputs_misc const * dialog();
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
void apply() const;
|
|
|
|
///
|
|
|
|
void build();
|
|
|
|
///
|
|
|
|
string const feedback(FL_OBJECT const * const) const;
|
|
|
|
///
|
|
|
|
void update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_preferences_outputs_misc> dialog_;
|
2000-11-14 13:46:01 +00:00
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class OutputsMisc;
|
|
|
|
|
2000-11-03 09:47:02 +00:00
|
|
|
///
|
2000-11-14 13:46:01 +00:00
|
|
|
class Paths {
|
|
|
|
public:
|
|
|
|
///
|
2002-02-16 15:59:55 +00:00
|
|
|
Paths(FormPreferences & p);
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
FD_preferences_paths const * dialog();
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
void apply();
|
|
|
|
///
|
|
|
|
void build();
|
|
|
|
///
|
|
|
|
string const feedback(FL_OBJECT const * const) const;
|
|
|
|
///
|
|
|
|
bool input(FL_OBJECT const * const);
|
|
|
|
///
|
|
|
|
void update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_preferences_paths> dialog_;
|
2000-11-14 13:46:01 +00:00
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class Paths;
|
|
|
|
|
2000-10-30 11:33:05 +00:00
|
|
|
///
|
2000-11-14 13:46:01 +00:00
|
|
|
class Printer {
|
|
|
|
public:
|
|
|
|
///
|
2002-02-16 15:59:55 +00:00
|
|
|
Printer(FormPreferences & p);
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
FD_preferences_printer const * dialog();
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
void apply() const;
|
|
|
|
///
|
|
|
|
void build();
|
|
|
|
///
|
|
|
|
string const feedback(FL_OBJECT const * const) const;
|
|
|
|
///
|
|
|
|
void update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_preferences_printer> dialog_;
|
2000-11-14 13:46:01 +00:00
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class Printer;
|
|
|
|
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2000-11-14 13:46:01 +00:00
|
|
|
class ScreenFonts {
|
|
|
|
public:
|
|
|
|
///
|
2002-02-16 15:59:55 +00:00
|
|
|
ScreenFonts(FormPreferences & p);
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
FD_preferences_screen_fonts const * dialog();
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
void apply() const;
|
|
|
|
///
|
|
|
|
void build();
|
|
|
|
///
|
|
|
|
string const feedback(FL_OBJECT const * const) const;
|
|
|
|
///
|
|
|
|
bool input();
|
|
|
|
///
|
|
|
|
void update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_preferences_screen_fonts> dialog_;
|
2000-11-14 13:46:01 +00:00
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class ScreenFonts;
|
|
|
|
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2001-07-13 11:50:39 +00:00
|
|
|
class SpellOptions {
|
2000-11-14 13:46:01 +00:00
|
|
|
public:
|
|
|
|
///
|
2002-02-16 15:59:55 +00:00
|
|
|
SpellOptions(FormPreferences & p);
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
FD_preferences_spelloptions const * dialog();
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
void apply(); // not const because calls update()!
|
|
|
|
///
|
|
|
|
void build();
|
|
|
|
///
|
|
|
|
string const feedback(FL_OBJECT const * const) const;
|
|
|
|
///
|
|
|
|
bool input(FL_OBJECT const * const);
|
|
|
|
///
|
|
|
|
void update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_preferences_spelloptions> dialog_;
|
2000-11-14 13:46:01 +00:00
|
|
|
};
|
|
|
|
///
|
2001-07-13 11:50:39 +00:00
|
|
|
friend class SpellOptions;
|
2000-11-14 13:46:01 +00:00
|
|
|
|
|
|
|
/** The tab folders.
|
|
|
|
*/
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2000-11-14 13:46:01 +00:00
|
|
|
Colors colors_;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2000-11-14 13:46:01 +00:00
|
|
|
Converters converters_;
|
2000-10-11 07:59:25 +00:00
|
|
|
///
|
2000-11-14 13:46:01 +00:00
|
|
|
InputsMisc inputs_misc_;
|
2000-10-27 10:04:51 +00:00
|
|
|
///
|
2000-11-15 03:22:08 +00:00
|
|
|
Formats formats_;
|
|
|
|
///
|
2000-11-14 13:46:01 +00:00
|
|
|
Interface interface_;
|
2000-10-30 21:53:29 +00:00
|
|
|
///
|
2000-11-14 13:46:01 +00:00
|
|
|
Language language_;
|
2000-10-30 21:53:29 +00:00
|
|
|
///
|
2000-11-14 13:46:01 +00:00
|
|
|
LnFmisc lnf_misc_;
|
2000-10-30 21:53:29 +00:00
|
|
|
///
|
2000-11-14 13:46:01 +00:00
|
|
|
OutputsMisc outputs_misc_;
|
|
|
|
///
|
|
|
|
Paths paths_;
|
|
|
|
///
|
|
|
|
Printer printer_;
|
|
|
|
///
|
|
|
|
ScreenFonts screen_fonts_;
|
|
|
|
///
|
2001-07-13 11:50:39 +00:00
|
|
|
SpellOptions spelloptions_;
|
2000-11-21 15:46:13 +00:00
|
|
|
|
|
|
|
/** A couple of helper structs to enable colors to be sorted by name
|
|
|
|
and by color */
|
|
|
|
///
|
|
|
|
struct SortColorsByName {
|
|
|
|
///
|
|
|
|
int operator()(NamedColor const & a, NamedColor const & b) const
|
|
|
|
{ return (a.getname() < b.getname()); }
|
|
|
|
};
|
|
|
|
///
|
|
|
|
struct SortColorsByColor {
|
|
|
|
///
|
|
|
|
SortColorsByColor(RGBColor c) : col(c) {}
|
|
|
|
///
|
|
|
|
int operator()(RGBColor const &, RGBColor const &) const;
|
|
|
|
///
|
|
|
|
RGBColor col;
|
|
|
|
};
|
2001-03-15 13:37:04 +00:00
|
|
|
/// The ButtonController
|
|
|
|
ButtonController<PreferencesPolicy, xformsBC> bc_;
|
2000-06-12 11:55:12 +00:00
|
|
|
};
|
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
|
|
|
|
inline
|
|
|
|
xformsBC & FormPreferences::bc()
|
|
|
|
{
|
|
|
|
return bc_;
|
|
|
|
}
|
|
|
|
|
2000-06-12 11:55:12 +00:00
|
|
|
#endif
|