Subversion Repositories Kolibri OS

Rev

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

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