/* ui/palette.cc This file is part of the Osirion project and is distributed under the terms of the GNU General Public License version 2 */ #include "ui/palette.h" #include "sys/sys.h" namespace ui { Palette::Palette() { palette_foreground.assign(0.8f, 1.0f); palette_highlight.assign(1.0f, 1.0f); palette_background.assign(0.5f, 0.5f); palette_border.assign(0.0f, 0.8f, 0.0f); palette_pointer.assign(0.0f, 0.5f, 0.0f); palette_active.assign(0.0f, 1.0f, 0.0f); } Palette::~Palette() { } const math::Color &Palette::color(Color palettecolor) const { switch(palettecolor) { case Foreground: return foreground(); break; case Background: return background(); break; case Highlight: return highlight(); break; case Border: return border(); break; case Pointer: return pointer(); break; case Active: return active(); break; default: return foreground(); break; } } void Palette::set_foreground(math::Color const &color) { palette_foreground.assign(color); } void Palette::set_highlight(math::Color const &color) { palette_highlight.assign(color); } void Palette::set_background(math::Color const &color) { palette_background.assign(color); } void Palette::set_border(math::Color const &color) { palette_border.assign(color); } void Palette::set_pointer(math::Color const &color) { palette_pointer.assign(color); } void Palette::set_active(math::Color const &color) { palette_active.assign(color); } }