- Color();
- ///
- Color(Color const &);
- ///
- ~Color();
- ///
- Color & operator=(Color);
-
- /** set the given LyX color to the color defined by the X11 name given
- * \returns true if successful.
- */
- bool setColor(ColorCode col, std::string const & x11name);
-
- /** set the given LyX color to the color defined by the X11
- * name given \returns true if successful. A new color entry
- * is created if the color is unknown
- */
- bool setColor(std::string const & lyxname, std::string const & x11name);
-
- /// Get the GUI name of \c color.
- docstring const getGUIName(ColorCode c) const;
-
- /// Get the X11 name of \c color.
- std::string const getX11Name(ColorCode c) const;
-
- /// Get the LaTeX name of \c color.
- std::string const getLaTeXName(ColorCode c) const;
-
- /// Get the LyX name of \c color.
- std::string const getLyXName(ColorCode c) const;
-
- /// \returns the ColorCode associated with the LyX name.
- ColorCode getFromLyXName(std::string const & lyxname) const;
- /// \returns the ColorCode associated with the LaTeX name.
- ColorCode getFromLaTeXName(std::string const & latexname) const;
-private:
- ///
- void addColor(ColorCode c, std::string const & lyxname) const;
- ///
- class Pimpl;
- ///
- boost::scoped_ptr<Pimpl> pimpl_;
+ Color(ColorCode base_color = Color_none);
+
+ /// \name Comparison operators
+ //@{
+ bool operator==(Color const & color) const;
+ bool operator!=(Color const & color) const;
+ bool operator<(Color const & color) const;
+ bool operator<=(Color const & color) const;
+ //@}
+
+ /// the base color
+ ColorCode baseColor;
+ /// The color that is merged with the base color. Set
+ /// mergeColor to Color_ignore if no merging is wanted.
+ ColorCode mergeColor;