![]() |
![]() |
It displays the model as a grid of icons with labels. Like the TreeView, it allows the user to select one or multiple items (depending on the selection mode - see set_selection_mode()). In addition to selection with the arrow keys, the IconView supports rubberband selection, by dragging the pointer.
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 | |
Glib::RefPtr<Gdk::Pixmap> | create_drag_icon (const TreeModel::Path& path) |
Creates a Gdk::Pixmap representation of the item at path . | |
void | enable_model_drag_dest (const ArrayHandle_TargetEntry& targets, Gdk::DragAction actions=Gdk::ACTION_COPY|Gdk::ACTION_MOVE) |
Turns the IconView into a drop destination for automatic DND. | |
void | enable_model_drag_source (const ArrayHandle_TargetEntry& targets, Gdk::ModifierType start_button_mask=Gdk::MODIFIER_MASK, Gdk::DragAction actions=Gdk::ACTION_COPY|Gdk::ACTION_MOVE) |
Turns the IconView into a drag source for automatic DND. | |
int | get_column_spacing () const |
Returns the value of the column-spacing property. | |
int | get_columns () const |
Returns the value of the columns property. | |
bool | get_cursor (CellRenderer*& cell) const |
Fills in path and cell with the current cursor path and cell. | |
bool | get_cursor (TreeModel::Path& path) const |
Fills in path and cell with the current cursor path and cell. | |
bool | get_cursor (TreeModel::Path& path, CellRenderer*& cell) const |
Fills in path and cell with the current cursor path and cell. | |
bool | get_dest_item_at_pos (int drag_x, int drag_y, IconViewDropPosition& pos) const |
Determines the destination item for a given position. | |
bool | get_dest_item_at_pos (int drag_x, int drag_y, TreeModel::Path& path) const |
Determines the destination item for a given position. | |
bool | get_dest_item_at_pos (int drag_x, int drag_y, TreeModel::Path& path, IconViewDropPosition& pos) const |
Determines the destination item for a given position. | |
void | get_drag_dest_item (IconViewDropPosition& pos) const |
Gets information about the item that is highlighted for feedback. | |
void | get_drag_dest_item (TreeModel::Path& path) const |
Gets information about the item that is highlighted for feedback. | |
void | get_drag_dest_item (TreeModel::Path& path, IconViewDropPosition& pos) const |
Gets information about the item that is highlighted for feedback. | |
int | get_icon_width () const |
Returns the value of the item-width property. | |
bool | get_item_at_pos (int x, int y, CellRenderer*& cell) const |
Finds the path at the point (x, y), relative to widget coordinates. | |
bool | get_item_at_pos (int x, int y, TreeModel::Path& path) const |
Finds the path at the point (x, y), relative to widget coordinates. | |
bool | get_item_at_pos (int x, int y, TreeModel::Path& path, CellRenderer*& cell) const |
Finds the path at the point (x, y), relative to widget coordinates. | |
int | get_margin () const |
Returns the value of the margin property. | |
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 . | |
bool | get_reorderable () const |
Retrieves whether the user can reorder the list via drag-and-drop. | |
gint | get_row_spacing () const |
Returns the value of the row-spacing property. | |
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 |
Returns the value of the spacing property. | |
int | get_text_column () const |
Returns the column with text for icon_view . | |
bool | get_visible_range (TreeModel::Path& start_path, TreeModel::Path& end_path) const |
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 columns. | |
Glib::PropertyProxy<int> | property_column_spacing () |
Space which is inserted between grid columns. | |
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 | scroll_to_path (const TreeModel::Path& path, bool use_align, gfloat row_align, gfloat col_align) |
Moves the alignments of icon_view to the position specified by path . | |
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) |
Sets the column-spacing property which specifies the space which is inserted between the columns of the icon view. | |
void | set_columns (int columns) |
Sets the columns property which determines in how many columns the icons are arranged. | |
void | set_cursor (const TreeModel::Path& path, CellRenderer& cell, bool start_editing) |
void | set_drag_dest_item (const TreeModel::Path& path, IconViewDropPosition pos) |
Sets the item that is highlighted for feedback. | |
void | set_item_width (int item_width) |
Sets the item-width property which specifies the width to use for each item. | |
void | set_margin (int margin) |
Sets the margin property which specifies the space which is inserted at the top, bottom, left and right of the icon view. | |
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_reorderable (bool reorderable=true) |
This function is a convenience function to allow you to reorder models that support the Gtk::TreeDragSourceIface and the Gtk::TreeDragDestIface. | |
void | set_row_spacing (int row_spacing) |
Sets the row-spacing property which specifies the space which is inserted between the rows of the icon view. | |
void | set_selection_mode (SelectionMode mode) |
Sets the selection mode of the icon_view . | |
void | set_spacing (int spacing) |
Sets the spacing property which specifies the space which is inserted between the cells (i.e. the icon and the text) of an item. | |
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 . | |
void | unset_model_drag_dest () |
Undoes the effect of enable_model_drag_dest(). | |
void | unset_model_drag_source () |
Undoes the effect of enable_model_drag_source(). | |
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) |
|
|
|
For instance, void on_foreach(const Gtk::TreeModel::Path& path);.
|
|
|
|
|
|
|
|
Creates a Gdk::Pixmap representation of the item at path . This image is used for a drag icon.
|
|
Turns the IconView into a drop destination for automatic DND.
|
|
Turns the IconView into a drag source for automatic DND.
|
|
Returns the value of the column-spacing property.
|
|
Returns the value of the columns property.
|
|
Fills in path and cell with the current cursor path and cell. If the cursor isn't currently set, then path will be empty. If no cell currently has focus, then cell will be NULL.
|
|
Fills in path and cell with the current cursor path and cell. If the cursor isn't currently set, then path will be empty. If no cell currently has focus, then cell will be NULL.
|
|
Fills in path and cell with the current cursor path and cell. If the cursor isn't currently set, then path will be empty. If no cell currently has focus, then cell will be NULL.
|
|
Determines the destination item for a given position.
|
|
Determines the destination item for a given position.
|
|
Determines the destination item for a given position.
|
|
Gets information about the item that is highlighted for feedback. The drop position.
|
|
Gets information about the item that is highlighted for feedback.
|
|
Gets information about the item that is highlighted for feedback.
|
|
Returns the value of the item-width property.
|
|
Finds the path at the point (x, y), relative to widget coordinates.
|
|
Finds the path at the point (x, y), relative to widget coordinates.
|
|
Finds the path at the point (x, y), relative to widget coordinates.
|
|
Returns the value of the margin property.
|
|
Returns the column with markup text for icon_view .
|
|
Returns the model the Gtk::IconView is based on.
Returns
|
|
Returns the model the Gtk::IconView is based on.
Returns
|
|
Returns the value of the orientation property which determines whether the labels are drawn beside the icons instead of below.
|
|
Finds the path at the point ( x , y ), relative to widget coordinates. See get_item_at_pos(), if you are also interested in the cell at the specified position.
|
|
Returns the column with pixbufs for icon_view .
|
|
Retrieves whether the user can reorder the list via drag-and-drop. See set_reorderable().
|
|
Returns the value of the row-spacing property.
|
|
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);
|
|
Gets the selection mode of the icon_view .
|
|
Returns the value of the spacing property.
|
|
Returns the column with text for icon_view .
|
|
|
|
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::Container. |
|
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::Container. |
|
Activates the item determined by path .
|
|
|
|
|
|
|
|
Returns
If icon does not point to a valid location,
|
|
Space which is inserted between grid columns. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
Space which is inserted between grid columns. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
Number of columns to display. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
Number of columns to display. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
The width used for each item. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
The width used for each item. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
The model for the icon view. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
The model for the icon view. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
The selection mode. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
The selection mode. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
If use_align is 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.
|
|
Selects all the icons. icon_view must has its selection mode set to Gtk::SELECTION_MULTIPLE.
|
|
Selects the row at path .
|
|
Calls a function for each selected icon. Note that the model or selection cannot be modified from within this function.
|
|
Sets the column-spacing property which specifies the space which is inserted between the columns of the icon view.
|
|
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.
|
|
|
|
Sets the item that is highlighted for feedback.
|
|
Sets the item-width property which specifies the width to use for each item. If it is set to -1, the icon view will automatically determine a suitable item size.
|
|
Sets the margin property which specifies the space which is inserted at the top, bottom, left and right of the icon view.
|
|
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().
|
|
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().
|
|
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
|
|
Sets the orientation property which determines whether the labels are drawn beside the icons instead of below.
|
|
Sets the column with pixbufs for icon_view to be column . The pixbuf column must be of type Gdk::TYPE_PIXBUF
|
|
Sets the column with pixbufs for icon_view to be column . The pixbuf column must be of type Gdk::TYPE_PIXBUF
|
|
This function is a convenience function to allow you to reorder models that support the Gtk::TreeDragSourceIface and the Gtk::TreeDragDestIface.
Both Gtk::TreeStore and Gtk::ListStore support these. If reorderable is This function does not give you any degree of control over the order -- any reordering is allowed. If more control is needed, you should probably handle drag and drop manually.
|
|
Sets the row-spacing property which specifies the space which is inserted between the rows of the icon view.
|
|
Sets the selection mode of the icon_view .
|
|
Sets the spacing property which specifies the space which is inserted between the cells (i.e. the icon and the text) of an item.
|
|
Sets the column with text for icon_view to be column . The text column must be of type G::TYPE_STRING.
|
|
Sets the column with text for icon_view to be column . The text column must be of type G::TYPE_STRING.
|
|
|
|
|
|
|
|
Unselects all the icons.
|
|
Unselects the row at path .
|
|
Undoes the effect of enable_model_drag_dest().
|
|
Undoes the effect of enable_model_drag_source().
|
|
|