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-10-02 00:10:25 +00:00
|
|
|
#include "FormBase.h"
|
2000-07-27 10:26:38 +00:00
|
|
|
|
|
|
|
#ifdef __GNUG_
|
|
|
|
#pragma interface
|
2000-06-12 11:55:12 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
class LyXView;
|
|
|
|
class Dialogs;
|
2000-08-14 05:24:35 +00:00
|
|
|
|
2000-07-19 15:54:35 +00:00
|
|
|
struct FD_form_preferences;
|
2000-10-27 10:04:51 +00:00
|
|
|
struct FD_form_lnf_misc;
|
2000-07-19 15:54:35 +00:00
|
|
|
struct FD_form_screen_fonts;
|
2000-10-11 07:59:25 +00:00
|
|
|
struct FD_form_interface;
|
2000-07-19 15:54:35 +00:00
|
|
|
struct FD_form_printer;
|
|
|
|
struct FD_form_paths;
|
2000-10-03 05:53:25 +00:00
|
|
|
struct FD_form_outer_tab;
|
2000-10-30 11:33:05 +00:00
|
|
|
struct FD_form_inputs_misc;
|
2000-10-27 10:04:51 +00:00
|
|
|
struct FD_form_outputs_misc;
|
2000-10-25 10:19:25 +00:00
|
|
|
struct FD_form_spellchecker;
|
2000-10-27 10:04:51 +00:00
|
|
|
struct FD_form_language;
|
|
|
|
struct FD_form_colours;
|
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();
|
|
|
|
private:
|
2000-10-27 10:04:51 +00:00
|
|
|
///
|
|
|
|
enum State {
|
|
|
|
///
|
|
|
|
COLOURS,
|
|
|
|
///
|
2000-10-30 11:33:05 +00:00
|
|
|
INPUTSMISC,
|
|
|
|
///
|
2000-10-27 10:04:51 +00:00
|
|
|
INTERFACE,
|
|
|
|
///
|
|
|
|
LANGUAGE,
|
|
|
|
///
|
|
|
|
LOOKNFEELMISC,
|
|
|
|
///
|
|
|
|
OUTPUTSMISC,
|
|
|
|
///
|
|
|
|
PATHS,
|
|
|
|
///
|
|
|
|
PRINTER,
|
|
|
|
///
|
|
|
|
SCREENFONTS,
|
|
|
|
///
|
|
|
|
SPELLCHECKER,
|
|
|
|
///
|
|
|
|
TABS
|
|
|
|
};
|
2000-06-12 11:55:12 +00:00
|
|
|
/// Update the dialog.
|
2000-10-24 13:13:59 +00:00
|
|
|
virtual void update();
|
2000-10-10 04:12:56 +00:00
|
|
|
///
|
|
|
|
virtual void hide();
|
2000-10-02 00:10:25 +00:00
|
|
|
/// OK from dialog
|
|
|
|
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-10-02 04:21:44 +00:00
|
|
|
/// Restore from dialog
|
|
|
|
virtual void restore();
|
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-10-03 05:53:25 +00:00
|
|
|
virtual FL_FORM * form() const;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2000-10-30 11:33:05 +00:00
|
|
|
void applyColours();
|
|
|
|
///
|
|
|
|
void applyInputsMisc();
|
|
|
|
///
|
2000-10-27 10:04:51 +00:00
|
|
|
void applyInterface();
|
|
|
|
///
|
2000-10-30 11:33:05 +00:00
|
|
|
void applyLanguage();
|
|
|
|
///
|
2000-10-27 10:04:51 +00:00
|
|
|
void applyLnFmisc();
|
|
|
|
///
|
|
|
|
void applyOutputsMisc();
|
|
|
|
///
|
|
|
|
void applyPaths();
|
|
|
|
///
|
|
|
|
void applyPrinter();
|
|
|
|
///
|
|
|
|
void applyScreenFonts();
|
|
|
|
///
|
2000-10-25 10:19:25 +00:00
|
|
|
void applySpellChecker();
|
|
|
|
///
|
2000-10-27 10:04:51 +00:00
|
|
|
void buildColours();
|
|
|
|
///
|
2000-10-30 11:33:05 +00:00
|
|
|
void buildInputsMisc();
|
|
|
|
///
|
2000-10-27 10:04:51 +00:00
|
|
|
void buildInterface();
|
|
|
|
///
|
|
|
|
void buildLanguage();
|
|
|
|
///
|
|
|
|
void buildLnFmisc();
|
|
|
|
///
|
|
|
|
void buildOutputsMisc();
|
|
|
|
///
|
|
|
|
void buildPaths();
|
|
|
|
///
|
|
|
|
void buildPrinter();
|
|
|
|
///
|
|
|
|
void buildScreenFonts();
|
|
|
|
///
|
|
|
|
void buildSpellchecker();
|
|
|
|
///
|
2000-10-30 11:33:05 +00:00
|
|
|
void feedbackColours(FL_OBJECT const * const);
|
|
|
|
///
|
|
|
|
void feedbackInputsMisc(FL_OBJECT const * const);
|
|
|
|
///
|
2000-10-27 10:04:51 +00:00
|
|
|
void feedbackInterface(FL_OBJECT const * const);
|
|
|
|
///
|
2000-10-30 11:33:05 +00:00
|
|
|
void feedbackLanguage(FL_OBJECT const * const);
|
|
|
|
///
|
2000-10-27 10:04:51 +00:00
|
|
|
void feedbackLnFmisc(FL_OBJECT const * const);
|
|
|
|
///
|
|
|
|
void feedbackOutputsMisc(FL_OBJECT const * const);
|
|
|
|
///
|
|
|
|
void feedbackPaths(FL_OBJECT const * const);
|
|
|
|
///
|
|
|
|
void feedbackPrinter(FL_OBJECT const * const);
|
|
|
|
///
|
|
|
|
void feedbackScreenFonts(FL_OBJECT const * const);
|
|
|
|
///
|
|
|
|
void feedbackSpellChecker(FL_OBJECT const * const);
|
|
|
|
///
|
2000-10-30 11:33:05 +00:00
|
|
|
bool inputLanguage(FL_OBJECT const * const);
|
|
|
|
///
|
2000-10-27 10:04:51 +00:00
|
|
|
bool inputPaths(FL_OBJECT const * const);
|
|
|
|
///
|
|
|
|
bool inputScreenFonts();
|
|
|
|
///
|
|
|
|
bool inputSpellChecker(FL_OBJECT const * const);
|
|
|
|
///
|
2000-10-30 11:33:05 +00:00
|
|
|
void updateColours();
|
|
|
|
///
|
|
|
|
void updateInputsMisc();
|
|
|
|
///
|
2000-10-27 10:04:51 +00:00
|
|
|
void updateInterface();
|
|
|
|
///
|
2000-10-30 11:33:05 +00:00
|
|
|
void updateLanguage();
|
|
|
|
///
|
2000-10-27 10:04:51 +00:00
|
|
|
void updateLnFmisc();
|
|
|
|
///
|
|
|
|
void updateOutputsMisc();
|
|
|
|
///
|
|
|
|
void updatePaths();
|
|
|
|
///
|
|
|
|
void updatePrinter();
|
|
|
|
///
|
|
|
|
void updateScreenFonts();
|
|
|
|
///
|
2000-10-25 10:19:25 +00:00
|
|
|
void updateSpellChecker();
|
2000-10-27 10:04:51 +00:00
|
|
|
|
2000-10-25 10:19:25 +00:00
|
|
|
///
|
2000-10-27 10:04:51 +00:00
|
|
|
bool WriteableDir( string const & ) const;
|
|
|
|
///
|
|
|
|
bool ReadableDir( string const & ) const;
|
|
|
|
///
|
|
|
|
bool WriteableFile( string const &, string const & = string() ) const;
|
|
|
|
|
2000-10-25 10:19:25 +00:00
|
|
|
///
|
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-10-27 10:04:51 +00:00
|
|
|
FD_form_colours * build_colours();
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
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-10-03 05:53:25 +00:00
|
|
|
/// Outputs tabfolder
|
|
|
|
FD_form_outer_tab * outputs_tab_;
|
|
|
|
/// HCI configuration
|
|
|
|
FD_form_outer_tab * look_n_feel_tab_;
|
|
|
|
/// reLyX and other import/input stuff
|
|
|
|
FD_form_outer_tab * inputs_tab_;
|
2000-10-27 10:04:51 +00:00
|
|
|
/// Spellchecker, language stuff, etc
|
|
|
|
FD_form_outer_tab * usage_tab_;
|
2000-10-03 05:53:25 +00:00
|
|
|
///
|
2000-10-27 10:04:51 +00:00
|
|
|
FD_form_colours * colours_;
|
2000-10-25 10:19:25 +00:00
|
|
|
///
|
2000-10-30 11:33:05 +00:00
|
|
|
FD_form_inputs_misc * inputs_misc_;
|
|
|
|
///
|
2000-10-27 10:04:51 +00:00
|
|
|
FD_form_interface * interface_;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2000-10-27 10:04:51 +00:00
|
|
|
FD_form_language * language_;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2000-10-27 10:04:51 +00:00
|
|
|
FD_form_lnf_misc * lnf_misc_;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2000-10-27 10:04:51 +00:00
|
|
|
FD_form_outputs_misc * outputs_misc_;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
|
|
|
FD_form_paths * paths_;
|
2000-10-11 07:59:25 +00:00
|
|
|
///
|
2000-10-27 10:04:51 +00:00
|
|
|
FD_form_printer * printer_;
|
|
|
|
///
|
|
|
|
FD_form_screen_fonts * screen_fonts_;
|
|
|
|
///
|
|
|
|
FD_form_spellchecker * spellchecker_;
|
2000-06-12 11:55:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|