]> git.lyx.org Git - lyx.git/blobdiff - src/ColorSet.h
Revert UI fix for two digit numbers. It actually does not work.
[lyx.git] / src / ColorSet.h
index 2e49d07b6880bb1c33a4f0ee04e621ee9f0083cd..c1de480f4f0b66dd8a2f0cba2572627a110b0e04 100644 (file)
@@ -48,22 +48,40 @@ public:
        ///
        ColorSet();
 
-       /** set the given LyX color to the color defined by the X11 name given
-        *  \returns true if successful.
+       /** set the given LyX color to the color defined by the X11 hex name given
+        *  \returns true if successful. The optional third argument passes
+        *  a color for dark mode.
         */
-       bool setColor(ColorCode col, std::string const & x11name);
+       bool setColor(ColorCode col, std::string const & x11hexname,
+                     std::string const & x11darkhexname = std::string());
 
        /** 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
+        *  hex name given \returns true if successful. A new color entry
+        *  is created if the color is unknown. The optional third argument passes
+        *  a color for dark mode.
+        */
+       bool setColor(std::string const & lyxname, std::string const & x11hexname,
+                     std::string const & x11darkhexname = std::string());
+
+       /** set the given LyX color to a latexcolor if not yet defined
+        *  \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);
+       bool setLaTeXName(std::string const & lyxname, std::string const & latexname);
+
+       /** set the GUI name of a given LyX color to a guiname if not yet defined
+        *  \returns true if successful.
+        */
+       bool setGUIName(std::string const & lyxname, std::string const & guiname);
 
        /// 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 X11 hexname of \c color.
+       std::string const getX11HexName(ColorCode c, bool const darkmode = false) const;
+
+       /// Get the X11 hexname of \c color.
+       std::pair<std::string, std::string> const getAllX11HexNames(ColorCode c) const;
 
        /// Get the LaTeX name of \c color.
        std::string const getLaTeXName(ColorCode c) const;
@@ -87,7 +105,9 @@ private:
                /// the name used in LaTeX
                std::string latexname;
                /// the name for X11
-               std::string x11name;
+               std::string x11hexname;
+               /// matching X11 color for dark mode
+               std::string x11darkhexname;
                /// the name for LyX
                std::string lyxname;
        };