/src/wrappers/gtk/library/gtk_cell_renderer_combo.e
Specman e | 98 lines | 38 code | 25 blank | 35 comment | 2 complexity | 090272c6b6654cdc9fa609acbabd2363 MD5 | raw file
1indexing 2 description: "GtkCellRendererCombo Renders a combobox in a cell." 3 copyright: "[ 4 Copyright (C) 2006 eiffel-libraries team, GTK+ team 5 6 This library is free software; you can redistribute it and/or 7 modify it under the terms of the GNU Lesser General Public License 8 as published by the Free Software Foundation; either version 2.1 of 9 the License, or (at your option) any later version. 10 11 This library is distributed in the hope that it will be useful, but 12 WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 Lesser General Public License for more details. 15 16 You should have received a copy of the GNU Lesser General Public 17 License along with this library; if not, write to the Free Software 18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 02110-1301 USA 20 ]" 21 22 23class GTK_CELL_RENDERER_COMBO 24 -- GTK_CELL_RENDERER_COMBO renders text in a cell like 25 -- GTK_CELL_RENDERER_TEXT from which it is derived. But while 26 -- GTK_CELL_RENDERER_TEXT offers a simple entry to edit the text, 27 -- GTK_CELL_RENDERER_COMBO offers a GTK_COMBO_BOX or 28 -- GTK_COMBO_BOX_ENTRY widget to edit the text. The values to 29 -- display in the combo box are taken from the tree model specified 30 -- in the model property. 31 32 -- The combo cell renderer takes care of adding a text cell 33 -- renderer to the combo box and sets it to display the column 34 -- specified by its text-column property. Further cell renderers 35 -- can be added in a handler for the editing-started signal. 36 37inherit 38 GTK_CELL_RENDERER_TEXT 39 redefine 40 make, struct_size 41 end 42 43insert 44 GTK_CELL_RENDERER_COMBO_EXTERNALS 45 46creation make, from_external_pointer 47 48feature -- size 49 struct_size: INTEGER is 50 external "C inline use <gtk/gtk.h>" 51 alias "sizeof(GtkCellRendererCombo)" 52 end 53 54feature {} -- Creation 55 make is 56 -- Creates a new GtkCellRendererCombo. Adjust how text is 57 -- drawn using object properties. Object properties can be 58 -- set globally (with g_object_set()). Also, with 59 -- GtkTreeViewColumn, you can bind a property to a value in a 60 -- GtkTreeModel. For example, you can bind the "text" 61 -- property on the cell renderer to a string value in the 62 -- model, thus rendering a different string in each row of 63 -- the GtkTreeView. 64 do 65 from_external_pointer (gtk_cell_renderer_combo_new) 66 end 67 68feature -- TODO: Property Details 69-- The "has-entry" property 70 71-- "has-entry" gboolean : Read / Write 72 73-- If TRUE, the cell renderer will include an entry and allow to enter values other than the ones in the popup list. 74 75-- Default value: TRUE 76 77-- Since 2.6 78-- The "model" property 79 80-- "model" GtkTreeModel : Read / Write 81 82-- Holds a tree model containing the possible values for the combo box. Use the text_column property to specify the column holding the values. 83 84-- Since 2.6 85-- The "text-column" property 86 87-- "text-column" gint : Read / Write 88 89-- Specifies the model column which holds the possible values for the combo box. Note that this refers to the model specified in the model property, not the model backing the tree view to which this cell renderer is attached. 90 91-- GtkCellRendererCombo automatically adds a text cell renderer for this column to its combo box. 92 93-- Allowed values: >= -1 94 95-- Default value: -1 96 97-- Since 2.6 98end