+ /// control which feedback message is output
+ string const getFeedback(FL_OBJECT *);
+ ///
+ void browse(FL_OBJECT * input,
+ string const & title, string const & pattern,
+ std::pair<string,string> const & dir1= std::make_pair(string(),string()),
+ std::pair<string,string> const & dir2 = std::make_pair(string(),string()));
+
+ /// Real GUI implementation.
+ boost::scoped_ptr<FD_preferences> dialog_;
+ /// Converters tabfolder
+ boost::scoped_ptr<FD_preferences_inner_tab> converters_tab_;
+ /// reLyX and other import/input stuff
+ boost::scoped_ptr<FD_preferences_inner_tab> inputs_tab_;
+ /// HCI configuration
+ boost::scoped_ptr<FD_preferences_inner_tab> look_n_feel_tab_;
+ /// Outputs tabfolder
+ boost::scoped_ptr<FD_preferences_inner_tab> outputs_tab_;
+ /// Spellchecker, language stuff, etc
+ boost::scoped_ptr<FD_preferences_inner_tab> lang_opts_tab_;
+
+ /** Each tab folder is encapsulated in its own class.
+ */
+
+ class Colors {
+ public:
+ ///
+ enum GuiColors {
+ GUI_COLOR_CHOICE = FL_FREE_COL14,
+ GUI_COLOR_HUE_DIAL = FL_FREE_COL15,
+ GUI_COLOR_CURSOR = FL_FREE_COL16
+ };
+ ///
+ Colors(FormPreferences & p);
+ ///
+ FD_preferences_colors const * dialog();
+ ///
+ void apply(); // not const as modifies modifiedXformsPrefs.
+ ///
+ void build();
+ ///
+ string const feedback(FL_OBJECT const * const) const;
+ ///
+ void input(FL_OBJECT const * const);
+ ///
+ void update() { LoadBrowserLyX(); }
+
+ /// Flag whether Xforms colors have changed since last file save
+ bool modifiedXformsPrefs;
+
+ private:
+ ///
+ void AdjustVal(int, int, double) const;
+ ///
+ 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_;
+
+ /// A vector of LyX LColor GUI name and associated RGB color.
+ std::vector<NamedColor> lyxColorDB;
+ /// A vector of xforms color ID, RGB colors and associated name.
+ std::vector<XformsColor> xformsColorDB;
+ };