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  * Conversion parameters:
26  * inFile  = GtkRevealer.html
27  * outPack = gtk
28  * outFile = Revealer
29  * strct   = GtkRevealer
30  * realStrct=
31  * ctorStrct=
32  * clss    = Revealer
33  * interf  = 
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gtk_revealer_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * imports:
46  * structWrap:
47  * module aliases:
48  * local aliases:
49  * overrides:
50  */
51 
52 module gtk.Revealer;
53 
54 public  import gtkc.gtktypes;
55 
56 private import gtkc.gtk;
57 private import glib.ConstructionException;
58 private import gobject.ObjectG;
59 
60 
61 
62 private import gtk.Bin;
63 
64 /**
65  * The GtkRevealer widget is a container which animates
66  * the transition of its child from invisible to visible.
67  *
68  * The style of transition can be controlled with
69  * gtk_revealer_set_transition_type().
70  *
71  * The GtkRevealer widget was added in GTK+ 3.10.
72  */
73 public class Revealer : Bin
74 {
75 	
76 	/** the main Gtk struct */
77 	protected GtkRevealer* gtkRevealer;
78 	
79 	
80 	/** Get the main Gtk struct */
81 	public GtkRevealer* getRevealerStruct()
82 	{
83 		return gtkRevealer;
84 	}
85 	
86 	
87 	/** the main Gtk struct as a void* */
88 	protected override void* getStruct()
89 	{
90 		return cast(void*)gtkRevealer;
91 	}
92 	
93 	/**
94 	 * Sets our main struct and passes it to the parent class
95 	 */
96 	public this (GtkRevealer* gtkRevealer)
97 	{
98 		super(cast(GtkBin*)gtkRevealer);
99 		this.gtkRevealer = gtkRevealer;
100 	}
101 	
102 	protected override void setStruct(GObject* obj)
103 	{
104 		super.setStruct(obj);
105 		gtkRevealer = cast(GtkRevealer*)obj;
106 	}
107 	
108 	/**
109 	 */
110 	
111 	/**
112 	 * Creates a new GtkRevealer.
113 	 * Throws: ConstructionException GTK+ fails to create the object.
114 	 */
115 	public this ()
116 	{
117 		// GtkWidget * gtk_revealer_new (void);
118 		auto p = gtk_revealer_new();
119 		if(p is null)
120 		{
121 			throw new ConstructionException("null returned by gtk_revealer_new()");
122 		}
123 		this(cast(GtkRevealer*) p);
124 	}
125 	
126 	/**
127 	 * Returns whether the child is currently
128 	 * revealed. See gtk_revealer_set_reveal_child().
129 	 * This function returns TRUE as soon as the transition
130 	 * is to the revealed state is started. To learn whether
131 	 * the child is fully revealed (ie the transition is completed),
132 	 * use gtk_revealer_get_child_revealed().
133 	 * Returns: TRUE if the child is revealed. Since 3.10
134 	 */
135 	public int getRevealChild()
136 	{
137 		// gboolean gtk_revealer_get_reveal_child (GtkRevealer *revealer);
138 		return gtk_revealer_get_reveal_child(gtkRevealer);
139 	}
140 	
141 	/**
142 	 * Tells the GtkRevealer to reveal or conceal its child.
143 	 * The transition will be animated with the current
144 	 * transition type of revealer.
145 	 * Params:
146 	 * revealChild = TRUE to reveal the child
147 	 * Since 3.10
148 	 */
149 	public void setRevealChild(int revealChild)
150 	{
151 		// void gtk_revealer_set_reveal_child (GtkRevealer *revealer,  gboolean reveal_child);
152 		gtk_revealer_set_reveal_child(gtkRevealer, revealChild);
153 	}
154 	
155 	/**
156 	 * Returns whether the child is fully revealed, ie wether
157 	 * the transition to the revealed state is completed.
158 	 * Returns: TRUE if the child is fully revealed Since 3.10
159 	 */
160 	public int getChildRevealed()
161 	{
162 		// gboolean gtk_revealer_get_child_revealed (GtkRevealer *revealer);
163 		return gtk_revealer_get_child_revealed(gtkRevealer);
164 	}
165 	
166 	/**
167 	 * Returns the amount of time (in milliseconds) that
168 	 * transitions will take.
169 	 * Returns: the transition duration Since 3.10
170 	 */
171 	public uint getTransitionDuration()
172 	{
173 		// guint gtk_revealer_get_transition_duration  (GtkRevealer *revealer);
174 		return gtk_revealer_get_transition_duration(gtkRevealer);
175 	}
176 	
177 	/**
178 	 * Sets the duration that transitions will take.
179 	 * Params:
180 	 * duration = the new duration, in milliseconds
181 	 * Since 3.10
182 	 */
183 	public void setTransitionDuration(uint duration)
184 	{
185 		// void gtk_revealer_set_transition_duration  (GtkRevealer *revealer,  guint duration);
186 		gtk_revealer_set_transition_duration(gtkRevealer, duration);
187 	}
188 	
189 	/**
190 	 * Gets the type of animation that will be used
191 	 * for transitions in revealer.
192 	 * Returns: the current transition type of revealer Since 3.10
193 	 */
194 	public GtkRevealerTransitionType getTransitionType()
195 	{
196 		// GtkRevealerTransitionType gtk_revealer_get_transition_type  (GtkRevealer *revealer);
197 		return gtk_revealer_get_transition_type(gtkRevealer);
198 	}
199 	
200 	/**
201 	 * Sets the type of animation that will be used for
202 	 * transitions in revealer. Available types include
203 	 * various kinds of fades and slides.
204 	 * Params:
205 	 * transition = the new transition type
206 	 * Since 3.10
207 	 */
208 	public void setTransitionType(GtkRevealerTransitionType transition)
209 	{
210 		// void gtk_revealer_set_transition_type (GtkRevealer *revealer,  GtkRevealerTransitionType transition);
211 		gtk_revealer_set_transition_type(gtkRevealer, transition);
212 	}
213 }