Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > main-release > by-pkgid > 22e237efd6851989a23adf3360bb53d0 > files > 452

gtkmm2.4-doc-2.20.3-1mdv2010.1.x86_64.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>gtkmm: Gtk::Main 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&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</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>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespaceGtk.html">Gtk</a>::<a class="el" href="classGtk_1_1Main.html">Main</a>
  </div>
</div>
<div class="contents">
<h1>Gtk::Main Class Reference</h1><!-- doxytag: class="Gtk::Main" --><!-- doxytag: inherits="sigc::trackable" -->
<p><a class="el" href="classGtk_1_1Main.html" title="Main application class Every application must have one of these objects.">Main</a> application class Every application must have one of these objects. <a href="#_details">More...</a></p>

<p>Inherits <a class="elRef" href="../../../libsigc++-2.0/reference/html/structsigc_1_1trackable.html">sigc::trackable</a>.</p>
<div class="dynheader">
Collaboration diagram for Gtk::Main:</div>
<div class="dynsection">
<div class="center"><img src="classGtk_1_1Main__coll__graph.png" border="0" usemap="#Gtk_1_1Main_coll__map" alt="Collaboration graph"/></div>
<map name="Gtk_1_1Main_coll__map" id="Gtk_1_1Main_coll__map">
<area shape="rect" href="../../../libsigc++-2.0/reference/html/structsigc_1_1trackable.html" title="sigc::trackable" alt="" coords="5,5,112,35"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classGtk_1_1Main-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">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#afbc89daf89de698660ce02426967e135">Main</a> (int&amp; argc, char**&amp; argv, <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1OptionContext.html">Glib::OptionContext</a>&amp; option_context)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Scans the argument vector, and strips off all parameters parsed by GTK+ or your <em>option_context</em>. <a href="#afbc89daf89de698660ce02426967e135"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#ae02744d26abd4abfe106ed31f05ad2dc">Main</a> (int* argc, char*** argv, bool set_locale=true)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Scans the argument vector, and strips off all parameters known to GTK+. <a href="#ae02744d26abd4abfe106ed31f05ad2dc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#a2b7340ad84fe8d66bb7489c635e8fd5e">Main</a> (int&amp; argc, char**&amp; argv, bool set_locale=true)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">See <a class="el" href="classGtk_1_1Main.html#ae02744d26abd4abfe106ed31f05ad2dc" title="Scans the argument vector, and strips off all parameters known to GTK+.">Main(int* argc, char*** argv, bool set_locale)</a>. <a href="#a2b7340ad84fe8d66bb7489c635e8fd5e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#a485eeb37361615a021ca21fb2a6f257c">~Main</a> ()</td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classGtk_1_1Main.html">Gtk::Main</a>*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#a94b74eb618f4b0d213c79c2ada927446">instance</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Access to the one global instance of <a class="el" href="classGtk_1_1Main.html" title="Main application class Every application must have one of these objects.">Gtk::Main</a>. <a href="#a94b74eb618f4b0d213c79c2ada927446"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#a6a8904c35952006d13cb07c1d0c16c10">run</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Start the event loop. <a href="#a6a8904c35952006d13cb07c1d0c16c10"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#aaa2e4e282834cbe2d789fe34c447a0dd">run</a> (<a class="el" href="classGtk_1_1Window.html">Window</a>&amp; window)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns from the main loop when the window is closed. <a href="#aaa2e4e282834cbe2d789fe34c447a0dd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#a8719a8ac37ff6bb66048ca8967dbd782">quit</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Makes the innermost invocation of the main loop return when it regains control. <a href="#a8719a8ac37ff6bb66048ca8967dbd782"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static guint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#a78f66b89dbe811cdce075a8b00c8987a">level</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#a16e384f8b3a02af8d3e86f59053b218e">add_gtk_option_group</a> (<a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1OptionContext.html">Glib::OptionContext</a>&amp; option_context, bool open_default_display=true)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1OptionGroup.html">Glib::OptionGroup</a>, for the commandline arguments recognized by GTK+ and GDK, to a <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1OptionContext.html">Glib::OptionContext</a>, so that these commandline arguments will be processed in addition to the existing commandline arguments specified by the <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1OptionContext.html">Glib::OptionContext</a>. <a href="#a16e384f8b3a02af8d3e86f59053b218e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#ab9ba7993ef8a22b6bf8796a2e4862e68">iteration</a> (bool blocking=true)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Runs a single iteration of the main loop. <a href="#ab9ba7993ef8a22b6bf8796a2e4862e68"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#a2a2a6cddef82f8c52026790f3f7887e0">events_pending</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if any events are pending. <a href="#a2a2a6cddef82f8c52026790f3f7887e0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static RunSig&amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#aec1562f7b2a23858472aa94d23b66173">signal_run</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Run signal. <a href="#aec1562f7b2a23858472aa94d23b66173"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static QuitSig&amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#ac1b6ae5b79cb84158f3caf3e9382492d">signal_quit</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Quit signal You can connect signal handlers to invoke actions when <a class="el" href="classGtk_1_1Main.html#a8719a8ac37ff6bb66048ca8967dbd782" title="Makes the innermost invocation of the main loop return when it regains control.">Gtk::Main::quit()</a> has been called. <a href="#ac1b6ae5b79cb84158f3caf3e9382492d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static KeySnooperSig&amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#ab4c316c0789dfb4ab7926e062196c4e5">signal_key_snooper</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">KeySnooper signal Allows you to channel keypresses to a signal handler without registering with the widget. <a href="#ab4c316c0789dfb4ab7926e062196c4e5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#aab3b3f72ad21e91e4c644ee5131d4058">init_gtkmm_internals</a> ()</td></tr>
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#a8a5748d38300e0484a8cf7c756af8c99">Main</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#a6f855eae235b700e2242fb68252dcea5">init</a> (int* argc, char*** argv, bool set_locale)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#a2642c570bde971015f97b97cce743f80">run_impl</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#a785e09dce370a1c5260885ced9efb4a6">quit_impl</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual guint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#aad90e366d331016ce5ff68023f214d8b">level_impl</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#a681a82f7118d71188e64ba9379bb33e7">iteration_impl</a> (bool blocking)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#a4a8ca03d685b708e9dc38e3ddaa0875a">events_pending_impl</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#a7c3bb918c54342b71e9e56d999b4dd4e">on_window_hide</a> ()</td></tr>
<tr><td colspan="2"><h2>Static Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static RunSig&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#a459e2ec96368ff1c28f351496c3200d6">signal_run_</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static QuitSig&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#aee8ba380608053d85a98847eaeb564da">signal_quit_</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static KeySnooperSig&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1Main.html#a97582880bbb0ac12e957861a7ed165a3">signal_key_snooper_</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p><a class="el" href="classGtk_1_1Main.html" title="Main application class Every application must have one of these objects.">Main</a> application class Every application must have one of these objects. </p>
<p>It may not be global and must be the first <a class="el" href="namespaceGtk.html">Gtk</a> object created. It is a singleton so declaring more than one will simply access the first created.</p>
<p>Normal use of this class is in the main() function to give argc and argv to the gtk initialization. Widgets can use <a class="el" href="classGtk_1_1Main.html#a8719a8ac37ff6bb66048ca8967dbd782" title="Makes the innermost invocation of the main loop return when it regains control.">Gtk::Main::quit()</a> to exit from the application.</p>
<p>The internals of the widget have been disguised as signals so that the user can easily connect using the same methods used throughout the widget interface.</p>
<p>Minimal gtkmm application is something like this: </p>
<div class="fragment"><pre class="fragment"> <span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> *argv[]) {
     <a class="code" href="classGtk_1_1Main.html" title="Main application class Every application must have one of these objects.">Gtk::Main</a> kit(argc, argv);
     ... create some widgets ...
     kit.run();
 }
</pre></div> <hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="afbc89daf89de698660ce02426967e135"></a><!-- doxytag: member="Gtk::Main::Main" ref="afbc89daf89de698660ce02426967e135" args="(int &amp;argc, char **&amp;argv, Glib::OptionContext &amp;option_context)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Gtk::Main::Main </td>
          <td>(</td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"> <em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&amp;&#160;</td>
          <td class="paramname"> <em>argv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1OptionContext.html">Glib::OptionContext</a> &amp;&#160;</td>
          <td class="paramname"> <em>option_context</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Scans the argument vector, and strips off all parameters parsed by GTK+ or your <em>option_context</em>. </p>
<p>Add a <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1OptionGroup.html">Glib::OptionGroup</a> to the <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1OptionContext.html">Glib::OptionContext</a> to parse your own command-line arguments.</p>
<p>Note: The argument strings themself won't be modified, although the pointers to them might change. This makes it possible to create your own argv of string literals, which have the type 'const char[]' in standard C++. (You might need to use const_cast&lt;&gt;, though.)</p>
<p>This function automatically generates nicely formatted &lt;option&gt;--help&lt;/option&gt; output. Note that your program will be terminated after writing out the help output.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>argc</em>&#160;</td><td>a reference to the number of command line arguments. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>argv</em>&#160;</td><td>a reference to the array of command line arguments. a string which is displayed in the first line of &lt;option&gt;--help&lt;/option&gt; output, after &lt;literal&gt;&lt;replaceable&gt;programname&lt;/replaceable&gt; [OPTION...]&lt;/literal&gt; </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>option_context</em>&#160;</td><td>A <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1OptionContext.html">Glib::OptionContext</a> containing Glib::OptionGroups which described the command-line arguments taken by your program.</td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1OptionError.html">Glib::OptionError</a></em>&#160;</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ae02744d26abd4abfe106ed31f05ad2dc"></a><!-- doxytag: member="Gtk::Main::Main" ref="ae02744d26abd4abfe106ed31f05ad2dc" args="(int *argc, char ***argv, bool set_locale=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Gtk::Main::Main </td>
          <td>(</td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"> <em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char ***&#160;</td>
          <td class="paramname"> <em>argv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"> <em>set_locale</em> = <code>true</code></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Scans the argument vector, and strips off all parameters known to GTK+. </p>
<p>Your application may then handle the remaining arguments.</p>
<p>Note: The argument strings themself won't be modified, although the pointers to them might change. This makes it possible to create your own argv of string literals, which have the type 'const char[]' in standard C++. (You might need to use const_cast&lt;&gt;, though.) </p>

</div>
</div>
<a class="anchor" id="a2b7340ad84fe8d66bb7489c635e8fd5e"></a><!-- doxytag: member="Gtk::Main::Main" ref="a2b7340ad84fe8d66bb7489c635e8fd5e" args="(int &amp;argc, char **&amp;argv, bool set_locale=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Gtk::Main::Main </td>
          <td>(</td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"> <em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&amp;&#160;</td>
          <td class="paramname"> <em>argv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"> <em>set_locale</em> = <code>true</code></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>See <a class="el" href="classGtk_1_1Main.html#ae02744d26abd4abfe106ed31f05ad2dc" title="Scans the argument vector, and strips off all parameters known to GTK+.">Main(int* argc, char*** argv, bool set_locale)</a>. </p>

</div>
</div>
<a class="anchor" id="a485eeb37361615a021ca21fb2a6f257c"></a><!-- doxytag: member="Gtk::Main::~Main" ref="a485eeb37361615a021ca21fb2a6f257c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual Gtk::Main::~Main </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a8a5748d38300e0484a8cf7c756af8c99"></a><!-- doxytag: member="Gtk::Main::Main" ref="a8a5748d38300e0484a8cf7c756af8c99" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Gtk::Main::Main </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a16e384f8b3a02af8d3e86f59053b218e"></a><!-- doxytag: member="Gtk::Main::add_gtk_option_group" ref="a16e384f8b3a02af8d3e86f59053b218e" args="(Glib::OptionContext &amp;option_context, bool open_default_display=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void Gtk::Main::add_gtk_option_group </td>
          <td>(</td>
          <td class="paramtype"><a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1OptionContext.html">Glib::OptionContext</a> &amp;&#160;</td>
          <td class="paramname"> <em>option_context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"> <em>open_default_display</em> = <code>true</code></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add a <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1OptionGroup.html">Glib::OptionGroup</a>, for the commandline arguments recognized by GTK+ and GDK, to a <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1OptionContext.html">Glib::OptionContext</a>, so that these commandline arguments will be processed in addition to the existing commandline arguments specified by the <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1OptionContext.html">Glib::OptionContext</a>. </p>
<p>You do not need to use this method if you pass your <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1OptionContext.html">Glib::OptionContext</a> to the <a class="el" href="classGtk_1_1Main.html" title="Main application class Every application must have one of these objects.">Main</a> constructor, because it adds the gtk option group automatically.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>option_context</em>&#160;</td><td>Option Context to which the group will be added. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>open_default_display</em>&#160;</td><td>Whether to open the default display when parsing the commandline arguments. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a2a2a6cddef82f8c52026790f3f7887e0"></a><!-- doxytag: member="Gtk::Main::events_pending" ref="a2a2a6cddef82f8c52026790f3f7887e0" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool Gtk::Main::events_pending </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Checks if any events are pending. </p>
<p>This can be used to update the GUI and invoke timeouts etc. while doing some time intensive computation.</p>
<p>Example: Updating the GUI during a long computation. </p>
<div class="fragment"><pre class="fragment"> <span class="comment">// computation going on</span>
 <span class="keywordflow">while</span>( <a class="code" href="classGtk_1_1Main.html#a2a2a6cddef82f8c52026790f3f7887e0" title="Checks if any events are pending.">Gtk::Main::events_pending</a>() )
   <a class="code" href="classGtk_1_1Main.html#ab9ba7993ef8a22b6bf8796a2e4862e68" title="Runs a single iteration of the main loop.">Gtk::Main::iteration</a>();

 <span class="comment">// computation continued</span>
</pre></div><dl class="return"><dt><b>Returns:</b></dt><dd>true if any events are pending, false otherwise. </dd></dl>

</div>
</div>
<a class="anchor" id="a4a8ca03d685b708e9dc38e3ddaa0875a"></a><!-- doxytag: member="Gtk::Main::events_pending_impl" ref="a4a8ca03d685b708e9dc38e3ddaa0875a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool Gtk::Main::events_pending_impl </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a6f855eae235b700e2242fb68252dcea5"></a><!-- doxytag: member="Gtk::Main::init" ref="a6f855eae235b700e2242fb68252dcea5" args="(int *argc, char ***argv, bool set_locale)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Gtk::Main::init </td>
          <td>(</td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"> <em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char ***&#160;</td>
          <td class="paramname"> <em>argv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"> <em>set_locale</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aab3b3f72ad21e91e4c644ee5131d4058"></a><!-- doxytag: member="Gtk::Main::init_gtkmm_internals" ref="aab3b3f72ad21e91e4c644ee5131d4058" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void Gtk::Main::init_gtkmm_internals </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a94b74eb618f4b0d213c79c2ada927446"></a><!-- doxytag: member="Gtk::Main::instance" ref="a94b74eb618f4b0d213c79c2ada927446" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classGtk_1_1Main.html">Gtk::Main</a>* Gtk::Main::instance </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Access to the one global instance of <a class="el" href="classGtk_1_1Main.html" title="Main application class Every application must have one of these objects.">Gtk::Main</a>. </p>

</div>
</div>
<a class="anchor" id="ab9ba7993ef8a22b6bf8796a2e4862e68"></a><!-- doxytag: member="Gtk::Main::iteration" ref="ab9ba7993ef8a22b6bf8796a2e4862e68" args="(bool blocking=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool Gtk::Main::iteration </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"> <em>blocking</em> = <code>true</code></td>
          <td>&#160;)&#160;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Runs a single iteration of the main loop. </p>
<p>If no events are waiting to be processed GTK+ will block until the next event is noticed. If you don't want to block then pass false for <em>blocking</em> or check if any events are pending with pending() first.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>blocking</em>&#160;</td><td>Whether the caller must wait until the next event is noticed, or return immediately if there are no events. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if <a class="el" href="classGtk_1_1Main.html#a8719a8ac37ff6bb66048ca8967dbd782" title="Makes the innermost invocation of the main loop return when it regains control.">quit()</a> has been called for the innermost main loop. </dd></dl>

</div>
</div>
<a class="anchor" id="a681a82f7118d71188e64ba9379bb33e7"></a><!-- doxytag: member="Gtk::Main::iteration_impl" ref="a681a82f7118d71188e64ba9379bb33e7" args="(bool blocking)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool Gtk::Main::iteration_impl </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"> <em>blocking</em></td>
          <td>&#160;)&#160;</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a78f66b89dbe811cdce075a8b00c8987a"></a><!-- doxytag: member="Gtk::Main::level" ref="a78f66b89dbe811cdce075a8b00c8987a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static guint Gtk::Main::level </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aad90e366d331016ce5ff68023f214d8b"></a><!-- doxytag: member="Gtk::Main::level_impl" ref="aad90e366d331016ce5ff68023f214d8b" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual guint Gtk::Main::level_impl </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a7c3bb918c54342b71e9e56d999b4dd4e"></a><!-- doxytag: member="Gtk::Main::on_window_hide" ref="a7c3bb918c54342b71e9e56d999b4dd4e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Gtk::Main::on_window_hide </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a8719a8ac37ff6bb66048ca8967dbd782"></a><!-- doxytag: member="Gtk::Main::quit" ref="a8719a8ac37ff6bb66048ca8967dbd782" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void Gtk::Main::quit </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Makes the innermost invocation of the main loop return when it regains control. </p>

</div>
</div>
<a class="anchor" id="a785e09dce370a1c5260885ced9efb4a6"></a><!-- doxytag: member="Gtk::Main::quit_impl" ref="a785e09dce370a1c5260885ced9efb4a6" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Gtk::Main::quit_impl </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aaa2e4e282834cbe2d789fe34c447a0dd"></a><!-- doxytag: member="Gtk::Main::run" ref="aaa2e4e282834cbe2d789fe34c447a0dd" args="(Window &amp;window)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void Gtk::Main::run </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classGtk_1_1Window.html">Window</a>&amp;&#160;</td>
          <td class="paramname"> <em>window</em></td>
          <td>&#160;)&#160;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns from the main loop when the window is closed. </p>
<p>When using this override, you should not use <a class="el" href="classGtk_1_1Main.html#a8719a8ac37ff6bb66048ca8967dbd782" title="Makes the innermost invocation of the main loop return when it regains control.">Gtk::Main::quit()</a> to close the application, but just call <a class="elRef" href="../../../libsigc++-2.0/reference/html/group__hide.html#gaf28d43958b26c67e314f726540463c44">hide()</a> on your <a class="el" href="classGtk_1_1Window.html" title="Toplevel Window This represents all widgets which are physical windows controlled...">Window</a> class.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>window</em>&#160;</td><td>The window to show. This method will return when the window is hidden. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a6a8904c35952006d13cb07c1d0c16c10"></a><!-- doxytag: member="Gtk::Main::run" ref="a6a8904c35952006d13cb07c1d0c16c10" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void Gtk::Main::run </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Start the event loop. </p>
<p>This begins the event loop which handles events. No events propagate until this has been called. It may be called recursively to popup dialogs </p>

</div>
</div>
<a class="anchor" id="a2642c570bde971015f97b97cce743f80"></a><!-- doxytag: member="Gtk::Main::run_impl" ref="a2642c570bde971015f97b97cce743f80" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Gtk::Main::run_impl </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ab4c316c0789dfb4ab7926e062196c4e5"></a><!-- doxytag: member="Gtk::Main::signal_key_snooper" ref="ab4c316c0789dfb4ab7926e062196c4e5" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static KeySnooperSig&amp; Gtk::Main::signal_key_snooper </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>KeySnooper signal Allows you to channel keypresses to a signal handler without registering with the widget. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>KeySnooperSig A Signal to which you can connect a sigc::slot&lt; int, Widget *, GdkEventKey * &gt;</dd></dl>
<p>It is the responsibility of the snooper to pass the keypress to the widget, however, care must be taken that the keypress is not passed twice. </p>

</div>
</div>
<a class="anchor" id="ac1b6ae5b79cb84158f3caf3e9382492d"></a><!-- doxytag: member="Gtk::Main::signal_quit" ref="ac1b6ae5b79cb84158f3caf3e9382492d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static QuitSig&amp; Gtk::Main::signal_quit </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Quit signal You can connect signal handlers to invoke actions when <a class="el" href="classGtk_1_1Main.html#a8719a8ac37ff6bb66048ca8967dbd782" title="Makes the innermost invocation of the main loop return when it regains control.">Gtk::Main::quit()</a> has been called. </p>
<p>Note that main loops can be nested by calling <a class="el" href="classGtk_1_1Main.html#a6a8904c35952006d13cb07c1d0c16c10" title="Start the event loop.">Gtk::Main::run()</a> recursively, therefore receiving this signal doesn't necessarily mean the application is about to be terminated. If you want to receive a signal only when the last main loop quits, call connect() with <code>main_level&#160;=&#160;1</code>. </p>
<div class="fragment"><pre class="fragment"> <span class="keywordtype">bool</span> thisclass::mymethod() { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
 <a class="code" href="classGtk_1_1Main.html#ac1b6ae5b79cb84158f3caf3e9382492d" title="Quit signal You can connect signal handlers to invoke actions when Gtk::Main::quit()...">Gtk::Main::signal_quit</a>().connect(<a class="codeRef" href="../../../libsigc++-2.0/reference/html/group__mem__fun.html#ga7d9ea809173f48bf5c76cf1989591602">sigc::mem_fun</a>(<span class="keyword">this</span>, &amp;thisclass::mymethod));
</pre></div> <dl class="return"><dt><b>Returns:</b></dt><dd>bool - <code>false</code> means callback is removed, <code>true</code> means it'll be called again the next the main loop quits. </dd></dl>

</div>
</div>
<a class="anchor" id="aec1562f7b2a23858472aa94d23b66173"></a><!-- doxytag: member="Gtk::Main::signal_run" ref="aec1562f7b2a23858472aa94d23b66173" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static RunSig&amp; Gtk::Main::signal_run </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Run signal. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>void </dd></dl>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a97582880bbb0ac12e957861a7ed165a3"></a><!-- doxytag: member="Gtk::Main::signal_key_snooper_" ref="a97582880bbb0ac12e957861a7ed165a3" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">KeySnooperSig <a class="el" href="classGtk_1_1Main.html#a97582880bbb0ac12e957861a7ed165a3">Gtk::Main::signal_key_snooper_</a><code> [static, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aee8ba380608053d85a98847eaeb564da"></a><!-- doxytag: member="Gtk::Main::signal_quit_" ref="aee8ba380608053d85a98847eaeb564da" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QuitSig <a class="el" href="classGtk_1_1Main.html#aee8ba380608053d85a98847eaeb564da">Gtk::Main::signal_quit_</a><code> [static, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a459e2ec96368ff1c28f351496c3200d6"></a><!-- doxytag: member="Gtk::Main::signal_run_" ref="a459e2ec96368ff1c28f351496c3200d6" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RunSig <a class="el" href="classGtk_1_1Main.html#a459e2ec96368ff1c28f351496c3200d6">Gtk::Main::signal_run_</a><code> [static, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>gtkmm/main.h</li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Tue May 4 13:21:54 2010 for gtkmm by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>