Subversion Repositories Kolibri OS

Rev

Rev 4156 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4336 GerdtR 1
ICON_STRIP	equ '/rd/1/iconstrp.png'
2
ICON_INI	equ '/rd/1/settings/icon.ini'
3
ICON_SIZE	equ 68	  ;размер области для иконки с надписью
4
IMG_SIZE	equ 32	  ;размер иконок
5
TEXT_BOTTOM_Y	equ 14	  ;отступ по Y текста от низа иконки
6
IMAGE_TOP_Y	equ 10	  ;>=1 Координата Y иконки в области для данной иконки
7
ALIGN_SIZE	equ 68	  ;размер сетки выравнивания
8
NAME_LENGTH	equ 11	 ;длина имени иконки
9
MIN_NO_MOVING	equ 8	 ;через столько пикселей сдвига мыши начинается таскание иконки
4036 GerdtR 10
 
4336 GerdtR 11
		     ;--------для диалога создания/редактирования
4146 GerdtR 12
ICONSX		equ 20
13
ICONSY		equ 80
3853 GerdtR 14
ICONS_DRAW_COUNTW equ 10  ;количество иконок в ширину
15
ICONS_DRAW_COUNTH equ 2   ;количество иконок в высоту
4146 GerdtR 16
SPCW		equ 3	  ;пробел между иконками по горизонтали
17
SPCH		equ 3
3853 GerdtR 18
END_ICONS_AREAW equ ICONSX+(IMG_SIZE+SPCW)*ICONS_DRAW_COUNTW-SPCW
19
END_ICONS_AREAH equ ICONSY+(IMG_SIZE+SPCH)*ICONS_DRAW_COUNTH-SPCH
20
 
21
 
22
 
4146 GerdtR 23
SizeData	equ bufStdIco+32
24
BegData 	equ fiStdIco.point
3853 GerdtR 25
;------------------------------------------------------------------------------
4146 GerdtR 26
	use32
27
	org 0x0
28
	db 'MENUET01'	; 8 byte id
29
	dd 0x01 	; header version
30
	dd START	; start of code
31
	dd I_END	; size of image
32
	dd ENDMEM	; memory for app
33
	dd stack_main	; esp
34
	dd 0		; boot parameters
35
	dd 0		; path
3853 GerdtR 36
;------------------------------------------------------------------------------
37
include 'lang.inc'
38
include '../../macros.inc'
39
include '../../proc32.inc'
40
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
41
include '../../dll.inc'
4003 GerdtR 42
;include '../../debug.inc'
3853 GerdtR 43
;------------------------------------------------------------------------------
4146 GerdtR 44
START:		; start of execution
45
	mcall	68,11
46
	stdcall dll.Load,IMPORTS
47
	test	eax,eax
48
	jnz	ErrLoadLibs
3853 GerdtR 49
 
50
; unpack deflate
4146 GerdtR 51
	mov	eax,[unpack_DeflateUnpack2]
52
	mov	[deflate_unpack],eax
3853 GerdtR 53
;---------------------------------------------------------------------
54
; get size of file ICONSTRP.PNG
4146 GerdtR 55
	mcall	70,fiStdIco
56
	test	eax,eax
57
	jnz	ErrorStrp
3853 GerdtR 58
; get memory for ICONSTRP.PNG
4146 GerdtR 59
	mov	ecx,dword[bufStdIco+32]
60
	mov	[fiStdIco.size],ecx
61
	mov	[img_size],ecx
62
	mcall	68,12
63
	mov	[fiStdIco.point],eax
64
	mov	[image_file],eax
3853 GerdtR 65
; load ICONSTRP.PNG
4146 GerdtR 66
	mov	dword[fiStdIco],0
67
	mcall	70,fiStdIco
68
	test	eax,eax
69
	jnz	close
3853 GerdtR 70
; convert PNG to RAW
4146 GerdtR 71
	xor	eax,eax
72
	mov	[return_code],eax
3853 GerdtR 73
;int3
74
 
4146 GerdtR 75
	push	image_file
76
	call	[cnv_png_import.Start]
3853 GerdtR 77
 
4146 GerdtR 78
	mov	eax,[raw_pointer]
79
	mov	ebx,[eax+32]
80
	mov	[strip_file_size],ebx
81
	mov	eax,[eax+28]
82
	add	eax,[raw_pointer]
83
	mov	[strip_file],eax
3853 GerdtR 84
; back memory to system
4146 GerdtR 85
	mcall	68,13,[fiStdIco.point]
3853 GerdtR 86
 
4146 GerdtR 87
	mov	eax,[raw_pointer]
88
	mov	eax,[eax+8]
89
	shr	eax,5
90
	mov	[icon_count],eax
3853 GerdtR 91
 
4146 GerdtR 92
	and	eax,0x7
93
	mov	[cur_band_compensation],eax
3853 GerdtR 94
 
95
;########## загружаем данные иконок в память ##########################
96
 
4336 GerdtR 97
	mcall	70,fiIni		     ;выделяем память, достаточной для хранения ini файла.
98
	test	eax,eax 		;Её точно хватит для хранения данных об иконках
4146 GerdtR 99
	jnz	ErrorIni
3853 GerdtR 100
 
4146 GerdtR 101
	cmp	dword[bufIni+32],0
102
	je	ErrorIni
103
	mcall	68,12,dword[bufIni+32]
104
	mov	dword[BegData],eax
105
	jmp	NoErrIni
3853 GerdtR 106
 
107
  ErrorIni:
4146 GerdtR 108
	mcall	70,fiRunProg
109
	mcall	-1
3853 GerdtR 110
 
111
  NoErrIni:
4146 GerdtR 112
	m2m	[PIcoDB],[BegData]
3853 GerdtR 113
 
4336 GerdtR 114
 
115
 
116
	mov	edi,IconsID
117
	xor	eax,eax
118
	mov	ecx,100h/4
119
	rep stosd
120
	mov	[nLoadIcon],0
4146 GerdtR 121
	stdcall [ini_enum_sections],IconIni,LoadIconsData
3853 GerdtR 122
;int3
4146 GerdtR 123
	mov	eax,dword[PIcoDB]
124
	sub	eax,[BegData]
125
	mov	dword[SizeData],eax
126
	mov	eax,[BegData]
127
	cmp	eax,[PIcoDB]
128
	jne	@f
129
	mov	dword[eax],0
130
	mov	dword[SizeData],0
3853 GerdtR 131
   @@:
132
;######################################################################
4146 GerdtR 133
	call	FillIconsOffs		       ;заполняет MaxNumIcon,IconsOffs
3853 GerdtR 134
 
4146 GerdtR 135
	mcall	40,0100000b		       ;нужны только события мыши, перерисовка иконок будет в другом потоке
3853 GerdtR 136
 
4146 GerdtR 137
	mov	eax,[icon_count]
138
	mov	bl,ICONS_DRAW_COUNTH
139
	div	bl
140
	test	ah,ah
141
	jz	@f
142
	inc	al
3853 GerdtR 143
     @@:
4146 GerdtR 144
	and	eax,0FFh
145
	mov	[sbIcons.max_area],eax
3853 GerdtR 146
 
4146 GerdtR 147
	mcall	51,1,BGRedrawThread,stack_bredraw	;запускаем поток перерисовки иконок
148
	stdcall [OpenDialog_Init],OpenDialog_data
3853 GerdtR 149
 
4336 GerdtR 150
;dph [MaxNumIcon]
151
 
3853 GerdtR 152
messages:
4146 GerdtR 153
	mcall	10
154
	sub	eax,6
155
	jz	MSGMouse
3853 GerdtR 156
 
4146 GerdtR 157
	jmp	messages
3853 GerdtR 158
 
159
 
160
MSGMouse:
4146 GerdtR 161
	mcall	37,0	;GetMousePos
162
	xor	ebx,ebx
163
	mov	bx,ax
164
	shr	eax,16
165
	mov	ecx,ebx
166
	mov	ebx,eax
3853 GerdtR 167
 
4146 GerdtR 168
	mcall	34
169
	cmp	eax,1
170
	jne	messages
3853 GerdtR 171
 
4146 GerdtR 172
	cmp	[RButtonActiv],1
173
	je	messages
3853 GerdtR 174
 
4146 GerdtR 175
	mov	[MouseY],ecx
176
	mov	[MouseX],ebx
3853 GerdtR 177
 
178
 
4146 GerdtR 179
	mcall	37,2
180
	test	al,001b
181
	jnz	LButtonPress
182
	test	al,010b
183
	jnz	RButtonPress
184
	jmp	messages
3853 GerdtR 185
 
186
ErrLoadLibs:
4146 GerdtR 187
	;dps     'Не удалось загрузить необходимые библиотеки'
188
	;debug_newline
189
	jmp	close
3853 GerdtR 190
ErrorStrp:
4146 GerdtR 191
	;dps     'Ошибка открытия iconstrp.png'
192
	;debug_newline
3853 GerdtR 193
close:
4146 GerdtR 194
	mcall	-1
3853 GerdtR 195
 
196
LButtonPress:
4336 GerdtR 197
 
4146 GerdtR 198
	stdcall GetNumIcon,[MouseX],[MouseY],-1
3853 GerdtR 199
;int3
4146 GerdtR 200
	cmp	eax,-1
201
	jnz	@f
3853 GerdtR 202
 
203
    WaitLB1:
4146 GerdtR 204
	mcall	37,2
205
	test	al,001b
206
	jz	messages
207
	;Yield
208
	mcall	5,1
209
	jmp	WaitLB1
3853 GerdtR 210
 
211
 
212
     @@:
4146 GerdtR 213
	push	eax
214
	stdcall DrawIcon,eax,1
3853 GerdtR 215
   WaitLB:
4146 GerdtR 216
	mcall	37,2
217
	test	al,001b
218
	jz	endWaitLB
3853 GerdtR 219
 
4146 GerdtR 220
	mcall	37,0
221
	xor	ebx,ebx
222
	mov	bx,ax
223
	shr	eax,16
224
	sub	eax,[MouseX]
225
	jns	@f
226
	neg	eax
3853 GerdtR 227
      @@:
4146 GerdtR 228
	sub	ebx,[MouseY]
229
	jns	@f
230
	neg	ebx
3853 GerdtR 231
      @@:
4146 GerdtR 232
	cmp	[bFixIcons],0
233
	jne	@f
234
	cmp	eax,MIN_NO_MOVING
235
	ja	MovingIcon
236
	cmp	ebx,MIN_NO_MOVING
237
	ja	MovingIcon
3853 GerdtR 238
      @@:
4146 GerdtR 239
	;Yield
240
	mcall	5,1	;Sleep   1
3972 GerdtR 241
 
4146 GerdtR 242
	jmp	WaitLB
3853 GerdtR 243
   endWaitLB:
244
 
4146 GerdtR 245
	mcall	37,0
246
	xor	ebx,ebx
247
	mov	bx,ax
248
	shr	eax,16
249
	mov	ecx,ebx
250
	mov	ebx,eax
251
	mov	[MouseX],ebx
252
	mov	[MouseY],ecx
3853 GerdtR 253
 
4146 GerdtR 254
	stdcall GetNumIcon,[MouseX],[MouseY],-1
255
	cmp	eax,[esp]	;[esp] = номер иконки
256
	jne	@f
3853 GerdtR 257
 
4146 GerdtR 258
	mov	edi,[IconsOffs+eax*4]
259
	or	ecx,-1
260
	xor	al,al
261
	repne	scasb
262
	mov	ebx,edi
263
	repne	scasb
264
			     ;run program
265
	mov	dword[fiRunProg+8],edi
266
	mov	dword[fiRunProg+21],ebx
267
	mcall	70,fiRunProg
268
	test	eax,80000000h
269
	jz	@f
3853 GerdtR 270
 
4146 GerdtR 271
	mov	dword[fiRunProg+8],ErrRunProg
272
	mov	dword[fiRunProg+21],pthNotify
273
	mcall	70,fiRunProg
3853 GerdtR 274
 
275
     @@:
4146 GerdtR 276
	pop	eax
277
	stdcall RestoreBackgrnd,eax
278
	jmp	messages
3853 GerdtR 279
 
280
;-------------------------------------------------------------------------------
281
MovingIcon:
4146 GerdtR 282
	stdcall GetNumIcon,[MouseX],[MouseY],-1
283
	mov	[SelIcon],eax
284
	mov	[IconNoDraw],eax
285
	stdcall RestoreBackgrnd,[SelIcon]
3853 GerdtR 286
 
287
;        mov     ecx,[MaxNumIcon]
288
;        xor     ebx,ebx
289
;   .MI: push    ecx
290
;        cmp     ebx,[SelIcon]
291
;        je      @f
292
;        stdcall DrawIcon,ebx,0
293
;      @@:
294
;        inc     ebx
295
;        pop     ecx
296
;        loop    .MI
297
 
298
 
299
 
300
;dps 'Moving'
301
;debug_newline
302
;        mov     edi,[SelIcon]
303
;        mov     edi,[IconsOffs+edi*4]
304
;        or      ecx,-1
305
;        xor     al,al
306
;        repne scasb
307
;        repne scasb
308
;        repne scasb
309
;        repne scasb
310
;        xor     ebx,ebx
311
;        xor     esi,esi
312
;        mov     bx,word[edi+2]
313
;        mov     si,word[edi]
314
;        stdcall GetNumIcon,ebx,esi,[SelIcon]
315
;        cmp     eax,-1
316
;        je      @f
317
;  dps 'Q'
318
;        stdcall DrawIcon,eax,0
319
;     @@:
320
;
321
;        add     ebx,ICON_SIZE-1
322
;        stdcall GetNumIcon,ebx,esi,[SelIcon]
323
;        cmp     eax,-1
324
;        je      @f
325
;  dps 'Q'
326
;        stdcall DrawIcon,eax,0
327
;
328
;     @@:
329
;        add     esi,ICON_SIZE-1
330
;        stdcall GetNumIcon,ebx,esi,[SelIcon]
331
;        cmp     eax,-1
332
;        je      @f
333
;  dps 'Q'
334
;        stdcall DrawIcon,eax,0
335
;
336
;     @@:
337
;        sub     ebx,ICON_SIZE-1
338
;        stdcall GetNumIcon,ebx,esi,[SelIcon]
339
;        cmp     eax,-1
340
;        je      @f
341
;   dps 'Q'
342
;        stdcall DrawIcon,eax,0
343
;     @@:
344
 
345
 
346
; Sleep 40
347
 
348
;qweqwe:
349
 
4146 GerdtR 350
	mov    [MovingActiv],1
351
	mcall	51,1,MovingWnd,stack_mov	;CreateThread MovingWnd,stack_dlg
3853 GerdtR 352
   .WaitLB:
4146 GerdtR 353
	mcall	37,2	;GetMouseKey
354
	test	al,001b
355
	jz	.endWaitLB
3853 GerdtR 356
 
4146 GerdtR 357
	;Yield
358
	mcall	5,1	;Sleep 1
359
	jmp	.WaitLB
3853 GerdtR 360
   .endWaitLB:
361
 
4007 GerdtR 362
 
4146 GerdtR 363
	mcall	37,0		;GetMousePos
364
	xor	ebx,ebx
365
	mov	bx,ax
366
	shr	eax,16
3853 GerdtR 367
 
4146 GerdtR 368
	sub	eax,1+ICON_SIZE/2
369
	jnc	@f
370
	xor	eax,eax
371
      @@:
3853 GerdtR 372
 
4146 GerdtR 373
	sub	ebx,ICON_SIZE/2-7
374
	jnc	@f
375
	xor	ebx,ebx
3853 GerdtR 376
      @@:
4146 GerdtR 377
 
378
	cmp	ax,[wsX]
379
	jae	@f
380
	mov	ax,[wsX]
3853 GerdtR 381
      @@:
382
 
4146 GerdtR 383
	cmp	bx,[wsY]
384
	jae	@f
385
	mov	bx,[wsY]
386
      @@:			    ;eax,ebx - реальная координата. Все координаты в проге относительно левого верхнего угла рабочей области
387
 
388
	xor	edx,edx
389
	mov	dx,[wsXe]
390
	sub	edx,ICON_SIZE
391
	cmp	eax,edx
392
	jbe	@f
393
	mov	eax,edx
3853 GerdtR 394
      @@:
395
 
4146 GerdtR 396
	mov	dx,[wsYe]
397
	sub	edx,ICON_SIZE
398
	cmp	ebx,edx
399
	jbe	@f
400
	mov	ebx,edx
3853 GerdtR 401
      @@:
402
 
4146 GerdtR 403
	xor	edx,edx 	     ;преобразовываем в относительные
404
	mov	dx,[wsW]
405
	shr	edx,1
406
	add	dx,[wsX]
407
	cmp	eax,edx
408
	jbe	@f
409
	sub	ax,[wsXe]
410
	inc	ax
411
	jmp	.mov1
3853 GerdtR 412
      @@:
4146 GerdtR 413
	sub	ax,[wsX]
414
    .mov1:
3853 GerdtR 415
 
4146 GerdtR 416
	xor	edx,edx
417
	mov	dx,[wsH]
418
	shr	edx,1
419
	add	dx,[wsY]
420
	cmp	ebx,edx
421
	jbe	@f
422
	sub	bx,[wsYe]
423
	inc	bx
424
	jmp	.mov2
3853 GerdtR 425
      @@:
4146 GerdtR 426
	sub	bx,[wsY]
427
    .mov2:
3853 GerdtR 428
 
4146 GerdtR 429
	stdcall SetPosition,[SelIcon],eax,ebx
3853 GerdtR 430
 
4146 GerdtR 431
	m2m	[PIcoDB],[BegData]
432
	stdcall [ini_enum_sections],IconIni,Ini_SavePos  ;in RButton.inc
3853 GerdtR 433
 
4146 GerdtR 434
	mov	[bNotSave],1
435
	mov	[IconNoDraw],-1
3853 GerdtR 436
 
4146 GerdtR 437
	mov    [MovingActiv],0		;только теперь отключаем окно с мышью
4007 GerdtR 438
 
4146 GerdtR 439
	jmp	messages
3853 GerdtR 440
 
441
;-------------------------------------------------------------------------------
442
 
443
RButtonPress:
4146 GerdtR 444
	mov	[RButtonActiv],1
3853 GerdtR 445
 
446
     @@:
4146 GerdtR 447
	mcall	37,2	;GetMouseKey
448
	test	al,010b
449
	jz	@f
450
	mcall	5,1	;Yield
451
	jmp	@b
3853 GerdtR 452
     @@:
453
 
4146 GerdtR 454
	mcall	51,1,RButtonWin,stack_rmenu	  ;CreateThread RButtonWin,stack_rmenu
3853 GerdtR 455
 
4146 GerdtR 456
	jmp	messages
3853 GerdtR 457
 
458
 
459
;###############################################################################
460
;ret eax = 1/0 = удача/ошибка
461
proc DrawIcon NumIcon:DWORD,Activ:DWORD ;NumIcon = 0..n
4146 GerdtR 462
local	IconData:DWORD
463
	push	ebx edi esi
3853 GerdtR 464
 
4146 GerdtR 465
	mov	ecx,ICON_SIZE*ICON_SIZE
466
	xor	eax,eax
467
	mov	edi,IconArea
468
	rep	stosd
3853 GerdtR 469
 
4146 GerdtR 470
	mov	eax,[NumIcon]
471
	cmp	eax,[MaxNumIcon]
472
	jb	@f
473
	xor	eax,eax
474
	pop	esi edi ebx
475
	ret
3853 GerdtR 476
      @@:
477
 
4146 GerdtR 478
	mov	esi,[IconsOffs+eax*4]
479
	mov	[IconData],esi
3853 GerdtR 480
 
4146 GerdtR 481
			      ;рисуем текст
482
	mov	edi,esi
483
	xor	al,al
484
	or	ecx,-1
485
	repne scasb
486
	mov	edx,esi
487
	mov	eax,edi
488
	sub	eax,esi
489
	dec	eax
490
	shl	eax,1		 ;*6
491
	lea	eax,[eax*2+eax]
492
	mov	ebx,ICON_SIZE
493
	sub	ebx,eax
494
	shr	ebx,1	     ;ebx = x текста
495
	shl	ebx,16
496
	mov	bx,ICON_SIZE
497
	sub	bx,TEXT_BOTTOM_Y
498
	mov	ecx,88000000h
499
	mov	edi,IconAreaH
500
	add	ebx,-1*10000h+0
501
	mcall	4
502
	add	ebx,2*10000h+0
503
	mcall	;4
504
	add	ebx,-1*10000h-1
505
	mcall	;4
506
	add	ebx,0*10000h+2
507
	mcall	;4
508
	add	ebx,1*10000h+0
509
	mcall	;4
510
	inc	ebx;add     ebx,0*10000h+1
511
	mcall	;4
512
	add	ebx,-1*10000h+0
513
	mcall	;4
514
	add	ebx,0*10000h-2
515
	mov	ecx,88FFFFFFh
516
	mcall	;4
517
				    ;рисуем картинку
3853 GerdtR 518
 
4146 GerdtR 519
	mov	edi,esi
520
	xor	al,al
521
	or	ecx,-1
522
	repne	scasb
523
	repne	scasb
524
	repne	scasb
525
	mov	al,[edi]
526
	cmp	al,'9'
527
	ja	PathToIcon
528
	cmp	al,'/'
529
	jne	GetIconInd
3853 GerdtR 530
 
531
   PathToIcon:
4146 GerdtR 532
	mov	al,30h		 ;заглушка!!!!!!!!!!!!!
533
	mov	byte[edi+1],0
3853 GerdtR 534
 
4146 GerdtR 535
	jmp	CopyToMem
3853 GerdtR 536
   GetIconInd:
537
 
4146 GerdtR 538
	sub	al,30h
539
	cmp	byte[edi+1],0
540
	je	@f
541
	shl	eax,1
542
	lea	eax,[eax*4+eax]
543
	xor	edx,edx
544
	mov	dl,[edi+1]
545
	sub	dl,30h
546
	add	eax,edx
547
     @@:	     ;eax=num icon
548
	cmp	eax,[icon_count]
549
	jb	@f
550
	xor	eax,eax
3853 GerdtR 551
     @@:
4146 GerdtR 552
	test	eax,eax
553
	je	DI1
554
	mov	ecx,eax
555
	xor	eax,eax
3853 GerdtR 556
      @@:
4146 GerdtR 557
	add	eax,IMG_SIZE*IMG_SIZE*4
558
	loop	@b
3853 GerdtR 559
     DI1:
4146 GerdtR 560
	add	eax,[raw_pointer]
561
	add	eax,0+4*11
562
	mov	esi,eax
3853 GerdtR 563
 
564
  CopyToMem:
4146 GerdtR 565
	mov	edi,IconArea+((IMAGE_TOP_Y*ICON_SIZE)+((ICON_SIZE-IMG_SIZE)/2))*4
3853 GerdtR 566
 
4146 GerdtR 567
	mov	eax,IMG_SIZE
568
	mov	edx,eax
3853 GerdtR 569
      @@:
4146 GerdtR 570
	mov	ecx,eax
571
	rep	movsd
572
	add	edi,(ICON_SIZE-IMG_SIZE)*4
573
	dec	edx
574
	jnz	@b
3853 GerdtR 575
 
576
;-----------------
4146 GerdtR 577
				;если надо, то рисуем обводку
578
	cmp	[Activ],0
579
	je	.NoSelect
3853 GerdtR 580
 
4146 GerdtR 581
	mov	edi,IconArea
582
	mov	eax,0FF000000h
583
	mov	ecx,ICON_SIZE
584
	rep	stosd
585
	;mov     edi,IconArea+ICON_SIZE*1
3853 GerdtR 586
 
4146 GerdtR 587
	mov	ecx,ICON_SIZE-1
588
    @@: mov	dword[edi],eax
589
	add	edi,(ICON_SIZE)*4
590
	loop	@b
3853 GerdtR 591
 
4146 GerdtR 592
	mov	edi,IconArea+ICON_SIZE*2*4-4
593
	mov	ecx,ICON_SIZE-1
594
    @@: mov	dword[edi],eax
595
	add	edi,(ICON_SIZE)*4
596
	loop	@b
3853 GerdtR 597
 
4146 GerdtR 598
	mov	edi,IconArea+ICON_SIZE*(ICON_SIZE-1)*4+4
599
	mov	ecx,ICON_SIZE-2
600
	rep	stosd
3853 GerdtR 601
 
602
 
4146 GerdtR 603
	mov	edi,IconArea+ICON_SIZE*4+4
604
	mov	eax,0FFFFFFFFh
605
	mov	ecx,ICON_SIZE-2
606
	rep	stosd
3853 GerdtR 607
 
4146 GerdtR 608
	mov	edi,IconArea+ICON_SIZE*4+4
609
	mov	ecx,ICON_SIZE-2
610
    @@: mov	dword[edi],eax
611
	add	edi,(ICON_SIZE)*4
612
	loop	@b
3853 GerdtR 613
 
4146 GerdtR 614
	mov	edi,IconArea+ICON_SIZE*2*4-4*2
615
	mov	ecx,ICON_SIZE-3
616
    @@: mov	dword[edi],eax
617
	add	edi,(ICON_SIZE)*4
618
	loop	@b
3853 GerdtR 619
 
4146 GerdtR 620
	mov	edi,IconArea+ICON_SIZE*(ICON_SIZE-2)*4+4*2
621
	mov	ecx,ICON_SIZE-3
622
	rep	stosd
3853 GerdtR 623
;--------------
624
 
625
   .NoSelect:
4146 GerdtR 626
	mov	edi,[IconData]
627
	xor	al,al
628
	or	ecx,-1
629
	repne	scasb
630
	repne	scasb
631
	repne	scasb
632
	repne	scasb
633
	mov	edx,[edi]
3853 GerdtR 634
 
4146 GerdtR 635
	test	edx,00008000h
636
	jz	@f
637
	add	dx,[wsYe]
638
	jmp	.DI11
3853 GerdtR 639
    @@:
4146 GerdtR 640
	add	dx,[wsY]
641
   .DI11:
642
 
643
	test	edx,80000000h
644
	jz	@f
645
	mov	ax,[wsXe]
646
	shl	eax,16
647
	add	edx,eax
648
	jmp	.DI12
3853 GerdtR 649
    @@:
4146 GerdtR 650
	mov	ax,[wsX]
651
	shl	eax,16
652
	add	edx,eax
653
   .DI12:
3853 GerdtR 654
 
4146 GerdtR 655
	mov	ebx,IconArea
656
	mov	ecx,ICON_SIZE*10000h+ICON_SIZE
657
	mcall	25
3853 GerdtR 658
 
659
;        mov     eax,1
4146 GerdtR 660
	pop	esi edi ebx
661
	ret
3853 GerdtR 662
endp
663
 
664
proc RestoreBackgrnd,NumIcon:DWORD
4146 GerdtR 665
	push	ebx edi
666
	mov	eax,[NumIcon]
667
	cmp	eax,[MaxNumIcon]
668
	jb	@f
669
	xor	eax,eax
670
	pop	edi ebx
671
	ret
3853 GerdtR 672
      @@:
673
 
4146 GerdtR 674
	mov	edi,[IconsOffs+eax*4]
675
	xor	al,al
676
	or	ecx,-1
677
	repne	scasb
678
	repne	scasb
679
	repne	scasb
680
	repne	scasb
3853 GerdtR 681
 
4146 GerdtR 682
	mov	ax,[edi+2]
683
	test	ax,8000h
684
	jz	@f
685
	add	ax,[wsXe]
686
	jmp	.rbg1
3853 GerdtR 687
      @@:
4146 GerdtR 688
	add	ax,[wsX]
689
     .rbg1:
3853 GerdtR 690
 
4146 GerdtR 691
	mov	bx,[edi]
692
	test	bx,8000h
693
	jz	@f
694
	add	bx,[wsYe]
695
	jmp	.rbg2
3853 GerdtR 696
      @@:
4146 GerdtR 697
	add	bx,[wsY]
698
     .rbg2:
3853 GerdtR 699
 
4146 GerdtR 700
	mov	cx,ax
701
	shl	ecx,16
702
	add	ax,ICON_SIZE
703
	mov	cx,ax
704
	mov	dx,bx
705
	shl	edx,16
706
	add	bx,ICON_SIZE
707
	mov	dx,bx
708
	dec	ecx
709
	dec	edx
710
	mcall	15,9
711
	pop	edi ebx
712
	ret
3853 GerdtR 713
endp
714
 
4146 GerdtR 715
				 ;заполняет MaxNumIcon,IconsOffs
3853 GerdtR 716
proc FillIconsOffs
4146 GerdtR 717
	push	ebx edi
718
	mov	edi,[BegData]
719
	mov	dword[MaxNumIcon],0
720
	cmp	dword[edi],0
721
	jne	@f
722
	mov	dword[IconsOffs],0
723
	pop	edi ebx
724
	ret
3853 GerdtR 725
    @@:
726
 
4146 GerdtR 727
	mov	[IconsOffs],edi
728
	xor	al,al
729
	xor	edx,edx
730
	mov	ebx,dword[SizeData]
731
	add	ebx,dword[BegData]
732
	or	ecx,-1
3853 GerdtR 733
 .CalcNumIc:
4336 GerdtR 734
 
4146 GerdtR 735
	repne	scasb
736
	repne	scasb
737
	repne	scasb
738
	repne	scasb
739
	add	edi,4
740
	mov	dword[IconsOffs+edx+4],edi
741
	inc	dword[MaxNumIcon]
742
	add	edx,4
3853 GerdtR 743
 
4146 GerdtR 744
	cmp	edi,ebx
745
	jae	@f
746
	jmp	.CalcNumIc
3853 GerdtR 747
   @@:
748
 
4146 GerdtR 749
	mov	dword[IconsOffs+edx],0
4336 GerdtR 750
 
4146 GerdtR 751
	pop	edi ebx
752
	ret
3853 GerdtR 753
endp
754
 
755
proc LoadIconsData stdcall,f_name,sec_name
4146 GerdtR 756
	push	ebx esi edi
3853 GerdtR 757
 
4146 GerdtR 758
	mov	edi,secRButt
759
	mov	esi,[sec_name]
3853 GerdtR 760
    @@: lodsb
4146 GerdtR 761
	scasb
762
	jnz	.lid1
763
	test	al,al
764
	jnz	@b
3853 GerdtR 765
 
4146 GerdtR 766
	mov	eax,1
767
	pop	edi esi ebx
768
	ret
3853 GerdtR 769
     .lid1:
770
 
4336 GerdtR 771
 
772
	mov	ebx,[sec_name]		;копируем ID
773
	mov	ax,[ebx]
774
	mov	edi,[nLoadIcon]
775
	mov	word[edi*4+IconsID],ax
776
	mov	word[edi*4+IconsID+2],0
777
 
4146 GerdtR 778
	mov	edi,[PIcoDB]
4336 GerdtR 779
	stdcall [ini_get_str],[f_name],[sec_name],keyName,edi,4096,0
780
	test	eax,eax
781
	jz	@f
782
	xor	eax,eax
783
	pop	edi esi ebx
784
	ret
785
     @@:
786
	xor	al,al
787
	or	ecx,-1
788
	repne	scasb
3853 GerdtR 789
 
4336 GerdtR 790
 
791
 
4146 GerdtR 792
	stdcall [ini_get_str],[f_name],[sec_name],keyPath,edi,4096,0
793
	test	eax,eax
794
	jz	@f
795
	xor	eax,eax
796
	pop	edi esi ebx
797
	ret
3853 GerdtR 798
     @@:
4146 GerdtR 799
	xor	al,al
800
	or	ecx,-1
801
	repne	scasb
3853 GerdtR 802
 
4146 GerdtR 803
	stdcall [ini_get_str],[f_name],[sec_name],keyParams,edi,4096,0
804
	test	eax,eax
805
	jz	@f
806
	xor	eax,eax
807
	pop	edi esi ebx
808
	ret
3853 GerdtR 809
     @@:
4146 GerdtR 810
	xor	al,al
811
	or	ecx,-1
812
	repne	scasb
3853 GerdtR 813
 
4146 GerdtR 814
	stdcall [ini_get_str],[f_name],[sec_name],keyIco,edi,4096,0
815
	test	eax,eax
816
	jz	@f
817
	xor	eax,eax
818
	pop	edi esi ebx
819
	ret
3853 GerdtR 820
     @@:
4146 GerdtR 821
	xor	al,al
822
	or	ecx,-1
823
	repne	scasb
3853 GerdtR 824
 
4146 GerdtR 825
	stdcall [ini_get_int],[f_name],[sec_name],keyX,80000000h
826
	cmp	eax,80000000h
827
	jne	@f
828
	xor	eax,eax
829
	pop	edi esi ebx
830
	ret
3853 GerdtR 831
     @@:
4146 GerdtR 832
	mov	word[edi+2],ax
3853 GerdtR 833
 
4146 GerdtR 834
	stdcall [ini_get_int],[f_name],[sec_name],keyY,80000000h
835
	cmp	eax,80000000h
836
	jne	@f
837
	xor	eax,eax
838
	pop	edi esi ebx
839
	ret
3853 GerdtR 840
     @@:
4146 GerdtR 841
	mov	word[edi],ax
842
	add	edi,4
843
	mov	[PIcoDB],edi
3853 GerdtR 844
 
4336 GerdtR 845
	inc	[nLoadIcon]
846
 
4146 GerdtR 847
	mov	eax,1
848
	pop	edi esi ebx
849
	ret
3853 GerdtR 850
endp
851
 
4336 GerdtR 852
proc GenerateID ;ax = ID
853
	push	ebx edi
854
	mov	ebx,[MaxNumIcon]
855
	test	ebx,ebx
856
	jnz	@f
857
	mov	eax,'00'
858
	pop	edi ebx
859
	ret
860
     @@:
861
 
862
	mov	eax,dword[IconsID+ebx*4-4]
863
  .inc:
864
	inc	ah
865
	cmp	ah,'9'+1
866
	jne	@f
867
	mov	ah,'A'
868
       @@:
869
	cmp	ah,'F'+1
870
	jne	@f
871
	mov	ah,'0'
872
	inc	al
873
       @@:
874
	cmp	al,'9'+1
875
	jne	@f
876
	mov	al,'A'
877
       @@:
878
	cmp	al,'F'+1
879
	jne	@f
880
	mov	al,'0'
881
       @@:
882
 
883
 
884
	mov	edi,IconsID
885
	;cmp     dword[edi],0
886
	;je      @f
887
	mov	ecx,100h
888
    @@: scasd
889
	je	.inc
890
	cmp	dword[edi],0
891
	je	@f
892
	loop	@b
893
     @@:
894
 
895
	pop	edi ebx
896
	ret
897
endp
898
 
899
include 'iconman.inc'
4003 GerdtR 900
include 'bgredraw.inc'
3853 GerdtR 901
include 'RButton.inc'
902
include 'DlgAdd.inc'
903
include 'Moving.inc'
904
 
905
;'Eolite',0,'/sys/File managers/eolite',0,'/hd0/3/Muzik',0,'1',0,00010001h
906
;-------------------------------------------------------------------------------
907
;##### DATA ####################################################################
908
;-------------------------------------------------------------------------------
909
; not change this section!!!
910
; start section
911
;------------------------------------------------------------------------------
912
align 4
913
image_file     dd 0 ;+0
914
raw_pointer    dd 0 ;+4
915
return_code    dd 0 ;+8
916
img_size       dd 0 ;+12
917
deflate_unpack dd 0 ;+16        ; not use for scaling
918
raw_pointer_2  dd 0 ;+20        ; not use for scaling
919
;------------------------------------------------------------------------------
920
; end section
921
;------------------------------------------------------------------------------
922
 
923
 
924
align 4
925
fiStdIco:
4146 GerdtR 926
	dd 5
927
	dd 0
928
	dd 0
929
.size	dd 0
930
.point	dd bufStdIco
931
	db ICON_STRIP,0
3853 GerdtR 932
 
933
 
934
align 4
4146 GerdtR 935
fiRunProg:	      ;для запуска программ
936
	dd 7
937
	dd 0
938
	dd 0
939
	dd 0
940
	dd ErrNotFoundIni
941
	db 0
942
	dd pthNotify
3853 GerdtR 943
 
4146 GerdtR 944
fiIni	dd 5	       ;для ini файла
945
	dd 0
946
	dd 0
947
	dd 0
948
	dd bufIni
4336 GerdtR 949
	db 0
950
	dd IconIni
3853 GerdtR 951
 
952
 
4146 GerdtR 953
IconsFile	db ICON_STRIP,0
4336 GerdtR 954
 
3853 GerdtR 955
align 4
4336 GerdtR 956
MaxNumIcon	dd 0		;количество иконок
957
IconNoDraw	dd -1		;-1 либо номер иконки, которую не надо рисовать( когда её таскают )
3853 GerdtR 958
 
4146 GerdtR 959
bFixIcons	dd 1
960
bNotSave	dd 0
3853 GerdtR 961
 
4146 GerdtR 962
LButtonActiv	dd 0
963
RButtonActiv	dd 0
964
MovingActiv	dd 0
965
DlgAddActiv	dd 0
3853 GerdtR 966
 
4336 GerdtR 967
IconIni 	db ICON_INI,0
3853 GerdtR 968
 
4146 GerdtR 969
pthNotify	db '/rd/1/@notify',0
3853 GerdtR 970
 
4336 GerdtR 971
keyName 	db 'name',0
4146 GerdtR 972
keyPath 	db 'path',0
973
keyParams	db 'param',0
974
keyIco		db 'ico',0
975
keyX		db 'x',0
976
keyY		db 'y',0
3853 GerdtR 977
 
978
;-------------------------------------------------------------------------------
979
IMPORTS:
4336 GerdtR 980
library cnv_png ,'cnv_png.obj',\
4146 GerdtR 981
	archiver,'archiver.obj',\
4336 GerdtR 982
	box_lib ,'box_lib.obj',\
4146 GerdtR 983
	proc_lib,'proc_lib.obj',\
4336 GerdtR 984
	libini	,'libini.obj'
3853 GerdtR 985
 
4146 GerdtR 986
import	cnv_png,\
4336 GerdtR 987
	cnv_png_import.Start	,'START',\
988
	cnv_png_import.Version	,'version',\
989
	cnv_png_import.Check	,'Check_Header',\
990
	cnv_png_import.Assoc	,'Associations'
3853 GerdtR 991
 
4146 GerdtR 992
import	archiver,\
4336 GerdtR 993
	unpack_DeflateUnpack2	,'deflate_unpack2'
3853 GerdtR 994
 
4146 GerdtR 995
import	box_lib,\
4336 GerdtR 996
	edit_box_draw		,'edit_box',\
997
	edit_box_key		,'edit_box_key',\
998
	edit_box_mouse		,'edit_box_mouse',\
999
	scrollbar_h_draw	,'scrollbar_h_draw',\
1000
	scrollbar_h_mouse	,'scrollbar_h_mouse'
3853 GerdtR 1001
 
4146 GerdtR 1002
import	proc_lib,\
4336 GerdtR 1003
	OpenDialog_Init 	,'OpenDialog_init',\
1004
	OpenDialog_Start	,'OpenDialog_start'
3853 GerdtR 1005
 
4146 GerdtR 1006
import	libini,\
4336 GerdtR 1007
	ini_enum_sections	,'ini_enum_sections',\
1008
	ini_enum_keys		,'ini_enum_keys',\
1009
	ini_get_str		,'ini_get_str',\
1010
	ini_set_str		,'ini_set_str',\
1011
	ini_get_color		,'ini_get_color',\
1012
	ini_get_int		,'ini_get_int',\
1013
	ini_set_int		,'ini_set_int',\
1014
	ini_del_section 	,'ini_del_section',\
1015
	ini_exist_sect		,'ini_exist_sect'
3853 GerdtR 1016
 
1017
 
1018
;ini.get_str (f_name, sec_name, key_name, buffer, buf_len, def_val)
1019
;ini.set_str (f_name, sec_name, key_name, buffer, buf_len)
1020
 
1021
 
1022
;-------------------------------------------------------------------------------
1023
;----- RButton.inc -------------------------------------------------------------
1024
;-------------------------------------------------------------------------------
4336 GerdtR 1025
 
1026
if lang eq ru
1027
 MinRMenuW	 dd 18*6+10
1028
else
1029
 MinRMenuW	 dd 15*6+10
1030
end if
1031
 
4146 GerdtR 1032
secRButt	db 'rbmenu',0
3853 GerdtR 1033
 
4146 GerdtR 1034
PredItem	dd -1
4036 GerdtR 1035
 
3853 GerdtR 1036
if lang eq ru
4082 GerdtR 1037
 RMenuRedrawFon db 'Перерисовать',0
4146 GerdtR 1038
 RMenuAlign	db 'Выровнять по сетке',0
4036 GerdtR 1039
 RMenuOffMoving db 'Закрепить иконки',0
4146 GerdtR 1040
 RMenuOnMoving	db 'Открепить иконки',0
1041
 RMenuAdd	db 'Добавить',0
1042
 RMenuDel	db 'Удалить',0
1043
 RMenuProp	db 'Свойства',0
3853 GerdtR 1044
else
4336 GerdtR 1045
 RMenuRedrawFon db 'Redraw',0
1046
 RMenuAlign	db 'Snap to Grid',0
1047
 RMenuOffMoving db 'Fix the icons',0
1048
 RMenuOnMoving	db 'Unfix the icons',0
1049
 RMenuAdd	db 'Add',0
1050
 RMenuDel	db 'Delete',0
1051
 RMenuProp	db 'Properties',0
3853 GerdtR 1052
end if
1053
 
1054
if lang eq ru
4146 GerdtR 1055
 ErrRunProg	db 'Ошибка запуска программы',0
1056
 WarningSave	db 'Не забудьте сохранить изменения, запустить RDSave',0
3853 GerdtR 1057
 ErrNotFoundIni db 'Не найден icon.ini',0
4146 GerdtR 1058
 ErrName	db 'Имя "rbmenu" зарезервировано',0
3853 GerdtR 1059
else
4146 GerdtR 1060
 ErrRunProg	db 'Error runing program',0
1061
 WarningSave	db 'Do not forget to save the changes, run the RDSave',0
3853 GerdtR 1062
 ErrNotFoundIni db 'icon.ini not found',0
4336 GerdtR 1063
 ErrName	db 'The name "rbmenu" reserved',0
3853 GerdtR 1064
end if
1065
 
1066
;-------------------------------------------------------------------------------
1067
;------- AddDlg.inc ---------------------------------------------------------------
1068
;-------------------------------------------------------------------------------
1069
if lang eq ru
4146 GerdtR 1070
DTitleAdd	db 'Добавить иконку',0
1071
DTitleProp	db 'Изменить иконку',0
3853 GerdtR 1072
 
4146 GerdtR 1073
DCaptName	db 'Имя',0
1074
DCaptPath	db 'Путь',0
1075
DCaptParams	db 'Параметры',0
1076
DCaptIcon	db 'Иконка',0
3962 GerdtR 1077
;DCaptChange     db '.',0
4146 GerdtR 1078
DCaptCreate	db 'Создать',0
3853 GerdtR 1079
DCaptProperties db 'Изменить',0
4146 GerdtR 1080
DCaptCancel	db 'Отменить',0
3853 GerdtR 1081
 
1082
else
4146 GerdtR 1083
DTitleAdd	db 'Add icon',0
1084
DTitleProp	db 'Change icon',0
3853 GerdtR 1085
 
4146 GerdtR 1086
DCaptName	db 'Name',0
1087
DCaptPath	db 'Path',0
1088
DCaptParams	db 'Parameters',0
1089
DCaptIcon	db 'Icon',0
1090
DCaptCreate	db 'Create',0
3853 GerdtR 1091
DCaptProperties db 'Change',0
4146 GerdtR 1092
DCaptCancel	db 'Cancel',0
3853 GerdtR 1093
end if
1094
 
1095
;/не менять положение
1096
edtName    edit_box NAME_LENGTH*6+4,70+20+IMG_SIZE,6,0FFFFFFh,06F9480h,0FFh,0h,0,NAME_LENGTH,\
4146 GerdtR 1097
		DAreaName,mouse_dd,0,0,0
4336 GerdtR 1098
edtExePath edit_box 281-3-20-IMG_SIZE,70+20+IMG_SIZE,26,0FFFFFFh,06F9480h,0FFh,0h,0,255,\
4146 GerdtR 1099
		DAreaPath,mouse_dd,0,0,0
4336 GerdtR 1100
edtParams  edit_box 295-20-IMG_SIZE,70+20+IMG_SIZE,46,0FFFFFFh,06F9480h,0FFh,0h,0,255,\
4146 GerdtR 1101
		DAreaParams,mouse_dd,0,0,0
4336 GerdtR 1102
edtIcon    edit_box 295-20-IMG_SIZE,70+20+IMG_SIZE,66,0FFFFFFh,06F9480h,0FFh,0h,0,255,\
4146 GerdtR 1103
		DAreaIcon,mouse_dd,0,0,0
3853 GerdtR 1104
endEdits:
1105
;\
1106
 
1107
sbIcons:
4146 GerdtR 1108
	     dw END_ICONS_AREAW-ICONSX
1109
	     dw ICONSX
1110
	     dw 15
1111
	     dw END_ICONS_AREAH+3
1112
	     dd 0
1113
	     dd 1
3853 GerdtR 1114
 .max_area   dd 0
1115
 .cur_area   dd ICONS_DRAW_COUNTW
1116
 .position   dd 0
1117
 .bckg_col   dd 0
1118
 .frnt_col   dd 0
1119
 .line_col   dd 0
1120
 .redraw     dd 0
1121
 .delta      dd 0
1122
 .delta2     dd 0
1123
 .r_size_x   dw 0
1124
 .r_start_x  dw 0
1125
 .r_size_y   dw 0
4091 GerdtR 1126
 
3853 GerdtR 1127
 .r_start_y  dw 0
1128
 .m_pos      dd 0
1129
 .m_pos2     dd 0
1130
 .m_keys     dd 0
1131
 .run_size   dd 0
1132
 .position2  dd 0
1133
 .work_size  dd 0
1134
 .all_redraw dd 0
1135
 .ar_offset  dd 0
1136
 
1137
;-------------------------------------------------------------------------------
1138
OpenDialog_data:
4146 GerdtR 1139
.type			dd 0
1140
.procinfo		dd RBProcInfo	    ;+4
1141
.com_area_name		dd communication_area_name	;+8
1142
.com_area		dd 0	;+12
1143
.opendir_pach		dd temp_dir_pach	;+16
1144
.dir_default_pach	dd communication_area_default_pach	;+20
1145
.start_path		dd open_dialog_path	;+24
1146
.draw_window		dd DRedrawWin;draw_window_for_OD   ;+28
1147
.status 		dd 0	;+32
1148
.openfile_pach		dd DAreaPath;fname_Info   ;+36
1149
.filename_area		dd 0;DAreaPath        ;+40
1150
.filter_area		dd Filter
3853 GerdtR 1151
.x:
4146 GerdtR 1152
.x_size 		dw 420 ;+48 ; Window X size
1153
.x_start		dw 100 ;+50 ; Window X position
3853 GerdtR 1154
.y:
4146 GerdtR 1155
.y_size 		dw 320 ;+52 ; Window y size
1156
.y_start		dw 100 ;+54 ; Window Y position
3853 GerdtR 1157
 
1158
communication_area_name:
4146 GerdtR 1159
	db 'FFFFFFFF_open_dialog',0
3853 GerdtR 1160
open_dialog_path:
4146 GerdtR 1161
	db '/sys/File managers/opendial',0
3853 GerdtR 1162
 
1163
communication_area_default_pach:
4146 GerdtR 1164
	db '/sys',0
3853 GerdtR 1165
 
4146 GerdtR 1166
Filter	dd 0
3853 GerdtR 1167
 
1168
;open_dialog     db 0
1169
;-------------------------------------------------------------------------------
1170
 
1171
;/не разделять
1172
align 4
4146 GerdtR 1173
IconAreaH	dd ICON_SIZE,ICON_SIZE
3853 GerdtR 1174
I_END:
1175
;##### UDATA ###################################################################
4146 GerdtR 1176
IconArea	rb 4*ICON_SIZE*ICON_SIZE
3853 GerdtR 1177
;\
1178
 
4146 GerdtR 1179
sc		system_colors
1180
sc.workL	rd 1
1181
sc.workH	rd 1
4007 GerdtR 1182
 
4027 GerdtR 1183
align 4
3853 GerdtR 1184
 
4146 GerdtR 1185
ScreenW 	rw 1
1186
ScreenH 	rw 1
1187
wsX		rw 1
1188
wsY		rw 1
1189
wsXe		rw 1
1190
wsYe		rw 1
1191
wsW		rw 1
1192
wsH		rw 1
3853 GerdtR 1193
 
1194
 
4146 GerdtR 1195
MouseX		rd 1
1196
MouseY		rd 1
3853 GerdtR 1197
 
4146 GerdtR 1198
RBSlot		rd 1
1199
AddX		rd 1
1200
AddY		rd 1
3853 GerdtR 1201
 
4146 GerdtR 1202
SelIcon 	rd 1
1203
DlgSelIcon	rd 1
1204
slotDlgAdd	rd 1
1205
DlgBufImg	rb IMG_SIZE*IMG_SIZE*3
3853 GerdtR 1206
 
4336 GerdtR 1207
align 4
4146 GerdtR 1208
bufStdIco	rb 40
4336 GerdtR 1209
IconsOffs	rd 100		;таблица с указателями на конкретные иконки(для ускорения)
4146 GerdtR 1210
PIcoDB		rd 1
4336 GerdtR 1211
nLoadIcon	rd 1		;номер читаемой из ini иконки
1212
IconsID 	rd 100		;ID иконок - 2 байтa + байт 0 + выравнивающий байт - строка с 2мя шеснадцетиричными цифрами
4146 GerdtR 1213
 
4336 GerdtR 1214
nameSection	rb 4
4146 GerdtR 1215
 
3853 GerdtR 1216
align 4
4146 GerdtR 1217
icon_count	rd 1
1218
strip_file	rd 1
3853 GerdtR 1219
strip_file_size rd 1
1220
 
1221
cur_band_compensation rd 1
1222
 
1223
;---- RButton -----------------------------------------------------------------------
4082 GerdtR 1224
 
4146 GerdtR 1225
bufIni		rb 40
1226
NumMenuButt	rd 1
1227
RBMenuCP	rd MAX_USER_BUTTONS*2	      ;указатели на подпись и путь с прогой (Caption(dd), Path(dd)) и запасной (dd) для завершающего нуля
1228
RMenuW		rw 1
1229
RMenuH		rw 1
3853 GerdtR 1230
 
4146 GerdtR 1231
MaxPage 	rd 1
1232
mouse_dd	rd 1
3853 GerdtR 1233
 
4146 GerdtR 1234
DAreaName	rb NAME_LENGTH+1
4336 GerdtR 1235
DAreaPath	rb 255+1
1236
DAreaParams	rb 255+1
1237
DAreaIcon	rb 255+1
3853 GerdtR 1238
 
1239
align 4
4146 GerdtR 1240
RBProcInfo	rb 1024
3962 GerdtR 1241
align 4
3853 GerdtR 1242
 
4036 GerdtR 1243
 
1244
;------ OpenDialog -------------------------------
4146 GerdtR 1245
temp_dir_pach	rb 1024
1246
fname_Info	rb 1024
4036 GerdtR 1247
 
3853 GerdtR 1248
;-------------------------------------------------------------------------------
4146 GerdtR 1249
		rb 512
1250
stack_mov:			;одновременно таскать и держать открытым менюшку невозможно
4036 GerdtR 1251
stack_rmenu:
4146 GerdtR 1252
		rb 512
3853 GerdtR 1253
stack_dlg:
4146 GerdtR 1254
		rb 512
3972 GerdtR 1255
stack_bredraw:
4146 GerdtR 1256
		rb 512
4036 GerdtR 1257
stack_main:
3853 GerdtR 1258
;------------------------------------------------------------------------------
1259
ENDMEM: