<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>gtkmm 2.4: Gtk::AccelMap Namespace Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#ffffff"> <table border="0" width="100%"> <tr> <td width="10%" height="40"><img src="../../images/gtkmm_logo.gif" alt="logo" border="0" width="100%" height="100%"/></td> <td width="90%" height="40"><img src="../../images/top.gif" alt="top" width="100%" height="40"/></td> </tr> </table> <center> <a class="qindex" href="../../index.html">Main Page</a> <a href="group__Widgets.html">Widgets</a> <a class="qindex" href="namespaces.html"> Namespaces</a> <a href="../../tutorial/html/index.html"> Book</a> </center> <hr width="100%"/> <!-- begin main content --> <div id="content"> <!-- Generated by Doxygen 1.5.1 --> <div class="nav"> <a class="el" href="namespaceGtk.html">Gtk</a>::<a class="el" href="namespaceGtk_1_1AccelMap.html">AccelMap</a></div> <h1>Gtk::AccelMap Namespace Reference</h1> <p> <p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGtk_1_1AccelMap.html#6313a0f99aebe342c08f2d2d0f9416ad">add_entry</a> (const std::string& accel_path, guint accel_key, <a class="el" href="group__gdkmmEnums.html#g734c2979005c87dbe51223a0128cdd97">Gdk::ModifierType</a> accel_mods)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Registers a new accelerator with the global accelerator map. <a href="#6313a0f99aebe342c08f2d2d0f9416ad"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGtk_1_1AccelMap.html#95ea03719ffcda0d038252d3886f935b">change_entry</a> (const std::string& accel_path, guint accel_key, <a class="el" href="group__gdkmmEnums.html#g734c2979005c87dbe51223a0128cdd97">Gdk::ModifierType</a> accel_mods, bool replace)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Changes the accel_key and accel_mods currently associated with accel_path. <a href="#95ea03719ffcda0d038252d3886f935b"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGtk_1_1AccelMap.html#b08ddf040f6014f34398ef1f5ff61d20">load</a> (const std::string& filename)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Parses a file previously saved with <a class="el" href="namespaceGtk_1_1AccelMap.html#bcf3439b02031c060e7984f919604aaa">save()</a> for accelerator specifications, and propagates them accordingly. <a href="#b08ddf040f6014f34398ef1f5ff61d20"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGtk_1_1AccelMap.html#ab88799290240d3b9f95ea5a8db296a0">lock_path</a> (const std::string& accel_path)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Locks the given accelerator path. <a href="#ab88799290240d3b9f95ea5a8db296a0"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGtk_1_1AccelMap.html#65ed240c5058b980c7047c519b3a3a37">lookup_entry</a> (const <a class="elRef" doxygen="glibmm_doxygen_tags:../../../../glibmm-2.4/docs/reference/html/" href="../../../../glibmm-2.4/docs/reference/html/classGlib_1_1ustring.html">Glib::ustring</a>& accel_path, <a class="el" href="classGtk_1_1AccelKey.html">Gtk::AccelKey</a>& key)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Looks up the accelerator entry for accel_path and fills in key. <a href="#65ed240c5058b980c7047c519b3a3a37"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGtk_1_1AccelMap.html#2b71d89fdafdf9b71ef7ba1dedf5e70c">lookup_entry</a> (const <a class="elRef" doxygen="glibmm_doxygen_tags:../../../../glibmm-2.4/docs/reference/html/" href="../../../../glibmm-2.4/docs/reference/html/classGlib_1_1ustring.html">Glib::ustring</a>& accel_path)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Looks up the accelerator entry for accel_path. <a href="#2b71d89fdafdf9b71ef7ba1dedf5e70c"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGtk_1_1AccelMap.html#bcf3439b02031c060e7984f919604aaa">save</a> (const std::string& filename)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Saves current accelerator specifications (accelerator path, key and modifiers) to filename. <a href="#bcf3439b02031c060e7984f919604aaa"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGtk_1_1AccelMap.html#34e0669e9f2eb96abeaba309d751f535">unlock_path</a> (const std::string& accel_path)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Unlocks the given accelerator path. <a href="#34e0669e9f2eb96abeaba309d751f535"></a><br></td></tr> </table> <hr><h2>Function Documentation</h2> <a class="anchor" name="6313a0f99aebe342c08f2d2d0f9416ad"></a><!-- doxytag: member="Gtk::AccelMap::add_entry" ref="6313a0f99aebe342c08f2d2d0f9416ad" args="(const std::string &accel_path, guint accel_key, Gdk::ModifierType accel_mods)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gtk::AccelMap::add_entry </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>accel_path</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">guint </td> <td class="paramname"> <em>accel_key</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="group__gdkmmEnums.html#g734c2979005c87dbe51223a0128cdd97">Gdk::ModifierType</a> </td> <td class="paramname"> <em>accel_mods</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Registers a new accelerator with the global accelerator map. <p> This function should only be called once per accel_path with the canonical accel_key and accel_mods for this path. To change the accelerator during runtime programatically, use <a class="el" href="namespaceGtk_1_1AccelMap.html#95ea03719ffcda0d038252d3886f935b">change_entry()</a>. The accelerator path must consist of "& lt;WINDOWTYPE& gt;/Category1/Category2/.../Action", where <WINDOWTYPE> should be a unique application-specific identifier, that corresponds to the kind of window the accelerator is being used in, e.g. "Gimp-Image", "Abiword-Document" or "Gnumeric-Settings". The Category1/.../Action portion is most appropriately chosen by the action the accelerator triggers, i.e. for accelerators on menu items, choose the item's menu path, e.g. "File/Save As", "Image/View/Zoom" or "Edit/Select All". So a full valid accelerator path may look like: "& lt;Gimp-Toolbox& gt;/File/Dialogs/Tool Options...".<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>accel_path</em> </td><td>valid accelerator path </td></tr> <tr><td valign="top"></td><td valign="top"><em>accel_key</em> </td><td>the accelerator key </td></tr> <tr><td valign="top"></td><td valign="top"><em>accel_mods</em> </td><td>the accelerator modifiers </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="95ea03719ffcda0d038252d3886f935b"></a><!-- doxytag: member="Gtk::AccelMap::change_entry" ref="95ea03719ffcda0d038252d3886f935b" args="(const std::string &accel_path, guint accel_key, Gdk::ModifierType accel_mods, bool replace)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Gtk::AccelMap::change_entry </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>accel_path</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">guint </td> <td class="paramname"> <em>accel_key</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="group__gdkmmEnums.html#g734c2979005c87dbe51223a0128cdd97">Gdk::ModifierType</a> </td> <td class="paramname"> <em>accel_mods</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>replace</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Changes the accel_key and accel_mods currently associated with accel_path. <p> Due to conflicts with other accelerators, a change may not always be possible, replace indicates whether other accelerators may be deleted to resolve such conflicts. A change will only occur if all conflicts could be resolved (which might not be the case if conflicting accelerators are locked). Successful changes are indicated by a true return value.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>accel_path</em> </td><td>a valid accelerator path </td></tr> <tr><td valign="top"></td><td valign="top"><em>accel_key</em> </td><td>the new accelerator key </td></tr> <tr><td valign="top"></td><td valign="top"><em>accel_mods</em> </td><td>the new accelerator modifiers </td></tr> <tr><td valign="top"></td><td valign="top"><em>replace</em> </td><td>true if other accelerators may be deleted upon conflicts </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>true if the accelerator could be changed, false otherwise </dd></dl> </div> </div><p> <a class="anchor" name="b08ddf040f6014f34398ef1f5ff61d20"></a><!-- doxytag: member="Gtk::AccelMap::load" ref="b08ddf040f6014f34398ef1f5ff61d20" args="(const std::string &filename)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gtk::AccelMap::load </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>filename</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Parses a file previously saved with <a class="el" href="namespaceGtk_1_1AccelMap.html#bcf3439b02031c060e7984f919604aaa">save()</a> for accelerator specifications, and propagates them accordingly. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>filename</em> </td><td>a file containing accelerator specifications </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="ab88799290240d3b9f95ea5a8db296a0"></a><!-- doxytag: member="Gtk::AccelMap::lock_path" ref="ab88799290240d3b9f95ea5a8db296a0" args="(const std::string &accel_path)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gtk::AccelMap::lock_path </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>accel_path</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Locks the given accelerator path. <p> Locking an accelerator path prevents its accelerator from being changed during runtime. A locked accelerator path can be unlocked by <a class="el" href="namespaceGtk_1_1AccelMap.html#34e0669e9f2eb96abeaba309d751f535">unlock_path()</a>. Refer to <a class="el" href="namespaceGtk_1_1AccelMap.html#95ea03719ffcda0d038252d3886f935b">change_entry()</a> about runtime accelerator changes.<p> Note that locking of individual accelerator paths is independent from locking the GtkAccelGroup containing them. For runtime accelerator changes to be possible both the accelerator path and its <a class="el" href="classGtk_1_1AccelGroup.html">AccelGroup</a> have to be unlocked.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>accel_path</em> </td><td>a valid accelerator path</td></tr> </table> </dl> <dl compact><dt><b><a class="el" href="newin2p4s.html#_newin2p4s000014">Since gtkmm 2.4:</a></b></dt><dd></dd></dl> </div> </div><p> <a class="anchor" name="65ed240c5058b980c7047c519b3a3a37"></a><!-- doxytag: member="Gtk::AccelMap::lookup_entry" ref="65ed240c5058b980c7047c519b3a3a37" args="(const Glib::ustring &accel_path, Gtk::AccelKey &key)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Gtk::AccelMap::lookup_entry </td> <td>(</td> <td class="paramtype">const <a class="elRef" doxygen="glibmm_doxygen_tags:../../../../glibmm-2.4/docs/reference/html/" href="../../../../glibmm-2.4/docs/reference/html/classGlib_1_1ustring.html">Glib::ustring</a> & </td> <td class="paramname"> <em>accel_path</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classGtk_1_1AccelKey.html">Gtk::AccelKey</a>& </td> <td class="paramname"> <em>key</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Looks up the accelerator entry for accel_path and fills in key. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>accel_path</em> </td><td>A valid accelerator path. </td></tr> <tr><td valign="top"></td><td valign="top"><em>key</em> </td><td>The accelerator key to be filled in. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>true if accel_path is known, false otherwise</dd></dl> <dl compact><dt><b><a class="el" href="newin2p10s.html#_newin2p10s000023">Since gtkmm 2.10:</a></b></dt><dd></dd></dl> </div> </div><p> <a class="anchor" name="2b71d89fdafdf9b71ef7ba1dedf5e70c"></a><!-- doxytag: member="Gtk::AccelMap::lookup_entry" ref="2b71d89fdafdf9b71ef7ba1dedf5e70c" args="(const Glib::ustring &accel_path)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Gtk::AccelMap::lookup_entry </td> <td>(</td> <td class="paramtype">const <a class="elRef" doxygen="glibmm_doxygen_tags:../../../../glibmm-2.4/docs/reference/html/" href="../../../../glibmm-2.4/docs/reference/html/classGlib_1_1ustring.html">Glib::ustring</a> & </td> <td class="paramname"> <em>accel_path</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Looks up the accelerator entry for accel_path. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>accel_path</em> </td><td>A valid accelerator path. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>true if accel_path is known, false otherwise</dd></dl> <dl compact><dt><b><a class="el" href="newin2p10s.html#_newin2p10s000022">Since gtkmm 2.10:</a></b></dt><dd></dd></dl> </div> </div><p> <a class="anchor" name="bcf3439b02031c060e7984f919604aaa"></a><!-- doxytag: member="Gtk::AccelMap::save" ref="bcf3439b02031c060e7984f919604aaa" args="(const std::string &filename)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gtk::AccelMap::save </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>filename</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Saves current accelerator specifications (accelerator path, key and modifiers) to filename. <p> The file is written in a format suitable to be read back in by <a class="el" href="namespaceGtk_1_1AccelMap.html#b08ddf040f6014f34398ef1f5ff61d20">load()</a>.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>filename</em> </td><td>the file to contain accelerator specifications </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="34e0669e9f2eb96abeaba309d751f535"></a><!-- doxytag: member="Gtk::AccelMap::unlock_path" ref="34e0669e9f2eb96abeaba309d751f535" args="(const std::string &accel_path)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gtk::AccelMap::unlock_path </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>accel_path</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Unlocks the given accelerator path. <p> Refer to gtk_accel_map_lock_path() about accelerator path locking.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>accel_path</em> </td><td>a valid accelerator path</td></tr> </table> </dl> <dl compact><dt><b><a class="el" href="newin2p4s.html#_newin2p4s000015">Since gtkmm 2.4:</a></b></dt><dd></dd></dl> </div> </div><p> </div> <!-- end main content --> <hr><address><small> Generated for gtkmm 2.4 by <a href="http://www.doxygen.org/index.html"> Doxygen</a> 1.5.1 © 1997-2001</small></address> </body> </html>