Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > e3918135d52936bad0ecc8654eedea12 > files > 355

Falcon-doc-0.9.6.8-1.fc15.noarch.rpm

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" >
<head><meta content="text/html;charset=&amp;quot;utf-8&amp;quot;" http-equiv="Content-type"/><link href="faldoc.css" rel="stylesheet" type="text/css"/><title> - Class GtkToolbar</title></head><body class="faldoc"><ul class="navi_top"><li class="top"><a href="index.html">Top: Table of contents</a></li>
         <li class="up"><a href="gtk.html">Up: The Falcon GTK Binding module</a></li>
         <li class="prev"><a href="gtk_GtkToolShell.html">Previous: Class GtkToolShell</a></li>
         <li class="next"><a href="gtk_GtkTreeIter.html">Next: Class GtkTreeIter</a></li>
         <li class="clear"></li>
         </ul><div id="page_body"><h1><span class="toc_number">10.128</span>Class GtkToolbar</h1><p class="brief">Create bars of buttons and other widgets </p>
         <pre class="prototype">Class GtkToolbar</pre>
         <p>A toolbar can contain instances of a subclass of GtkToolItem. To add a GtkToolItem to the a toolbar, use gtk_toolbar_insert(). To remove an item from the toolbar use gtk_container_remove(). To add a button to the toolbar, add an instance of GtkToolButton. </p>
<p>Toolbar items can be visually grouped by adding instances of GtkSeparatorToolItem to the toolbar. If a GtkSeparatorToolItem has the "expand" property set to TRUE and the "draw" property set to FALSE the effect is to force all following items to the end of the toolbar. </p>
<p>Creating a context menu for the toolbar can be done by connecting to the "popup-context-menu" signal. </p>
<table class="members">
         <tbody><tr class="member_type"><td class="member_type" colspan="2">Methods</td></tr>
               <tr><td><a href="#get_drop_index">get_drop_index</a></td><td>Returns the position corresponding to the indicated point on toolbar. </td></tr>
               <tr><td><a href="#get_icon_size">get_icon_size</a></td><td>Retrieves the icon size for the toolbar. </td></tr>
               <tr><td><a href="#get_item_index">get_item_index</a></td><td>Returns the position of item on the toolbar, starting from 0. </td></tr>
               <tr><td><a href="#get_n_items">get_n_items</a></td><td>Returns the number of items on the toolbar. </td></tr>
               <tr><td><a href="#get_nth_item">get_nth_item</a></td><td>Returns the n'th item on toolbar, or NULL if the toolbar does not contain an n'th item. </td></tr>
               <tr><td><a href="#get_relief_style">get_relief_style</a></td><td>Returns the relief style of buttons on toolbar. </td></tr>
               <tr><td><a href="#get_show_arrow">get_show_arrow</a></td><td>Returns whether the toolbar has an overflow menu. </td></tr>
               <tr><td><a href="#get_style">get_style</a></td><td>Retrieves whether the toolbar has text, icons, or both. </td></tr>
               <tr><td><a href="#insert">insert</a></td><td>Insert a GtkToolItem into the toolbar at position pos. </td></tr>
               <tr><td><a href="#set_drop_highlight_item">set_drop_highlight_item</a></td><td>Highlights toolbar to give an idea of what it would look like if item was added to toolbar at the position indicated by index_. </td></tr>
               <tr><td><a href="#set_icon_size">set_icon_size</a></td><td>This function sets the size of stock icons in the toolbar. </td></tr>
               <tr><td><a href="#set_show_arrow">set_show_arrow</a></td><td>Sets whether to show an overflow menu when toolbar doesn't have room for all items on it. </td></tr>
               <tr><td><a href="#set_style">set_style</a></td><td>Alters the view of toolbar to display either icons only, text only, or both. </td></tr>
               <tr><td><a href="#signal_orientation_changed">signal_orientation_changed</a></td><td>Emitted when the orientation of the toolbar changes. </td></tr>
               <tr><td><a href="#signal_popup_context_menu">signal_popup_context_menu</a></td><td>Emitted when the user right-clicks the toolbar or uses the keybinding to display a popup menu. </td></tr>
               <tr><td><a href="#signal_style_changed">signal_style_changed</a></td><td>Emitted when the style of the toolbar changes. </td></tr>
               <tr><td><a href="#unset_icon_size">unset_icon_size</a></td><td>Unsets toolbar icon size set with gtk_toolbar_set_icon_size(), so that user preferences will be used to determine the icon size. </td></tr>
               <tr><td><a href="#unset_style">unset_style</a></td><td>Unsets a toolbar style set with gtk_toolbar_set_style(), so that user preferences will be used to determine the toolbar style. </td></tr>
               </tbody>
            </table>
         <h2>Methods</h2><h3><a name="get_drop_index">get_drop_index</a></h3><p class="brief">Returns the position corresponding to the indicated point on toolbar. </p>
         <pre class="prototype">GtkToolbar.get_drop_index( x, y )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">x</td><td class="content"> x coordinate of a point on the toolbar </td></tr>
               <tr class="param"><td class="name">y</td><td class="content"> y coordinate of a point on the toolbar </td></tr>
               <tr class="return"><td class="name">Return</td><td class="content">The position corresponding to the point (x, y) on the toolbar. </td></tr>
               </tbody>
            </table>
         <p>This is useful when dragging items to the toolbar: this function returns the position a new item should be inserted. </p>
<p>x and y are in toolbar coordinates. </p>
<h3><a name="get_icon_size">get_icon_size</a></h3><p class="brief">Retrieves the icon size for the toolbar. </p>
         <pre class="prototype">GtkToolbar.get_icon_size()</pre>
         <table class="prototype">
         <tbody><tr class="return"><td class="name">Return</td><td class="content">the current icon size for the icons on the toolbar (GtkIconSize). </td></tr>
               </tbody>
            </table>
         <h3><a name="get_item_index">get_item_index</a></h3><p class="brief">Returns the position of item on the toolbar, starting from 0. </p>
         <pre class="prototype">GtkToolbar.get_item_index( item )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">item</td><td class="content"> a GtkToolItem that is a child of toolbar </td></tr>
               <tr class="return"><td class="name">Return</td><td class="content">The position of item on the toolbar </td></tr>
               </tbody>
            </table>
         <p>It is an error if item is not a child of the toolbar. </p>
<h3><a name="get_n_items">get_n_items</a></h3><p class="brief">Returns the number of items on the toolbar. </p>
         <pre class="prototype">GtkToolbar.get_n_items()</pre>
         <table class="prototype">
         <tbody><tr class="return"><td class="name">Return</td><td class="content">the number of items on the toolbar </td></tr>
               </tbody>
            </table>
         <h3><a name="get_nth_item">get_nth_item</a></h3><p class="brief">Returns the n'th item on toolbar, or NULL if the toolbar does not contain an n'th item. </p>
         <pre class="prototype">GtkToolbar.get_nth_item()</pre>
         <h3><a name="get_relief_style">get_relief_style</a></h3><p class="brief">Returns the relief style of buttons on toolbar. </p>
         <pre class="prototype">GtkToolbar.get_relief_style()</pre>
         <table class="prototype">
         <tbody><tr class="return"><td class="name">Return</td><td class="content">The relief style of buttons on toolbar (GtkReliefStyle). </td></tr>
               </tbody>
            </table>
         <h3><a name="get_show_arrow">get_show_arrow</a></h3><p class="brief">Returns whether the toolbar has an overflow menu. </p>
         <pre class="prototype">GtkToolbar.get_show_arrow()</pre>
         <table class="prototype">
         <tbody><tr class="return"><td class="name">Return</td><td class="content">TRUE if the toolbar has an overflow menu. </td></tr>
               </tbody>
            </table>
         <h3><a name="get_style">get_style</a></h3><p class="brief">Retrieves whether the toolbar has text, icons, or both. </p>
         <pre class="prototype">GtkToolbar.get_style()</pre>
         <table class="prototype">
         <tbody><tr class="return"><td class="name">Return</td><td class="content">the current style of toolbar (GtkToolbarStyle). </td></tr>
               </tbody>
            </table>
         <h3><a name="insert">insert</a></h3><p class="brief">Insert a GtkToolItem into the toolbar at position pos. </p>
         <pre class="prototype">GtkToolbar.insert( item, pos )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">item</td><td class="content"> a GtkToolItem </td></tr>
               <tr class="param"><td class="name">pos</td><td class="content"> the position of the new item </td></tr>
               </tbody>
            </table>
         <p>If pos is 0 the item is prepended to the start of the toolbar. If pos is negative, the item is appended to the end of the toolbar. </p>
<h3><a name="set_drop_highlight_item">set_drop_highlight_item</a></h3><p class="brief">Highlights toolbar to give an idea of what it would look like if item was added to toolbar at the position indicated by index_. </p>
         <pre class="prototype">GtkToolbar.set_drop_highlight_item( tool_item, index )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">tool_item</td><td class="content"> a GtkToolItem, or nil to turn of highlighting. </td></tr>
               <tr class="param"><td class="name">index</td><td class="content"> a position on toolbar </td></tr>
               </tbody>
            </table>
         <p>If item is nil, highlighting is turned off. In that case index_ is ignored. </p>
<p>The tool_item passed to this function must not be part of any widget hierarchy. When an item is set as drop highlight item it can not added to any widget hierarchy or used as highlight item for another toolbar. </p>
<h3><a name="set_icon_size">set_icon_size</a></h3><p class="brief">This function sets the size of stock icons in the toolbar. </p>
         <pre class="prototype">GtkToolbar.set_icon_size( icon_size )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">icon_size</td><td class="content"> The GtkIconSize that stock icons in the toolbar shall have </td></tr>
               </tbody>
            </table>
         <p>You can call it both before you add the icons and after they've been added. The size you set will override user preferences for the default icon size. </p>
<p>This should only be used for special-purpose toolbars, normal application toolbars should respect the user preferences for the size of icons. </p>
<h3><a name="set_show_arrow">set_show_arrow</a></h3><p class="brief">Sets whether to show an overflow menu when toolbar doesn't have room for all items on it. </p>
         <pre class="prototype">GtkToolbar.set_show_arrow( show_arrow )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">show_arrow</td><td class="content"> Whether to show an overflow menu </td></tr>
               </tbody>
            </table>
         <p>If TRUE, items that there are not room are available through an overflow menu. </p>
<h3><a name="set_style">set_style</a></h3><p class="brief">Alters the view of toolbar to display either icons only, text only, or both. </p>
         <pre class="prototype">GtkToolbar.set_style( style )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">style</td><td class="content"> the new style for toolbar (GtkToolbarStyle). </td></tr>
               </tbody>
            </table>
         <h3><a name="signal_orientation_changed">signal_orientation_changed</a></h3><p class="brief">Emitted when the orientation of the toolbar changes. </p>
         <pre class="prototype">GtkToolbar.signal_orientation_changed()</pre>
         <h3><a name="signal_popup_context_menu">signal_popup_context_menu</a></h3><p class="brief">Emitted when the user right-clicks the toolbar or uses the keybinding to display a popup menu. </p>
         <pre class="prototype">GtkToolbar.signal_popup_context_menu()</pre>
         <p>Application developers should handle this signal if they want to display a context menu on the toolbar. The context-menu should appear at the coordinates given by x and y. The mouse button number is given by the button parameter. If the menu was popped up using the keybaord, button is -1. </p>
<h3><a name="signal_style_changed">signal_style_changed</a></h3><p class="brief">Emitted when the style of the toolbar changes. </p>
         <pre class="prototype">GtkToolbar.signal_style_changed()</pre>
         <h3><a name="unset_icon_size">unset_icon_size</a></h3><p class="brief">Unsets toolbar icon size set with gtk_toolbar_set_icon_size(), so that user preferences will be used to determine the icon size. </p>
         <pre class="prototype">GtkToolbar.unset_icon_size()</pre>
         <h3><a name="unset_style">unset_style</a></h3><p class="brief">Unsets a toolbar style set with gtk_toolbar_set_style(), so that user preferences will be used to determine the toolbar style. </p>
         <pre class="prototype">GtkToolbar.unset_style()</pre>
         </div><ul class="navi_bottom"><li class="top"><a href="index.html">Top: Table of contents</a></li>
         <li class="up"><a href="gtk.html">Up: The Falcon GTK Binding module</a></li>
         <li class="prev"><a href="gtk_GtkToolShell.html">Previous: Class GtkToolShell</a></li>
         <li class="next"><a href="gtk_GtkTreeIter.html">Next: Class GtkTreeIter</a></li>
         <li class="clear"></li>
         </ul><div class="signature">Made with <a href="faldoc 3.0">http://www.falconpl.org</a></div></body></html>