![]() |
![]() |
![]() |
libsexy Reference Manual | ![]() |
---|---|---|---|---|
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);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkEntry +----SexyIconEntry
SexyIconEntry implements AtkImplementorIface, GtkBuildable, GtkEditable and GtkCellEditable.
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.
typedef struct _SexyIconEntry SexyIconEntry;
The SexyIconEntry struct contains private data only, and should be manipulated using the functions below.
typedef enum { SEXY_ICON_ENTRY_PRIMARY, SEXY_ICON_ENTRY_SECONDARY } SexyIconEntryPosition;
The position used when setting or retrieving an icon.
GtkWidget* sexy_icon_entry_new (void);
Creates a new SexyIconEntry widget.
Returns : |
a new SexyIconEntry. |
void sexy_icon_entry_set_icon (SexyIconEntry *entry, SexyIconEntryPosition position, GtkImage *icon);
Sets the icon shown in the entry
|
A SexyIconEntry. |
|
Icon position. |
|
A GtkImage to set as the icon. |
void sexy_icon_entry_set_icon_highlight (SexyIconEntry *entry, SexyIconEntryPosition position, gboolean highlight);
Determines whether the icon will highlight on mouse-over.
|
A SexyIconEntry; |
|
Icon position. |
|
TRUE if the icon should highlight on mouse-over |
GtkImage* sexy_icon_entry_get_icon (const SexyIconEntry *entry, SexyIconEntryPosition position);
Retrieves the image used for the icon
|
A SexyIconEntry. |
|
Icon position. |
Returns : |
A GtkImage. |
gboolean sexy_icon_entry_get_icon_highlight (const SexyIconEntry *entry, SexyIconEntryPosition position);
Retrieves whether entry will highlight the icon on mouseover.
|
A SexyIconEntry. |
|
Icon position. |
Returns : |
TRUE if icon highlights. |
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.
|
A SexyIconEntry. |
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.
|
The entry on which the signal is emitted. |
|
The position of the clicked icon. |
|
The mouse button clicked. |
|
user data set when the signal handler was connected. |
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.
|
The entry on which the signal is emitted. |
|
The position of the clicked icon. |
|
The mouse button clicked. |
|
user data set when the signal handler was connected. |