summaryrefslogtreecommitdiff
path: root/ui.h
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2016-08-23 00:06:02 +0300
committerTobias Klauser <tklauser@distanz.ch>2016-09-15 18:28:28 +0200
commite18c0f2a23fc9e62a5be13af270cb81326ee6550 (patch)
treebdb0b5a95033c98985e9c3ca9f26fd8a9b6ab4f5 /ui.h
parentca4cd5bec239b88b72fccb2f4849e634a504b260 (diff)
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 <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'ui.h')
-rw-r--r--ui.h8
1 files changed, 8 insertions, 0 deletions
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 */