![]() |
![]() |
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 | |||
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 | |||
bool | get_cursor (TreeModel::Path& path) const | |||
bool | get_cursor (TreeModel::Path& path, CellRenderer*& cell) const | |||
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 | |||
bool | get_item_at_pos (int x, int y, TreeModel::Path& path) const | |||
bool | get_item_at_pos (int x, int y, TreeModel::Path& path, CellRenderer*& cell) const | |||
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 . | ||||
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. | ||||
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_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_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 . | ||||
virtual | ~IconView () | |||
Related Functions | ||||
(Note that these are not member functions.) | ||||
Gtk::IconView* | wrap (GtkIconView* object, bool take_copy=false) | |||
|
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);.
virtual Gtk::IconView::~IconView | ( | ) | [virtual] |
Gtk::IconView::IconView | ( | ) |
Gtk::IconView::IconView | ( | const Glib::RefPtr<TreeModel>& | model | ) | [explicit] |
int Gtk::IconView::get_column_spacing | ( | ) | const |
Returns the value of the column-spacing property.
int Gtk::IconView::get_columns | ( | ) | const |
bool Gtk::IconView::get_cursor | ( | CellRenderer*& | cell | ) | const |
bool Gtk::IconView::get_cursor | ( | TreeModel::Path& | path | ) | const |
bool Gtk::IconView::get_cursor | ( | TreeModel::Path& | path, | |
CellRenderer*& | cell | |||
) | const |
int Gtk::IconView::get_icon_width | ( | ) | const |
Returns the value of the item-width property.
bool Gtk::IconView::get_item_at_pos | ( | int | x, | |
int | y, | |||
CellRenderer*& | cell | |||
) | const |
bool Gtk::IconView::get_item_at_pos | ( | int | x, | |
int | y, | |||
TreeModel::Path& | path | |||
) | const |
bool Gtk::IconView::get_item_at_pos | ( | int | x, | |
int | y, | |||
TreeModel::Path& | path, | |||
CellRenderer*& | cell | |||
) | const |
int Gtk::IconView::get_margin | ( | ) | const |
int Gtk::IconView::get_markup_column | ( | ) | const |
Returns the column with markup text for icon_view .
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.
0
if none is currently being used.Glib::RefPtr<TreeModel> Gtk::IconView::get_model | ( | ) |
Returns the model the Gtk::IconView is based on.
Returns 0
if the model is unset.
0
if none is currently being used.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.
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.
See get_item_at_pos(), if you are also interested in the cell at the specified position.
x | The x position to be identified. | |
y | The y position to be identified. |
0
if no icon exists at that position.int Gtk::IconView::get_pixbuf_column | ( | ) | const |
Returns the column with pixbufs for icon_view .
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);
SelectionMode Gtk::IconView::get_selection_mode | ( | ) | const |
int Gtk::IconView::get_spacing | ( | ) | const |
int Gtk::IconView::get_text_column | ( | ) | const |
Returns the column with text for icon_view .
bool Gtk::IconView::get_visible_range | ( | TreeModel::Path& | start_path, | |
TreeModel::Path& | end_path | |||
) | const |
const GtkIconView* Gtk::IconView::gobj | ( | ) | const [inline] |
GtkIconView* Gtk::IconView::gobj | ( | ) | [inline] |
void Gtk::IconView::item_activated | ( | const TreeModel::Path& | path | ) |
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.
path | A Gtk::TreePath to check selection on. |
true
if path is selected.void Gtk::IconView::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 .
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 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.
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.
path | The path of the item to move to. | |
use_align | Whether to use alignment arguments, or false . | |
row_align | The vertical alignment of the item specified by path . | |
col_align | The horizontal alignment of the item specified by path . |
void Gtk::IconView::select_all | ( | ) |
void Gtk::IconView::select_path | ( | const TreeModel::Path& | path | ) |
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.
slot | The callback to call for each selected icon. |
void Gtk::IconView::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.
column_spacing | The column spacing. |
void Gtk::IconView::set_columns | ( | int | columns | ) |
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.
columns | The number of columns. |
void Gtk::IconView::set_cursor | ( | const TreeModel::Path& | path, | |
CellRenderer& | cell, | |||
bool | start_editing | |||
) |
void Gtk::IconView::set_item_width | ( | int | item_width | ) |
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.
item_width | The width for each item. |
void Gtk::IconView::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.
margin | The 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().
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().
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.
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.
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
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
column | A column in the currently used model. |
void Gtk::IconView::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.
row_spacing | The row spacing. |
void Gtk::IconView::set_selection_mode | ( | SelectionMode | mode | ) |
void Gtk::IconView::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.
spacing | The 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.
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.
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 | ( | ) |
void selection_changed()
Glib::SignalProxy2<void,Adjustment*,Adjustment*> Gtk::IconView::signal_set_scroll_adjustments | ( | ) |
void set_scroll_adjustments(Adjustment* hadjustment, Adjustment* vadjustment)
void Gtk::IconView::unselect_all | ( | ) |
void Gtk::IconView::unselect_path | ( | const TreeModel::Path& | path | ) |
Gtk::IconView* wrap | ( | GtkIconView * | object, | |
bool | take_copy = false | |||
) | [related] |
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. |