4
* OpenTriton -- A free release of the triton.library source code
5
* Copyright (C) 1993-1998 Stefan Zeiger
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.
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.
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.
21
* Toolmanager3.c - My own creation for a ToolManager GUI
26
uses exec, triton, tritonmacros,utility, linklist, vartags;
29
A demo in FPC Pascal using triton.library
34
nils.sjoholm@mailbox.swipnet.se
41
cycle_entries : array [0..7] of pchar = ('Exec','Image','Sound','Menu','Icon','Dock','Access',NIL);
43
liststrings : array [0..8] of pchar = (
60
procedure CleanUp(why : string; err : longint);
62
if assigned(Triton_App) then TR_DeleteApp(triton_App);
63
if assigned(LVList) then DestroyList(LVList);
64
if why <> '' then writeln(why);
70
FOR i := 0 TO 8 DO BEGIN
71
MyNode := AddNewNode(LVList,liststrings[i]);
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',
81
if Triton_App = nil then CleanUp('Can''t create application',20);
84
WindowID(1); WindowPosition(TRWP_CENTERDISPLAY);
85
WindowTitle('ToolManager GUI demo 3');
93
TextID('_Object type',1);
95
CycleGadget(@cycle_entries,0,1);
101
NamedSeparatorI('Object _list',2);
108
ListSS(LVList,2,0,0);
111
Button('_Edit...',9);
121
SetTRTag(TRGR_Vert, TRGR_ALIGN OR TRGR_FIXHORIZ);
129
VertGroupS;Space;EndGroup;
150
Button('_Cancel',15);
161
i := TR_AutoRequest(Triton_App,NIL,@tritontags);