Main Page Widgets Namespaces Book

# Gtk::IconView Class Reference
[Widgets, Container Widgets]

Inheritance diagram for Gtk::IconView:

[legend]
List of all members.

## Detailed Description

TODO.

## Public Types
typedef Glib::ListHandle< TreePath, TreePathTraits > | ArrayHandle_TreePaths
typedef sigc::slot< void, const TreeModel::Path& > | SlotForeach
| For instance, void on_foreach(const Gtk::TreeModel::Path& path);.
## Public Member Functions
int | get_column_spacing () const
int | get_columns () const
int | get_icon_width () const
int | get_margin () const
int | get_markup_column () const
| Returns the column with markup text for icon_view .
Glib::RefPtr<const TreeModel> | get_model () const
| Returns the model the Gtk::IconView is based on.
Glib::RefPtr<TreeModel> | get_model ()
| Returns the model the Gtk::IconView is based on.
Orientation | get_orientation () const
| Returns the value of the ::orientation property which determines whether the labels are drawn beside the icons instead of below.
TreeModel::Path | get_path_at_pos (int x, int y) const
| Finds the path at the point ( x , y ), relative to widget coordinates.
int | get_pixbuf_column () const
| Returns the column with pixbufs for icon_view .
gint | get_row_spacing () const
ArrayHandle_TreePaths | get_selected_items () const
| Creates a list of paths of all selected items.
SelectionMode | get_selection_mode () const
| Gets the selection mode of the icon_view .
int | get_spacing () const
int | get_text_column () const
| Returns the column with text for icon_view .
const GtkIconView* | gobj () const
| Provides access to the underlying C GtkObject.
GtkIconView* | gobj ()
| Provides access to the underlying C GtkObject.
| IconView (const Glib::RefPtr<TreeModel>& model)
| IconView ()
void | item_activated (const TreeModel::Path& path)
| Activates the item determined by path .
bool | path_is_selected (const TreeModel::Path& path) const
| Returns `true` if the icon pointed to by path is currently selected.
Glib::PropertyProxy_ReadOnly< int > | property_column_spacing () const
| Space which is inserted between grid column.
Glib::PropertyProxy<int> | property_column_spacing ()
| Space which is inserted between grid column.
Glib::PropertyProxy_ReadOnly< int > | property_columns () const
| Number of columns to display.
Glib::PropertyProxy<int> | property_columns ()
| Number of columns to display.
Glib::PropertyProxy_ReadOnly< int > | property_item_width () const
| The width used for each item.
Glib::PropertyProxy<int> | property_item_width ()
| The width used for each item.
Glib::PropertyProxy_ReadOnly< int > | property_margin () const
| Space which is inserted at the edges of the icon view.
Glib::PropertyProxy<int> | property_margin ()
| Space which is inserted at the edges of the icon view.
Glib::PropertyProxy_ReadOnly< int > | property_markup_column () const
| Model column used to retrieve the text if using Pango markup.
Glib::PropertyProxy<int> | property_markup_column ()
| Model column used to retrieve the text if using Pango markup.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TreeModel >> | property_model () const
| The model for the icon view.
Glib::PropertyProxy< Glib::RefPtr< TreeModel > > | property_model ()
| The model for the icon view.
Glib::PropertyProxy_ReadOnly< Orientation > | property_orientation () const
| How the text and icon of each item are positioned relative to each other.
Glib::PropertyProxy<Orientation> | property_orientation ()
| How the text and icon of each item are positioned relative to each other.
Glib::PropertyProxy_ReadOnly< int > | property_pixbuf_column () const
| Model column used to retrieve the icon pixbuf from.
Glib::PropertyProxy<int> | property_pixbuf_column ()
| Model column used to retrieve the icon pixbuf from.
Glib::PropertyProxy_ReadOnly< int > | property_row_spacing () const
| Space which is inserted between grid rows.
Glib::PropertyProxy<int> | property_row_spacing ()
| Space which is inserted between grid rows.
Glib::PropertyProxy_ReadOnly< SelectionMode > | property_selection_mode () const
| The selection mode.
Glib::PropertyProxy<SelectionMode> | property_selection_mode ()
| The selection mode.
Glib::PropertyProxy_ReadOnly< int > | property_spacing () const
| Space which is inserted between cells of an item.
Glib::PropertyProxy<int> | property_spacing ()
| Space which is inserted between cells of an item.
Glib::PropertyProxy_ReadOnly< int > | property_text_column () const
| Model column used to retrieve the text from.
Glib::PropertyProxy<int> | property_text_column ()
| Model column used to retrieve the text from.
void | select_all ()
| Selects all the icons.
void | select_path (const TreeModel::Path& path)
| Selects the row at path .
void | selected_foreach (const SlotForeach& slot)
| Calls a function for each selected icon.
void | set_column_spacing (int column_spacing)
void | set_columns (int columns)
void | set_item_width (int item_width)
void | set_margin (int margin)
void | set_markup_column (const TreeModelColumnBase& column)
| Sets the column with markup information for icon_view to be column .
void | set_markup_column (int column)
| Sets the column with markup information for icon_view to be column .
void | set_model (const Glib::RefPtr<TreeModel>& model)
| Sets the model for a Gtk::IconView.
void | set_orientation (Orientation orientation)
| Sets the ::orientation property which determines whether the labels are drawn beside the icons instead of below.
void | set_pixbuf_column (const TreeModelColumnBase& column)
| Sets the column with pixbufs for icon_view to be column .
void | set_pixbuf_column (int column)
| Sets the column with pixbufs for icon_view to be column .
void | set_row_spacing (int row_spacing)
void | set_selection_mode (SelectionMode mode)
| Sets the selection mode of the icon_view .
void | set_spacing (int spacing)
void | set_text_column (const TreeModelColumnBase& model_column)
| Sets the column with text for icon_view to be column .
void | set_text_column (int column)
| Sets the column with text for icon_view to be column .
Glib::SignalProxy1< void, const TreeModel::Path& > | signal_item_activated ()
Glib::SignalProxy0<void> | signal_selection_changed ()
Glib::SignalProxy2< void, Adjustment*, Adjustment* > | signal_set_scroll_adjustments ()
void | unselect_all ()
| Unselects all the icons.
void | unselect_path (const TreeModel::Path& path)
| Unselects the row at path .
virtual | ~IconView ()
## Protected Member Functions
virtual void | on_item_activated (const TreeModel::Path& path)
virtual void | on_selection_changed ()
virtual void | on_set_scroll_adjustments (Adjustment* hadjustment, Adjustment* vadjustment)
## Related Functions
(Note that these are not member functions.)
Gtk::IconView* | wrap (GtkIconView* object, bool take_copy=false)

## Member Typedef Documentation

typedef Glib::ListHandle<TreePath, TreePathTraits> Gtk::IconView::ArrayHandle_TreePaths

typedef sigc::slot<void, const TreeModel::Path&> Gtk::IconView::SlotForeach

| For instance, void on_foreach(const Gtk::TreeModel::Path& path);.

## Constructor & Destructor Documentation

virtual Gtk::IconView::~IconView | ( |  | ) | `[virtual]`

Gtk::IconView::IconView | ( |  | ) |

Gtk::IconView::IconView | ( | const Glib::RefPtr<TreeModel>& | model | ) | `[explicit]`

## Member Function Documentation

int Gtk::IconView::get_column_spacing | ( |  | ) | const

int Gtk::IconView::get_columns | ( |  | ) | const

int Gtk::IconView::get_icon_width | ( |  | ) | const

int Gtk::IconView::get_margin | ( |  | ) | const

int Gtk::IconView::get_markup_column | ( |  | ) | const

| Returns the column with markup text for icon_view . Returns: The markup column, or -1 if it's unset. Since: 2.6.

Glib::RefPtr<const TreeModel> Gtk::IconView::get_model | ( |  | ) | const

| Returns the model the Gtk::IconView is based on. Returns `0` if the model is unset. Returns: A Gtk::TreeModel, or `0` if none is currently being used. Since: 2.6.

Glib::RefPtr<TreeModel> Gtk::IconView::get_model | ( |  | ) |

| Returns the model the Gtk::IconView is based on. Returns `0` if the model is unset. Returns: A Gtk::TreeModel, or `0` if none is currently being used. Since: 2.6.

Orientation Gtk::IconView::get_orientation | ( |  | ) | const

| Returns the value of the ::orientation property which determines whether the labels are drawn beside the icons instead of below. Returns: The relative position of texts and icons Since: 2.6.

TreeModel::Path Gtk::IconView::get_path_at_pos | ( | int | x,
|  | int | y
| ) | const

  | Finds the path at the point ( x , y ), relative to widget coordinates. Parameters:
  | x | The x position to be identified.
  | y | The y position to be identified.
Returns: The Gtk::TreePath corresponding to the icon or `0` if no icon exists at that position. Since: 2.6.

int Gtk::IconView::get_pixbuf_column | ( |  | ) | const

| Returns the column with pixbufs for icon_view . Returns: The pixbuf column, or -1 if it's unset. Since: 2.6.

gint Gtk::IconView::get_row_spacing | ( |  | ) | const

ArrayHandle_TreePaths Gtk::IconView::get_selected_items | ( |  | ) | const

| 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 Gtk::TreeRowReference<!-- -->s. To do this, you can use Gtk::Tree::row_reference_new(). To free the return value, use:
     g_list_foreach (list, gtk_tree_path_free, <tt>0</tt>);
     g_list_free (list);
Returns: A G::List containing a Gtk::TreePath for each selected row. Since: 2.6.

SelectionMode Gtk::IconView::get_selection_mode | ( |  | ) | const

| Gets the selection mode of the icon_view . Returns: The current selection mode Since: 2.6.

int Gtk::IconView::get_spacing | ( |  | ) | const

int Gtk::IconView::get_text_column | ( |  | ) | const

| Returns the column with text for icon_view . Returns: The text column, or -1 if it's unset. Since: 2.6.

const GtkIconView* Gtk::IconView::gobj | ( |  | ) | const`[inline]`

| Provides access to the underlying C GtkObject. Reimplemented from Gtk::Container.

GtkIconView* Gtk::IconView::gobj | ( |  | ) | `[inline]`

| Provides access to the underlying C GtkObject. Reimplemented from Gtk::Container.

void Gtk::IconView::item_activated | ( | const TreeModel::Path& | path | ) |

  | Activates the item determined by path . Since: 2.6 Parameters:
  | path | The Gtk::TreePath to be activated.

virtual void Gtk::IconView::on_item_activated | ( | const TreeModel::Path& | path | ) | `[protected, virtual]`

virtual void Gtk::IconView::on_selection_changed | ( |  | ) | `[protected, virtual]`

virtual void Gtk::IconView::on_set_scroll_adjustments | ( | Adjustment* | hadjustment,
|  | Adjustment* | vadjustment
| ) | `[protected, virtual]`

bool Gtk::IconView::path_is_selected | ( | const TreeModel::Path& | path | ) | const

  | Returns `true` if the icon pointed to by path is currently selected. If icon does not point to a valid location, `false` is returned. Parameters:
  | path | A Gtk::TreePath to check selection on.
Returns: `true` if path is selected. Since: 2.6.

Glib::PropertyProxy_ReadOnly<int> Gtk::IconView::property_column_spacing | ( |  | ) | const

| Space which is inserted between grid column. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<int> Gtk::IconView::property_column_spacing | ( |  | ) |

| Space which is inserted between grid column. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<int> Gtk::IconView::property_columns | ( |  | ) | const

| Number of columns to display. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<int> Gtk::IconView::property_columns | ( |  | ) |

| Number of columns to display. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<int> Gtk::IconView::property_item_width | ( |  | ) | const

| The width used for each item. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<int> Gtk::IconView::property_item_width | ( |  | ) |

| The width used for each item. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<int> Gtk::IconView::property_margin | ( |  | ) | const

| Space which is inserted at the edges of the icon view. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<int> Gtk::IconView::property_margin | ( |  | ) |

| Space which is inserted at the edges of the icon view. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<int> Gtk::IconView::property_markup_column | ( |  | ) | const

| Model column used to retrieve the text if using Pango markup. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<int> Gtk::IconView::property_markup_column | ( |  | ) |

| Model column used to retrieve the text if using Pango markup. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Glib::RefPtr<TreeModel>> Gtk::IconView::property_model | ( |  | ) | const

| The model for the icon view. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Glib::RefPtr<TreeModel>> Gtk::IconView::property_model | ( |  | ) |

| The model for the icon view. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Orientation> Gtk::IconView::property_orientation | ( |  | ) | const

| How the text and icon of each item are positioned relative to each other. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Orientation> Gtk::IconView::property_orientation | ( |  | ) |

| How the text and icon of each item are positioned relative to each other. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<int> Gtk::IconView::property_pixbuf_column | ( |  | ) | const

| Model column used to retrieve the icon pixbuf from. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<int> Gtk::IconView::property_pixbuf_column | ( |  | ) |

| Model column used to retrieve the icon pixbuf from. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<int> Gtk::IconView::property_row_spacing | ( |  | ) | const

| Space which is inserted between grid rows. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<int> Gtk::IconView::property_row_spacing | ( |  | ) |

| Space which is inserted between grid rows. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<SelectionMode> Gtk::IconView::property_selection_mode | ( |  | ) | const

| The selection mode. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<SelectionMode> Gtk::IconView::property_selection_mode | ( |  | ) |

| The selection mode. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<int> Gtk::IconView::property_spacing | ( |  | ) | const

| Space which is inserted between cells of an item. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<int> Gtk::IconView::property_spacing | ( |  | ) |

| Space which is inserted between cells of an item. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<int> Gtk::IconView::property_text_column | ( |  | ) | const

| Model column used to retrieve the text from. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<int> Gtk::IconView::property_text_column | ( |  | ) |

| Model column used to retrieve the text from. You rarely need to use properties because there are get_ and set_ methods for almost all of them. Returns: A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

void Gtk::IconView::select_all | ( |  | ) |

| Selects all the icons. icon_view must has its selection mode set to Gtk::SELECTION_MULTIPLE. Since: 2.6

void Gtk::IconView::select_path | ( | const TreeModel::Path& | path | ) |

  | Selects the row at path . Since: 2.6 Parameters:
  | path | The Gtk::TreePath to be selected.

void Gtk::IconView::selected_foreach | ( | const SlotForeach& | slot | ) |

  | Calls a function for each selected icon. Note that the model or selection cannot be modified from within this function. Parameters:
  | slot | The callback to call for each selected icon.

void Gtk::IconView::set_column_spacing | ( | int | column_spacing | ) |

void Gtk::IconView::set_columns | ( | int | columns | ) |

void Gtk::IconView::set_item_width | ( | int | item_width | ) |

void Gtk::IconView::set_margin | ( | int | margin | ) |

void Gtk::IconView::set_markup_column | ( | const TreeModelColumnBase& | column | ) |

  | 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 set_text_column(). Since: 2.6 Parameters:
  | column | A column in the currently used model.

void Gtk::IconView::set_markup_column | ( | int | column | ) |

  | 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 set_text_column(). Since: 2.6 Parameters:
  | column | A column in the currently used model.

void Gtk::IconView::set_model | ( | const Glib::RefPtr<TreeModel>& | model | ) |

  | Sets the model for a Gtk::IconView. If the icon_view already has a model set, it will remove it before setting the new model. If model is `0`, then it will unset the old model. Since: 2.6 Parameters:
  | model | The model.

void Gtk::IconView::set_orientation | ( | Orientation | orientation | ) |

  | Sets the ::orientation property which determines whether the labels are drawn beside the icons instead of below. Since: 2.6 Parameters:
  | orientation | The relative position of texts and icons.

void Gtk::IconView::set_pixbuf_column | ( | const TreeModelColumnBase& | column | ) |

  | Sets the column with pixbufs for icon_view to be column . The pixbuf column must be of type Gdk::TYPE_PIXBUF Since: 2.6 Parameters:
  | column | A column in the currently used model.

void Gtk::IconView::set_pixbuf_column | ( | int | column | ) |

  | Sets the column with pixbufs for icon_view to be column . The pixbuf column must be of type Gdk::TYPE_PIXBUF Since: 2.6 Parameters:
  | column | A column in the currently used model.

void Gtk::IconView::set_row_spacing | ( | int | row_spacing | ) |

void Gtk::IconView::set_selection_mode | ( | SelectionMode | mode | ) |

  | Sets the selection mode of the icon_view . Since: 2.6 Parameters:
  | mode | The selection mode.

void Gtk::IconView::set_spacing | ( | int | spacing | ) |

void Gtk::IconView::set_text_column | ( | const TreeModelColumnBase& | model_column | ) |

  | Sets the column with text for icon_view to be column . The text column must be of type G::TYPE_STRING. Since: 2.6 Parameters:
  | column | A column in the currently used model.

void Gtk::IconView::set_text_column | ( | int | column | ) |

  | Sets the column with text for icon_view to be column . The text column must be of type G::TYPE_STRING. Since: 2.6 Parameters:
  | column | A column in the currently used model.

Glib::SignalProxy1<void,const TreeModel::Path&> Gtk::IconView::signal_item_activated | ( |  | ) |

Glib::SignalProxy0<void> Gtk::IconView::signal_selection_changed | ( |  | ) |

Glib::SignalProxy2<void,Adjustment*,Adjustment*> Gtk::IconView::signal_set_scroll_adjustments | ( |  | ) |

void Gtk::IconView::unselect_all | ( |  | ) |

| Unselects all the icons. Since: 2.6

void Gtk::IconView::unselect_path | ( | const TreeModel::Path& | path | ) |

  | Unselects the row at path . Since: 2.6 Parameters:
  | path | The Gtk::TreePath to be unselected.

## Friends And Related Function Documentation

Gtk::IconView* wrap | ( | GtkIconView* | object,
|  | bool | take_copy = `false`
| ) | `[related]`

  | Parameters:
  | object | The C instance
  | take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns: A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- iconview.h