| GNOME Dictionary Library Reference Manual | ||||
|---|---|---|---|---|
GdictStrategyChooser;
GdictStrategyChooserClass;
GtkWidget * gdict_strategy_chooser_new (void);
GtkWidget * gdict_strategy_chooser_new_with_context
(GdictContext *context);
GdictContext * gdict_strategy_chooser_get_context (GdictStrategyChooser *chooser);
void gdict_strategy_chooser_set_context (GdictStrategyChooser *chooser,
GdictContext *context);
gchar ** gdict_strategy_chooser_get_strategies
(GdictStrategyChooser *chooser,
gsize *length);
gboolean gdict_strategy_chooser_has_strategy (GdictStrategyChooser *chooser,
const gchar *strategy);
GtkWidget * gdict_strategy_chooser_add_button (GdictStrategyChooser *chooser,
const gchar *button_text);
void gdict_strategy_chooser_clear (GdictStrategyChooser *chooser);
gint gdict_strategy_chooser_count_strategies
(GdictStrategyChooser *chooser);
gchar * gdict_strategy_chooser_get_current_strategy
(GdictStrategyChooser *chooser);
void gdict_strategy_chooser_refresh (GdictStrategyChooser *chooser);
gboolean gdict_strategy_chooser_select_strategy
(GdictStrategyChooser *chooser,
const gchar *strat_name);
gboolean gdict_strategy_chooser_set_current_strategy
(GdictStrategyChooser *chooser,
const gchar *strat_name);
gboolean gdict_strategy_chooser_unselect_strategy
(GdictStrategyChooser *chooser,
const gchar *strat_name);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkVBox +----GdictStrategyChooser
Each
typedef struct {
GtkVBoxClass parent_class;
void (*strategy_activated) (GdictStrategyChooser *chooser,
const gchar *name,
const gchar *description);
void (*_gdict_padding1) (void);
void (*_gdict_padding2) (void);
void (*_gdict_padding3) (void);
void (*_gdict_padding4) (void);
void (*_gdict_padding5) (void);
void (*_gdict_padding6) (void);
} GdictStrategyChooserClass;
GtkWidget * gdict_strategy_chooser_new (void);
Creates a new GdictStrategyChooser. Use this widget to show a list
of matching strategies available on a dictionary source represented
by a gdict_strategy_chooser_set_context().
| Returns : | the newly created GdictStrategyChooser widget |
Since 0.9
GtkWidget * gdict_strategy_chooser_new_with_context (GdictContext *context);
Creates a new GdictStrategyChooser widget, using context as the
representation of a dictionary source.
context : |
a |
| Returns : | the newly created GdictStrategyChooser widget |
Since 0.9
GdictContext * gdict_strategy_chooser_get_context (GdictStrategyChooser *chooser);
Retrieves the chooser.
chooser : |
a GdictStrategyChooser |
| Returns : | a |
Since
void gdict_strategy_chooser_set_context (GdictStrategyChooser *chooser,GdictContext *context);
Sets the chooser to retrieve the
list of matching strategies.
chooser : |
a GdictStrategyChooser |
context : |
a NULL |
Since 0.9
gchar ** gdict_strategy_chooser_get_strategies (GdictStrategyChooser *chooser,gsize *length);
Retrieves the list of matching strategies available.
chooser : |
a GdictStrategyChooser |
length : |
return location for the length of the returned string list |
| Returns : | a string vector containing the names of the matching
strategies. Use g_strfreev() |
Since 0.9
gboolean gdict_strategy_chooser_has_strategy (GdictStrategyChooser *chooser, constgchar *strategy);
Checks whether strategy is available in the list of matching
strategies displayed by chooser.
chooser : |
a GdictStrategyChooser |
strategy : |
a strategy name |
| Returns : | TRUEFALSE |
Since 0.9
GtkWidget * gdict_strategy_chooser_add_button (GdictStrategyChooser *chooser, constgchar *button_text);
Creates a new button and packs it into the GdictStrategyChooser "action area".
chooser : |
a GdictStrategyChooser |
button_text : |
text of the button (can be a stock id) |
| Returns : | the packed |
Since 0.10
void gdict_strategy_chooser_clear (GdictStrategyChooser *chooser);
Clears chooser.
chooser : |
a GdictStrategyChooser |
Since 0.10
gint gdict_strategy_chooser_count_strategies (GdictStrategyChooser *chooser);
Returns the number of strategies found.
chooser : |
a GdictStrategyChooser |
| Returns : | the number of strategies or -1 if case of error |
Since
gchar * gdict_strategy_chooser_get_current_strategy (GdictStrategyChooser *chooser);
Retrieves the current matching strategy.
chooser : |
a GdictStrategyChooser |
| Returns : | a newly allocated string containing the name of the current matching strategy |
Since 0.10
void gdict_strategy_chooser_refresh (GdictStrategyChooser *chooser);
Reloads the list of available strategies.
chooser : |
a GdictStrategyChooser |
Since 0.10
gboolean gdict_strategy_chooser_select_strategy (GdictStrategyChooser *chooser, constgchar *strat_name);
Selects strat_name, if available.
chooser : |
a GdictStrategyChooser |
strat_name : |
the name of the strategy to select |
| Returns : | TRUE |
Since 0.10
gboolean gdict_strategy_chooser_set_current_strategy (GdictStrategyChooser *chooser, constgchar *strat_name);
Sets strat_name as the current matching strategy.
chooser : |
a GdictStrategyChooser |
strat_name : |
the name of the matching strategy |
| Returns : | TRUE |
Since 0.10
gboolean gdict_strategy_chooser_unselect_strategy (GdictStrategyChooser *chooser, constgchar *strat_name);
Unselects strat_name from the list.
chooser : |
a GdictStrategyChooser |
strat_name : |
the name of the strategy to unselect |
| Returns : | TRUE |
Since 0.10
"strategy-activated" signalvoid user_function (GdictStrategyChooser *chooser,gchar *name,gchar *description,gpointer user_data) : Run Last
The ::strategy-activated signal is emitted each time the user
activates a strategy in the chooser, either by double click or
using the keyboard.
chooser : |
the widget that received the signal |
name : |
the name of the activated strategy |
description : |
the description of the activate strategy |
user_data : |
user data set when the signal handler was connected. |