Top | ![]() |
![]() |
![]() |
![]() |
GtkWidget * | gdict_database_chooser_new () |
GtkWidget * | gdict_database_chooser_new_with_context () |
GdictContext * | gdict_database_chooser_get_context () |
void | gdict_database_chooser_set_context () |
gboolean | gdict_database_chooser_select_database () |
gboolean | gdict_database_chooser_unselect_database () |
gboolean | gdict_database_chooser_set_current_database () |
gchar * | gdict_database_chooser_get_current_database () |
gchar ** | gdict_database_chooser_get_databases () |
gint | gdict_database_chooser_count_databases () |
gboolean | gdict_database_chooser_has_database () |
void | gdict_database_chooser_refresh () |
void | gdict_database_chooser_clear () |
GtkWidget * | gdict_database_chooser_add_button () |
GObject ╰── GInitiallyUnowned ╰── GtkObject ╰── GtkWidget ╰── GtkContainer ╰── GtkBox ╰── GtkVBox ╰── GdictDatabaseChooser
Each GdictContext has a list of databases, that is dictionaries that can be queried. GdictDatabaseChooser is a widget that queries a given GdictContext and displays the list of available databases.
GdictDatabaseChooser is available since Gdict 0.10
GtkWidget *
gdict_database_chooser_new (void
);
Creates a new GdictDatabaseChooser widget. A Database chooser widget
can be used to display the list of available databases on a dictionary
source using the GdictContext representing it. After creation, the
GdictContext can be set using gdict_database_chooser_set_context()
.
Since 0.10
GtkWidget *
gdict_database_chooser_new_with_context
(GdictContext *context
);
Creates a new GdictDatabaseChooser, using context
as the representation
of the dictionary source to query for the list of available databases.
Since 0.10
GdictContext *
gdict_database_chooser_get_context (GdictDatabaseChooser *chooser
);
Retrieves the GdictContext used by chooser
.
Since 0.10
void gdict_database_chooser_set_context (GdictDatabaseChooser *chooser
,GdictContext *context
);
Sets the GdictContext to be used to query a dictionary source for the list of available databases.
Since 0.10
gboolean gdict_database_chooser_select_database (GdictDatabaseChooser *chooser
,const gchar *db_name
);
Selects the database with db_name
inside the chooser
widget.
Since 0.10
gboolean gdict_database_chooser_unselect_database (GdictDatabaseChooser *chooser
,const gchar *db_name
);
Unselects the database db_name
inside the chooser
widget
Since 0.10
gboolean gdict_database_chooser_set_current_database (GdictDatabaseChooser *chooser
,const gchar *db_name
);
Sets db_name
as the current database. This function will select
and activate the corresponding row, if the database is found.
Since 0.10
gchar *
gdict_database_chooser_get_current_database
(GdictDatabaseChooser *chooser
);
Retrieves the name of the currently selected database inside chooser
Since 0.10
gchar ** gdict_database_chooser_get_databases (GdictDatabaseChooser *chooser
,gsize *length
);
Gets the list of available database names.
a newly allocated, NULL
terminated string vector
containing database names. Use g_strfreev()
to deallocate it.
Since 0.10
gint
gdict_database_chooser_count_databases
(GdictDatabaseChooser *chooser
);
Returns the number of databases found.
Since 0.10
gboolean gdict_database_chooser_has_database (GdictDatabaseChooser *chooser
,const gchar *database
);
Checks whether the chooser
displays database
Since 0.10
void
gdict_database_chooser_refresh (GdictDatabaseChooser *chooser
);
Reloads the list of available databases.
Since 0.10
void
gdict_database_chooser_clear (GdictDatabaseChooser *chooser
);
Clears chooser
.
Since 0.10
GtkWidget * gdict_database_chooser_add_button (GdictDatabaseChooser *chooser
,const gchar *button_text
);
Adds a GtkButton with button_text
to the button area on
the bottom of chooser
. The button_text
can also be a
stock ID.
Since 0.10
“context”
property“context” GdictContext *
The GdictContext object used to get the list of databases.
Flags: Read / Write / Construct
Since 0.10
“database-activated”
signalvoid user_function (GdictDatabaseChooser *chooser, gchar *name, gchar *description, gpointer user_data)
Flags: Run Last
Since 0.10
“selection-changed”
signalvoid user_function (GdictDatabaseChooser *chooser, gpointer user_data)
Flags: Run Last
Since 0.12