]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormPreferences.h
Tiny clean-ups.
[lyx.git] / src / frontends / xforms / FormPreferences.h
index b7b0e923480b74452067b61265a3be9119027dfa..d9d76dfd4d1e9faf0cfb540d003e82e5d6ad2d05 100644 (file)
@@ -1,38 +1,34 @@
 // -*- C++ -*-
 /**
  * \file FormPreferences.h
- * Copyright 1999-2001 Allan Rae
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
  * \author Allan Rae
- * \author Angus Leeming 
+ * \author Angus Leeming
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #ifndef FORMPREFERENCES_H
 #define FORMPREFERENCES_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
-
 #include "FormBase.h"
-#include "Color.h" // NamedColor
 #include "xforms_helpers.h" // XformColor
 
-#include <boost/scoped_ptr.hpp>
+#include "lyx_forms.h"
 
-#include FORMS_H_LOCATION
-#include <utility> // pair
+#include <boost/scoped_ptr.hpp>
 
 class ControlPrefs;
-class Combox;
+
 class Dialogs;
+class LyXRC;
 class LyXView;
+class NamedColor;
 class RGBColor;
+class FormColorpicker;
+
 struct FD_preferences;
 struct FD_preferences_colors;
 struct FD_preferences_converters;
@@ -41,6 +37,7 @@ struct FD_preferences_inputs_misc;
 struct FD_preferences_interface;
 struct FD_preferences_language;
 struct FD_preferences_lnf_misc;
+struct FD_preferences_identity;
 struct FD_preferences_inner_tab;
 struct FD_preferences_outputs_misc;
 struct FD_preferences_paths;
@@ -50,7 +47,7 @@ struct FD_preferences_spelloptions;
 
 
 /** This class provides an XForms implementation of the FormPreferences Dialog.
   The preferences dialog allows users to set/save their preferences.
*  The preferences dialog allows users to set/save their preferences.
  */
 class FormPreferences : public FormCB<ControlPrefs, FormDB<FD_preferences> > {
 public:
@@ -71,8 +68,8 @@ private:
        /// Build the dialog
        virtual void build();
        /// control which feedback message is output
-       string const getFeedback(FL_OBJECT *);
+       std::string const getFeedback(FL_OBJECT *);
+
        /// Converters tabfolder
        boost::scoped_ptr<FD_preferences_inner_tab> converters_tab_;
        /// reLyX and other import/input stuff
@@ -91,8 +88,7 @@ private:
        public:
                ///
                enum GuiColors {
-                       GUI_COLOR_CHOICE   = FL_FREE_COL14,
-                       GUI_COLOR_HUE_DIAL = FL_FREE_COL15,
+                       GUI_COLOR_CHOICE   = FL_FREE_COL15,
                        GUI_COLOR_CURSOR   = FL_FREE_COL16
                };
                ///
@@ -104,7 +100,7 @@ private:
                ///
                void build();
                ///
-               string const feedback(FL_OBJECT const * const) const;
+               std::string const feedback(FL_OBJECT const * const) const;
                ///
                void input(FL_OBJECT const * const);
                ///
@@ -119,22 +115,16 @@ private:
                ///
                void InputBrowserLyX() const;
                ///
-               void InputHSV();
-               ///
-               void InputRGB();
-               ///
                void LoadBrowserLyX();
                ///
                void Modify();
-               ///
-               void SwitchColorSpace() const;
-               ///
-               string const X11hexname(RGBColor const &) const;
 
                ///
                FormPreferences & parent_;
                ///
                boost::scoped_ptr<FD_preferences_colors> dialog_;
+               ///
+               boost::scoped_ptr<FormColorpicker> picker_;
 
                /// A vector of LyX LColor GUI name and associated RGB color.
                std::vector<NamedColor> lyxColorDB;
@@ -156,7 +146,7 @@ private:
                ///
                void build();
                ///
-               string const feedback(FL_OBJECT const * const) const;
+               std::string const feedback(FL_OBJECT const * const) const;
                ///
                bool input(FL_OBJECT const * const);
                ///
@@ -176,9 +166,9 @@ private:
                ///
                bool Input();
                ///
-               string const GetFrom() const;
+               std::string const GetFrom() const;
                ///
-               string const GetTo() const;
+               std::string const GetTo() const;
 
                ///
                FormPreferences & parent_;
@@ -200,7 +190,7 @@ private:
                ///
                void build();
                ///
-               string const feedback(FL_OBJECT const * const) const;
+               std::string const feedback(FL_OBJECT const * const) const;
                ///
                bool input(FL_OBJECT const * const);
                ///
@@ -238,7 +228,7 @@ private:
                ///
                void build();
                ///
-               string const feedback(FL_OBJECT const * const) const;
+               std::string const feedback(FL_OBJECT const * const) const;
                ///
                void update(LyXRC const & rc);
 
@@ -263,7 +253,7 @@ private:
                ///
                void build();
                ///
-               string const feedback(FL_OBJECT const * const) const;
+               std::string const feedback(FL_OBJECT const * const) const;
                ///
                bool input(FL_OBJECT const * const);
                ///
@@ -290,13 +280,11 @@ private:
                ///
                void build();
                ///
-               string const feedback(FL_OBJECT const * const) const;
+               std::string const feedback(FL_OBJECT const * const) const;
                ///
                bool input(FL_OBJECT const * const);
                ///
                void update(LyXRC const & rc);
-               ///
-               static void ComboCB(int, void *, Combox *);
 
        private:
                ///
@@ -304,9 +292,7 @@ private:
                ///
                boost::scoped_ptr<FD_preferences_language> dialog_;
                ///
-               boost::scoped_ptr<Combox> combo_default_lang;
-               ///
-               std::vector<string> lang_;
+               std::vector<std::string> lang_;
        };
        ///
        friend class Language;
@@ -323,7 +309,7 @@ private:
                ///
                void build();
                ///
-               string const feedback(FL_OBJECT const * const) const;
+               std::string const feedback(FL_OBJECT const * const) const;
                ///
                void update(LyXRC const & rc);
 
@@ -336,6 +322,29 @@ private:
        ///
        friend class LnFmisc;
 
+       class Identity {
+       public:
+               ///
+               Identity(FormPreferences &  p);
+               ///
+               FD_preferences_identity const * dialog();
+               ///
+               void apply(LyXRC & rc) const;
+               ///
+               void build();
+               ///
+               std::string const feedback(FL_OBJECT const * const) const;
+               ///
+               void update(LyXRC const & rc);
+
+       private:
+               ///
+               FormPreferences & parent_;
+               ///
+               boost::scoped_ptr<FD_preferences_identity> dialog_;
+       };
+       friend class Identity;
+
        ///
        class OutputsMisc {
        public:
@@ -348,7 +357,7 @@ private:
                ///
                void build();
                ///
-               string const feedback(FL_OBJECT const * const) const;
+               std::string const feedback(FL_OBJECT const * const) const;
                ///
                void update(LyXRC const & rc);
 
@@ -373,7 +382,7 @@ private:
                ///
                void build();
                ///
-               string const feedback(FL_OBJECT const * const) const;
+               std::string const feedback(FL_OBJECT const * const) const;
                ///
                bool input(FL_OBJECT const * const);
                ///
@@ -400,7 +409,7 @@ private:
                ///
                void build();
                ///
-               string const feedback(FL_OBJECT const * const) const;
+               std::string const feedback(FL_OBJECT const * const) const;
                ///
                void update(LyXRC const & rc);
 
@@ -425,7 +434,7 @@ private:
                ///
                void build();
                ///
-               string const feedback(FL_OBJECT const * const) const;
+               std::string const feedback(FL_OBJECT const * const) const;
                ///
                bool input();
                ///
@@ -452,7 +461,7 @@ private:
                ///
                void build();
                ///
-               string const feedback(FL_OBJECT const * const) const;
+               std::string const feedback(FL_OBJECT const * const) const;
                ///
                bool input(FL_OBJECT const * const);
                ///
@@ -485,6 +494,8 @@ private:
        ///
        LnFmisc lnf_misc_;
        ///
+       Identity identity_;
+       ///
        OutputsMisc outputs_misc_;
        ///
        Paths paths_;