summaryrefslogtreecommitdiffstats
path: root/lib/libforms
diff options
context:
space:
mode:
authorpaul <paul@FreeBSD.org>1995-01-25 03:34:48 +0000
committerpaul <paul@FreeBSD.org>1995-01-25 03:34:48 +0000
commitf30e38dd6d593f3fc7b3d5b9763b8d8ee5797786 (patch)
treee752f52d093c50e9cdc70cf172dfb2819767659a /lib/libforms
parentdad15ae4bde95f477d39a714def057e7cfad8afe (diff)
downloadFreeBSD-src-f30e38dd6d593f3fc7b3d5b9763b8d8ee5797786.zip
FreeBSD-src-f30e38dd6d593f3fc7b3d5b9763b8d8ee5797786.tar.gz
New example that uses the new forms language.
Diffstat (limited to 'lib/libforms')
-rw-r--r--lib/libforms/examples/example.frm102
1 files changed, 96 insertions, 6 deletions
diff --git a/lib/libforms/examples/example.frm b/lib/libforms/examples/example.frm
index f09ded5..66d53c9 100644
--- a/lib/libforms/examples/example.frm
+++ b/lib/libforms/examples/example.frm
@@ -1,6 +1,96 @@
-Form template: 0 0 24 79
-Text 0 0 "This is non-editable text field"
-Input 1 2 4 2 3 3 2 2 8 "Prompt1:" 2 20 10 25 "First"
-Input 2 3 1 4 2 2 5 2 8 "Prompt2:" 5 20 10 25 "Second"
-Input 3 4 2 4 1 1 2 40 8 "Prompt3:" 2 50 10 25 "Third"
-Input 4 1 2 1 4 4 10 2 8 "Prompt4:" 10 20 10 25 "Fourth"
+Field Title {
+ attributes = A_BOLD
+ text = "A Simple Demo"
+}
+
+Field field1 {
+ attributes = A_BLINK|A_BOLD
+ text = "This text is bold and flashy"
+}
+
+Field field2 {
+ text = "This is an input field with a default"
+}
+
+Field field3 {
+ width = 30
+ default = "This is a default entry"
+ limit = 10
+}
+
+Field field4 {
+ text = "This is a labelled input field"
+}
+
+Field field5 {
+ label = "A temp. label"
+}
+
+Field field6 {
+ text = "Some options to choose from: "
+}
+
+Field field7 {
+ selected = 0
+ options = "Choose", "another", "of", "these"
+}
+
+Field field8 {
+ width = 6
+ attributes = A_BOLD|A_REVERSE
+ action = "EXIT"
+ function = exit_form
+}
+
+Field field9 {
+ attributes = A_BOLD|A_REVERSE
+ action = "CANCEL"
+ function = cancel_form
+}
+
+Link input1 as field3 {
+ next = input2
+ down = input2
+}
+
+Link input2 as field5 {
+ next = menu1
+ up = input1
+ down = menu1
+}
+
+Link menu1 as field7 {
+ next = exit
+ up = input2
+ down = exit
+}
+
+Link exit as field8 {
+ up = menu1
+ right = cancel
+}
+
+Link cancel as field9 {
+ up = input1
+ down = input1
+ left = exit
+ right = input1
+}
+
+Form example at 0,0 {
+ height = 24
+ width = 80
+
+ Field Title at 0,15
+
+ Field field1 at 3,23
+ Field field2 at 7, 2
+ Field field4 at 11, 2
+ Field field6 at 15, 2
+
+ Field input1 at 7,45
+ Field input2 at 11,45
+ Field menu1 at 15,45
+ Field exit at 20,20
+ Field cancel at 20,43
+}
OpenPOWER on IntegriCloud