![]() |
![]() |
![]() |
Epiphany Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
EphyNodeViewEphyNodeView — A GtkTreeView displaying a collection of EphyNode elements. |
EphyNodeView; enum EphyNodeViewPriority; enum EphyNodeViewFlags; GtkWidget * ephy_node_view_new (EphyNode *root
,EphyNodeFilter *filter
); void ephy_node_view_add_toggle (EphyNodeView *view
,EphyTreeModelNodeValueFunc value_func
,gpointer data
); int ephy_node_view_add_column (EphyNodeView *view
,const char *title
,GType value_type
,guint prop_id
,EphyNodeViewFlags flags
,EphyTreeModelNodeValueFunc icon_func
,GtkTreeViewColumn **ret
); int ephy_node_view_add_data_column (EphyNodeView *view
,GType value_type
,guint prop_id
,EphyTreeModelNodeValueFunc func
,gpointer data
); void ephy_node_view_set_sort (EphyNodeView *view
,GType value_type
,guint prop_id
,GtkSortType sort_type
); void ephy_node_view_set_priority (EphyNodeView *view
,EphyNodeViewPriority priority_prop_id
); void ephy_node_view_remove (EphyNodeView *view
); GList * ephy_node_view_get_selection (EphyNodeView *view
); void ephy_node_view_select_node (EphyNodeView *view
,EphyNode *node
); void ephy_node_view_enable_drag_source (EphyNodeView *view
,const GtkTargetEntry *types
,int n_types
,int base_drag_column_id
,int extra_drag_column_id
); void ephy_node_view_enable_drag_dest (EphyNodeView *view
,const GtkTargetEntry *types
,int n_types
); void ephy_node_view_edit (EphyNodeView *view
,gboolean remove_if_cancelled
); gboolean ephy_node_view_is_target (EphyNodeView *view
); void ephy_node_view_popup (EphyNodeView *view
,GtkWidget *menu
);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkTreeView +----EphyNodeView
"node-activated" : Run Last "node-dropped" : Run Last "node-middle-clicked" : Run Last "node-selected" : Run Last "node-toggled" : Run Last
EphyNodeView implements a GtkTreeView displaying a given set of EphyNode elements. It implements drag and dropping.
typedef enum { EPHY_NODE_VIEW_ALL_PRIORITY, EPHY_NODE_VIEW_SPECIAL_PRIORITY, EPHY_NODE_VIEW_NORMAL_PRIORITY } EphyNodeViewPriority;
typedef enum { EPHY_NODE_VIEW_SHOW_PRIORITY = 1 << 0, EPHY_NODE_VIEW_SORTABLE = 1 << 1, EPHY_NODE_VIEW_EDITABLE = 1 << 2, EPHY_NODE_VIEW_SEARCHABLE = 1 << 3, EPHY_NODE_VIEW_ELLIPSIZED = 1 << 4 } EphyNodeViewFlags;
GtkWidget * ephy_node_view_new (EphyNode *root
,EphyNodeFilter *filter
);
Creates a new EphyNodeView using filter
as the model and root
as the root
node.
|
the root EphyNode for the view |
|
a filter model for the view |
Returns : |
a new EphyNodeView as a GtkWidget |
void ephy_node_view_add_toggle (EphyNodeView *view
,EphyTreeModelNodeValueFunc value_func
,gpointer data
);
Append a new toggle column to view
with its value set by value_func
which can
receive the optional data
parameter.
|
an EphyNodeView widget |
|
an EphyTreeModelNodeValueFunc function to set column values |
|
user_data to be passed to value_func
|
int ephy_node_view_add_column (EphyNodeView *view
,const char *title
,GType value_type
,guint prop_id
,EphyNodeViewFlags flags
,EphyTreeModelNodeValueFunc icon_func
,GtkTreeViewColumn **ret
);
Adds a new column, corresponding to a prop_id
of the model, to the view
.
|
an EphyNodeView |
|
title for the column |
|
type to be held by the column |
|
numeric id corresponding to the column in the model to be shown |
|
flags for the new column |
|
a function providing the icon for the column |
|
location to store the created column |
Returns : |
the id of the new column |
int ephy_node_view_add_data_column (EphyNodeView *view
,GType value_type
,guint prop_id
,EphyTreeModelNodeValueFunc func
,gpointer data
);
Adds a new column to view
, taking its value from a column in the model defined
by prop_id
, or from func
.
|
an EphyNodeView |
|
type to be held by the column |
|
property corresponding to the model behind view
|
|
a data function for the column or NULL
|
|
optional data for func
|
Returns : |
the id of the new column |
void ephy_node_view_set_sort (EphyNodeView *view
,GType value_type
,guint prop_id
,GtkSortType sort_type
);
Adds a sort column to the view
corresponding to prop_id
in the model.
|
an EphyNodeView |
|
type of the value held at prop_id by the model
|
|
column id in the model |
|
the sort mode |
void ephy_node_view_set_priority (EphyNodeView *view
,EphyNodeViewPriority priority_prop_id
);
Adds a priority column to the view
with priority_prop_id
as the value.
|
an EphyNodeView |
|
one of EphyNodeViewPriority |
void ephy_node_view_remove (EphyNodeView *view
);
Remove the currently selected nodes from view
.
|
an EphyNodeView |
GList * ephy_node_view_get_selection (EphyNodeView *view
);
Returns the selected elements of view
as a GList of EphyNode elements.
|
an EphyNodeView |
Returns : |
a GList of EphyNode elements |
void ephy_node_view_select_node (EphyNodeView *view
,EphyNode *node
);
Puts the selection of view
on node
.
|
an EphyNodeView |
|
the EphyNode in the view to be selected
|
void ephy_node_view_enable_drag_source (EphyNodeView *view
,const GtkTargetEntry *types
,int n_types
,int base_drag_column_id
,int extra_drag_column_id
);
Sets view
as a drag source.
|
an EphyNodeView |
|
a GtkTargetEntry for the view
|
|
length of types
|
|
id of the column for ephy_tree_model_sort_set_base_drag_column_id |
|
id of the column for ephy_tree_model_sort_set_extra_drag_column_id |
void ephy_node_view_enable_drag_dest (EphyNodeView *view
,const GtkTargetEntry *types
,int n_types
);
Set the types of drag destination allowed by view
.
|
the EphyNodeView |
|
types allowed as GtkTargetEntry |
|
count of types
|
void ephy_node_view_edit (EphyNodeView *view
,gboolean remove_if_cancelled
);
Edits the currently selected node in view
, the remove_if_cancelled
parameter
controls if the node should be removed if editing is cancelled.
|
an EphyNodeView |
|
whether the edited node should be removed if editing is cancelled |
gboolean ephy_node_view_is_target (EphyNodeView *view
);
Tells if view
is currently focused.
|
an EphyNodeView |
Returns : |
TRUE if view is focused
|
void ephy_node_view_popup (EphyNodeView *view
,GtkWidget *menu
);
Triggers the popup of menu
in view
.
|
an EphyNodeView widget |
|
a GtkMenu to be shown |
"filter"
property "filter" EphyNodeFilter* : Read / Write
An EphyNodeFilter object to use in the view.
"node-activated"
signalvoid user_function (EphyNodeView *view, gpointer node, gpointer user_data) : Run Last
Emitted when a row is activated.
|
the object on which the signal is emitted |
|
the activated EphyNode |
|
user data set when the signal handler was connected. |
"node-dropped"
signalvoid user_function (EphyNodeView *view, gpointer node, gpointer uris, gpointer user_data) : Run Last
Emitted when an EphyNode is dropped into the EphyNodeView.
|
the object on which the signal is emitted |
|
the dropped EphyNode |
|
URIs from the dragged data |
|
user data set when the signal handler was connected. |
"node-middle-clicked"
signalvoid user_function (EphyNodeView *view, gpointer node, gpointer user_data) : Run Last
Emitted when the user middle clicks on a row of the EphyNodeView.
|
the object on which the signal is emitted |
|
the clicked EphyNode |
|
user data set when the signal handler was connected. |
"node-selected"
signalvoid user_function (EphyNodeView *view, gpointer node, gpointer user_data) : Run Last
Emitted when a row is selected.
|
the object on which the signal is emitted |
|
the selected EphyNode |
|
user data set when the signal handler was connected. |
"node-toggled"
signalvoid user_function (EphyNodeView *view, gpointer node, gboolean checked, gpointer user_data) : Run Last
Emitted when a row value is toggled, only emitted for toggle columns.
|
the object on which the signal is emitted |
|
the target EphyNode |
|
the new value of the toggle column |
|
user data set when the signal handler was connected. |