MokoHintEntry

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

Synopsis

                    MokoHintEntry;
GtkWidget*          moko_hint_entry_new                 (const char *hint);
void                moko_hint_entry_set_text            (MokoHintEntry *entry,
                                                         const gchar *text);
gboolean            moko_hint_entry_is_empty            (MokoHintEntry *entry);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkEntry
                           +----MokoHintEntry

Implemented Interfaces

MokoHintEntry implements GtkBuildable, AtkImplementorIface, GtkEditable and GtkCellEditable.

Properties

  "hint"                     gchar*                : Read / Write / Construct

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.

Details

MokoHintEntry

typedef struct _MokoHintEntry MokoHintEntry;

MokoHintEntry has no publicly accessible fields


moko_hint_entry_new ()

GtkWidget*          moko_hint_entry_new                 (const char *hint);

Create a new MokoHintEntry widget with the specified hint.

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.

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.

entry :

a MokoHintyEntry

Returns :

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

Property Details

The "hint" property

  "hint"                     gchar*                : Read / Write / Construct

Text to display when the entry is empty.

Default value: ""

See Also

#GtkEntry