<!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: gcp::Tools 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 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 List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespacegcp.html">gcp</a>::<a class="el" href="classgcp_1_1Tools.html">Tools</a> </div> </div> <div class="contents"> <h1>gcp::Tools Class Reference</h1><!-- doxytag: class="gcp::Tools" --><!-- doxytag: inherits="gcu::Dialog" --> <p><code>#include <<a class="el" href="tools_8h_source.html">tools.h</a>></code></p> <div class="dynheader"> Inheritance diagram for gcp::Tools:</div> <div class="dynsection"> <div class="center"> <img src="classgcp_1_1Tools.gif" usemap="#gcp::Tools_map" alt=""/> <map id="gcp::Tools_map" name="gcp::Tools_map"> <area href="classgcu_1_1Dialog.html" alt="gcu::Dialog" shape="rect" coords="0,0,75,24"/> </map> </div> </div> <p><a href="classgcp_1_1Tools-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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classgcp_1_1Tools.html#a278e324d27afa964dc20ca6616aa93cd">Tools</a> (<a class="el" href="classgcp_1_1Application.html">Application</a> *App)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classgcp_1_1Tools.html#a264333c4620eb3343b4c6c9c0c93ca39">~Tools</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgcp_1_1Tools.html#a15f9a3acc9433ae1e3b243e1245b9f74">Show</a> (bool visible)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgcp_1_1Tools.html#a4e981f59a06137dec6e4ae034bd91133">AddToolbar</a> (std::string &name)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgcp_1_1Tools.html#ae75ea02acc8d872a9394824ea6d14fad">SetUIManager</a> (GtkUIManager *manager)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgcp_1_1Tools.html#a55612f35dc3ae12caf0a036e77736437">SetPage</a> (<a class="el" href="classgcp_1_1Tool.html">Tool</a> *tool, int i)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgcp_1_1Tools.html#abda0ada3ef8145c6c351e18edcdb3b54">OnSelectTool</a> (<a class="el" href="classgcp_1_1Tool.html">Tool</a> *tool)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgcp_1_1Tools.html#ab3e4f6715390d0cb840c479fa003ae04">RegisterTool</a> (GtkWidget *w)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgcp_1_1Tools.html#a7122a3f684979747ca1ca5b60ef8fea8">OnElementChanged</a> (int Z)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgcp_1_1Tools.html#a27e278ed6cdc35d6bb6a1afd390e147a">SetElement</a> (int Z)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgcp_1_1Tools.html#a220454f8963df8641dc686415edaf838">Update</a> (void)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgcp_1_1Tools.html#aa4e157daeefc77c4faad599fab69ede8">OnHelp</a> ()</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>class <a class="el" href="classgcp_1_1Tools.html">Tools</a> <a class="el" href="tools_8h.html">gcp/tools.h</a> The GChemPaint tools box. Only one instance should be created. </p> <p>Definition at line <a class="el" href="tools_8h_source.html#l00037">37</a> of file <a class="el" href="tools_8h_source.html">tools.h</a>.</p> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a278e324d27afa964dc20ca6616aa93cd"></a><!-- doxytag: member="gcp::Tools::Tools" ref="a278e324d27afa964dc20ca6616aa93cd" args="(Application *App)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">gcp::Tools::Tools </td> <td>(</td> <td class="paramtype"><a class="el" href="classgcp_1_1Application.html">Application</a> * </td> <td class="paramname"> <em>App</em></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> </td><td>the GChemPaint <a class="el" href="classgcp_1_1Application.html" title="GChemPaint application base class.">Application</a>.</td></tr> </table> </dd> </dl> <p>Builds the tools box for the application. </p> </div> </div> <a class="anchor" id="a264333c4620eb3343b4c6c9c0c93ca39"></a><!-- doxytag: member="gcp::Tools::~Tools" ref="a264333c4620eb3343b4c6c9c0c93ca39" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual gcp::Tools::~Tools </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>The destructor. </p> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a4e981f59a06137dec6e4ae034bd91133"></a><!-- doxytag: member="gcp::Tools::AddToolbar" ref="a4e981f59a06137dec6e4ae034bd91133" args="(std::string &name)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void gcp::Tools::AddToolbar </td> <td>(</td> <td class="paramtype">std::string & </td> <td class="paramname"> <em>name</em></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>name</em> </td><td>the new toolbar name.</td></tr> </table> </dd> </dl> <p>Addsa new toolbar. </p> </div> </div> <a class="anchor" id="a7122a3f684979747ca1ca5b60ef8fea8"></a><!-- doxytag: member="gcp::Tools::OnElementChanged" ref="a7122a3f684979747ca1ca5b60ef8fea8" args="(int Z)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void gcp::Tools::OnElementChanged </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>Z</em></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>Z</em> </td><td>the new current atomic number.</td></tr> </table> </dd> </dl> <p>Called by the framework when the current atomic number has changed. </p> </div> </div> <a class="anchor" id="aa4e157daeefc77c4faad599fab69ede8"></a><!-- doxytag: member="gcp::Tools::OnHelp" ref="aa4e157daeefc77c4faad599fab69ede8" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void gcp::Tools::OnHelp </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Called by the framework when the Help button is clicked. </p> </div> </div> <a class="anchor" id="abda0ada3ef8145c6c351e18edcdb3b54"></a><!-- doxytag: member="gcp::Tools::OnSelectTool" ref="abda0ada3ef8145c6c351e18edcdb3b54" args="(Tool *tool)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void gcp::Tools::OnSelectTool </td> <td>(</td> <td class="paramtype"><a class="el" href="classgcp_1_1Tool.html">Tool</a> * </td> <td class="paramname"> <em>tool</em></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>tool</em> </td><td>a <a class="el" href="classgcp_1_1Tool.html">Tool</a>.</td></tr> </table> </dd> </dl> <p>Called by the framwork when the <a class="el" href="classgcp_1_1Tool.html">Tool</a> is selected. If the <a class="el" href="classgcp_1_1Tool.html">Tool</a> has an option box, it becomes the active notebook page after being created if necessary. </p> </div> </div> <a class="anchor" id="ab3e4f6715390d0cb840c479fa003ae04"></a><!-- doxytag: member="gcp::Tools::RegisterTool" ref="ab3e4f6715390d0cb840c479fa003ae04" args="(GtkWidget *w)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void gcp::Tools::RegisterTool </td> <td>(</td> <td class="paramtype">GtkWidget * </td> <td class="paramname"> <em>w</em></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>w</em> </td><td>the tool widget, generally a button.</td></tr> </table> </dd> </dl> <p>Registers the <a class="el" href="classgcp_1_1Tool.html">Tool</a> corresponding to the widget. The widget name is used to retrieve the <a class="el" href="classgcp_1_1Tool.html">Tool</a> from the application using <a class="el" href="classgcp_1_1Application.html#ab0d4f280a35175065e341d8ab6081110">gcp::Application::GetTool()</a>. </p> </div> </div> <a class="anchor" id="a27e278ed6cdc35d6bb6a1afd390e147a"></a><!-- doxytag: member="gcp::Tools::SetElement" ref="a27e278ed6cdc35d6bb6a1afd390e147a" args="(int Z)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void gcp::Tools::SetElement </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>Z</em></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>Z</em> </td><td>the new current atomic number.</td></tr> </table> </dd> </dl> <p>Called by the framework when the user choose a new current atomic number using the Mendeleiev table widget. </p> </div> </div> <a class="anchor" id="a55612f35dc3ae12caf0a036e77736437"></a><!-- doxytag: member="gcp::Tools::SetPage" ref="a55612f35dc3ae12caf0a036e77736437" args="(Tool *tool, int i)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void gcp::Tools::SetPage </td> <td>(</td> <td class="paramtype"><a class="el" href="classgcp_1_1Tool.html">Tool</a> * </td> <td class="paramname"> <em>tool</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>i</em></td><td> </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>tool</em> </td><td>the <a class="el" href="classgcp_1_1Tool.html">Tool</a> for which an options page has been added. </td></tr> <tr><td valign="top"></td><td valign="top"><em>i</em> </td><td>the rank of the page in the notebook.</td></tr> </table> </dd> </dl> <p>Registers the new option box for the tool, so that the widget is created only once when the tool is first selected. </p> </div> </div> <a class="anchor" id="ae75ea02acc8d872a9394824ea6d14fad"></a><!-- doxytag: member="gcp::Tools::SetUIManager" ref="ae75ea02acc8d872a9394824ea6d14fad" args="(GtkUIManager *manager)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void gcp::Tools::SetUIManager </td> <td>(</td> <td class="paramtype">GtkUIManager * </td> <td class="paramname"> <em>manager</em></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>manager</em> </td><td>a GtkUIManager.</td></tr> </table> </dd> </dl> <p>Sets the GtkUIManager associated to the user interface of the tools box. </p> </div> </div> <a class="anchor" id="a15f9a3acc9433ae1e3b243e1245b9f74"></a><!-- doxytag: member="gcp::Tools::Show" ref="a15f9a3acc9433ae1e3b243e1245b9f74" args="(bool visible)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void gcp::Tools::Show </td> <td>(</td> <td class="paramtype">bool </td> <td class="paramname"> <em>visible</em></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>visible</em> </td><td>whether the tools box should be visible.</td></tr> </table> </dd> </dl> <p>Shows or hides the tools box. </p> </div> </div> <a class="anchor" id="a220454f8963df8641dc686415edaf838"></a><!-- doxytag: member="gcp::Tools::Update" ref="a220454f8963df8641dc686415edaf838" args="(void)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void gcp::Tools::Update </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Called by the framework when the tearable property of the Mendeleiev table widget changed. </p> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="tools_8h_source.html">tools.h</a></li> </ul> </div> <hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 6 18:33:54 2009 for The Gnome Chemistry Utils by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> </body> </html>