~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to packages/extra/amunits/otherlibs/triton/examples/scroller.pas

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
PROGRAM Scroller;
2
 
 
3
 
uses triton, tritonmacros, utility;
4
 
 
5
 
{
6
 
   A demo in FPC Pascal using triton.library
7
 
   
8
 
   Updated for fpc 1.0.7
9
 
   11 Jan 2003.
10
 
   
11
 
   nils.sjoholm@mailbox.swipnet.se
12
 
}
13
 
 
14
 
 
15
 
VAR
16
 
     Project  : pTR_Project;
17
 
     App : pTR_App;
18
 
     close_me : BOOLEAN;
19
 
     trmsg : pTR_Message;
20
 
     dummy : longint;
21
 
 
22
 
begin
23
 
 
24
 
    App := TR_CreateAppTags([
25
 
                     TRCA_Name,' Triton Scroller Demo' ,
26
 
                     TRCA_Release,' 1.0' ,
27
 
                     TRCA_Date,' 03-08-1998' ,
28
 
                     TAG_DONE]);
29
 
 
30
 
    if App <> nil then begin
31
 
 
32
 
      ProjectStart;
33
 
      WindowID(1);
34
 
      WindowTitle(' Scroller' );
35
 
         VertGroupA;
36
 
            Space;
37
 
            HorizGroupAC;
38
 
               Space;
39
 
               TextID(' _Scroller' ,7);
40
 
               Space;
41
 
               SetTRTag(TROB_Scroller,TROF_HORIZ);
42
 
               SetTRTag(TRSC_Total,40);
43
 
               SetTRTag(TRSC_Visible,10);
44
 
               SetTRTag(TRAT_Value,5);
45
 
               SetTRTag(TRAT_ID,7);
46
 
               Space;
47
 
            EndGroup;
48
 
            Space;
49
 
         EndGroup;
50
 
      EndProject;
51
 
 
52
 
  Project := TR_OpenProject(App,@tritontags);
53
 
    IF Project <> NIL THEN BEGIN
54
 
      close_me := FALSE;
55
 
      WHILE NOT close_me DO BEGIN
56
 
        dummy := TR_Wait(App,0);
57
 
        REPEAT
58
 
          trmsg := TR_GetMsg(App);
59
 
          IF trmsg <> NIL THEN BEGIN
60
 
            IF (trmsg^.trm_Project = Project) THEN BEGIN
61
 
               CASE trmsg^.trm_Class OF
62
 
                 TRMS_CLOSEWINDOW : begin
63
 
                                       writeln(' The final value was: ' ,TR_GetValue(Project,7));
64
 
                                       close_me := True;
65
 
                                    end;
66
 
                 TRMS_ERROR:        WriteLN(TR_GetErrorString(trmsg^.trm_Data));
67
 
                 TRMS_NEWVALUE    : IF trmsg^.trm_ID = 7 then writeln(' The value is: ' ,trmsg^.trm_Data);
68
 
               END;
69
 
            END;
70
 
            TR_ReplyMsg(trmsg);
71
 
          END;
72
 
        UNTIL close_me OR (trmsg = NIL);
73
 
      END;
74
 
     TR_CloseProject(Project);
75
 
   end;
76
 
   TR_DeleteApp(App);
77
 
   END ELSE writeln(' Cant creat Application' );
78
 
end.
79
 
 
80
 
{
81
 
  $Log
82
 
}
83
 
 
84
 
 
85
 
 
86