## RBSearchEntry

RBSearchEntry — text entry widget for the search box

## Functions

RBSearchEntry * | rb_search_entry_new ()
void | rb_search_entry_clear ()
void | rb_search_entry_set_text ()
gboolean | rb_search_entry_searching ()
void | rb_search_entry_grab_focus ()

## Properties

gboolean | explicit-mode | Read / Write
gboolean | has-popup | Read / Write / Construct Only

## Signals

void | activate | Run Last
void | search | Run Last
void | show-popup | Run Last

## Types and Values

struct | RBSearchEntry
struct | RBSearchEntryClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBox
                        ╰── RBSearchEntry

## Implemented Interfaces

RBSearchEntry implements AtkImplementorIface, GtkBuildable and GtkOrientable.

## 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.

## Functions

### 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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

entry | a RBSearchEntry |

## Types and Values

### struct RBSearchEntry

    struct RBSearchEntry;

### struct RBSearchEntryClass

    struct RBSearchEntryClass {
    	GtkBoxClass parent;

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

## Property Details

### The `“explicit-mode”` property

      “explicit-mode”            gboolean

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

Flags: Read / Write

Default value: FALSE

### The `“has-popup”` property

      “has-popup”                gboolean

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

Flags: Read / Write / Construct Only

Default value: FALSE

## Signal Details

### The `“activate”` signal

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

Emitted when the entry is activated.

#### Parameters

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

Flags: Run Last

### The `“search”` signal

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

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

#### Parameters

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

Flags: Run Last

### The `“show-popup”` signal

    void
    user_function (RBSearchEntry *entry,
                   gpointer       user_data)

Emitted when a popup menu should be shown

#### Parameters

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

Flags: Run Last