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-10-30 21:53:29 +00:00
|
|
|
class Combox;
|
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
|
|
|
///
|
|
|
|
static void ComboLanguageCB(int, void *, Combox *);
|
|
|
|
///
|
|
|
|
static void FeedbackCB(FL_OBJECT *, long);
|
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
void feedbackPost(FL_OBJECT *, int);
|
2000-10-30 21:53:29 +00:00
|
|
|
|
2000-06-12 11:55:12 +00:00
|
|
|
private:
|
|
|
|
/// 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-30 21:53:29 +00:00
|
|
|
/// control which feedback message is output
|
2000-11-02 14:47:47 +00:00
|
|
|
void feedback( FL_OBJECT * );
|
2000-10-02 00:10:25 +00:00
|
|
|
///
|
2000-10-03 05:53:25 +00:00
|
|
|
virtual FL_FORM * form() const;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
void applyColours() const;
|
2000-10-30 11:33:05 +00:00
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
void applyInputsMisc() const;
|
2000-10-30 11:33:05 +00:00
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
void applyInterface() const;
|
2000-10-27 10:04:51 +00:00
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
void applyLanguage() const;
|
2000-10-30 11:33:05 +00:00
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
void applyLnFmisc() const;
|
2000-10-27 10:04:51 +00:00
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
void applyOutputsMisc() const;
|
2000-10-27 10:04:51 +00:00
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
void applyPaths(); // not const because calls updatePaths!
|
2000-10-27 10:04:51 +00:00
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
void applyPrinter() const;
|
2000-10-27 10:04:51 +00:00
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
void applyScreenFonts() const;
|
2000-10-27 10:04:51 +00:00
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
void applySpellChecker(); // not const because calls updateSpellChecker!
|
2000-10-25 10:19:25 +00:00
|
|
|
///
|
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();
|
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
void addLanguages( Combox & ) const;
|
2000-10-30 21:53:29 +00:00
|
|
|
///
|
2000-10-27 10:04:51 +00:00
|
|
|
void buildLnFmisc();
|
|
|
|
///
|
|
|
|
void buildOutputsMisc();
|
|
|
|
///
|
|
|
|
void buildPaths();
|
|
|
|
///
|
|
|
|
void buildPrinter();
|
|
|
|
///
|
|
|
|
void buildScreenFonts();
|
|
|
|
///
|
|
|
|
void buildSpellchecker();
|
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
string feedbackColours(FL_OBJECT const * const) const;
|
2000-10-30 11:33:05 +00:00
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
string feedbackInputsMisc(FL_OBJECT const * const) const;
|
2000-10-30 11:33:05 +00:00
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
string feedbackInterface(FL_OBJECT const * const) const;
|
2000-10-27 10:04:51 +00:00
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
string feedbackLanguage(FL_OBJECT const * const) const;
|
2000-10-30 11:33:05 +00:00
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
string feedbackLnFmisc(FL_OBJECT const * const) const;
|
2000-10-27 10:04:51 +00:00
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
string feedbackOutputsMisc(FL_OBJECT const * const) const;
|
2000-10-27 10:04:51 +00:00
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
string feedbackPaths(FL_OBJECT const * const) const;
|
2000-10-27 10:04:51 +00:00
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
string feedbackPrinter(FL_OBJECT const * const) const;
|
2000-10-27 10:04:51 +00:00
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
string feedbackScreenFonts(FL_OBJECT const * const) const;
|
2000-10-27 10:04:51 +00:00
|
|
|
///
|
2000-11-02 14:47:47 +00:00
|
|
|
string feedbackSpellChecker(FL_OBJECT const * const) const;
|
2000-10-27 10:04:51 +00:00
|
|
|
///
|
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-30 21:53:29 +00:00
|
|
|
///
|
|
|
|
void setPostHandler( FL_OBJECT * ) const;
|
2000-10-27 10:04:51 +00:00
|
|
|
|
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-10-30 21:53:29 +00:00
|
|
|
///
|
|
|
|
Combox * combo_default_lang;
|
|
|
|
///
|
|
|
|
Combox * combo_kbmap_1;
|
|
|
|
///
|
|
|
|
Combox * combo_kbmap_2;
|
2000-11-02 14:47:47 +00:00
|
|
|
///
|
|
|
|
FL_OBJECT * feedbackObj;
|
2000-06-12 11:55:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|