From e18c0f2a23fc9e62a5be13af270cb81326ee6550 Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Tue, 23 Aug 2016 00:06:02 +0300 Subject: flowtop: Add horizontal scrolling over flows table Add left/right scrolling for flows list table to make possible see all the columns with a smaller display size. Handle 'Left' & 'Right' keypress to scroll left or right. Signed-off-by: Vadim Kochan Signed-off-by: Tobias Klauser --- ui.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ui.h') diff --git a/ui.h b/ui.h index 7f4814c..65338d1 100644 --- a/ui.h +++ b/ui.h @@ -6,6 +6,11 @@ #include "list.h" +enum ui_event_id { + UI_EVT_SCROLL_LEFT, + UI_EVT_SCROLL_RIGHT, +}; + enum ui_align { UI_ALIGN_LEFT, UI_ALIGN_RIGHT, @@ -37,6 +42,7 @@ struct ui_table { int col_pad; int width; int height; + int scroll_x; }; extern void ui_table_init(struct ui_table *tbl); @@ -58,4 +64,6 @@ extern void ui_table_row_print(struct ui_table *tbl, uint32_t col_id, extern void ui_table_header_color_set(struct ui_table *tbl, int color); extern void ui_table_header_print(struct ui_table *tbl); +extern void ui_table_event_send(struct ui_table *tbl, enum ui_event_id id); + #endif /* UI_H */ -- cgit v1.2.3-54-g00ecf