1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Extensions to Pango</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="exo Reference Manual">
<link rel="up" href="exo-extensions.html" title="Part V. Extensions to existing frameworks">
<link rel="prev" href="exo-Extensions-to-Gtk.html" title="Extensions to Gtk">
<link rel="next" href="exo-miscelleanous.html" title="Part VI. Miscelleanous">
<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="exo-Extensions-to-Gtk.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="exo-extensions.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">exo Reference Manual</th>
<td><a accesskey="n" href="exo-miscelleanous.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#exo-Extensions-to-Pango.synopsis" class="shortcut">Top</a>
|
<a href="#exo-Extensions-to-Pango.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" title="Extensions to Pango">
<a name="exo-Extensions-to-Pango"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="exo-Extensions-to-Pango.top_of_page"></a>Extensions to Pango</span></h2>
<p>Extensions to Pango — Miscelleanous extensions to the Pango library</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="exo-Extensions-to-Pango.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <exo/exo.h>
typedef <a class="link" href="exo-Extensions-to-Pango.html#ExoPangoEllipsizeMode" title="ExoPangoEllipsizeMode">ExoPangoEllipsizeMode</a>;
<span class="returnvalue">gboolean</span> <a class="link" href="exo-Extensions-to-Pango.html#exo-pango-layout-set-text-ellipsized" title="exo_pango_layout_set_text_ellipsized ()">exo_pango_layout_set_text_ellipsized</a>
(<em class="parameter"><code><a href="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a> *layout</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *string</code></em>,
<em class="parameter"><code><span class="type">gint</span> width</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoEllipsizeMode"><span class="type">PangoEllipsizeMode</span></a> mode</code></em>);
</pre>
</div>
<div class="refsect1" title="Description">
<a name="exo-Extensions-to-Pango.description"></a><h2>Description</h2>
<p>
This facility provides ellipsizing support functions for Pango 1.4 and below. If its build against Pango 1.6 or
above, it uses the ellipsizing functionality provided by Pango, else its emulated in libexo.
</p>
<p>
It is deprecated as of version 0.3.1.8. Use the Pango 1.6 functions directly.
</p>
</div>
<div class="refsect1" title="Details">
<a name="exo-Extensions-to-Pango.details"></a><h2>Details</h2>
<div class="refsect2" title="ExoPangoEllipsizeMode">
<a name="ExoPangoEllipsizeMode"></a><h3>ExoPangoEllipsizeMode</h3>
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">ExoPangoEllipsizeMode</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Use <a href="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoEllipsizeMode"><span class="type">PangoEllipsizeMode</span></a> instead.
</p>
</div>
<hr>
<div class="refsect2" title="exo_pango_layout_set_text_ellipsized ()">
<a name="exo-pango-layout-set-text-ellipsized"></a><h3>exo_pango_layout_set_text_ellipsized ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> exo_pango_layout_set_text_ellipsized
(<em class="parameter"><code><a href="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a> *layout</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *string</code></em>,
<em class="parameter"><code><span class="type">gint</span> width</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoEllipsizeMode"><span class="type">PangoEllipsizeMode</span></a> mode</code></em>);</pre>
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">exo_pango_layout_set_text_ellipsized</code> has been deprecated since version 0.3.1.8 and should not be used in newly-written code. Use <a href="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#pango-layout-set-ellipsize"><code class="function">pango_layout_set_ellipsize()</code></a> instead.</p>
</div>
<p>
Truncates a string if required to fit in <em class="parameter"><code>width</code></em> and sets it on the
layout. Truncation involves removing characters from the start, middle or end
respectively and replacing them with "...". Algorithm is a bit
fuzzy, won't work 100%.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>layout</code></em> :</span></p></td>
<td>A <a href="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
<td>The string to ellipsize.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td>The maximal width for the <em class="parameter"><code>layout</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td>The ellipsize mode.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <code class="literal">TRUE</code> if <em class="parameter"><code>string</code></em> had to be ellipsized to fit into <em class="parameter"><code>width</code></em>, else
<code class="literal">FALSE</code>.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" title="See Also">
<a name="exo-Extensions-to-Pango.see-also"></a><h2>See Also</h2>
<p>
<a class="ulink" href="http://developer.gnome.org/doc/API/2.0/pango/" target="_top">Pango Reference Manual</a>, <a class="link" href="ExoEllipsizedLabel.html" title="ExoEllipsizedLabel">ExoEllipsizedLabel</a>
</p>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.14</div>
</body>
</html>
|