diff options
author | Sebastian Reichel <sre@ring0.de> | 2013-02-25 22:33:35 +0100 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2013-02-25 22:33:35 +0100 |
commit | 21e7d9260ebf66a70dc09cd912a0a5aa32abcebd (patch) | |
tree | ae15bbc2879a17a0c6c8c76413b71ad46d8659a9 /src/ui/status.vala | |
parent | 72c29aef1e7ac67149e49d362093fea956edd6bf (diff) | |
download | serial-barcode-scanner-21e7d9260ebf66a70dc09cd912a0a5aa32abcebd.tar.bz2 |
new curses user interface
Diffstat (limited to 'src/ui/status.vala')
-rw-r--r-- | src/ui/status.vala | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/ui/status.vala b/src/ui/status.vala new file mode 100644 index 0000000..db33820 --- /dev/null +++ b/src/ui/status.vala @@ -0,0 +1,24 @@ +using Curses; + +public class StatusPanel { + Window win; + + public StatusPanel() { + win = new Window(1, COLS - 2, LINES-1, 1); + win.bkgdset(COLOR_PAIR(2) | Attribute.BOLD); + + win.clrtobot(); + win.refresh(); + } + + public void set(string msg) { + win.mvaddstr(0,1, msg); + win.clrtobot(); + win.refresh(); + } + + public void redraw() { + win.touchwin(); + win.refresh(); + } +} |