Mercurial > pidgin.yaz
comparison console/libgnt/gntentry.h @ 14091:ae4cbed1b309
[gaim-migrate @ 16715]
Add support for tab-completion and save-history in GntEntry.
Also, the keyboard-commands should now work for Xterms.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 12 Aug 2006 10:27:29 +0000 |
parents | a71678d2da16 |
children | 4f0575a9264d |
comparison
equal
deleted
inserted
replaced
14090:983fbec46eb0 | 14091:ae4cbed1b309 |
---|---|
48 | 48 |
49 size_t buffer; /* Size of the buffer */ | 49 size_t buffer; /* Size of the buffer */ |
50 | 50 |
51 int max; /* 0 means infinite */ | 51 int max; /* 0 means infinite */ |
52 gboolean masked; | 52 gboolean masked; |
53 | |
54 GList *history; /* History of the strings. User can use this by pressing ctrl+up/down */ | |
55 int histlength; /* How long can the history be? */ | |
56 | |
57 GList *suggests; /* List of suggestions */ | |
58 gboolean word; /* Are the suggestions for only a word, or for the whole thing? */ | |
59 gboolean always; /* Should the list of suggestions show at all times, or only on tab-press? */ | |
60 GntWidget *ddown; /* The dropdown with the suggested list */ | |
53 }; | 61 }; |
54 | 62 |
55 struct _GnEntryClass | 63 struct _GnEntryClass |
56 { | 64 { |
57 GntWidgetClass parent; | 65 GntWidgetClass parent; |
68 | 76 |
69 GntWidget *gnt_entry_new(const char *text); | 77 GntWidget *gnt_entry_new(const char *text); |
70 | 78 |
71 void gnt_entry_set_max(GntEntry *entry, int max); | 79 void gnt_entry_set_max(GntEntry *entry, int max); |
72 | 80 |
73 /* XXX: For now, call gnt_entry_clear before calling this */ | |
74 void gnt_entry_set_text(GntEntry *entry, const char *text); | 81 void gnt_entry_set_text(GntEntry *entry, const char *text); |
75 | 82 |
76 void gnt_entry_set_flag(GntEntry *entry, GntEntryFlag flag); | 83 void gnt_entry_set_flag(GntEntry *entry, GntEntryFlag flag); |
77 | 84 |
78 const char *gnt_entry_get_text(GntEntry *entry); | 85 const char *gnt_entry_get_text(GntEntry *entry); |
79 | 86 |
80 void gnt_entry_clear(GntEntry *entry); | 87 void gnt_entry_clear(GntEntry *entry); |
81 | 88 |
82 void gnt_entry_set_masked(GntEntry *entry, gboolean set); | 89 void gnt_entry_set_masked(GntEntry *entry, gboolean set); |
83 | 90 |
91 void gnt_entry_add_to_history(GntEntry *entry, const char *text); | |
92 | |
93 void gnt_entry_set_history_length(GntEntry *entry, int num); | |
94 | |
95 void gnt_entry_set_word_suggest(GntEntry *entry, gboolean word); | |
96 | |
97 void gnt_entry_set_always_suggest(GntEntry *entry, gboolean always); | |
98 | |
99 void gnt_entry_add_suggest(GntEntry *entry, const char *text); | |
100 | |
101 void gnt_entry_remove_suggest(GntEntry *entry, const char *text); | |
102 | |
84 G_END_DECLS | 103 G_END_DECLS |
85 | 104 |
86 #endif /* GNT_ENTRY_H */ | 105 #endif /* GNT_ENTRY_H */ |