PageRenderTime 31ms CodeModel.GetById 12ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 0ms

/src/wrappers/gtk/library/gtk_icon_view.e

http://github.com/tybor/Liberty
Specman e | 1099 lines | 166 code | 284 blank | 649 comment | 5 complexity | f9afeb5057a2bcbe908f49435d933e40 MD5 | raw file
   1indexing
   2	description: "GtkIconView -- A widget which displays a list of icons in a grid"
   3	copyright: "[
   4					Copyright (C) 2006 Nicolas Fafchamps <nicolas.fafchamps@gmail.com> and others
   5					Copyright (C) 2006 eiffel-libraries team, GTK+ team
   6					
   7					This library is free software; you can redistribute it and/or
   8					modify it under the terms of the GNU Lesser General Public License
   9					as published by the Free Software Foundation; either version 2.1 of
  10					the License, or (at your option) any later version.
  11					
  12					This library is distributed in the hope that it will be useful, but
  13					WITHOUT ANY WARRANTY; without even the implied warranty of
  14					MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15					Lesser General Public License for more details.
  16
  17					You should have received a copy of the GNU Lesser General Public
  18					License along with this library; if not, write to the Free Software
  19					Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  20					02110-1301 USA
  21				]"
  22	date: "$Date:$"
  23	revision "$Revision:$"
  24
  25class GTK_ICON_VIEW
  26		-- GtkIconView provides an alternative view on a list model.
  27		-- It displays the model as a grid of icons with labels.
  28		-- Like GtkTreeView, it allows to select one or multiple items (depending
  29		-- on the selection mode, see gtk_icon_view_set_selection_mode()). In
  30		-- addition to selection with the arrow keys, GtkIconView supports
  31		-- rubberband selection, which is controlled by dragging the pointer.
  32
  33inherit
  34	GTK_CONTAINER
  35
  36insert
  37	GTK_ICON_VIEW_EXTERNALS
  38	G_OBJECT_FACTORY [GTK_TREE_MODEL]
  39	GTK_ICON_VIEW_DROP_POSITION
  40	G_OBJECT_EXTERNALS
  41
  42creation
  43	make, with_model, from_external_pointer
  44
  45feature {} -- Creation
  46
  47	make is
  48			-- Creates a new GtkIconView widget
  49		do
  50			from_external_pointer (gtk_icon_view_new)
  51		end
  52
  53	with_model (a_model: GTK_TREE_MODEL) is
  54			-- Creates a new GtkIconView widget with `a_model'.
  55		require
  56			a_model /= Void
  57		do
  58			from_external_pointer (gtk_icon_view_new_with_model (a_model.handle))
  59		end
  60
  61--             GtkIconView;
  62-- void        (*GtkIconViewForeachFunc)       (GtkIconView *icon_view,
  63--                                              GtkTreePath *path,
  64--                                              gpointer data);
  65
  66feature -- Access
  67
  68	model: GTK_TREE_MODEL is
  69			-- the model the GtkIconView is based on. Void if the model is
  70			-- unset.
  71		do
  72			Result := wrapper_or_void (gtk_icon_view_get_model (handle))
  73		end
  74
  75	text_column: INTEGER is
  76		do
  77			Result := gtk_icon_view_get_text_column (handle)
  78		end
  79
  80	markup_column: INTEGER is
  81		do
  82			Result := gtk_icon_view_get_markup_column (handle)
  83		end
  84
  85	pixbuf_column: INTEGER is
  86		do
  87			Result := gtk_icon_view_get_pixbuf_column (handle)
  88		end
  89
  90feature -- Operations
  91
  92	set_model (a_model: GTK_TREE_MODEL) is
  93			-- Sets the model for a GtkIconView. If the Current icon view
  94			-- already has a model set, it will remove it before setting
  95			-- the new model. 
  96		require
  97			a_model /= Void
  98		do
  99			gtk_icon_view_set_model (handle, a_model.handle)
 100		ensure set: model = a_model
 101		end
 102
 103	unset_model is
 104			-- Unset the old model.
 105		do
 106			gtk_icon_view_set_model (handle, default_pointer)
 107			ensure unset: model = Void
 108		end
 109
 110	set_text_column (a_column: INTEGER) is
 111			-- Sets the column with text for icon_view to be `a_column'.
 112		require
 113			-- TODO: The text column must be of type G_TYPE_STRING.
 114		do
 115			gtk_icon_view_set_text_column (handle, a_column)
 116		end
 117
 118	set_markup_column (a_column: INTEGER) is
 119		do
 120			gtk_icon_view_set_markup_column (handle, a_column)
 121		end
 122
 123	set_pixbuf_column (a_column: INTEGER) is
 124		do
 125			gtk_icon_view_set_pixbuf_column (handle, a_column)
 126		end
 127
 128-- GtkTreePath* gtk_icon_view_get_path_at_pos  (GtkIconView *icon_view,
 129--                                              gint x,
 130--                                              gint y);
 131-- gboolean    gtk_icon_view_get_item_at_pos   (GtkIconView *icon_view,
 132--                                              gint x,
 133--                                              gint y,
 134--                                              GtkTreePath **path,
 135--                                              GtkCellRenderer **cell);
 136-- void        gtk_icon_view_set_cursor        (GtkIconView *icon_view,
 137--                                              GtkTreePath *path,
 138--                                              GtkCellRenderer *cell,
 139--                                              gboolean start_editing);
 140-- gboolean    gtk_icon_view_get_cursor        (GtkIconView *icon_view,
 141--                                              GtkTreePath **path,
 142--                                              GtkCellRenderer **cell);
 143-- void        gtk_icon_view_selected_foreach  (GtkIconView *icon_view,
 144--                                              GtkIconViewForeachFunc func,
 145--                                              gpointer data);
 146-- void        gtk_icon_view_set_selection_mode
 147--                                             (GtkIconView *icon_view,
 148--                                              GtkSelectionMode mode);
 149-- GtkSelectionMode gtk_icon_view_get_selection_mode
 150--                                             (GtkIconView *icon_view);
 151-- void        gtk_icon_view_set_orientation   (GtkIconView *icon_view,
 152--                                              GtkOrientation orientation);
 153-- GtkOrientation gtk_icon_view_get_orientation
 154--                                             (GtkIconView *icon_view);
 155-- void        gtk_icon_view_set_columns       (GtkIconView *icon_view,
 156--                                              gint columns);
 157-- gint        gtk_icon_view_get_columns       (GtkIconView *icon_view);
 158
 159-- Since 2.6
 160-- gtk_icon_view_set_item_width ()
 161
 162-- void        gtk_icon_view_set_item_width    (GtkIconView *icon_view,
 163--                                              gint item_width);
 164
 165	item_width: INTEGER is
 166			-- Returns the value of the ::item-width property.
 167		do
 168			Result := gtk_icon_view_get_item_width (handle)
 169		end
 170
 171	set_item_width (a_width: INTEGER) is
 172			-- Sets the ::item-width property which specifies the width
 173			-- to use for each item. If it is set to -1, the icon view will
 174			-- automatically determine a suitable item size.
 175		do
 176			gtk_icon_view_set_item_width (handle, a_width)
 177		end
 178
 179-- void        gtk_icon_view_set_spacing       (GtkIconView *icon_view,
 180--                                              gint spacing);
 181-- gint        gtk_icon_view_get_spacing       (GtkIconView *icon_view);
 182-- void        gtk_icon_view_set_row_spacing   (GtkIconView *icon_view,
 183--                                              gint row_spacing);
 184-- gint        gtk_icon_view_get_row_spacing   (GtkIconView *icon_view);
 185-- void        gtk_icon_view_set_column_spacing
 186--                                             (GtkIconView *icon_view,
 187--                                              gint column_spacing);
 188-- gint        gtk_icon_view_get_column_spacing
 189--                                             (GtkIconView *icon_view);
 190-- void        gtk_icon_view_set_margin        (GtkIconView *icon_view,
 191--                                              gint margin);
 192-- gint        gtk_icon_view_get_margin        (GtkIconView *icon_view);
 193-- void        gtk_icon_view_select_path       (GtkIconView *icon_view,
 194--                                              GtkTreePath *path);
 195-- void        gtk_icon_view_unselect_path     (GtkIconView *icon_view,
 196--                                              GtkTreePath *path);
 197-- gboolean    gtk_icon_view_path_is_selected  (GtkIconView *icon_view,
 198--                                              GtkTreePath *path);
 199-- GList*      gtk_icon_view_get_selected_items
 200--                                             (GtkIconView *icon_view);
 201-- void        gtk_icon_view_select_all        (GtkIconView *icon_view);
 202-- void        gtk_icon_view_unselect_all      (GtkIconView *icon_view);
 203-- void        gtk_icon_view_item_activated    (GtkIconView *icon_view,
 204--                                              GtkTreePath *path);
 205-- void        gtk_icon_view_scroll_to_path    (GtkIconView *icon_view,
 206--                                              GtkTreePath *path,
 207--                                              gboolean use_align,
 208--                                              gfloat row_align,
 209--                                              gfloat col_align);
 210-- gboolean    gtk_icon_view_get_visible_range (GtkIconView *icon_view,
 211--                                              GtkTreePath **start_path,
 212--                                              GtkTreePath **end_path);
 213
 214-- enum        GtkIconViewDropPosition;
 215-- void        gtk_icon_view_enable_model_drag_source
 216--                                             (GtkIconView *icon_view,
 217--                                              GdkModifierType start_button_mask,
 218--                                              const GtkTargetEntry *targets,
 219--                                              gint n_targets,
 220--                                              GdkDragAction actions);
 221-- void        gtk_icon_view_enable_model_drag_dest
 222--                                             (GtkIconView *icon_view,
 223--                                              const GtkTargetEntry *targets,
 224--                                              gint n_targets,
 225--                                              GdkDragAction actions);
 226-- void        gtk_icon_view_unset_model_drag_source
 227--                                             (GtkIconView *icon_view);
 228-- void        gtk_icon_view_unset_model_drag_dest
 229--                                             (GtkIconView *icon_view);
 230-- void        gtk_icon_view_set_reorderable   (GtkIconView *icon_view,
 231--                                              gboolean reorderable);
 232-- gboolean    gtk_icon_view_get_reorderable   (GtkIconView *icon_view);
 233-- void        gtk_icon_view_set_drag_dest_item
 234--                                             (GtkIconView *icon_view,
 235--                                              GtkTreePath *path,
 236--                                              GtkIconViewDropPosition pos);
 237-- void        gtk_icon_view_get_drag_dest_item
 238--                                             (GtkIconView *icon_view,
 239--                                              GtkTreePath **path,
 240--                                              GtkIconViewDropPosition *pos);
 241-- gboolean    gtk_icon_view_get_dest_item_at_pos
 242--                                             (GtkIconView *icon_view,
 243--                                              gint drag_x,
 244--                                              gint drag_y,
 245--                                              GtkTreePath **path,
 246--                                              GtkIconViewDropPosition *pos);
 247-- GdkPixmap*  gtk_icon_view_create_drag_icon  (GtkIconView *icon_view,
 248--                                              GtkTreePath *path);
 249
 250-- Description
 251
 252-- GtkIconViewForeachFunc ()
 253
 254-- void        (*GtkIconViewForeachFunc)       (GtkIconView *icon_view,
 255--                                              GtkTreePath *path,
 256--                                              gpointer data);
 257
 258-- A function used by gtk_icon_view_selected_foreach() to map all selected rows. It will be called on every selected row in the view.
 259-- icon_view : 	
 260-- path : 	The GtkTreePath of a selected row
 261-- data : 	user data
 262	
 263-- Since 2.6
 264-- gtk_icon_view_get_text_column ()
 265
 266-- gint        gtk_icon_view_get_text_column   (GtkIconView *icon_view);
 267
 268-- Returns the column with text for icon_view.
 269
 270-- icon_view : 	A GtkIconView.
 271-- Returns : 	the text column, or -1 if it's unset.
 272
 273-- Since 2.6
 274-- gtk_icon_view_set_markup_column ()
 275
 276-- void        gtk_icon_view_set_markup_column (GtkIconView *icon_view,
 277--                                              gint column);
 278
 279-- Sets the column with markup information for icon_view to be column. The markup column must be of type G_TYPE_STRING. If the markup column is set to something, it overrides the text column set by gtk_icon_view_set_text_column().
 280
 281-- icon_view : 	A GtkIconView.
 282-- column : 	A column in the currently used model.
 283
 284-- Since 2.6
 285-- gtk_icon_view_get_markup_column ()
 286
 287-- gint        gtk_icon_view_get_markup_column (GtkIconView *icon_view);
 288
 289-- Returns the column with markup text for icon_view.
 290
 291-- icon_view : 	A GtkIconView.
 292-- Returns : 	the markup column, or -1 if it's unset.
 293
 294-- Since 2.6
 295-- gtk_icon_view_set_pixbuf_column ()
 296
 297-- void        gtk_icon_view_set_pixbuf_column (GtkIconView *icon_view,
 298--                                              gint column);
 299
 300-- Sets the column with pixbufs for icon_view to be column. The pixbuf column must be of type GDK_TYPE_PIXBUF
 301
 302-- icon_view : 	A GtkIconView.
 303-- column : 	A column in the currently used model.
 304
 305-- Since 2.6
 306-- gtk_icon_view_get_pixbuf_column ()
 307
 308-- gint        gtk_icon_view_get_pixbuf_column (GtkIconView *icon_view);
 309
 310-- Returns the column with pixbufs for icon_view.
 311
 312-- icon_view : 	A GtkIconView.
 313-- Returns : 	the pixbuf column, or -1 if it's unset.
 314
 315-- Since 2.6
 316-- gtk_icon_view_get_path_at_pos ()
 317
 318-- GtkTreePath* gtk_icon_view_get_path_at_pos  (GtkIconView *icon_view,
 319--                                              gint x,
 320--                                              gint y);
 321
 322-- Finds the path at the point (x, y), relative to widget coordinates. See gtk_icon_view_get_item_at_pos(), if you are also interested in the cell at the specified position.
 323
 324-- icon_view : 	A GtkIconView.
 325-- x : 	The x position to be identified
 326-- y : 	The y position to be identified
 327-- Returns : 	The GtkTreePath corresponding to the icon or NULL if no icon exists at that position.
 328
 329-- Since 2.6
 330
 331-- gtk_icon_view_get_item_at_pos ()
 332
 333-- gboolean    gtk_icon_view_get_item_at_pos   (GtkIconView *icon_view,
 334--                                              gint x,
 335--                                              gint y,
 336--                                              GtkTreePath **path,
 337--                                              GtkCellRenderer **cell);
 338
 339-- Finds the path at the point (x, y), relative to widget coordinates. In contrast to gtk_icon_view_get_path_at_pos(), this function also obtains the cell at the specified position. The returned path should be freed with gtk_tree_path_free().
 340
 341-- icon_view : 	A GtkIconView.
 342-- x : 	The x position to be identified
 343-- y : 	The y position to be identified
 344-- path : 	Return location for the path, or NULL
 345-- cell : 	Return location for the renderer responsible for the cell at (x, y), or NULL
 346-- Returns : 	TRUE if an item exists at the specified position
 347
 348-- Since 2.8
 349-- gtk_icon_view_set_cursor ()
 350
 351-- void        gtk_icon_view_set_cursor        (GtkIconView *icon_view,
 352--                                              GtkTreePath *path,
 353--                                              GtkCellRenderer *cell,
 354--                                              gboolean start_editing);
 355
 356-- Sets the current keyboard focus to be at path, and selects it. This is useful when you want to focus the user's attention on a particular item. If cell is not NULL, then focus is given to the cell specified by it. Additionally, if start_editing is TRUE, then editing should be started in the specified cell.
 357
 358-- This function is often followed by gtk_widget_grab_focus (icon_view) in order to give keyboard focus to the widget. Please note that editing can only happen when the widget is realized.
 359
 360-- icon_view : 	A GtkIconView
 361-- path : 	A GtkTreePath
 362-- cell : 	A GtkCellRenderer or NULL
 363-- start_editing : 	TRUE if the specified cell should start being edited.
 364
 365-- Since 2.8
 366
 367	cursor: TUPLE [GTK_TREE_PATH, GTK_CELL_RENDERER] is
 368			-- Fills in path and cell with the current cursor path and cell.
 369			-- If the cursor isn't currently set, then *path will be NULL.
 370			-- If no cell currently has focus, then *cell will be NULL.
 371			-- The returned GtkTreePath must be freed with gtk_successtree_path_free().
 372		local
 373			path_ptr, cell_ptr: POINTER
 374			res: BOOLEAN
 375			path: GTK_TREE_PATH
 376			cell: GTK_CELL_RENDERER
 377			cell_name: STRING
 378			retriever: G_OBJECT_EXPANDED_FACTORY [GTK_CELL_RENDERER]
 379		do
 380			res := gtk_icon_view_get_cursor (handle, $path_ptr, $cell_ptr).to_boolean
 381			
 382			if path_ptr.is_not_null then create path.from_external_pointer (path_ptr)
 383			else path := Void
 384			end
 385
 386			cell := retriever.wrapper_or_void(cell_ptr)
 387			Result := [path, cell]
 388		end
 389
 390	-- TODO:gtk_icon_view_selected_foreach ()
 391
 392-- void        gtk_icon_view_selected_foreach  (GtkIconView *icon_view,
 393--                                              GtkIconViewForeachFunc func,
 394--                                              gpointer data);
 395
 396-- Calls a function for each selected icon. Note that the model or selection cannot be modified from within this function.
 397
 398-- icon_view : 	A GtkIconView.
 399-- func : 	The funcion to call for each selected icon.
 400-- data : 	User data to pass to the function.
 401
 402-- Since 2.6
 403-- gtk_icon_view_set_selection_mode ()
 404
 405-- void        gtk_icon_view_set_selection_mode
 406--                                             (GtkIconView *icon_view,
 407--                                              GtkSelectionMode mode);
 408
 409-- Sets the selection mode of the icon_view.
 410
 411-- icon_view : 	A GtkIconView.
 412-- mode : 	The selection mode
 413
 414-- Since 2.6
 415-- gtk_icon_view_get_selection_mode ()
 416
 417-- GtkSelectionMode gtk_icon_view_get_selection_mode
 418--                                             (GtkIconView *icon_view);
 419
 420-- Gets the selection mode of the icon_view.
 421
 422-- icon_view : 	A GtkIconView.
 423-- Returns : 	the current selection mode
 424
 425-- Since 2.6
 426-- gtk_icon_view_set_orientation ()
 427
 428-- void        gtk_icon_view_set_orientation   (GtkIconView *icon_view,
 429--                                              GtkOrientation orientation);
 430
 431-- Sets the ::orientation property which determines whether the labels are drawn beside the icons instead of below.
 432
 433-- icon_view : 	a GtkIconView
 434-- orientation : 	the relative position of texts and icons
 435
 436-- Since 2.6
 437-- gtk_icon_view_get_orientation ()
 438
 439-- GtkOrientation gtk_icon_view_get_orientation
 440--                                             (GtkIconView *icon_view);
 441
 442-- Returns the value of the ::orientation property which determines whether the labels are drawn beside the icons instead of below.
 443
 444-- icon_view : 	a GtkIconView
 445-- Returns : 	the relative position of texts and icons
 446
 447-- Since 2.6
 448-- gtk_icon_view_set_columns ()
 449
 450-- void        gtk_icon_view_set_columns       (GtkIconView *icon_view,
 451--                                              gint columns);
 452
 453-- Sets the ::columns property which determines in how many columns the icons are arranged. If columns is -1, the number of columns will be chosen automatically to fill the available area.
 454
 455-- icon_view : 	a GtkIconView
 456-- columns : 	the number of columns
 457
 458-- Since 2.6
 459-- gtk_icon_view_get_columns ()
 460
 461-- gint        gtk_icon_view_get_columns       (GtkIconView *icon_view);
 462
 463-- Returns the value of the ::columns property.
 464
 465-- icon_view : 	a GtkIconView
 466-- Returns : 	the number of columns, or -1
 467
 468-- Since 2.6
 469-- gtk_icon_view_set_spacing ()
 470
 471-- void        gtk_icon_view_set_spacing       (GtkIconView *icon_view,
 472--                                              gint spacing);
 473
 474-- Sets the ::spacing property which specifies the space which is inserted between the cells (i.e. the icon and the text) of an item.
 475
 476-- icon_view : 	a GtkIconView
 477-- spacing : 	the spacing
 478
 479-- Since 2.6
 480-- gtk_icon_view_get_spacing ()
 481
 482-- gint        gtk_icon_view_get_spacing       (GtkIconView *icon_view);
 483
 484-- Returns the value of the ::spacing property.
 485
 486-- icon_view : 	a GtkIconView
 487-- Returns : 	the space between cells
 488
 489-- Since 2.6
 490-- gtk_icon_view_set_row_spacing ()
 491
 492-- void        gtk_icon_view_set_row_spacing   (GtkIconView *icon_view,
 493--                                              gint row_spacing);
 494
 495-- Sets the ::row-spacing property which specifies the space which is inserted between the rows of the icon view.
 496
 497-- icon_view : 	a GtkIconView
 498-- row_spacing : 	the row spacing
 499
 500-- Since 2.6
 501-- gtk_icon_view_get_row_spacing ()
 502
 503-- gint        gtk_icon_view_get_row_spacing   (GtkIconView *icon_view);
 504
 505-- Returns the value of the ::row-spacing property.
 506
 507-- icon_view : 	a GtkIconView
 508-- Returns : 	the space between rows
 509
 510-- Since 2.6
 511-- gtk_icon_view_set_column_spacing ()
 512
 513-- void        gtk_icon_view_set_column_spacing
 514--                                             (GtkIconView *icon_view,
 515--                                              gint column_spacing);
 516
 517-- Sets the ::column-spacing property which specifies the space which is inserted between the columns of the icon view.
 518
 519-- icon_view : 	a GtkIconView
 520-- column_spacing : 	the column spacing
 521
 522-- Since 2.6
 523-- gtk_icon_view_get_column_spacing ()
 524
 525-- gint        gtk_icon_view_get_column_spacing
 526--                                             (GtkIconView *icon_view);
 527
 528-- Returns the value of the ::column-spacing property.
 529
 530-- icon_view : 	a GtkIconView
 531-- Returns : 	the space between columns
 532
 533-- Since 2.6
 534-- gtk_icon_view_set_margin ()
 535
 536-- void        gtk_icon_view_set_margin        (GtkIconView *icon_view,
 537--                                              gint margin);
 538
 539-- Sets the ::margin property which specifies the space which is inserted at the top, bottom, left and right of the icon view.
 540
 541-- icon_view : 	a GtkIconView
 542-- margin : 	the margin
 543
 544-- Since 2.6
 545-- gtk_icon_view_get_margin ()
 546
 547-- gint        gtk_icon_view_get_margin        (GtkIconView *icon_view);
 548
 549-- Returns the value of the ::margin property.
 550
 551-- icon_view : 	a GtkIconView
 552-- Returns : 	the space at the borders
 553
 554-- Since 2.6
 555-- gtk_icon_view_select_path ()
 556
 557-- void        gtk_icon_view_select_path       (GtkIconView *icon_view,
 558--                                              GtkTreePath *path);
 559
 560-- Selects the row at path.
 561
 562-- icon_view : 	A GtkIconView.
 563-- path : 	The GtkTreePath to be selected.
 564
 565-- Since 2.6
 566-- gtk_icon_view_unselect_path ()
 567
 568-- void        gtk_icon_view_unselect_path     (GtkIconView *icon_view,
 569--                                              GtkTreePath *path);
 570
 571-- Unselects the row at path.
 572
 573-- icon_view : 	A GtkIconView.
 574-- path : 	The GtkTreePath to be unselected.
 575
 576-- Since 2.6
 577-- gtk_icon_view_path_is_selected ()
 578
 579-- gboolean    gtk_icon_view_path_is_selected  (GtkIconView *icon_view,
 580--                                              GtkTreePath *path);
 581
 582-- Returns TRUE if the icon pointed to by path is currently selected. If icon does not point to a valid location, FALSE is returned.
 583
 584-- icon_view : 	A GtkIconView.
 585-- path : 	A GtkTreePath to check selection on.
 586-- Returns : 	TRUE if path is selected.
 587
 588-- Since 2.6
 589-- gtk_icon_view_get_selected_items ()
 590
 591-- GList*      gtk_icon_view_get_selected_items
 592--                                             (GtkIconView *icon_view);
 593
 594-- Creates a list of paths of all selected items. Additionally, if you are planning on modifying the model after calling this function, you may want to convert the returned list into a list of GtkTreeRowReferences. To do this, you can use gtk_tree_row_reference_new().
 595
 596-- To free the return value, use:
 597
 598-- g_list_foreach (list, gtk_tree_path_free, NULL);
 599-- g_list_free (list);
 600
 601-- icon_view : 	A GtkIconView.
 602-- Returns : 	A GList containing a GtkTreePath for each selected row.
 603
 604-- Since 2.6
 605-- gtk_icon_view_select_all ()
 606
 607-- void        gtk_icon_view_select_all        (GtkIconView *icon_view);
 608
 609-- Selects all the icons. icon_view must has its selection mode set to GTK_SELECTION_MULTIPLE.
 610
 611-- icon_view : 	A GtkIconView.
 612
 613-- Since 2.6
 614-- gtk_icon_view_unselect_all ()
 615
 616-- void        gtk_icon_view_unselect_all      (GtkIconView *icon_view);
 617
 618-- Unselects all the icons.
 619
 620-- icon_view : 	A GtkIconView.
 621
 622-- Since 2.6
 623-- gtk_icon_view_item_activated ()
 624
 625-- void        gtk_icon_view_item_activated    (GtkIconView *icon_view,
 626--                                              GtkTreePath *path);
 627
 628-- Activates the item determined by path.
 629
 630-- icon_view : 	A GtkIconView
 631-- path : 	The GtkTreePath to be activated
 632
 633-- Since 2.6
 634-- gtk_icon_view_scroll_to_path ()
 635
 636-- void        gtk_icon_view_scroll_to_path    (GtkIconView *icon_view,
 637--                                              GtkTreePath *path,
 638--                                              gboolean use_align,
 639--                                              gfloat row_align,
 640--                                              gfloat col_align);
 641
 642-- Moves the alignments of icon_view to the position specified by path. row_align determines where the row is placed, and col_align determines where column is placed. Both are expected to be between 0.0 and 1.0. 0.0 means left/top alignment, 1.0 means right/bottom alignment, 0.5 means center.
 643
 644-- If use_align is FALSE, then the alignment arguments are ignored, and the tree does the minimum amount of work to scroll the item onto the screen. This means that the item will be scrolled to the edge closest to its current position. If the item is currently visible on the screen, nothing is done.
 645
 646-- This function only works if the model is set, and path is a valid row on the model. If the model changes before the icon_view is realized, the centered path will be modified to reflect this change.
 647
 648-- icon_view : 	A GtkIconView.
 649-- path : 	The path of the item to move to.
 650-- use_align : 	whether to use alignment arguments, or FALSE.
 651-- row_align : 	The vertical alignment of the item specified by path.
 652-- col_align : 	The horizontal alignment of the item specified by path.
 653
 654-- Since 2.8
 655-- gtk_icon_view_get_visible_range ()
 656
 657-- gboolean    gtk_icon_view_get_visible_range (GtkIconView *icon_view,
 658--                                              GtkTreePath **start_path,
 659--                                              GtkTreePath **end_path);
 660
 661-- Sets start_path and end_path to be the first and last visible path. Note that there may be invisible paths in between.
 662
 663-- Both paths should be freed with gtk_tree_path_free() after use.
 664
 665-- icon_view : 	A GtkIconView
 666-- start_path : 	Return location for start of region, or NULL
 667-- end_path : 	Return location for end of region, or NULL
 668-- Returns : 	TRUE, if valid paths were placed in start_path and end_path
 669
 670-- Since 2.8
 671-- enum GtkIconViewDropPosition
 672
 673-- typedef enum
 674-- {
 675--   GTK_ICON_VIEW_NO_DROP,
 676--   GTK_ICON_VIEW_DROP_INTO,
 677--   GTK_ICON_VIEW_DROP_LEFT,
 678--   GTK_ICON_VIEW_DROP_RIGHT,
 679--   GTK_ICON_VIEW_DROP_ABOVE,
 680--   GTK_ICON_VIEW_DROP_BELOW
 681-- } GtkIconViewDropPosition;
 682
 683	enable_model_drag_source (a_start_button_mask: INTEGER;
 684									  a_target: GTK_TARGET_ENTRY;
 685									  some_actions: INTEGER) is
 686			-- Turns icon_view into a drag source for automatic DND.
 687			-- start_button_mask : 	Mask of allowed buttons to start drag
 688			-- some_targets : 	the table of targets that the drag will support
 689			-- n_targets : 	the number of items in targets
 690			-- some_actions : 	the bitmask of possible actions for a drag from this widget
 691		require
 692			is_valid_gdk_modifier_type (a_start_button_mask)
 693			a_target /= Void
 694			is_valid_gdk_drag_action (some_actions)
 695		do
 696			-- XXX: WATCH OUT! this implemetation allows the setting of only ONE target.
 697			-- In order to allow a list of them, we'd need to develop some C code so we can transform
 698			-- a NATIVE_ARRAY [POINTER] with the handle's of the different GTK_TARGET_ENTRY
 699			-- into a GtkTargetEntry *.
 700			-- nessa, 2006-10-30
 701			gtk_icon_view_enable_model_drag_source (handle, a_start_button_mask,
 702																 a_target.handle, 1, some_actions)
 703		end
 704
 705	enable_model_drag_dest (a_target: GTK_TARGET_ENTRY; some_actions: INTEGER) is
 706			-- Turns icon_view into a drop destination for automatic DND.
 707			-- some_targets : 	the table of targets that the drag will support
 708			-- n_targets : 	the number of items in targets
 709			-- some_actions : 	the bitmask of possible actions for a drag from this widget
 710		require
 711			a_target /= Void
 712			is_valid_gdk_drag_action (some_actions)
 713		do
 714			-- XXX: WATCH OUT! thsi implemetation allows the setting of only ONE target.
 715			-- In order to allow a list of them, we'd need to develop some C code so we can transform
 716			-- a NATIVE_ARRAY [POINTER] with the handle's of the different GTK_TARGET_ENTRY
 717			-- into a GtkTargetEntry *.
 718			-- nessa, 2006-10-30
 719			gtk_icon_view_enable_model_drag_dest (handle, a_target.handle, 1, some_actions)
 720		end
 721
 722	unset_model_drag_source is
 723			-- Undoes the effect of `enable_model_drag_source'
 724		do
 725			gtk_icon_view_unset_model_drag_source (handle)
 726		end
 727
 728	unset_model_drag_dest is
 729			-- Undoes the effect of `enable_model_drag_dest'
 730		do
 731			gtk_icon_view_unset_model_drag_dest (handle)
 732		end
 733
 734	set_reorderable (a_boolean: BOOLEAN) is
 735			-- This function is a convenience function to allow you to
 736			-- reorder models that support the GtkTreeDragSourceIface
 737			-- and the GtkTreeDragDestIface. Both GtkTreeStore
 738			-- and GtkListStore support these. If reorderable is TRUE,
 739			-- then the user can reorder the model by dragging and dropping rows.
 740			-- The developer can listen to these changes by connecting to the
 741			-- model's row_inserted and row_deleted signals
 742			-- This function does not give you any degree of control over the order
 743			-- (any reordering is allowed). If more control is needed, you should
 744			-- probably handle drag and drop manually.
 745		do
 746			gtk_icon_view_set_reorderable (handle, a_boolean.to_integer)
 747		end
 748
 749	reorderable: BOOLEAN is
 750			-- Retrieves whether the user can reorder the list via drag-and-drop.
 751			-- See `set_reorderable'.
 752		do
 753			Result := gtk_icon_view_get_reorderable (handle).to_boolean
 754		end
 755		
 756-- gtk_icon_view_set_drag_dest_item ()
 757
 758-- void        gtk_icon_view_set_drag_dest_item
 759--                                             (GtkIconView *icon_view,
 760--                                              GtkTreePath *path,
 761--                                              GtkIconViewDropPosition pos);
 762
 763-- Sets the item that is highlighted for feedback.
 764
 765-- icon_view : 	a GtkIconView
 766-- path : 	The path of the item to highlight, or NULL.
 767-- pos : 	Specifies where to drop, relative to the item
 768
 769-- Since 2.8
 770-- gtk_icon_view_get_drag_dest_item ()
 771
 772-- void        gtk_icon_view_get_drag_dest_item
 773--                                             (GtkIconView *icon_view,
 774--                                              GtkTreePath **path,
 775--                                              GtkIconViewDropPosition *pos);
 776
 777-- Gets information about the item that is highlighted for feedback.
 778
 779-- icon_view : 	a GtkIconView
 780-- path : 	Return location for the path of the highlighted item, or NULL.
 781-- pos : 	Return location for the drop position, or NULL
 782
 783-- Since 2.8
 784
 785	dest_item_at_pos (drag_x, drag_y: INTEGER): TUPLE [GTK_TREE_PATH, INTEGER] is
 786			-- Determines the destination item for a given position.
 787			-- drag_x : 	the position to determine the destination item for
 788			-- drag_y : 	the position to determine the destination item for
 789			-- a_path : 	Return location for the path of the item, or NULL.
 790			-- a_position : 	Return location for the drop position, or NULL
 791			-- Returns : 	whether there is an item at the given position.
 792		local
 793			item_exists: BOOLEAN
 794			a_path: GTK_TREE_PATH
 795			a_path_ptr: POINTER
 796			a_position: INTEGER
 797		do
 798			item_exists := gtk_icon_view_get_dest_item_at_pos (handle, drag_x, drag_y, $a_path_ptr, $a_position).to_boolean
 799			if item_exists then
 800				create a_path.from_external_pointer (a_path_ptr)
 801			end
 802			Result := [a_path, a_position]
 803		ensure
 804			Result /= Void
 805			Result.first /= Void implies is_valid_gtk_icon_view_drop_position (Result.second)
 806		end
 807
 808-- gtk_icon_view_create_drag_icon ()
 809
 810-- GdkPixmap*  gtk_icon_view_create_drag_icon  (GtkIconView *icon_view,
 811--                                              GtkTreePath *path);
 812
 813-- Creates a GdkPixmap representation of the item at path. This image is used for a drag icon.
 814
 815-- icon_view : 	a GtkIconView
 816-- path : 	a GtkTreePath in icon_view
 817-- Returns : 	a newly-allocated pixmap of the drag icon.
 818
 819	-- Since 2.8
 820	-- Implemented Interfaces
 821
 822-- GtkIconView implements AtkImplementorIface and GtkCellLayout.
 823-- Properties
 824
 825--   "column-spacing"       gint                  : Read / Write
 826--   "columns"              gint                  : Read / Write
 827--   "item-width"           gint                  : Read / Write
 828--   "margin"               gint                  : Read / Write
 829--   "markup-column"        gint                  : Read / Write
 830--   "model"                GtkTreeModel          : Read / Write
 831--   "orientation"          GtkOrientation        : Read / Write
 832--   "pixbuf-column"        gint                  : Read / Write
 833--   "reorderable"          gboolean              : Read / Write
 834--   "row-spacing"          gint                  : Read / Write
 835--   "selection-mode"       GtkSelectionMode      : Read / Write
 836--   "spacing"              gint                  : Read / Write
 837--   "text-column"          gint                  : Read / Write
 838
 839
 840-- Property Details
 841-- The "column-spacing" property
 842
 843--   "column-spacing"       gint                  : Read / Write
 844
 845-- Space which is inserted between grid column.
 846
 847-- Allowed values: >= 0
 848
 849-- Default value: 6
 850-- The "columns" property
 851
 852--   "columns"              gint                  : Read / Write
 853
 854-- The columns property contains the number of the columns in which the items should be displayed. If it is -1, the number of columns will be chosen automatically to fill the available area.
 855
 856-- Allowed values: >= -1
 857
 858-- Default value: -1
 859
 860-- Since 2.6
 861-- The "item-width" property
 862
 863--   "item-width"           gint                  : Read / Write
 864
 865-- The width used for each item.
 866
 867-- Allowed values: >= -1
 868
 869-- Default value: -1
 870-- The "margin" property
 871
 872--   "margin"               gint                  : Read / Write
 873
 874-- Space which is inserted at the edges of the icon view.
 875
 876-- Allowed values: >= 0
 877
 878-- Default value: 6
 879-- The "markup-column" property
 880
 881--   "markup-column"        gint                  : Read / Write
 882
 883-- The ::markup-column property contains the number of the model column containing markup information to be displayed. The markup column must be of type G_TYPE_STRING. If this property and the :text-column property are both set to column numbers, it overrides the text column. If both are set to -1, no texts are displayed.
 884
 885-- Allowed values: >= -1
 886
 887-- Default value: -1
 888
 889-- Since 2.6
 890-- The "model" property
 891
 892--   "model"                GtkTreeModel          : Read / Write
 893
 894-- The model for the icon view.
 895-- The "orientation" property
 896
 897--   "orientation"          GtkOrientation        : Read / Write
 898
 899-- How the text and icon of each item are positioned relative to each other.
 900
 901-- Default value: GTK_ORIENTATION_VERTICAL
 902-- The "pixbuf-column" property
 903
 904--   "pixbuf-column"        gint                  : Read / Write
 905
 906-- The ::pixbuf-column property contains the number of the model column containing the pixbufs which are displayed. The pixbuf column must be of type GDK_TYPE_PIXBUF. Setting this property to -1 turns off the display of pixbufs.
 907
 908-- Allowed values: >= -1
 909
 910-- Default value: -1
 911
 912-- Since 2.6
 913-- The "reorderable" property
 914
 915--   "reorderable"          gboolean              : Read / Write
 916
 917-- The reorderable property specifies if the items can be reordered by drag-and-drop.
 918
 919-- Default value: FALSE
 920
 921-- Since 2.8
 922-- The "row-spacing" property
 923
 924--   "row-spacing"          gint                  : Read / Write
 925
 926-- Space which is inserted between grid rows.
 927
 928-- Allowed values: >= 0
 929
 930-- Default value: 6
 931-- The "selection-mode" property
 932
 933--   "selection-mode"       GtkSelectionMode      : Read / Write
 934
 935-- The ::selection-mode property specifies the selection mode of icon view. If the mode is GTK_SELECTION_MULTIPLE, rubberband selection is enabled, for the other modes, only keyboard selection is possible.
 936
 937-- Default value: GTK_SELECTION_SINGLE
 938
 939-- Since 2.6
 940-- The "spacing" property
 941
 942--   "spacing"              gint                  : Read / Write
 943
 944-- Space which is inserted between cells of an item.
 945
 946-- Allowed values: >= 0
 947
 948-- Default value: 0
 949-- The "text-column" property
 950
 951--   "text-column"          gint                  : Read / Write
 952
 953-- The ::text-column property contains the number of the model column containing the texts which are displayed. The text column must be of type G_TYPE_STRING. If this property and the :markup-column property are both set to -1, no texts are displayed.
 954
 955-- Allowed values: >= -1
 956
 957-- Default value: -1
 958
 959	-- Since 2.6
 960	
 961feature -- TODO: Style Properties
 962
 963--   "selection-box-alpha"  guchar                : Read
 964--   "selection-box-color"  GdkColor              : Read
 965
 966-- Style Property Details
 967-- The "selection-box-alpha" style property
 968
 969--   "selection-box-alpha"  guchar                : Read
 970
 971-- Opacity of the selection box.
 972
 973-- Default value: 64
 974-- The "selection-box-color" style property
 975
 976--   "selection-box-color"  GdkColor              : Read
 977
 978-- Color of the selection box.
 979
 980feature -- TODO: Signals
 981
 982-- "activate-cursor-item"
 983--             gboolean    user_function      (GtkIconView *iconview,
 984--                                             gpointer user_data);
 985-- "item-activated"
 986--             void        user_function      (GtkIconView *iconview,
 987--                                             GtkTreePath *arg1,
 988--                                             gpointer user_data);
 989-- "move-cursor"
 990--             gboolean    user_function      (GtkIconView *iconview,
 991--                                             GtkMovementStep arg1,
 992--                                             gint arg2,
 993--                                             gpointer user_data);
 994-- "select-all"
 995--             void        user_function      (GtkIconView *iconview,
 996--                                             gpointer user_data);
 997-- "select-cursor-item"
 998--             void        user_function      (GtkIconView *iconview,
 999--                                             gpointer user_data);
1000-- "selection-changed"
1001--             void        user_function      (GtkIconView *iconview,
1002--                                             gpointer user_data);
1003-- "set-scroll-adjustments"
1004--             void        user_function      (GtkIconView *iconview,
1005--                                             GtkAdjustment *arg1,
1006--                                             GtkAdjustment *arg2,
1007--                                             gpointer user_data);
1008-- "toggle-cursor-item"
1009--             void        user_function      (GtkIconView *iconview,
1010--                                             gpointer user_data);
1011-- "unselect-all"
1012--             void        user_function      (GtkIconView *iconview,
1013--                                             gpointer user_data);
1014
1015-- Signal Details
1016-- The "activate-cursor-item" signal
1017
1018-- gboolean    user_function                  (GtkIconView *iconview,
1019--                                             gpointer user_data);
1020
1021-- iconview : 	the object which received the signal.
1022-- user_data : 	user data set when the signal handler was connected.
1023-- Returns : 	
1024-- The "item-activated" signal
1025
1026-- void        user_function                  (GtkIconView *iconview,
1027--                                             GtkTreePath *arg1,
1028--                                             gpointer user_data);
1029
1030-- iconview : 	the object which received the signal.
1031-- arg1 : 	
1032-- user_data : 	user data set when the signal handler was connected.
1033-- The "move-cursor" signal
1034
1035-- gboolean    user_function                  (GtkIconView *iconview,
1036--                                             GtkMovementStep arg1,
1037--                                             gint arg2,
1038--                                             gpointer user_data);
1039
1040-- iconview : 	the object which received the signal.
1041-- arg1 : 	
1042-- arg2 : 	
1043-- user_data : 	user data set when the signal handler was connected.
1044-- Returns : 	
1045-- The "select-all" signal
1046
1047-- void        user_function                  (GtkIconView *iconview,
1048--                                             gpointer user_data);
1049
1050-- iconview : 	the object which received the signal.
1051-- user_data : 	user data set when the signal handler was connected.
1052-- The "select-cursor-item" signal
1053
1054-- void        user_function                  (GtkIconView *iconview,
1055--                                             gpointer user_data);
1056
1057-- iconview : 	the object which received the signal.
1058-- user_data : 	user data set when the signal handler was connected.
1059-- The "selection-changed" signal
1060
1061-- void        user_function                  (GtkIconView *iconview,
1062--                                             gpointer user_data);
1063
1064-- iconview : 	the object which received the signal.
1065-- user_data : 	user data set when the signal handler was connected.
1066-- The "set-scroll-adjustments" signal
1067
1068-- void        user_function                  (GtkIconView *iconview,
1069--                                             GtkAdjustment *arg1,
1070--                                             GtkAdjustment *arg2,
1071--                                             gpointer user_data);
1072
1073-- iconview : 	the object which received the signal.
1074-- arg1 : 	
1075-- arg2 : 	
1076-- user_data : 	user data set when the signal handler was connected.
1077-- The "toggle-cursor-item" signal
1078
1079-- void        user_function                  (GtkIconView *iconview,
1080--                                             gpointer user_data);
1081
1082-- iconview : 	the object which received the signal.
1083-- user_data : 	user data set when the signal handler was connected.
1084-- The "unselect-all" signal
1085
1086-- void        user_function                  (GtkIconView *iconview,
1087--                                             gpointer user_data);
1088
1089-- iconview : 	the object which received the signal.
1090-- user_data : 	user data set when the signal handler was connected.
1091
1092feature
1093
1094	struct_size: INTEGER is
1095		external "C inline use <gtk/gtk.h>"
1096		alias "sizeof(GtkIconView)"
1097		end
1098
1099end -- class GTK_ICON_VIEW