Sophie

Sophie

distrib > Mandriva > 10.0-com > i586 > by-pkgid > af7a4b7f1ee5a4a084c41b9005da5527 > files > 1465

libfox1.1_46-devel-1.1.46-1mdk.i586.rpm

<html>
<head>
<link rel="stylesheet" href="page.css" type="text/css">
<title>fox-toolkit.org - Documentation</title>
</head>
<body bgcolor=#ffffff link=#990033 vlink=#990033 alink=#990033 text=#000000>
<font face='verdana,sans-serif' size=2 >

<!---- TOPIC TITLE WITH LOGO--->
<table border=0 cellpadding= cellspacing=2 width=100% ><tr><td><a href='http://www.fox-toolkit.org/doc.html'><img src='../art/foxlogo_small.jpg' border=0></a></td><td width=100% valign=bottom><font face='verdana,sans-serif' size=2 ><b>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a>
<br><img src='../art/line.gif' width=100% height=1></b></font></td></tr></table>
<p>
<!--- TOPIC TITLE WITH LOGO --->
<!-- Generated by Doxygen 1.3.3 -->
<h1>FXFont.h</h1><div class="fragment"><pre>00001 <span class="comment">/********************************************************************************</span>
00002 <span class="comment">*                                                                               *</span>
00003 <span class="comment">*                               F o n t   O b j e c t                           *</span>
00004 <span class="comment">*                                                                               *</span>
00005 <span class="comment">*********************************************************************************</span>
00006 <span class="comment">* Copyright (C) 1997,2004 by Jeroen van der Zijp.   All Rights Reserved.        *</span>
00007 <span class="comment">*********************************************************************************</span>
00008 <span class="comment">* This library is free software; you can redistribute it and/or                 *</span>
00009 <span class="comment">* modify it under the terms of the GNU Lesser General Public                    *</span>
00010 <span class="comment">* License as published by the Free Software Foundation; either                  *</span>
00011 <span class="comment">* version 2.1 of the License, or (at your option) any later version.            *</span>
00012 <span class="comment">*                                                                               *</span>
00013 <span class="comment">* This library is distributed in the hope that it will be useful,               *</span>
00014 <span class="comment">* but WITHOUT ANY WARRANTY; without even the implied warranty of                *</span>
00015 <span class="comment">* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU             *</span>
00016 <span class="comment">* Lesser General Public License for more details.                               *</span>
00017 <span class="comment">*                                                                               *</span>
00018 <span class="comment">* You should have received a copy of the GNU Lesser General Public              *</span>
00019 <span class="comment">* License along with this library; if not, write to the Free Software           *</span>
00020 <span class="comment">* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.    *</span>
00021 <span class="comment">*********************************************************************************</span>
00022 <span class="comment">* $Id: FXFont.h,v 1.42 2004/01/21 07:09:58 fox Exp $                            *</span>
00023 <span class="comment">********************************************************************************/</span>
00024 <span class="preprocessor">#ifndef FXFONT_H</span>
00025 <span class="preprocessor"></span><span class="preprocessor">#define FXFONT_H</span>
00026 <span class="preprocessor"></span>
00027 <span class="preprocessor">#ifndef FXID_H</span>
00028 <span class="preprocessor"></span><span class="preprocessor">#include "FXId.h"</span>
00029 <span class="preprocessor">#endif</span>
00030 <span class="preprocessor"></span>
00031 <span class="keyword">namespace </span>FX {
00032 
00033 <span class="comment"></span>
00034 <span class="comment">/// Font style hints which influence the matcher</span>
00035 <span class="comment"></span><span class="keyword">enum</span> <a class="code" href="group__FXFont__0.html#a0">FXFontHint</a> {
00036   <a class="code" href="group__FXFont__0.html#a0a346">FONTPITCH_DEFAULT</a>    = 0,         <span class="comment">/// Default pitch</span>
00037 <span class="comment"></span>  <a class="code" href="group__FXFont__0.html#a0a347">FONTPITCH_FIXED</a>      = 1,         <span class="comment">/// Fixed pitch, mono-spaced</span>
<a name="l00038"></a><a class="code" href="group__FXFont__0.html#a0">00038</a> <span class="comment"></span>  <a class="code" href="group__FXFont__0.html#a0a348">FONTPITCH_VARIABLE</a>   = 2,         <span class="comment">/// Variable pitch, proportional spacing</span>
00039 <span class="comment"></span>  <a class="code" href="group__FXFont__0.html#a0a349">FONTHINT_DONTCARE</a>    = 0,         <span class="comment">/// Don't care which font</span>
00040 <span class="comment"></span>  <a class="code" href="group__FXFont__0.html#a0a350">FONTHINT_DECORATIVE</a>  = 4,         <span class="comment">/// Fancy fonts</span>
00041 <span class="comment"></span>  <a class="code" href="group__FXFont__0.html#a0a351">FONTHINT_MODERN</a>      = 8,         <span class="comment">/// Monospace typewriter font</span>
00042 <span class="comment"></span>  <a class="code" href="group__FXFont__0.html#a0a352">FONTHINT_ROMAN</a>       = 16,        <span class="comment">/// Variable width times-like font, serif</span>
00043 <span class="comment"></span>  <a class="code" href="group__FXFont__0.html#a0a353">FONTHINT_SCRIPT</a>      = 32,        <span class="comment">/// Script or cursive</span>
00044 <span class="comment"></span>  <a class="code" href="group__FXFont__0.html#a0a354">FONTHINT_SWISS</a>       = 64,        <span class="comment">/// Helvetica/swiss type font, sans-serif</span>
00045 <span class="comment"></span>  <a class="code" href="group__FXFont__0.html#a0a355">FONTHINT_SYSTEM</a>      = 128,       <span class="comment">/// System font</span>
00046 <span class="comment"></span>  <a class="code" href="group__FXFont__0.html#a0a356">FONTHINT_X11</a>         = 256,       <span class="comment">/// X11 Font string</span>
00047 <span class="comment"></span>  <a class="code" href="group__FXFont__0.html#a0a357">FONTHINT_SCALABLE</a>    = 512,       <span class="comment">/// Scalable fonts</span>
00048 <span class="comment"></span>  <a class="code" href="group__FXFont__0.html#a0a358">FONTHINT_POLYMORPHIC</a> = 1024       <span class="comment">/// Polymorphic fonts</span>
00049 <span class="comment"></span>  };
00050 
00051 <span class="comment"></span>
00052 <span class="comment">/// Font slant</span>
00053 <span class="comment"></span><span class="keyword">enum</span> <a class="code" href="group__FXFont__1.html#a0">FXFontSlant</a> {
00054   <a class="code" href="group__FXFont__1.html#a0a359">FONTSLANT_DONTCARE</a>        = 0,        <span class="comment">/// Don't care about slant</span>
00055 <span class="comment"></span>  <a class="code" href="group__FXFont__1.html#a0a360">FONTSLANT_REGULAR</a>         = 1,        <span class="comment">/// Regular straight up</span>
00056 <span class="comment"></span>  <a class="code" href="group__FXFont__1.html#a0a361">FONTSLANT_ITALIC</a>          = 2,        <span class="comment">/// Italics</span>
00057 <span class="comment"></span>  <a class="code" href="group__FXFont__1.html#a0a362">FONTSLANT_OBLIQUE</a>         = 3,        <span class="comment">/// Oblique slant</span>
00058 <span class="comment"></span>  <a class="code" href="group__FXFont__1.html#a0a363">FONTSLANT_REVERSE_ITALIC</a>  = 4,        <span class="comment">/// Reversed italic</span>
00059 <span class="comment"></span>  <a class="code" href="group__FXFont__1.html#a0a364">FONTSLANT_REVERSE_OBLIQUE</a> = 5         <span class="comment">/// Reversed oblique</span>
<a name="l00060"></a><a class="code" href="group__FXFont__1.html#a0">00060</a> <span class="comment"></span>  };
00061 
00062 <span class="comment"></span>
00063 <span class="comment">/// Font character set encoding</span>
00064 <span class="comment"></span><span class="keyword">enum</span> <a class="code" href="group__FXFont__2.html#a0">FXFontEncoding</a> {
00065   <a class="code" href="group__FXFont__2.html#a0a365">FONTENCODING_DEFAULT</a>,         <span class="comment">/// Don't care character encoding</span>
00066 <span class="comment"></span>
00067   <a class="code" href="group__FXFont__2.html#a0a366">FONTENCODING_ISO_8859_1</a>   = 1,        <span class="comment">/// West European (Latin1)</span>
00068 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a367">FONTENCODING_ISO_8859_2</a>   = 2,        <span class="comment">/// Central and East European (Latin2)</span>
00069 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a368">FONTENCODING_ISO_8859_3</a>   = 3,        <span class="comment">/// Esperanto (Latin3)</span>
00070 <span class="comment"></span>  FONTENCODING_ISO_8859_4   = 4,
00071   <a class="code" href="group__FXFont__2.html#a0a370">FONTENCODING_ISO_8859_5</a>   = 5,        <span class="comment">/// Cyrillic (almost obsolete)</span>
00072 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a371">FONTENCODING_ISO_8859_6</a>   = 6,        <span class="comment">/// Arabic</span>
00073 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a372">FONTENCODING_ISO_8859_7</a>   = 7,        <span class="comment">/// Greek</span>
00074 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a373">FONTENCODING_ISO_8859_8</a>   = 8,        <span class="comment">/// Hebrew</span>
<a name="l00075"></a><a class="code" href="group__FXFont__2.html#a0">00075</a> <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a374">FONTENCODING_ISO_8859_9</a>   = 9,        <span class="comment">/// Turkish (Latin5)</span>
00076 <span class="comment"></span>  FONTENCODING_ISO_8859_10  = 10,
00077   <a class="code" href="group__FXFont__2.html#a0a376">FONTENCODING_ISO_8859_11</a>  = 11,       <span class="comment">/// Thai</span>
00078 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a377">FONTENCODING_ISO_8859_13</a>  = 13,       <span class="comment">/// Baltic</span>
00079 <span class="comment"></span>  FONTENCODING_ISO_8859_14  = 14,
00080   FONTENCODING_ISO_8859_15  = 15,
00081   FONTENCODING_ISO_8859_16  = 16,
00082   FONTENCODING_KOI8         = 17,
00083   <a class="code" href="group__FXFont__2.html#a0a382">FONTENCODING_KOI8_R</a>       = 18,       <span class="comment">/// Russian</span>
00084 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a383">FONTENCODING_KOI8_U</a>       = 19,       <span class="comment">/// Ukrainian</span>
00085 <span class="comment"></span>  FONTENCODING_KOI8_UNIFIED = 20,
00086 
00087   <a class="code" href="group__FXFont__2.html#a0a385">FONTENCODING_CP437</a>        = 437,      <span class="comment">/// IBM-PC code page</span>
00088 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a386">FONTENCODING_CP850</a>        = 850,      <span class="comment">/// IBMPC Multilingual</span>
00089 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a387">FONTENCODING_CP851</a>        = 851,      <span class="comment">/// IBM-PC Greek</span>
00090 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a388">FONTENCODING_CP852</a>        = 852,      <span class="comment">/// IBM-PC Latin2</span>
00091 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a389">FONTENCODING_CP855</a>        = 855,      <span class="comment">/// IBM-PC Cyrillic</span>
00092 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a390">FONTENCODING_CP856</a>        = 856,      <span class="comment">/// IBM-PC Hebrew</span>
00093 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a391">FONTENCODING_CP857</a>        = 857,      <span class="comment">/// IBM-PC Turkish</span>
00094 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a392">FONTENCODING_CP860</a>        = 860,      <span class="comment">/// IBM-PC Portugese</span>
00095 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a393">FONTENCODING_CP861</a>        = 861,      <span class="comment">/// IBM-PC Iceland</span>
00096 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a394">FONTENCODING_CP862</a>        = 862,      <span class="comment">/// IBM-PC Israel</span>
00097 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a395">FONTENCODING_CP863</a>        = 863,      <span class="comment">/// IBM-PC Canadian/French</span>
00098 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a396">FONTENCODING_CP864</a>        = 864,      <span class="comment">/// IBM-PC Arabic</span>
00099 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a397">FONTENCODING_CP865</a>        = 865,      <span class="comment">/// IBM-PC Nordic</span>
00100 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a398">FONTENCODING_CP866</a>        = 866,      <span class="comment">/// IBM-PC Cyrillic #2</span>
00101 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a399">FONTENCODING_CP869</a>        = 869,      <span class="comment">/// IBM-PC Greek #2</span>
00102 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a400">FONTENCODING_CP870</a>        = 870,      <span class="comment">/// Latin-2 Multilingual</span>
00103 <span class="comment"></span>
00104   <a class="code" href="group__FXFont__2.html#a0a401">FONTENCODING_CP1250</a>       = 1250,     <span class="comment">/// Windows Central European</span>
00105 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a402">FONTENCODING_CP1251</a>       = 1251,     <span class="comment">/// Windows Russian</span>
00106 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a403">FONTENCODING_CP1252</a>       = 1252,     <span class="comment">/// Windows Latin1</span>
00107 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a404">FONTENCODING_CP1253</a>       = 1253,     <span class="comment">/// Windows Greek</span>
00108 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a405">FONTENCODING_CP1254</a>       = 1254,     <span class="comment">/// Windows Turkish</span>
00109 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a406">FONTENCODING_CP1255</a>       = 1255,     <span class="comment">/// Windows Hebrew</span>
00110 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a407">FONTENCODING_CP1256</a>       = 1256,     <span class="comment">/// Windows Arabic</span>
00111 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a408">FONTENCODING_CP1257</a>       = 1257,     <span class="comment">/// Windows Baltic</span>
00112 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a409">FONTENCODING_CP1258</a>       = 1258,     <span class="comment">/// Windows Vietnam</span>
00113 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a410">FONTENCODING_CP874</a>        = 874,      <span class="comment">/// Windows Thai</span>
00114 <span class="comment"></span>
00115   <a class="code" href="group__FXFont__2.html#a0a411">FONTENCODING_LATIN1</a>       = <a class="code" href="group__FXFont__2.html#a0a366">FONTENCODING_ISO_8859_1</a>,   <span class="comment">/// Latin 1 (West European)</span>
00116 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a412">FONTENCODING_LATIN2</a>       = <a class="code" href="group__FXFont__2.html#a0a367">FONTENCODING_ISO_8859_2</a>,   <span class="comment">/// Latin 2 (East European)</span>
00117 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a413">FONTENCODING_LATIN3</a>       = <a class="code" href="group__FXFont__2.html#a0a368">FONTENCODING_ISO_8859_3</a>,   <span class="comment">/// Latin 3 (South European)</span>
00118 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a414">FONTENCODING_LATIN4</a>       = FONTENCODING_ISO_8859_4,   <span class="comment">/// Latin 4 (North European)</span>
00119 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a415">FONTENCODING_LATIN5</a>       = <a class="code" href="group__FXFont__2.html#a0a374">FONTENCODING_ISO_8859_9</a>,   <span class="comment">/// Latin 5 (Turkish)</span>
00120 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a416">FONTENCODING_LATIN6</a>       = FONTENCODING_ISO_8859_10,  <span class="comment">/// Latin 6 (Nordic)</span>
00121 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a417">FONTENCODING_LATIN7</a>       = <a class="code" href="group__FXFont__2.html#a0a377">FONTENCODING_ISO_8859_13</a>,  <span class="comment">/// Latin 7 (Baltic Rim)</span>
00122 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a418">FONTENCODING_LATIN8</a>       = FONTENCODING_ISO_8859_14,  <span class="comment">/// Latin 8 (Celtic)</span>
00123 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a419">FONTENCODING_LATIN9</a>       = FONTENCODING_ISO_8859_15,  <span class="comment">/// Latin 9 AKA Latin 0</span>
00124 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a420">FONTENCODING_LATIN10</a>      = FONTENCODING_ISO_8859_16,  <span class="comment">/// Latin 10</span>
00125 <span class="comment"></span>
00126   <a class="code" href="group__FXFont__2.html#a0a421">FONTENCODING_USASCII</a>      = <a class="code" href="group__FXFont__2.html#a0a366">FONTENCODING_ISO_8859_1</a>,   <span class="comment">/// Latin 1</span>
00127 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a422">FONTENCODING_WESTEUROPE</a>   = <a class="code" href="group__FXFont__2.html#a0a366">FONTENCODING_ISO_8859_1</a>,   <span class="comment">/// Latin 1 (West European)</span>
00128 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a423">FONTENCODING_EASTEUROPE</a>   = <a class="code" href="group__FXFont__2.html#a0a367">FONTENCODING_ISO_8859_2</a>,   <span class="comment">/// Latin 2 (East European)</span>
00129 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a424">FONTENCODING_SOUTHEUROPE</a>  = <a class="code" href="group__FXFont__2.html#a0a368">FONTENCODING_ISO_8859_3</a>,   <span class="comment">/// Latin 3 (South European)</span>
00130 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a425">FONTENCODING_NORTHEUROPE</a>  = FONTENCODING_ISO_8859_4,   <span class="comment">/// Latin 4 (North European)</span>
00131 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a426">FONTENCODING_CYRILLIC</a>     = <a class="code" href="group__FXFont__2.html#a0a370">FONTENCODING_ISO_8859_5</a>,   <span class="comment">/// Cyrillic</span>
00132 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a427">FONTENCODING_RUSSIAN</a>      = FONTENCODING_KOI8,         <span class="comment">/// Cyrillic</span>
00133 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a428">FONTENCODING_ARABIC</a>       = <a class="code" href="group__FXFont__2.html#a0a371">FONTENCODING_ISO_8859_6</a>,   <span class="comment">/// Arabic</span>
00134 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a429">FONTENCODING_GREEK</a>        = <a class="code" href="group__FXFont__2.html#a0a372">FONTENCODING_ISO_8859_7</a>,   <span class="comment">/// Greek</span>
00135 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a430">FONTENCODING_HEBREW</a>       = <a class="code" href="group__FXFont__2.html#a0a373">FONTENCODING_ISO_8859_8</a>,   <span class="comment">/// Hebrew</span>
00136 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a431">FONTENCODING_TURKISH</a>      = <a class="code" href="group__FXFont__2.html#a0a374">FONTENCODING_ISO_8859_9</a>,   <span class="comment">/// Latin 5 (Turkish)</span>
00137 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a432">FONTENCODING_NORDIC</a>       = FONTENCODING_ISO_8859_10,  <span class="comment">/// Latin 6 (Nordic)</span>
00138 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a433">FONTENCODING_THAI</a>         = <a class="code" href="group__FXFont__2.html#a0a376">FONTENCODING_ISO_8859_11</a>,  <span class="comment">/// Thai</span>
00139 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a434">FONTENCODING_BALTIC</a>       = <a class="code" href="group__FXFont__2.html#a0a377">FONTENCODING_ISO_8859_13</a>,  <span class="comment">/// Latin 7 (Baltic Rim)</span>
00140 <span class="comment"></span>  <a class="code" href="group__FXFont__2.html#a0a435">FONTENCODING_CELTIC</a>       = FONTENCODING_ISO_8859_14   <span class="comment">/// Latin 8 (Celtic)</span>
00141 <span class="comment"></span>  };
00142 
00143 <span class="comment"></span>
00144 <span class="comment">/// Font weight</span>
00145 <span class="comment"></span><span class="keyword">enum</span> <a class="code" href="group__FXFont__3.html#a0">FXFontWeight</a> {
00146   <a class="code" href="group__FXFont__3.html#a0a436">FONTWEIGHT_DONTCARE</a>   = 0,        <span class="comment">/// Don't care about weight</span>
00147 <span class="comment"></span>  <a class="code" href="group__FXFont__3.html#a0a437">FONTWEIGHT_THIN</a>       = 100,      <span class="comment">/// Thin</span>
00148 <span class="comment"></span>  <a class="code" href="group__FXFont__3.html#a0a438">FONTWEIGHT_EXTRALIGHT</a> = 200,      <span class="comment">/// Extra light</span>
00149 <span class="comment"></span>  <a class="code" href="group__FXFont__3.html#a0a439">FONTWEIGHT_LIGHT</a>      = 300,      <span class="comment">/// Light</span>
00150 <span class="comment"></span>  <a class="code" href="group__FXFont__3.html#a0a440">FONTWEIGHT_NORMAL</a>     = 400,      <span class="comment">/// Normal or regular weight</span>
00151 <span class="comment"></span>  <a class="code" href="group__FXFont__3.html#a0a441">FONTWEIGHT_REGULAR</a>    = 400,      <span class="comment">/// Normal or regular weight</span>
00152 <span class="comment"></span>  <a class="code" href="group__FXFont__3.html#a0a442">FONTWEIGHT_MEDIUM</a>     = 500,      <span class="comment">/// Medium bold face</span>
00153 <span class="comment"></span>  <a class="code" href="group__FXFont__3.html#a0a443">FONTWEIGHT_DEMIBOLD</a>   = 600,      <span class="comment">/// Demi bold face</span>
00154 <span class="comment"></span>  <a class="code" href="group__FXFont__3.html#a0a444">FONTWEIGHT_BOLD</a>       = 700,      <span class="comment">/// Bold face</span>
00155 <span class="comment"></span>  <a class="code" href="group__FXFont__3.html#a0a445">FONTWEIGHT_EXTRABOLD</a>  = 800,      <span class="comment">/// Extra</span>
00156 <span class="comment"></span>  <a class="code" href="group__FXFont__3.html#a0a446">FONTWEIGHT_HEAVY</a>      = 900,      <span class="comment">/// Heavy</span>
00157 <span class="comment"></span>  <a class="code" href="group__FXFont__3.html#a0a447">FONTWEIGHT_BLACK</a>      = 900       <span class="comment">/// Black</span>
00158 <span class="comment"></span>  };
00159 
<a name="l00160"></a><a class="code" href="group__FXFont__3.html#a0">00160</a> <span class="comment"></span>
00161 <span class="comment">/// Font relative setwidth</span>
00162 <span class="comment"></span><span class="keyword">enum</span> <a class="code" href="group__FXFont__4.html#a0">FXFontSetWidth</a> {
00163   <a class="code" href="group__FXFont__4.html#a0a448">FONTSETWIDTH_DONTCARE</a>       = 0,    <span class="comment">/// Don't care about set width</span>
00164 <span class="comment"></span>  <a class="code" href="group__FXFont__4.html#a0a449">FONTSETWIDTH_ULTRACONDENSED</a> = 10,   <span class="comment">/// Ultra condensed printing</span>
00165 <span class="comment"></span>  <a class="code" href="group__FXFont__4.html#a0a450">FONTSETWIDTH_EXTRACONDENSED</a> = 20,   <span class="comment">/// Extra condensed</span>
00166 <span class="comment"></span>  <a class="code" href="group__FXFont__4.html#a0a451">FONTSETWIDTH_CONDENSED</a>      = 30,   <span class="comment">/// Condensed</span>
00167 <span class="comment"></span>  <a class="code" href="group__FXFont__4.html#a0a452">FONTSETWIDTH_NARROW</a>         = 30,   <span class="comment">/// Narrow</span>
00168 <span class="comment"></span>  <a class="code" href="group__FXFont__4.html#a0a453">FONTSETWIDTH_COMPRESSED</a>     = 30,   <span class="comment">/// Compressed</span>
00169 <span class="comment"></span>  <a class="code" href="group__FXFont__4.html#a0a454">FONTSETWIDTH_SEMICONDENSED</a>  = 40,   <span class="comment">/// Semi-condensed</span>
00170 <span class="comment"></span>  <a class="code" href="group__FXFont__4.html#a0a455">FONTSETWIDTH_MEDIUM</a>         = 50,   <span class="comment">/// Medium printing</span>
00171 <span class="comment"></span>  <a class="code" href="group__FXFont__4.html#a0a456">FONTSETWIDTH_NORMAL</a>         = 50,   <span class="comment">/// Normal printing</span>
00172 <span class="comment"></span>  <a class="code" href="group__FXFont__4.html#a0a457">FONTSETWIDTH_REGULAR</a>        = 50,   <span class="comment">/// Regulat printing</span>
00173 <span class="comment"></span>  <a class="code" href="group__FXFont__4.html#a0a458">FONTSETWIDTH_SEMIEXPANDED</a>   = 60,   <span class="comment">/// Semi expanded</span>
00174 <span class="comment"></span>  <a class="code" href="group__FXFont__4.html#a0a459">FONTSETWIDTH_EXPANDED</a>       = 70,   <span class="comment">/// Expanded</span>
00175 <span class="comment"></span>  <a class="code" href="group__FXFont__4.html#a0a460">FONTSETWIDTH_WIDE</a>           = 80,   <span class="comment">/// Wide</span>
00176 <span class="comment"></span>  <a class="code" href="group__FXFont__4.html#a0a461">FONTSETWIDTH_EXTRAEXPANDED</a>  = 80,   <span class="comment">/// Extra expanded</span>
00177 <span class="comment"></span>  <a class="code" href="group__FXFont__4.html#a0a462">FONTSETWIDTH_ULTRAEXPANDED</a>  = 90    <span class="comment">/// Ultra expanded</span>
00178 <span class="comment"></span>  };
00179 
00180 <span class="comment"></span>
<a name="l00181"></a><a class="code" href="group__FXFont__4.html#a0">00181</a> <span class="comment">/// Font style</span>
00182 <span class="comment"></span><span class="keyword">struct </span>FXFontDesc {
00183   FXchar          face[104];                <span class="comment">/// Face name</span>
00184 <span class="comment"></span>  FXuint          <a class="code" href="structFX_1_1FXFontDesc.html#o1">size</a>;                     <span class="comment">/// Size in deci-points</span>
00185 <span class="comment"></span>  FXuint          <a class="code" href="structFX_1_1FXFontDesc.html#o2">weight</a>;                   <span class="comment">/// Weight [light, normal, bold, ...]</span>
00186 <span class="comment"></span>  FXuint          <a class="code" href="structFX_1_1FXFontDesc.html#o3">slant</a>;                    <span class="comment">/// Slant [normal, italic, oblique, ...]</span>
00187 <span class="comment"></span>  FXuint          <a class="code" href="structFX_1_1FXFontDesc.html#o4">encoding</a>;                 <span class="comment">/// Encoding of character set</span>
00188 <span class="comment"></span>  FXuint          <a class="code" href="structFX_1_1FXFontDesc.html#o5">setwidth</a>;                 <span class="comment">/// Set width [normal, condensed, expanded, ...]</span>
00189 <span class="comment"></span>  FXuint          <a class="code" href="structFX_1_1FXFontDesc.html#o6">flags</a>;                    <span class="comment">/// Flags</span>
00190 <span class="comment"></span>  };
00191 
00192 <span class="comment"></span>
00193 <span class="comment">/// Font class</span>
00194 <span class="comment"></span><span class="keyword">class </span>FXAPI FXFont : <span class="keyword">public</span> FXId {
00195   <span class="keyword">friend</span> <span class="keyword">class </span>FXDCWindow;
00196   FXDECLARE(FXFont)
00197 <span class="keyword">protected</span>:
00198   FXString  name;                 <span class="comment">// Name of the font, e.g. "helvetica [adobe]"</span>
00199   FXuint    size;                 <span class="comment">// Font size (points*10)</span>
00200   FXuint    weight;               <span class="comment">// Font weight</span>
00201   FXuint    slant;                <span class="comment">// Font slant</span>
<a name="l00202"></a><a class="code" href="structFX_1_1FXFontDesc.html">00202</a>   FXuint    encoding;             <span class="comment">// Character set encoding</span>
00203   FXuint    setwidth;             <span class="comment">// Relative setwidth</span>
<a name="l00204"></a><a class="code" href="structFX_1_1FXFontDesc.html#o1">00204</a>   FXuint    hints;                <span class="comment">// Matching hints</span>
<a name="l00205"></a><a class="code" href="structFX_1_1FXFontDesc.html#o2">00205</a>   <span class="keywordtype">void</span>     *font;                 <span class="comment">// Info about the font</span>
<a name="l00206"></a><a class="code" href="structFX_1_1FXFontDesc.html#o3">00206</a> <span class="keyword">private</span>:
<a name="l00207"></a><a class="code" href="structFX_1_1FXFontDesc.html#o4">00207</a> <span class="preprocessor">#ifdef WIN32</span>
<a name="l00208"></a><a class="code" href="structFX_1_1FXFontDesc.html#o5">00208</a> <span class="preprocessor"></span>  FXID      dc;                   <span class="comment">// Dummy</span>
<a name="l00209"></a><a class="code" href="structFX_1_1FXFontDesc.html#o6">00209</a> <span class="preprocessor">#endif</span>
00210 <span class="preprocessor"></span><span class="keyword">protected</span>:
00211   FXFont();
00212 <span class="preprocessor">#ifndef WIN32</span>
00213 <span class="preprocessor"></span>  <span class="keywordtype">char</span>* findbestfont(<span class="keywordtype">char</span>* fontname) <span class="keyword">const</span>;
00214   <span class="keywordtype">char</span>* findmatch(<span class="keywordtype">char</span>* fontname,<span class="keyword">const</span> <span class="keywordtype">char</span>* forge,<span class="keyword">const</span> <span class="keywordtype">char</span>* family) <span class="keyword">const</span>;
00215 <span class="preprocessor">#endif</span>
00216 <span class="preprocessor"></span><span class="keyword">private</span>:
00217   FXFont(<span class="keyword">const</span> FXFont&amp;);
00218   FXFont &amp;operator=(<span class="keyword">const</span> FXFont&amp;);
00219 <span class="keyword">public</span>:
00220 <span class="comment"></span>
00221 <span class="comment">  /// Construct font from font description</span>
<a name="l00222"></a><a class="code" href="classFX_1_1FXFont.html">00222</a> <span class="comment"></span>  FXFont(<a class="code" href="classFX_1_1FXApp.html">FXApp</a>* a,<span class="keyword">const</span> <a class="code" href="structFX_1_1FXFontDesc.html">FXFontDesc</a>&amp; fontdesc);
00223 <span class="comment"></span>
00224 <span class="comment">  /**</span>
00225 <span class="comment">  * Construct a font with given face name, size in points, weight, slant, character set</span>
00226 <span class="comment">  * encoding, setwidth, and hints.</span>
00227 <span class="comment">  * The font name may be suffixed by a foundry name, enclosed in square brackets;</span>
00228 <span class="comment">  * for example, "times [urw]".</span>
00229 <span class="comment">  */</span>
00230   FXFont(<a class="code" href="classFX_1_1FXApp.html">FXApp</a>* a,<span class="keyword">const</span> <a class="code" href="classFX_1_1FXString.html">FXString</a>&amp; face,FXuint sz,FXuint wt=FONTWEIGHT_NORMAL,FXuint sl=FONTSLANT_REGULAR,FXuint enc=FONTENCODING_DEFAULT,FXuint setw=FONTSETWIDTH_DONTCARE,FXuint h=0);
00231 <span class="comment"></span>
00232 <span class="comment">  /**</span>
00233 <span class="comment">  * Construct a font with given font description of the form:</span>
00234 <span class="comment">  *</span>
00235 <span class="comment">  *     fontname [ "[" foundry "]" ] ["," size ["," weight ["," slant ["," setwidth ["," encoding ["," hints]]]]]]</span>
00236 <span class="comment">  *</span>
00237 <span class="comment">  * For example:</span>
00238 <span class="comment">  *</span>
00239 <span class="comment">  *     "helvetica [bitstream],12,bold,i,normal,iso8859-1,0"</span>
00240 <span class="comment">  *</span>
00241 <span class="comment">  * Typically, at least the font name, and size must be given for</span>
00242 <span class="comment">  * normal font matching.  As a special case, raw X11 fonts can also be</span>
00243 <span class="comment">  * passed, for example:</span>
00244 <span class="comment">  *</span>
00245 <span class="comment">  *     "9x15bold"</span>
00246 <span class="comment">  *</span>
00247 <span class="comment">  * Finally, an old FOX 1.0 style font string may be passed as well:</span>
00248 <span class="comment">  *</span>
00249 <span class="comment">  *     "[helvetica] 90 700 1 1 0 0"</span>
00250 <span class="comment">  *</span>
00251 <span class="comment">  */</span>
00252   FXFont(<a class="code" href="classFX_1_1FXApp.html">FXApp</a>* a,<span class="keyword">const</span> <a class="code" href="classFX_1_1FXString.html">FXString</a>&amp; string);
00253 <span class="comment"></span>
00254 <span class="comment">  /// Create the font</span>
00255 <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> create();
00256 <span class="comment"></span>
00257 <span class="comment">  /// Detach the font</span>
00258 <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> detach();
00259 <span class="comment"></span>
00260 <span class="comment">  /// Destroy the font</span>
00261 <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> destroy();
00262 <span class="comment"></span>
00263 <span class="comment">  /// Get face name</span>
00264 <span class="comment"></span>  <a class="code" href="classFX_1_1FXString.html">FXString</a> getName()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> name; }
00265 <span class="comment"></span>
00266 <span class="comment">  /// Get size in deci-points</span>
00267 <span class="comment"></span>  FXuint getSize()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> size; }
00268 <span class="comment"></span>
00269 <span class="comment">  /// Get font weight</span>
<a name="l00270"></a><a class="code" href="classFX_1_1FXFont.html#a6">00270</a> <span class="comment"></span>  FXuint getWeight()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> weight; }
00271 <span class="comment"></span>
00272 <span class="comment">  /// Get slant</span>
<a name="l00273"></a><a class="code" href="classFX_1_1FXFont.html#a7">00273</a> <span class="comment"></span>  FXuint getSlant()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> slant; }
00274 <span class="comment"></span>
00275 <span class="comment">  /// Get character set encoding</span>
<a name="l00276"></a><a class="code" href="classFX_1_1FXFont.html#a8">00276</a> <span class="comment"></span>  FXuint getEncoding()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> encoding; }
00277 <span class="comment"></span>
00278 <span class="comment">  /// Get setwidth</span>
<a name="l00279"></a><a class="code" href="classFX_1_1FXFont.html#a9">00279</a> <span class="comment"></span>  FXuint getSetWidth()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> setwidth; }
00280 <span class="comment"></span>
00281 <span class="comment">  /// Get hints</span>
<a name="l00282"></a><a class="code" href="classFX_1_1FXFont.html#a10">00282</a> <span class="comment"></span>  FXuint getHints()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> hints; }
00283 <span class="comment"></span>
00284 <span class="comment">  /// Get font description</span>
<a name="l00285"></a><a class="code" href="classFX_1_1FXFont.html#a11">00285</a> <span class="comment"></span>  <span class="keywordtype">void</span> getFontDesc(<a class="code" href="structFX_1_1FXFontDesc.html">FXFontDesc</a>&amp; fontdesc) <span class="keyword">const</span>;
00286 <span class="comment"></span>
00287 <span class="comment">  /// Change font description</span>
<a name="l00288"></a><a class="code" href="classFX_1_1FXFont.html#a12">00288</a> <span class="comment"></span>  <span class="keywordtype">void</span> setFontDesc(<span class="keyword">const</span> <a class="code" href="structFX_1_1FXFontDesc.html">FXFontDesc</a>&amp; fontdesc);
00289 <span class="comment"></span>
00290 <span class="comment">  /**</span>
00291 <span class="comment">  * Change the font to the specified font description string.</span>
00292 <span class="comment">  */</span>
00293   FXbool setFont(<span class="keyword">const</span> <a class="code" href="classFX_1_1FXString.html">FXString</a>&amp; string);
00294 <span class="comment"></span>
00295 <span class="comment">  /**</span>
00296 <span class="comment">  * Return the font description as a string suitable for</span>
00297 <span class="comment">  * parsing with setFont(), see above.</span>
00298 <span class="comment">  */</span>
00299   <a class="code" href="classFX_1_1FXString.html">FXString</a> getFont() <span class="keyword">const</span>;
00300 <span class="comment"></span>
00301 <span class="comment">  /// Find out if the font is monotype or proportional</span>
00302 <span class="comment"></span>  FXbool isFontMono() <span class="keyword">const</span>;
00303 <span class="comment"></span>
00304 <span class="comment">  /// See if font has glyph for ch</span>
00305 <span class="comment"></span>  FXbool hasChar(FXint ch) <span class="keyword">const</span>;
00306 <span class="comment"></span>
00307 <span class="comment">  /// Get first character glyph in font</span>
00308 <span class="comment"></span>  FXint getMinChar() <span class="keyword">const</span>;
00309 <span class="comment"></span>
00310 <span class="comment">  /// Get last character glyph in font</span>
00311 <span class="comment"></span>  FXint getMaxChar() <span class="keyword">const</span>;
00312 <span class="comment"></span>
00313 <span class="comment">  /// Left bearing</span>
00314 <span class="comment"></span>  FXint leftBearing(FXchar ch) <span class="keyword">const</span>;
00315 <span class="comment"></span>
00316 <span class="comment">  /// Right bearing</span>
00317 <span class="comment"></span>  FXint rightBearing(FXchar ch) <span class="keyword">const</span>;
00318 <span class="comment"></span>
00319 <span class="comment">  /// Width of widest character in font</span>
00320 <span class="comment"></span>  FXint getFontWidth() <span class="keyword">const</span>;
00321 <span class="comment"></span>
00322 <span class="comment">  /// Height of highest character in font</span>
00323 <span class="comment"></span>  FXint getFontHeight() <span class="keyword">const</span>;
00324 <span class="comment"></span>
00325 <span class="comment">  /// Ascent from baseline</span>
00326 <span class="comment"></span>  FXint getFontAscent() <span class="keyword">const</span>;
00327 <span class="comment"></span>
00328 <span class="comment">  /// Descent from baseline</span>
00329 <span class="comment"></span>  FXint getFontDescent() <span class="keyword">const</span>;
00330 <span class="comment"></span>
00331 <span class="comment">  /// Get font leading [that is lead-ing as in Pb!]</span>
00332 <span class="comment"></span>  FXint getFontLeading() <span class="keyword">const</span>;
00333 <span class="comment"></span>
00334 <span class="comment">  /// Get font line spacing</span>
00335 <span class="comment"></span>  FXint getFontSpacing() <span class="keyword">const</span>;
00336 <span class="comment"></span>
00337 <span class="comment">  /// Calculate width of given text in this font</span>
00338 <span class="comment"></span>  FXint getTextWidth(<span class="keyword">const</span> FXchar *text,FXuint n) <span class="keyword">const</span>;
00339 <span class="comment"></span>
00340 <span class="comment">  /// Calculate width of given text in this font</span>
00341 <span class="comment"></span>  FXint getTextWidth(<span class="keyword">const</span> <a class="code" href="classFX_1_1FXString.html">FXString</a>&amp; text) <span class="keyword">const</span>;
00342 <span class="comment"></span>
00343 <span class="comment">  /// Calculate height of given text in this font</span>
00344 <span class="comment"></span>  FXint getTextHeight(<span class="keyword">const</span> FXchar *text,FXuint n) <span class="keyword">const</span>;
00345 <span class="comment"></span>
00346 <span class="comment">  /// Calculate height of given text in this font</span>
00347 <span class="comment"></span>  FXint getTextHeight(<span class="keyword">const</span> <a class="code" href="classFX_1_1FXString.html">FXString</a>&amp; text) <span class="keyword">const</span>;
00348 <span class="comment"></span>
00349 <span class="comment">  /**</span>
00350 <span class="comment">   * List all fonts matching hints. If listFonts() returns TRUE then</span>
00351 <span class="comment">   * fonts points to a newly-allocated array of length numfonts. It</span>
00352 <span class="comment">   * is the caller's responsibility to free this array using FXFREE().</span>
00353 <span class="comment">   */</span>
00354   <span class="keyword">static</span> FXbool listFonts(<a class="code" href="structFX_1_1FXFontDesc.html">FXFontDesc</a>*&amp; fonts,FXuint&amp; numfonts,<span class="keyword">const</span> <a class="code" href="classFX_1_1FXString.html">FXString</a>&amp; face,FXuint wt=FONTWEIGHT_DONTCARE,FXuint sl=FONTSLANT_DONTCARE,FXuint sw=FONTSETWIDTH_DONTCARE,FXuint en=FONTENCODING_DEFAULT,FXuint h=0);
00355 <span class="comment"></span>
00356 <span class="comment">  /// Save font data into stream</span>
00357 <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> save(<a class="code" href="classFX_1_1FXStream.html">FXStream</a>&amp; store) <span class="keyword">const</span>;
00358 <span class="comment"></span>
00359 <span class="comment">  /// Load font data from stream</span>
00360 <span class="comment"></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> load(<a class="code" href="classFX_1_1FXStream.html">FXStream</a>&amp; store);
00361 <span class="comment"></span>
00362 <span class="comment">  /// Destroy font</span>
00363 <span class="comment"></span>  <span class="keyword">virtual</span> ~FXFont();
00364   };
00365 
00366 
00367 <span class="comment"></span>
00368 <span class="comment">/// DEPRECATED: Parse font description from a string</span>
00369 <span class="comment"></span><span class="keyword">extern</span> FXAPI FXbool fxparsefontdesc(FXFontDesc&amp; fontdesc,<span class="keyword">const</span> FXchar* string);
00370 <span class="comment"></span>
00371 <span class="comment">/// DEPRECATED: Unparse font description into a string</span>
00372 <span class="comment"></span><span class="keyword">extern</span> FXAPI FXbool fxunparsefontdesc(FXchar *string,<span class="keyword">const</span> FXFontDesc&amp; fontdesc);
00373 
00374 }
00375 
00376 <span class="preprocessor">#endif</span>
</pre></div></font>

<!--- COPYRIGHT -->
<p>
<table width=100% cellpadding=0 cellspacing=0><tr><td width=100% valign=top id=HEADLINE align=right>
<img src='../art/line.gif' width=100% height=1><font size=-1>
Copyright &copy; 1997-2004 Jeroen van der Zijp</font>
</td></tr></table>
</p>
<!--- COPYRIGHT -->
</body>
</html>