PageRenderTime 24ms CodeModel.GetById 14ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 1ms

/src/wrappers/gtk/library/gtk_cell_renderer_pixbuf.e

http://github.com/tybor/Liberty
Specman e | 128 lines | 33 code | 36 blank | 59 comment | 2 complexity | 729ed6aa7f5bf7d2dee14581d3a1d5c0 MD5 | raw file
  1indexing
  2	description: "GtkCellRendererPixbuf renders a pixbuf 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					
 22class GTK_CELL_RENDERER_PIXBUF
 23	-- A GTK_CELL_RENDERER_PIXBUF can be used to render an image in a
 24	-- cell. It allows to render either a given GDK_PIXBUF (set via the
 25	-- pixbuf property) or a stock icon (set via the stock-id
 26	-- property).
 27
 28	-- To support the tree view, GTK_CELL_RENDERER_PIXBUF also supports
 29	-- rendering two alternative pixbufs, when the is-expander property
 30	-- is TRUE. If the is-expanded property is TRUE and the
 31	-- pixbuf-expander-open property is set to a pixbuf, it renders
 32	-- that pixbuf, if the is-expanded property is FALSE and the
 33	-- pixbuf-expander-closed property is set to a pixbuf, it renders
 34	-- that one.
 35
 36inherit GTK_CELL_RENDERER
 37
 38insert GTK_CELL_RENDERER_PIXBUF_EXTERNALS
 39
 40creation make, from_external_pointer
 41
 42feature -- size
 43	struct_size: INTEGER is
 44		external "C inline use <gtk/gtk.h>"
 45		alias "sizeof(GtkCellRendererPixbuf)"
 46		end
 47
 48feature {} -- Creation
 49	make is
 50			-- Creates a new GtkCellRendererPixbuf. Adjust rendering
 51			-- parameters using object properties. Object properties can
 52			-- be set globally (with `set_property' and its typed variants). Also, with
 53			-- GtkTreeViewColumn, you can bind a property to a value in a
 54			-- GtkTreeModel. For example, you can bind the "pixbuf"
 55			-- property on the cell renderer to a pixbuf value in the
 56			-- model, thus rendering a different image in each row of the
 57			-- GtkTreeView.
 58		do
 59			from_external_pointer (gtk_cell_renderer_pixbuf_new)
 60		end
 61
 62feature -- Properties
 63
 64--   "follow-state"         gboolean              : Read / Write
 65--   "icon-name"            gchararray            : Read / Write
 66--   "pixbuf"               GdkPixbuf             : Read / Write
 67--   "pixbuf-expander-closed" GdkPixbuf             : Read / Write
 68--   "pixbuf-expander-open" GdkPixbuf             : Read / Write
 69--   "stock-detail"         gchararray            : Read / Write
 70--   "stock-id"             gchararray            : Read / Write
 71--   "stock-size"           guint                 : Read / Write
 72
 73-- Property Details
 74-- The "follow-state" property
 75
 76--   "follow-state"         gboolean              : Read / Write
 77
 78-- Specifies whether the rendered pixbuf should be colorized according to the GtkCellRendererState.
 79
 80-- Default value: FALSE
 81
 82-- Since 2.8
 83-- The "icon-name" property
 84
 85--   "icon-name"            gchararray            : Read / Write
 86
 87-- The name of the themed icon to display. This property only has an effect if not overridden by "stock_id" or "pixbuf" properties.
 88
 89-- Default value: NULL
 90
 91-- Since 2.8
 92-- The "pixbuf" property
 93
 94--   "pixbuf"               GdkPixbuf             : Read / Write
 95
 96-- The pixbuf to render.
 97-- The "pixbuf-expander-closed" property
 98
 99--   "pixbuf-expander-closed" GdkPixbuf             : Read / Write
100
101-- Pixbuf for closed expander.
102-- The "pixbuf-expander-open" property
103
104--   "pixbuf-expander-open" GdkPixbuf             : Read / Write
105
106-- Pixbuf for open expander.
107-- The "stock-detail" property
108
109--   "stock-detail"         gchararray            : Read / Write
110
111-- Render detail to pass to the theme engine.
112
113-- Default value: NULL
114-- The "stock-id" property
115
116--   "stock-id"             gchararray            : Read / Write
117
118-- The stock ID of the stock icon to render.
119
120-- Default value: NULL
121-- The "stock-size" property
122
123--   "stock-size"           guint                 : Read / Write
124
125-- The GtkIconSize value that specifies the size of the rendered icon.
126
127-- Default value: 1
128end