![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Graphical interface programming in FreeBSD | Sergiu-IT | BSD | 3 | 04-15-2005 06:40 PM |
| How change GRUB command line to graphical interface? | lee_chongeu | Linux | 4 | 04-01-2004 02:09 AM |
| How to change the GRUB command line to graphical interface? | lee_chongeu | Shell Programming and Scripting | 1 | 03-15-2004 08:51 AM |
| Graphical Interface | OOnegative | UNIX for Dummies Questions & Answers | 11 | 07-04-2003 12:21 AM |
| graphical interface via remote login | guanglei_li | UNIX for Advanced & Expert Users | 3 | 03-20-2002 01:51 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How to build graphical interface using shell scripts and ncurses library ?
Hi,
(please don't move this question, as it refers to graphical animation solution, using shell scripts and a number of known graphical objects and using of foreground and background process switch control shell scripts to get objects with refresh/ animation effect). I will provide you with more details, describing the problem. I am trying to learn and build graphical user interface for a Unix system, accessed from MS Vista OS via putty opened terminal session, using shell scripts and box widgets from dialog. One good example I am just testing is Unix dialog widgets I attach below help file of dialog, to let you know, what widgets or boxes are already available. I have already contacted Thomas. The problem is dialog project is 15 years old and no more maintained. Based on ncurses library. The key idea is " Usage: dialog <options> { --and-widget <options> } where options are "common" options, followed by "box" options " So with --and-widget syntax, in theory, I can use more than 1 widget box on a screen, and move between boxes, using tab. In theory. In practice such objects should be run in background to be kept alive for all the time, or a shell script displaying boxes should loop box objects to get animation, data refresh effect. As only one object is run in background tailboxbg there is an excellent example how to write a shell script, opening 3 widgets (boxes ) on a screen and using tab to swap between boxes. Example : dialog --keep-window --begin 2 2 --yesno "" 0 0 \ --and-widget --keep-window --begin 4 4 --yesno "" 0 0 \ --and-widget --keep-window --begin 6 6 --yesno "" 0 0 I get 3 yesno windows on a screen. Unfortunately clicking on yes in first box opens 2nd box and clicking yes in 2nd box, forces 3rd box to open. The above process is called chaining or otherwise. And I cannot use tab to switch between boxes, as clicking on yes, closes widget application and what is seen is --keep-window (graphics only, not a object). So my idea is to put each object into seperate shell script and find out a solution and procedure, to run some shell scripts in background and have --keep-window for and in each shell script on. I don't know how to set shell script as a background process & ? And switch between background and foreground to get refresh effect. Exactly. I am looking shell script solution, as dialog widgets use examples come as shell scripts. I can't expect to write new boxes on myself in due time, as c + ncurses code looks really complicated. thanks Jack ------ dialog help [admin@oo root]$ dialog cdialog (ComeOn Dialog!) version 1.1-20080819 Copyright 2000-2007,2008 Thomas E. Dickey This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * Display dialog boxes from shell scripts * Usage: dialog <options> { --and-widget <options> } where options are "common" options, followed by "box" options Special options: [--create-rc "file"] Common options: [--ascii-lines] [--aspect <ratio>] [--backtitle <backtitle>] [--begin <y> <x>] [--cancel-label <str>] [--clear] [--colors] [--column-separator <str>] [--cr-wrap] [--default-item <str>] [--defaultno] [--exit-label <str>] [--extra-button] [--extra-label <str>] [--help-button] [--help-label <str>] [--help-status] [--ignore] [--input-fd <fd>] [--insecure] [--item-help] [--keep-tite] [--keep-window] [--max-input <n>] [--no-cancel] [--no-collapse] [--no-kill] [--no-label <str>] [--no-lines] [--no-ok] [--no-shadow] [--nook] [--ok-label <str>] [--output-fd <fd>] [--output-separator <str>] [--print-maxsize] [--print-size] [--print-version] [--quoted] [--separate-output] [--separate-widget <str>] [--shadow] [--single-quoted] [--size-err] [--sleep <secs>] [--stderr] [--stdout] [--tab-correct] [--tab-len <n>] [--timeout <secs>] [--title <title>] [--trace <file>] [--trim] [--version] [--visit-items] [--yes-label <str>] Box options: --calendar <text> <height> <width> <day> <month> <year> --checklist <text> <height> <width> <list height> <tag1> <item1> <status1>... --dselect <directory> <height> <width> --editbox <file> <height> <width> --form <text> <height> <width> <form height> <label1> <l_y1> <l_x1> <item1> <i_y1> <i_x1> <flen1> <ilen1>... --fselect <filepath> <height> <width> --gauge <text> <height> <width> [<percent>] --infobox <text> <height> <width> --inputbox <text> <height> <width> [<init>] --inputmenu <text> <height> <width> <menu height> <tag1> <item1>... --menu <text> <height> <width> <menu height> <tag1> <item1>... --mixedform <text> <height> <width> <form height> <label1> <l_y1> <l_x1> <item1> <i_y1> <i_x1> <flen1> <ilen1> <itype>... --mixedgauge <text> <height> <width> <percent> <tag1> <item1>... --msgbox <text> <height> <width> --passwordbox <text> <height> <width> [<init>] --passwordform <text> <height> <width> <form height> <label1> <l_y1> <l_x1> <item1> <i_y1> <i_x1> <flen1> <ilen1>... --pause <text> <height> <width> <seconds> --progressbox <height> <width> --radiolist <text> <height> <width> <list height> <tag1> <item1> <status1>... --tailbox <file> <height> <width> --tailboxbg <file> <height> <width> --textbox <file> <height> <width> --timebox <text> <height> <width> <hour> <minute> <second> --yesno <text> <height> <width> Auto-size with height and width = 0. Maximize with height and width = -1. Global-auto-size if also menu_height/list_height = 0. --- |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|