PCOpus Requester definition

You can find an example requester in 'Example.req'. Inside that file you can find this text as plain ASCII, too.
Any Requester must have 'PCOpus Requester' in the first line, so PCOpus will recognize it.
All lines that have no keyword at the beginning are ignored, so you can use '*', '/', '.', '+' or something like that as first char to indicate a comment.
Behind any keyword must not be anything except what is stated below, i.e. no comments behind known keywords !

Main Keywords

Keywords for BUTTON definition

Keywords for LABEL definitions

Keywords for TEXT definitions

All textgadgets support double-click to open a file-requester. This is not useful in all cases, though !

Keywords for CHECK definitions

Keywords for VARIABLE definitions

Keywords for COMBOBOX definitions

Please note that if VALUE and ASSIGN are stated, the value set later is used !
These requesters are powerful instruments. You must take care when defining requesters. It is possible to define complete nonsens here. If you have problems or comments, please EMail !

Below is a little (and quite simple AND useless) example, please read through it, there is some additional information.

PCOpus Requester
file test1.req
*Values are saved to file test1.req in temp directory
centerundermouse 1
size 320,200
*size of the requester will be 320x200 pixels
*drawing some rectangles, since we have no window title (no TITLE defined), this looks nice, in full color now ...
foreground 60,0,0
rectangle 1,1,319,199
foreground 120,0,0
rectangle 3,3,317,197
foreground 255,0,0
rectangle 5,5,315,195
*setting first button, this is always cancel !
button
  top 10
  left 10
  height 20
  width 100
  tooltip Exit without action
  caption Cancel
  picture klex.bmp
end
*IMPORTANT ! IMPORTANT ! IMPORTANT !
*Since it is not possible to leave a requester if no button is defined on it,
*there is always a first button, this button MUST be Cancel !
*You may define whatever you want for it, if you click on it, the requester is
*closed with no action !

button
  top 40
  left 10
  height 20
  width 100
  function echo {f}{C1:1}"Hello World !"{T1}{EC1}{B1}{T1}{C1:0} Option 1 is off !{EC1}
  caption Test&Button
  type command
end
*If you are unsure about what you have defined or what you will get when clicking on
*some things or not, it is quite a good idea to have defined 'echo' as function
*during testing.
*This command does only a pretty senseless thing and the text it echos is not very
*overwhelming either.
*Please note, that for {f} the first selected file in the active window is inserted,
*as you are used to from the PCOpus external commands !

*setting first label
label
  top 10
  left 120
  height 15
  width 100
  caption label 1
end
*and the first textgadget
text
  id 1
  top 45
  left 120
  heigth 20
  width 120
  text test-text-gadget
end
*here we use the data from previous items for quick positioning :-)
*if you leave out LEFT, TOP, HEIGHT or WIDTH the values from the previous item
*OF THE SAME TYPE are used, this is very convenient. You can quickly change sizes
*of buttons if you only have the size defined in the first button
button
  id 1
  top 100
  type cycle
  caption 1/a,2/b,3/c,4/d
  default 5
end
*As you see here, default is set to 5, but we have no 5. value, you will get an empty
*button when starting up, but after the first click on this button, you will only have
*the choice between 1, 2, 3 and 4 !
label
  top 100
  caption label2
end
text
  top 135
  text text2
end
check
  id 1
  top 10
  left 250
  height 20
  width 60
  default 0
  caption option1
  exclude 2,3,4
end
*An example for excluding checkbuttons, just play around a bit, it is simple to understand
check
  id 2
  top 33
  default 1
  caption option2
  exclude 1,3,4
end
check
  id 3
  top 56
  caption option3
  exclude 1,2,4
end
check
  id 4
  top 79
  caption option4
end
check
  id 5
  top 150
  exclude 6
  default 1
  caption option5
end
check
  id 6
  exclude 5
  top 173
  default 1
  caption option6
end
End PCOpus Requester