1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 25 module gtk.ToolShellT; 26 27 public import gobject.ObjectG; 28 public import gtk.SizeGroup; 29 public import gtk.c.functions; 30 public import gtk.c.types; 31 public import gtkc.gtktypes; 32 33 34 /** 35 * The #GtkToolShell interface allows container widgets to provide additional 36 * information when embedding #GtkToolItem widgets. 37 */ 38 public template ToolShellT(TStruct) 39 { 40 /** Get the main Gtk struct */ 41 public GtkToolShell* getToolShellStruct(bool transferOwnership = false) 42 { 43 if (transferOwnership) 44 ownedRef = false; 45 return cast(GtkToolShell*)getStruct(); 46 } 47 48 49 /** 50 * Retrieves the current ellipsize mode for the tool shell. Tool items must not 51 * call this function directly, but rely on gtk_tool_item_get_ellipsize_mode() 52 * instead. 53 * 54 * Returns: the current ellipsize mode of @shell 55 * 56 * Since: 2.20 57 */ 58 public PangoEllipsizeMode getEllipsizeMode() 59 { 60 return gtk_tool_shell_get_ellipsize_mode(getToolShellStruct()); 61 } 62 63 /** 64 * Retrieves the icon size for the tool shell. Tool items must not call this 65 * function directly, but rely on gtk_tool_item_get_icon_size() instead. 66 * 67 * Returns: the current size (#GtkIconSize) for icons of @shell 68 * 69 * Since: 2.14 70 */ 71 public GtkIconSize getIconSize() 72 { 73 return gtk_tool_shell_get_icon_size(getToolShellStruct()); 74 } 75 76 /** 77 * Returns the relief style of buttons on @shell. Tool items must not call this 78 * function directly, but rely on gtk_tool_item_get_relief_style() instead. 79 * 80 * Returns: The relief style of buttons on @shell. 81 * 82 * Since: 2.14 83 */ 84 public GtkReliefStyle getReliefStyle() 85 { 86 return gtk_tool_shell_get_relief_style(getToolShellStruct()); 87 } 88 89 /** 90 * Retrieves whether the tool shell has text, icons, or both. Tool items must 91 * not call this function directly, but rely on gtk_tool_item_get_toolbar_style() 92 * instead. 93 * 94 * Returns: the current style of @shell 95 * 96 * Since: 2.14 97 */ 98 public GtkToolbarStyle getToolBarStyle() 99 { 100 return gtk_tool_shell_get_style(getToolShellStruct()); 101 } 102 103 /** 104 * Retrieves the current text alignment for the tool shell. Tool items must not 105 * call this function directly, but rely on gtk_tool_item_get_text_alignment() 106 * instead. 107 * 108 * Returns: the current text alignment of @shell 109 * 110 * Since: 2.20 111 */ 112 public float getTextAlignment() 113 { 114 return gtk_tool_shell_get_text_alignment(getToolShellStruct()); 115 } 116 117 /** 118 * Retrieves the current text orientation for the tool shell. Tool items must not 119 * call this function directly, but rely on gtk_tool_item_get_text_orientation() 120 * instead. 121 * 122 * Returns: the current text orientation of @shell 123 * 124 * Since: 2.20 125 */ 126 public GtkOrientation getTextOrientation() 127 { 128 return gtk_tool_shell_get_text_orientation(getToolShellStruct()); 129 } 130 131 /** 132 * Retrieves the current text size group for the tool shell. Tool items must not 133 * call this function directly, but rely on gtk_tool_item_get_text_size_group() 134 * instead. 135 * 136 * Returns: the current text size group of @shell 137 * 138 * Since: 2.20 139 */ 140 public SizeGroup getTextSizeGroup() 141 { 142 auto p = gtk_tool_shell_get_text_size_group(getToolShellStruct()); 143 144 if(p is null) 145 { 146 return null; 147 } 148 149 return ObjectG.getDObject!(SizeGroup)(cast(GtkSizeGroup*) p); 150 } 151 152 /** 153 * Calling this function signals the tool shell that the overflow menu item for 154 * tool items have changed. If there is an overflow menu and if it is visible 155 * when this function it called, the menu will be rebuilt. 156 * 157 * Tool items must not call this function directly, but rely on 158 * gtk_tool_item_rebuild_menu() instead. 159 * 160 * Since: 2.14 161 */ 162 public void rebuildMenu() 163 { 164 gtk_tool_shell_rebuild_menu(getToolShellStruct()); 165 } 166 }