Top | ![]() |
![]() |
![]() |
![]() |
GtkWidget * | dh_sidebar_new () |
DhLink * | dh_sidebar_get_selected_book () |
void | dh_sidebar_select_uri () |
void | dh_sidebar_set_search_string () |
void | dh_sidebar_set_search_focus () |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkBox ╰── DhSidebar
In the Devhelp application, there is one DhSidebar per main window, displayed in the left side panel.
A DhSidebar contains:
a GtkSearchEntry at the top;
a DhBookTree (a subclass of GtkTreeView);
another GtkTreeView (displaying a list, not a tree) with a DhKeywordModel as its model.
When the GtkSearchEntry is empty, the DhBookTree is shown. When the GtkSearchEntry is not empty, it shows the search results in the other GtkTreeView. The two GtkTreeView's cannot be both visible at the same time, it's either one or the other.
The “link-selected” signal is emitted when one element in one of the GtkTreeView's is selected. When that happens, the Devhelp application opens the link in a WebKitWebView shown at the right side of the main window.
GtkWidget *
dh_sidebar_new (DhBookManager *book_manager
);
book_manager |
a DhBookManager. This parameter is deprecated,
you should just pass |
[nullable] |
DhLink *
dh_sidebar_get_selected_book (DhSidebar *sidebar
);
the DhLink of the selected book, or
NULL
if there is no selection. Unref with dh_link_unref()
when no longer
needed.
[nullable][transfer full]
void dh_sidebar_set_search_string (DhSidebar *sidebar
,const gchar *str
);