Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00032
00033 #pragma once
00034
00035 #include "../api_display.h"
00036 #include "../../Core/Text/string_types.h"
00037 #include "../../Core/System/sharedptr.h"
00038
00039 class CL_DisplayWindow;
00040 class CL_FontDescription_Impl;
00041
00046 class CL_API_DISPLAY CL_FontDescription
00047 {
00050
00051 public:
00053 CL_FontDescription();
00054
00055 virtual ~CL_FontDescription();
00056
00060 static CL_FontDescription create_null_object();
00061
00065
00066 public:
00067
00068 enum Charset
00069 {
00070 charset_default,
00071 charset_ansi,
00072 charset_baltic,
00073 charset_chinesebig5,
00074 charset_easteurope,
00075 charset_gb2312,
00076 charset_greek,
00077 charset_hangul,
00078 charset_mac,
00079 charset_oem,
00080 charset_russian,
00081 charset_shiftjis,
00082 charset_symbol,
00083 charset_turkish,
00084 charset_vietnamese,
00085 charset_johab,
00086 charset_arabic,
00087 charset_hebrew,
00088 charset_thai
00089 };
00090
00092 bool is_null() const { return !impl; }
00093
00095 void throw_if_null() const;
00096
00098 const CL_String &get_typeface_name() const;
00099
00101 int get_height() const;
00102
00104 int get_average_width() const;
00105
00107 float get_escapement() const;
00108
00110 float get_orientation() const;
00111
00113 int get_weight() const;
00114
00116 bool get_italic() const;
00117
00119 bool get_underline() const;
00120
00122 bool get_strikeout() const;
00123
00125 bool get_fixed_pitch() const;
00126
00128 bool get_anti_alias() const;
00129
00131 bool get_subpixel() const;
00132
00134 Charset get_charset() const;
00135
00137 bool operator==(const CL_FontDescription &other) const;
00138
00142
00143 public:
00145 CL_FontDescription &operator =(const CL_FontDescription ©);
00146
00147
00148 void clone(const CL_FontDescription ©);
00149
00151 void set_typeface_name(const CL_String &name);
00152
00154 void set_height(int value);
00155
00157 void set_average_width(int value);
00158
00160 void set_escapement(float value);
00161
00163 void set_orientation(float value);
00164
00166 void set_weight(int value);
00167
00169 void set_italic(bool setting = true);
00170
00172 void set_underline(bool setting = true);
00173
00175 void set_strikeout(bool setting = true);
00176
00178 void set_fixed_pitch(bool setting = true);
00179
00181 void set_anti_alias(bool setting = true);
00182
00184 void set_subpixel(bool setting = true);
00185
00189 void set_charset(Charset new_charset);
00190
00194
00195 private:
00196 CL_SharedPtr<CL_FontDescription_Impl> impl;
00198 };
00199
00201