2007-10-25 12:41:02 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file ColorCode.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef COLOR_CODE_H
|
|
|
|
#define COLOR_CODE_H
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
|
|
|
/// Names of colors, including all logical colors
|
2010-11-25 16:53:56 +00:00
|
|
|
enum ColorCode {
|
2007-10-25 12:41:02 +00:00
|
|
|
/// No particular color---clear or default
|
|
|
|
Color_none,
|
|
|
|
/// The different text colors
|
|
|
|
Color_black,
|
|
|
|
///
|
|
|
|
Color_white,
|
|
|
|
///
|
2015-05-14 20:23:44 +00:00
|
|
|
Color_blue,
|
|
|
|
///
|
|
|
|
Color_brown,
|
|
|
|
///
|
|
|
|
Color_cyan,
|
|
|
|
///
|
|
|
|
Color_darkgray,
|
|
|
|
///
|
|
|
|
Color_gray,
|
2007-10-25 12:41:02 +00:00
|
|
|
///
|
|
|
|
Color_green,
|
|
|
|
///
|
2015-05-14 20:23:44 +00:00
|
|
|
Color_lightgray,
|
2007-10-25 12:41:02 +00:00
|
|
|
///
|
2015-05-14 20:23:44 +00:00
|
|
|
Color_lime,
|
2007-10-25 12:41:02 +00:00
|
|
|
///
|
|
|
|
Color_magenta,
|
|
|
|
///
|
2015-05-14 20:23:44 +00:00
|
|
|
Color_olive,
|
|
|
|
///
|
|
|
|
Color_orange,
|
|
|
|
///
|
|
|
|
Color_pink,
|
|
|
|
///
|
|
|
|
Color_purple,
|
|
|
|
///
|
|
|
|
Color_red,
|
|
|
|
///
|
|
|
|
Color_teal,
|
|
|
|
///
|
|
|
|
Color_violet,
|
|
|
|
///
|
2007-10-25 12:41:02 +00:00
|
|
|
Color_yellow,
|
|
|
|
|
|
|
|
// Needed interface colors
|
|
|
|
|
|
|
|
/// Cursor color
|
|
|
|
Color_cursor,
|
|
|
|
/// Background color
|
|
|
|
Color_background,
|
|
|
|
/// Foreground color
|
|
|
|
Color_foreground,
|
|
|
|
/// Background color of selected text
|
|
|
|
Color_selection,
|
2008-03-29 11:21:36 +00:00
|
|
|
/// Foreground color of selected text
|
|
|
|
Color_selectiontext,
|
2007-10-25 12:41:02 +00:00
|
|
|
/// Text color in LaTeX mode
|
|
|
|
Color_latex,
|
|
|
|
/// The color used for previews
|
|
|
|
Color_preview,
|
2008-02-21 19:42:34 +00:00
|
|
|
/// Inline completion color
|
|
|
|
Color_inlinecompletion,
|
|
|
|
/// Inline completion color for the non-unique part
|
|
|
|
Color_nonunique_inlinecompletion,
|
2007-10-25 12:41:02 +00:00
|
|
|
|
2008-03-01 23:50:08 +00:00
|
|
|
/// Label color for notes
|
|
|
|
Color_notelabel,
|
2007-10-25 12:41:02 +00:00
|
|
|
/// Background color of notes
|
|
|
|
Color_notebg,
|
2008-03-01 23:50:08 +00:00
|
|
|
/// Label color for comments
|
|
|
|
Color_commentlabel,
|
2007-10-25 12:41:02 +00:00
|
|
|
/// Background color of comments
|
|
|
|
Color_commentbg,
|
2008-03-01 23:50:08 +00:00
|
|
|
/// Label color for greyedout insets
|
|
|
|
Color_greyedoutlabel,
|
2010-03-31 00:46:50 +00:00
|
|
|
/// Color for greyedout inset text
|
|
|
|
Color_greyedouttext,
|
2007-10-25 12:41:02 +00:00
|
|
|
/// Background color of greyedout inset
|
|
|
|
Color_greyedoutbg,
|
2008-09-08 21:38:01 +00:00
|
|
|
/// Background color of shaded box
|
2007-10-25 12:41:02 +00:00
|
|
|
Color_shadedbg,
|
2008-09-08 21:38:01 +00:00
|
|
|
/// Background color of listings inset
|
|
|
|
Color_listingsbg,
|
2007-10-25 12:41:02 +00:00
|
|
|
|
2008-02-15 23:38:16 +00:00
|
|
|
/// 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,
|
2009-01-30 00:56:37 +00:00
|
|
|
/// Text color for phantom insets
|
|
|
|
Color_phantomtext,
|
2008-02-15 23:38:16 +00:00
|
|
|
/// Label color for URL insets
|
|
|
|
Color_urllabel,
|
2008-03-05 00:06:34 +00:00
|
|
|
|
|
|
|
/// Color for URL inset text
|
2008-02-15 23:38:16 +00:00
|
|
|
Color_urltext,
|
|
|
|
|
2007-10-25 12:41:02 +00:00
|
|
|
/// Color for the depth bars in the margin
|
|
|
|
Color_depthbar,
|
2014-07-27 16:55:10 +00:00
|
|
|
/// Color that indicates when a row can be scrolled
|
|
|
|
Color_scroll,
|
2007-10-25 12:41:02 +00:00
|
|
|
/// Color for marking foreign language words
|
|
|
|
Color_language,
|
|
|
|
|
|
|
|
/// Text color for command insets
|
|
|
|
Color_command,
|
|
|
|
/// Background color for command insets
|
|
|
|
Color_commandbg,
|
|
|
|
/// Frame color for command insets
|
|
|
|
Color_commandframe,
|
|
|
|
|
|
|
|
/// Special chars text color
|
|
|
|
Color_special,
|
|
|
|
|
|
|
|
/// Graphics inset background color
|
|
|
|
Color_graphicsbg,
|
|
|
|
/// Math inset text color
|
|
|
|
Color_math,
|
|
|
|
/// Math inset background color
|
|
|
|
Color_mathbg,
|
|
|
|
/// Macro math inset background color
|
|
|
|
Color_mathmacrobg,
|
2007-11-01 10:57:20 +00:00
|
|
|
/// Macro math inset background color hovered
|
|
|
|
Color_mathmacrohoverbg,
|
|
|
|
/// Macro math label color
|
|
|
|
Color_mathmacrolabel,
|
|
|
|
/// Macro math frame color
|
|
|
|
Color_mathmacroframe,
|
2017-07-03 17:45:58 +00:00
|
|
|
/// Macro math blended color
|
2007-11-01 10:57:20 +00:00
|
|
|
Color_mathmacroblend,
|
2017-07-03 17:45:58 +00:00
|
|
|
/// Macro template color for old parameters
|
2008-02-29 10:02:25 +00:00
|
|
|
Color_mathmacrooldarg,
|
2017-07-03 17:45:58 +00:00
|
|
|
/// Macro template color for new parameters
|
2008-02-29 10:02:25 +00:00
|
|
|
Color_mathmacronewarg,
|
2007-10-25 12:41:02 +00:00
|
|
|
/// Math inset frame color under focus
|
|
|
|
Color_mathframe,
|
|
|
|
/// Math inset frame color not under focus
|
|
|
|
Color_mathcorners,
|
|
|
|
/// Math line color
|
|
|
|
Color_mathline,
|
|
|
|
|
2017-10-16 08:12:21 +00:00
|
|
|
/// Collapsible insets text
|
|
|
|
Color_collapsible,
|
|
|
|
/// Collapsible insets frame
|
|
|
|
Color_collapsibleframe,
|
2007-10-25 12:41:02 +00:00
|
|
|
|
|
|
|
/// Inset marker background color
|
|
|
|
Color_insetbg,
|
|
|
|
/// Inset marker frame color
|
|
|
|
Color_insetframe,
|
|
|
|
|
|
|
|
/// Error box text color
|
|
|
|
Color_error,
|
2012-12-31 03:10:28 +00:00
|
|
|
/// End of line (EOL) marker color
|
2007-10-25 12:41:02 +00:00
|
|
|
Color_eolmarker,
|
|
|
|
/// Added space colour
|
|
|
|
Color_added_space,
|
|
|
|
/// Appendix marker color
|
|
|
|
Color_appendix,
|
2009-02-09 20:47:32 +00:00
|
|
|
/// Changebar color
|
2007-10-25 12:41:02 +00:00
|
|
|
Color_changebar,
|
2009-02-09 20:47:32 +00:00
|
|
|
/// Deleted text color
|
2007-10-25 12:41:02 +00:00
|
|
|
Color_deletedtext,
|
2009-02-09 20:47:32 +00:00
|
|
|
/// Added text color
|
2007-10-25 12:41:02 +00:00
|
|
|
Color_addedtext,
|
2019-12-24 07:37:27 +00:00
|
|
|
/// 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,
|
2009-02-09 20:47:32 +00:00
|
|
|
/// Deleted text modifying color
|
|
|
|
Color_deletedtextmodifier,
|
2007-10-25 12:41:02 +00:00
|
|
|
/// Table line color
|
|
|
|
Color_tabularline,
|
|
|
|
/// Table line color
|
|
|
|
Color_tabularonoffline,
|
|
|
|
/// Bottom area color
|
|
|
|
Color_bottomarea,
|
2007-11-25 21:53:39 +00:00
|
|
|
/// New page color
|
|
|
|
Color_newpage,
|
2007-10-25 12:41:02 +00:00
|
|
|
/// Page break color
|
|
|
|
Color_pagebreak,
|
|
|
|
|
|
|
|
// FIXME: why are the next four separate ??
|
|
|
|
/// Color used for button frame
|
|
|
|
Color_buttonframe,
|
|
|
|
/// Color used for bottom background
|
|
|
|
Color_buttonbg,
|
|
|
|
/// Color used for buttom under focus
|
|
|
|
Color_buttonhoverbg,
|
2009-08-19 22:46:43 +00:00
|
|
|
/// Color used for the pilcrow sign to mark the end of a paragraph
|
|
|
|
Color_paragraphmarker,
|
2010-03-28 13:47:50 +00:00
|
|
|
/// Preview frame color
|
|
|
|
Color_previewframe,
|
2007-10-25 12:41:02 +00:00
|
|
|
|
|
|
|
// Logical attributes
|
|
|
|
|
|
|
|
/// Color is inherited
|
|
|
|
Color_inherit,
|
2010-02-05 09:00:40 +00:00
|
|
|
/// Color for regexp frame
|
|
|
|
Color_regexpframe,
|
2007-10-25 12:41:02 +00:00
|
|
|
/// For ignoring updates of a color
|
|
|
|
Color_ignore
|
|
|
|
};
|
|
|
|
|
2007-11-02 23:42:27 +00:00
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2007-10-25 12:41:02 +00:00
|
|
|
} // namespace lyx
|
|
|
|
|
|
|
|
#endif
|