hk_font.h

00001 // ****************************************************************************
00002 // copyright (c) 2000-2005 Horst Knorr <hk_classes@knoda.org>  
00003 // This file is part of the hk_classes library.
00004 // This file may be distributed and/or modified under the terms of the
00005 // GNU Library Public License version 2 as published by the Free Software
00006 // Foundation and appearing in the file COPYING included in the
00007 // packaging of this file.
00008 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00009 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00010 // ****************************************************************************
00011 #ifndef HK_FONT
00012 #define HK_FONT
00013 #include "hk_class.h"
00014 
00015 class hk_font : public hk_class
00016 {
00017 public:
00018   hk_font();
00019   hk_font(const hk_string& fontname,int fontsize);
00020   hk_font(const hk_font&);
00021   void set_font(const hk_string& fontname,int fontsize);
00022   void set_font(const hk_font&);
00023   hk_string fontname(void) const;
00024   int fontsize(void) const;
00025   void set_bold(bool);
00026   bool bold(void) const;
00027   void set_italic(bool);
00028   bool italic(void) const;
00029   bool operator=(const hk_font&);
00030   bool operator==(const hk_font&);
00031   bool operator!=(const hk_font&);
00032   hk_string psfontname(void)const;
00033   static void set_defaultfont(const hk_string& d,int s);
00034   static hk_string defaultfontname(void);
00035   static int defaultfontsize(void);
00036 
00037 virtual void savedata(ostream& s );
00038 virtual void loaddata(const hk_string& definition);
00039 
00040 
00041 protected:
00042 
00043 
00044 private:
00045 bool is_equal(const hk_font&);
00046 hk_string p_fontname;
00047 int       p_fontsize;
00048 bool p_italic;
00049 bool p_bold;
00050 static hk_string p_defaultfont;
00051 static int   p_defaultfontsize;
00052 
00053 
00054 
00055 };
00056 
00057 ostream& operator<<(ostream&,hk_font&);
00058 ostream& operator<<(ostream&,const hk_font&);
00059 
00060 #endif

Generated on Tue May 2 09:15:35 2006 for Databaseconnectionclasses by  doxygen 1.4.6