Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _COLORS_H
00024 #define _COLORS_H
00025
00026 #ifdef HAVE_CONFIG_H
00027 # include <config.h>
00028 #endif
00029
00030 #ifdef HAVE_NCURSES_H
00031 # include <ncurses.h>
00032 #else // HAVE_NCURSES_H
00033 # ifdef HAVE_CURSES_H
00034 # include <curses.h>
00035 # else
00036 # error "Neither curses.h nor ncurses.h available"
00037 # endif // HAVE_CURSES_H
00038 #endif // HAVE_NCURSES_H
00039 #include "curswa.h"
00040
00041 #ifdef __CYGWIN__
00042
00043 # ifdef COLORS
00044 # undef COLORS
00045 # endif
00046 #endif
00047
00048 namespace YAPET {
00049 namespace UI {
00055 enum COLORS {
00059 DEFAULT = 0,
00063 MESSAGEBOX_TITLE,
00067 MESSAGEBOX,
00071 INPUTWIDGET_NOFOCUS,
00075 INPUTWIDGET_FOCUS,
00079 BUTTON_NOFOCUS,
00083 BUTTON_FOCUS,
00087 LISTWIDGET,
00091 CHECKBOXGROUP,
00095 CHECKBOXGROUP_TITLE
00096 };
00097
00105 struct color {
00111 short no;
00117 short fg;
00123 short bg;
00129 int attr;
00130 };
00131
00137 class Colors {
00138 private:
00145 static bool initialized;
00152 static color colors[];
00153 public:
00160 static void initColors();
00168 static void setcolor (WINDOW* w, COLORS c);
00169 static void unsetcolor (WINDOW* w, COLORS c);
00180 static short getcolor (COLORS c);
00181 };
00182
00183 }
00184 }
00185
00186 #endif // _COLORS_H