| Top |
| void | activate-suggestion | Action |
| void | hide-suggestions | Action |
| void | move-suggestion | Action |
| void | show-suggestions | Action |
| void | suggestion-activated | 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
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);
gpointer _reserved1;
gpointer _reserved2;
gpointer _reserved3;
gpointer _reserved4;
gpointer _reserved5;
gpointer _reserved6;
gpointer _reserved7;
gpointer _reserved8;
};
“typed-text” property“typed-text” gchar *
Typed text into the entry, does not include suggested text.
Flags: Read
Default value: NULL
“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, gint 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