X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FColorCode.h;h=24d43428c01abf97f113e7398bdc168d1531d13e;hb=eeaea7cbbb98141c98c189751907a8fc0b10f7d4;hp=8df8ff4c8fcecf8bde4298a62e482fd15a6fad16;hpb=eea79637c78bb9916031924eca7b305cfb8e83df;p=lyx.git diff --git a/src/ColorCode.h b/src/ColorCode.h index 8df8ff4c8f..24d43428c0 100644 --- a/src/ColorCode.h +++ b/src/ColorCode.h @@ -13,8 +13,7 @@ namespace lyx { /// Names of colors, including all logical colors -enum ColorCode -{ +enum ColorCode { /// No particular color---clear or default Color_none, /// The different text colors @@ -22,16 +21,38 @@ enum ColorCode /// Color_white, /// - Color_red, + Color_blue, + /// + Color_brown, + /// + Color_cyan, + /// + Color_darkgray, + /// + Color_gray, /// Color_green, /// - Color_blue, + Color_lightgray, /// - Color_cyan, + Color_lime, /// Color_magenta, /// + Color_olive, + /// + Color_orange, + /// + Color_pink, + /// + Color_purple, + /// + Color_red, + /// + Color_teal, + /// + Color_violet, + /// Color_yellow, // Needed interface colors @@ -44,28 +65,56 @@ enum ColorCode Color_foreground, /// Background color of selected text Color_selection, + /// Foreground color of selected text + Color_selectiontext, /// Text color in LaTeX mode Color_latex, /// The color used for previews Color_preview, + /// Inline completion color + Color_inlinecompletion, + /// Inline completion color for the non-unique part + Color_nonunique_inlinecompletion, - /// Text color for notes - Color_note, + /// Label color for notes + Color_notelabel, /// Background color of notes Color_notebg, - /// Text color for comments - Color_comment, + /// Label color for comments + Color_commentlabel, /// Background color of comments Color_commentbg, - /// Text color for greyedout inset - Color_greyedout, + /// Label color for greyedout insets + Color_greyedoutlabel, + /// Color for greyedout inset text + Color_greyedouttext, /// Background color of greyedout inset Color_greyedoutbg, - /// Shaded box background + /// Background color of shaded box Color_shadedbg, + /// Background color of listings inset + Color_listingsbg, + + /// Label color for branches + Color_branchlabel, + /// Label color for footnotes + Color_footlabel, + /// Label color for index insets + Color_indexlabel, + /// Label color for margin notes + Color_marginlabel, + /// Text color for phantom insets + Color_phantomtext, + /// Label color for URL insets + Color_urllabel, + + /// Color for URL inset text + Color_urltext, /// Color for the depth bars in the margin Color_depthbar, + /// Color that indicates when a row can be scrolled + Color_scroll, /// Color for marking foreign language words Color_language, @@ -87,6 +136,18 @@ enum ColorCode Color_mathbg, /// Macro math inset background color Color_mathmacrobg, + /// Macro math inset background color hovered + Color_mathmacrohoverbg, + /// Macro math label color + Color_mathmacrolabel, + /// Macro math frame color + Color_mathmacroframe, + /// Macro math blended color + Color_mathmacroblend, + /// Macro template color for old parameters + Color_mathmacrooldarg, + /// Macro template color for new parameters + Color_mathmacronewarg, /// Math inset frame color under focus Color_mathframe, /// Math inset frame color not under focus @@ -94,13 +155,10 @@ enum ColorCode /// Math line color Color_mathline, - /// caption frame color - Color_captionframe, - - /// collapsable insets text - Color_collapsable, - /// collapsable insets frame - Color_collapsableframe, + /// Collapsible insets text + Color_collapsible, + /// Collapsible insets frame + Color_collapsibleframe, /// Inset marker background color Color_insetbg, @@ -109,26 +167,38 @@ enum ColorCode /// Error box text color Color_error, - /// EOL marker color + /// End of line (EOL) marker color Color_eolmarker, /// Added space colour Color_added_space, /// Appendix marker color Color_appendix, - /// changebar color + /// Changebar color Color_changebar, - /// deleted text color + /// Deleted text color Color_deletedtext, - /// added text color + /// Added text color Color_addedtext, - /// Top and bottom line color - Color_topline, + /// Added text color author 1 + Color_addedtextauthor1, + /// Added text color author 2 + Color_addedtextauthor2, + /// Added text color author 3 + Color_addedtextauthor3, + /// Added text color author 4 + Color_addedtextauthor4, + /// Added text color author 5 + Color_addedtextauthor5, + /// Deleted text modifying color + Color_deletedtextmodifier, /// Table line color Color_tabularline, /// Table line color Color_tabularonoffline, /// Bottom area color Color_bottomarea, + /// New page color + Color_newpage, /// Page break color Color_pagebreak, @@ -137,17 +207,52 @@ enum ColorCode Color_buttonframe, /// Color used for bottom background Color_buttonbg, - /// Color used for buttom under focus + /// Color used for button under focus Color_buttonhoverbg, + /// Text color for broken insets + Color_command_broken, + /// Background color for broken insets + Color_buttonbg_broken, + /// Frame color for broken insets + Color_buttonframe_broken, + /// Color used for broken inset button under focus + Color_buttonhoverbg_broken, + /// Color used for the pilcrow sign to mark the end of a paragraph + Color_paragraphmarker, + /// Preview frame color + Color_previewframe, // Logical attributes /// Color is inherited Color_inherit, + /// Color for regexp frame + Color_regexpframe, /// For ignoring updates of a color Color_ignore }; + +struct RGBColor { + unsigned int r; + unsigned int g; + unsigned int b; + RGBColor() : r(0), g(0), b(0) {} + RGBColor(unsigned int red, unsigned int green, unsigned int blue) + : r(red), g(green), b(blue) {} +}; + +inline bool operator==(RGBColor const & c1, RGBColor const & c2) +{ + return (c1.r == c2.r && c1.g == c2.g && c1.b == c2.b); +} + + +inline bool operator!=(RGBColor const & c1, RGBColor const & c2) +{ + return !(c1 == c2); +} + } // namespace lyx #endif