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.CellEditableIF;
26 
27 private import gdk.Event;
28 private import gobject.Signals;
29 private import gtk.c.functions;
30 public  import gtk.c.types;
31 private import std.algorithm;
32 
33 
34 /**
35  * Interface for widgets that can be used for editing cells
36  * 
37  * The #GtkCellEditable interface must be implemented for widgets to be usable
38  * to edit the contents of a #GtkTreeView cell. It provides a way to specify how
39  * temporary widgets should be configured for editing, get the new value, etc.
40  */
41 public interface CellEditableIF{
42 	/** Get the main Gtk struct */
43 	public GtkCellEditable* getCellEditableStruct(bool transferOwnership = false);
44 
45 	/** the main Gtk struct as a void* */
46 	protected void* getStruct();
47 
48 
49 	/** */
50 	public static GType getType()
51 	{
52 		return gtk_cell_editable_get_type();
53 	}
54 
55 	/**
56 	 * Emits the #GtkCellEditable::editing-done signal.
57 	 */
58 	public void editingDone();
59 
60 	/**
61 	 * Emits the #GtkCellEditable::remove-widget signal.
62 	 */
63 	public void removeWidget();
64 
65 	/**
66 	 * Begins editing on a @cell_editable.
67 	 *
68 	 * The #GtkCellRenderer for the cell creates and returns a #GtkCellEditable from
69 	 * gtk_cell_renderer_start_editing(), configured for the #GtkCellRenderer type.
70 	 *
71 	 * gtk_cell_editable_start_editing() can then set up @cell_editable suitably for
72 	 * editing a cell, e.g. making the Esc key emit #GtkCellEditable::editing-done.
73 	 *
74 	 * Note that the @cell_editable is created on-demand for the current edit; its
75 	 * lifetime is temporary and does not persist across other edits and/or cells.
76 	 *
77 	 * Params:
78 	 *     event = The #GdkEvent that began the editing process, or
79 	 *         %NULL if editing was initiated programmatically
80 	 */
81 	public void startEditing(Event event);
82 
83 	/**
84 	 * This signal is a sign for the cell renderer to update its
85 	 * value from the @cell_editable.
86 	 *
87 	 * Implementations of #GtkCellEditable are responsible for
88 	 * emitting this signal when they are done editing, e.g.
89 	 * #GtkEntry emits this signal when the user presses Enter. Typical things to
90 	 * do in a handler for ::editing-done are to capture the edited value,
91 	 * disconnect the @cell_editable from signals on the #GtkCellRenderer, etc.
92 	 *
93 	 * gtk_cell_editable_editing_done() is a convenience method
94 	 * for emitting #GtkCellEditable::editing-done.
95 	 */
96 	gulong addOnEditingDone(void delegate(CellEditableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0);
97 
98 	/**
99 	 * This signal is meant to indicate that the cell is finished
100 	 * editing, and the @cell_editable widget is being removed and may
101 	 * subsequently be destroyed.
102 	 *
103 	 * Implementations of #GtkCellEditable are responsible for
104 	 * emitting this signal when they are done editing. It must
105 	 * be emitted after the #GtkCellEditable::editing-done signal,
106 	 * to give the cell renderer a chance to update the cell's value
107 	 * before the widget is removed.
108 	 *
109 	 * gtk_cell_editable_remove_widget() is a convenience method
110 	 * for emitting #GtkCellEditable::remove-widget.
111 	 */
112 	gulong addOnRemoveWidget(void delegate(CellEditableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0);
113 }