home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 4 / AACD04.ISO / AACD / Programming / CanDo / Decks1 / Complex / SubDecks / SimpleReq.ctx < prev    next >
Encoding:
Text File  |  1998-06-27  |  5.8 KB  |  286 lines

  1. *************
  2. * Deck "SimpleReq"
  3. *************
  4.  
  5. *************
  6. * Card(s) in deck.
  7. *  Card "AskFor"
  8. *  Card "Comment"
  9. *  Card "ReadFile"
  10. *  Card "YesNo"
  11. *************
  12. * 4 Card(s), 4 were printed.
  13. *************
  14.  
  15. *************
  16. * Natural order of Cards
  17. *  Card "Comment"
  18. *  Card "YesNo"
  19. *  Card "AskFor"
  20. *  Card "ReadFile"
  21. *************
  22.  
  23. *************
  24. * There are no Global routines in this deck.
  25. *************
  26.  
  27. *************
  28. * Card "AskFor"
  29.     NoAttach
  30.     AfterAttachment
  31.         Let ReturnHandle = Arg1
  32.         SetWindowTitle Arg2
  33.         PrintText LeftJustify(Arg3,35),20,25
  34.         SetText "MsgField",Arg4
  35.         SetObjectState "MsgField",ON
  36.     EndScript
  37.     Routine "Done"
  38.         SendToParentDeck ReturnHandle,Arg1,Arg2,Arg3
  39.         If CardName = "AskFor"
  40.             Quit    ;quit if parent didn't change our Card
  41.         EndIf
  42.     EndScript
  43.     Window "UserWindow"
  44.         Definition
  45.             Origin 0,54
  46.             Size 320,71
  47.             Title ""
  48.             NumberOfColors 4
  49.             DefaultColors 0,1,0
  50.             WindowObjects DRAGBAR 
  51.             WindowFlags ACTIVATE TOFRONT 
  52.             VisualEffects NONE ,WAIT 
  53.         EndScript
  54.     EndObject
  55.     TextField "MsgField"
  56.         Definition
  57.             Origin 15,40
  58.             Size 287,8
  59.             Justification LEFT 
  60.             MaxFieldLength 64
  61.             InitialText ""
  62.             Border DOUBLEBEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
  63.         EndScript
  64.         OnRelease
  65.             Do "Done",True,TextFrom("MsgField")
  66.         EndScript
  67.     EndObject
  68.     TextButton "Ok Button"
  69.         Definition
  70.             Origin 11,53
  71.             Font "topaz",8 ; FontName, PointSize
  72.             Style PLAIN ,2,3
  73.             TextColors 1,0,JAM1  ; PenA, PenB, DrawMode
  74.             Text "    Ok    "
  75.             Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
  76.             Highlight COMPLEMENT 
  77.             ButtonFlags NONE 
  78.         EndScript
  79.         OnRelease
  80.             Do "Done",True,TextFrom("MsgField")
  81.         EndScript
  82.     EndObject
  83.     TextButton "Cancel Button"
  84.         Definition
  85.             Origin 222,53
  86.             Font "topaz",8 ; FontName, PointSize
  87.             Style PLAIN ,2,3
  88.             TextColors 1,0,JAM1  ; PenA, PenB, DrawMode
  89.             Text "  Cancel  "
  90.             Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
  91.             Highlight COMPLEMENT 
  92.             ButtonFlags NONE 
  93.         EndScript
  94.         OnRelease
  95.             Do "Done",False
  96.         EndScript
  97.     EndObject
  98. * End of Card "AskFor"
  99. *************
  100.  
  101. *************
  102. * Card "Comment"
  103.     AfterAttachment
  104.         Let ReturnHandle = Arg1
  105.         PrintText LeftJustify(Arg2,35),20,20
  106.         PrintText LeftJustify(Arg3,35),20,30
  107.         PrintText LeftJustify(Arg4,35),20,40
  108.     EndScript
  109.     Routine "Done"
  110.         SendToParentDeck ReturnHandle
  111.         If CardName = "Comment"
  112.             Quit    ;quit if parent didn't change our Card
  113.         EndIf
  114.     EndScript
  115.     Window "UserWindow"
  116.         Definition
  117.             Origin 0,54
  118.             Size 320,71
  119.             Title ""
  120.             NumberOfColors 4
  121.             DefaultColors 0,1,0
  122.             WindowObjects DRAGBAR 
  123.             WindowFlags ACTIVATE TOFRONT 
  124.             VisualEffects NONE ,WAIT 
  125.         EndScript
  126.     EndObject
  127.     TextButton "Ok Button"
  128.         Definition
  129.             Origin 116,53
  130.             Font "topaz",8 ; FontName, PointSize
  131.             Style PLAIN ,2,3
  132.             TextColors 1,0,JAM1  ; PenA, PenB, DrawMode
  133.             Text "    Ok    "
  134.             Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
  135.             Highlight COMPLEMENT 
  136.             ButtonFlags NONE 
  137.         EndScript
  138.         OnRelease
  139.             Do "Done"
  140.         EndScript
  141.     EndObject
  142.     AKey "Select Field Key"
  143.         Definition
  144.             QualifiersPressed NONE 
  145.             KeyPressed RETURN 
  146.         EndScript
  147.         OnDown
  148.             Do "Done"
  149.         EndScript
  150.     EndObject
  151. * End of Card "Comment"
  152. *************
  153.  
  154. *************
  155. * Card "ReadFile"
  156.     NoAttach
  157.     BeforeAttachment
  158.         Let ReturnHandle = Arg1
  159.         If Exists(Arg3)
  160.             LoadDocument Arg3,"Work Document"
  161.         EndIf
  162.     EndScript
  163.     AfterAttachment
  164.         SetWindowTitle Arg2
  165.         Let LastHelpDirection = "UP"
  166.     EndScript
  167.     Window "UserWindow"
  168.         Definition
  169.             Origin 0,46
  170.             Size 325,154
  171.             Title ""
  172.             NumberOfColors 4
  173.             DefaultColors 0,1,0
  174.             WindowObjects CLOSEBUTTON DRAGBAR 
  175.             WindowFlags ACTIVATE TOFRONT 
  176.             VisualEffects NONE ,WAIT 
  177.         EndScript
  178.         OnCloseButton
  179.             If CardName = "ReadFile"
  180.                 Quit    ;quit if parent didn't change our Card
  181.             EndIf
  182.         EndScript
  183.     EndObject
  184.     Memo "Reader"
  185.         Definition
  186.             Origin 11,14
  187.             Size 304,134
  188.             Font "topaz",8 ; FontName, PointSize
  189.             Style PLAIN 
  190.             TextColors 1,0 ; PenA, PenB, DrawMode
  191.             Border DOUBLEBEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
  192.             MemoDocument "Work Document" ; where the text comes from
  193.             ScrollBars RIGHT 
  194.             InputStyle LOCKEDOUT 
  195.         EndScript
  196.     EndObject
  197.     AKey "Up Key"
  198.         Definition
  199.             QualifiersPressed NONE 
  200.             KeyPressed UP 
  201.         EndScript
  202.         OnDown
  203.             If LastHelpDirection <> "UP"
  204.                 MoveCursor UP ,15
  205.             EndIf
  206.             MoveCursor UP ,14
  207.             Let LastHelpDirection = "UP"
  208.         EndScript
  209.     EndObject
  210.     AKey "Down Key"
  211.         Definition
  212.             QualifiersPressed NONE 
  213.             KeyPressed DOWN 
  214.         EndScript
  215.         OnDown
  216.             If LastHelpDirection = "UP"
  217.                 MoveCursor DOWN ,15
  218.             EndIf
  219.             MoveCursor DOWN ,14
  220.             Let LastHelpDirection = "DOWN"
  221.         EndScript
  222.     EndObject
  223. * End of Card "ReadFile"
  224. *************
  225.  
  226. *************
  227. * Card "YesNo"
  228.     NoAttach
  229.     AfterAttachment
  230.         Let ReturnHandle = Arg1
  231.         PrintText LeftJustify(Arg2,35),20,20
  232.         PrintText LeftJustify(Arg3,35),20,30
  233.         PrintText LeftJustify(Arg4,35),20,40
  234.     EndScript
  235.     Routine "Done"
  236.         SendToParentDeck ReturnHandle,Arg1
  237.         If CardName = "YesNo"
  238.             Quit    ;quit if parent didn't change our Card
  239.         EndIf
  240.     EndScript
  241.     Window "UserWindow"
  242.         Definition
  243.             Origin 0,54
  244.             Size 320,71
  245.             Title ""
  246.             NumberOfColors 4
  247.             DefaultColors 0,1,0
  248.             WindowObjects DRAGBAR 
  249.             WindowFlags ACTIVATE TOFRONT 
  250.             VisualEffects NONE ,WAIT 
  251.         EndScript
  252.     EndObject
  253.     TextButton "Yes Button"
  254.         Definition
  255.             Origin 11,53
  256.             Font "topaz",8 ; FontName, PointSize
  257.             Style PLAIN ,2,3
  258.             TextColors 1,0,JAM1  ; PenA, PenB, DrawMode
  259.             Text "   Yes   "
  260.             Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
  261.             Highlight COMPLEMENT 
  262.             ButtonFlags NONE 
  263.         EndScript
  264.         OnRelease
  265.             Do "Done",True
  266.         EndScript
  267.     EndObject
  268.     TextButton "No Button"
  269.         Definition
  270.             Origin 222,53
  271.             Font "topaz",8 ; FontName, PointSize
  272.             Style PLAIN ,2,3
  273.             TextColors 1,0,JAM1  ; PenA, PenB, DrawMode
  274.             Text "    No   "
  275.             Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen
  276.             Highlight COMPLEMENT 
  277.             ButtonFlags NONE 
  278.         EndScript
  279.         OnRelease
  280.             Do "Done",False
  281.         EndScript
  282.     EndObject
  283. * End of Card "YesNo"
  284. *************
  285.  
  286.