diff options
author | Dave Davenport <DaveDavenport@users.noreply.github.com> | 2019-08-08 20:02:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-08 20:02:20 +0200 |
commit | 618d1396eefea6ea26d954e44015c1fa422801f3 (patch) | |
tree | bd52799b1024ef97edcbbef6153108a1f44a95af /include | |
parent | d9eb9f25a16b3e95cfc32c3c1076caae58c0ceb1 (diff) |
Issue949 (#999)
* [Issue 949] Add initial split of listview row into widget tree.
Allowing better themeing.
* Remove unneeded code from textbox. allow dis. icons.
* Fix typo.
* Fix wrong widget offset in textbox.
* Fix mouse handling
* [ListView] Add 'fixed-columns' boolean option.
* [Listview] Fix inversion of option.
* [ListView] remove commented old code.
* [Textbox] Handle null pointer on desired width.
* [Listview] Fix crasher with fixed_columns and more max elements requested items.
* Add hack to get backwards compatibility for new listview structure.
* Fix the scrollbar test.
* Fix tests for theme update..
Diffstat (limited to 'include')
-rw-r--r-- | include/view-internal.h | 2 | ||||
-rw-r--r-- | include/widgets/listview.h | 2 | ||||
-rw-r--r-- | include/widgets/textbox.h | 21 | ||||
-rw-r--r-- | include/widgets/widget.h | 9 |
4 files changed, 11 insertions, 23 deletions
diff --git a/include/view-internal.h b/include/view-internal.h index a00bd147..7ebee79d 100644 --- a/include/view-internal.h +++ b/include/view-internal.h @@ -30,9 +30,9 @@ #include "widgets/container.h" #include "widgets/widget.h" #include "widgets/textbox.h" -#include "widgets/listview.h" #include "widgets/box.h" #include "widgets/icon.h" +#include "widgets/listview.h" #include "keyb.h" #include "xcb.h" #include "theme.h" diff --git a/include/widgets/listview.h b/include/widgets/listview.h index ec5861e1..c10e1831 100644 --- a/include/widgets/listview.h +++ b/include/widgets/listview.h @@ -61,7 +61,7 @@ typedef enum * * Update callback, this is called to set the value of each (visible) element. */ -typedef void ( *listview_update_callback )( textbox *tb, unsigned int entry, void *udata, TextBoxFontType type, gboolean full ); +typedef void ( *listview_update_callback )( textbox *tb,icon *ico, unsigned int entry, void *udata, TextBoxFontType *type, gboolean full ); /** * Callback when a element is activated. diff --git a/include/widgets/textbox.h b/include/widgets/textbox.h index 6d666ff0..83831bfe 100644 --- a/include/widgets/textbox.h +++ b/include/widgets/textbox.h @@ -58,9 +58,6 @@ 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; @@ -69,7 +66,6 @@ typedef struct PangoFontMetrics *metrics; PangoEllipsizeMode emode; - int left_offset; // const char *theme_name; } textbox; @@ -86,7 +82,6 @@ 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. @@ -148,14 +143,6 @@ void textbox_font ( textbox *tb, TextBoxFontType tbft ); void textbox_text ( textbox *tb, const char *text ); /** - * @param tb Handle to the textbox - * @param icon 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 * @@ -299,14 +286,6 @@ 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. * diff --git a/include/widgets/widget.h b/include/widgets/widget.h index 9370a49b..abe0c4f6 100644 --- a/include/widgets/widget.h +++ b/include/widgets/widget.h @@ -142,6 +142,15 @@ void widget_move ( widget *widget, short x, short y ); */ WidgetType widget_type ( widget *widget ); + +/** + * @param widget Handle to widget + * @param type The widget type. + * + * Set the widget type. + */ +void widget_set_type ( widget *widget, WidgetType type ); + /** * @param widget Handle to widget * |