*
* Chrono.deck :
* -------------
* Auteur        : Xavier Mertens  
* Version       : 1  
* Révision      : 00  
* Langage       : CanDO v1.02
* Compatibilité : 1.3  - (2.x sous certaines réserves!) 
* Description   : Démonstration d'une petite application CanDO :   
*                 un petit chronomètre pour mesurer un temps de compilation,
*                 de calcul d'image,etc.
*
*

** Deck "Chrono"

** No Routines in Deck

** List of Cards

Chrono_card
Informations

** Card "Chrono_card"

  Objects
    Window "UserWindow"
      Definition
        Origin 460,30
        Size 160,29
        TitleBar "Chrono"
        NumberOfColors 4
        DefaultColors 0,1,0
        WindowObjects CLOSEBUTTON DEPTHBUTTONS DRAGBAR 
        WindowOptions ACTIVATE TOFRONT WORKBENCH 
      EndDefinition
      OnCloseButton
        Quit
      EndScript
    EndObject
    TextButton "Bouton_Reset"
      Definition
        Origin 116,14
        Font "topaz",8
        Style PLAIN ,2,3
        TextColors 2,0,NORMAL 
        Text "0"
        Border OUTLINE ,1,2
        Highlight COMPLEMENT 
      EndDefinition
      OnDoubleClick
        Let seconde=0
        Let minute=0
        Let heure=0
      EndScript
    EndObject
    TextButton "Bouton_Info"
      Definition
        Origin 135,14
        Font "topaz",8
        Style PLAIN ,2,3
        TextColors 1,0,NORMAL 
        Text "?"
        Border OUTLINE ,1,2
        Highlight COMPLEMENT 
      EndDefinition
      OnClick
        GotoCard "Informations"
      EndScript
    EndObject
    IntervalTimer "Chronometre"
      Definition
        Duration 0,1,0
      EndDefinition
      Occurred
        Let seconde=seconde+1
        If seconde=60
          Let minute=minute+1
          Let seconde=0
        EndIf
        If minute=60
          Let heure=heure+1
          Let minute=0
        EndIf
        PrintText heure||":"||minute||":"||seconde||"   ",29,15
      EndScript
    EndObject
  EndObjects
  AfterStartup
    SetPen 1
    SetDrawMode JAM2 
    DrawRectangle 10,13,100,12
    Let seconde=0
    Let minute=0
    Let heure=0
  EndScript

** End Of Card "Chrono_card"

** Card "Informations"

  Objects
    Window "UserWindow"
      Definition
        Origin 220,80
        Size 200,70
        TitleBar "Informations..."
        NumberOfColors 4
        DefaultColors 0,1,0
        WindowObjects NONE 
        WindowOptions ACTIVATE TOFRONT WORKBENCH 
      EndDefinition
    EndObject
    TextButton "Bouton_Merci"
      Definition
        Origin 77,55
        Font "topaz",8
        Style PLAIN ,2,3
        TextColors 1,0,NORMAL 
        Text "Merci"
        Border OUTLINE ,1,2
        Highlight COMPLEMENT 
      EndDefinition
      OnClick
        GotoCard "Chrono_card"
      EndScript
    EndObject
  EndObjects
  AfterStartup
    SetPen 1
    PrintText "     Chrono v1.00     ",10,13
    PrintText "écrit avec CanDO v1.02",10,23
    PrintText "  par Xavier Mertens  ",10,33
    PrintText "   (10 juillet 92)    ",10,43
  EndScript

** End Of Card "Informations"

** End Of Deck "Chrono"

** Eof
