Subversion Repositories Kolibri OS

Rev

Rev 1953 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1953 Rev 9568
1
;*****************************************************************************
1
;*****************************************************************************
2
; Example for Box_lib: scrollbar, menubar, dinamic_button
2
; Example for Box_lib: scrollbar, menubar, dinamic_button
3
; Copyright (c) 2009, Marat Zakiyanov aka Mario79, aka Mario
3
; Copyright (c) 2009, Marat Zakiyanov aka Mario79, aka Mario
4
; All rights reserved.
4
; All rights reserved.
5
;
5
;
6
; Redistribution and use in source and binary forms, with or without
6
; Redistribution and use in source and binary forms, with or without
7
; modification, are permitted provided that the following conditions are met:
7
; modification, are permitted provided that the following conditions are met:
8
;	 * Redistributions of source code must retain the above copyright
8
;	 * Redistributions of source code must retain the above copyright
9
;	   notice, this list of conditions and the following disclaimer.
9
;	   notice, this list of conditions and the following disclaimer.
10
;	 * Redistributions in binary form must reproduce the above copyright
10
;	 * Redistributions in binary form must reproduce the above copyright
11
;	   notice, this list of conditions and the following disclaimer in the
11
;	   notice, this list of conditions and the following disclaimer in the
12
;	   documentation and/or other materials provided with the distribution.
12
;	   documentation and/or other materials provided with the distribution.
13
;	 * Neither the name of the  nor the
13
;	 * Neither the name of the  nor the
14
;	   names of its contributors may be used to endorse or promote products
14
;	   names of its contributors may be used to endorse or promote products
15
;	   derived from this software without specific prior written permission.
15
;	   derived from this software without specific prior written permission.
16
;
16
;
17
; THIS SOFTWARE IS PROVIDED BY Marat Zakiyanov ''AS IS'' AND ANY
17
; THIS SOFTWARE IS PROVIDED BY Marat Zakiyanov ''AS IS'' AND ANY
18
; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18
; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
; DISCLAIMED. IN NO EVENT SHALL  BE LIABLE FOR ANY
20
; DISCLAIMED. IN NO EVENT SHALL  BE LIABLE FOR ANY
21
; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21
; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22
; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22
; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23
; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23
; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24
; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
;******************************************************************************
27
;******************************************************************************
28
; import_boxlib procedure written by 
28
; import_boxlib procedure written by 
29
;---------------------------------------------------------------------
29
;---------------------------------------------------------------------
30
 
30
 
31
	use32
31
	use32
32
	org 0x0
32
	org 0
33
 
33
 
34
	db 'MENUET01'
34
	db 'MENUET01'
35
	dd 0x01
35
	dd 1
36
	dd START
36
	dd START
37
	dd IM_END
37
	dd IM_END
38
	dd I_END
38
	dd I_END
39
	dd stacktop
39
	dd stacktop
40
	dd 0x0
40
	dd 0
41
	dd path
41
	dd path
42
 
42
 
43
include '../../../../../macros.inc'
43
include '../../../../../macros.inc'
44
include '../../load_lib.mac'
44
include '../../../../../KOSfuncs.inc'
45
;include 'macros.inc'
-
 
46
;include 'load_lib.mac'
45
include '../../../../../load_lib.mac'
47
@use_library
46
@use_library
48
 
47
 
49
;---------------------------------------------------------------------
48
;---------------------------------------------------------------------
50
;--- Start of program ----------------------------------------------
49
;--- Start of program ----------------------------------------------
51
;---------------------------------------------------------------------
50
;---------------------------------------------------------------------
52
START:
51
START:
53
	mcall	68,11
52
	mcall	68,11
54
	mcall	66,1,1
53
	mcall	66,1,1
55
	mcall	40,0x27
54
	mcall	40,0x27
56
;---------------------------------------------------------------------	
55
;---------------------------------------------------------------------	
57
 
56
 
58
load_libraries	l_libs_start,end_l_libs
57
load_libraries	l_libs_start,end_l_libs
59
 
58
 
60
	test	eax,eax
59
	test	eax,eax
61
	jnz	button.exit
60
	jnz	button.exit
62
 
61
 
63
; unpack deflate
62
; unpack deflate
64
	mov	eax,[unpack_DeflateUnpack2]
63
	mov	eax,[unpack_DeflateUnpack2]
65
	mov	[deflate_unpack],eax
64
	mov	[deflate_unpack],eax
66
 
65
 
67
; OpenDialog initialisation
66
; OpenDialog initialisation
68
	push    dword OpenDialog_data
67
	push    dword OpenDialog_data
69
	call    [OpenDialog_Init]
68
	call    [OpenDialog_Init]
70
 
69
 
71
	mov	edi,filename_area
70
	mov	edi,filename_area
72
	mov	esi,start_temp_file_name
71
	mov	esi,start_temp_file_name
73
	xor	eax,eax
72
	xor	eax,eax
74
	cld
73
	cld
75
@@:
74
@@:
76
	lodsb
75
	lodsb
77
	stosb
76
	stosb
78
	test	eax,eax
77
	test	eax,eax
79
	jnz	@b
78
	jnz	@b
80
	
79
	
81
	
80
	
82
;	mov	ebx,icons_file_name
81
;	mov	ebx,icons_file_name
83
;	mov	esi,path
82
;	mov	esi,path
84
;	mov	edi,file_name
83
;	mov	edi,file_name
85
 
84
 
86
	copy_path	icons_file_name,path,library_path,0
85
	copy_path	icons_file_name,path,library_path,0
87
	
86
	
88
	mcall	70,fileinfo
87
	mcall	70,fileinfo
89
 
88
 
90
	mov	[fileinfo+0],dword 0
89
	mov	[fileinfo+0],dword 0
91
 
90
 
92
	mov	ecx,[file_info+32]
91
	mov	ecx,[file_info+32]
93
	mov	[fileinfo+12],ecx
92
	mov	[fileinfo+12],ecx
94
	mov	[img_size],ecx
93
	mov	[img_size],ecx
95
	
94
	
96
 
95
 
97
	mcall	68,12
96
	mcall	68,12
98
 
97
 
99
 
98
 
100
	mov	[fileinfo+16],eax
99
	mov	[fileinfo+16],eax
101
	mov	[image_file],eax
100
	mov	[image_file],eax
102
 
101
 
103
 
102
 
104
	mcall	70,fileinfo
103
	mcall	70,fileinfo
105
	
104
	
106
	xor	eax,eax
105
	xor	eax,eax
107
	mov	[return_code],eax
106
	mov	[return_code],eax
108
;	mov	eax,image_file
107
;	mov	eax,image_file
109
	push	image_file
108
	push	image_file
110
	call	[cnv_png_import.Start]
109
	call	[cnv_png_import.Start]
111
	
110
	
112
	mov	ecx,[image_file]
111
	mov	ecx,[image_file]
113
	mcall	68,13,
112
	mcall	68,13,
114
	
113
	
115
	cmp	[return_code],dword 0
114
	cmp	[return_code],dword 0
116
	jne	button.exit
115
	jne	button.exit
117
	
116
	
118
	mov	ebx,[raw_pointer]
117
	mov	ebx,[raw_pointer]
119
	mov	eax,[ebx+4]
118
	mov	eax,[ebx+4]
120
; set of button size
119
; set of button size
121
	mov	[dinamic_button_data_1.size_x],ax
120
	mov	[dinamic_button_data_1.size_x],ax
122
	mov	[dinamic_button_data_1.size_y],ax
121
	mov	[dinamic_button_data_1.size_y],ax
123
	mov	[dinamic_button_data_2.size_x],ax
122
	mov	[dinamic_button_data_2.size_x],ax
124
	mov	[dinamic_button_data_2.size_y],ax
123
	mov	[dinamic_button_data_2.size_y],ax
125
	mov	eax,[ebx+12]
124
	mov	eax,[ebx+12]
126
; set of RAW resolution to pixel
125
; set of RAW resolution to pixel
127
	mov	[dinamic_button_data_1.resolution_raw],eax
126
	mov	[dinamic_button_data_1.resolution_raw],eax
128
	mov	[dinamic_button_data_2.resolution_raw],eax
127
	mov	[dinamic_button_data_2.resolution_raw],eax
129
	mov	eax,[ebx+20]
128
	mov	eax,[ebx+20]
130
	add	eax,ebx
129
	add	eax,ebx
131
; set RAW palette, use else resolution 8bit or less
130
; set RAW palette, use else resolution 8bit or less
132
	mov	[dinamic_button_data_1.palette_raw],eax
131
	mov	[dinamic_button_data_1.palette_raw],eax
133
	mov	[dinamic_button_data_2.palette_raw],eax
132
	mov	[dinamic_button_data_2.palette_raw],eax
134
	mov	eax,[ebx+28]
133
	mov	eax,[ebx+28]
135
	add	eax,ebx
134
	add	eax,ebx
136
; set RAW area for passive button
135
; set RAW area for passive button
137
	mov	[dinamic_button_data_1.passive_raw],eax
136
	mov	[dinamic_button_data_1.passive_raw],eax
138
	mov	[dinamic_button_data_2.passive_raw],eax
137
	mov	[dinamic_button_data_2.passive_raw],eax
139
	mov	ecx,[ebx+4]
138
	mov	ecx,[ebx+4]
140
	imul	ecx,[ebx+4]
139
	imul	ecx,[ebx+4]
141
	imul	ecx,[ebx+12]
140
	imul	ecx,[ebx+12]
142
	shr	ecx,3
141
	shr	ecx,3
143
	add	eax,ecx
142
	add	eax,ecx
144
; set RAW area for active button
143
; set RAW area for active button
145
	mov	[dinamic_button_data_1.active_raw],eax
144
	mov	[dinamic_button_data_1.active_raw],eax
146
	mov	[dinamic_button_data_2.active_raw],eax
145
	mov	[dinamic_button_data_2.active_raw],eax
147
	add	eax,ecx
146
	add	eax,ecx
148
; RAW area for click button
147
; RAW area for click button
149
	mov	[dinamic_button_data_1.click_raw],eax
148
	mov	[dinamic_button_data_1.click_raw],eax
150
	mov	[dinamic_button_data_2.click_raw],eax
149
	mov	[dinamic_button_data_2.click_raw],eax
151
;---------------------------------------------------------------------
150
;---------------------------------------------------------------------
152
red:
151
red:
153
	call	draw_window
152
	call	draw_window
154
still:
153
still:
155
	mcall	10
154
	mcall	10
156
 
155
 
157
	cmp	eax,1
156
	cmp	eax,1
158
	je	red
157
	je	red
159
	cmp	eax,2
158
	cmp	eax,2
160
	je	key
159
	je	key
161
	cmp	eax,3
160
	cmp	eax,3
162
	je	button
161
	je	button
163
	cmp	eax,6
162
	cmp	eax,6
164
	je	mouse
163
	je	mouse
165
	jmp	still
164
	jmp	still
166
;---------------------------------------------------------------------
165
;---------------------------------------------------------------------
167
	key:
166
	key:
168
	mcall	2
167
	mcall	2
169
	jmp	still
168
	jmp	still
170
;---------------------------------------------------------------------
169
;---------------------------------------------------------------------
171
	button:
170
	button:
172
	mcall	17
171
	mcall	17
173
	cmp	ah,1
172
	cmp	ah,1
174
	jne	still
173
	jne	still
175
	.exit:
174
	.exit:
176
	mcall	-1
175
	mcall	-1
177
;---------------------------------------------------------------------
176
;---------------------------------------------------------------------
178
mouse:
177
mouse:
179
;-----------------------------------------------
178
;-----------------------------------------------
180
	cmp	[scroll_bar_data_horizontal.delta2],0
179
	cmp	[scroll_bar_data_horizontal.delta2],0
181
	jne	.horizontal
180
	jne	.horizontal
182
.vertical:
181
.vertical:
183
	mov	eax,[scroll_bar_data_vertical.max_area]
182
	mov	eax,[scroll_bar_data_vertical.max_area]
184
	cmp	eax,[scroll_bar_data_vertical.cur_area]
183
	cmp	eax,[scroll_bar_data_vertical.cur_area]
185
	jbe	.horizontal
184
	jbe	.horizontal
186
; mouse event for Vertical ScrollBar
185
; mouse event for Vertical ScrollBar
187
	push	dword scroll_bar_data_vertical
186
	push	dword scroll_bar_data_vertical
188
	call	[scrollbar_ver_mouse]
187
	call	[scrollbar_ver_mouse]
189
	mov	eax,scroll_bar_data_vertical.redraw
188
	mov	eax,scroll_bar_data_vertical.redraw
190
	xor	ebx,ebx
189
	xor	ebx,ebx
191
	cmp	[eax],ebx
190
	cmp	[eax],ebx
192
	je	@f
191
	je	@f
193
	mov	[eax],ebx
192
	mov	[eax],ebx
194
	jmp	.draw_cube
193
	jmp	.draw_cube
195
@@:
194
@@:
196
	cmp	[scroll_bar_data_vertical.delta2],0
195
	cmp	[scroll_bar_data_vertical.delta2],0
197
	jne	still
196
	jne	still
198
.horizontal:
197
.horizontal:
199
	mov	eax,[scroll_bar_data_horizontal.max_area]
198
	mov	eax,[scroll_bar_data_horizontal.max_area]
200
	cmp	eax,[scroll_bar_data_horizontal.cur_area]
199
	cmp	eax,[scroll_bar_data_horizontal.cur_area]
201
	jbe	.other
200
	jbe	.other
202
; mouse event for Horizontal ScrollBar
201
; mouse event for Horizontal ScrollBar
203
	push	dword scroll_bar_data_horizontal
202
	push	dword scroll_bar_data_horizontal
204
	call	[scrollbar_hor_mouse]
203
	call	[scrollbar_hor_mouse]
205
	mov	eax,scroll_bar_data_horizontal.redraw
204
	mov	eax,scroll_bar_data_horizontal.redraw
206
	xor	ebx,ebx
205
	xor	ebx,ebx
207
	cmp	[eax],ebx	
206
	cmp	[eax],ebx	
208
	je	.other
207
	je	.other
209
	mov	[eax],ebx
208
	mov	[eax],ebx
210
.draw_cube:
209
.draw_cube:
211
	call	draw_cube
210
	call	draw_cube
212
	jmp	still
211
	jmp	still
213
.other:
212
.other:
214
	cmp	[scroll_bar_data_vertical.delta2],0
213
	cmp	[scroll_bar_data_vertical.delta2],0
215
	jne	still
214
	jne	still
216
	cmp	[scroll_bar_data_horizontal.delta2],0
215
	cmp	[scroll_bar_data_horizontal.delta2],0
217
	jne	still
216
	jne	still
218
;-----------------------------------------------
217
;-----------------------------------------------
219
.menu_bar_1:
218
.menu_bar_1:
220
	call	.set_mouse_flag
219
	call	.set_mouse_flag
221
@@:
220
@@:
222
; mouse event for Menu 1
221
; mouse event for Menu 1
223
	push	dword menu_data_1
222
	push	dword menu_data_1
224
	call	[menu_bar_mouse]
223
	call	[menu_bar_mouse]
225
	cmp	[menu_data_1.click],dword 1
224
	cmp	[menu_data_1.click],dword 1
226
	jne	.menu_bar_2
225
	jne	.menu_bar_2
227
	cmp	[menu_data_1.cursor_out],dword 0
226
	cmp	[menu_data_1.cursor_out],dword 0
228
	jne	analyse_out_menu_1
227
	jne	analyse_out_menu_1
229
	jmp	.menu_bar_1
228
	jmp	.menu_bar_1
230
;--------------------------------------------
229
;--------------------------------------------
231
.menu_bar_2:
230
.menu_bar_2:
232
; mouse event for Menu 2
231
; mouse event for Menu 2
233
	push	dword menu_data_2
232
	push	dword menu_data_2
234
	call	[menu_bar_mouse]
233
	call	[menu_bar_mouse]
235
	cmp	[menu_data_2.click],dword 1
234
	cmp	[menu_data_2.click],dword 1
236
	jne	.mouse_dinamic_button
235
	jne	.mouse_dinamic_button
237
	cmp	[menu_data_2.cursor_out],dword 0
236
	cmp	[menu_data_2.cursor_out],dword 0
238
	jne	analyse_out_menu_2
237
	jne	analyse_out_menu_2
239
	jmp	.menu_bar_1
238
	jmp	.menu_bar_1
240
;--------------------------------------------
239
;--------------------------------------------
241
.mouse_dinamic_button:
240
.mouse_dinamic_button:
242
; mouse event for Dinamic Button 1
241
; mouse event for Dinamic Button 1
243
	push	dword dinamic_button_data_1
242
	push	dword dinamic_button_data_1
244
	call	[dinamic_button_mouse]
243
	call	[dinamic_button_mouse]
245
	mov	eax,dinamic_button_data_1.click
244
	mov	eax,dinamic_button_data_1.click
246
	cmp	[eax],dword 1
245
	cmp	[eax],dword 1
247
	jne	@f
246
	jne	@f
248
	mov	[eax],dword 0
247
	mov	[eax],dword 0
249
	jmp	about
248
	jmp	about
250
@@:
249
@@:
251
; mouse event for Dinamic Button 2
250
; mouse event for Dinamic Button 2
252
	push	dword dinamic_button_data_2
251
	push	dword dinamic_button_data_2
253
	call	[dinamic_button_mouse]
252
	call	[dinamic_button_mouse]
254
	mov	eax,dinamic_button_data_2.click
253
	mov	eax,dinamic_button_data_2.click
255
	cmp	[eax],dword 1
254
	cmp	[eax],dword 1
256
	jne	still	;@f
255
	jne	still	;@f
257
	mov	[eax],dword 0
256
	mov	[eax],dword 0
258
	jmp	button.exit
257
	jmp	button.exit
259
;---------------------------------------------------------------------
258
;---------------------------------------------------------------------
260
.set_mouse_flag:	
259
.set_mouse_flag:	
261
	xor	eax,eax
260
	xor	eax,eax
262
	inc	eax
261
	inc	eax
263
	mov	[menu_data_1.get_mouse_flag],eax
262
	mov	[menu_data_1.get_mouse_flag],eax
264
	mov	[menu_data_2.get_mouse_flag],eax
263
	mov	[menu_data_2.get_mouse_flag],eax
265
	ret
264
	ret
266
;---------------------------------------------------------------------
265
;---------------------------------------------------------------------
267
analyse_out_menu_1:
266
analyse_out_menu_1:
268
; analyse result of Menu 1
267
; analyse result of Menu 1
269
	mov	eax,[menu_data_1.cursor_out]
268
	mov	eax,[menu_data_1.cursor_out]
270
	cmp	eax,dword 1
269
	cmp	eax,dword 1
271
	je	OpenDialog_start_0
270
	je	OpenDialog_start_0
272
	cmp	eax,dword 2
271
	cmp	eax,dword 2
273
	je	OpenDialog_start_1
272
	je	OpenDialog_start_1
274
	cmp	eax,dword 3
273
	cmp	eax,dword 3
275
	je	OpenDialog_start_2
274
	je	OpenDialog_start_2
276
	cmp	eax,dword 4
275
	cmp	eax,dword 4
277
	je	button.exit	
276
	je	button.exit	
278
	jmp	still
277
	jmp	still
279
;---------------------------------------------------------------------
278
;---------------------------------------------------------------------
280
analyse_out_menu_2:
279
analyse_out_menu_2:
281
; analyse result of Menu 2
280
; analyse result of Menu 2
282
	cmp	[menu_data_2.cursor_out],dword 2
281
	cmp	[menu_data_2.cursor_out],dword 2
283
	je	about
282
	je	about
284
	jmp	still
283
	jmp	still
285
;---------------------------------------------------------------------
284
;---------------------------------------------------------------------
286
	about:
285
	about:
287
	mcall	51,1,thread3,thread
286
	mcall	51,1,thread3,thread
288
	jmp	still
287
	jmp	still
289
;---------------------------------------------------------------------
288
;---------------------------------------------------------------------
290
OpenDialog_start_0:
289
OpenDialog_start_0:
291
	mov	[OpenDialog_data.type],0
290
	mov	[OpenDialog_data.type],0
292
	jmp	OpenDialog_start
291
	jmp	OpenDialog_start
293
OpenDialog_start_1:
292
OpenDialog_start_1:
294
	mov	[OpenDialog_data.type],1
293
	mov	[OpenDialog_data.type],1
295
	jmp	OpenDialog_start
294
	jmp	OpenDialog_start
296
OpenDialog_start_2:
295
OpenDialog_start_2:
297
	mov	[OpenDialog_data.type],2
296
	mov	[OpenDialog_data.type],2
298
OpenDialog_start:
297
OpenDialog_start:
299
;	mov	ebx,open_dialog_name
298
;	mov	ebx,open_dialog_name
300
;	mov	esi,path
299
;	mov	esi,path
301
;	mov	edi,library_path
300
;	mov	edi,library_path
302
;	call	copy_file_path
301
;	call	copy_file_path
303
 
302
 
304
;	copy_path	open_dialog_name,path,library_path,0
303
;	copy_path	open_dialog_name,path,library_path,0
305
 
304
 
306
	push    dword OpenDialog_data
305
	push    dword OpenDialog_data
307
	call    [OpenDialog_Start]
306
	call    [OpenDialog_Start]
308
 
307
 
309
	cmp	[OpenDialog_data.status],2	; OpenDialog does not start
308
	cmp	[OpenDialog_data.status],2	; OpenDialog does not start
310
	je	still	; some kind of alternative, instead OpenDialog
309
	je	still	; some kind of alternative, instead OpenDialog
311
	cmp	[OpenDialog_data.status],1
310
	cmp	[OpenDialog_data.status],1
312
	jne	still	; OpenDialog user say cancel
311
	jne	still	; OpenDialog user say cancel
313
; copy path
312
; copy path
314
; prepare path - PathShow
313
; prepare path - PathShow
315
	push	dword PathShow_data_1
314
	push	dword PathShow_data_1
316
	call	[PathShow_prepare]
315
	call	[PathShow_prepare]
317
	
316
	
318
	call	draw_window
317
	call	draw_window
319
	jmp	still	; OpenDialog user selected the target file
318
	jmp	still	; OpenDialog user selected the target file
320
;	[OpenDialog_data.openfile_pach] pointer of area the target file
319
;	[OpenDialog_data.openfile_pach] pointer of area the target file
321
;---------------------------------------------------------------------
320
;---------------------------------------------------------------------
322
;---------------------------------------------------------------------
321
;---------------------------------------------------------------------
323
draw_window:
322
draw_window:
324
	mcall	12,1
323
	mcall	12,1
325
	mcall	0,<0,400>,<0,400>,0x03AABBCC,0x805080D0,0x005080D0
324
	mcall	0,<0,400>,<0,400>,0x03AABBCC,0x805080D0,0x005080D0
326
	mcall	71,1,header_1
325
	mcall	71,1,header_1
327
;---------------------------------------------
326
;---------------------------------------------
328
; draw for Menu 1
327
; draw for Menu 1
329
	push	dword menu_data_1
328
	push	dword menu_data_1
330
	call	[menu_bar_draw]	
329
	call	[menu_bar_draw]	
331
; draw for Menu 2
330
; draw for Menu 2
332
	push	dword menu_data_2
331
	push	dword menu_data_2
333
	call	[menu_bar_draw]	
332
	call	[menu_bar_draw]	
334
;---------------------------------------------
333
;---------------------------------------------
335
; draw for Dinamic Button	1
334
; draw for Dinamic Button	1
336
	push	dword dinamic_button_data_1
335
	push	dword dinamic_button_data_1
337
	call	[dinamic_button_draw]
336
	call	[dinamic_button_draw]
338
; draw for Dinamic Button 2
337
; draw for Dinamic Button 2
339
	push	dword dinamic_button_data_2
338
	push	dword dinamic_button_data_2
340
	call	[dinamic_button_draw]
339
	call	[dinamic_button_draw]
341
;---------------------------------------------
340
;---------------------------------------------
342
	mcall	13,<170,200>,<25,15>,0xffffb0
341
	mcall	13,<170,200>,<25,15>,0xffffb0
343
;	mov	bx,28
342
;	mov	bx,28
344
;	add	ebx,2 shl 16
343
;	add	ebx,2 shl 16
345
;	mcall	4,,0xC0000000,text_work_area,,0xffffb0
344
;	mcall	4,,0xC0000000,text_work_area,,0xffffb0
346
; draw for PathShow
345
; draw for PathShow
347
	push	dword PathShow_data_1
346
	push	dword PathShow_data_1
348
	call	[PathShow_draw]	
347
	call	[PathShow_draw]	
349
;---------------------------------------------
348
;---------------------------------------------
350
; set all_redraw flag for draw all ScrollBar
349
; set all_redraw flag for draw all ScrollBar
351
; In some cases it is necessity to draw only the area
350
; In some cases it is necessity to draw only the area
352
; of moving of a "runner", for acceleration of output -
351
; of moving of a "runner", for acceleration of output -
353
; in this case the flag needs to be reset to 0 (zero).
352
; in this case the flag needs to be reset to 0 (zero).
354
	xor	eax,eax
353
	xor	eax,eax
355
	inc	eax
354
	inc	eax
356
	mov	[scroll_bar_data_vertical.all_redraw],eax
355
	mov	[scroll_bar_data_vertical.all_redraw],eax
357
	mov	[scroll_bar_data_horizontal.all_redraw],eax
356
	mov	[scroll_bar_data_horizontal.all_redraw],eax
358
	
357
	
359
; draw for Vertical ScrollBar
358
; draw for Vertical ScrollBar
360
	push	dword scroll_bar_data_vertical
359
	push	dword scroll_bar_data_vertical
361
	call	[scrollbar_ver_draw]
360
	call	[scrollbar_ver_draw]
362
; draw for Horizontal ScrollBar
361
; draw for Horizontal ScrollBar
363
	push	dword scroll_bar_data_horizontal
362
	push	dword scroll_bar_data_horizontal
364
	call	[scrollbar_hor_draw]
363
	call	[scrollbar_hor_draw]
365
; reset all_redraw flag	
364
; reset all_redraw flag	
366
	xor	eax,eax
365
	xor	eax,eax
367
	mov	[scroll_bar_data_vertical.all_redraw],eax
366
	mov	[scroll_bar_data_vertical.all_redraw],eax
368
	mov	[scroll_bar_data_horizontal.all_redraw],eax
367
	mov	[scroll_bar_data_horizontal.all_redraw],eax
369
;---------------------------------------------
368
;---------------------------------------------
370
	call	draw_cube
369
	call	draw_cube
371
	mcall	12,2
370
	mcall	12,2
372
	ret
371
	ret
373
;---------------------------------------------------------------------
372
;---------------------------------------------------------------------
374
draw_cube:
373
draw_cube:
375
	mcall	13,<30,301>,<50,301>,0xafafaf
374
	mcall	13,<30,301>,<50,301>,0xafafaf
376
	mov	ecx,[scroll_bar_data_vertical.position]
375
	mov	ecx,[scroll_bar_data_vertical.position]
377
	add	ecx,50
376
	add	ecx,50
378
	shl	ecx,16
377
	shl	ecx,16
379
	mov	cx,30
378
	mov	cx,30
380
	mov	ebx,[scroll_bar_data_horizontal.position]
379
	mov	ebx,[scroll_bar_data_horizontal.position]
381
	add	ebx,30
380
	add	ebx,30
382
	shl	ebx,16
381
	shl	ebx,16
383
	mov	bx,30
382
	mov	bx,30
384
	mcall	13,,,0x0
383
	mcall	13,,,0x0
385
	ret
384
	ret
386
;---------------------------------------------------------------------
385
;---------------------------------------------------------------------
387
include 'data.inc'
386
include 'data.inc'
388
include 'w_about.inc'
387
include 'w_about.inc'
389
;---------------------------------------------------------------------
388
;---------------------------------------------------------------------
390
IM_END:
389
IM_END:
391
	rb 1024
390
	rb 1024
392
thread:
391
thread:
393
;---------------------------------------------------------------------
392
;---------------------------------------------------------------------
394
	rb 1024
393
	rb 1024
395
stacktop:
394
stacktop:
396
;---------------------------------------------------------------------
395
;---------------------------------------------------------------------
397
path:
396
path:
398
	rb 4096
397
	rb 4096
399
;---------------------------------------------------------------------
398
;---------------------------------------------------------------------
400
openfile_pach:
399
openfile_pach:
401
	rb 4096
400
	rb 4096
402
;---------------------------------------------------------------------
401
;---------------------------------------------------------------------
403
file_name:
402
file_name:
404
library_path:
403
library_path:
405
	rb 4096
404
	rb 4096
406
;---------------------------------------------------------------------
405
;---------------------------------------------------------------------
407
plugin_pach:
406
plugin_pach:
408
	rb 4096
407
	rb 4096
409
;---------------------------------------------------------------------
408
;---------------------------------------------------------------------
410
text_work_area:
409
text_work_area:
411
	rb 4096
410
	rb 4096
412
;---------------------------------------------------------------------
411
;---------------------------------------------------------------------
413
filename_area:
412
filename_area:
414
	rb 256
413
	rb 256
415
;---------------------------------------------------------------------
414
;---------------------------------------------------------------------
416
file_info:
415
file_info:
417
	rb 40
416
	rb 40
418
;---------------------------------------------------------------------
417
;---------------------------------------------------------------------
419
procinfo:
418
procinfo:
420
	rb 1024
419
	rb 1024
421
;---------------------------------------------------------------------
420
;---------------------------------------------------------------------
422
I_END:
421
I_END: