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