diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-05-31 11:18:30 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-05-31 11:18:30 +0200 |
commit | d8b0e24b09e6e0aa9aaaf17e6ee9c92e0ebdc05e (patch) | |
tree | ed961b08bed65b4adc4ff14978282c2ad506d641 /include/widgets | |
parent | 9a6fd1c6c3d54c4a6db6ba7d15f317927f4036ec (diff) | |
parent | 4d8784cf85a5108340a2b2a684e2bd1d9f77269d (diff) |
Merge remote-tracking branch 'origin/master' into barview
Diffstat (limited to 'include/widgets')
-rw-r--r-- | include/widgets/textbox.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/widgets/textbox.h b/include/widgets/textbox.h index 904882bd..94f4eb08 100644 --- a/include/widgets/textbox.h +++ b/include/widgets/textbox.h @@ -59,12 +59,16 @@ typedef struct int markup; int changed; + cairo_surface_t *icon; // AA TODO - pass in icons for a textbox line if needed + int icon_index; + int blink; guint blink_timeout; double yalign ; PangoFontMetrics *metrics; + int left_offset; // const char *theme_name; } textbox; @@ -84,6 +88,7 @@ typedef enum TB_WRAP = 1 << 21, TB_PASSWORD = 1 << 22, TB_INDICATOR = 1 << 23, + TB_ICON = 1<<24, } TextboxFlags; /** * Flags indicating current state of the textbox. @@ -144,6 +149,14 @@ void textbox_font ( textbox *tb, TextBoxFontType tbft ); void textbox_text ( textbox *tb, const char *text ); /** + * @param tb Handle to the textbox + * @param text The icon to show on the textbox + * + * Set the text to show. Cursor is moved to end (if visible) + */ +void textbox_icon ( textbox *tb, cairo_surface_t *icon ); + +/** * @param tb Handle to the textbox * @param action the #KeyBindingAction to execute on textbox * @@ -281,6 +294,14 @@ void textbox_set_pango_attributes ( textbox *tb, PangoAttrList *list ); /** * @param tb Handle to the textbox + * @param index character index to draw the icon at. -1 for no icon + * + * Sets the character index where the icon should be drawn + */ +void textbox_set_icon_index ( textbox *tb, int index ); + +/** + * @param tb Handle to the textbox * * Get the list of currently active pango attributes. * |