Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 1 | #VERSION |
| 2 | This is Version 00.90.00 of the demo package. |
| 3 | #MENUKEYS |
| 4 | In a menu you can use the following Keys in the whole application: |
| 5 | |
| 6 | - CTRL-X eXit the menu |
| 7 | - CTRL-N Go to next item |
| 8 | - CTRL-P Go to previous item |
| 9 | - CTRL-U Scroll up one line |
| 10 | - CTRL-D Scroll down one line |
| 11 | - CTRL-F Scroll down one page |
| 12 | - PAGE DOWN Scroll down one page |
| 13 | - PAGE UP Scroll back one page |
| 14 | - CTRL-B Scroll back one page |
| 15 | - CTRL-Y Clear pattern |
| 16 | - CTRL-H Delete last character from pattern |
| 17 | - Backspace Delete last character from pattern |
| 18 | - CTRL-A Next pattern match |
| 19 | - CTRL-E Previous pattern match |
| 20 | - CTRL-T Toggle item in a multi-selection menu |
| 21 | - CR or LF Select an item |
| 22 | - HOME Key Go to the first item |
| 23 | - F3 Quit the menu |
| 24 | - Cursor Down Down one item |
| 25 | - Cursor Up Up one item |
| 26 | - Cursor Left Left one item |
| 27 | - Cursor Right Right one item |
| 28 | - END Key Go to last item |
| 29 | #FORMKEYS |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 30 | - CTRL-X eXit the form |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 31 | - CTRL-F Go forward to the next field |
| 32 | - CTRL-B Go backward to the previous field |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 33 | - CTRL-L Go to the field left of the current one |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 34 | - CTRL-R Go to the field right of the current one |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 35 | - CTRL-U Go to the field above the current one |
| 36 | - CTRL-D Go to the field below the current one |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 37 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 38 | - CTRL-W Go to the next word in the field |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 39 | - CTRL-T Go to the previous word in the field |
| 40 | |
| 41 | - CTRL-A Go to the beginning of the field |
| 42 | - CTRL-E Go to the end of the field |
| 43 | |
| 44 | - CTRL-I Insert a blank character at the current position |
| 45 | - CTRL-O Insert a line |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 46 | - CTRL-V Delete a character |
| 47 | - CTRL-H Delete previous character |
| 48 | - CTRL-Y Delete a line |
| 49 | - CTRL-G Delete a word |
| 50 | - CTRL-K Clear to end of field |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 51 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 52 | - CTRL-N Next choice in a choice field (Enumerations etc.) |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 53 | - CTRL-P Previous choice in a choice field. |
| 54 | #HELP |
| 55 | #HELPKEYS |
| 56 | You may scroll with the Cursor Up/Down Keys. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 57 | You may leave the help with the Function Key labeled 'Quit'. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 58 | #INHELP |
| 59 | You are already in the help system. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 60 | You may leave the help with the Function Key labeled 'Quit'. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 61 | #MAIN |
| 62 | This is the main menu of the sample program for the ncurses Ada95 |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 63 | binding. The main intention of the demo is not to demonstrate or |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 64 | test all the features of ncurses and its subsystems, but to provide |
| 65 | to you some sample code how to use the binding with Ada95. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 66 | |
| 67 | You may select this options: |
| 68 | |
| 69 | * Look at some ncurses core functions |
| 70 | * Look at some features of the menu subsystem |
| 71 | * Look at some features of the form subsystem |
| 72 | * Look at the output of the Ada.Text_IO like functions |
| 73 | for ncurses. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 74 | |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 75 | #MAINPAD |
| 76 | You may press at any place in this demo CTRL-C. This will give you a command |
| 77 | window. You can just type in the Label-String of a function key, then this |
| 78 | key will be simulated. This should help you to run the application even if |
| 79 | you run it on a terminal with no or only a few function keys. With CTRL-N |
| 80 | and CTRL-P you may browse through the possible values in the command window. |
| 81 | #MENU00 |
| 82 | Here we give you a selection of various menu demonstrations. |
| 83 | #MENU-PAD00 |
| 84 | This menu itself is a demo for a single valued, 1-column menu with |
| 85 | descriptions for the items, a marker and a padding character between |
| 86 | the item name and the description. |
| 87 | #MENU01 |
| 88 | This is a demo of the some of the menu layout options. One of them |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 89 | is the spacing functionality. Just press the Key labeled "Flip" to |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 90 | flip between the non-spaced and a spaced version of the menu. Please |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 91 | note that this functionality is unique for ncurses and is not found |
| 92 | in the SVr4 menu implementation. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 93 | |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 94 | This is a menu that sometimes does not fit into its window and |
| 95 | therefore it becomes a scroll menu. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 96 | |
| 97 | You can also see here very nicely the pattern matching functionality |
| 98 | of menus. Type for example a 'J' and you will be positioned to the |
| 99 | next item after the current starting with a 'J'. Any more characters |
| 100 | you type in make the pattern more specific. With CTRL-A and CTRL-Z |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 101 | (for more details press the Key labeled "Keys") you can browse |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 102 | through all the items matching the pattern. |
| 103 | |
| 104 | You may change the format of the menu. Just press one of the keys |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 105 | labeled "4x1", "4x2" or "4x3" to get a menu with that many rows |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 106 | and columns. |
| 107 | |
| 108 | With the Keys "O-Row" or "O-Col" (they occupy the same label and |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 109 | switch on selection) you can change the major order scheme for |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 110 | the menu. If "O-Col" is visible, the menu is currently major |
| 111 | ordered by rows, you can switch to major column order by pressing |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 112 | the key. If "O-Row" is visible, it is just the reverse situation. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 113 | This Key is not visible in "4x1" layout mode, because in this case |
| 114 | the functionality makes no sense. |
| 115 | |
| 116 | With the Keys "Multi" or "Singl" (they occupy the same label and |
| 117 | switch on selection) you can change whether or not the menu allows |
| 118 | multiple or only single selection. |
| 119 | |
| 120 | With the Keys "+Desc" or "-Desc" (they occupy the same label and |
| 121 | switch on selection) you can change whether or not the descriptions |
| 122 | for each item should be displayed. Please not that this key is |
| 123 | not visible in the "4x3" layout mode, because in this case the |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 124 | menu would not fit on a typical 80x24 screen. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 125 | |
| 126 | With the Keys "Disab" or "Enab" (they occupy the same label and |
| 127 | switch on selection) you can dis- or enable the selectability of |
| 128 | the month with 31 days. |
| 129 | #MENU-PAD01 |
| 130 | You may press "Flip" to see the effect of ncurses unique menu-spacing. |
| 131 | The Keys "4x1", "4x2" and "4x3" will change the format of the menu. |
| 132 | Please note that this is a scrolling menu. You may also play with the |
| 133 | pattern matching functionality or try to change the format of the menu. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 134 | For more details press the Key labeled "Help". |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 135 | #FORM00 |
| 136 | This is a demo of the forms package. |
| 137 | #FORM-PAD00 |
| 138 | Please note that this demo is far from being complete. It really shows |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 139 | only a small part of the functionality of the forms package. Let's hope |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 140 | the next version will have a richer demo (You want to contribute ?). |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 141 | #NOTIMPL |
| 142 | Sorry this functionality of the demo is not implemented at the moment. |
| 143 | Remember this is a freeware project, so I can use only my very rare |
| 144 | free time to continue coding. If you would like to contribute, you |
| 145 | are very welcome ! |
| 146 | #CURSES00 |
| 147 | This is a menu where you can select some different demos of the ncurses |
| 148 | functionality. |
| 149 | #CURSES-PAD00 |
| 150 | Please note that this demo is far from being complete. It really shows |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 151 | only a small part of the functionality of the curses package. Let's hope |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 152 | the next version will have a richer demo (You want to contribute ?). |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 153 | #MOUSEKEYS |
| 154 | In this demo you may use this keys: |
| 155 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 156 | - Key labeled "Help" to get a help |
| 157 | - Key labeled "Keys" is what you are reading now |
| 158 | - Key labeled "Quit" to leave the demo |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 159 | |
| 160 | You may click the mouse buttons at any location at the screen and look |
| 161 | at the protocol window ! |
| 162 | #MOUSE00 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 163 | A rather simple use of a mouse as demo. It is there just to test the |
| 164 | code and to provide the sample source. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 165 | |
| 166 | It might be of interest, that the output into the protocol window is |
| 167 | done by the (n)curses Text_IO subpackages. Especially the output of |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 168 | the button and state names is done by Ads's enumeration IO, which |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 169 | allows you to print the names of enumeration literals. That's really |
| 170 | nice. |
| 171 | #MOUSE-PAD00 |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 172 | This is a very simple demo of the mouse features of ncurses. It is there |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 173 | just to test whether or not the generated code for the binding really |
| 174 | works on the different architectures (seems so). |
| 175 | #ATTRIBDEMO |
| 176 | Again this is a more than simple demo and just here to give you the |
| 177 | sourcecode. |
| 178 | #ATTRIBKEYS |
| 179 | You may press one of the three well known standard keys of this demo. |
| 180 | #ATTRIB-PAD00 |
| 181 | Again this is a more than simple demo and just here to give you the |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 182 | source code. Feel free to contribute more. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 183 | #TEXTIO |
| 184 | #TEXTIOKEYS |
| 185 | #TEXTIO-PAD00 |
| 186 | #END |