GnuiTaggedEntry

GnuiTaggedEntry — A tagged entry

Stability Level

Unstable, unless otherwise indicated

Functions

gboolean (*GnuiTaggedEntryFilterFunc) ()
gboolean (*GnuiTaggedEntryMatchFunc) ()
gchar * (*GnuiTaggedEntrySanitizeFunc) ()
gint (*GnuiTaggedEntrySortFunc) ()
GtkWidget * gnui_tagged_entry_new ()
gboolean gnui_tagged_entry_has_tag ()
gboolean gnui_tagged_entry_remove_tag ()
void gnui_tagged_entry_remove_all_tags ()
gboolean gnui_tagged_entry_populate ()
gboolean gnui_tagged_entry_populate_strv ()
gboolean gnui_tagged_entry_add_tag ()
gboolean gnui_tagged_entry_add_tags ()
gsize gnui_tagged_entry_parse_expression ()
gboolean gnui_tagged_entry_rename_tag ()
gboolean gnui_tagged_entry_set_pin ()
gboolean gnui_tagged_entry_set_pins ()
void gnui_tagged_entry_activate ()
const gchar * gnui_tagged_entry_get_delimiter_chars ()
void gnui_tagged_entry_set_delimiter_chars ()
gpointer gnui_tagged_entry_get_filter_data ()
void gnui_tagged_entry_set_filter_data ()
GnuiTaggedEntryFilterFunc gnui_tagged_entry_get_filter_function ()
void gnui_tagged_entry_set_filter_function ()
gboolean gnui_tagged_entry_get_invalid ()
void gnui_tagged_entry_set_invalid ()
gpointer gnui_tagged_entry_get_match_data ()
void gnui_tagged_entry_set_match_data ()
GnuiTaggedEntryMatchFunc gnui_tagged_entry_get_match_function ()
void gnui_tagged_entry_set_match_function ()
gboolean gnui_tagged_entry_get_modified ()
void gnui_tagged_entry_set_modified ()
const char * gnui_tagged_entry_get_placeholder_text ()
void gnui_tagged_entry_set_placeholder_text ()
gpointer gnui_tagged_entry_get_sanitize_data ()
void gnui_tagged_entry_set_sanitize_data ()
GnuiTaggedEntrySanitizeFunc gnui_tagged_entry_get_sanitize_function ()
void gnui_tagged_entry_set_sanitize_function ()
gpointer gnui_tagged_entry_get_sort_data ()
void gnui_tagged_entry_set_sort_data ()
GnuiTaggedEntrySortFunc gnui_tagged_entry_get_sort_function ()
void gnui_tagged_entry_set_sort_function ()
const gchar * const * gnui_tagged_entry_get_tags ()
void gnui_tagged_entry_set_tags ()
void gnui_tagged_entry_invalidate_filter ()
void gnui_tagged_entry_invalidate_sort ()
GtkText * gnui_tagged_entry_get_text_delegate ()
void (*GnuiTaggedEntrySignalHandlerTagAdded) ()
void (*GnuiTaggedEntrySignalHandlerTagRemoved) ()
void (*GnuiTaggedEntrySignalHandlerActivate) ()
void (*GnuiTaggedEntrySignalHandlerInvalidChanged) ()
void (*GnuiTaggedEntrySignalHandlerModifiedChanged) ()

Properties

char * delimiter-chars Read / Write
gpointer filter-data Read / Write
gpointer filter-function Read / Write
gboolean invalid Read / Write
gpointer match-data Read / Write
gpointer match-function Read / Write
gboolean modified Read / Write
char * placeholder-text Read / Write
gpointer sanitize-data Read / Write
gpointer sanitize-function Read / Write
gpointer sort-data Read / Write
gpointer sort-function Read / Write
GStrv tags Read / Write

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GnuiTaggedEntry

Implemented Interfaces

GnuiTaggedEntry implements GtkAccessible, GtkBuildable, GtkConstraintTarget and GtkEditable.

Includes

#include <gnuisance/gnui-tagged-entry.h>

Description

GnuiTaggedEntry is a text entry widget that lets the user provide an array of strings (namely tags).

Functions

GnuiTaggedEntryFilterFunc ()

gboolean
(*GnuiTaggedEntryFilterFunc) (GnuiTaggedEntry *self,
                              const gchar *tag,
                              gpointer user_data);

A function type for determining whether a tag can be added

It is granted that the strings passed to the filter function are always non-NULL and with a length greater than zero, therefore the filter function must not check for NULL or "".

Parameters

self

The tagged entry.

[auto][not nullable]

tag

The tag to check.

[auto][not nullable][non-zero length][transfer none]

user_data

The “filter-data” property.

[auto][nullable][closure]

Returns

true if the tag must be added, false if it must be filtered out


GnuiTaggedEntryMatchFunc ()

gboolean
(*GnuiTaggedEntryMatchFunc) (const gchar *entry_tag,
                             const gchar *other_tag,
                             gpointer user_data);

A function type for determining whether two tags match

The first argument passed to the match function is always a tag already in the entry, while the second argument is what is being checked for equality.

It is granted that the strings passed to the match function are always non-NULL and with a length greater than zero, therefore the match function must not check for NULL or "".

Parameters

entry_tag

A tag from the tagged entry.

[auto][not nullable][non-zero length][transfer none]

other_tag

A string to compare with entry_tag .

[auto][not nullable][non-zero length][transfer none]

user_data

The “match-data” property.

[auto][nullable][closure]

Returns

true if the two strings match, false otherwise


GnuiTaggedEntrySanitizeFunc ()

gchar *
(*GnuiTaggedEntrySanitizeFunc) (GnuiTaggedEntry *self,
                                const gchar *tag,
                                gpointer user_data);

A function type for allocating the strings that are added to the tagged entry as tags based on the given input

It is granted that the strings passed to the sanitize function are always non-NULL and with a length greater than zero, therefore the sanitize function must not check for NULL or "".

If tag must not be inserted this function must return NULL.

Parameters

self

The tagged entry.

[auto][not nullable]

tag

The tag to sanitize.

[auto][not nullable][non-zero length][transfer none]

user_data

The “sanitize-data” property.

[auto][nullable][closure]

Returns

A newly allocated string.

[transfer full][nullable]


GnuiTaggedEntrySortFunc ()

gint
(*GnuiTaggedEntrySortFunc) (const gchar *tag_1,
                            const gchar *tag_2,
                            gpointer user_data);

A function type for sorting the tags added to the tagged entry

It is granted that the strings passed to the sort function are always non-NULL and with a length greater than zero, therefore the sort function must not check for NULL or "".

Parameters

tag_1

The first tag.

[auto][not nullable][non-zero length][transfer none]

tag_2

The second tag.

[auto][not nullable][non-zero length][transfer none]

user_data

The “sort-data” property.

[auto][nullable][closure]

Returns

Zero or a negative number if the order is tag_1 followed by tag_2 , a positive number otherwise


gnui_tagged_entry_new ()

GtkWidget *
gnui_tagged_entry_new (void);

Create a new tagged entry widget

Returns

The newly created tagged entry widget


gnui_tagged_entry_has_tag ()

gboolean
gnui_tagged_entry_has_tag (GnuiTaggedEntry * const self,
                           const gchar * const tag);

Get whether a tagged entry has a particular tag

A tagged entry must always have a match function; if the “match-function” property is set to NULL literal equality checks between strings will be performed in order to find the given tag.

Parameters

self

The tagged entry to query.

[not nullable]

tag

A string matching a tag to find.

[nullable]

Returns

true if the tagged entry has the given tag, false otherwise


gnui_tagged_entry_remove_tag ()

gboolean
gnui_tagged_entry_remove_tag (GnuiTaggedEntry * const self,
                              const gchar * const tag);

Remove a particular tag from a tagged entry

A tagged entry must always have a match function; if the “match-function” property is set to NULL literal equality checks between strings will be performed in order to find the tag to remove.

Parameters

self

The tagged entry to modify.

[not nullable]

tag

A string matching a tag to remove from the tagged entry.

[not nullable]

Returns

true if the tagged entry had the tag, false otherwise


gnui_tagged_entry_remove_all_tags ()

void
gnui_tagged_entry_remove_all_tags (GnuiTaggedEntry * const self);

Remove all the tags from a tagged entry

Parameters

self

The tagged entry to clear.

[not nullable]

gnui_tagged_entry_populate ()

gboolean
gnui_tagged_entry_populate (GnuiTaggedEntry * const self,
                            const gboolean pinned,
                            ...);

Clear and populate a tagged entry

Parameters

self

The tagged entry to populate.

[not nullable]

pinned

Whether the tags added must be pinned

 

...

Zero or more strings to insert into the tagged entry as tags, followed by NULL (if no strings are provided the tagged entry will only be cleared)

 

Returns

true if all the tags were successfully added, false otherwise


gnui_tagged_entry_populate_strv ()

gboolean
gnui_tagged_entry_populate_strv (GnuiTaggedEntry * const self,
                                 const gchar * const * const tags,
                                 const gboolean pinned);

Clear and populate a tagged entry, using an array of strings as input

Parameters

self

The tagged entry to populate.

[not nullable]

tags

An array containing zero or more strings to insert into the tagged entry as tags, followed by NULL (if no strings are provided, or if the array is NULL, the tagged entry will only be cleared).

[transfer none][nullable]

pinned

Whether the tags added must be pinned

 

Returns

true if all the tags were successfully added, false otherwise


gnui_tagged_entry_add_tag ()

gboolean
gnui_tagged_entry_add_tag (GnuiTaggedEntry * const self,
                           const gchar * const tag,
                           const gboolean pinned);

Add a a tag to a tagged entry

Parameters

self

The tagged entry to populate.

[not nullable]

tag

A string to insert into the tagged entry as tag.

[not nullable]

pinned

Whether the tag added must be pinned

 

Returns

true if the tag was successfully added, false otherwise


gnui_tagged_entry_add_tags ()

gboolean
gnui_tagged_entry_add_tags (GnuiTaggedEntry * const self,
                            const gboolean pinned,
                            ...);

Add a group of tags to a tagged entry

Parameters

self

The tagged entry to populate.

[not nullable]

pinned

Whether the tags inserted must be pinned

 

...

Zero or more strings to insert into the tagged entry as tags, followed by NULL (if no strings are provided the function is no-op)

 

Returns

true if all the tags were successfully added, false otherwise


gnui_tagged_entry_parse_expression ()

gsize
gnui_tagged_entry_parse_expression (GnuiTaggedEntry * const self,
                                    const gchar * const expression,
                                    const gboolean pinned);

Parse a delimited string and add its tags to a tagged entry

Parameters

self

The tagged entry to populate.

[not nullable]

expression

A delimited string containing one or more tags to add to the tagged entry [].

[not nullable]

pinned

Whether the tags inserted must be pinned

 

Returns

true if all the tags were successfully added, false otherwise


gnui_tagged_entry_rename_tag ()

gboolean
gnui_tagged_entry_rename_tag (GnuiTaggedEntry * const self,
                              const gchar * const old_name,
                              const gchar * const new_name);

Rename a particular tag in a tagged entry

A tagged entry must always have a match function; if the “match-function” property is set to NULL, in order to find the tag to rename literal equality checks between strings will be performed.

Parameters

self

The tagged entry to modify.

[not nullable]

old_name

A string matching a tag to rename in the tagged entry.

[not nullable]

new_name

The new value for the tag.

[not nullable]

Returns

true if the tagged entry had the tag, false otherwise


gnui_tagged_entry_set_pin ()

gboolean
gnui_tagged_entry_set_pin (GnuiTaggedEntry * const self,
                           const gchar * const tag,
                           const gboolean pinned);

Pin/unpin a given tag

A tagged entry must always have a match function; if the “match-function” property is set to NULL, in order to find the tag to pin/unpin literal equality checks between strings will be performed.

Parameters

self

The tagged entry.

[not nullable]

tag

A string matching a tag to pin or unpin in the tagged entry.

[not nullable]

pinned

Whether the state of the tag must be marked as pinned

 

Returns

true if the tag is found, false otherwise


gnui_tagged_entry_set_pins ()

gboolean
gnui_tagged_entry_set_pins (GnuiTaggedEntry * const self,
                            const gboolean pinned,
                            ...);

Pin/unpin a group of tags

A tagged entry must always have a match function; if the “match-function” property is set to NULL, in order to find the tag to pin/unpin literal equality checks between strings will be performed.

Parameters

self

The tagged entry.

[not nullable]

pinned

Whether the state of the tag must be marked as pinned

 

...

Zero or more strings matching tags in the tagged entry to pin/unpin, followed by NULL (if no strings are provided the function is no-op)

 

Returns

true if all the tags were found, false otherwise


gnui_tagged_entry_activate ()

void
gnui_tagged_entry_activate (GnuiTaggedEntry * const self);

Activate a tagged entry (similar to pressing ENTER)

Parameters

self

The tagged entry to activate.

[not nullable]

gnui_tagged_entry_get_delimiter_chars ()

const gchar *
gnui_tagged_entry_get_delimiter_chars (GnuiTaggedEntry * const self);

Get the delimiter characters of a tagged entry

[get-property delimiter-chars]

Parameters

self

The tagged entry.

[not nullable]

Returns

A NIL-terminated array of delimiter characters (i.e. a “C string”), or NULL if the tagged entry has no delimiters. The returned array must not be freed or modified.

[transfer none]


gnui_tagged_entry_set_delimiter_chars ()

void
gnui_tagged_entry_set_delimiter_chars (GnuiTaggedEntry * const self,
                                       const gchar *delimiter_chars);

Set the delimiter characters of a tagged entry

If no delimiters are set, new tags can be added only by activating the tagged entry (usually by pressing ENTER).

[set-property delimiter-chars]

Parameters

self

The tagged entry.

[not nullable]

delimiter_chars

A NIL-terminated array of characters (i.e. a "C string") to use as input delimiters between different tags, or NULL for setting no delimiters.

[transfer none][nullable]

gnui_tagged_entry_get_filter_data ()

gpointer
gnui_tagged_entry_get_filter_data (GnuiTaggedEntry * const self);

Get the closure data passed to the “filter-function”

[get-property filter-data]

Parameters

self

The tagged entry.

[not nullable]

Returns

The closure data passed to the “filter-function”


gnui_tagged_entry_set_filter_data ()

void
gnui_tagged_entry_set_filter_data (GnuiTaggedEntry * const self,
                                   const gpointer filter_data);

Set the closure data passed to the “filter-function”

If later you need to destroy filter_data , connect the address to the tagged entry's “destroy” signal.

1
2
3
4
5
6
g_signal_connect_swapped(
    my_tagged_entry,
    "destroy",
    G_CALLBACK(my_destroy_listener),
    filter_data
);

[set-property filter-data]

Parameters

self

The tagged entry.

[not nullable]

filter_data (nullable)

The closure data to pass to the “filter-function”

 

gnui_tagged_entry_get_filter_function ()

GnuiTaggedEntryFilterFunc
gnui_tagged_entry_get_filter_function (GnuiTaggedEntry * const self);

Get the function that determines whether a tag can be added

[get-property filter-function]

Parameters

self

The tagged entry.

[not nullable]

Returns

The filter function


gnui_tagged_entry_set_filter_function ()

void
gnui_tagged_entry_set_filter_function (GnuiTaggedEntry * const self,
                                       const GnuiTaggedEntryFilterFunc filter_func);

Set the function that determines whether a tag can be added

It is granted that the strings passed to the filter function are always non-NULL and with a length greater than zero, therefore the filter function must not check for NULL or "".

[set-property filter-function]

Parameters

self

The tagged entry.

[not nullable]

filter_func

The filter function.

[nullable]

gnui_tagged_entry_get_invalid ()

gboolean
gnui_tagged_entry_get_invalid (GnuiTaggedEntry * const self);

Get whether the tagged entry is in invalid state

[get-property invalid]

Parameters

self

The tagged entry.

[not nullable]

Returns

true if the tagged entry is in invalid state, false otherwise


gnui_tagged_entry_set_invalid ()

void
gnui_tagged_entry_set_invalid (GnuiTaggedEntry * const self,
                               const gboolean invalid);

Set whether the tagged entry is in invalid state

[set-property invalid]

Parameters

self

The tagged entry.

[not nullable]

invalid

true if the tagged entry must be set in invalid state, false otherwise

 

gnui_tagged_entry_get_match_data ()

gpointer
gnui_tagged_entry_get_match_data (GnuiTaggedEntry * const self);

Get the closure data passed to the “match-function”

[get-property match-data]

Parameters

self

The tagged entry.

[not nullable]

Returns

The closure data passed to the “match-function”


gnui_tagged_entry_set_match_data ()

void
gnui_tagged_entry_set_match_data (GnuiTaggedEntry * const self,
                                  const gpointer match_data);

Set the closure data passed to the “match-function”

If later you need to destroy match_data , connect the address to the tagged entry's “destroy” signal.

1
2
3
4
5
6
g_signal_connect_swapped(
    my_tagged_entry,
    "destroy",
    G_CALLBACK(my_destroy_listener),
    match_data
);

[set-property match-data]

Parameters

self

The tagged entry.

[not nullable]

match_data

The closure data to pass to the “match-function”.

[nullable]

gnui_tagged_entry_get_match_function ()

GnuiTaggedEntryMatchFunc
gnui_tagged_entry_get_match_function (GnuiTaggedEntry * const self);

Get the function that determines whether two tags match

[get-property match-function]

Parameters

self

The tagged entry.

[not nullable]

Returns

The match function


gnui_tagged_entry_set_match_function ()

void
gnui_tagged_entry_set_match_function (GnuiTaggedEntry * const self,
                                      const GnuiTaggedEntryMatchFunc match_func);

Set the function that determines whether two tags match

The first argument passed to the match function is always a tag already in the entry, whereas the second argument is what is being checked for equality.

It is granted that the strings passed to the match function are always non-NULL and with a length greater than zero, therefore the match function must not check for NULL or "".

A tagged entry must always have a match function; if match_func is set to NULL a literal equality check between string will be used as the match function.

[set-property match-function]

Parameters

self

The tagged entry.

[not nullable]

match_func

The match function.

[nullable]

gnui_tagged_entry_get_modified ()

gboolean
gnui_tagged_entry_get_modified (GnuiTaggedEntry * const self);

Get whether the tagged entry has been modified by the user

[get-property modified]

Parameters

self

The tagged entry.

[not nullable]

Returns

Whether the tagged entry has been modified by the user


gnui_tagged_entry_set_modified ()

void
gnui_tagged_entry_set_modified (GnuiTaggedEntry * const self,
                                const gboolean modified);

Set whether the tagged entry has been modified by the user

[set-property modified]

Parameters

self

The tagged entry.

[not nullable]

modified

true if the tagged entry's state must be set to "modified", false otherwise

 

gnui_tagged_entry_get_placeholder_text ()

const char *
gnui_tagged_entry_get_placeholder_text
                               (GnuiTaggedEntry * const self);

Get the text that must be displayed when the tagged entry is empty

[get-property placeholder-text]

Parameters

self

The tagged entry.

[not nullable]

Returns

The text that must be displayed when the tagged entry is empty.

[nullable]


gnui_tagged_entry_set_placeholder_text ()

void
gnui_tagged_entry_set_placeholder_text
                               (GnuiTaggedEntry * const self,
                                const char * const placeholder_text);

Set the text that must be displayed when the tagged entry is empty

[set-property placeholder-text]

Parameters

self

The tagged entry.

[not nullable]

placeholder_text

The text that must be displayed when the tagged entry is empty.

[transfer none][nullable]

gnui_tagged_entry_get_sanitize_data ()

gpointer
gnui_tagged_entry_get_sanitize_data (GnuiTaggedEntry * const self);

Get the closure data passed to the “sanitize-function”

[get-property sanitize-data]

Parameters

self

The tagged entry.

[not nullable]

Returns

The closure data passed to the “sanitize-function”


gnui_tagged_entry_set_sanitize_data ()

void
gnui_tagged_entry_set_sanitize_data (GnuiTaggedEntry * const self,
                                     const gpointer sanitize_data);

Set the closure data passed to the “sanitize-function”

If later you need to destroy sanitize_data , connect the address to the tagged entry's “destroy” signal.

1
2
3
4
5
6
g_signal_connect_swapped(
    my_tagged_entry,
    "destroy",
    G_CALLBACK(my_destroy_listener),
    sanitize_data
);

[set-property sanitize-data]

Parameters

self

The tagged entry.

[not nullable]

sanitize_data (nullable)

The closure data to pass to the “sanitize-function”

 

gnui_tagged_entry_get_sanitize_function ()

GnuiTaggedEntrySanitizeFunc
gnui_tagged_entry_get_sanitize_function
                               (GnuiTaggedEntry * const self);

Get the function that allocates the strings that must be added to the tagged entry as tags, based on the given input

It is granted that the strings passed to the sanitize function are always non-NULL and with a length greater than zero, therefore the sanitize function must not check for NULL or "".

[get-property sanitize-function]

Parameters

self

The tagged entry.

[not nullable]

Returns

The sanitize function


gnui_tagged_entry_set_sanitize_function ()

void
gnui_tagged_entry_set_sanitize_function
                               (GnuiTaggedEntry * const self,
                                const GnuiTaggedEntrySanitizeFunc sanitize_func);

Set the function that allocates the strings that must be added to the tagged entry as tags, based on the given input

It is granted that the strings passed to the sanitize function are always non-NULL and with a length greater than zero, therefore the sanitize function must not check for NULL or "".

If this function set to NULL, g_strdup() will be used.

[set-property sanitize-function]

Parameters

self

The tagged entry.

[not nullable]

sanitize_func

The sanitize function.

[nullable]

gnui_tagged_entry_get_sort_data ()

gpointer
gnui_tagged_entry_get_sort_data (GnuiTaggedEntry * const self);

Get the closure data passed to the “sort-function”

[get-property sort-data]

Parameters

self

The tagged entry.

[not nullable]

Returns

The closure data passed to the “sort-function”


gnui_tagged_entry_set_sort_data ()

void
gnui_tagged_entry_set_sort_data (GnuiTaggedEntry * const self,
                                 const gpointer sort_data);

Get the closure data passed to the “sort-function”

If later you need to destroy sort_data , connect the address to the tagged entry's “destroy” signal.

1
2
3
4
5
6
g_signal_connect_swapped(
    my_tagged_entry,
    "destroy",
    G_CALLBACK(my_destroy_listener),
    sort_data
);

[set-property sort-data]

Parameters

self

The tagged entry.

[not nullable]

sort_data (nullable)

The closure data to pass to the “sort-function”

 

gnui_tagged_entry_get_sort_function ()

GnuiTaggedEntrySortFunc
gnui_tagged_entry_get_sort_function (GnuiTaggedEntry * const self);

Get the function that sorts the tags added to the tagged entry

[get-property sort-function]

Parameters

self

The tagged entry.

[not nullable]

Returns

The “sort-function”


gnui_tagged_entry_set_sort_function ()

void
gnui_tagged_entry_set_sort_function (GnuiTaggedEntry * const self,
                                     const GnuiTaggedEntrySortFunc sort_func);

Set the function that sorts the tags added to the tagged entry

It is granted that the strings passed to the sort function are always non-NULL and with a length greater than zero, therefore the sort function must not check for NULL or "".

Even if strcmp() takes less parameters than a GnuiTaggedEntrySortFunc, you can use strcmp() too as sort function.

[set-property sort-function]

Parameters

self

The tagged entry.

[not nullable]

sort_func

The function that will sort the tags added to the tagged entry.

[nullable]

gnui_tagged_entry_get_tags ()

const gchar * const *
gnui_tagged_entry_get_tags (GnuiTaggedEntry * const self);

Get the tagged entry's tags

[get-property tags]

Parameters

self

The tagged entry.

[not nullable]

Returns

An array of trings containing the tagged entry's tags. The returned array must not be freed or modified.

[transfer none][nullable]


gnui_tagged_entry_set_tags ()

void
gnui_tagged_entry_set_tags (GnuiTaggedEntry * const self,
                            const gchar * const * const tags);

Set the tagged entry's tags

The tags added using this function (or, equivalently, using g_object_set_property()) are always unpinned. For populating a tagged entry with pinned tags please use gnui_tagged_entry_populate_strv().

[set-property tags]

Parameters

self

The tagged entry.

[not nullable]

tags

Zero or more strings to insert into the (tagged entry as tags, followed by NULL if no strings are provided, or if this argument is NULL, the tagged entry will only be cleared).

[transfer none][nullable]

gnui_tagged_entry_invalidate_filter ()

void
gnui_tagged_entry_invalidate_filter (GnuiTaggedEntry * const self);

For each tag in the tagged entry call the “filter-function”

Parameters

self

The tagged entry.

[not nullable]

gnui_tagged_entry_invalidate_sort ()

void
gnui_tagged_entry_invalidate_sort (GnuiTaggedEntry * const self);

For each tag in the tagged entry call the “sort-function”

Parameters

self

The tagged entry.

[not nullable]

gnui_tagged_entry_get_text_delegate ()

GtkText *
gnui_tagged_entry_get_text_delegate (GnuiTaggedEntry * const self);

Get the tagged entry's GtkText delegate

Parameters

self

The tagged entry.

[not nullable]

Returns

The tagged entry's GtkText delegate


GnuiTaggedEntrySignalHandlerTagAdded ()

void
(*GnuiTaggedEntrySignalHandlerTagAdded)
                               (GnuiTaggedEntry *self,
                                const gchar *tag,
                                gpointer user_data);

A handler function type for the “tag-added” signal

Parameters

self

The tagged entry.

[auto][not nullable]

tag

The tag added.

[auto][not nullable][non-zero length][transfer none]

user_data

The custom data passed to the signal.

[auto][nullable][closure]

GnuiTaggedEntrySignalHandlerTagRemoved ()

void
(*GnuiTaggedEntrySignalHandlerTagRemoved)
                               (GnuiTaggedEntry *self,
                                const gchar *tag,
                                gpointer user_data);

A handler function type for the “tag-removed” signal

Parameters

self

The tagged entry.

[auto][not nullable]

tag

The tag removed.

[auto][not nullable][non-zero length][transfer none]

user_data

The custom data passed to the signal.

[auto][nullable][closure]

GnuiTaggedEntrySignalHandlerActivate ()

void
(*GnuiTaggedEntrySignalHandlerActivate)
                               (GnuiTaggedEntry *self,
                                gpointer user_data);

A handler function type for the “activate” signal

Parameters

self

The tagged entry.

[auto][not nullable]

user_data

The custom data passed to the signal.

[auto][nullable][closure]

GnuiTaggedEntrySignalHandlerInvalidChanged ()

void
(*GnuiTaggedEntrySignalHandlerInvalidChanged)
                               (GnuiTaggedEntry *self,
                                gboolean invalid,
                                gpointer user_data);

A handler function type for the “invalid-changed” signal

Parameters

self

The tagged entry.

[auto][not nullable]

invalid

The current state of the “invalid” property.

[auto]

user_data

The custom data passed to the signal.

[auto][nullable][closure]

GnuiTaggedEntrySignalHandlerModifiedChanged ()

void
(*GnuiTaggedEntrySignalHandlerModifiedChanged)
                               (GnuiTaggedEntry *self,
                                gboolean modified,
                                gpointer user_data);

A handler function type for the “modified-changed” signal

Parameters

self

The tagged entry.

[auto][not nullable]

modified

The current state of the “modified” property.

[auto]

user_data

The custom data passed to the signal.

[auto][nullable][closure]

Types and Values

GNUI_TYPE_TAGGED_ENTRY

#define GNUI_TYPE_TAGGED_ENTRY (gnui_tagged_entry_get_type())

The GType of GnuiTaggedEntry


GnuiTaggedEntry

typedef struct _GnuiTaggedEntry GnuiTaggedEntry;

The GnuiTaggedEntry widget

Property Details

The “delimiter-chars” property

  “delimiter-chars”          char *

A NIL-terminated array of characters (i.e. a “C string”) to use as input delimiters between different tags.

[nullable]

Owner: GnuiTaggedEntry

Flags: Read / Write

Default value: NULL


The “filter-data” property

  “filter-data”              gpointer

Closure data for “filter-function” – use the “destroy” signal if later you want to free it.

[closure]

Owner: GnuiTaggedEntry

Flags: Read / Write


The “filter-function” property

  “filter-function”          gpointer

Function to use to determine if a tag is valid.

[nullable]

Owner: GnuiTaggedEntry

Flags: Read / Write


The “invalid” property

  “invalid”                  gboolean

Whether the tagged entry is in “invalid” state.

Owner: GnuiTaggedEntry

Flags: Read / Write

Default value: FALSE


The “match-data” property

  “match-data”               gpointer

Closure data for “match-function” – use the “destroy” signal if later you want to free it.

[closure]

Owner: GnuiTaggedEntry

Flags: Read / Write


The “match-function” property

  “match-function”           gpointer

Function to use to determine if two tags match.

[nullable]

Owner: GnuiTaggedEntry

Flags: Read / Write


The “modified” property

  “modified”                 gboolean

Whether the tagged entry has been modified.

Owner: GnuiTaggedEntry

Flags: Read / Write

Default value: FALSE


The “placeholder-text” property

  “placeholder-text”         char *

The text to be displayed when the tagged entry is empty.

[nullable]

Owner: GnuiTaggedEntry

Flags: Read / Write

Default value: NULL


The “sanitize-data” property

  “sanitize-data”            gpointer

Closure data for “sanitize-function” – use the “destroy” signal if later you want to free it.

[closure]

Owner: GnuiTaggedEntry

Flags: Read / Write


The “sanitize-function” property

  “sanitize-function”        gpointer

Function to use to sanitize (and allocate) each new tag.

[nullable]

Owner: GnuiTaggedEntry

Flags: Read / Write


The “sort-data” property

  “sort-data”                gpointer

Closure data for “sort-function” – use the “destroy” signal if later you want to free it.

[closure]

Owner: GnuiTaggedEntry

Flags: Read / Write


The “sort-function” property

  “sort-function”            gpointer

Function to use to sort the tag order.

[nullable]

Owner: GnuiTaggedEntry

Flags: Read / Write


The “tags” property

  “tags”                     GStrv

The current tags.

[nullable]

Owner: GnuiTaggedEntry

Flags: Read / Write

Signal Details

The “activate” signal

void
user_function (GnuiTaggedEntry *self,
               gpointer         user_data)

Signal emitted when a tagged entry is activated (usually by pressing ENTER)

GnuiTaggedEntrySignalHandlerActivate is the function type of reference for this signal, which takes parameters' constness into account.

Parameters

self

The tagged entry that emitted the signal.

[auto][non-nullable]

user_data

user data set when the signal handler was connected.

 

Flags: Run First


The “invalid-changed” signal

void
user_function (GnuiTaggedEntry *self,
               gboolean         invalid,
               gpointer         user_data)

Signal emitted when the “invalid” property changes

GnuiTaggedEntrySignalHandlerInvalidChanged is the function type of reference for this signal, which takes parameters' constness into account.

Parameters

self

The tagged entry that emitted the signal.

[auto][non-nullable]

invalid

The new value of the “invalid” property.

[auto]

user_data

user data set when the signal handler was connected.

 

Flags: Run First


The “modified-changed” signal

void
user_function (GnuiTaggedEntry *self,
               gboolean         modified,
               gpointer         user_data)

Signal emitted when the “modified” property changes

GnuiTaggedEntrySignalHandlerModifiedChanged is the function type of reference for this signal, which takes parameters' constness into account.

Parameters

self

The tagged entry that emitted the signal.

[auto][non-nullable]

modified

The new value of the “modified” property.

[auto]

user_data

user data set when the signal handler was connected.

 

Flags: Run First


The “tag-added” signal

void
user_function (GnuiTaggedEntry *self,
               char            *tag,
               gpointer         user_data)

Signal emitted when a new tag is added to the tagged entry

GnuiTaggedEntrySignalHandlerTagAdded is the function type of reference for this signal, which takes parameters' constness into account.

Parameters

self

The tagged entry that emitted the signal.

[auto][non-nullable]

tag

The tag added.

[auto][not nullable][transfer none]

user_data

user data set when the signal handler was connected.

 

Flags: Run First


The “tag-removed” signal

void
user_function (GnuiTaggedEntry *self,
               char            *tag,
               gpointer         user_data)

Signal emitted when a tag is removed from the tagged entry

GnuiTaggedEntrySignalHandlerTagRemoved is the function type of reference for this signal, which takes parameters' constness into account.

Parameters

self

The tagged entry that emitted the signal.

[auto][non-nullable]

tag

The tag removed.

[auto][not nullable][transfer none]

user_data

user data set when the signal handler was connected.

 

Flags: Run First

See Also

GtkEntry, GnuiFlowLayout