Inspired by wiki editing, it might be kind of fun and interesting to make an ASCII GUI language that actually "compiles" into GUI windows based on their position within the text file. It might not look very pretty, but good for quick utilities, system utilities, and newbies.
I envision a format based on:
[widgetType widgetName widgetTitle]
The problem is that if we use position to indicate width (assume fixed-width fonts), we need shortcuts. Thus, both of these may specify a button:
[button myBut "Press Me"]
[b myBut "Press Me"]
And these text boxes:
[text myText "Eat at Joes!"]
[t myText "Eat at Joes!"]
Check-boxes and radio buttons may be more problematic since they need to take up even less space. Perhaps if there is only one "parameter", then assume it is a check-box.
Maybe radio buttons could be identified by a special symbol:
Name aliases could perhaps be used to translate short names or numbers into longer ones (for use with GUI event processors). At the bottom of the page could be a declaration area for such tasks:
[b 1 OK ] [b 2 Cancel]
alias 1 okayButton
alias 2 cancelButton
alias 3 myCheckBox
value myCheck checked
title button7 "Foo Bar"
Note that quotes are not needed for button titles if there are no spaces.
Just an idea. Needs work.
The end-result of this looks a lot like TclTk... which is not very pretty, but is good for quick utilities, system utilities, and newbies. --SimonHeath
The idea here is that the position within the ASCII file indicates screen position. The TclTk
default is nested-based, not coordinate. The ASCII approach tries for rudimentary WYSIWYG. The text itself would probably have to be fixed-pitch. TclTk
also does not take care of a lot of details that one would expect, such as scrollbars on multi-line text boxes.
See also: AsciiArtGuiShorthand