## RBSearchEntry

RBSearchEntry — text entry widget for the search box

## Synopsis

    struct              RBSearchEntry;
    struct              RBSearchEntryClass;
    RBSearchEntry *     rb_search_entry_new                 (gboolean has_popup);
    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
             +----GtkWidget
                   +----GtkContainer
                         +----GtkBox
                               +----GtkHBox
                                     +----RBSearchEntry

## Implemented Interfaces

RBSearchEntry implements AtkImplementorIface, GtkBuildable and GtkOrientable.

## Properties

      "explicit-mode"            gboolean              : Read / Write
      "has-popup"                gboolean              : Read / Write / Construct Only

## Signals

      "activate"                                       : Run Last
      "search"                                         : Run Last
      "show-popup"                                     : Run Last

## Description

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

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

## Details

### struct RBSearchEntry

    struct RBSearchEntry;

### struct RBSearchEntryClass

    struct RBSearchEntryClass {
    	GtkHBoxClass parent;

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

### rb_search_entry_new ()

    RBSearchEntry *     rb_search_entry_new                 (gboolean has_popup);

Creates a new search entry widget.

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);

Returns `TRUE` if there is search text in the entry widget.

`entry` : | a RBSearchEntry
Returns : | `TRUE` if searching

### rb_search_entry_grab_focus ()

    void                rb_search_entry_grab_focus          (RBSearchEntry *entry);

Grabs input focus for the text entry widget.

`entry` : | a RBSearchEntry

## Property Details

### The `"explicit-mode"` property

      "explicit-mode"            gboolean              : Read / Write

If TRUE, show a button and only emit the 'search' signal when the user presses it rather than when they stop typing.

Default value: FALSE

### The `"has-popup"` property

      "has-popup"                gboolean              : Read / Write / Construct Only

If TRUE, show a primary icon and emit the show-popup when clicked.

Default value: FALSE

## Signal Details

### The `"activate"` signal

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

Emitted when the entry is activated.

`entry` : | the RBSearchEntry
`text` : | search text
`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.

### The `"show-popup"` signal

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

Emitted when a popup menu should be shown

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