NbtkEntry

NbtkEntry — Widget for displaying text

Synopsis

                    NbtkEntry;
NbtkWidget *        nbtk_entry_new                      (const gchar *text);
const gchar *       nbtk_entry_get_text                 (NbtkEntry *entry);
void                nbtk_entry_set_text                 (NbtkEntry *entry,
                                                         const gchar *text);
ClutterActor*       nbtk_entry_get_clutter_text         (NbtkEntry *entry);
void                nbtk_entry_set_hint_text            (NbtkEntry *entry,
                                                         const gchar *text);
const gchar *       nbtk_entry_get_hint_text            (NbtkEntry *entry);
void                nbtk_entry_set_primary_icon_from_file
                                                        (NbtkEntry *entry,
                                                         const gchar *filename);
void                nbtk_entry_set_secondary_icon_from_file
                                                        (NbtkEntry *entry,
                                                         const gchar *filename);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----ClutterActor
               +----NbtkWidget
                     +----NbtkEntry

Implemented Interfaces

NbtkEntry implements ClutterScriptable, ClutterAnimatable, AtkImplementorIface and NbtkStylable.

Properties

  "hint-text"                gchar*                : Read / Write
  "text"                     gchar*                : Read / Write

Signals

  "primary-icon-clicked"                           : Run Last
  "secondary-icon-clicked"                         : Run Last

Description

NbtkEntry is a simple widget for displaying text. It derives from NbtkWidget to add extra style and placement functionality over ClutterText. The internal ClutterText is publicly accessibly to allow applications to set further properties.

NbtkEntry supports the following pseudo style states:

  • focus: the widget has focus

  • indeterminate: the widget is showing the hint text

Details

NbtkEntry

typedef struct _NbtkEntry NbtkEntry;

The contents of this structure is private and should only be accessed using the provided API.


nbtk_entry_new ()

NbtkWidget *        nbtk_entry_new                      (const gchar *text);

Create a new NbtkEntry with the specified entry

text :

text to set the entry to

Returns :

a new NbtkEntry

nbtk_entry_get_text ()

const gchar *       nbtk_entry_get_text                 (NbtkEntry *entry);

Get the text displayed on the entry

entry :

a NbtkEntry

Returns :

the text for the entry. This must not be freed by the application

nbtk_entry_set_text ()

void                nbtk_entry_set_text                 (NbtkEntry *entry,
                                                         const gchar *text);

Sets the text displayed on the entry

entry :

a NbtkEntry

text :

text to set the entry to

nbtk_entry_get_clutter_text ()

ClutterActor*       nbtk_entry_get_clutter_text         (NbtkEntry *entry);

Retrieve the internal ClutterText so that extra parameters can be set

entry :

a NbtkEntry

Returns :

the ClutterText used by NbtkEntry. The entry is owned by the NbtkEntry and should not be unref'ed by the application.

nbtk_entry_set_hint_text ()

void                nbtk_entry_set_hint_text            (NbtkEntry *entry,
                                                         const gchar *text);

Sets the text to display when the entry is empty and unfocused. When the entry is displaying the hint, it has a pseudo class of "indeterminate". A value of NULL unsets the hint.

entry :

a NbtkEntry

text :

text to set as the entry hint

nbtk_entry_get_hint_text ()

const gchar *       nbtk_entry_get_hint_text            (NbtkEntry *entry);

Gets the text that is displayed when the entry is empty and unfocused

entry :

a NbtkEntry

Returns :

the current value of the hint property. This string is owned by the NbtkEntry and should not be freed or modified.

nbtk_entry_set_primary_icon_from_file ()

void                nbtk_entry_set_primary_icon_from_file
                                                        (NbtkEntry *entry,
                                                         const gchar *filename);

Set the primary icon of the entry to the given filename

entry :

a NbtkEntry

filename :

filename of an icon

nbtk_entry_set_secondary_icon_from_file ()

void                nbtk_entry_set_secondary_icon_from_file
                                                        (NbtkEntry *entry,
                                                         const gchar *filename);

Set the primary icon of the entry to the given filename

entry :

a NbtkEntry

filename :

filename of an icon

Property Details

The "hint-text" property

  "hint-text"                gchar*                : Read / Write

Text to display when the entry is not focused and the text property is empty.

Default value: NULL


The "text" property

  "text"                     gchar*                : Read / Write

Text of the entry.

Default value: NULL

Signal Details

The "primary-icon-clicked" signal

void                user_function                      (NbtkEntry *arg0,
                                                        gpointer   user_data)      : Run Last

Emitted when the primary icon is clicked

user_data :

user data set when the signal handler was connected.

The "secondary-icon-clicked" signal

void                user_function                      (NbtkEntry *arg0,
                                                        gpointer   user_data)      : Run Last

Emitted when the secondary icon is clicked

user_data :

user data set when the signal handler was connected.