The 11.01.2002  Syntax for creating Dialog boxes :

UPPER CASE and lower case  are not distinguished.

For one complete Dialog Box :
'''''''''''''''''''''''''''''
     /--------<---------\    /---------<---------\                    /----------<----------\
    v                    ^  v                     ^                  v                       ^
* --|- Directive -- CR --|--|- Definition -- CR --|-- String -- CR --|- Instructions -- CR --|-- { ...END } -->
                                                   (Dialog box title)
CR means that you must go to the next line.

Directive :
'''''''''''
         V  --- { NOOK } -------------------------------------------------------------\
            |                                                                          \
         V  --- { NOCANCEL } -----------------------------------------------------------\
            |                                                                            \
         V  --- { TABBEFORE( } -----\                                                     \
            |                        \                                                     \
V --{ @$ }--|-- { TABAFTER( } -------->-- Any character ----->----------------|-- { ) } ---->---->
            |                        /                                     |  v            /
         V  --- { TABINVISIBLE( } --/                                      |   \---->-----/
            |                                                              |
         V  --- { OKLABEL( } ------ Label ---------------------------------|
            |                                                              |
         V  --- { CANCELLABEL( } -- Label ---------------------------------|
            |                                                              |
         V  --- { INTERLINE( } --------------------->--- Word32 -----------| # 180 = the default.
            |                                      /                       | # 100 = 1 character high
         V  --- { LEFTMARGIN ( } -----------------/                        | # Left Margin in 100*character width
            |                                    /                         |
            --- { RIGHTMARGIN( } ---------------/                          | # Right Margin in 100*character width
            |                                  /                           |
         V  --- { TOPMARGIN ( } --------------/                            | # Top Margin in 100*character width
            |                                /                             |
         V  --- { DLGWIDTH ( } -------------/                              | # Dialog width in 100*character width
            |                              /                               |
         V  --- { DEFBTNHEIGHT( } ---------|                               | in 100* character
            |                              |                               |
         V  --- { DEFBTNHEIGHTPIX( } ------|                               | in pixels
            |                              |                               |
         V  --- { DEFLINEHEIGHT( } --------|                               | in 100* character
            |                              |                               |
         V  --- { DEFLINEHEIGHTPIX( } -----|                               | in pixels
            |                              |                               |
         V  --- { BMORGMSG( } -------------|                               | in the .msg file
            |                                                              |
         V  --- { DLGNAME( } ------ Label ---------------------------------|
            |                                                              |
            |                    /------<-------\                          |
            |                   v               ^                          | # It's a property of the
         V  --- { QUITID( } ----|---Id Word32 --|--------------------------| # dialog box.
            |                                                              |
         V  --- { DLGPOS( } ------- Rel Word32 -- { , } -- Rel Word32 -----| #   0 = left  or top
                                                                             # 100 = Right or bottom

Definition :
''''''''''''
                                        /----- { + } ---<--------\
                                       v                          ^
* -- { @ } -- Identificator -- { = } --|--|-- Specification ---|--|--->
                                          v                    ^
                                           \- Specialisation -/

Specification must be the first to be taken into account.
No specifications means it is an edit box. (But is can be specialised, i.e. having hints, menus, ...)

Specification :
'''''''''''''''
V -- { STATIC( } ------------------ RGB Bytes ----\
  |                                                \
V -- { COMBODROPDOWN( } -------->--- Msg Word32 ---->------------|-- { ) } --->--->
  |                            /                            |    v           /
V -- { COMBODROPDOWNLIST( } --/                             |     \----->---/
  |                                                         |
X -- { BTN( } ---------->----- Label -----------------------| # use the command to create buttons
  |                    /                                    |
X -- { BTNBOTTOM( } --/                                     | # not implemented, neither in the commands
  |                                                         |
V -- { RADIO( } ---->-- Var Word32 -- { , } -- Label -------|
  |                /
V -- { CHECK( } --/
  |
X -- { SCROLL ( } ...  to come later
  |
X -- { LISTBOX( } ...  to come later

Specialisation:
'''''''''''''''
X --{ XPOS( }----\
  |               \
X --{ YPOS( }------\
  |                 \
X --{ WIDTH( }------->---Rel Integer--{ , }--Char Integer--{ , }--MM Integer--{ , }--Pix Integer--{ ) }--\
  |                 /                                                                                     v
X --{ HEIGHT( }----/                                                                                      |
  |                                                                                                       |
X --{ REFERENCE( }------ Rel Integer -{ , }- Rel Integer- { , }- Rel Integer- { , }- Rel Integer- { ) }---|
  |                   X Ctrl position      Y Ctrl position     X Parent position    Y Parent position     |
  |                                                                                                       |
V --{ BACKCOLOR( } ------------>-------- RGB Bytes -----------------|------------------------ { ) } ---------->
  |                           /                                     |
V --{ TEXTCOLOR( } ----------/                                      |
  |                          /                                      |
V --{ WINDOWOLOR( } --------/                                       |
  |                                                                 |
V --{ SORT() } -----------------------------------------------------| # unsorted = default
  |                                                                 |
V --{ STYLE( } ----------- Word 32 ---------------------------------| # Can give a number to modify the style
  |                                                                 | # but it is not very convenient.
V --{ ID( } -------------------\                                    |
  |                             \                                   |
V --{ HELPPOPUP( } -------------->---- Msg Word32 ------------------|
  |                              /                                  |
V --{ HELPDIALOG( } ------------/                                   |
  |                            /                                    |
V --{ MENU( } ----------------/                                     |
  |                          /                                      |
V --{ BMORGMSG( } ----------/                                       |
  |                                                                 |
V --{ BTNHEIGHTPIX( } -------->---- pix Word32 ---------------------|
  |                          /                                      |
V --{ BTNWIDTHPIX( } -------/                                       |
  |                                                                 |
V --{ HINT( } ------------------- Label ----------------------------|

Instructions :
''''''''''''''
    /---------<---------\
   v                     ^
*--|-- One instruction --|---->


OneInstruction :
'''''''''''''
                                                           /----<----\             /----<----\
                                                          v           ^           v           ^
  --{ @ } --|-- Var Word32 --->--|- Identificator --|--|--|-- { _ } --|-- { . } --|-- { _ } --|-->--\
  |         v                /   v                  ^  v                                             \
  |          \- Id Word32 --/     \------->--------/   |----- { ( } -- Length Integer --|-- { ) } ---->--->
  |                                                                                     v            /
  |                                                                                      \---->-----/
  |                                                                                                /
 ----- Normal String ---------------------------------------------------------------->------------/
  |                                                                                              /
  --{ @! } ---- Command ------------------------------------------------------------------------/


Command :
'''''''''

V --|--- { BM( }  -- Word32 -- { , } ---- msg Word32 --|-- Identificator -----------------|
    |                                                  |                                  |
    |                                                  |                                  |
    |                                                  |                                  |
V --|--- { Btn( } -- Word32 -- { , } ------ Lablel ----->---------------------------------|
    |                                                                                     |
V   ---- { Hint( } ------------------------ Label ----------------------------------------|
    |                                                                                     |
V   ---- { ID( } --------------------->---- Word32 --------------------------------->-----|-- { ) } ------->
    |                                 |
V   ---- { HelpPopup( } --------------|
    |                                 |
V   ---- { HelpDialog( } -------------|
    |                                 |
V   ---- { MENU( } -------------------|
    |                                 |
V   ---- { INTERLINE( } --------------|
    |                                 |
V   ---- { DEFBTNHEIGHT( } -----------|
    |                                 |
V   ---- { LINEHEIGHTPIX( } ----------|
    |
V   ---- { NONEWLINE() } ------------------------------------------------>---------------------------->
    |
V   -----{ DELTAHEIGHT( } --- Int32  -- { ) } --------> # change the height of the line
                                                        # units = 100*character height. (can be negative)

Label
'''''

*--|--- { " } ------ String -- { " } -------------------->
   |                                                  |
   -------------- Msg Word32 -------------------------|



Identificator :  (Restricted to 8 letters maximu. (to use the two word32 in the hash table)
'''''''''''''''
     /----<-----\
    v            ^
*---|-- Letter --|-->

Letter :
''''''''
    |-- { A } --|
    |           |
    |-- { B } --|
*---|     .     |---->
    |     .     |
    |     .     |
    |-- { Z } --|

Normal String :
'''''''''''''''
     /---------<---------------------------\        # Two  @  are taken as one normal  @  character
    v                                       ^
*---|-- Any Character except one single @ --|-->

String :
''''''''
     /---------<-------\
    v                   ^
*---|-- Any Character --|-->

String are always interpreted in the following way.
If an  '@'  followed by a number is in the string, it is converted to the value of
the variable linked to this number, if any exist. If not, it is left as it is.
Two @ are take as one.
Could be added after  '@Number'  a formatting information.  Maybe it will come later. Here is an example :


Any Character : Is any Charater of the extended (8 bits) ANSI code.
'''''''''''''''

RGB Byte :
''''''''''
*--------- Byte -- { , } -- Byte -- { , } -- Byte ---->

Byte is a Word32 between  0 and 255.


Word32 :
''''''''
                     /----<----\          # With the  @  means that we take the value of the variable
                    v           ^         # linked with the number which follows
*--|------------>---|-- Digit --|-->
   |           /
   -- { @ } --/

Integer :
'''''''''
   -- { - } --\      /----<----\
   |           \    v           ^
*--|------------>---|-- Digit --|-->
   |           /
   -- { @ } --/

Digit :
'''''''
    |-- { 0 } --|
    |           |
    |-- { 1 } --|
*---|     .     |---->
    |     .     |
    |     .     |
    |-- { 9 } --|



Msg Word32 :
''''''''''''
Is a word32, defining a text in the text message file (.msg).

Var Word32 :
''''''''''''
Is a Word32, defining a variable of the program.

Id Word32 :
'''''''''''
Is a Word32 defining the ID of a button.

Rel Integer :
'''''''''''''
Is an Integer, defining a relative position in per cent.
i.e. :   0 defines the LEFT  edge, or the TOP
       100 defines the RIGHT edge, or the BOTTOM
        50 defines the center
        30 is at 30% from the LEFT  (TOP)    border, which
           is at 70% from the RIGHT (BOTTOM) border

Char Integer :
''''''''''''''
Is an Integer, defining the position in 1/100 of a character WIDTH or HEIGHT.

MM Integer :
''''''''''''
Is an Integer, defining the position in 1/100 of milimeters.

Pix Integer :
'''''''''''''
Is an Integer, defining the in pixels.


String are always interpreted in the following way.
If an  '@'  followed by a number is in the string, it is converted to the value of
the variable linked to this number, if any exist. If not, it is left as it is.
Two @ are take as one.
Could be added after  '@Number'  a formatting information.  Maybe it will come later. Here is an example :

VarString :  # Not used any more
'''''''''''
                         /-- { R( } --\
*-{ @ }--- Var Integer --|-- { L( } ---- Length Integer -- { ) } ------>
  |                      |-- { C( } --/                           /
  |                      \---------------------------------------/
  \                                                             /
   --------- String -------------------------------------------/




Examples :
==========
See better examples in  tEx035.pp  tEx038.pp tEx0041.pp tEx0042.pp tEx0043.pp tEx0044.pp

11199 # This is a first example. This first line is ignored, the description begins at the next line
#***************************************************************************************************
# Directives
# ----------
0 @$Tab(After, :)
0 @$Tab(Invisible, )

# Definitions
# -----------
0 @S = Static(0,0,128) # (.,.,.) = RGB colours, and the text will be left alligned (this is the default)
#
# Dialog Title
# ------------
0 -=- My Dialog Title -=-     The    @1010(11     Version : @1140(6
#------------------------------------------------------------------
# Instructions
# ------------
0 Enter a number : @01(7  # will create an edit box, allowing to enter an integer of 7 digits.
0 Enter a Float : @02____.__ # will create an edit box, for a Float number with 2 digits after the comma
0 Enter two Strings : @03(60 @03(5
0 # the line must be non empty, to be taken into account. Here, this will introduce an empty line.
0 Enter some more valeurs :
0 Give a RGB color : Red = @04___  Green = @05___  Blue = @06___  numbers in [0..255]
0 Time constant : @11_____ [seconds]
0 Length : @12(8 [milimeters]
0                # again must be none empty to be taken into account. I will not say it the next time
0 Here a text with a modified color : @21S(40
0 ...END

11299 # This is a second example. It is an example of a warnig message.
#**********************************************************************
# Directives
# ----------
0 @$NoCancel
0 @$NoOK
0 @$QUITID(3, 5, 6, 7) # pressing these buttons, will quit the dialog box, like the OK button
#
# Definitions
# -----------
0 @S = Static(0,0,128) # (.,.,.) = RGB colours
#
# Dialog Title
# ------------
0 Too many graphic windows opened.
# --------------------------------
#
# Instructions
# ------------
0 There are too many graphic windows opened to open a new one.
0 We propose to save and close an opended window.
0 The measurement @32100S(70
0 @32101S(80
0 @!Btn(6, "&Save and close")  @!Btn(7, "&Close without saving")  @!Btn(3, "Other choice")
0 @!Btn(5, "&Next measurement")
0 ...END


# Values to fill in a combo box,
11301 #
0 First line of the combo box
0 Second line of the combo box
0 Third line of the combo box
0 etc.
0 ...END  # must indicate the end

# Values to fill in a combo box,
11305 #  If the combo is sorted, the lines will not appear in the following order.
0 English    # this will be the line 3
0 Portugus  # this will be the line 7
0 Espanol    # this will be the line 4
0 Dutch      # this will be the line 2
0 Deutch     # this will be the line 1
0 Fanais    # this will be the line 5
0 Italiano   # this will be the line 6
0 ...END  # must indicate the end

11306 # for a little help
0 You must choose a language.
0 This only a little demonstration
0 ...END



11399 # This is a third example. Shows you how to have Combo Boxes
#*****************************************************************
# Directives
# ----------
0 @$Tab(After, :)  # a very common directive
#
# Definitions
# -----------
0 @A = ComboDropDown(11301)   # UnSort() is the default
0 @C = ComboDropDownList(11305) + Sort() + Help(11306)
#
# Dialog Title
# ------------
0 Example of DropDown Combo boxes
# --------------------------------
#
# Instructions
# ------------
0 This is a combo DropDown, you can modify the text : @01A(15
0 This is a combo DropDownList, you cannot modify the text : @01C(15
0 #
0 We can add buttons is wanted.
0 @!Btn(6, "&I still don't know what to do with it") # to see...
0 ...END

1
1 / 1)   The 11.01.2002  SyntaxDiagram03.rtf

