Top | ![]() |
![]() |
![]() |
![]() |
VisuUiSelection implements GtkTreeModel, GtkTreeDragSource, GtkTreeDragDest, GtkTreeSortable and GtkBuildable.
This is a specialised GtkListStore to handle list of
nodes. It is storing the node ids and their highlight status. Their
highlight status is driven by a VisuGlExtMarks model, see
visu_ui_selection_setHighlightModel()
. If a VisuData model is
provided by visu_ui_selection_setNodeModel()
, then on population
changes, the non existing nodes are removed from the selection list.
VisuUiSelection * visu_ui_selection_new ();
Create a new GtkListStore to store planes.
Since: 3.8
gboolean visu_ui_selection_setNodeModel (VisuUiSelection *selection
,VisuData *data
);
Bind the set
object to list
.
gboolean visu_ui_selection_setHighlightModel (VisuUiSelection *selection
,VisuGlExtMarks *marks
);
Bind the set
object to list
.
gboolean visu_ui_selection_add (VisuUiSelection *selection
,guint id
);
Add the node identified by id
to selection
. If the node already
exists or if selection
has no current node model, nothing is
done. If there are several nodes to insert at once, use
visu_ui_selection_append()
instead to ensure that the selection
signalis only emitted once.
Since: 3.8
void visu_ui_selection_append (VisuUiSelection *selection
,const GArray *ids
);
Inserts every node from ids
into selection
. The selection signal
is only emitted once.
Since: 3.8
void
visu_ui_selection_appendHighlightedNodes
(VisuUiSelection *selection
);
A convenient method to get the highlighted nodes and add them to
the selection
.
Since: 3.8
void visu_ui_selection_highlight (VisuUiSelection *selection
,GtkTreeIter *iter
,VisuGlExtMarksStatus status
);
Apply the new status
to nodes. If iter
is NULL
, all nodes stored
in selection
are modified, otherwise, only the node at iter
.
selection |
a VisuUiSelection object. |
|
iter |
a GtkTreeIter structure. |
[allow-none] |
status |
a mark status. |
Since: 3.8
void visu_ui_selection_remove (VisuUiSelection *selection
,const GArray *ids
);
Remove a list of nodes from selection
.
Since: 3.8
void visu_ui_selection_removePaths (VisuUiSelection *selection
,const GList *paths
);
Remove all given paths from selection
.
selection |
a VisuUiSelection object. |
|
paths |
a list of GtkTreePath. |
[element-type GtkTreePath] |
Since: 3.8
void
visu_ui_selection_clear (VisuUiSelection *selection
);
An overloaded method of gtk_list_store_clear()
to ensure that the
selection signal is properly emitted.
Since: 3.8
gboolean visu_ui_selection_removeAt (VisuUiSelection *selection
,GtkTreeIter *iter
);
Remove the node stored at iter from selection
. This is an
overloaded function of gtk_list_store_remove()
to emit the selection
signal after change.
Since: 3.8
gboolean visu_ui_selection_at (VisuUiSelection *selection
,GtkTreeIter *iter
,guint id
);
Inquires if the model selection
is storing node id
at iter
.
Since: 3.8
GArray *
visu_ui_selection_get (const VisuUiSelection *selection
);
Retrieves the list of node ids in the selection.
Since: 3.8
void visu_ui_selection_set (VisuUiSelection *selection
,const GArray *ids
);
Clear the selection
and update it with the nodes from ids
.
Since: 3.8
struct VisuUiSelectionClass { GtkListStoreClass parent; };
Common name to refer to a _VisuUiSelectionClass.
“highlight”
property“highlight” gboolean
highlight the selection.
Flags: Read / Write
Default value: FALSE