Subversion Repositories Kolibri OS

Rev

Rev 3919 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
824 mikedld 1
diff16 'tp-dialog.asm',0,$
2
 
258 mikedld 3
;-----------------------------------------------------------------------------
617 mikedld 4
proc define_3d_button ;///////////////////////////////////////////////////////
258 mikedld 5
;-----------------------------------------------------------------------------
6
; ebx = 
7
; ecx = 
8
; esp+4*3 = id
9
; esp+4*2 = text
10
; esp+4*1 = text length
11
;-----------------------------------------------------------------------------
12
	pushad
13
	mov	edx,[esp+4*8+4+4*2]
14
	or	edx,0x40000000
15
	mcall	8
16
	mov	eax,[esp+4*8+4*1]
17
	add	eax,2
18
	imul	eax,6
19
	pushad
20
	shr	ebx,16
21
	shr	ecx,16
22
	push	ebx ecx eax 15
23
	call	draw_3d_panel
24
	popad
25
	shr	ecx,16
26
	mov	bx,cx
27
	add	ebx,7*65536+4
28
	mcall	4,,[sc.work_text],[esp+4*8+4*2],[esp+4*8+4*1]
29
	popad
30
	ret	4*3
617 mikedld 31
endp
1624 mario79 32
;-----------------------------------------------------------------------------
258 mikedld 33
finddlg_handler:
34
	cmp	al,1
35
	je	.draw
36
	cmp	al,2
37
	je	.key
38
	cmp	al,3
39
	je	botdlg.button
40
	ret
41
 
42
  .draw:
43
	mov	ebx,[bot_ofs]
44
	add	ebx,(1+3)*65536+6
45
	mcall	4,,[sc.work_text],s_2find,s_2find.size+1
46
	mov	ecx,[bot_ofs]
47
	shl	ecx,16
48
	add	ecx,(3+17)*65536+15
49
 
50
	push	ecx
629 mikedld 51
	cmp	[bot_mode2],0
258 mikedld 52
	je	@f
53
	add	ebx,18
54
	mcall	4,,[sc.work_text],s_2replace,s_2replace.size+1
55
	mov	ecx,[esp]
56
	add	ecx,18*65536
57
    @@:
58
 
59
	mov	ebx,[p_info.client_box.width]
60
	shl	ebx,16
61
 
62
	push	20003
629 mikedld 63
	cmp	[bot_mode2],0
258 mikedld 64
	jne	.draw.lp1
65
	add	ebx,-(2+6*(s_2find.size+2))*65536+6*(s_2find.size+2)
66
	push	s_2find s_2find.size
67
	jmp	@f
68
 
69
  .draw.lp1:
70
	add	ebx,-(2+6*(s_2replace.size+2))*65536+6*(s_2replace.size+2)
71
	push	s_2replace s_2replace.size
72
 
73
    @@: call	define_3d_button
74
	sub	ebx,(6*(s_2cancel.size+2)+3)*65536
75
	mov	bx,6*(s_2cancel.size+2)
76
	push	20001 s_2cancel s_2cancel.size
77
	call	define_3d_button
78
 
79
	mov	ecx,[esp]
80
 
629 mikedld 81
	cmp	[bot_mode2],0
258 mikedld 82
	je	@f
83
	mov	ebp,tb_replace
84
	mov	eax,[p_info.client_box.width]
85
	sub	eax,6*(s_2replace.size+2)+1
86
	add	eax,6*(s_2replace.size+2)*65536
297 mikedld 87
	mov	dword[tbox.width],eax
258 mikedld 88
	inc	ecx
297 mikedld 89
	mov	dword[tbox.height],ecx
258 mikedld 90
	call	textbox.draw
91
    @@:
92
 
3919 mario79 93
	pop	ecx
94
 
95
	mov	ebp,tb_find
96
	mov	eax,[p_info.client_box.width]
97
	sub	eax,6*(s_2find.size+2)+1
98
	add	eax,6*(s_2find.size+2)*65536
99
	mov	dword[tbox.width],eax
100
	add	ecx,-18*65536+1
101
	mov	dword[tbox.height],ecx
102
	call	textbox.draw
103
 
258 mikedld 104
	ret
105
 
106
  .key:
107
	cmp	ebx,KEY_ESCAPE
108
	je	btn.bot.cancel
109
	cmp	ebx,KEY_RETURN
110
	je	btn.bot.find
111
	cmp	ebx,KEY_NUMRETURN
112
	je	btn.bot.find
113
	cmp	ebx,KEY_TAB
114
	je	..tab
115
	call	textbox.key
116
	ret
117
 
118
  ..tab:
629 mikedld 119
	cmp	[bot_mode2],0
258 mikedld 120
	je	@f
121
	mov	eax,tb_replace
122
	cmp	eax,[focused_tb]
123
	jne	.key.lp1
124
	mov	eax,tb_find
125
  .key.lp1:
126
	mov	[focused_tb],eax
127
	call	.draw
128
    @@: ret
1624 mario79 129
;-----------------------------------------------------------------------------
258 mikedld 130
osdlg_handler:
1651 mario79 131
	cmp	[bot_mode2], 2
132
	je	@f
1624 mario79 133
	mov	[open_dialog],1
258 mikedld 134
	ret
1651 mario79 135
@@:
136
	cmp	al,1
137
	je	.draw
138
	cmp	al,2
139
	je	.key
140
	cmp	al,3
141
	je	botdlg.button
142
	ret
258 mikedld 143
 
1651 mario79 144
  .draw:
145
	mov	ebx,[bot_ofs]
146
	add	ebx,(1+3)*65536+6
147
	mcall	4,,[sc.work_text],s_2filename,s_2filename.size
148
	mov	ebx,[p_info.client_box.width]
149
	shl	ebx,16
150
	mov	ecx,[bot_ofs]
151
	shl	ecx,16
152
	add	ecx,(2+18)*65536+15
258 mikedld 153
 
1651 mario79 154
	push	20002
155
	cmp	[bot_mode2],0
156
	jne	.draw.lp1
157
	add	ebx,-(2+6*(s_2open.size+2))*65536+6*(s_2open.size+2)
158
	push	s_2open s_2open.size
159
	jmp	@f
160
  .draw.lp1:
161
	add	ebx,-(2+6*(s_2save.size+2))*65536+6*(s_2save.size+2)
162
	push	s_2save s_2save.size
258 mikedld 163
 
1651 mario79 164
    @@: call	define_3d_button
165
	sub	ebx,(6*(s_2cancel.size+2)+3)*65536
166
	mov	bx,6*(s_2cancel.size+2)
167
	push	20001 s_2cancel s_2cancel.size
168
	call	define_3d_button
258 mikedld 169
 
1651 mario79 170
	cmp	[bot_mode2], 2	    ; exit-save dialog
171
	jne	@f
595 Rus 172
 
1651 mario79 173
	sub	ebx,(6*(s_2save_no.size+2)+3)*65536
174
	mov	bx,6*(s_2save_no.size+2)
175
	push	20007 s_2save_no s_2save_no.size
176
	call	define_3d_button
595 Rus 177
 
1651 mario79 178
    @@: mov	ebp,tb_opensave
179
	mov	eax,[p_info.client_box.width]
180
	sub	eax,6*(s_2filename.size+1)+1
181
	add	eax,6*(s_2filename.size+1)*65536
182
	mov	dword[tbox.width],eax
183
	add	ecx,-18*65536+1
184
	mov	dword[tbox.height],ecx
185
	call	textbox.draw
258 mikedld 186
 
1651 mario79 187
	ret
258 mikedld 188
 
1651 mario79 189
  .key:
190
	cmp	ebx,KEY_ESCAPE
191
	je	btn.bot.cancel
192
	cmp	ebx,KEY_RETURN
193
	je	btn.bot.opensave
194
	cmp	ebx,KEY_NUMRETURN
195
	je	btn.bot.opensave
196
	call	textbox.key
197
	ret
1624 mario79 198
;-----------------------------------------------------------------------------
258 mikedld 199
gotodlg_handler:
200
	cmp	al,1
201
	je	.draw
202
	cmp	al,2
203
	je	.key
204
	cmp	al,3
205
	je	botdlg.button
206
	ret
207
 
208
  .draw:
209
	mov	ebx,[bot_ofs]
210
	add	ebx,(1+3)*65536+6
211
	mcall	4,,[sc.work_text],s_2filename,s_2filename.size
212
	mov	ebx,[p_info.box.width]
213
	shl	ebx,16
214
	mov	ecx,[bot_ofs]
215
	shl	ecx,16
216
	add	ecx,(2+18)*65536+15
217
 
218
	push	20002
629 mikedld 219
	cmp	[bot_mode2],0
258 mikedld 220
	jne	.draw.lp1
221
	add	ebx,-(2+6*(s_2open.size+2))*65536+6*(s_2open.size+2)
222
	push	s_2open s_2open.size
223
	jmp	@f
224
  .draw.lp1:
225
	add	ebx,-(2+6*(s_2save.size+2))*65536+6*(s_2save.size+2)
226
	push	s_2save s_2save.size
227
 
228
    @@: call	define_3d_button
229
	sub	ebx,(6*(s_2cancel.size+2)+3)*65536
230
	mov	bx,6*(s_2cancel.size+2)
231
	push	20001 s_2cancel s_2cancel.size
232
	call	define_3d_button
233
 
234
	mov	ebp,tb_opensave
235
	mov	eax,[p_info.box.width]
236
	sub	eax,6*(s_2filename.size+3)
237
	add	eax,6*(s_2filename.size+2)*65536
297 mikedld 238
	mov	dword[tbox.width],eax
258 mikedld 239
	add	ecx,-18*65536+1
297 mikedld 240
	mov	dword[tbox.height],ecx
258 mikedld 241
	call	textbox.draw
242
 
297 mikedld 243
	sub	ebx,(6*(s_2cancel.size+2)+3)*65536
244
	mov	bx,6*(s_2cancel.size+2)
245
	push	20010 s_2cancel s_2cancel.size
246
	call	define_3d_button
247
 
258 mikedld 248
	ret
249
 
250
  .key:
251
	cmp	ebx,KEY_ESCAPE
252
	je	btn.bot.cancel
253
	cmp	ebx,KEY_RETURN
254
	je	btn.bot.opensave
255
	cmp	ebx,KEY_NUMRETURN
256
	je	btn.bot.opensave
257
	call	textbox.key
258
	ret
1624 mario79 259
;-----------------------------------------------------------------------------
297 mikedld 260
cur_part   dd ?
261
cur_color  dd ?
262
cur_colors rd 10
1624 mario79 263
;-----------------------------------------------------------------------------
297 mikedld 264
optsdlg_handler:
265
	cmp	al,1
266
	je	.draw
267
	cmp	al,2
268
	je	.key
269
	cmp	al,3
270
	je	botdlg.button
271
	cmp	al,4
272
	je	.mouse
273
	ret
274
 
275
  .xchg_colors:
276
	mov	ecx,10
277
	mov	esi,color_tbl
278
	mov	edi,cur_colors
279
    @@: lodsd
280
	xchg	eax,[edi]
281
	mov	[esi-4],eax
282
	add	edi,4
283
	loop	@b
284
	ret
285
 
286
  .draw:
287
	call	.draw_editor
288
 
289
	mov	ecx,[bot_ofs-2]
290
	mov	cx,word[bot_ofs]
291
	push	ecx
292
	add	ecx,128
293
	mcall	38,<2+3+165,2+3+165>,,[cl_3d_inset]
294
	mov	bx,word[p_info.client_box.width]
295
	pop	ecx
296
	add	ecx,35*65536+35
297
	mcall
298
	add	ecx,0x00240024
299
	mcall
300
 
301
	shr	ecx,16
302
	mov	bx,cx
303
	add	ebx,38*65536-21
304
	mcall	4,,[sc.work_text],s_tabpos,s_tabpos.size
305
 
306
	call	.draw_tabpos
307
 
308
	mov	ebx,[bot_ofs]
309
	add	ebx,(2+6+165+35)*65536+5+16
310
	mcall	4,,[sc.work_text],s_color,s_color.size
311
 
312
	mov	dword[tb_color.width],(2+6+6*s_color.size+165+35)*65536+(6*6+8)
313
	mov	eax,ebx
314
	add	ax,-3
315
	shl	eax,16
316
	mov	ax,14
317
	mov	dword[tb_color.height],eax
318
 
319
	call	.draw_color
320
 
321
	mov	ebx,[p_info.client_box.width]
322
	shl	ebx,16
323
	mov	ecx,[p_info.client_box.height]
324
	shl	ecx,16
325
	add	ecx,(-34)*65536+15
326
 
327
	add	ebx,-(2+6*(s_2save.size+2))*65536+6*(s_2save.size+2)
328
	push	20004 s_2save s_2save.size
329
	call	define_3d_button
330
	sub	ebx,(6*(s_2cancel.size+2)+3)*65536
331
	mov	bx,6*(s_2cancel.size+2)
332
	push	20001 s_2cancel s_2cancel.size
333
	call	define_3d_button
334
 
335
	ret
336
 
337
  .get_color:
338
	movzx	ecx,[tb_color.length]
339
	mov	esi,tb_color.text
340
	xor	eax,eax
341
	xor	ebx,ebx
342
	jecxz	.lp2
343
  .lp1: lodsb
344
	cmp	al,'9'
345
	mov	dl,-'0'
346
	jbe	@f
347
	mov	dl,-'A'+10
348
    @@: add	al,dl
349
	shl	ebx,4
350
	add	bl,al
351
	loop	.lp1
352
  .lp2: mov	eax,[cur_part]
353
	mov	[cur_colors+eax*4],ebx
354
	mov	[cur_color],ebx
355
	jmp	.draw_color.2
356
 
357
  .draw_editor:
987 mikedld 358
	;push    dword[options] [tab_bar.Current.Ptr]
359
	push	[tab_bar.Current.Ptr]
360
	;mov     [options],0
297 mikedld 361
	mov	ebp,optsdlg_editor
362
	call	set_cur_tab
363
 
364
	call	.xchg_colors
365
	mov	[cur_editor.Bounds.Left],2
366
	mov	[cur_editor.Bounds.Right],2+165
367
	mov	eax,[p_info.client_box.height]
368
	add	eax,-125-STATH
369
	mov	[cur_editor.Bounds.Top],eax
370
	add	eax,122
371
	mov	[cur_editor.Bounds.Bottom],eax
372
	call	draw_editor
373
	call	.xchg_colors
374
 
987 mikedld 375
	;pop     ebp eax
376
	pop	ebp
377
	;mov     [options],al
297 mikedld 378
	call	set_cur_tab
379
	ret
380
 
381
  .draw_tabpos:
382
	mov	ecx,[bot_ofs-2]
383
	xor	cx,cx
384
	mov	ebx,(2+3+165+3)*65536+31
385
	add	ecx,38*65536+31
386
	mov	edx,[cl_3d_inset]
387
	mov	esi,[sc.work]
388
	call	draw_fillrect
389
	dec	ebx
390
	dec	ecx
391
	mcall	8,,,0x40000000+21001
392
	mov	esi,[cl_3d_normal]
987 mikedld 393
	mov	al,[tabs_pos]
297 mikedld 394
 
395
TPOSH = 6
396
TPOSW = 10
397
 
398
	dec	al
399
	jnz	@f
400
	;// top
401
	inc	ebx
402
	mov	cx,TPOSH
403
	call	draw_fillrect
404
	add	ecx,2*65536-2
405
	jmp	.lp3
406
    @@: dec	al
407
	jnz	@f
408
	;// bottom
409
	inc	ebx
410
	mov	cx,TPOSH
411
	add	ecx,(31-TPOSH)*65536
412
	call	draw_fillrect
413
	add	ecx,-2
414
	jmp	.lp3
415
    @@: dec	al
416
	jnz	@f
417
	;// left
418
	inc	ecx
419
	mov	bx,TPOSW
420
	call	draw_fillrect
421
	add	ebx,2*65536-2
422
	jmp	.lp4
423
    @@: dec	al
424
	jnz	@f
425
	;// right
426
	inc	ecx
427
	mov	bx,TPOSW
428
	add	ebx,(31-TPOSW)*65536
429
	call	draw_fillrect
430
	add	ebx,-2
431
	jmp	.lp4
432
 
433
  .lp3:
434
	add	ebx,(2+TPOSW-2+1)*65536-31+TPOSW-2
435
	call	draw_fillrect
436
	add	ebx,-(TPOSW-2+1)*65536
437
	mov	esi,[sc.work]
438
	call	draw_fillrect
439
	ret
440
  .lp4:
441
	add	ecx,7*65536-31+4
442
	call	draw_fillrect
443
	add	ecx,-5*65536
444
	mov	esi,[sc.work]
445
	call	draw_fillrect
446
	ret
447
 
448
  .draw_color:
449
	mov	ecx,[cur_part]
450
	mov	edx,s_appearance+1
451
    @@: dec	ecx
452
	js	@f
453
	movzx	eax,byte[edx-1]
454
	lea	edx,[edx+eax+1]
455
	jmp	@b
456
    @@:
457
	movzx	esi,byte[edx-1]
458
	mov	ebx,[bot_ofs]
459
	add	ebx,(2+6+165+35)*65536+8
460
	push	ebx ecx edx
461
	mov	ecx,ebx
462
	shl	ecx,16
463
	mov	bx,s_appearance.maxl*6
464
	mov	cx,10
465
	mcall	13,,,[cl_3d_normal]
466
	pop	edx ecx ebx
467
	mcall	4,,[sc.work_text]
468
 
469
	mov	eax,[cur_color]
470
	mov	edi,tb_color.text
471
	mov	ebx,6
472
	mov	ecx,16
473
	call	uint2strz
474
	mov	[tb_color.length],6
475
	mov	[tb_color.sel.x],0
476
	mov	[tb_color.pos.x],6
477
 
478
	mov	ebp,tb_color
479
	call	textbox.draw
480
 
481
  .draw_color.2:
482
	mov	ecx,[p_info.client_box.height]
483
	sub	ecx,[bot_dlg_height]
484
	add	ecx,-STATH
485
	shl	ecx,16
486
	add	ecx,3*65536+31
487
	mov	ebx,(2+6+165)*65536+31
488
	mov	edx,[cl_3d_inset]
489
	mov	esi,[cur_color]
490
	call	draw_fillrect
491
 
492
	ret
493
 
494
  .key:
495
	cmp	ebx,KEY_ESCAPE
496
	je	btn.bot.cancel
497
	cmp	ebx,KEY_RETURN
498
	je	btn.bot.appearance
499
	cmp	ebx,KEY_NUMRETURN
500
	je	btn.bot.appearance
501
 
502
	cmp	ebx,KEY_BACKSPACE
503
	je	.key.tb.2
504
	cmp	ebx,KEY_TAB
505
	je	.key.tb.2
506
	cmp	bx,0x00FF
507
	ja	.key.tb.2
508
	;cmp     ebx,KEY_LSHIFT
509
	;je      .key.tb.2
510
	;cmp     ebx,KEY_RSHIFT
511
	;je      .key.tb.2
512
	;cmp     ebx,0x00000147
513
	;jb      .key.exit
514
	;cmp     ebx,0x00000153
515
	;jbe     .key.tb.2
516
 
826 mikedld 517
	test	[chr],KM_CTRLALT
297 mikedld 518
	jnz	.key.exit
826 mikedld 519
	movzx	eax,byte[chr]
297 mikedld 520
	movzx	eax,[eax+key0]
521
	or	al,al
522
	jz	.key.exit
523
	movzx	eax,[eax+key1]
524
 
525
	cmp	al,'0'
526
	jb	@f
527
	cmp	al,'9'
528
	jbe	.key.tb
529
    @@: cmp	al,'A'
530
	jb	@f
531
	cmp	al,'F'
532
	jbe	.key.tb
533
    @@: cmp	al,'a'
534
	jb	@f
535
	cmp	al,'f'
536
	jbe	.key.tb
537
    @@: ret
538
  .key.tb:
539
	cmp	[tb_color.length],6
540
	jb	@f
541
	mov	al,[tb_color.sel.x]
542
	cmp	al,[tb_color.pos.x]
543
	jne	@f
544
	ret
545
  .key.tb.2:
546
    @@: call	textbox.key
547
	call	.get_color
548
	call	.draw_editor
549
  .key.exit:
550
	ret
551
 
552
  .mouse:
553
	cmp	ah,MEV_LDOWN
554
	jne	.mouse.exit
555
	mcall	37,1
556
	movsx	ebx,ax
557
	sar	eax,16
558
	cmp	eax,[optsdlg_editor+EDITOR.Bounds.Right]
559
	jg	.mouse.exit
560
	cmp	ebx,[optsdlg_editor+EDITOR.Bounds.Bottom]
561
	jg	.mouse.exit
562
	sub	eax,[optsdlg_editor+EDITOR.Bounds.Left]
563
	js	.mouse.exit
564
	sub	ebx,[optsdlg_editor+EDITOR.Bounds.Top]
565
	js	.mouse.exit
566
	mov	esi,optsdlg_editor_parts-5
567
    @@: add	esi,5
568
	cmp	byte[esi+0],-1
569
	je	.mouse.exit
570
	cmp	al,byte[esi+1]
571
	jb	@b
572
	cmp	bl,byte[esi+2]
573
	jb	@b
574
	cmp	al,byte[esi+3]
575
	ja	@b
576
	cmp	bl,byte[esi+4]
577
	ja	@b
578
	movzx	ebp,byte[esi+0]
579
	mov	[cur_part],ebp
580
	m2m	[cur_color],[cur_colors+ebp*4]
581
	;mcall   13,<200,30>,<250,30>,[color_tbl+ebp*4]
582
	;call    .draw_color
583
	call	.draw
584
 
585
  .mouse.exit:
586
	ret
1624 mario79 587
;-----------------------------------------------------------------------------
258 mikedld 588
botdlg.button:
589
	mov	esi,accel_table2_botdlg
590
  .acc: cmp	ebx,[esi]
591
	jne	@f
592
	call	dword[esi+4]
593
	ret
594
    @@: add	esi,8
595
	cmp	byte[esi],0
596
	jne	.acc
597
	ret
1624 mario79 598
;-----------------------------------------------------------------------------
258 mikedld 599
  btn.bot.cancel:
600
	xor	eax,eax
601
	mov	[bot_mode],al
629 mikedld 602
	mov	[main_closing],al
258 mikedld 603
	mov	[bot_dlg_height],eax
604
	mov	[s_status],eax
605
	call	drawwindow
606
	ret
1624 mario79 607
;-----------------------------------------------------------------------------
258 mikedld 608
  btn.bot.opensave:
629 mikedld 609
	cmp	[bot_mode2],0
258 mikedld 610
	je	.lp1
611
	call	save_file
612
	jnc	@f
613
	jmp	.lp2
297 mikedld 614
  .lp1: call	load_file
258 mikedld 615
	jnc	@f
616
  .lp2:
617
	ret
259 mikedld 618
    @@: ;call    update_caption
258 mikedld 619
	xor	eax,eax
620
	mov	[bot_mode],al
621
	mov	[bot_dlg_height],eax
622
	call	drawwindow
623
	ret
1624 mario79 624
;-----------------------------------------------------------------------------
595 Rus 625
  btn.bot.no:
626
	xor	eax,eax
627
	mov	[bot_mode],al
628
	mov	[bot_dlg_height],eax
629
	mov	[s_status],eax
630
	call	drawwindow
629 mikedld 631
	cmp	[main_closing],0
632
	je	@f
633
	add	[exit_tab_item],sizeof.TABITEM
634
	jmp	key.alt_x.direct
595 Rus 635
	ret
629 mikedld 636
    @@: call	key.ctrl_f4.close
637
	ret
1624 mario79 638
;-----------------------------------------------------------------------------
258 mikedld 639
  btn.bot.find:
640
	movzx	ecx,[tb_find.length]
641
	mov	[s_search.size],ecx
642
	mov	esi,tb_find.text
643
	mov	edi,s_search
644
	cld
645
	rep	movsb
646
 
629 mikedld 647
	cmp	[bot_mode2],0
258 mikedld 648
	je	@f
649
	call	search
650
	jnc	.found
297 mikedld 651
	call	editor_check_for_changes
258 mikedld 652
	ret
653
 
654
  .found:
259 mikedld 655
	push	[copy_size] [copy_count] [copy_buf]
258 mikedld 656
 
657
	movzx	eax,[tb_replace.length]
259 mikedld 658
	add	eax,10
629 mikedld 659
	stdcall mem.Alloc,eax
259 mikedld 660
	mov	[copy_buf],eax
661
 
662
	movzx	eax,[tb_replace.length]
258 mikedld 663
	mov	esi,tb_replace.text
297 mikedld 664
	mov	edi,[copy_buf]
3919 mario79 665
;	stosd
666
	mov	[edi+EDITOR_LINE_DATA.Size],eax
667
	add	edi,sizeof.EDITOR_LINE_DATA
258 mikedld 668
	mov	ecx,eax
669
	jecxz	.lp1
670
	rep	movsb
3919 mario79 671
  .lp1: add	eax,sizeof.EDITOR_LINE_DATA
258 mikedld 672
	mov	[copy_size],eax
673
	mov	[copy_count],1
674
 
297 mikedld 675
	push	[cur_editor.SelStart.X]
676
	mov	ebp,cur_editor
258 mikedld 677
	call	init_sel_vars
4490 mario79 678
	mov	[replace_mode],1
258 mikedld 679
	call	key.ctrl_v
4490 mario79 680
	mov	[replace_mode],0
297 mikedld 681
	pop	[cur_editor.SelStart.X]
258 mikedld 682
 
629 mikedld 683
	stdcall mem.Free,[copy_buf]
258 mikedld 684
 
259 mikedld 685
	pop	[copy_buf] [copy_count] [copy_size]
258 mikedld 686
 
297 mikedld 687
	call	editor_check_for_changes
258 mikedld 688
	ret
689
    @@: xor	eax,eax
690
	mov	[bot_mode],al
691
	mov	[bot_dlg_height],eax
297 mikedld 692
	call	key.f3
258 mikedld 693
	call	drawwindow
694
	ret
1624 mario79 695
;-----------------------------------------------------------------------------
297 mikedld 696
  btn.bot.appearance:
697
    @@: xor	eax,eax
698
	mov	[bot_mode],al
699
	mov	[bot_dlg_height],eax
700
	call	optsdlg_handler.xchg_colors
987 mikedld 701
	mov	al,[tabs_pos]
297 mikedld 702
	mov	[tab_bar.Style],al
987 mikedld 703
 
704
	stdcall save_settings
297 mikedld 705
	call	drawwindow
706
	ret
1624 mario79 707
;-----------------------------------------------------------------------------
297 mikedld 708
tabpos_round db 4,3,1,2
1624 mario79 709
;-----------------------------------------------------------------------------
297 mikedld 710
  btn.bot.tabpos:
987 mikedld 711
	movzx	eax,[tabs_pos]
297 mikedld 712
	mov	al,[tabpos_round+eax-1]
987 mikedld 713
	mov	[tabs_pos],al
297 mikedld 714
    @@: call	optsdlg_handler.draw_tabpos
715
	ret
1624 mario79 716
;-----------------------------------------------------------------------------