diff options
author | Dave Davenport <qball@gmpclient.org> | 2019-05-04 11:01:09 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2019-05-04 11:04:54 +0200 |
commit | 52c5592a6f6d55897a03bb9691031c3cf8c71b46 (patch) | |
tree | 5340e54fd1cf64608301f8228def4c141540a890 /include | |
parent | e7da00dbff338327c5beb8ced42ab84016a18ed7 (diff) |
[ListView|Textbox] Add user-settable ellipsize mode.
Fixes: #917
Diffstat (limited to 'include')
-rw-r--r-- | include/keyb.h | 1 | ||||
-rw-r--r-- | include/widgets/listview.h | 6 | ||||
-rw-r--r-- | include/widgets/textbox.h | 9 |
3 files changed, 16 insertions, 0 deletions
diff --git a/include/keyb.h b/include/keyb.h index fef1ad52..bc8628b9 100644 --- a/include/keyb.h +++ b/include/keyb.h @@ -126,6 +126,7 @@ typedef enum CUSTOM_18, CUSTOM_19, SCREENSHOT, + CHANGE_ELLIPSIZE, TOGGLE_SORT, SELECT_ELEMENT_1, SELECT_ELEMENT_2, diff --git a/include/widgets/listview.h b/include/widgets/listview.h index abb9b02e..ec5861e1 100644 --- a/include/widgets/listview.h +++ b/include/widgets/listview.h @@ -238,6 +238,12 @@ void listview_set_fixed_num_lines ( listview *lv ); */ void listview_set_max_lines ( listview *lv, unsigned int max_lines ); +/** + * @param lv Handler to the listview object. + * + * Set ellipsize modee. + */ +void listview_toggle_ellipsizing ( listview *lv ); /* @} */ #endif // ROFI_LISTVIEW_H diff --git a/include/widgets/textbox.h b/include/widgets/textbox.h index 550fc3fc..6d666ff0 100644 --- a/include/widgets/textbox.h +++ b/include/widgets/textbox.h @@ -68,6 +68,7 @@ typedef struct double xalign; PangoFontMetrics *metrics; + PangoEllipsizeMode emode; int left_offset; // const char *theme_name; @@ -334,5 +335,13 @@ int textbox_get_desired_width ( widget *wid ); * Move the cursor to the end of the string. */ void textbox_cursor_end ( textbox *tb ); + +/** + * @param tb Handle to the textbox + * @param mode The PangoEllipsizeMode to use displaying the text in the textbox + * + * Set the ellipsizing mode used on the string. + */ +void textbox_set_ellipsize ( textbox *tb, PangoEllipsizeMode mode ); /*@}*/ #endif //ROFI_TEXTBOX_H |