2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = GtkCellLayout.html
27 * outFile = CellLayoutT
28 * strct = GtkCellLayout
50 * - GtkCellRenderer* -> CellRenderer
54 module gtk
.CellLayoutT
;
56 private import gtk
.gtktypes
;
58 private import lib
.gtk
;
60 private import glib
.Str
;
61 private import gtk
.CellRenderer
;
62 private import glib
.Str
;
66 * GtkCellLayout is an interface to be implemented by all objects which
67 * want to provide a GtkTreeViewColumn-like API for packing cells, setting
68 * attributes and data funcs.
69 * One of the notable features provided by implementations of GtkCellLayout
70 * are attributes. Attributes let you set the properties
71 * in flexible ways. They can just be set to constant values like regular
72 * properties. But they can also be mapped to a column of the underlying
73 * tree model with gtk_cell_layout_set_attributes(), which means that the value
74 * of the attribute can change from cell to cell as they are rendered by the
75 * cell renderer. Finally, it is possible to specify a function with
76 * gtk_cell_layout_set_cell_data_func() that is called to determine the value
77 * of the attribute for each cell that is rendered.
79 public template CellLayoutT(TStruct
)
82 /** the main Gtk struct */
83 protected GtkCellLayout
* gtkCellLayout
;
86 public GtkCellLayout
* getCellLayoutTStruct()
88 return cast(GtkCellLayout
*)getStruct();
99 * Packs the cell into the beginning of cell_layout. If expand is FALSE,
100 * then the cell is allocated no more space than it needs. Any unused space
101 * is divided evenly between cells for which expand is TRUE.
102 * Note that reusing the same cell renderer is not supported.
108 * TRUE if cell is to be given extra space allocated to cell_layout.
111 public void packStart(CellRenderer cell
, int expand
)
113 // void gtk_cell_layout_pack_start (GtkCellLayout *cell_layout, GtkCellRenderer *cell, gboolean expand);
114 gtk_cell_layout_pack_start(getCellLayoutTStruct(), (cell
is null) ?
null : cell
.getCellRendererStruct(), expand
);
118 * Adds the cell to the end of cell_layout. If expand is FALSE, then the
119 * cell is allocated no more space than it needs. Any unused space is
120 * divided evenly between cells for which expand is TRUE.
121 * Note that reusing the same cell renderer is not supported.
127 * TRUE if cell is to be given extra space allocated to cell_layout.
130 public void packEnd(CellRenderer cell
, int expand
)
132 // void gtk_cell_layout_pack_end (GtkCellLayout *cell_layout, GtkCellRenderer *cell, gboolean expand);
133 gtk_cell_layout_pack_end(getCellLayoutTStruct(), (cell
is null) ?
null : cell
.getCellRendererStruct(), expand
);
137 * Re-inserts cell at position. Note that cell has already to be packed
138 * into cell_layout for this to function properly.
142 * A GtkCellRenderer to reorder.
144 * New position to insert cell at.
147 public void reorder(CellRenderer cell
, int position
)
149 // void gtk_cell_layout_reorder (GtkCellLayout *cell_layout, GtkCellRenderer *cell, gint position);
150 gtk_cell_layout_reorder(getCellLayoutTStruct(), (cell
is null) ?
null : cell
.getCellRendererStruct(), position
);
154 * Unsets all the mappings on all renderers on cell_layout and
155 * removes all renderers from cell_layout.
162 // void gtk_cell_layout_clear (GtkCellLayout *cell_layout);
163 gtk_cell_layout_clear(getCellLayoutTStruct());
167 * Sets the attributes in list as the attributes of cell_layout. The
168 * attributes should be in attribute/column order, as in
169 * gtk_cell_layout_add_attribute(). All existing attributes are removed, and
170 * replaced with the new attributes.
176 * A NULL-terminated list of attributes.
179 public void setAttributes(CellRenderer cell
, ... )
181 // void gtk_cell_layout_set_attributes (GtkCellLayout *cell_layout, GtkCellRenderer *cell, ...);
182 gtk_cell_layout_set_attributes(getCellLayoutTStruct(), (cell
is null) ?
null : cell
.getCellRendererStruct());
186 * Adds an attribute mapping to the list in cell_layout. The column is the
187 * column of the model to get a value from, and the attribute is the
188 * parameter on cell to be set from the value. So for example if column 2
189 * of the model contains strings, you could have the "text" attribute of a
190 * GtkCellRendererText get its values from column 2.
196 * An attribute on the renderer.
198 * The column position on the model to get the attribute from.
201 public void addAttribute(CellRenderer cell
, char[] attribute
, int column
)
203 // void gtk_cell_layout_add_attribute (GtkCellLayout *cell_layout, GtkCellRenderer *cell, const gchar *attribute, gint column);
204 gtk_cell_layout_add_attribute(getCellLayoutTStruct(), (cell
is null) ?
null : cell
.getCellRendererStruct(), Str
.toStringz(attribute
), column
);
208 * Sets the GtkCellLayoutDataFunc to use for cell_layout. This function
209 * is used instead of the standard attributes mapping for setting the
210 * column value, and should set the value of cell_layout's cell renderer(s)
211 * as appropriate. func may be NULL to remove and older one.
217 * The GtkCellLayoutDataFunc to use.
219 * The user data for func.
221 * The destroy notification for func_data.
224 public void setCellDataFunc(CellRenderer cell
, GtkCellLayoutDataFunc func
, void* funcData
, GDestroyNotify destroy
)
226 // void gtk_cell_layout_set_cell_data_func (GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkCellLayoutDataFunc func, gpointer func_data, GDestroyNotify destroy);
227 gtk_cell_layout_set_cell_data_func(getCellLayoutTStruct(), (cell
is null) ?
null : cell
.getCellRendererStruct(), func
, funcData
, destroy
);
231 * Clears all existing attributes previously set with
232 * gtk_cell_layout_set_attributes().
236 * A GtkCellRenderer to clear the attribute mapping on.
239 public void clearAttributes(CellRenderer cell
)
241 // void gtk_cell_layout_clear_attributes (GtkCellLayout *cell_layout, GtkCellRenderer *cell);
242 gtk_cell_layout_clear_attributes(getCellLayoutTStruct(), (cell
is null) ?
null : cell
.getCellRendererStruct());