summaryrefslogtreecommitdiffstats
path: root/include/widgets
diff options
context:
space:
mode:
authorAaron Ash <aaron.ash@gmail.com>2017-04-12 17:58:32 +0200
committerQuentin Glidic <sardemff7+git@sardemff7.net>2017-05-30 19:00:57 +0200
commit43053cdfc34539dd73ba6a028090038f99d4093e (patch)
tree787829616f0e34cd92a89ee65d712db668e4b67a /include/widgets
parent4e6af2eab84157794684c485d15fb9624ec0f306 (diff)
view: Add icon (basic) support
Diffstat (limited to 'include/widgets')
-rw-r--r--include/widgets/textbox.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/widgets/textbox.h b/include/widgets/textbox.h
index d2d56095..3a8b1583 100644
--- a/include/widgets/textbox.h
+++ b/include/widgets/textbox.h
@@ -59,6 +59,9 @@ 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;
@@ -142,6 +145,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
*
@@ -279,6 +290,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.
*