diff options
author | crupest <crupest@outlook.com> | 2020-03-18 23:17:19 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-03-18 23:17:19 +0800 |
commit | f1d68d3309516ea70db100789b77edadd2f41dd0 (patch) | |
tree | 9f0195ad034c62f91126bb403f3e4dbc9c792945 | |
parent | c5a4f8c11d0d84d85359e5ff03477da5e9f12926 (diff) | |
download | cru-f1d68d3309516ea70db100789b77edadd2f41dd0.tar.gz cru-f1d68d3309516ea70db100789b77edadd2f41dd0.tar.bz2 cru-f1d68d3309516ea70db100789b77edadd2f41dd0.zip |
Colors!!!
-rw-r--r-- | include/cru/platform/graph_base.hpp | 149 | ||||
-rw-r--r-- | include/cru/ui/base.hpp | 147 |
2 files changed, 293 insertions, 3 deletions
diff --git a/include/cru/platform/graph_base.hpp b/include/cru/platform/graph_base.hpp index c9c4f629..eab7ebe7 100644 --- a/include/cru/platform/graph_base.hpp +++ b/include/cru/platform/graph_base.hpp @@ -264,8 +264,153 @@ struct Color { }; namespace colors { -constexpr Color black{0, 0, 0}; -constexpr Color white{255, 255, 255}; +constexpr Color black = Color::FromHex(0x000000); +constexpr Color silver = Color::FromHex(0xc0c0c0); +constexpr Color gray = Color::FromHex(0x808080); +constexpr Color white = Color::FromHex(0xffffff); +constexpr Color maroon = Color::FromHex(0x800000); +constexpr Color red = Color::FromHex(0xff0000); +constexpr Color purple = Color::FromHex(0x800080); +constexpr Color fuchsia = Color::FromHex(0xff00ff); +constexpr Color green = Color::FromHex(0x008000); +constexpr Color lime = Color::FromHex(0x00ff00); +constexpr Color olive = Color::FromHex(0x808000); +constexpr Color yellow = Color::FromHex(0xffff00); +constexpr Color navy = Color::FromHex(0x000080); +constexpr Color blue = Color::FromHex(0x0000ff); +constexpr Color teal = Color::FromHex(0x008080); +constexpr Color aqua = Color::FromHex(0x00ffff); +constexpr Color orange = Color::FromHex(0xffa500); +constexpr Color aliceblue = Color::FromHex(0xf0f8ff); +constexpr Color antiquewhite = Color::FromHex(0xfaebd7); +constexpr Color aquamarine = Color::FromHex(0x7fffd4); +constexpr Color azure = Color::FromHex(0xf0ffff); +constexpr Color beige = Color::FromHex(0xf5f5dc); +constexpr Color bisque = Color::FromHex(0xffe4c4); +constexpr Color blanchedalmond = Color::FromHex(0xffebcd); +constexpr Color blueviolet = Color::FromHex(0x8a2be2); +constexpr Color brown = Color::FromHex(0xa52a2a); +constexpr Color burlywood = Color::FromHex(0xdeb887); +constexpr Color cadetblue = Color::FromHex(0x5f9ea0); +constexpr Color chartreuse = Color::FromHex(0x7fff00); +constexpr Color chocolate = Color::FromHex(0xd2691e); +constexpr Color coral = Color::FromHex(0xff7f50); +constexpr Color cornflowerblue = Color::FromHex(0x6495ed); +constexpr Color cornsilk = Color::FromHex(0xfff8dc); +constexpr Color crimson = Color::FromHex(0xdc143c); +constexpr Color cyan = aqua; +constexpr Color darkblue = Color::FromHex(0x00008b); +constexpr Color darkcyan = Color::FromHex(0x008b8b); +constexpr Color darkgoldenrod = Color::FromHex(0xb8860b); +constexpr Color darkgray = Color::FromHex(0xa9a9a9); +constexpr Color darkgreen = Color::FromHex(0x006400); +constexpr Color darkgrey = Color::FromHex(0xa9a9a9); +constexpr Color darkkhaki = Color::FromHex(0xbdb76b); +constexpr Color darkmagenta = Color::FromHex(0x8b008b); +constexpr Color darkolivegreen = Color::FromHex(0x556b2f); +constexpr Color darkorange = Color::FromHex(0xff8c00); +constexpr Color darkorchid = Color::FromHex(0x9932cc); +constexpr Color darkred = Color::FromHex(0x8b0000); +constexpr Color darksalmon = Color::FromHex(0xe9967a); +constexpr Color darkseagreen = Color::FromHex(0x8fbc8f); +constexpr Color darkslateblue = Color::FromHex(0x483d8b); +constexpr Color darkslategray = Color::FromHex(0x2f4f4f); +constexpr Color darkslategrey = Color::FromHex(0x2f4f4f); +constexpr Color darkturquoise = Color::FromHex(0x00ced1); +constexpr Color darkviolet = Color::FromHex(0x9400d3); +constexpr Color deeppink = Color::FromHex(0xff1493); +constexpr Color deepskyblue = Color::FromHex(0x00bfff); +constexpr Color dimgray = Color::FromHex(0x696969); +constexpr Color dimgrey = Color::FromHex(0x696969); +constexpr Color dodgerblue = Color::FromHex(0x1e90ff); +constexpr Color firebrick = Color::FromHex(0xb22222); +constexpr Color floralwhite = Color::FromHex(0xfffaf0); +constexpr Color forestgreen = Color::FromHex(0x228b22); +constexpr Color gainsboro = Color::FromHex(0xdcdcdc); +constexpr Color ghostwhite = Color::FromHex(0xf8f8ff); +constexpr Color gold = Color::FromHex(0xffd700); +constexpr Color goldenrod = Color::FromHex(0xdaa520); +constexpr Color greenyellow = Color::FromHex(0xadff2f); +constexpr Color grey = Color::FromHex(0x808080); +constexpr Color honeydew = Color::FromHex(0xf0fff0); +constexpr Color hotpink = Color::FromHex(0xff69b4); +constexpr Color indianred = Color::FromHex(0xcd5c5c); +constexpr Color indigo = Color::FromHex(0x4b0082); +constexpr Color ivory = Color::FromHex(0xfffff0); +constexpr Color khaki = Color::FromHex(0xf0e68c); +constexpr Color lavender = Color::FromHex(0xe6e6fa); +constexpr Color lavenderblush = Color::FromHex(0xfff0f5); +constexpr Color lawngreen = Color::FromHex(0x7cfc00); +constexpr Color lemonchiffon = Color::FromHex(0xfffacd); +constexpr Color lightblue = Color::FromHex(0xadd8e6); +constexpr Color lightcoral = Color::FromHex(0xf08080); +constexpr Color lightcyan = Color::FromHex(0xe0ffff); +constexpr Color lightgoldenrodyellow = Color::FromHex(0xfafad2); +constexpr Color lightgray = Color::FromHex(0xd3d3d3); +constexpr Color lightgreen = Color::FromHex(0x90ee90); +constexpr Color lightgrey = Color::FromHex(0xd3d3d3); +constexpr Color lightpink = Color::FromHex(0xffb6c1); +constexpr Color lightsalmon = Color::FromHex(0xffa07a); +constexpr Color lightseagreen = Color::FromHex(0x20b2aa); +constexpr Color lightskyblue = Color::FromHex(0x87cefa); +constexpr Color lightslategray = Color::FromHex(0x778899); +constexpr Color lightslategrey = Color::FromHex(0x778899); +constexpr Color lightsteelblue = Color::FromHex(0xb0c4de); +constexpr Color lightyellow = Color::FromHex(0xffffe0); +constexpr Color limegreen = Color::FromHex(0x32cd32); +constexpr Color linen = Color::FromHex(0xfaf0e6); +constexpr Color magenta = fuchsia; +constexpr Color mediumaquamarine = Color::FromHex(0x66cdaa); +constexpr Color mediumblue = Color::FromHex(0x0000cd); +constexpr Color mediumorchid = Color::FromHex(0xba55d3); +constexpr Color mediumpurple = Color::FromHex(0x9370db); +constexpr Color mediumseagreen = Color::FromHex(0x3cb371); +constexpr Color mediumslateblue = Color::FromHex(0x7b68ee); +constexpr Color mediumspringgreen = Color::FromHex(0x00fa9a); +constexpr Color mediumturquoise = Color::FromHex(0x48d1cc); +constexpr Color mediumvioletred = Color::FromHex(0xc71585); +constexpr Color midnightblue = Color::FromHex(0x191970); +constexpr Color mintcream = Color::FromHex(0xf5fffa); +constexpr Color mistyrose = Color::FromHex(0xffe4e1); +constexpr Color moccasin = Color::FromHex(0xffe4b5); +constexpr Color navajowhite = Color::FromHex(0xffdead); +constexpr Color oldlace = Color::FromHex(0xfdf5e6); +constexpr Color olivedrab = Color::FromHex(0x6b8e23); +constexpr Color orangered = Color::FromHex(0xff4500); +constexpr Color orchid = Color::FromHex(0xda70d6); +constexpr Color palegoldenrod = Color::FromHex(0xeee8aa); +constexpr Color palegreen = Color::FromHex(0x98fb98); +constexpr Color paleturquoise = Color::FromHex(0xafeeee); +constexpr Color palevioletred = Color::FromHex(0xdb7093); +constexpr Color papayawhip = Color::FromHex(0xffefd5); +constexpr Color peachpuff = Color::FromHex(0xffdab9); +constexpr Color peru = Color::FromHex(0xcd853f); +constexpr Color pink = Color::FromHex(0xffc0cb); +constexpr Color plum = Color::FromHex(0xdda0dd); +constexpr Color powderblue = Color::FromHex(0xb0e0e6); +constexpr Color rosybrown = Color::FromHex(0xbc8f8f); +constexpr Color royalblue = Color::FromHex(0x4169e1); +constexpr Color saddlebrown = Color::FromHex(0x8b4513); +constexpr Color salmon = Color::FromHex(0xfa8072); +constexpr Color sandybrown = Color::FromHex(0xf4a460); +constexpr Color seagreen = Color::FromHex(0x2e8b57); +constexpr Color seashell = Color::FromHex(0xfff5ee); +constexpr Color sienna = Color::FromHex(0xa0522d); constexpr Color skyblue = Color::FromHex(0x87ceeb); +constexpr Color slateblue = Color::FromHex(0x6a5acd); +constexpr Color slategray = Color::FromHex(0x708090); +constexpr Color slategrey = Color::FromHex(0x708090); +constexpr Color snow = Color::FromHex(0xfffafa); +constexpr Color springgreen = Color::FromHex(0x00ff7f); +constexpr Color steelblue = Color::FromHex(0x4682b4); +constexpr Color tan = Color::FromHex(0xd2b48c); +constexpr Color thistle = Color::FromHex(0xd8bfd8); +constexpr Color tomato = Color::FromHex(0xff6347); +constexpr Color turquoise = Color::FromHex(0x40e0d0); +constexpr Color violet = Color::FromHex(0xee82ee); +constexpr Color wheat = Color::FromHex(0xf5deb3); +constexpr Color whitesmoke = Color::FromHex(0xf5f5f5); +constexpr Color yellowgreen = Color::FromHex(0x9acd32); +constexpr Color rebeccapurple = Color::FromHex(0x663399); } // namespace colors } // namespace cru::platform diff --git a/include/cru/ui/base.hpp b/include/cru/ui/base.hpp index fe53edd4..796f4df5 100644 --- a/include/cru/ui/base.hpp +++ b/include/cru/ui/base.hpp @@ -29,8 +29,153 @@ using cru::platform::native::mouse_buttons::right; namespace colors { using cru::platform::colors::black; -using cru::platform::colors::skyblue; +using cru::platform::colors::silver; +using cru::platform::colors::gray; using cru::platform::colors::white; +using cru::platform::colors::maroon; +using cru::platform::colors::red; +using cru::platform::colors::purple; +using cru::platform::colors::fuchsia; +using cru::platform::colors::green; +using cru::platform::colors::lime; +using cru::platform::colors::olive; +using cru::platform::colors::yellow; +using cru::platform::colors::navy; +using cru::platform::colors::blue; +using cru::platform::colors::teal; +using cru::platform::colors::aqua; +using cru::platform::colors::orange; +using cru::platform::colors::aliceblue; +using cru::platform::colors::antiquewhite; +using cru::platform::colors::aquamarine; +using cru::platform::colors::azure; +using cru::platform::colors::beige; +using cru::platform::colors::bisque; +using cru::platform::colors::blanchedalmond; +using cru::platform::colors::blueviolet; +using cru::platform::colors::brown; +using cru::platform::colors::burlywood; +using cru::platform::colors::cadetblue; +using cru::platform::colors::chartreuse; +using cru::platform::colors::chocolate; +using cru::platform::colors::coral; +using cru::platform::colors::cornflowerblue; +using cru::platform::colors::cornsilk; +using cru::platform::colors::crimson; +using cru::platform::colors::cyan; +using cru::platform::colors::darkblue; +using cru::platform::colors::darkcyan; +using cru::platform::colors::darkgoldenrod; +using cru::platform::colors::darkgray; +using cru::platform::colors::darkgreen; +using cru::platform::colors::darkgrey; +using cru::platform::colors::darkkhaki; +using cru::platform::colors::darkmagenta; +using cru::platform::colors::darkolivegreen; +using cru::platform::colors::darkorange; +using cru::platform::colors::darkorchid; +using cru::platform::colors::darkred; +using cru::platform::colors::darksalmon; +using cru::platform::colors::darkseagreen; +using cru::platform::colors::darkslateblue; +using cru::platform::colors::darkslategray; +using cru::platform::colors::darkslategrey; +using cru::platform::colors::darkturquoise; +using cru::platform::colors::darkviolet; +using cru::platform::colors::deeppink; +using cru::platform::colors::deepskyblue; +using cru::platform::colors::dimgray; +using cru::platform::colors::dimgrey; +using cru::platform::colors::dodgerblue; +using cru::platform::colors::firebrick; +using cru::platform::colors::floralwhite; +using cru::platform::colors::forestgreen; +using cru::platform::colors::gainsboro; +using cru::platform::colors::ghostwhite; +using cru::platform::colors::gold; +using cru::platform::colors::goldenrod; +using cru::platform::colors::greenyellow; +using cru::platform::colors::grey; +using cru::platform::colors::honeydew; +using cru::platform::colors::hotpink; +using cru::platform::colors::indianred; +using cru::platform::colors::indigo; +using cru::platform::colors::ivory; +using cru::platform::colors::khaki; +using cru::platform::colors::lavender; +using cru::platform::colors::lavenderblush; +using cru::platform::colors::lawngreen; +using cru::platform::colors::lemonchiffon; +using cru::platform::colors::lightblue; +using cru::platform::colors::lightcoral; +using cru::platform::colors::lightcyan; +using cru::platform::colors::lightgoldenrodyellow; +using cru::platform::colors::lightgray; +using cru::platform::colors::lightgreen; +using cru::platform::colors::lightgrey; +using cru::platform::colors::lightpink; +using cru::platform::colors::lightsalmon; +using cru::platform::colors::lightseagreen; +using cru::platform::colors::lightskyblue; +using cru::platform::colors::lightslategray; +using cru::platform::colors::lightslategrey; +using cru::platform::colors::lightsteelblue; +using cru::platform::colors::lightyellow; +using cru::platform::colors::limegreen; +using cru::platform::colors::linen; +using cru::platform::colors::magenta; +using cru::platform::colors::mediumaquamarine; +using cru::platform::colors::mediumblue; +using cru::platform::colors::mediumorchid; +using cru::platform::colors::mediumpurple; +using cru::platform::colors::mediumseagreen; +using cru::platform::colors::mediumslateblue; +using cru::platform::colors::mediumspringgreen; +using cru::platform::colors::mediumturquoise; +using cru::platform::colors::mediumvioletred; +using cru::platform::colors::midnightblue; +using cru::platform::colors::mintcream; +using cru::platform::colors::mistyrose; +using cru::platform::colors::moccasin; +using cru::platform::colors::navajowhite; +using cru::platform::colors::oldlace; +using cru::platform::colors::olivedrab; +using cru::platform::colors::orangered; +using cru::platform::colors::orchid; +using cru::platform::colors::palegoldenrod; +using cru::platform::colors::palegreen; +using cru::platform::colors::paleturquoise; +using cru::platform::colors::palevioletred; +using cru::platform::colors::papayawhip; +using cru::platform::colors::peachpuff; +using cru::platform::colors::peru; +using cru::platform::colors::pink; +using cru::platform::colors::plum; +using cru::platform::colors::powderblue; +using cru::platform::colors::rosybrown; +using cru::platform::colors::royalblue; +using cru::platform::colors::saddlebrown; +using cru::platform::colors::salmon; +using cru::platform::colors::sandybrown; +using cru::platform::colors::seagreen; +using cru::platform::colors::seashell; +using cru::platform::colors::sienna; +using cru::platform::colors::skyblue; +using cru::platform::colors::slateblue; +using cru::platform::colors::slategray; +using cru::platform::colors::slategrey; +using cru::platform::colors::snow; +using cru::platform::colors::springgreen; +using cru::platform::colors::steelblue; +using cru::platform::colors::tan; +using cru::platform::colors::thistle; +using cru::platform::colors::tomato; +using cru::platform::colors::turquoise; +using cru::platform::colors::violet; +using cru::platform::colors::wheat; +using cru::platform::colors::whitesmoke; +using cru::platform::colors::yellowgreen; +using cru::platform::colors::rebeccapurple; } // namespace colors //-------------------- region: forward declaration -------------------- |