Entry API.
More...
#include "gntwidget.h"
#include "gnt.h"
#include "gntcolors.h"
#include "gntkeys.h"
Go to the source code of this file.
|
#define | GNT_TYPE_ENTRY (gnt_entry_get_gtype()) |
|
#define | GNT_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_ENTRY, GntEntry)) |
|
#define | GNT_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_ENTRY, GntEntryClass)) |
|
#define | GNT_IS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_ENTRY)) |
|
#define | GNT_IS_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_ENTRY)) |
|
#define | GNT_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_ENTRY, GntEntryClass)) |
|
#define | GNT_ENTRY_FLAGS(obj) (GNT_ENTRY(obj)->priv.flags) |
|
#define | GNT_ENTRY_SET_FLAGS(obj, flags) (GNT_ENTRY_FLAGS(obj) |= flags) |
|
#define | GNT_ENTRY_UNSET_FLAGS(obj, flags) (GNT_ENTRY_FLAGS(obj) &= ~(flags)) |
|
#define | ENTRY_CHAR '_' /* The character to use to fill in the blank places */ |
|
#define | GNT_ENTRY_FLAG_ALL (GNT_ENTRY_FLAG_ALPHA | GNT_ENTRY_FLAG_INT) |
|
|
typedef struct _GntEntry | GntEntry |
|
typedef struct _GntEntryPriv | GntEntryPriv |
|
typedef struct _GntEntryClass | GntEntryClass |
|
typedef struct _GntEntryKillRing | GntEntryKillRing |
|
typedef struct _GntEntrySearch | GntEntrySearch |
|
|
enum | GntEntryFlag {
GNT_ENTRY_FLAG_ALPHA = 1 << 0,
GNT_ENTRY_FLAG_INT = 1 << 1,
GNT_ENTRY_FLAG_NO_SPACE = 1 << 2,
GNT_ENTRY_FLAG_NO_PUNCT = 1 << 3,
GNT_ENTRY_FLAG_MASK = 1 << 4
} |
|
|
G_BEGIN_DECLS GType | gnt_entry_get_gtype (void) |
|
GntWidget * | gnt_entry_new (const char *text) |
| Create a new GntEntry. More...
|
|
void | gnt_entry_set_max (GntEntry *entry, int max) |
| Set the maximum length of the text in the entry box. More...
|
|
void | gnt_entry_set_text (GntEntry *entry, const char *text) |
| Set the text in an entry box. More...
|
|
void | gnt_entry_set_flag (GntEntry *entry, GntEntryFlag flag) |
| Set flags an entry box. More...
|
|
const char * | gnt_entry_get_text (GntEntry *entry) |
| Get the text in an entry box. More...
|
|
void | gnt_entry_clear (GntEntry *entry) |
| Clear the text in the entry box. More...
|
|
void | gnt_entry_set_masked (GntEntry *entry, gboolean set) |
| Set whether the text in the entry box should be masked for display. More...
|
|
void | gnt_entry_add_to_history (GntEntry *entry, const char *text) |
| Add a text to the history list for the text. More...
|
|
void | gnt_entry_set_history_length (GntEntry *entry, int num) |
| Set the length of history for the entry box. More...
|
|
void | gnt_entry_set_word_suggest (GntEntry *entry, gboolean word) |
| Set whether the suggestions are for the entire entry box, or for each individual word in the entry box. More...
|
|
void | gnt_entry_set_always_suggest (GntEntry *entry, gboolean always) |
| Set whether to always display the suggestions list, or only when the tab-completion key is pressed (the TAB key, by default). More...
|
|
void | gnt_entry_add_suggest (GntEntry *entry, const char *text) |
| Add an item to the suggestion list. More...
|
|
void | gnt_entry_remove_suggest (GntEntry *entry, const char *text) |
| Remove an entry from the suggestion list. More...
|
|
Entry API.
Definition in file gntentry.h.
void gnt_entry_add_suggest |
( |
GntEntry * |
entry, |
|
|
const char * |
text |
|
) |
| |
Add an item to the suggestion list.
- Parameters
-
entry | The entry box. |
text | An item to add to the suggestion list. |
void gnt_entry_add_to_history |
( |
GntEntry * |
entry, |
|
|
const char * |
text |
|
) |
| |
Add a text to the history list for the text.
The history length for the entry box needs to be set first by gnt_entry_set_history_length.
- Parameters
-
entry | The entry box. |
text | A new entry for the history list. |
void gnt_entry_clear |
( |
GntEntry * |
entry | ) |
|
Clear the text in the entry box.
- Parameters
-
G_BEGIN_DECLS GType gnt_entry_get_gtype |
( |
void |
| ) |
|
- Returns
- GType for GntEntry.
const char* gnt_entry_get_text |
( |
GntEntry * |
entry | ) |
|
Get the text in an entry box.
- Parameters
-
- Returns
- The current text in the entry box.
GntWidget* gnt_entry_new |
( |
const char * |
text | ) |
|
Create a new GntEntry.
- Parameters
-
text | The text in the new entry box. |
- Returns
- The newly created entry box.
void gnt_entry_remove_suggest |
( |
GntEntry * |
entry, |
|
|
const char * |
text |
|
) |
| |
Remove an entry from the suggestion list.
- Parameters
-
entry | The entry box. |
text | The item to remove from the suggestion list. |
void gnt_entry_set_always_suggest |
( |
GntEntry * |
entry, |
|
|
gboolean |
always |
|
) |
| |
Set whether to always display the suggestions list, or only when the tab-completion key is pressed (the TAB key, by default).
- Parameters
-
entry | The entry box. |
always | TRUE if the suggestion list should always be displayed. |
void gnt_entry_set_flag |
( |
GntEntry * |
entry, |
|
|
GntEntryFlag |
flag |
|
) |
| |
Set flags an entry box.
- Parameters
-
entry | The entry box. |
flag | The flags to set for the entry box. |
void gnt_entry_set_history_length |
( |
GntEntry * |
entry, |
|
|
int |
num |
|
) |
| |
Set the length of history for the entry box.
- Parameters
-
entry | The entry box. |
num | The maximum length of the history. |
void gnt_entry_set_masked |
( |
GntEntry * |
entry, |
|
|
gboolean |
set |
|
) |
| |
Set whether the text in the entry box should be masked for display.
- Parameters
-
entry | The entry box. |
set | TRUE if the text should be masked, FALSE otherwise. |
void gnt_entry_set_max |
( |
GntEntry * |
entry, |
|
|
int |
max |
|
) |
| |
Set the maximum length of the text in the entry box.
- Parameters
-
entry | The entry box. |
max | The maximum length for text. A value of 0 means infinite length. |
void gnt_entry_set_text |
( |
GntEntry * |
entry, |
|
|
const char * |
text |
|
) |
| |
Set the text in an entry box.
- Parameters
-
entry | The entry box. |
text | The text to set in the box. |
void gnt_entry_set_word_suggest |
( |
GntEntry * |
entry, |
|
|
gboolean |
word |
|
) |
| |
Set whether the suggestions are for the entire entry box, or for each individual word in the entry box.
- Parameters
-
entry | The entry box. |
word | TRUE if the suggestions are for individual words, FALSE otherwise. |