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

« back to all changes in this revision

Viewing changes to packages/extra/amunits/otherlibs/triton/examples/toolmanager3.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 ToolManager3;
2
 
 
3
 
(*
4
 
 *  OpenTriton -- A free release of the triton.library source code
5
 
 *  Copyright (C) 1993-1998  Stefan Zeiger
6
 
 *
7
 
 *  This program is free software; you can redistribute it and/or modify
8
 
 *  it under the terms of the GNU General Public License as published by
9
 
 *  the Free Software Foundation; either version 2 of the License, or
10
 
 *  (at your option) any later version.
11
 
 *
12
 
 *  This program is distributed in the hope that it will be useful,
13
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
 *  GNU General Public License for more details.
16
 
 *
17
 
 *  You should have received a copy of the GNU General Public License
18
 
 *  along with this program; if not, write to the Free Software
19
 
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20
 
 *
21
 
 *  Toolmanager3.c - My own creation for a ToolManager GUI
22
 
 *
23
 
 *)
24
 
 
25
 
 
26
 
uses exec, triton, tritonmacros,utility, linklist, vartags;
27
 
 
28
 
{
29
 
   A demo in FPC Pascal using triton.library
30
 
 
31
 
   Updated for fpc 1.0.7
32
 
   11 Jan 2003.
33
 
 
34
 
   nils.sjoholm@mailbox.swipnet.se
35
 
}
36
 
 
37
 
 
38
 
 
39
 
 
40
 
const
41
 
     cycle_entries : array [0..7] of pchar = ('Exec','Image','Sound','Menu','Icon','Dock','Access',NIL);
42
 
 
43
 
     liststrings : array [0..8] of pchar = (
44
 
                     '2024view' ,
45
 
                     'Add to archive',
46
 
                     'Delete',
47
 
                     'Edit text',
48
 
                     'Env',
49
 
                     'Exchange',
50
 
                     'Global Help System',
51
 
                     'Multiview',
52
 
                     'Paint');
53
 
 
54
 
var
55
 
   i : Longint;
56
 
   LVList : pList;
57
 
   MyNode : pFPCNode;
58
 
   Triton_App : pTr_App;
59
 
 
60
 
procedure CleanUp(why : string; err : longint);
61
 
begin
62
 
     if assigned(Triton_App) then TR_DeleteApp(triton_App);
63
 
     if assigned(LVList) then DestroyList(LVList);
64
 
     if why <> '' then writeln(why);
65
 
     halt(err);
66
 
end;
67
 
 
68
 
begin
69
 
    CreateList(LVList);
70
 
    FOR i := 0 TO 8 DO BEGIN
71
 
        MyNode := AddNewNode(LVList,liststrings[i]);
72
 
    END;
73
 
 
74
 
 
75
 
    Triton_App := TR_CreateAppTags([
76
 
                               TRCA_Name,'ToolManagerGUIDemo3',
77
 
                               TRCA_LongName,'ToolManager GUI demo 3',
78
 
                               TRCA_Info,'My own creation for a ToolManager GUI',
79
 
                               TAG_END]);
80
 
 
81
 
    if Triton_App = nil then CleanUp('Can''t create application',20);
82
 
 
83
 
      ProjectStart;
84
 
      WindowID(1); WindowPosition(TRWP_CENTERDISPLAY);
85
 
      WindowTitle('ToolManager GUI demo 3');
86
 
 
87
 
      VertGroupA;
88
 
 
89
 
        Space;
90
 
 
91
 
        HorizGroupAC;
92
 
          Space;
93
 
          TextID('_Object type',1);
94
 
          Space;
95
 
          CycleGadget(@cycle_entries,0,1);
96
 
          Space;
97
 
        EndGroup;
98
 
 
99
 
        Space;
100
 
 
101
 
        NamedSeparatorI('Object _list',2);
102
 
 
103
 
        Space;
104
 
 
105
 
        HorizGroupAC;
106
 
          Space;
107
 
            VertGroupAC;
108
 
              ListSS(LVList,2,0,0);
109
 
              HorizGroupEA;
110
 
                Button('_New...',8);
111
 
                Button('_Edit...',9);
112
 
              EndGroup;
113
 
              HorizGroupEA;
114
 
                Button('Co_py',10);
115
 
                Button('Remove',11);
116
 
              EndGroup;
117
 
            EndGroup;
118
 
          Space;
119
 
          Line(TROF_VERT);
120
 
          Space;
121
 
            SetTRTag(TRGR_Vert, TRGR_ALIGN OR TRGR_FIXHORIZ);
122
 
              Button('Top',3);
123
 
              Space;
124
 
              Button('Up',4);
125
 
              Space;
126
 
              Button('Down',5);
127
 
              Space;
128
 
              Button('Bottom',6);
129
 
              VertGroupS;Space;EndGroup;
130
 
              Button('So_rt',7);
131
 
            EndGroup;
132
 
          Space;
133
 
        EndGroup;
134
 
 
135
 
        Space;
136
 
 
137
 
        HorizSeparator;
138
 
 
139
 
        Space;
140
 
 
141
 
        HorizGroup;
142
 
          Space;
143
 
          HorizGroupS;
144
 
            Button('_Save',12);
145
 
            Space;
146
 
            Button('_Use',13);
147
 
            Space;
148
 
            Button('_Test',14);
149
 
            Space;
150
 
            Button('_Cancel',15);
151
 
          EndGroup;
152
 
          Space;
153
 
        EndGroup;
154
 
 
155
 
        Space;
156
 
 
157
 
      EndGroup;
158
 
 
159
 
      EndProject;
160
 
 
161
 
    i := TR_AutoRequest(Triton_App,NIL,@tritontags);
162
 
  CleanUp('',0);
163
 
end.
164
 
 
165
 
{
166
 
  $Log
167
 
}
168
 
 
169
 
 
170
 
 
171
 
 
172
 
 
173
 
 
174