Top | ![]() |
![]() |
![]() |
![]() |
GtkWidget * | dh_sidebar_new () |
DhSidebar * | dh_sidebar_new2 () |
DhProfile * | dh_sidebar_get_profile () |
DhLink * | dh_sidebar_get_selected_link () |
void | dh_sidebar_select_uri () |
void | dh_sidebar_set_search_string () |
void | dh_sidebar_set_search_focus () |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkGrid ╰── 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.
DhSidebar emits the “link-selected” signal. When that happens, the Devhelp application opens the DhLink in a WebKitWebView shown at the right side of the main window.
GtkWidget *
dh_sidebar_new (DhBookManager *book_manager
);
dh_sidebar_new
has been deprecated since version 3.30 and should not be used in newly-written code.
Use dh_sidebar_new2()
instead.
book_manager |
a DhBookManager. This parameter is deprecated,
you should just pass |
[nullable] |
DhLink *
dh_sidebar_get_selected_link (DhSidebar *sidebar
);
Note: the return value of this function is not necessarily the same as the last DhLink emitted by the “link-selected” signal. See the documentation of “link-selected”.
the currently selected DhLink in the
visible GtkTreeView of sidebar
, or NULL
if the selection is empty or if a
language group row is selected. Unref with dh_link_unref()
when no longer
needed.
[transfer full][nullable]
Since: 3.30
void dh_sidebar_select_uri (DhSidebar *sidebar
,const gchar *uri
);
Calls dh_book_tree_select_uri()
.
void dh_sidebar_set_search_string (DhSidebar *sidebar
,const gchar *str
);
“profile”
property“profile” DhProfile *
The DhProfile. If set to NULL
, the default profile as returned by
dh_profile_get_default()
is used.
Flags: Read / Write / Construct Only
Since: 3.30
“link-selected”
signalvoid user_function (DhSidebar *sidebar, DhLink *link, gpointer user_data)
The ::link-selected signal is emitted when:
One row in one of the GtkTreeView's is selected and contains a DhLink (i.e. when the row is not a language group);
Or if there is an exact match returned by
dh_keyword_model_filter()
when a search occurs.
Note that dh_sidebar_get_selected_link()
takes into account only the
former, not the latter. So the last link
emitted with this signal is
not necessarily the same as the current return value of
dh_sidebar_get_selected_link()
.
Flags: Run Last