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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>LASi: contextMgr.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.4 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="dirs.html"><span>Directories</span></a></li>
</ul>
</div>
<div class="nav">
<a class="el" href="dir_844ccf4c9c5f524017223c512b74160f.html">src</a></div>
<h1>contextMgr.h</h1><a href="contextMgr_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
<a name="l00008"></a>00008 <span class="preprocessor">#ifndef CONTEXT_MGR_H</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define CONTEXT_MGR_H</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span>
<a name="l00011"></a>00011 <span class="preprocessor">#include <pango/pango.h></span>
<a name="l00012"></a>00012 <span class="preprocessor">#include <pango/pangoft2.h></span>
<a name="l00013"></a>00013 <span class="preprocessor">#include "<a class="code" href="manager_8h.html" title="Convert return-code of Freetype library calls to std::runtime_error.">manager.h</a>"</span>
<a name="l00014"></a>00014
<a name="l00017"></a><a class="code" href="classContextMgr.html">00017</a> <span class="keyword">class </span><a class="code" href="classContextMgr.html" title="Manage PangoContext*.">ContextMgr</a> : <span class="keyword">public</span> <a class="code" href="classManager.html" title="Manager template.">Manager</a><PangoContext*> {
<a name="l00018"></a>00018 <span class="keyword">public</span>:
<a name="l00019"></a><a class="code" href="classContextMgr.html#b9eed08c5fe4759605ceac0b397cfcb8">00019</a> <a class="code" href="classContextMgr.html#b9eed08c5fe4759605ceac0b397cfcb8">ContextMgr</a>(
<a name="l00020"></a>00020 <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> lang=<span class="stringliteral">"en_US.UTF-8"</span>,
<a name="l00021"></a>00021 <span class="keyword">const</span> <span class="keywordtype">int</span> dpiX = 72,
<a name="l00022"></a>00022 <span class="keyword">const</span> <span class="keywordtype">int</span> dpiY = 72) {
<a name="l00023"></a>00023 <a class="code" href="classManager.html#87957ca167ec720db8b9bc88fc83c9e4">_t</a> = pango_ft2_get_context(dpiX, dpiY);
<a name="l00024"></a>00024 pango_context_set_language(<a class="code" href="classManager.html#87957ca167ec720db8b9bc88fc83c9e4">_t</a>, pango_language_from_string(lang));
<a name="l00025"></a>00025 pango_context_set_base_dir(<a class="code" href="classManager.html#87957ca167ec720db8b9bc88fc83c9e4">_t</a>, PANGO_DIRECTION_LTR);
<a name="l00026"></a>00026 }
<a name="l00027"></a>00027
<a name="l00028"></a><a class="code" href="classContextMgr.html#c00394a1c2787ab45ae9ba4c3648ff3c">00028</a> <a class="code" href="classContextMgr.html#c00394a1c2787ab45ae9ba4c3648ff3c">~ContextMgr</a>() {
<a name="l00029"></a>00029 <span class="keywordflow">if</span> (<a class="code" href="classManager.html#87957ca167ec720db8b9bc88fc83c9e4">_t</a> && <a class="code" href="classManager.html#2786293ded3430b5f57166c56eda9fec">isOwner</a>())
<a name="l00030"></a>00030 g_object_unref(<a class="code" href="classManager.html#87957ca167ec720db8b9bc88fc83c9e4">_t</a>);
<a name="l00031"></a>00031 }
<a name="l00032"></a>00032 };
<a name="l00033"></a>00033 <span class="preprocessor">#endif</span>
</pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Fri Feb 8 17:25:20 2008 for LASi by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.4 </small></address>
</body>
</html>
|