![]() |
![]() |
![]() |
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 GtkEditable, AtkImplementorIface and GtkCellEditable.
"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
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
entry : |
A SexyIconEntry. |
position : |
Icon position. |
icon : |
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.
entry : |
A SexyIconEntry; |
position : |
Icon position. |
highlight : |
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
entry : |
A SexyIconEntry. |
position : |
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.
entry : |
A SexyIconEntry. |
position : |
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.
icon_entry : |
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.
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. |
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. |