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 gtkc.gtk;
30 public  import gtkc.gtktypes;
31 
32 
33 /**
34  * The #GtkToolShell interface allows container widgets to provide additional
35  * information when embedding #GtkToolItem widgets.
36  */
37 public template ToolShellT(TStruct)
38 {
39 	/** Get the main Gtk struct */
40 	public GtkToolShell* getToolShellStruct()
41 	{
42 		return cast(GtkToolShell*)getStruct();
43 	}
44 
45 
46 	/**
47 	 * Retrieves the current ellipsize mode for the tool shell. Tool items must not
48 	 * call this function directly, but rely on gtk_tool_item_get_ellipsize_mode()
49 	 * instead.
50 	 *
51 	 * Returns: the current ellipsize mode of @shell
52 	 *
53 	 * Since: 2.20
54 	 */
55 	public PangoEllipsizeMode getEllipsizeMode()
56 	{
57 		return gtk_tool_shell_get_ellipsize_mode(getToolShellStruct());
58 	}
59 
60 	/**
61 	 * Retrieves the icon size for the tool shell. Tool items must not call this
62 	 * function directly, but rely on gtk_tool_item_get_icon_size() instead.
63 	 *
64 	 * Returns: the current size (#GtkIconSize) for icons of @shell
65 	 *
66 	 * Since: 2.14
67 	 */
68 	public GtkIconSize getIconSize()
69 	{
70 		return gtk_tool_shell_get_icon_size(getToolShellStruct());
71 	}
72 
73 	/**
74 	 * Returns the relief style of buttons on @shell. Tool items must not call this
75 	 * function directly, but rely on gtk_tool_item_get_relief_style() instead.
76 	 *
77 	 * Returns: The relief style of buttons on @shell.
78 	 *
79 	 * Since: 2.14
80 	 */
81 	public GtkReliefStyle getReliefStyle()
82 	{
83 		return gtk_tool_shell_get_relief_style(getToolShellStruct());
84 	}
85 
86 	/**
87 	 * Retrieves whether the tool shell has text, icons, or both. Tool items must
88 	 * not call this function directly, but rely on gtk_tool_item_get_toolbar_style()
89 	 * instead.
90 	 *
91 	 * Returns: the current style of @shell
92 	 *
93 	 * Since: 2.14
94 	 */
95 	public GtkToolbarStyle getToolBarStyle()
96 	{
97 		return gtk_tool_shell_get_style(getToolShellStruct());
98 	}
99 
100 	/**
101 	 * Retrieves the current text alignment for the tool shell. Tool items must not
102 	 * call this function directly, but rely on gtk_tool_item_get_text_alignment()
103 	 * instead.
104 	 *
105 	 * Returns: the current text alignment of @shell
106 	 *
107 	 * Since: 2.20
108 	 */
109 	public float getTextAlignment()
110 	{
111 		return gtk_tool_shell_get_text_alignment(getToolShellStruct());
112 	}
113 
114 	/**
115 	 * Retrieves the current text orientation for the tool shell. Tool items must not
116 	 * call this function directly, but rely on gtk_tool_item_get_text_orientation()
117 	 * instead.
118 	 *
119 	 * Returns: the current text orientation of @shell
120 	 *
121 	 * Since: 2.20
122 	 */
123 	public GtkOrientation getTextOrientation()
124 	{
125 		return gtk_tool_shell_get_text_orientation(getToolShellStruct());
126 	}
127 
128 	/**
129 	 * Retrieves the current text size group for the tool shell. Tool items must not
130 	 * call this function directly, but rely on gtk_tool_item_get_text_size_group()
131 	 * instead.
132 	 *
133 	 * Returns: the current text size group of @shell
134 	 *
135 	 * Since: 2.20
136 	 */
137 	public SizeGroup getTextSizeGroup()
138 	{
139 		auto p = gtk_tool_shell_get_text_size_group(getToolShellStruct());
140 		
141 		if(p is null)
142 		{
143 			return null;
144 		}
145 		
146 		return ObjectG.getDObject!(SizeGroup)(cast(GtkSizeGroup*) p);
147 	}
148 
149 	/**
150 	 * Calling this function signals the tool shell that the overflow menu item for
151 	 * tool items have changed. If there is an overflow menu and if it is visible
152 	 * when this function it called, the menu will be rebuilt.
153 	 *
154 	 * Tool items must not call this function directly, but rely on
155 	 * gtk_tool_item_rebuild_menu() instead.
156 	 *
157 	 * Since: 2.14
158 	 */
159 	public void rebuildMenu()
160 	{
161 		gtk_tool_shell_rebuild_menu(getToolShellStruct());
162 	}
163 }