ScwEntry

ScwEntry — An entry widget with messaging-oriented features

Synopsis




            ScwEntry;
void        scw_entry_set_history_size      (ScwEntry *entry,
                                             gint size);
gint        scw_entry_get_history_size      (ScwEntry *entry);
GList*      scw_entry_get_history           (ScwEntry *entry);
GList*      scw_entry_history_get_current   (ScwEntry *entry);
void        scw_entry_history_append        (ScwEntry *entry,
                                             const gchar *item);
void        scw_entry_history_step_back     (ScwEntry *entry);
void        scw_entry_history_step_forward  (ScwEntry *entry);
const gchar* scw_entry_history_peek_backwards
                                            (ScwEntry *entry);
const gchar* scw_entry_history_peek_forward (ScwEntry *entry);

Object Hierarchy


  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkEntry
                           +----ScwEntry

Implemented Interfaces

ScwEntry implements AtkImplementorIface, GtkEditable and GtkCellEditable.

Properties


  "history-size"         gint                  : Read / Write

Description

ScwEntry is a textual entry that offers features useful in messaging applications in addition to those offered by the standard GtkEntry.

Details

ScwEntry

typedef struct _ScwEntry ScwEntry;

There are no public members in the ScwEntry structure


scw_entry_set_history_size ()

void        scw_entry_set_history_size      (ScwEntry *entry,
                                             gint size);

Sets the maximum history size for the ScwEntry. The list will be truncated if longer than specified length.

entry : The ScwEntry.
size : Desired maximum size for the history.

scw_entry_get_history_size ()

gint        scw_entry_get_history_size      (ScwEntry *entry);

Gets the size of the history list for the entry.

entry : The ScwEntry.
Returns : The size of the history list.

scw_entry_get_history ()

GList*      scw_entry_get_history           (ScwEntry *entry);

Gets the actual history list for the entry. NOTE: The list should not be modified in any way!

entry : The ScwEntry.
Returns : The history list for the widget.

scw_entry_history_get_current ()

GList*      scw_entry_history_get_current   (ScwEntry *entry);

Gets the current item in the history list for the entry. NOTE: The list should not be modified in any way!

entry : The ScwEntry.
Returns : The current item in the history list for the widget.

scw_entry_history_append ()

void        scw_entry_history_append        (ScwEntry *entry,
                                             const gchar *item);

Appends the specified item to the history list. Identical succesive items will be "collapsed" to one item.

entry : The ScwEntry.
item : Item to append to the history.

scw_entry_history_step_back ()

void        scw_entry_history_step_back     (ScwEntry *entry);

Steps one item back in the history and replaces current text in the entry with the text from the item in history. If at the end of history, does nothing.

entry : The ScwEntry.

scw_entry_history_step_forward ()

void        scw_entry_history_step_forward  (ScwEntry *entry);

Steps one item forward in the history and replaces current text in the entry with the text from the item in history. If no history item is active, appends the current text to the history

entry : The ScwEntry.

scw_entry_history_peek_backwards ()

const gchar* scw_entry_history_peek_backwards
                                            (ScwEntry *entry);

Peeks what is the previous item in the history list. The returned string should be freed after use.

entry : The ScwEntry.
Returns : The previous history item, or NULL if not available.

scw_entry_history_peek_forward ()

const gchar* scw_entry_history_peek_forward (ScwEntry *entry);

Peeks what is the next item in the history list. The returned string should be freed after use.

entry : The ScwEntry.
Returns : The next history item, or NULL if not available.

Property Details

The "history-size" property

  "history-size"         gint                  : Read / Write

Number of history items for this entry.

Allowed values: [0,200]

Default value: 20

See Also

GtkEntry from the Gtk+ Reference Manual