blob: f05eede302a62a6a302ea8b198de197318996172 [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301#VERSION
2This is Version 00.90.00 of the demo package.
3#MENUKEYS
4In 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
micky3879b9f5e72025-07-08 18:04:53 -040030 - CTRL-X eXit the form
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031 - CTRL-F Go forward to the next field
32 - CTRL-B Go backward to the previous field
micky3879b9f5e72025-07-08 18:04:53 -040033 - CTRL-L Go to the field left of the current one
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053034 - CTRL-R Go to the field right of the current one
micky3879b9f5e72025-07-08 18:04:53 -040035 - CTRL-U Go to the field above the current one
36 - CTRL-D Go to the field below the current one
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053037
micky3879b9f5e72025-07-08 18:04:53 -040038 - CTRL-W Go to the next word in the field
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053039 - 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
micky3879b9f5e72025-07-08 18:04:53 -040046 - 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 Kachhape6a01f52011-07-20 11:45:59 +053051
micky3879b9f5e72025-07-08 18:04:53 -040052 - CTRL-N Next choice in a choice field (Enumerations etc.)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053053 - CTRL-P Previous choice in a choice field.
54#HELP
55#HELPKEYS
56You may scroll with the Cursor Up/Down Keys.
Steve Kondikae271bc2015-11-15 02:50:53 +010057You may leave the help with the Function Key labeled 'Quit'.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053058#INHELP
59You are already in the help system.
Steve Kondikae271bc2015-11-15 02:50:53 +010060You may leave the help with the Function Key labeled 'Quit'.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053061#MAIN
62This is the main menu of the sample program for the ncurses Ada95
Steve Kondikae271bc2015-11-15 02:50:53 +010063binding. The main intention of the demo is not to demonstrate or
micky3879b9f5e72025-07-08 18:04:53 -040064test all the features of ncurses and its subsystems, but to provide
65to you some sample code how to use the binding with Ada95.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053066
67You 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.
micky3879b9f5e72025-07-08 18:04:53 -040074
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053075#MAINPAD
76You may press at any place in this demo CTRL-C. This will give you a command
77window. You can just type in the Label-String of a function key, then this
78key will be simulated. This should help you to run the application even if
79you run it on a terminal with no or only a few function keys. With CTRL-N
80and CTRL-P you may browse through the possible values in the command window.
81#MENU00
82Here we give you a selection of various menu demonstrations.
83#MENU-PAD00
84This menu itself is a demo for a single valued, 1-column menu with
85descriptions for the items, a marker and a padding character between
86the item name and the description.
87#MENU01
88This is a demo of the some of the menu layout options. One of them
micky3879b9f5e72025-07-08 18:04:53 -040089is the spacing functionality. Just press the Key labeled "Flip" to
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053090flip between the non-spaced and a spaced version of the menu. Please
micky3879b9f5e72025-07-08 18:04:53 -040091note that this functionality is unique for ncurses and is not found
92in the SVr4 menu implementation.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053093
micky3879b9f5e72025-07-08 18:04:53 -040094This is a menu that sometimes does not fit into its window and
95therefore it becomes a scroll menu.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053096
97You can also see here very nicely the pattern matching functionality
98of menus. Type for example a 'J' and you will be positioned to the
99next item after the current starting with a 'J'. Any more characters
100you type in make the pattern more specific. With CTRL-A and CTRL-Z
Steve Kondikae271bc2015-11-15 02:50:53 +0100101(for more details press the Key labeled "Keys") you can browse
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530102through all the items matching the pattern.
103
104You may change the format of the menu. Just press one of the keys
Steve Kondikae271bc2015-11-15 02:50:53 +0100105labeled "4x1", "4x2" or "4x3" to get a menu with that many rows
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530106and columns.
107
108With the Keys "O-Row" or "O-Col" (they occupy the same label and
micky3879b9f5e72025-07-08 18:04:53 -0400109switch on selection) you can change the major order scheme for
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530110the menu. If "O-Col" is visible, the menu is currently major
111ordered by rows, you can switch to major column order by pressing
micky3879b9f5e72025-07-08 18:04:53 -0400112the key. If "O-Row" is visible, it is just the reverse situation.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530113This Key is not visible in "4x1" layout mode, because in this case
114the functionality makes no sense.
115
116With the Keys "Multi" or "Singl" (they occupy the same label and
117switch on selection) you can change whether or not the menu allows
118multiple or only single selection.
119
120With the Keys "+Desc" or "-Desc" (they occupy the same label and
121switch on selection) you can change whether or not the descriptions
122for each item should be displayed. Please not that this key is
123not visible in the "4x3" layout mode, because in this case the
Steve Kondikae271bc2015-11-15 02:50:53 +0100124menu would not fit on a typical 80x24 screen.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530125
126With the Keys "Disab" or "Enab" (they occupy the same label and
127switch on selection) you can dis- or enable the selectability of
128the month with 31 days.
129#MENU-PAD01
130You may press "Flip" to see the effect of ncurses unique menu-spacing.
131The Keys "4x1", "4x2" and "4x3" will change the format of the menu.
132Please note that this is a scrolling menu. You may also play with the
133pattern matching functionality or try to change the format of the menu.
Steve Kondikae271bc2015-11-15 02:50:53 +0100134For more details press the Key labeled "Help".
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530135#FORM00
136This is a demo of the forms package.
137#FORM-PAD00
138Please note that this demo is far from being complete. It really shows
micky3879b9f5e72025-07-08 18:04:53 -0400139only a small part of the functionality of the forms package. Let's hope
Steve Kondikae271bc2015-11-15 02:50:53 +0100140the next version will have a richer demo (You want to contribute ?).
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530141#NOTIMPL
142Sorry this functionality of the demo is not implemented at the moment.
143Remember this is a freeware project, so I can use only my very rare
144free time to continue coding. If you would like to contribute, you
145are very welcome !
146#CURSES00
147This is a menu where you can select some different demos of the ncurses
148functionality.
149#CURSES-PAD00
150Please note that this demo is far from being complete. It really shows
micky3879b9f5e72025-07-08 18:04:53 -0400151only a small part of the functionality of the curses package. Let's hope
Steve Kondikae271bc2015-11-15 02:50:53 +0100152the next version will have a richer demo (You want to contribute ?).
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530153#MOUSEKEYS
154In this demo you may use this keys:
155
Steve Kondikae271bc2015-11-15 02:50:53 +0100156 - 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 Kachhape6a01f52011-07-20 11:45:59 +0530159
160You may click the mouse buttons at any location at the screen and look
161at the protocol window !
162#MOUSE00
micky3879b9f5e72025-07-08 18:04:53 -0400163A rather simple use of a mouse as demo. It is there just to test the
164code and to provide the sample source.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530165
166It might be of interest, that the output into the protocol window is
167done by the (n)curses Text_IO subpackages. Especially the output of
micky3879b9f5e72025-07-08 18:04:53 -0400168the button and state names is done by Ads's enumeration IO, which
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530169allows you to print the names of enumeration literals. That's really
170nice.
171#MOUSE-PAD00
micky3879b9f5e72025-07-08 18:04:53 -0400172This is a very simple demo of the mouse features of ncurses. It is there
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530173just to test whether or not the generated code for the binding really
174works on the different architectures (seems so).
175#ATTRIBDEMO
176Again this is a more than simple demo and just here to give you the
177sourcecode.
178#ATTRIBKEYS
179You may press one of the three well known standard keys of this demo.
180#ATTRIB-PAD00
181Again this is a more than simple demo and just here to give you the
Steve Kondikae271bc2015-11-15 02:50:53 +0100182source code. Feel free to contribute more.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530183#TEXTIO
184#TEXTIOKEYS
185#TEXTIO-PAD00
186#END