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 = GtkCellRendererText.html
27 * outFile = CellRendererText
28 * strct = GtkCellRenderer
29 * realStrct=GtkCellRendererText
31 * clss = CellRendererText
39 * - gtk_cell_renderer_text_
48 * - GtkCellRenderer* -> CellRenderer
52 module gtk
.CellRendererText
;
54 private import gtk
.gtktypes
;
56 private import lib
.gtk
;
58 private import glib
.Str
;
59 private import gtk
.CellRenderer
;
63 * A GtkCellRendererText renders a given text in its cell, using the font, color and
64 * style information provided by its properties. The text will be ellipsized if it is
65 * too long and the ellipsize
67 * If the mode is GTK_CELL_RENDERER_MODE_EDITABLE,
68 * the GtkCellRendererText allows to edit its text using an entry.
70 private import gtk
.CellRenderer
;
71 public class CellRendererText
: CellRenderer
74 /** the main Gtk struct */
75 protected GtkCellRendererText
* gtkCellRendererText
;
78 public GtkCellRendererText
* getCellRendererTextStruct()
80 return gtkCellRendererText
;
84 /** the main Gtk struct as a void* */
85 protected void* getStruct()
87 return cast(void*)gtkCellRendererText
;
91 * Sets our main struct and passes it to the parent class
93 public this (GtkCellRendererText
* gtkCellRendererText
)
95 super(cast(GtkCellRenderer
*)gtkCellRendererText
);
96 this.gtkCellRendererText
= gtkCellRendererText
;
102 // imports for the signal processing
103 private import gobject
.Signals
;
104 private import gdk
.gdktypes
;
105 int[char[]] connectedSignals
;
107 void delegate(char[], char[], CellRendererText
)[] onEditedListeners
;
108 void addOnEdited(void delegate(char[], char[], CellRendererText
) dlg
)
110 if ( !("edited" in connectedSignals
) )
115 cast(GCallback
)&callBackEdited
,
118 cast(ConnectFlags
)0);
119 connectedSignals
["edited"] = 1;
121 onEditedListeners
~= dlg
;
123 extern(C
) static void callBackEdited(GtkCellRendererText
* cellrenderertextStruct
, gchar
* arg1
, gchar
* arg2
, CellRendererText cellRendererText
)
125 bit consumed
= false;
127 foreach ( void delegate(char[], char[], CellRendererText
) dlg
; cellRendererText
.onEditedListeners
)
129 dlg(Str
.toString(arg1
), Str
.toString(arg2
), cellRendererText
);
138 * Creates a new GtkCellRendererText. Adjust how text is drawn using
139 * object properties. Object properties can be
140 * set globally (with g_object_set()). Also, with GtkTreeViewColumn,
141 * you can bind a property to a value in a GtkTreeModel. For example,
142 * you can bind the "text" property on the cell renderer to a string
143 * value in the model, thus rendering a different string in each row
146 * the new cell renderer
150 // GtkCellRenderer* gtk_cell_renderer_text_new (void);
151 this(cast(GtkCellRendererText
*)gtk_cell_renderer_text_new() );
155 * Sets the height of a renderer to explicitly be determined by the "font" and
156 * "y_pad" property set on it. Further changes in these properties do not
157 * affect the height, so they must be accompanied by a subsequent call to this
158 * function. Using this function is unflexible, and should really only be used
159 * if calculating the size of a cell is too slow (ie, a massive number of cells
160 * displayed). If number_of_rows is -1, then the fixed height is unset, and
161 * the height is determined by the properties again.
163 * A GtkCellRendererText
165 * Number of rows of text each cell renderer is allocated, or -1
167 * The "align-set" property
168 * "align-set" gboolean : Read / Write
169 * Whether this tag affects the alignment mode.
170 * Default value: FALSE
172 public static void setFixedHeightFromFont(GtkCellRendererText
* renderer
, int numberOfRows
)
174 // void gtk_cell_renderer_text_set_fixed_height_from_font (GtkCellRendererText *renderer, gint number_of_rows);
175 gtk_cell_renderer_text_set_fixed_height_from_font(renderer
, numberOfRows
);