2000-06-12 11:55:12 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
|
|
|
* Copyright 1995 Matthias Ettrich
|
|
|
|
* Copyright 1995-2000 The LyX Team.
|
|
|
|
*
|
|
|
|
* This file copyright 1999-2000
|
|
|
|
* Allan Rae
|
|
|
|
*======================================================*/
|
|
|
|
/* FormPreferences.h
|
|
|
|
* FormPreferences Interface Class
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FORMPREFERENCES_H
|
|
|
|
#define FORMPREFERENCES_H
|
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
#include <utility> // pair
|
|
|
|
#include <boost/smart_ptr.hpp>
|
|
|
|
|
2000-07-27 10:26:38 +00:00
|
|
|
#ifdef __GNUG_
|
|
|
|
#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
|
|
|
|
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;
|
2000-11-10 17:29:47 +00:00
|
|
|
struct FD_form_colors;
|
2000-11-03 17:05:42 +00:00
|
|
|
struct FD_form_converters;
|
2000-11-03 09:47:02 +00:00
|
|
|
struct FD_form_formats;
|
|
|
|
struct FD_form_inputs_misc;
|
2000-10-11 07:59:25 +00:00
|
|
|
struct FD_form_interface;
|
2000-11-03 09:47:02 +00:00
|
|
|
struct FD_form_language;
|
|
|
|
struct FD_form_lnf_misc;
|
2000-10-03 05:53:25 +00:00
|
|
|
struct FD_form_outer_tab;
|
2000-10-27 10:04:51 +00:00
|
|
|
struct FD_form_outputs_misc;
|
2000-11-03 09:47:02 +00:00
|
|
|
struct FD_form_paths;
|
|
|
|
struct FD_form_preferences;
|
|
|
|
struct FD_form_printer;
|
|
|
|
struct FD_form_screen_fonts;
|
2000-10-25 10:19:25 +00:00
|
|
|
struct FD_form_spellchecker;
|
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:
|
|
|
|
/// #FormPreferences x(LyXFunc ..., Dialogs ...);#
|
|
|
|
FormPreferences(LyXView *, Dialogs *);
|
|
|
|
///
|
2000-11-09 15:28:42 +00:00
|
|
|
static int FeedbackCB(FL_OBJECT *, int,
|
|
|
|
FL_Coord, FL_Coord, int, void *);
|
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-21 21:51:25 +00:00
|
|
|
/// Connect signals etc. Set form's max size.
|
|
|
|
virtual void connect();
|
|
|
|
/// Disconnect signals. Also perform any necessary housekeeping.
|
|
|
|
virtual void disconnect();
|
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;
|
2000-11-15 18:02:45 +00:00
|
|
|
/// control which feedback message is output
|
|
|
|
void feedback(FL_OBJECT *);
|
2000-11-03 17:05:42 +00:00
|
|
|
|
2000-11-15 18:02:45 +00:00
|
|
|
/// Set the preemptive handler for each FL_OBJECT.
|
|
|
|
static void setPreHandler(FL_OBJECT *);
|
|
|
|
/// The preemptive handler for feedback messages.
|
|
|
|
void Feedback(FL_OBJECT *, int);
|
|
|
|
/// Print a warning message and set warning flag.
|
2000-11-14 13:46:01 +00:00
|
|
|
void printWarning( string const & );
|
2000-11-15 18:02:45 +00:00
|
|
|
/** Launch a file dialog and modify input if it returns a new file.
|
2001-03-05 19:02:40 +00:00
|
|
|
For an explanation of the various parameters, see xforms_helpers.h.
|
2000-11-03 17:05:42 +00:00
|
|
|
*/
|
2000-11-15 18:02:45 +00:00
|
|
|
void browse( FL_OBJECT * input,
|
|
|
|
string const & title, string const & pattern,
|
|
|
|
std::pair<string,string> const & dir1,
|
|
|
|
std::pair<string,string> const & dir2 );
|
2000-11-03 17:05:42 +00:00
|
|
|
|
2001-03-27 10:44:14 +00:00
|
|
|
/// Fdesign generated methods
|
2000-06-12 11:55:12 +00:00
|
|
|
FD_form_preferences * build_preferences();
|
|
|
|
///
|
2000-10-03 05:53:25 +00:00
|
|
|
FD_form_outer_tab * build_outer_tab();
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2000-11-10 17:29:47 +00:00
|
|
|
FD_form_colors * build_colors();
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2000-11-03 17:05:42 +00:00
|
|
|
FD_form_converters * build_converters();
|
|
|
|
///
|
2000-11-03 09:47:02 +00:00
|
|
|
FD_form_formats * build_formats();
|
|
|
|
///
|
2000-10-30 11:33:05 +00:00
|
|
|
FD_form_inputs_misc * build_inputs_misc();
|
|
|
|
///
|
2000-10-11 07:59:25 +00:00
|
|
|
FD_form_interface * build_interface();
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2000-10-27 10:04:51 +00:00
|
|
|
FD_form_language * build_language();
|
|
|
|
///
|
|
|
|
FD_form_lnf_misc * build_lnf_misc();
|
|
|
|
///
|
|
|
|
FD_form_outputs_misc * build_outputs_misc();
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
|
|
|
FD_form_paths * build_paths();
|
2000-10-11 07:59:25 +00:00
|
|
|
///
|
2000-10-27 10:04:51 +00:00
|
|
|
FD_form_printer * build_printer();
|
|
|
|
///
|
|
|
|
FD_form_screen_fonts * build_screen_fonts();
|
2000-10-25 10:19:25 +00:00
|
|
|
///
|
|
|
|
FD_form_spellchecker * build_spellchecker();
|
2000-06-12 11:55:12 +00:00
|
|
|
|
|
|
|
/// Real GUI implementation.
|
2001-03-15 13:37:04 +00:00
|
|
|
boost::scoped_ptr<FD_form_preferences> dialog_;
|
2000-11-15 03:22:08 +00:00
|
|
|
/// Converters tabfolder
|
2001-03-15 13:37:04 +00:00
|
|
|
boost::scoped_ptr<FD_form_outer_tab> converters_tab_;
|
2000-10-03 05:53:25 +00:00
|
|
|
/// reLyX and other import/input stuff
|
2001-03-15 13:37:04 +00:00
|
|
|
boost::scoped_ptr<FD_form_outer_tab> inputs_tab_;
|
2000-11-03 17:05:42 +00:00
|
|
|
/// HCI configuration
|
2001-03-15 13:37:04 +00:00
|
|
|
boost::scoped_ptr<FD_form_outer_tab> look_n_feel_tab_;
|
2000-11-03 17:05:42 +00:00
|
|
|
/// Outputs tabfolder
|
2001-03-15 13:37:04 +00:00
|
|
|
boost::scoped_ptr<FD_form_outer_tab> outputs_tab_;
|
2000-10-27 10:04:51 +00:00
|
|
|
/// Spellchecker, language stuff, etc
|
2001-03-15 13:37:04 +00:00
|
|
|
boost::scoped_ptr<FD_form_outer_tab> lang_opts_tab_;
|
2000-11-14 13:46:01 +00:00
|
|
|
|
2000-11-15 03:22:08 +00:00
|
|
|
/** Flag whether a warning has been posted to the text window.
|
|
|
|
If so, don't redraw the window when the mouse leaves an object. */
|
|
|
|
bool warningPosted;
|
|
|
|
|
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 {
|
|
|
|
GUI_COLOR_CHOICE = FL_FREE_COL1,
|
|
|
|
GUI_COLOR_HUE_DIAL = FL_FREE_COL2,
|
|
|
|
GUI_COLOR_CURSOR = FL_FREE_COL3
|
|
|
|
};
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
Colors( FormPreferences & p );
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
FD_form_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(); }
|
|
|
|
|
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:
|
|
|
|
///
|
|
|
|
void AdjustVal( int, int, double ) const;
|
|
|
|
///
|
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_;
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
boost::scoped_ptr<FD_form_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:
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
Converters( FormPreferences & p );
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
FD_form_converters 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( FL_OBJECT const * const );
|
|
|
|
///
|
|
|
|
void update();
|
|
|
|
///
|
|
|
|
void UpdateBrowser();
|
|
|
|
///
|
|
|
|
void UpdateChoices() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
bool Add();
|
|
|
|
///
|
|
|
|
bool Browser();
|
|
|
|
///
|
|
|
|
bool Delete();
|
|
|
|
///
|
|
|
|
bool Input();
|
|
|
|
///
|
|
|
|
string const GetFrom() const;
|
|
|
|
///
|
|
|
|
string const GetTo() const;
|
|
|
|
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
boost::scoped_ptr<FD_form_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:
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
Formats( FormPreferences & p );
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
FD_form_formats 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( FL_OBJECT const * const );
|
|
|
|
///
|
|
|
|
void update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
bool Add();
|
|
|
|
///
|
|
|
|
bool Browser();
|
|
|
|
///
|
|
|
|
void UpdateBrowser();
|
|
|
|
///
|
|
|
|
bool Delete();
|
|
|
|
///
|
|
|
|
bool Input();
|
|
|
|
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
boost::scoped_ptr<FD_form_formats> dialog_;
|
2000-11-14 13:46:01 +00:00
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class Formats;
|
|
|
|
|
|
|
|
///
|
|
|
|
class InputsMisc {
|
|
|
|
public:
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
InputsMisc( FormPreferences & p );
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
FD_form_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_;
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
boost::scoped_ptr<FD_form_inputs_misc> dialog_;
|
2000-11-14 13:46:01 +00:00
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class InputsMisc;
|
|
|
|
|
|
|
|
///
|
|
|
|
class Interface {
|
|
|
|
public:
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
Interface( FormPreferences & p );
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
FD_form_interface 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( FL_OBJECT const * const );
|
|
|
|
///
|
|
|
|
void update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
boost::scoped_ptr<FD_form_interface> dialog_;
|
2000-11-14 13:46:01 +00:00
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class Interface;
|
|
|
|
|
|
|
|
///
|
|
|
|
class Language {
|
|
|
|
public:
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
Language( FormPreferences & p );
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
FD_form_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;
|
|
|
|
///
|
|
|
|
bool input( FL_OBJECT const * const );
|
|
|
|
///
|
|
|
|
void update();
|
|
|
|
///
|
|
|
|
static void ComboCB(int, void *, Combox *);
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
boost::scoped_ptr<FD_form_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;
|
2000-11-14 13:46:01 +00:00
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class Language;
|
|
|
|
|
|
|
|
///
|
|
|
|
class LnFmisc {
|
|
|
|
public:
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
LnFmisc( FormPreferences & p );
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
FD_form_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_;
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
boost::scoped_ptr<FD_form_lnf_misc> dialog_;
|
2000-11-14 13:46:01 +00:00
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class LnFmisc;
|
|
|
|
|
|
|
|
///
|
|
|
|
class OutputsMisc {
|
|
|
|
public:
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
OutputsMisc( FormPreferences & p );
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
FD_form_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_;
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
boost::scoped_ptr<FD_form_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:
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
Paths( FormPreferences & p );
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
FD_form_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_;
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
boost::scoped_ptr<FD_form_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:
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
Printer( FormPreferences & p );
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
FD_form_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_;
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
boost::scoped_ptr<FD_form_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:
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
ScreenFonts( FormPreferences & p );
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
FD_form_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_;
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
boost::scoped_ptr<FD_form_screen_fonts> dialog_;
|
2000-11-14 13:46:01 +00:00
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class ScreenFonts;
|
|
|
|
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2000-11-14 13:46:01 +00:00
|
|
|
class SpellChecker {
|
|
|
|
public:
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SpellChecker( FormPreferences & p );
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
FD_form_spellchecker 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_;
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
boost::scoped_ptr<FD_form_spellchecker> dialog_;
|
2000-11-14 13:46:01 +00:00
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class SpellChecker;
|
|
|
|
|
|
|
|
/** The tab folders.
|
|
|
|
*/
|
|
|
|
|
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_;
|
|
|
|
///
|
|
|
|
SpellChecker spellchecker_;
|
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
|