/src/wrappers/gtk/library/gtk_cell_renderer_combo.e

http://github.com/tybor/Liberty · Specman e · 98 lines · 38 code · 25 blank · 35 comment · 2 complexity · 090272c6b6654cdc9fa609acbabd2363 MD5 · raw file

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