00001 /*************************************************************************** 00002 stylecolour.h - description 00003 ------------------- 00004 begin : Die Nov 5 2002 00005 copyright : (C) 2002 by Andre Simon 00006 email : andre.simon1@gmx.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef STYLECOLOUR_H 00019 #define STYLECOLOUR_H 00020 00021 #include <string> 00022 #include <sstream> 00023 #include <fstream> 00024 #include <cmath> 00025 #include <sstream> 00026 00027 using namespace std; 00028 00029 namespace highlight { 00030 00035 class StyleColour 00036 { 00037 public: 00043 StyleColour(const string & r_hex, const string & g_hex, const string & b_hex); 00044 00048 StyleColour(const string & styleColourString); 00049 00050 StyleColour(); 00051 ~StyleColour(){}; 00052 00056 void setRGBValues(const string & styleColourString); 00057 00060 void setRedValue(const string & r_hex); 00061 00064 void setGreenValue(const string & g_hex); 00065 00068 void setBlueValue(const string & b_hex); 00069 00071 string& getHexRedValue(); 00073 string& getHexGreenValue(); 00075 string& getHexBlueValue(); 00076 00078 string getLatexRedValue(); 00080 string getLatexGreenValue(); 00082 string getLatexBlueValue(); 00083 00085 string getTexRedValue(); 00087 string getTexGreenValue(); 00089 string getTexBlueValue(); 00090 00092 string getRTFRedValue(); 00094 string getRTFGreenValue(); 00096 string getRTFBlueValue(); 00097 00098 private: 00099 string r, g, b; 00100 string int2str(int); 00101 string float2str(double); 00102 int hex2dec(const string &hexVal); 00103 }; 00104 00105 } 00106 00107 #endif