AnjutaEntry

AnjutaEntry — GtkEntry subclass that displays help text with a button to clear the entry's contents.

Synopsis

#include <libanjuta/anjuta-entry.h>

struct              AnjutaEntryClass;
GtkWidget *         anjuta_entry_new                    (void);
const gchar *       anjuta_entry_get_text               (AnjutaEntry *self);
gchar *             anjuta_entry_dup_text               (AnjutaEntry *self);
void                anjuta_entry_set_text               (AnjutaEntry *self,
                                                         const gchar *text);
gboolean            anjuta_entry_is_showing_help_text   (AnjutaEntry *self);
                    AnjutaEntryPriv;

Description

AnjutaEntry is a version of a GtkEntry that displays some text, in a lighter color, that describes what is to be entered into it. There is also a button on the left to clear the entry's content quickly. AnjutaEntry is similar to the serach boxes used in Evolution and Glade, but is more generic can can be used in almost any situation.

Details

struct AnjutaEntryClass

struct AnjutaEntryClass {
	GtkEntryClass parent_class;
};


anjuta_entry_new ()

GtkWidget *         anjuta_entry_new                    (void);

Creates a new AnjutaEntry.


anjuta_entry_get_text ()

const gchar *       anjuta_entry_get_text               (AnjutaEntry *self);

self :

An AnjutaEntry

Returns :

The contents of the entry. If the entry is empty, the help text will be displayed and an empty string will be returned.

anjuta_entry_dup_text ()

gchar *             anjuta_entry_dup_text               (AnjutaEntry *self);

self :

An AnjutaEntry

Returns :

A copy of the contents of the entry. If the entry is empty, the returned string will be empty. The returned string must be freed when no longer needed. [transfer full]

anjuta_entry_set_text ()

void                anjuta_entry_set_text               (AnjutaEntry *self,
                                                         const gchar *text);

Sets the text on the entry, showing the help text if the text is empty.

self :

An AnjutaEntry

text :

The new text

anjuta_entry_is_showing_help_text ()

gboolean            anjuta_entry_is_showing_help_text   (AnjutaEntry *self);

self :

An AnjutaEntry

Returns :

Whether the entry is showing its help text. In practice, if this method returns TRUE, it means that the user has not entered anything.

AnjutaEntryPriv

typedef struct _AnjutaEntryPriv AnjutaEntryPriv;