![]() |
![]() |
![]() |
Rhythmbox Development Reference Manual | ![]() |
---|---|---|---|---|
rb-property-viewrb-property-view — a GtkTreeView backed by a RhythmDBPropertyModel |
RBPropertyView; RBPropertyViewClass; RBPropertyView* rb_property_view_new (RhythmDB *db, guint propid, const char *title); void rb_property_view_append_column_custom (RBPropertyView *view, GtkTreeViewColumn *column); void rb_property_view_set_selection_mode (RBPropertyView *view, GtkSelectionMode mode); void rb_property_view_reset (RBPropertyView *view); void rb_property_view_set_selection (RBPropertyView *view, const GList *vals); GList* rb_property_view_get_selection (RBPropertyView *view); RhythmDBPropertyModel* rb_property_view_get_model (RBPropertyView *view); void rb_property_view_set_model (RBPropertyView *view, RhythmDBPropertyModel *model); guint rb_property_view_get_num_properties (RBPropertyView *view); void rb_property_view_set_search_func (RBPropertyView *view, GtkTreeViewSearchEqualFunc func, gpointer func_data, GtkDestroyNotify notify);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkScrolledWindow +----RBPropertyView
"db" RhythmDB* : Read / Write / Construct Only "draggable" gboolean : Read / Write / Construct Only "prop" RhythmDBPropType : Read / Write / Construct Only "property-model" RhythmDBPropertyModel* : Read / Write "title" gchar* : Read / Write / Construct Only
"properties-selected" : Run Last "property-activated" : Run Last "property-selected" : Run Last "property-selection-reset" : Run Last "show-popup" : Run Last
A simple GtkTreeView that displays the contents of a RhythmDBPropertyModel. The first row in the tree view displays the total number of properties and entries, in the form "All 473 artists (6241)". Each subsequent row in the tree view displays a property value and the number of entries from the RhythmDBQueryModel with that value.
The property view itself creates a single column, but additional columns can be added.
typedef struct { GtkScrolledWindowClass parent; void (*property_selected) (RBPropertyView *view, const char *name); void (*properties_selected) (RBPropertyView *view, GList *properties); void (*property_activated) (RBPropertyView *view, const char *name); void (*selection_reset) (RBPropertyView *view); void (*show_popup) (RBPropertyView *view); } RBPropertyViewClass;
RBPropertyView* rb_property_view_new (RhythmDB *db, guint propid, const char *title);
Creates a new RBPropertyView displaying the specified property.
|
RhythmDB instance |
|
property ID to be displayed in the property view |
|
title of the property view |
Returns : |
new property view instance |
void rb_property_view_append_column_custom (RBPropertyView *view, GtkTreeViewColumn *column);
Appends a custom created column to the view.
|
a RBPropertyView |
|
a GtkTreeViewColumn to append to the view |
void rb_property_view_set_selection_mode (RBPropertyView *view, GtkSelectionMode mode);
Sets the selection mode (single or multiple) for the property view> The default selection mode is single.
|
a RBPropertyView |
|
the new GtkSelectionMode for the property view |
void rb_property_view_reset (RBPropertyView *view);
Clears the selection in the property view.
|
a RBPropertyView |
void rb_property_view_set_selection (RBPropertyView *view, const GList *vals);
Replaces the selection in the property view. All values in the list that are present in the view will be selected, and the view will be scrolled to show the last value selected.
|
a RBPropertyView |
|
the values to be selected |
GList* rb_property_view_get_selection (RBPropertyView *view);
|
a RBPropertyView |
Returns : |
a GList containing the selected property values. The list must be freed by the caller. |
RhythmDBPropertyModel* rb_property_view_get_model (RBPropertyView *view);
|
a RBPropertyView |
Returns : |
the RhythmDBPropertyModel backing the view; no reference is taken |
void rb_property_view_set_model (RBPropertyView *view, RhythmDBPropertyModel *model);
Replaces the model backing the property view.
|
a RBPropertyView |
|
the new RhythmDBPropertyModel for the property view |
guint rb_property_view_get_num_properties (RBPropertyView *view);
|
a RBPropertyView |
Returns : |
the number of property values present in the view |
void rb_property_view_set_search_func (RBPropertyView *view, GtkTreeViewSearchEqualFunc func, gpointer func_data, GtkDestroyNotify notify);
Sets the compare function for the interactive search capabilities. The function must return FALSE when the search key string matches the row it is passed.
|
a RBPropertyView |
|
tree view search function to use for this view |
|
data to pass to the search function |
|
function to call to dispose of the data |
"draggable"
property"draggable" gboolean : Read / Write / Construct Only
Whether the property view acts as a data source for drag and drop operations.
Default value: TRUE
"prop"
property"prop" RhythmDBPropType : Read / Write / Construct Only
The property that is displayed in this view
Default value: RHYTHMDB_PROP_TYPE
"property-model"
property"property-model" RhythmDBPropertyModel* : Read / Write
The RhythmDBProperyModel backing the view.
"title"
property"title" gchar* : Read / Write / Construct Only
The title displayed in the header of the property view
Default value: ""
"properties-selected"
signalvoid user_function (RBPropertyView *view, gpointer properties, gpointer user_data) : Run Last
Emitted when the set of selected property values changes.
|
the RBPropertyView |
|
a list containing the selected property values |
|
user data set when the signal handler was connected. |
"property-activated"
signalvoid user_function (RBPropertyView *view, gchar *name, gpointer user_data) : Run Last
Emitted when a row in a property view is activated by double clicking.
|
the RBPropertyView |
|
the property value that was activated |
|
user data set when the signal handler was connected. |
"property-selected"
signalvoid user_function (RBPropertyView *view, gchar *name, gpointer user_data) : Run Last
Emitted when an individual property value becomes selected.
|
the RBPropertyView |
|
the property value that has been selected |
|
user data set when the signal handler was connected. |
"property-selection-reset"
signalvoid user_function (RBPropertyView *view, gpointer user_data) : Run Last
Emitted when the selection is reset. At this point, no property values are selected.
|
the RBPropertyView |
|
user data set when the signal handler was connected. |
"show-popup"
signalvoid user_function (RBPropertyView *view, gpointer user_data) : Run Last
Emitted when a popup menu should be displayed for the property view. The source containing the property view should connect a handler to this signal that * displays an appropriate popup.
|
the RBPropertyView |
|
user data set when the signal handler was connected. |