MokoHintEntry

MokoHintEntry — An entry widget with an additional "hint" when no value is entered.

Functions

Properties

gchar * hint Read / Write / Construct

Types and Values

struct MokoHintEntry

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkObject
            ╰── GtkWidget
                ╰── GtkEntry
                    ╰── MokoHintEntry

Implemented Interfaces

MokoHintEntry implements AtkImplementorIface, GtkBuildable, GtkEditable and GtkCellEditable.

Description

MokoHintEntry is a simple GtkEntry subclass that displays "hint" text if the user has not entered a value. This is useful when there is not enough space in the user interface to add a label next to the entry. However, it should only be used where the meaning and context of the user entered value is obvious without a label.

Functions

moko_hint_entry_new ()

GtkWidget *
moko_hint_entry_new (const char *hint);

Create a new MokoHintEntry widget with the specified hint.

Parameters

hint

The hint to display when the widget is not focused

 

Returns

a newly created MokoHintEntry


moko_hint_entry_set_text ()

void
moko_hint_entry_set_text (MokoHintEntry *entry,
                          const gchar *text);

Clear the text in the entry and if the widget is not focused, display the hint text.

Parameters

entry

a MokoHintEntry

 

text

the next text

 

moko_hint_entry_is_empty ()

gboolean
moko_hint_entry_is_empty (MokoHintEntry *entry);

Check if the entry has a user entered value.

Parameters

entry

a MokoHintyEntry

 

Returns

TRUE if the hint is currently displayed. FALSE if the user has entered a value

Types and Values

struct MokoHintEntry

struct MokoHintEntry;

MokoHintEntry has no publicly accessible fields

Property Details

The “hint” property

  “hint”                     gchar *

Text to display when the entry is empty.

Flags: Read / Write / Construct

Default value: ""

See Also

GtkEntry