Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > f37f2c0b149d5391818dc5157943cda0 > files > 187

gnome-chemistry-utils-devel-0.10.8-3mdv2010.0.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>The Gnome Chemistry Utils: gcu::Dialog Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespacegcu.html">gcu</a>::<a class="el" href="classgcu_1_1Dialog.html">Dialog</a>
  </div>
</div>
<div class="contents">
<h1>gcu::Dialog Class Reference</h1><!-- doxytag: class="gcu::Dialog" -->
<p><code>#include &lt;<a class="el" href="dialog_8h_source.html">gcu/dialog.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for gcu::Dialog:</div>
<div class="dynsection">
 <div class="center">
  <img src="classgcu_1_1Dialog.gif" usemap="#gcu::Dialog_map" alt=""/>
  <map id="gcu::Dialog_map" name="gcu::Dialog_map">
<area href="classgcp_1_1DocPropDlg.html" alt="gcp::DocPropDlg" shape="rect" coords="144,56,278,80"/>
<area href="classgcp_1_1HPosDlg.html" alt="gcp::HPosDlg" shape="rect" coords="144,112,278,136"/>
<area href="classgcp_1_1NewFileDlg.html" alt="gcp::NewFileDlg" shape="rect" coords="144,168,278,192"/>
<area href="classgcp_1_1PrefsDlg.html" alt="gcp::PrefsDlg" shape="rect" coords="144,224,278,248"/>
<area href="classgcp_1_1ReactionPropDlg.html" alt="gcp::ReactionPropDlg" shape="rect" coords="144,280,278,304"/>
<area href="classgcp_1_1StringDlg.html" alt="gcp::StringDlg" shape="rect" coords="144,336,278,360"/>
<area href="classgcp_1_1Tools.html" alt="gcp::Tools" shape="rect" coords="144,392,278,416"/>
<area href="classgcp_1_1ZoomDlg.html" alt="gcp::ZoomDlg" shape="rect" coords="144,448,278,472"/>
<area href="classgcu_1_1PrintSetupDlg.html" alt="gcu::PrintSetupDlg" shape="rect" coords="144,504,278,528"/>
</map>
 </div>
</div>

<p><a href="classgcu_1_1Dialog-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcu_1_1Dialog.html#aa320eb0f7ff23912e6074f3c794b3941">Dialog</a> (<a class="el" href="classgcu_1_1Application.html">Application</a> *App, const char *filename, const char *windowname, <a class="el" href="classgcu_1_1DialogOwner.html">DialogOwner</a> *owner=NULL, void(*extra_destroy)(gpointer)=NULL, gpointer data=NULL)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcu_1_1Dialog.html#a9b7bd3b64700f31090921bcb70875b8c">Destroy</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcu_1_1Dialog.html#a04866a141bd2fb1a9eb413aa0bcdc0d2">Apply</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcu_1_1Dialog.html#a02d0265769fd6d74d149096622bb05d6">Help</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">GtkWindow *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcu_1_1Dialog.html#a9543f9174ccac86b46bdc3d61af6764e">GetWindow</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcu_1_1Dialog.html#a2bcc393e7d5c749447dfdc41172dbe88">Present</a> ()</td></tr>
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcu_1_1Dialog.html#acfce26c4fa9efdffad21a5b378c450ae">GetNumber</a> (GtkEntry *Entry, double *x, <a class="el" href="namespacegcu.html#ab469d90066d12a977a04778c57cb28da">CheckType</a> c=NoCheck, double min=0, double max=0)</td></tr>
<tr><td colspan="2"><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">GladeXML *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcu_1_1Dialog.html#aa918b9da966755170f52a2b1e51ea26b">xml</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">GtkWindow *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcu_1_1Dialog.html#a8d5a69acea8b1c84a154813b366d7b2d">dialog</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classgcu_1_1Application.html">Application</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcu_1_1Dialog.html#ade7e2d87cf4f3373bc2f36101efca051">m_App</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>This class is base class for dialog boxes. It provides some basic services. </p>

<p>Definition at line <a class="el" href="dialog_8h_source.html#l00068">68</a> of file <a class="el" href="dialog_8h_source.html">dialog.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aa320eb0f7ff23912e6074f3c794b3941"></a><!-- doxytag: member="gcu::Dialog::Dialog" ref="aa320eb0f7ff23912e6074f3c794b3941" args="(Application *App, const char *filename, const char *windowname, DialogOwner *owner=NULL, void(*extra_destroy)(gpointer)=NULL, gpointer data=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gcu::Dialog::Dialog </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classgcu_1_1Application.html">Application</a> *&nbsp;</td>
          <td class="paramname"> <em>App</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>windowname</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classgcu_1_1DialogOwner.html">DialogOwner</a> *&nbsp;</td>
          <td class="paramname"> <em>owner</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(gpointer)&nbsp;</td>
          <td class="paramname"> <em>extra_destroy</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&nbsp;</td>
          <td class="paramname"> <em>data</em> = <code>NULL</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>App,:</em>&nbsp;</td><td>the <a class="el" href="classgcu_1_1Application.html">Application</a> which owns the dialog. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>filename,:</em>&nbsp;</td><td>the glade file name which contains the description of the dialog. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>windowname,:</em>&nbsp;</td><td>the name of the top level GtkWidget of the dialog box in the glade file. This name should be unique for the application. It is used to access the contextual help and to ensure the uniqueness of the dialog (in some cases). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>owner,:</em>&nbsp;</td><td>the address of an owner object, might be App or a document or NULL (the default). when owner is not NULL, the dialog will be unique for it. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>extra_destroy,:</em>&nbsp;</td><td>a callback to be called when the dialog is detroyed by calling <a class="el" href="classgcu_1_1Dialog.html#a9b7bd3b64700f31090921bcb70875b8c">Dialog::Destroy</a>. Useful to perform non standard cleaning operations before calling gtk_widget_destroy. The destructor being called afterwards, it cannot access the widget. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data,:</em>&nbsp;</td><td>the data to be passed to extra_destroy.</td></tr>
  </table>
  </dd>
</dl>
<p>If the glade file declares buttons with names "OK", "apply", "cancel" and "help", default actions will be associated with these buttons. If the <a class="el" href="classgcu_1_1Application.html">Application</a> does not provide help support, the Help button will be hidden. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a04866a141bd2fb1a9eb413aa0bcdc0d2"></a><!-- doxytag: member="gcu::Dialog::Apply" ref="a04866a141bd2fb1a9eb413aa0bcdc0d2" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool gcu::Dialog::Apply </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Called after a click on the OK or Apply buttons. After clicking the OK button and if the method returns true, Destroy will be called to close the dialog box. A derived class should implement this method, as the default just returns true.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if everything worked, false if something when wrong and the dialog should not be closed. </dd></dl>

<p>Reimplemented in <a class="el" href="classgcp_1_1NewFileDlg.html#a2c101b443eb30c9635e89a0300d6a820">gcp::NewFileDlg</a>, and <a class="el" href="classgcp_1_1StringDlg.html#ae08e4e23121e02516c589d0550f30820">gcp::StringDlg</a>.</p>

</div>
</div>
<a class="anchor" id="a9b7bd3b64700f31090921bcb70875b8c"></a><!-- doxytag: member="gcu::Dialog::Destroy" ref="a9b7bd3b64700f31090921bcb70875b8c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void gcu::Dialog::Destroy </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Called when closing the dialog box after a click on the OK or Cancel buttons. If a child class implements this method, it should call <a class="el" href="classgcu_1_1Dialog.html#a9b7bd3b64700f31090921bcb70875b8c">Dialog::Destroy</a> after performing its task or it must destroy the window. The defaut implementation calls extra_destroy and gtk_widget_destroy. </p>

</div>
</div>
<a class="anchor" id="acfce26c4fa9efdffad21a5b378c450ae"></a><!-- doxytag: member="gcu::Dialog::GetNumber" ref="acfce26c4fa9efdffad21a5b378c450ae" args="(GtkEntry *Entry, double *x, CheckType c=NoCheck, double min=0, double max=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool gcu::Dialog::GetNumber </td>
          <td>(</td>
          <td class="paramtype">GtkEntry *&nbsp;</td>
          <td class="paramname"> <em>Entry</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&nbsp;</td>
          <td class="paramname"> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacegcu.html#ab469d90066d12a977a04778c57cb28da">CheckType</a>&nbsp;</td>
          <td class="paramname"> <em>c</em> = <code>NoCheck</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>min</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>max</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>Entry,:</em>&nbsp;</td><td>the GtkEntry from which the number should be retrieved. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>x,:</em>&nbsp;</td><td>a pointer to the value which will be replaced by the result. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>c,:</em>&nbsp;</td><td>the type of check to perform on the value. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>min,:</em>&nbsp;</td><td>the minimum accepted value, if needed. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>max,:</em>&nbsp;</td><td>the maximum accepted value, if needed.</td></tr>
  </table>
  </dd>
</dl>
<p>This method retrieves the text displayed in Entry, converts it to a number and perform bounds tests if needed. If an error occurs, a message box is displayed which let the user know why the value is not correct. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the value is valid, false if something went wrong. </dd></dl>

</div>
</div>
<a class="anchor" id="a9543f9174ccac86b46bdc3d61af6764e"></a><!-- doxytag: member="gcu::Dialog::GetWindow" ref="a9543f9174ccac86b46bdc3d61af6764e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GtkWindow* gcu::Dialog::GetWindow </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>/return the top level window of the dialog box. </p>

<p>Definition at line <a class="el" href="dialog_8h_source.html#l00120">120</a> of file <a class="el" href="dialog_8h_source.html">dialog.h</a>.</p>

<p>References <a class="el" href="dialog_8h_source.html#l00151">dialog</a>.</p>

</div>
</div>
<a class="anchor" id="a02d0265769fd6d74d149096622bb05d6"></a><!-- doxytag: member="gcu::Dialog::Help" ref="a02d0265769fd6d74d149096622bb05d6" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gcu::Dialog::Help </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Displays the help corresponding to the dialog. This function is called when a click occurs on the Help button. It calls <a class="el" href="classgcu_1_1Application.html#a9e75345f3bbcac050ecbffe2a0e54adb">Application::OnHelp</a> (windowname); </p>

</div>
</div>
<a class="anchor" id="a2bcc393e7d5c749447dfdc41172dbe88"></a><!-- doxytag: member="gcu::Dialog::Present" ref="a2bcc393e7d5c749447dfdc41172dbe88" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gcu::Dialog::Present </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Brings the dialog to top of the windows stack. </p>

<p>Definition at line <a class="el" href="dialog_8h_source.html#l00125">125</a> of file <a class="el" href="dialog_8h_source.html">dialog.h</a>.</p>

<p>References <a class="el" href="dialog_8h_source.html#l00151">dialog</a>.</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a8d5a69acea8b1c84a154813b366d7b2d"></a><!-- doxytag: member="gcu::Dialog::dialog" ref="a8d5a69acea8b1c84a154813b366d7b2d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GtkWindow* <a class="el" href="classgcu_1_1Dialog.html#a8d5a69acea8b1c84a154813b366d7b2d">gcu::Dialog::dialog</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The associated GtkWindow instance. </p>

<p>Definition at line <a class="el" href="dialog_8h_source.html#l00151">151</a> of file <a class="el" href="dialog_8h_source.html">dialog.h</a>.</p>

<p>Referenced by <a class="el" href="dialog_8h_source.html#l00120">GetWindow()</a>, and <a class="el" href="dialog_8h_source.html#l00125">Present()</a>.</p>

</div>
</div>
<a class="anchor" id="ade7e2d87cf4f3373bc2f36101efca051"></a><!-- doxytag: member="gcu::Dialog::m_App" ref="ade7e2d87cf4f3373bc2f36101efca051" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classgcu_1_1Application.html">Application</a>* <a class="el" href="classgcu_1_1Dialog.html#ade7e2d87cf4f3373bc2f36101efca051">gcu::Dialog::m_App</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <a class="el" href="classgcu_1_1Application.html">Application</a> instance owning the dialog. </p>

<p>Definition at line <a class="el" href="dialog_8h_source.html#l00155">155</a> of file <a class="el" href="dialog_8h_source.html">dialog.h</a>.</p>

</div>
</div>
<a class="anchor" id="aa918b9da966755170f52a2b1e51ea26b"></a><!-- doxytag: member="gcu::Dialog::xml" ref="aa918b9da966755170f52a2b1e51ea26b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GladeXML* <a class="el" href="classgcu_1_1Dialog.html#aa918b9da966755170f52a2b1e51ea26b">gcu::Dialog::xml</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The GladeXML structure used to build the dialog. If NULL, an error occured and the dialog should be deleted. </p>

<p>Definition at line <a class="el" href="dialog_8h_source.html#l00147">147</a> of file <a class="el" href="dialog_8h_source.html">dialog.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="dialog_8h_source.html">dialog.h</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 6 18:33:55 2009 for The Gnome Chemistry Utils by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>