font_description.h

Go to the documentation of this file.
00001 /*
00002 **  ClanLib SDK
00003 **  Copyright (c) 1997-2009 The ClanLib Team
00004 **
00005 **  This software is provided 'as-is', without any express or implied
00006 **  warranty.  In no event will the authors be held liable for any damages
00007 **  arising from the use of this software.
00008 **
00009 **  Permission is granted to anyone to use this software for any purpose,
00010 **  including commercial applications, and to alter it and redistribute it
00011 **  freely, subject to the following restrictions:
00012 **
00013 **  1. The origin of this software must not be misrepresented; you must not
00014 **     claim that you wrote the original software. If you use this software
00015 **     in a product, an acknowledgment in the product documentation would be
00016 **     appreciated but is not required.
00017 **  2. Altered source versions must be plainly marked as such, and must not be
00018 **     misrepresented as being the original software.
00019 **  3. This notice may not be removed or altered from any source distribution.
00020 **
00021 **  Note: Some of the libraries ClanLib may link to may have additional
00022 **  requirements or restrictions.
00023 **
00024 **  File Author(s):
00025 **
00026 **    Mark Page
00027 **    Harry Storbacka
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 
00058         CL_FontDescription(const CL_FontDescription &copy);
00059 
00060         virtual ~CL_FontDescription();
00061 
00065         static CL_FontDescription create_null_object();
00066 
00070 
00071 public:
00072 
00076         bool is_null() const;
00077 
00079         const CL_String &get_typeface_name() const;
00080 
00082         int get_height() const;
00083 
00085         int get_average_width() const;
00086 
00088         float get_escapement() const;
00089 
00091         float get_orientation() const;
00092 
00094         int get_weight() const;
00095 
00097         bool get_italic() const;
00098 
00100         bool get_underline() const;
00101 
00103         bool get_strikeout() const;
00104 
00106         bool get_fixed_pitch() const;
00107 
00109         bool get_anti_alias() const;
00110 
00112         bool get_anti_alias_set() const;
00113 
00115         bool operator==(const CL_FontDescription &other) const;
00116 
00120 
00121 public:
00123         CL_FontDescription &operator =(const CL_FontDescription &copy);
00124 
00125         // \brief Copy the entire font description (not just the implementation)
00126         void clone(const CL_FontDescription &copy);
00127 
00129         void set_typeface_name(const CL_String &name);
00130 
00132         void set_height(int value);
00133 
00135         void set_average_width(int value);
00136 
00138         void set_escapement(float value);
00139 
00141         void set_orientation(float value);
00142 
00144         void set_weight(int value);
00145 
00147         void set_italic(bool setting = true);
00148 
00150         void set_underline(bool setting = true);
00151 
00153         void set_strikeout(bool setting = true);
00154 
00156         void set_fixed_pitch(bool setting = true);
00157 
00159         void set_anti_alias(bool setting = true);
00160 
00164 
00165 private:
00166         CL_SharedPtr<CL_FontDescription_Impl> impl;
00168 };
00169 
00171 

Generated on Thu Dec 3 02:39:29 2009 for ClanLib by  doxygen 1.4.6