## rb-search-entry

rb-search-entry — text entry widget for the search box

## Synopsis

                        RBSearchEntry;
                        RBSearchEntryClass;
    RBSearchEntry*      rb_search_entry_new                 (void);
    void                rb_search_entry_clear               (RBSearchEntry *entry);
    void                rb_search_entry_set_text            (RBSearchEntry *entry,
                                                             const char *text);
    gboolean            rb_search_entry_searching           (RBSearchEntry *entry);
    void                rb_search_entry_grab_focus          (RBSearchEntry *entry);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkBox
                                     +----GtkHBox
                                           +----RBSearchEntry

## Implemented Interfaces

RBSearchEntry implements AtkImplementorIface and GtkBuildable.

## Signals

      "activate"                                       : Run Last
      "search"                                         : Run Last

## Description

The search entry contains a label and a text entry box. The text entry box (a SexyIconEntry) contains an icon that acts as a 'clear' button.

Signals are emitted when the search text changes, arbitrarily rate-limited to one every 300ms.

When the text entry widget is non-empty, its colours are changed to display the text in black on yellow.

## Details

### RBSearchEntry

    typedef struct _RBSearchEntry RBSearchEntry;

### RBSearchEntryClass

    typedef struct {
    	GtkHBoxClass parent;

    	void (*search) (RBSearchEntry *view, const char *text);
    	void (*activate) (RBSearchEntry *entry);
    } RBSearchEntryClass;

### rb_search_entry_new ()

    RBSearchEntry*      rb_search_entry_new                 (void);

Returns : | new search entry widget.

### rb_search_entry_clear ()

    void                rb_search_entry_clear               (RBSearchEntry *entry);

Clears the search entry text. The 'search' signal will be emitted.

`entry` : | a RBSearchEntry

### rb_search_entry_set_text ()

    void                rb_search_entry_set_text            (RBSearchEntry *entry,
                                                             const char *text);

Sets the text in the search entry box. The 'search' signal will be emitted.

`entry` : | a RBSearchEntry
`text` : | new search text

### rb_search_entry_searching ()

    gboolean            rb_search_entry_searching           (RBSearchEntry *entry);

`entry` : | a RBSearchEntry
Returns : | TRUE if there is search text

### rb_search_entry_grab_focus ()

    void                rb_search_entry_grab_focus          (RBSearchEntry *entry);

Grabs input focus for the text entry widget.

`entry` : | a RBSearchEntry

## Signal Details

### The `"activate"` signal

    void                user_function                      (RBSearchEntry *entry,
                                                            gpointer       user_data)      : Run Last

Emitted when the entry is activated.

`entry` : | the RBSearchEntry
`user_data` : | user data set when the signal handler was connected.

### The `"search"` signal

    void                user_function                      (RBSearchEntry *entry,
                                                            gchar         *text,
                                                            gpointer       user_data)      : Run Last

Emitted when the search text changes. A signal handler must initiate a search on the current source.

`entry` : | the RBSearchEntry
`text` : | search text
`user_data` : | user data set when the signal handler was connected.