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
|
|
|
|
|
2000-07-27 10:26:38 +00:00
|
|
|
#ifdef __GNUG_
|
|
|
|
#pragma interface
|
2000-06-12 11:55:12 +00:00
|
|
|
#endif
|
|
|
|
|
2000-11-21 15:46:13 +00:00
|
|
|
#include <utility> // pair
|
|
|
|
#include "FormBase.h"
|
|
|
|
#include "Color.h" // NamedColor
|
|
|
|
#include "xform_helpers.h" // XformColor
|
|
|
|
|
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 *);
|
|
|
|
///
|
|
|
|
~FormPreferences();
|
2000-10-30 21:53:29 +00:00
|
|
|
///
|
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:
|
2000-11-10 17:29:47 +00:00
|
|
|
/** Redraw the form (on receipt of a Signal indicating, for example,
|
|
|
|
that the xform colours have been re-mapped). */
|
|
|
|
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();
|
2000-11-15 18:02:45 +00:00
|
|
|
/// Pointer to the actual instantiation of xform's 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.
|
|
|
|
For an explanation of the various parameters, see xform_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
|
|
|
|
|
|
|
/// Type definitions from the fdesign produced header file.
|
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.
|
|
|
|
FD_form_preferences * dialog_;
|
2000-11-15 03:22:08 +00:00
|
|
|
/// Converters tabfolder
|
|
|
|
FD_form_outer_tab * converters_tab_;
|
2000-10-03 05:53:25 +00:00
|
|
|
/// reLyX and other import/input stuff
|
|
|
|
FD_form_outer_tab * inputs_tab_;
|
2000-11-03 17:05:42 +00:00
|
|
|
/// HCI configuration
|
|
|
|
FD_form_outer_tab * look_n_feel_tab_;
|
|
|
|
/// Outputs tabfolder
|
|
|
|
FD_form_outer_tab * outputs_tab_;
|
2000-10-27 10:04:51 +00:00
|
|
|
/// Spellchecker, language stuff, etc
|
|
|
|
FD_form_outer_tab * usage_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:
|
|
|
|
///
|
|
|
|
Colors( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
|
|
|
///
|
|
|
|
~Colors();
|
|
|
|
///
|
|
|
|
FD_form_colors const * dialog() { return dialog_; }
|
|
|
|
///
|
|
|
|
void apply(); // not const as modifies modifiedXformPrefs.
|
|
|
|
///
|
|
|
|
void build();
|
|
|
|
///
|
|
|
|
string const feedback(FL_OBJECT const * const) const;
|
|
|
|
///
|
|
|
|
bool input(FL_OBJECT const * const);
|
|
|
|
///
|
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
|
|
|
|
bool modifiedXformPrefs;
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
void AdjustVal( int, int, double ) const;
|
|
|
|
///
|
2000-11-21 15:46:13 +00:00
|
|
|
bool InputBrowserLyX() const;
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2000-11-21 15:46:13 +00:00
|
|
|
bool InputBrowserX11() 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
|
|
|
///
|
|
|
|
void LoadBrowserLyX();
|
|
|
|
///
|
2000-11-21 15:46:13 +00:00
|
|
|
bool LoadBrowserX11(string const &);
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2000-11-21 15:46:13 +00:00
|
|
|
bool LoadDatabase();
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
2000-11-21 15:46:13 +00:00
|
|
|
bool Modify() const;
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
int SearchEntry(RGBColor const &) const;
|
2000-11-21 15:46:13 +00:00
|
|
|
///
|
|
|
|
void Sort();
|
|
|
|
///
|
|
|
|
void SortType();
|
2000-11-14 13:46:01 +00:00
|
|
|
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
|
|
|
FD_form_colors * dialog_;
|
2000-11-21 15:46:13 +00:00
|
|
|
/// The usual location of the X11 name database.
|
|
|
|
static string const colorFile;
|
|
|
|
/** A vector of RGB colors and associated name.
|
|
|
|
Each RGB color is unique. */
|
2000-11-15 18:02:45 +00:00
|
|
|
static std::vector<NamedColor> colorDB;
|
2000-11-21 15:46:13 +00:00
|
|
|
|
|
|
|
/// A vector of LyX LColor GUI name and associated RGB color.
|
|
|
|
std::vector<NamedColor> lyxColorDB;
|
|
|
|
/// A vector of xform color ID, RGB colors and associated name.
|
|
|
|
std::vector<XformColor> xformColorDB;
|
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:
|
|
|
|
///
|
2000-11-15 18:02:45 +00:00
|
|
|
Converters( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
2000-11-14 13:46:01 +00:00
|
|
|
///
|
|
|
|
~Converters();
|
|
|
|
///
|
|
|
|
FD_form_converters const * dialog() { return dialog_; }
|
|
|
|
///
|
|
|
|
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_;
|
|
|
|
///
|
|
|
|
FD_form_converters * dialog_;
|
|
|
|
};
|
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:
|
|
|
|
///
|
|
|
|
Formats( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
|
|
|
///
|
|
|
|
~Formats();
|
|
|
|
///
|
|
|
|
FD_form_formats const * dialog() { return dialog_; }
|
|
|
|
///
|
|
|
|
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_;
|
|
|
|
///
|
|
|
|
FD_form_formats * dialog_;
|
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class Formats;
|
|
|
|
|
|
|
|
///
|
|
|
|
class InputsMisc {
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
InputsMisc( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
|
|
|
///
|
|
|
|
~InputsMisc();
|
|
|
|
///
|
|
|
|
FD_form_inputs_misc const * dialog() { return dialog_; }
|
|
|
|
///
|
|
|
|
void apply() const;
|
|
|
|
///
|
|
|
|
void build();
|
|
|
|
///
|
|
|
|
string const feedback(FL_OBJECT const * const) const;
|
|
|
|
///
|
|
|
|
void update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
|
|
|
FD_form_inputs_misc * dialog_;
|
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class InputsMisc;
|
|
|
|
|
|
|
|
///
|
|
|
|
class Interface {
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
Interface( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
|
|
|
///
|
|
|
|
~Interface();
|
|
|
|
///
|
|
|
|
FD_form_interface const * dialog() { return dialog_; }
|
|
|
|
///
|
|
|
|
void apply() const;
|
|
|
|
///
|
|
|
|
void build();
|
|
|
|
///
|
|
|
|
string const feedback(FL_OBJECT const * const) const;
|
|
|
|
///
|
|
|
|
bool input( FL_OBJECT const * const );
|
|
|
|
///
|
|
|
|
void update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
|
|
|
FD_form_interface * dialog_;
|
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class Interface;
|
|
|
|
|
|
|
|
///
|
|
|
|
class Language {
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
Language( FormPreferences & p )
|
|
|
|
: parent_(p), dialog_(0), combo_default_lang(0) {}
|
|
|
|
///
|
|
|
|
~Language();
|
|
|
|
///
|
|
|
|
FD_form_language const * dialog() { return dialog_; }
|
|
|
|
///
|
|
|
|
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_;
|
|
|
|
///
|
|
|
|
FD_form_language * dialog_;
|
|
|
|
///
|
|
|
|
Combox * combo_default_lang;
|
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class Language;
|
|
|
|
|
|
|
|
///
|
|
|
|
class LnFmisc {
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
LnFmisc( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
|
|
|
///
|
|
|
|
~LnFmisc();
|
|
|
|
///
|
|
|
|
FD_form_lnf_misc const * dialog() { return dialog_; }
|
|
|
|
///
|
|
|
|
void apply() const;
|
|
|
|
///
|
|
|
|
void build();
|
|
|
|
///
|
|
|
|
string const feedback(FL_OBJECT const * const) const;
|
|
|
|
///
|
|
|
|
void update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
|
|
|
FD_form_lnf_misc * dialog_;
|
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class LnFmisc;
|
|
|
|
|
|
|
|
///
|
|
|
|
class OutputsMisc {
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
OutputsMisc( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
|
|
|
///
|
|
|
|
~OutputsMisc();
|
|
|
|
///
|
|
|
|
FD_form_outputs_misc const * dialog() { return dialog_; }
|
|
|
|
///
|
|
|
|
void apply() const;
|
|
|
|
///
|
|
|
|
void build();
|
|
|
|
///
|
|
|
|
string const feedback(FL_OBJECT const * const) const;
|
|
|
|
///
|
|
|
|
void update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
|
|
|
FD_form_outputs_misc * dialog_;
|
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class OutputsMisc;
|
|
|
|
|
2000-11-03 09:47:02 +00:00
|
|
|
///
|
2000-11-14 13:46:01 +00:00
|
|
|
class Paths {
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
Paths( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
|
|
|
///
|
|
|
|
~Paths();
|
|
|
|
///
|
|
|
|
FD_form_paths const * dialog() { return dialog_; }
|
|
|
|
///
|
|
|
|
void apply();
|
|
|
|
///
|
|
|
|
void build();
|
|
|
|
///
|
|
|
|
string const feedback(FL_OBJECT const * const) const;
|
|
|
|
///
|
|
|
|
bool input(FL_OBJECT const * const);
|
|
|
|
///
|
|
|
|
void update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
|
|
|
FD_form_paths * dialog_;
|
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class Paths;
|
|
|
|
|
2000-10-30 11:33:05 +00:00
|
|
|
///
|
2000-11-14 13:46:01 +00:00
|
|
|
class Printer {
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
Printer( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
|
|
|
///
|
|
|
|
~Printer();
|
|
|
|
///
|
|
|
|
FD_form_printer const * dialog() { return dialog_; }
|
|
|
|
///
|
|
|
|
void apply() const;
|
|
|
|
///
|
|
|
|
void build();
|
|
|
|
///
|
|
|
|
string const feedback(FL_OBJECT const * const) const;
|
|
|
|
///
|
|
|
|
void update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
|
|
|
FD_form_printer * dialog_;
|
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class Printer;
|
|
|
|
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2000-11-14 13:46:01 +00:00
|
|
|
class ScreenFonts {
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
ScreenFonts( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
|
|
|
///
|
|
|
|
~ScreenFonts();
|
|
|
|
///
|
|
|
|
FD_form_screen_fonts const * dialog() { return dialog_; }
|
|
|
|
///
|
|
|
|
void apply() const;
|
|
|
|
///
|
|
|
|
void build();
|
|
|
|
///
|
|
|
|
string const feedback(FL_OBJECT const * const) const;
|
|
|
|
///
|
|
|
|
bool input();
|
|
|
|
///
|
|
|
|
void update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
FormPreferences & parent_;
|
|
|
|
///
|
|
|
|
FD_form_screen_fonts * dialog_;
|
|
|
|
};
|
|
|
|
///
|
|
|
|
friend class ScreenFonts;
|
|
|
|
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2000-11-14 13:46:01 +00:00
|
|
|
class SpellChecker {
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
SpellChecker( FormPreferences & p ) : parent_(p), dialog_(0) {}
|
|
|
|
///
|
|
|
|
~SpellChecker();
|
|
|
|
///
|
|
|
|
FD_form_spellchecker const * dialog() { return dialog_; }
|
|
|
|
///
|
|
|
|
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_;
|
|
|
|
///
|
|
|
|
FD_form_spellchecker * dialog_;
|
|
|
|
};
|
|
|
|
///
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2000-06-12 11:55:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|