00001 #ifndef BICOLORED_CLASS 00002 #define BICOLORED_CLASS 00003 00004 /*****************************************************************************\ 00005 * * 00006 * Name : bicolored * 00007 * Author : Chris Koeritz * 00008 * * 00009 * Purpose: * 00010 * * 00011 * Implements the notion of a graphical object having a background color * 00012 * behind its foreground color. * 00013 * * 00014 ******************************************************************************* 00015 * Copyright (c) 1991-$now By Author. This program is free software; you can * 00016 * redistribute it and/or modify it under the terms of the GNU General Public * 00017 * License as published by the Free Software Foundation; either version 2 of * 00018 * the License or (at your option) any later version. This is online at: * 00019 * http://www.fsf.org/copyleft/gpl.html * 00020 * Please send any updates to: fred@gruntose.com * 00021 \*****************************************************************************/ 00022 00023 #include "color.h" 00024 #include "palette.h" 00025 00026 class bicolored 00027 { 00028 public: 00029 bicolored(const color &initial_background, palette &add_to, 00030 window_handle target = NIL); 00031 // starts the background as "initial_background". the color is added to 00032 // the palette "add_to" if necessary. if "target" is non-NIL, 00033 // then its background color is set. 00034 00035 ~bicolored(); 00036 00037 color background() const; 00038 void background(const color &new_background, palette &add_to, 00039 window_handle target = NIL); 00040 // uses a new background color. 00041 00042 private: 00043 color _background; 00044 }; 00045 00046 #endif
1.5.1