Top | ![]() |
![]() |
![]() |
![]() |
void | (*DzlSuggestionPositionFunc) () |
GtkWidget * | dzl_suggestion_entry_new () |
void | dzl_suggestion_entry_set_model () |
GListModel * | dzl_suggestion_entry_get_model () |
const gchar * | dzl_suggestion_entry_get_typed_text () |
DzlSuggestion * | dzl_suggestion_entry_get_suggestion () |
void | dzl_suggestion_entry_set_suggestion () |
void | dzl_suggestion_entry_set_position_func () |
gboolean | dzl_suggestion_entry_get_activate_on_single_click () |
void | dzl_suggestion_entry_set_activate_on_single_click () |
void | dzl_suggestion_entry_hide_suggestions () |
GtkWidget * | dzl_suggestion_entry_get_popover () |
gboolean | dzl_suggestion_entry_get_compact () |
void | dzl_suggestion_entry_set_compact () |
void | dzl_suggestion_entry_default_position_func () |
void | dzl_suggestion_entry_window_position_func () |
gboolean | activate-on-single-click | Read / Write |
gboolean | compact | Read / Write |
GListModel * | model | Read / Write |
DzlSuggestion * | suggestion | Read / Write |
char * | typed-text | Read |
void | action | Action |
void | activate-suggestion | Action |
void | hide-suggestions | Action |
void | move-suggestion | Action |
void | show-suggestions | Action |
void | suggestion-activated | Run Last |
void | suggestion-selected | Run Last |
#define | DZL_TYPE_SUGGESTION_ENTRY |
struct | DzlSuggestionEntryClass |
DzlSuggestionEntry |
DzlSuggestionEntry implements AtkImplementorIface, GtkBuildable, GtkEditable and GtkCellEditable.
void (*DzlSuggestionPositionFunc) (DzlSuggestionEntry *entry
,GdkRectangle *area
,gboolean *is_absolute
,gpointer user_data
);
Positions the popover in the coordinates defined by area
.
If is_absolute
is set to TRUE
, then absolute coordinates are used.
Otherwise, the position is expected to be relative to entry
.
entry |
||
area |
location to place the popover. |
[inout] |
is_absolute |
If the area is in absolute coordinates. |
[inout] |
user_data |
closure data |
Since: 3.26
void dzl_suggestion_entry_set_model (DzlSuggestionEntry *self
,GListModel *model
);
GListModel *
dzl_suggestion_entry_get_model (DzlSuggestionEntry *self
);
Gets the model being visualized.
const gchar *
dzl_suggestion_entry_get_typed_text (DzlSuggestionEntry *self
);
DzlSuggestion *
dzl_suggestion_entry_get_suggestion (DzlSuggestionEntry *self
);
Gets the currently selected suggestion.
void dzl_suggestion_entry_set_suggestion (DzlSuggestionEntry *self
,DzlSuggestion *suggestion
);
void dzl_suggestion_entry_set_position_func (DzlSuggestionEntry *self
,DzlSuggestionPositionFunc func
,gpointer func_data
,GDestroyNotify func_data_destroy
);
Sets a position func to position the popover.
In func
, you should set the height of the rectangle to the maximum height
that the popover should be allowed to grow.
self |
||
func |
A function to call to position the popover, or |
[scope async][closure func_data][destroy func_data_destroy][nullable] |
func_data |
closure data for |
[nullable] |
func_data_destroy |
a destroy notify for |
[nullable] |
Since: 3.26
gboolean
dzl_suggestion_entry_get_activate_on_single_click
(DzlSuggestionEntry *self
);
void dzl_suggestion_entry_set_activate_on_single_click (DzlSuggestionEntry *self
,gboolean activate_on_single_click
);
void
dzl_suggestion_entry_hide_suggestions (DzlSuggestionEntry *self
);
GtkWidget *
dzl_suggestion_entry_get_popover (DzlSuggestionEntry *self
);
Gets the result display widget for the entry. This is currently always a DzlSuggestionPopover.
Since: 3.32
gboolean
dzl_suggestion_entry_get_compact (DzlSuggestionEntry *self
);
Gets the “compact” property.
Since: 3.34
void dzl_suggestion_entry_set_compact (DzlSuggestionEntry *self
,gboolean compact
);
Sets the “compact” property.
Since: 3.34
void dzl_suggestion_entry_default_position_func (DzlSuggestionEntry *self
,GdkRectangle *area
,gboolean *is_absolute
,gpointer user_data
);
void dzl_suggestion_entry_window_position_func (DzlSuggestionEntry *self
,GdkRectangle *area
,gboolean *is_absolute
,gpointer user_data
);
This is a DzlSuggestionPositionFunc that can be used to make the suggestion popover the full width of the window. It is similar to what you might find in a web browser.
struct DzlSuggestionEntryClass { GtkEntryClass parent_class; void (*hide_suggestions) (DzlSuggestionEntry *self); void (*show_suggestions) (DzlSuggestionEntry *self); void (*move_suggestion ) (DzlSuggestionEntry *self, gint amount); void (*suggestion_activated) (DzlSuggestionEntry *self, DzlSuggestion *suggestion); void (*suggestion_selected) (DzlSuggestionEntry *self, DzlSuggestion *suggestion); };
“activate-on-single-click”
property “activate-on-single-click” gboolean
The "activate-on-single-click" property denotes if results should be
activated simply by clicking on them. You may want to set this to
FALSE
if you want the behavior to only select the item.
Owner: DzlSuggestionEntry
Flags: Read / Write
Default value: FALSE
Since: 3.30
“compact”
property “compact” gboolean
The "compact" property denotes if an alternate style should be used to reduce the width of the rows. This may be ideal in size contrained situations with portrait display.
Owner: DzlSuggestionEntry
Flags: Read / Write
Default value: FALSE
Since: 3.34
“model”
property “model” GListModel *
The model to be visualized.
Owner: DzlSuggestionEntry
Flags: Read / Write
“suggestion”
property“suggestion” DzlSuggestion *
The "suggestion" property is the currently selected suggestion, if any.
Owner: DzlSuggestionEntry
Flags: Read / Write
Since: 3.30
“action”
signalvoid user_function (DzlSuggestionEntry *dzlsuggestionentry, char *arg1, char *arg2, char *arg3, gpointer user_data)
Flags: Action
“activate-suggestion”
signalvoid user_function (DzlSuggestionEntry *dzlsuggestionentry, gpointer user_data)
Flags: Action
“hide-suggestions”
signalvoid user_function (DzlSuggestionEntry *dzlsuggestionentry, gpointer user_data)
Flags: Action
“move-suggestion”
signalvoid user_function (DzlSuggestionEntry *self, int amount, gpointer user_data)
This moves the selected suggestion in the popover by the value provided. -1 moves up one row, 1, moves down a row.
self |
||
amount |
The number of items to move |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“show-suggestions”
signalvoid user_function (DzlSuggestionEntry *dzlsuggestionentry, gpointer user_data)
Flags: Action
“suggestion-activated”
signalvoid user_function (DzlSuggestionEntry *dzlsuggestionentry, DzlSuggestion *arg1, gpointer user_data)
Flags: Run Last
“suggestion-selected”
signalvoid user_function (DzlSuggestionEntry *self, DzlSuggestion *suggestion, gpointer user_data)
This signal is emitted when a selection has been specifically selected by the user, such as by clicking on the row or moving to the row with keyboard, such as with “move-suggestion”
Flags: Run Last
Since: 3.30