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.StackPage;
26 
27 private import glib.Str;
28 private import glib.c.functions;
29 private import gobject.ObjectG;
30 private import gtk.AccessibleIF;
31 private import gtk.AccessibleT;
32 private import gtk.Widget;
33 private import gtk.c.functions;
34 public  import gtk.c.types;
35 
36 
37 /**
38  * `GtkStackPage` is an auxiliary class used by `GtkStack`.
39  */
40 public class StackPage : ObjectG, AccessibleIF
41 {
42 	/** the main Gtk struct */
43 	protected GtkStackPage* gtkStackPage;
44 
45 	/** Get the main Gtk struct */
46 	public GtkStackPage* getStackPageStruct(bool transferOwnership = false)
47 	{
48 		if (transferOwnership)
49 			ownedRef = false;
50 		return gtkStackPage;
51 	}
52 
53 	/** the main Gtk struct as a void* */
54 	protected override void* getStruct()
55 	{
56 		return cast(void*)gtkStackPage;
57 	}
58 
59 	/**
60 	 * Sets our main struct and passes it to the parent class.
61 	 */
62 	public this (GtkStackPage* gtkStackPage, bool ownedRef = false)
63 	{
64 		this.gtkStackPage = gtkStackPage;
65 		super(cast(GObject*)gtkStackPage, ownedRef);
66 	}
67 
68 	// add the Accessible capabilities
69 	mixin AccessibleT!(GtkStackPage);
70 
71 
72 	/** */
73 	public static GType getType()
74 	{
75 		return gtk_stack_page_get_type();
76 	}
77 
78 	/**
79 	 * Returns the stack child to which @self belongs.
80 	 *
81 	 * Returns: the child to which @self belongs
82 	 */
83 	public Widget getChild()
84 	{
85 		auto __p = gtk_stack_page_get_child(gtkStackPage);
86 
87 		if(__p is null)
88 		{
89 			return null;
90 		}
91 
92 		return ObjectG.getDObject!(Widget)(cast(GtkWidget*) __p);
93 	}
94 
95 	/**
96 	 * Returns the icon name of the page.
97 	 *
98 	 * Returns: The value of the [property@Gtk.StackPage:icon-name] property
99 	 */
100 	public string getIconName()
101 	{
102 		return Str.toString(gtk_stack_page_get_icon_name(gtkStackPage));
103 	}
104 
105 	/**
106 	 * Returns the name of the page.
107 	 *
108 	 * Returns: The value of the [property@Gtk.StackPage:name] property
109 	 */
110 	public string getName()
111 	{
112 		return Str.toString(gtk_stack_page_get_name(gtkStackPage));
113 	}
114 
115 	/**
116 	 * Returns whether the page is marked as “needs attention”.
117 	 *
118 	 * Returns: The value of the [property@Gtk.StackPage:needs-attention]
119 	 *     property.
120 	 */
121 	public bool getNeedsAttention()
122 	{
123 		return gtk_stack_page_get_needs_attention(gtkStackPage) != 0;
124 	}
125 
126 	/**
127 	 * Gets the page title.
128 	 *
129 	 * Returns: The value of the [property@Gtk.StackPage:title] property
130 	 */
131 	public string getTitle()
132 	{
133 		return Str.toString(gtk_stack_page_get_title(gtkStackPage));
134 	}
135 
136 	/**
137 	 * Gets whether underlines in the page title indicate mnemonics.
138 	 *
139 	 * Returns: The value of the [property@Gtk.StackPage:use-underline] property
140 	 */
141 	public bool getUseUnderline()
142 	{
143 		return gtk_stack_page_get_use_underline(gtkStackPage) != 0;
144 	}
145 
146 	/**
147 	 * Returns whether @page is visible in its `GtkStack`.
148 	 *
149 	 * This is independent from the [property@Gtk.Widget:visible]
150 	 * property of its widget.
151 	 *
152 	 * Returns: %TRUE if @page is visible
153 	 */
154 	public bool getVisible()
155 	{
156 		return gtk_stack_page_get_visible(gtkStackPage) != 0;
157 	}
158 
159 	/**
160 	 * Sets the icon name of the page.
161 	 *
162 	 * Params:
163 	 *     setting = the new value to set
164 	 */
165 	public void setIconName(string setting)
166 	{
167 		gtk_stack_page_set_icon_name(gtkStackPage, Str.toStringz(setting));
168 	}
169 
170 	/**
171 	 * Sets the name of the page.
172 	 *
173 	 * Params:
174 	 *     setting = the new value to set
175 	 */
176 	public void setName(string setting)
177 	{
178 		gtk_stack_page_set_name(gtkStackPage, Str.toStringz(setting));
179 	}
180 
181 	/**
182 	 * Sets whether the page is marked as “needs attention”.
183 	 *
184 	 * Params:
185 	 *     setting = the new value to set
186 	 */
187 	public void setNeedsAttention(bool setting)
188 	{
189 		gtk_stack_page_set_needs_attention(gtkStackPage, setting);
190 	}
191 
192 	/**
193 	 * Sets the page title.
194 	 *
195 	 * Params:
196 	 *     setting = the new value to set
197 	 */
198 	public void setTitle(string setting)
199 	{
200 		gtk_stack_page_set_title(gtkStackPage, Str.toStringz(setting));
201 	}
202 
203 	/**
204 	 * Sets whether underlines in the page title indicate mnemonics.
205 	 *
206 	 * Params:
207 	 *     setting = the new value to set
208 	 */
209 	public void setUseUnderline(bool setting)
210 	{
211 		gtk_stack_page_set_use_underline(gtkStackPage, setting);
212 	}
213 
214 	/**
215 	 * Sets whether @page is visible in its `GtkStack`.
216 	 *
217 	 * Params:
218 	 *     visible = The new property value
219 	 */
220 	public void setVisible(bool visible)
221 	{
222 		gtk_stack_page_set_visible(gtkStackPage, visible);
223 	}
224 }