|
Rapicorn - Experimental UI Toolkit - Source Code 10.08.1
|
00001 /* Rapicorn 00002 * Copyright (C) 2008 Tim Janik 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2.1 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Lesser General Public License for more details. 00013 * 00014 * A copy of the GNU Lesser General Public License should ship along 00015 * with this library; if not, see http://www.gnu.org/copyleft/. 00016 */ 00017 #ifndef __RAPICORN_HERITAGE_HH__ 00018 #define __RAPICORN_HERITAGE_HH__ 00019 00020 #include <ui/primitives.hh> 00021 00022 namespace Rapicorn { 00023 00024 class WindowImpl; 00025 class ItemImpl; 00026 00027 class Heritage : public virtual BaseObject { 00028 friend class ClassDoctor; 00029 class Internals; 00030 Internals *m_internals; 00031 WindowImpl &m_window; 00032 explicit Heritage (WindowImpl &window, 00033 Internals *internals); 00034 /*Des*/ ~Heritage (); 00035 static 00036 Heritage* create_heritage (WindowImpl &window, 00037 ItemImpl &item, 00038 ColorSchemeType color_scheme); 00039 public: 00040 Heritage* adapt_heritage (ItemImpl &item, 00041 ColorSchemeType color_scheme); 00042 WindowImpl& window () const { return m_window; } 00043 /* colors */ 00044 Color get_color (StateType state, 00045 ColorType ct) const; 00046 Color foreground (StateType st = STATE_NORMAL) const { return get_color (st, COLOR_FOREGROUND); } 00047 Color background (StateType st = STATE_NORMAL) const { return get_color (st, COLOR_BACKGROUND); } 00048 Color background_even (StateType st = STATE_NORMAL) const { return get_color (st, COLOR_BACKGROUND_EVEN); } 00049 Color background_odd (StateType st = STATE_NORMAL) const { return get_color (st, COLOR_BACKGROUND_ODD); } 00050 Color dark_color (StateType st = STATE_NORMAL) const { return get_color (st, COLOR_DARK); } 00051 Color dark_shadow (StateType st = STATE_NORMAL) const { return get_color (st, COLOR_DARK_SHADOW); } 00052 Color dark_glint (StateType st = STATE_NORMAL) const { return get_color (st, COLOR_DARK_GLINT); } 00053 Color light_color (StateType st = STATE_NORMAL) const { return get_color (st, COLOR_LIGHT); } 00054 Color light_shadow (StateType st = STATE_NORMAL) const { return get_color (st, COLOR_LIGHT_SHADOW); } 00055 Color light_glint (StateType st = STATE_NORMAL) const { return get_color (st, COLOR_LIGHT_GLINT); } 00056 Color focus_color (StateType st = STATE_NORMAL) const { return get_color (st, COLOR_FOCUS); } 00057 Color black (StateType st = STATE_NORMAL) const { return get_color (st, COLOR_BLACK); } 00058 Color white (StateType st = STATE_NORMAL) const { return get_color (st, COLOR_WHITE); } 00059 Color red (StateType st = STATE_NORMAL) const { return get_color (st, COLOR_RED); } 00060 Color yellow (StateType st = STATE_NORMAL) const { return get_color (st, COLOR_YELLOW); } 00061 Color green (StateType st = STATE_NORMAL) const { return get_color (st, COLOR_GREEN); } 00062 Color cyan (StateType st = STATE_NORMAL) const { return get_color (st, COLOR_CYAN); } 00063 Color blue (StateType st = STATE_NORMAL) const { return get_color (st, COLOR_BLUE); } 00064 Color magenta (StateType st = STATE_NORMAL) const { return get_color (st, COLOR_MAGENTA); } 00065 Color insensitive_ink (StateType st = STATE_NORMAL, Color *glint = NULL) const; 00066 /* variants */ 00067 Heritage& selected (); 00068 /* parsing */ 00069 Color resolve_color (const String &color_name, 00070 StateType state, 00071 ColorType color_type = COLOR_NONE); 00072 }; 00073 00074 } // Rapicorn 00075 00076 #endif /* __RAPICORN_HERITAGE_HH__ */
1.7.4