Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 0102b942207b9d1f394a9a1ca1a811b6 > files > 47

bakery-devel-2.6.3-4.fc14.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>bakery: App_Gtk.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.6 -->
<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><a href="classes.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
<h1>App_Gtk.h</h1><a href="App__Gtk_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright 2000 Murray Cumming</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
<a name="l00005"></a>00005 <span class="comment"> * modify it under the terms of the GNU Library General Public</span>
<a name="l00006"></a>00006 <span class="comment"> * License as published by the Free Software Foundation; either</span>
<a name="l00007"></a>00007 <span class="comment"> * version 2 of the License, or (at your option) any later version.</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> * This library is distributed in the hope that it will be useful,</span>
<a name="l00010"></a>00010 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00011"></a>00011 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00012"></a>00012 <span class="comment"> * Library General Public License for more details.</span>
<a name="l00013"></a>00013 <span class="comment"> *</span>
<a name="l00014"></a>00014 <span class="comment"> * You should have received a copy of the GNU Library General Public</span>
<a name="l00015"></a>00015 <span class="comment"> * License along with this library; if not, write to the Free</span>
<a name="l00016"></a>00016 <span class="comment"> * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span>
<a name="l00017"></a>00017 <span class="comment"> */</span>
<a name="l00018"></a>00018 
<a name="l00019"></a>00019 <span class="preprocessor">#ifndef BAKERY_APP_GTK_H</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define BAKERY_APP_GTK_H</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;<a class="code" href="bakeryconfig_8h.html">bakeryconfig.h</a>&gt;</span> <span class="comment">// For BAKERY_MAEMO_ENABLED</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;<a class="code" href="App_8h.html">bakery/App/App.h</a>&gt;</span>
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 <span class="preprocessor">#ifdef BAKERY_MAEMO_ENABLED</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#include &lt;hildonmm/window.h&gt;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#endif</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;<a class="codeRef" doxygen="gtkmm_doxygen_tags:" href="menubar_8h.html">gtkmm/menubar.h</a>&gt;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;<a class="codeRef" doxygen="gtkmm_doxygen_tags:" href="menu_8h.html">gtkmm/menu.h</a>&gt;</span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;<a class="codeRef" doxygen="gtkmm_doxygen_tags:" href="toolbar_8h.html">gtkmm/toolbar.h</a>&gt;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;<a class="codeRef" doxygen="gtkmm_doxygen_tags:" href="handlebox_8h.html">gtkmm/handlebox.h</a>&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;<a class="codeRef" doxygen="gtkmm_doxygen_tags:" href="dialog_8h.html">gtkmm/dialog.h</a>&gt;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;<a class="codeRef" doxygen="gtkmm_doxygen_tags:" href="uimanager_8h.html">gtkmm/uimanager.h</a>&gt;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &lt;libglademm.h&gt;</span>
<a name="l00036"></a>00036 
<a name="l00037"></a>00037 <span class="keyword">namespace </span>Bakery
<a name="l00038"></a>00038 {
<a name="l00039"></a>00039 
<a name="l00046"></a><a class="code" href="classBakery_1_1App__Gtk.html">00046</a> <span class="keyword">class </span><a class="code" href="classBakery_1_1App__Gtk.html" title="This class implements Bakery::App using gtkmm.">App_Gtk</a>
<a name="l00047"></a>00047   : <span class="keyword">virtual</span> <span class="keyword">public</span> <a class="code" href="classBakery_1_1App.html" title="Bakery&amp;#39;s Main Window.">App</a>, <span class="comment">//virtual because App_WithDoc_Gtk will inherit it via App_Gtk and via App_With_Doc</span>
<a name="l00048"></a>00048 #ifdef BAKERY_MAEMO_ENABLED
<a name="l00049"></a>00049     <span class="keyword">virtual</span> <span class="keyword">public</span> Hildon::Window <span class="comment">//inherit virtually to share sigc::trackable.</span>
<a name="l00050"></a>00050 #else
<a name="l00051"></a>00051     <span class="keyword">virtual</span> <span class="keyword">public</span> Gtk::Window <span class="comment">//inherit virtually to share sigc::trackable.</span>
<a name="l00052"></a>00052 #endif
<a name="l00053"></a>00053 {
<a name="l00054"></a>00054 <span class="keyword">public</span>:
<a name="l00055"></a>00055 <span class="preprocessor">#ifdef BAKERY_MAEMO_ENABLED</span>
<a name="l00056"></a>00056 <span class="preprocessor"></span>  <span class="keyword">typedef</span> Hildon::Window <a class="codeRef" doxygen="gtkmm_doxygen_tags:" href="classGtk_1_1Window.html">ParentWindow</a>;
<a name="l00057"></a>00057 <span class="preprocessor">#else</span>
<a name="l00058"></a><a class="code" href="classBakery_1_1App__Gtk.html#844eafa5d19e09b9702166fb3174843b">00058</a> <span class="preprocessor"></span>  <span class="keyword">typedef</span> <a class="codeRef" doxygen="gtkmm_doxygen_tags:" href="classGtk_1_1Window.html">Gtk::Window</a> <a class="codeRef" doxygen="gtkmm_doxygen_tags:" href="classGtk_1_1Window.html">ParentWindow</a>;
<a name="l00059"></a>00059 <span class="preprocessor">#endif</span>
<a name="l00060"></a><a class="code" href="classBakery_1_1App__Gtk.html#bf8b8a647f42e60bf7b4105d490f6843">00060</a> <span class="preprocessor"></span>  <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classBakery_1_1AppInstanceManager.html" title="Contains a list of App instances.">AppInstanceManager</a>;
<a name="l00061"></a>00061 
<a name="l00063"></a>00063   <a class="code" href="classBakery_1_1App__Gtk.html#80ede563f7ecb3552e80de75edfbbc1d" title="Don&amp;#39;t forget to call init() too.">App_Gtk</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="glibmm_doxygen_tags:" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp; appname);
<a name="l00064"></a>00064 
<a name="l00066"></a>00066   <a class="code" href="classBakery_1_1App__Gtk.html#80ede563f7ecb3552e80de75edfbbc1d" title="Don&amp;#39;t forget to call init() too.">App_Gtk</a>(BaseObjectType* cobject, <span class="keyword">const</span> <a class="codeRef" doxygen="glibmm_doxygen_tags:" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp; appname);
<a name="l00067"></a>00067 
<a name="l00068"></a>00068   <span class="keyword">virtual</span> <a class="code" href="classBakery_1_1App__Gtk.html#394359d5c0dcac51b159afcf498a4397">~App_Gtk</a>();
<a name="l00069"></a>00069 
<a name="l00071"></a>00071   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <span class="keyword">add</span>(<a class="codeRef" doxygen="gtkmm_doxygen_tags:" href="classGtk_1_1Widget.html">Gtk::Widget</a>&amp; child);
<a name="l00072"></a>00072 
<a name="l00074"></a>00074   <span class="keyword">static</span> <a class="codeRef" doxygen="glibmm_doxygen_tags:" href="classGlib_1_1ustring.html">Glib::ustring</a> <a class="code" href="classBakery_1_1App__Gtk.html#988ecc118cc31c785919b4fa4046633b" title="For instance, to create bold primary text for a dialog box, without marking the markup...">util_bold_message</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="glibmm_doxygen_tags:" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp; message);
<a name="l00075"></a>00075 
<a name="l00076"></a>00076 <span class="keyword">protected</span>:
<a name="l00077"></a>00077 
<a name="l00078"></a>00078   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1App__Gtk.html#cbe4224310aa4900414f58b7885d03c8">init</a>(); <span class="comment">//Override to show().</span>
<a name="l00079"></a>00079   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1App__Gtk.html#aeb5d2126c19af7df9adfc2a6dca576b" title="Builds the intial ui string, with placeholders.">init_ui_manager</a>(); <span class="comment">//Override this to add more UI placeholders</span>
<a name="l00080"></a>00080   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1App__Gtk.html#719504cbe1ff2bac938c112d06dbf067" title="Override this to add more menus or different menus.">init_menus</a>(); <span class="comment">//Override this to add more or different menus.</span>
<a name="l00081"></a>00081   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1App__Gtk.html#7d6de6e7ac5c938e8edb90d6160f83b6" title="Call this from init_menus() to add the standard file menu.">init_menus_file</a>(); <span class="comment">//Call this from init_menus() to add the standard file menu.</span>
<a name="l00082"></a>00082   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1App__Gtk.html#b0387ef4b2c6491fb977499d261a572e" title="Call this from init_menus() to add the standard edit menu.">init_menus_edit</a>(); <span class="comment">//Call this from init_menus() to add the standard edit menu</span>
<a name="l00083"></a>00083   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1App__Gtk.html#b1637add9ea49fae6b34dbc06c670459" title="Call this from init_menus() to add the standard help menu.">init_menus_help</a>(); <span class="comment">//Call this from init_menus() to add the standard help menu.  </span>
<a name="l00084"></a>00084   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1App__Gtk.html#d3e9e2710e5d4795fd7d703d43117744">init_toolbars</a>();
<a name="l00085"></a>00085 
<a name="l00086"></a>00086   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1App__Gtk.html#994217b1ec74ab0cf2a9f8010ac64171">init_layout</a>(); <span class="comment">//Arranges the menu, toolbar, etc.</span>
<a name="l00087"></a>00087 
<a name="l00088"></a>00088   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1App__Gtk.html#e0f02f42f8c42ac0d28b8ddcc01dc3c8">add_ui_from_string</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="glibmm_doxygen_tags:" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp; ui_description); <span class="comment">//Convenience function</span>
<a name="l00089"></a>00089 
<a name="l00090"></a>00090   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1App__Gtk.html#b8565f3593f13f5e4a3cd4b4798fa372">on_hide</a>(); <span class="comment">//override.</span>
<a name="l00091"></a>00091 
<a name="l00092"></a>00092   <span class="comment">//Signal handlers:</span>
<a name="l00093"></a>00093 
<a name="l00094"></a>00094   <span class="comment">//Menus:</span>
<a name="l00095"></a>00095   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1App__Gtk.html#d06a052cbd91005ec86c816a8197bba6">on_menu_help_about</a>();
<a name="l00096"></a>00096 
<a name="l00097"></a>00097   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1App__Gtk.html#66ebe43d2b60a0fa4e685ab26728e1e0">on_about_close</a>();
<a name="l00098"></a>00098 
<a name="l00099"></a>00099 
<a name="l00100"></a>00100   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1App__Gtk.html#d0e31c0af9080991f4868cd30abe87c8">ui_hide</a>();
<a name="l00101"></a>00101   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1App__Gtk.html#261e147167da0bfdd4dde7b29cb05f1e">ui_bring_to_front</a>();
<a name="l00102"></a>00102 
<a name="l00103"></a>00103   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classBakery_1_1App__Gtk.html#fafb060c74b6ac3ef134a027a9e35187">on_delete_event</a>(GdkEventAny* <a class="codeRef" doxygen="gtkmm_doxygen_tags:" href="classGtk_1_1Widget.html#ff4e0463f492043197c7d70daaad7590">event</a>); <span class="comment">//override</span>
<a name="l00104"></a>00104 
<a name="l00105"></a>00105   <span class="comment">//virtual void destroy_and_remove_from_list();</span>
<a name="l00106"></a>00106 
<a name="l00107"></a>00107   <span class="comment">//Member data:</span>
<a name="l00108"></a>00108 
<a name="l00109"></a>00109   <span class="comment">//UIManager and Actions</span>
<a name="l00110"></a><a class="code" href="classBakery_1_1App__Gtk.html#86dbe5edc1f161b43ce41cce27e2e201">00110</a>   <a class="codeRef" doxygen="glibmm_doxygen_tags:" href="classGlib_1_1RefPtr.html">Glib::RefPtr&lt;Gtk::UIManager&gt;</a> <a class="code" href="classBakery_1_1App__Gtk.html#86dbe5edc1f161b43ce41cce27e2e201">m_refUIManager</a>;
<a name="l00111"></a><a class="code" href="classBakery_1_1App__Gtk.html#78b6f6b70471aae393460371d2f51d15">00111</a>   <a class="codeRef" doxygen="glibmm_doxygen_tags:" href="classGlib_1_1RefPtr.html">Glib::RefPtr&lt;Gtk::ActionGroup&gt;</a> <a class="code" href="classBakery_1_1App__Gtk.html#78b6f6b70471aae393460371d2f51d15">m_refFileActionGroup</a>;
<a name="l00112"></a><a class="code" href="classBakery_1_1App__Gtk.html#4aa427833946dc77780dd7d37eb65fd2">00112</a>   <a class="codeRef" doxygen="glibmm_doxygen_tags:" href="classGlib_1_1RefPtr.html">Glib::RefPtr&lt;Gtk::ActionGroup&gt;</a> <a class="code" href="classBakery_1_1App__Gtk.html#4aa427833946dc77780dd7d37eb65fd2">m_refEditActionGroup</a>;
<a name="l00113"></a><a class="code" href="classBakery_1_1App__Gtk.html#39a94355e544f6c4617f24333d467e1d">00113</a>   <a class="codeRef" doxygen="glibmm_doxygen_tags:" href="classGlib_1_1RefPtr.html">Glib::RefPtr&lt;Gtk::ActionGroup&gt;</a> <a class="code" href="classBakery_1_1App__Gtk.html#39a94355e544f6c4617f24333d467e1d">m_refHelpActionGroup</a>;
<a name="l00114"></a>00114 
<a name="l00115"></a>00115   <span class="comment">//Member widgets:</span>
<a name="l00116"></a><a class="code" href="classBakery_1_1App__Gtk.html#d41488add4a713c60d91750cff104955">00116</a>   <a class="codeRef" doxygen="gtkmm_doxygen_tags:" href="classGtk_1_1VBox.html">Gtk::VBox</a>* <a class="code" href="classBakery_1_1App__Gtk.html#d41488add4a713c60d91750cff104955">m_pVBox</a>;
<a name="l00117"></a><a class="code" href="classBakery_1_1App__Gtk.html#9b841789d0cb16246a2e2eb1840b2106">00117</a>   <a class="codeRef" doxygen="gtkmm_doxygen_tags:" href="classGtk_1_1VBox.html">Gtk::VBox</a> <a class="code" href="classBakery_1_1App__Gtk.html#9b841789d0cb16246a2e2eb1840b2106">m_VBox_PlaceHolder</a>;
<a name="l00118"></a>00118 
<a name="l00119"></a>00119   <span class="comment">//Gtk::MenuBar m_MenuBar;</span>
<a name="l00120"></a>00120   <span class="comment">//Gtk::Menu m_Menu_File, m_Menu_Edit, m_Menu_Help;</span>
<a name="l00121"></a>00121 
<a name="l00122"></a><a class="code" href="classBakery_1_1App__Gtk.html#89e39b79b6ff248f48c687a2d5447e6c">00122</a>   <a class="codeRef" doxygen="gtkmm_doxygen_tags:" href="classGtk_1_1HandleBox.html">Gtk::HandleBox</a> <a class="code" href="classBakery_1_1App__Gtk.html#89e39b79b6ff248f48c687a2d5447e6c">m_HandleBox_Toolbar</a>;
<a name="l00123"></a>00123   <span class="comment">//Gtk::Toolbar m_Toolbar;</span>
<a name="l00124"></a>00124 
<a name="l00125"></a>00125   <span class="comment">//All instances share 1 About box:</span>
<a name="l00126"></a><a class="code" href="classBakery_1_1App__Gtk.html#24455602dbebbf8ee686e03496e34f3e">00126</a>   <span class="keyword">static</span> <a class="codeRef" doxygen="gtkmm_doxygen_tags:" href="classGtk_1_1Window.html">Gtk::Window</a>* <a class="code" href="classBakery_1_1App__Gtk.html#24455602dbebbf8ee686e03496e34f3e">m_pAbout</a>; <span class="comment">//About box.</span>
<a name="l00127"></a>00127 
<a name="l00128"></a>00128 
<a name="l00129"></a>00129   <span class="comment">//typedef std::vector&lt;poptOption&gt; type_vecPoptOptions;</span>
<a name="l00130"></a>00130   <span class="comment">//type_vecPoptOptions m_vecPoptOptions;</span>
<a name="l00131"></a>00131 };
<a name="l00132"></a>00132 
<a name="l00133"></a>00133 } <span class="comment">//namespace</span>
<a name="l00134"></a>00134 
<a name="l00135"></a>00135 <span class="preprocessor">#endif //BAKERY_APP_GTK_H</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Dec 8 18:42:35 2008 for bakery by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>