00001 #ifndef BICOLORED_IMPLEMENTATION_FILE 00002 #define BICOLORED_IMPLEMENTATION_FILE 00003 00004 /*****************************************************************************\ 00005 * * 00006 * Name : bicolored * 00007 * Author : Chris Koeritz * 00008 * * 00009 ******************************************************************************* 00010 * Copyright (c) 1991-$now By Author. This program is free software; you can * 00011 * redistribute it and/or modify it under the terms of the GNU General Public * 00012 * License as published by the Free Software Foundation; either version 2 of * 00013 * the License or (at your option) any later version. This is online at: * 00014 * http://www.fsf.org/copyleft/gpl.html * 00015 * Please send any updates to: fred@gruntose.com * 00016 \*****************************************************************************/ 00017 00018 #include "argument_list.h" 00019 #include "bicolored.h" 00020 #include "palette.h" 00021 #include "wp_implementation.h" 00022 00023 bicolored::bicolored(const color &init, palette &to_add, window_handle target) 00024 { background(init, to_add, target); } 00025 00026 bicolored::~bicolored() {} 00027 00028 color bicolored::background() const { return _background; } 00029 00030 void bicolored::background(const color &new_b, palette &to_add, 00031 window_handle target) 00032 { 00033 _background = new_b; 00034 window_color to_use = to_add.translate(_background); 00035 if (!target) return; 00036 argument_list wargs; 00037 wargs.add(XmNbackground, to_use.pixel); 00038 wargs.apply(target); 00039 } 00040 00041 #endif //BICOLORED_IMPLEMENTATION_FILE 00042
1.5.1