forked from dmcoles/ReBuild
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libraryVersions.e
224 lines (196 loc) · 6.74 KB
/
libraryVersions.e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
OPT MODULE
MODULE 'reaction/reaction_macros',
'window','classes/window',
'gadgets/layout','layout',
'reaction/reaction_lib',
'button','gadgets/button',
'images/bevel',
'exec/nodes',
'listbrowser','gadgets/listbrowser',
'amigalib/boopsi',
'intuition/intuition',
'intuition/imageclass',
'intuition/gadgetclass',
'exec/libraries',
'gadtools',
'listbrowser',
'radiobutton',
'clicktab',
'layout',
'window',
'requester',
'string',
'chooser',
'palette',
'space',
'integer',
'scroller',
'checkbox',
'fuelgauge',
'textfield',
'getfile',
'getfont',
'getscreenmode',
'slider',
'speedbar',
'glyph',
'label',
'bevel',
'drawlist',
'penmap',
'bitmap',
'colorwheel',
'datebrowser',
'getcolor',
'listview',
'sketchboard',
'texteditor',
'virtual',
'*bball'
MODULE '*reactionForm'
EXPORT DEF gradientsliderbase
EXPORT DEF progressbase
EXPORT DEF tapedeckbase
EXPORT DEF texteditorbase
EXPORT DEF textentrybase
EXPORT DEF ledbase
EXPORT DEF smartbitmapbase
EXPORT DEF statusbarbase
EXPORT DEF titlebarbase
EXPORT ENUM LIBS_LIST, LIBS_BTNOK
CONST NUMGADS=LIBS_BTNOK+1
EXPORT OBJECT libraryList OF reactionForm
PRIVATE
columninfo[3]:ARRAY OF columninfo
browserlist:PTR TO LONG
ENDOBJECT
EXPORT PROC create() OF libraryList
DEF gads:PTR TO LONG
DEF i
NEW gads[NUMGADS]
self.gadgetList:=gads
NEW gads[NUMGADS]
self.gadgetActions:=gads
self.columninfo[0].width:=3
self.columninfo[0].title:='Library'
self.columninfo[0].flags:=CIF_WEIGHTED
self.columninfo[1].width:=1
self.columninfo[1].title:='Version'
self.columninfo[1].flags:=CIF_WEIGHTED
self.columninfo[2].width:=-1
self.columninfo[2].title:=-1
self.columninfo[2].flags:=-1
self.browserlist:=browserNodesA([0])
self.windowObj:=WindowObject,
WA_TITLE, 'Library versions',
WA_LEFT, 0,
WA_TOP, 0,
WA_HEIGHT, 180,
WA_WIDTH, 350,
WA_MINWIDTH, 150,
WA_MAXWIDTH, 8192,
WA_MINHEIGHT, 80,
WA_MAXHEIGHT, 8192,
WA_ACTIVATE, TRUE,
WA_PUBSCREEN, 0,
WINDOW_POSITION, WPOS_CENTERSCREEN,
->WA_CustomScreen, gScreen,
->WINDOW_AppPort, gApp_port,
WA_CLOSEGADGET, TRUE,
WA_DEPTHGADGET, TRUE,
WA_SIZEGADGET, TRUE,
WA_DRAGBAR, TRUE,
WA_NOCAREREFRESH, TRUE,
WA_IDCMP,IDCMP_GADGETDOWN OR IDCMP_GADGETUP OR IDCMP_CLOSEWINDOW OR 0,
WINDOW_PARENTGROUP, VLayoutObject,
LAYOUT_SPACEOUTER, TRUE,
LAYOUT_DEFERLAYOUT, TRUE,
LAYOUT_ADDCHILD,self.gadgetList[LIBS_LIST]:=ListBrowserObject,
GA_ID, LIBS_LIST,
GA_RELVERIFY, TRUE,
LISTBROWSER_POSITION, 0,
LISTBROWSER_SHOWSELECTED, TRUE,
LISTBROWSER_COLUMNTITLES, TRUE,
LISTBROWSER_HIERARCHICAL, FALSE,
LISTBROWSER_COLUMNINFO, self.columninfo,
LISTBROWSER_LABELS, self.browserlist,
ListBrowserEnd,
LAYOUT_ADDCHILD,self.gadgetList[LIBS_BTNOK]:=ButtonObject,
GA_ID, LIBS_BTNOK,
GA_TEXT, 'Ok',
GA_RELVERIFY, TRUE,
GA_TABCYCLE, TRUE,
ButtonEnd,
CHILD_WEIGHTEDHEIGHT, 0,
LayoutEnd,
WindowEnd
self.gadgetActions[LIBS_BTNOK]:=MR_OK
ENDPROC
PROC end() OF libraryList
freeBrowserNodes(self.browserlist)
END self.gadgetList[NUMGADS]
END self.gadgetActions[NUMGADS]
DisposeObject(self.windowObj)
ENDPROC
PROC addLibrary(name,lib:PTR TO lib) OF libraryList
DEF n,version[20]:STRING
IF lib
StringF(version,'\d.\d',lib.version AND $FFFF,lib.revision AND $FFFF)
ELSE
StrCopy(version,'N/A')
ENDIF
IF (n:=AllocListBrowserNodeA(2, [LBNA_FLAGS,0, LBNA_COLUMN,0, LBNCA_COPYTEXT, TRUE, LBNCA_TEXT, name, LBNA_COLUMN,1, LBNCA_COPYTEXT, TRUE, LBNCA_TEXT, version, TAG_END]))
AddTail(self.browserlist, n)
ELSE
Raise("MEM")
ENDIF
ENDPROC
EXPORT PROC showLibraries() OF libraryList
SetGadgetAttrsA(self.gadgetList[LIBS_LIST],0,0,[LISTBROWSER_LABELS, Not(0), TAG_END])
self.addLibrary('gadgets/button.gadget',buttonbase)
self.addLibrary('gadgets/checkbox.gadget',checkboxbase)
self.addLibrary('gadgets/chooser.gadget',chooserbase)
self.addLibrary('gadgets/clicktab.gadget',clicktabbase)
self.addLibrary('gadgets/colorwheel.gadget',colorwheelbase)
self.addLibrary('gadgets/datebrowser.gadget',datebrowserbase)
self.addLibrary('gadgets/fuelgauge.gadget',fuelgaugebase)
self.addLibrary('gadgets/getcolor.gadget',getcolorbase)
self.addLibrary('gadgets/getfile.gadget',getfilebase)
self.addLibrary('gadgets/getfont.gadget',getfontbase)
self.addLibrary('gadgets/getscreenmode.gadget',getscreenmodebase)
self.addLibrary('gadgets/gradientslider.gadget',gradientsliderbase)
self.addLibrary('gadgets/integer.gadget',integerbase)
self.addLibrary('gadgets/layout.gadget',layoutbase)
self.addLibrary('gadgets/listbrowser.gadget',listbrowserbase)
self.addLibrary('gadgets/listview.gadget',listviewbase)
self.addLibrary('gadgets/palette.gadget',palettebase)
self.addLibrary('gadgets/radiobutton.gadget',radiobuttonbase)
self.addLibrary('gadgets/scroller.gadget',scrollerbase)
self.addLibrary('gadgets/sketchboard.gadget',sketchboardbase)
self.addLibrary('gadgets/slider.gadget',sliderbase)
self.addLibrary('gadgets/space.gadget',spacebase)
self.addLibrary('gadgets/speedbar.gadget',speedbarbase)
self.addLibrary('gadgets/string.gadget',stringbase)
self.addLibrary('gadgets/tapedeck.gadget',tapedeckbase)
self.addLibrary('gadgets/texteditor.gadget',texteditorbase)
self.addLibrary('gadgets/textfield.gadget',textfieldbase)
self.addLibrary('gadgets/virtual.gadget',virtualbase)
self.addLibrary('images/bevel.image',bevelbase)
self.addLibrary('images/bitmap.image',bitmapbase)
self.addLibrary('images/boingball.image',boingballbase)
self.addLibrary('images/drawlist.image',drawlistbase)
self.addLibrary('images/glyph.image',glyphbase)
self.addLibrary('images/label.image',labelbase)
self.addLibrary('images/led.image',ledbase)
self.addLibrary('images/penmap.image',penmapbase)
self.addLibrary('gadtools.library',gadtoolsbase)
self.addLibrary('requester.class',requesterbase)
self.addLibrary('window.class',windowbase)
self.addLibrary('gadgets/statusbar.gadget',statusbarbase)
self.addLibrary('gadgets/progress.gadget',progressbase)
self.addLibrary('gadgets/textentry.gadget',textentrybase)
self.addLibrary('images/smartbitmap.image',smartbitmapbase)
self.addLibrary('images/titlebar.image',titlebarbase)
SetGadgetAttrsA(self.gadgetList[LIBS_LIST],0,0,[LISTBROWSER_LABELS, self.browserlist, TAG_END])
self.showModal()
ENDPROC -1