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  = GtkCellRendererPixbuf.html
27  * outPack = gtk
28  * outFile = CellRendererPixbuf
29  * strct   = GtkCellRendererPixbuf
30  * realStrct=
31  * ctorStrct=GtkCellRenderer
32  * clss    = CellRendererPixbuf
33  * interf  = 
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gtk_cell_renderer_pixbuf_
41  * 	- gtk_
42  * omit structs:
43  * omit prefixes:
44  * omit code:
45  * omit signals:
46  * imports:
47  * 	- gtk.CellRenderer
48  * structWrap:
49  * 	- GtkCellRenderer* -> CellRenderer
50  * module aliases:
51  * local aliases:
52  * overrides:
53  */
54 
55 module gtk.CellRendererPixbuf;
56 
57 public  import gtkc.gtktypes;
58 
59 private import gtkc.gtk;
60 private import glib.ConstructionException;
61 private import gobject.ObjectG;
62 
63 
64 private import gtk.CellRenderer;
65 
66 
67 
68 private import gtk.CellRenderer;
69 
70 /**
71  * Description
72  * A GtkCellRendererPixbuf can be used to render an image in a cell. It allows to render
73  * either a given GdkPixbuf (set via the
74  * pixbuf property) or a stock icon
75  * (set via the stock-id property).
76  * To support the tree view, GtkCellRendererPixbuf also supports rendering two alternative
77  * pixbufs, when the is-expander property
78  * is TRUE. If the is-expanded property
79  * is TRUE and the
80  * pixbuf-expander-open
81  * property is set to a pixbuf, it renders that pixbuf, if the
82  * is-expanded property is FALSE and
83  * the
84  * pixbuf-expander-closed
85  * property is set to a pixbuf, it renders that one.
86  */
87 public class CellRendererPixbuf : CellRenderer
88 {
89 	
90 	/** the main Gtk struct */
91 	protected GtkCellRendererPixbuf* gtkCellRendererPixbuf;
92 	
93 	
94 	public GtkCellRendererPixbuf* getCellRendererPixbufStruct()
95 	{
96 		return gtkCellRendererPixbuf;
97 	}
98 	
99 	
100 	/** the main Gtk struct as a void* */
101 	protected override void* getStruct()
102 	{
103 		return cast(void*)gtkCellRendererPixbuf;
104 	}
105 	
106 	/**
107 	 * Sets our main struct and passes it to the parent class
108 	 */
109 	public this (GtkCellRendererPixbuf* gtkCellRendererPixbuf)
110 	{
111 		super(cast(GtkCellRenderer*)gtkCellRendererPixbuf);
112 		this.gtkCellRendererPixbuf = gtkCellRendererPixbuf;
113 	}
114 	
115 	protected override void setStruct(GObject* obj)
116 	{
117 		super.setStruct(obj);
118 		gtkCellRendererPixbuf = cast(GtkCellRendererPixbuf*)obj;
119 	}
120 	
121 	/**
122 	 */
123 	
124 	/**
125 	 * Creates a new GtkCellRendererPixbuf. Adjust rendering
126 	 * parameters using object properties. Object properties can be set
127 	 * globally (with g_object_set()). Also, with GtkTreeViewColumn, you
128 	 * can bind a property to a value in a GtkTreeModel. For example, you
129 	 * can bind the "pixbuf" property on the cell renderer to a pixbuf value
130 	 * in the model, thus rendering a different image in each row of the
131 	 * GtkTreeView.
132 	 * Throws: ConstructionException GTK+ fails to create the object.
133 	 */
134 	public this ()
135 	{
136 		// GtkCellRenderer * gtk_cell_renderer_pixbuf_new (void);
137 		auto p = gtk_cell_renderer_pixbuf_new();
138 		if(p is null)
139 		{
140 			throw new ConstructionException("null returned by gtk_cell_renderer_pixbuf_new()");
141 		}
142 		this(cast(GtkCellRendererPixbuf*) p);
143 	}
144 }