|
degate 0.1.1
|
00001 /* -*-c++-*- 00002 00003 This file is part of the IC reverse engineering tool degate. 00004 00005 Copyright 2008, 2009, 2010 by Martin Schobert 00006 00007 Degate is free software: you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation, either version 3 of the License, or 00010 any later version. 00011 00012 Degate is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with degate. If not, see <http://www.gnu.org/licenses/>. 00019 00020 */ 00021 00022 #ifndef __COLOREDOBJECT_H__ 00023 #define __COLOREDOBJECT_H__ 00024 00025 namespace degate { 00026 00027 /** 00028 * Represents an object that has a frame and a fill color. 00029 */ 00030 00031 class ColoredObject { 00032 private: 00033 color_t fill_color; 00034 color_t frame_color; 00035 00036 public: 00037 ColoredObject() : fill_color(0), frame_color(0) {} 00038 virtual ~ColoredObject() {} 00039 00040 /** 00041 * Is there a frame color definition. 00042 */ 00043 virtual bool has_frame_color() const { return frame_color != 0; } 00044 00045 /** 00046 * Is there a fill color definition. 00047 */ 00048 virtual bool has_fill_color() const { return fill_color != 0; } 00049 00050 /** 00051 * Get the frame color. 00052 */ 00053 virtual color_t get_frame_color() const { return frame_color; } 00054 00055 /** 00056 * Get the fill color. 00057 */ 00058 virtual color_t get_fill_color() const { return fill_color; } 00059 00060 /** 00061 * Set the frame color. 00062 */ 00063 00064 virtual void set_frame_color(color_t c) { frame_color = c; } 00065 00066 /** 00067 * Set the fill color. 00068 */ 00069 virtual void set_fill_color(color_t c) { fill_color = c; } 00070 00071 }; 00072 00073 } 00074 00075 #endif
1.7.4