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