Top |
Functions
GtkWidget * | gdict_strategy_chooser_new () |
GtkWidget * | gdict_strategy_chooser_new_with_context () |
GdictContext * | gdict_strategy_chooser_get_context () |
void | gdict_strategy_chooser_set_context () |
gchar ** | gdict_strategy_chooser_get_strategies () |
gboolean | gdict_strategy_chooser_has_strategy () |
GtkWidget * | gdict_strategy_chooser_add_button () |
void | gdict_strategy_chooser_clear () |
gint | gdict_strategy_chooser_count_strategies () |
gchar * | gdict_strategy_chooser_get_current_strategy () |
void | gdict_strategy_chooser_refresh () |
gboolean | gdict_strategy_chooser_select_strategy () |
gboolean | gdict_strategy_chooser_set_current_strategy () |
gboolean | gdict_strategy_chooser_unselect_strategy () |
Object Hierarchy
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkBox ╰── GdictStrategyChooser
Implemented Interfaces
GdictStrategyChooser implements AtkImplementorIface, GtkBuildable and GtkOrientable.
Description
Each GdictContext allows matching a word using a specific "matching strategy". The GdictStrategyChooser widget queries a GdictContext and displays the list of available matching strategies.
Functions
gdict_strategy_chooser_new ()
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 GdictContext, set with gdict_strategy_chooser_set_context()
.
Since: 0.9
gdict_strategy_chooser_new_with_context ()
GtkWidget *
gdict_strategy_chooser_new_with_context
(GdictContext *context
);
Creates a new GdictStrategyChooser widget, using context
as the
representation of a dictionary source.
Since: 0.9
gdict_strategy_chooser_get_context ()
GdictContext *
gdict_strategy_chooser_get_context (GdictStrategyChooser *chooser
);
Retrieves the GdictContext used by chooser
.
Since:
gdict_strategy_chooser_set_context ()
void gdict_strategy_chooser_set_context (GdictStrategyChooser *chooser
,GdictContext *context
);
Sets the GdictContext to be used by chooser
to retrieve the
list of matching strategies.
Since: 0.9
gdict_strategy_chooser_get_strategies ()
gchar ** gdict_strategy_chooser_get_strategies (GdictStrategyChooser *chooser
,gsize *length
);
Retrieves the list of matching strategies available.
Returns
a string vector containing the names
of the matching strategies. Use g_strfreev()
to deallocate the memory
when done.
[transfer full]
Since: 0.9
gdict_strategy_chooser_has_strategy ()
gboolean gdict_strategy_chooser_has_strategy (GdictStrategyChooser *chooser
,const gchar *strategy
);
Checks whether strategy
is available in the list of matching
strategies displayed by chooser
.
Since: 0.9
gdict_strategy_chooser_add_button ()
GtkWidget * gdict_strategy_chooser_add_button (GdictStrategyChooser *chooser
,const gchar *button_text
);
Creates a new button and packs it into the GdictStrategyChooser "action area".
Since: 0.10
gdict_strategy_chooser_clear ()
void
gdict_strategy_chooser_clear (GdictStrategyChooser *chooser
);
Clears chooser
.
Since: 0.10
gdict_strategy_chooser_count_strategies ()
gint
gdict_strategy_chooser_count_strategies
(GdictStrategyChooser *chooser
);
Returns the number of strategies found.
Since:
gdict_strategy_chooser_get_current_strategy ()
gchar *
gdict_strategy_chooser_get_current_strategy
(GdictStrategyChooser *chooser
);
Retrieves the current matching strategy.
Since: 0.10
gdict_strategy_chooser_refresh ()
void
gdict_strategy_chooser_refresh (GdictStrategyChooser *chooser
);
Reloads the list of available strategies.
Since: 0.10
gdict_strategy_chooser_select_strategy ()
gboolean gdict_strategy_chooser_select_strategy (GdictStrategyChooser *chooser
,const gchar *strat_name
);
Selects strat_name
, if available.
Since: 0.10
gdict_strategy_chooser_set_current_strategy ()
gboolean gdict_strategy_chooser_set_current_strategy (GdictStrategyChooser *chooser
,const gchar *strat_name
);
Sets strat_name
as the current matching strategy.
Since: 0.10
gdict_strategy_chooser_unselect_strategy ()
gboolean gdict_strategy_chooser_unselect_strategy (GdictStrategyChooser *chooser
,const gchar *strat_name
);
Unselects strat_name
from the list.
Since: 0.10
Types and Values
struct GdictStrategyChooserClass
struct GdictStrategyChooserClass { GtkBoxClass 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); };
Property Details
The “context”
property
“context” GdictContext *
The GdictContext object used to retrieve the list of strategies.
Flags: Read / Write / Construct
Signal Details
The “strategy-activated”
signal
void user_function (GdictStrategyChooser *chooser, gchar *name, gchar *description, gpointer user_data)
The ::strategy-activated signal is emitted each time the user
activates a strategy in the chooser
, either by double click or
using the keyboard.
Parameters
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. |
Flags: Run Last