summaryrefslogtreecommitdiff
path: root/ycurses/src/curses/color.cpp
diff options
context:
space:
mode:
authorPaul Buetow (mars.fritz.box) <paul@buetow.org>2013-12-15 11:49:02 +0100
committerPaul Buetow (mars.fritz.box) <paul@buetow.org>2013-12-15 11:49:02 +0100
commit3a96ab7e91145b367d05e98533b5f426f762f83f (patch)
treeac7758a706066e14b785ab6e5f7071a54baa856b /ycurses/src/curses/color.cpp
parent332d7b2107833018b3ef67b64ffe121bff1ef4fb (diff)
add packagespackages
Diffstat (limited to 'ycurses/src/curses/color.cpp')
-rw-r--r--ycurses/src/curses/color.cpp54
1 files changed, 0 insertions, 54 deletions
diff --git a/ycurses/src/curses/color.cpp b/ycurses/src/curses/color.cpp
deleted file mode 100644
index 190d343..0000000
--- a/ycurses/src/curses/color.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-#ifndef COLOR_CPP
-#define COLOR_CPP
-
-#include "color.h"
-
-bool color::b_activated = false;
-int color::i_pair_count = 0;
-
-color::color(short i, short j)
- : i_foreground(i), i_background(j)
-{
- init();
-
- i_pair = ++i_pair_count;
-
- /*
- * Simple color assignment. color pair 0 cannot
- * be redefined.
- */
- init_pair(i_pair, i_foreground, i_background);
-}
-
-color::~color()
-{
-}
-
-void
-color::init()
-{
- if ( !b_activated )
- {
- if (has_colors())
- {
- start_color();
- b_activated = true;
- }
- }
-}
-
-void
-color::enable()
-{
- attron(COLOR_PAIR(i_pair));
-}
-
-void
-color::disable()
-{
- attroff(COLOR_PAIR(i_pair));
-}
-
-
-#endif
-