## SexyIconEntry

SexyIconEntry — A GtkEntry with support for inline icons.

## Synopsis

                SexyIconEntry;
    enum        SexyIconEntryPosition;
    GtkWidget*  sexy_icon_entry_new             (void);
    void        sexy_icon_entry_set_icon        (SexyIconEntry *entry,
                                                 SexyIconEntryPosition position,
                                                 GtkImage *icon);
    void        sexy_icon_entry_set_icon_highlight
                                                (SexyIconEntry *entry,
                                                 SexyIconEntryPosition position,
                                                 gboolean highlight);
    GtkImage*   sexy_icon_entry_get_icon        (const SexyIconEntry *entry,
                                                 SexyIconEntryPosition position);
    gboolean    sexy_icon_entry_get_icon_highlight
                                                (const SexyIconEntry *entry,
                                                 SexyIconEntryPosition position);
    void        sexy_icon_entry_add_clear_button
                                                (SexyIconEntry *icon_entry);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkEntry
                               +----SexyIconEntry

## Implemented Interfaces

SexyIconEntry implements GtkEditable, AtkImplementorIface and GtkCellEditable.

## Signals

    "icon-pressed"
                void        user_function      (SexyIconEntry *entry,
                                                gint           icon_pos,
                                                gint           button,
                                                gpointer       user_data)      : Run last / Action
    "icon-released"
                void        user_function      (SexyIconEntry *entry,
                                                gint           icon_pos,
                                                gint           button,
                                                gpointer       user_data)      : Run last / Action

## Description

SexyIconEntry is a GtkEntry with support for inline icons. They can appear on either side of the entry or on both sides. There's also built-in support for adding a clear button for clearing the entry. This widget is particularly useful as search fields.

## Details

### SexyIconEntry

    typedef struct _SexyIconEntry SexyIconEntry;

The SexyIconEntry struct contains private data only, and should be manipulated using the functions below.

### enum SexyIconEntryPosition

    typedef enum
    {
    	SEXY_ICON_ENTRY_PRIMARY,
    	SEXY_ICON_ENTRY_SECONDARY

    } SexyIconEntryPosition;

The position used when setting or retrieving an icon.

`SEXY_ICON_ENTRY_PRIMARY` | Icon at the beginning of the entry (left for LTR languages, right for RTL).
`SEXY_ICON_ENTRY_SECONDARY` | Icon at the end of the entry.

### sexy_icon_entry_new ()

    GtkWidget*  sexy_icon_entry_new             (void);

Creates a new SexyIconEntry widget.

Returns : | a new SexyIconEntry.

### sexy_icon_entry_set_icon ()

    void        sexy_icon_entry_set_icon        (SexyIconEntry *entry,
                                                 SexyIconEntryPosition position,
                                                 GtkImage *icon);

Sets the icon shown in the entry

`entry` : | A SexyIconEntry.
`position` : | Icon position.
`icon` : | A GtkImage to set as the icon.

### sexy_icon_entry_set_icon_highlight ()

    void        sexy_icon_entry_set_icon_highlight
                                                (SexyIconEntry *entry,
                                                 SexyIconEntryPosition position,
                                                 gboolean highlight);

Determines whether the icon will highlight on mouse-over.

`entry` : | A SexyIconEntry;
`position` : | Icon position.
`highlight` : | TRUE if the icon should highlight on mouse-over

### sexy_icon_entry_get_icon ()

    GtkImage*   sexy_icon_entry_get_icon        (const SexyIconEntry *entry,
                                                 SexyIconEntryPosition position);

Retrieves the image used for the icon

`entry` : | A SexyIconEntry.
`position` : | Icon position.
Returns : | A GtkImage.

### sexy_icon_entry_get_icon_highlight ()

    gboolean    sexy_icon_entry_get_icon_highlight
                                                (const SexyIconEntry *entry,
                                                 SexyIconEntryPosition position);

Retrieves whether entry will highlight the icon on mouseover.

`entry` : | A SexyIconEntry.
`position` : | Icon position.
Returns : | TRUE if icon highlights.

### sexy_icon_entry_add_clear_button ()

    void        sexy_icon_entry_add_clear_button
                                                (SexyIconEntry *icon_entry);

A convenience function to add a clear button to the end of the entry. This is useful for search boxes.

`icon_entry` : | A SexyIconEntry.

## Signal Details

### The "icon-pressed" signal

    void        user_function                  (SexyIconEntry *entry,
                                                gint           icon_pos,
                                                gint           button,
                                                gpointer       user_data)      : Run last / Action

The ::icon-pressed signal is emitted when an icon is clicked.

`entry` : | The entry on which the signal is emitted.
`icon_pos` : | The position of the clicked icon.
`button` : | The mouse button clicked.
`user_data` : | user data set when the signal handler was connected.

### The "icon-released" signal

    void        user_function                  (SexyIconEntry *entry,
                                                gint           icon_pos,
                                                gint           button,
                                                gpointer       user_data)      : Run last / Action

The ::icon-released signal is emitted on the button release from a mouse click.

`entry` : | The entry on which the signal is emitted.
`icon_pos` : | The position of the clicked icon.
`button` : | The mouse button clicked.
`user_data` : | user data set when the signal handler was connected.