diff options
author | Sebastian Reichel <sre@ring0.de> | 2013-03-26 15:52:57 +0100 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2013-03-26 15:52:57 +0100 |
commit | 7bfb48ef84384ff0460f273ea5841fba628d2a46 (patch) | |
tree | 898d019f33a554f03cac91495adcb7165344382e /src/ui/dialog.vala | |
parent | 03a4e9f901cd36792de2172b4ebb8f6e852fe1cd (diff) | |
download | serial-barcode-scanner-7bfb48ef84384ff0460f273ea5841fba628d2a46.tar.bz2 |
code restructure
Diffstat (limited to 'src/ui/dialog.vala')
-rw-r--r-- | src/ui/dialog.vala | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/ui/dialog.vala b/src/ui/dialog.vala deleted file mode 100644 index 29782e5..0000000 --- a/src/ui/dialog.vala +++ /dev/null @@ -1,36 +0,0 @@ -using Curses; - -public class Dialog { - Window win; - Window subwin; - - public Dialog(string message, string title = "KtT Shopsystem Error", int h=16, int w=60) - requires (title.length <= w-4) - { - int y = LINES/2-h/2; - int x = COLS/2-w/2; - - int title_x = (w-title.length)/2; - - win = new Window(h, w, y, x); - - /* make the dialog white on red */ - win.bkgdset(COLOR_PAIR(2) | Attribute.BOLD); - win.clrtobot(); - - /* message subwindow */ - subwin = win.derwin(h-4, w-4, 2, 2); - subwin.clrtobot(); - subwin.printw(message); - subwin.refresh(); - - /* dialog title */ - win.box(0,0); - win.mvaddstr(0, title_x, title); - win.mvaddch(0, title_x-2, Acs.RTEE); - win.mvaddch(0, title_x-1, ' '); - win.mvaddch(0, title_x+title.length, ' '); - win.mvaddch(0, title_x+title.length+1, Acs.LTEE); - win.refresh(); - } -} |