Subversion Repositories Kolibri OS

Rev

Rev 987 | Rev 1651 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 987 Rev 1624
Line 27... Line 27...
27
	add	ebx,7*65536+4
27
	add	ebx,7*65536+4
28
	mcall	4,,[sc.work_text],[esp+4*8+4*2],[esp+4*8+4*1]
28
	mcall	4,,[sc.work_text],[esp+4*8+4*2],[esp+4*8+4*1]
29
	popad
29
	popad
30
	ret	4*3
30
	ret	4*3
31
endp
31
endp
32
 
-
 
-
 
32
;-----------------------------------------------------------------------------
33
finddlg_handler:
33
finddlg_handler:
34
	cmp	al,1
34
	cmp	al,1
35
	je	.draw
35
	je	.draw
36
	cmp	al,2
36
	cmp	al,2
37
	je	.key
37
	je	.key
Line 124... Line 124...
124
	mov	eax,tb_find
124
	mov	eax,tb_find
125
  .key.lp1:
125
  .key.lp1:
126
	mov	[focused_tb],eax
126
	mov	[focused_tb],eax
127
	call	.draw
127
	call	.draw
128
    @@: ret
128
    @@: ret
129
 
-
 
-
 
129
;-----------------------------------------------------------------------------
130
osdlg_handler:
130
osdlg_handler:
131
	cmp	al,1
-
 
132
	je	.draw
-
 
133
	cmp	al,2
-
 
134
	je	.key
-
 
135
	cmp	al,3
-
 
136
	je	botdlg.button
-
 
137
	ret
-
 
138
 
-
 
139
  .draw:
-
 
140
	mov	ebx,[bot_ofs]
131
	mov	[open_dialog],1
141
	add	ebx,(1+3)*65536+6
-
 
142
	mcall	4,,[sc.work_text],s_2filename,s_2filename.size
-
 
143
	mov	ebx,[p_info.client_box.width]
-
 
144
	shl	ebx,16
-
 
145
	mov	ecx,[bot_ofs]
-
 
146
	shl	ecx,16
-
 
147
	add	ecx,(2+18)*65536+15
-
 
148
 
-
 
149
	push	20002
-
 
150
	cmp	[bot_mode2],0
-
 
151
	jne	.draw.lp1
-
 
152
	add	ebx,-(2+6*(s_2open.size+2))*65536+6*(s_2open.size+2)
-
 
153
	push	s_2open s_2open.size
-
 
154
	jmp	@f
-
 
155
  .draw.lp1:
-
 
156
	add	ebx,-(2+6*(s_2save.size+2))*65536+6*(s_2save.size+2)
-
 
157
	push	s_2save s_2save.size
-
 
158
 
-
 
159
    @@: call	define_3d_button
-
 
160
	sub	ebx,(6*(s_2cancel.size+2)+3)*65536
-
 
161
	mov	bx,6*(s_2cancel.size+2)
-
 
162
	push	20001 s_2cancel s_2cancel.size
-
 
163
	call	define_3d_button
-
 
164
 
-
 
165
	cmp	[bot_mode2], 2	    ; exit-save dialog
-
 
166
	jne	@f
-
 
167
 
-
 
168
	sub	ebx,(6*(s_2save_no.size+2)+3)*65536
-
 
169
	mov	bx,6*(s_2save_no.size+2)
-
 
170
	push	20007 s_2save_no s_2save_no.size
-
 
171
	call	define_3d_button
-
 
172
 
-
 
173
    @@: mov	ebp,tb_opensave
-
 
174
	mov	eax,[p_info.client_box.width]
-
 
175
	sub	eax,6*(s_2filename.size+1)+1
-
 
176
	add	eax,6*(s_2filename.size+1)*65536
-
 
177
	mov	dword[tbox.width],eax
-
 
178
	add	ecx,-18*65536+1
-
 
179
	mov	dword[tbox.height],ecx
-
 
180
	call	textbox.draw
-
 
181
 
-
 
182
	ret
-
 
183
 
-
 
184
  .key:
-
 
185
	cmp	ebx,KEY_ESCAPE
-
 
186
	je	btn.bot.cancel
-
 
187
	cmp	ebx,KEY_RETURN
-
 
188
	je	btn.bot.opensave
-
 
189
	cmp	ebx,KEY_NUMRETURN
-
 
190
	je	btn.bot.opensave
-
 
191
	call	textbox.key
-
 
192
	ret
132
	ret
Line -... Line 133...
-
 
133
 
-
 
134
;	cmp	al,1
-
 
135
;	je	.draw
-
 
136
;	cmp	al,2
-
 
137
;	je	.key
-
 
138
;	cmp	al,3
-
 
139
;	je	botdlg.button
-
 
140
;	ret
-
 
141
 
-
 
142
;  .draw:
-
 
143
;	mov	ebx,[bot_ofs]
-
 
144
;	add	ebx,(1+3)*65536+6
-
 
145
;	mcall	4,,[sc.work_text],s_2filename,s_2filename.size
-
 
146
;	mov	ebx,[p_info.client_box.width]
-
 
147
;	shl	ebx,16
-
 
148
;	mov	ecx,[bot_ofs]
-
 
149
;	shl	ecx,16
-
 
150
;	add	ecx,(2+18)*65536+15
-
 
151
;
-
 
152
;	push	20002
-
 
153
;	cmp	[bot_mode2],0
-
 
154
;	jne	.draw.lp1
-
 
155
;	add	ebx,-(2+6*(s_2open.size+2))*65536+6*(s_2open.size+2)
-
 
156
;	push	s_2open s_2open.size
-
 
157
;	jmp	@f
-
 
158
;  .draw.lp1:
-
 
159
;	add	ebx,-(2+6*(s_2save.size+2))*65536+6*(s_2save.size+2)
-
 
160
;	push	s_2save s_2save.size
-
 
161
 
-
 
162
;    @@: call	define_3d_button
-
 
163
;	sub	ebx,(6*(s_2cancel.size+2)+3)*65536
-
 
164
;	mov	bx,6*(s_2cancel.size+2)
-
 
165
;	push	20001 s_2cancel s_2cancel.size
-
 
166
;	call	define_3d_button
-
 
167
 
-
 
168
;	cmp	[bot_mode2], 2	    ; exit-save dialog
-
 
169
;	jne	@f
-
 
170
 
-
 
171
;	sub	ebx,(6*(s_2save_no.size+2)+3)*65536
-
 
172
;	mov	bx,6*(s_2save_no.size+2)
-
 
173
;	push	20007 s_2save_no s_2save_no.size
-
 
174
;	call	define_3d_button
-
 
175
 
-
 
176
;    @@: mov	ebp,tb_opensave
-
 
177
;	mov	eax,[p_info.client_box.width]
-
 
178
;	sub	eax,6*(s_2filename.size+1)+1
-
 
179
;	add	eax,6*(s_2filename.size+1)*65536
-
 
180
;	mov	dword[tbox.width],eax
-
 
181
;	add	ecx,-18*65536+1
-
 
182
;	mov	dword[tbox.height],ecx
-
 
183
;	call	textbox.draw
-
 
184
 
-
 
185
;	ret
-
 
186
 
-
 
187
;  .key:
-
 
188
;	cmp	ebx,KEY_ESCAPE
-
 
189
;	je	btn.bot.cancel
-
 
190
;	cmp	ebx,KEY_RETURN
-
 
191
;	je	btn.bot.opensave
-
 
192
;	cmp	ebx,KEY_NUMRETURN
-
 
193
;	je	btn.bot.opensave
-
 
194
;	call	textbox.key
-
 
195
;	ret
193
 
196
;-----------------------------------------------------------------------------
194
gotodlg_handler:
197
gotodlg_handler:
195
	cmp	al,1
198
	cmp	al,1
196
	je	.draw
199
	je	.draw
197
	cmp	al,2
200
	cmp	al,2
Line 249... Line 252...
249
	je	btn.bot.opensave
252
	je	btn.bot.opensave
250
	cmp	ebx,KEY_NUMRETURN
253
	cmp	ebx,KEY_NUMRETURN
251
	je	btn.bot.opensave
254
	je	btn.bot.opensave
252
	call	textbox.key
255
	call	textbox.key
253
	ret
256
	ret
254
 
-
 
-
 
257
;-----------------------------------------------------------------------------
255
cur_part   dd ?
258
cur_part   dd ?
256
cur_color  dd ?
259
cur_color  dd ?
257
cur_colors rd 10
260
cur_colors rd 10
258
 
-
 
-
 
261
;-----------------------------------------------------------------------------
259
optsdlg_handler:
262
optsdlg_handler:
260
	cmp	al,1
263
	cmp	al,1
261
	je	.draw
264
	je	.draw
262
	cmp	al,2
265
	cmp	al,2
263
	je	.key
266
	je	.key
Line 577... Line 580...
577
	;call    .draw_color
580
	;call    .draw_color
578
	call	.draw
581
	call	.draw
Line 579... Line 582...
579
 
582
 
580
  .mouse.exit:
583
  .mouse.exit:
581
	ret
-
 
-
 
584
	ret
582
 
585
;-----------------------------------------------------------------------------
583
botdlg.button:
586
botdlg.button:
584
	mov	esi,accel_table2_botdlg
587
	mov	esi,accel_table2_botdlg
585
  .acc: cmp	ebx,[esi]
588
  .acc: cmp	ebx,[esi]
586
	jne	@f
589
	jne	@f
587
	call	dword[esi+4]
590
	call	dword[esi+4]
588
	ret
591
	ret
589
    @@: add	esi,8
592
    @@: add	esi,8
590
	cmp	byte[esi],0
593
	cmp	byte[esi],0
591
	jne	.acc
594
	jne	.acc
592
	ret
-
 
-
 
595
	ret
593
 
596
;-----------------------------------------------------------------------------
594
  btn.bot.cancel:
597
  btn.bot.cancel:
595
	xor	eax,eax
598
	xor	eax,eax
596
	mov	[bot_mode],al
599
	mov	[bot_mode],al
597
	mov	[main_closing],al
600
	mov	[main_closing],al
598
	mov	[bot_dlg_height],eax
601
	mov	[bot_dlg_height],eax
599
	mov	[s_status],eax
602
	mov	[s_status],eax
600
	call	drawwindow
603
	call	drawwindow
601
	ret
-
 
-
 
604
	ret
602
 
605
;-----------------------------------------------------------------------------
603
  btn.bot.opensave:
606
  btn.bot.opensave:
604
	cmp	[bot_mode2],0
607
	cmp	[bot_mode2],0
605
	je	.lp1
608
	je	.lp1
606
	call	save_file
609
	call	save_file
Line 614... Line 617...
614
	xor	eax,eax
617
	xor	eax,eax
615
	mov	[bot_mode],al
618
	mov	[bot_mode],al
616
	mov	[bot_dlg_height],eax
619
	mov	[bot_dlg_height],eax
617
	call	drawwindow
620
	call	drawwindow
618
	ret
621
	ret
619
 
-
 
-
 
622
;-----------------------------------------------------------------------------
620
  btn.bot.no:
623
  btn.bot.no:
621
	xor	eax,eax
624
	xor	eax,eax
622
	mov	[bot_mode],al
625
	mov	[bot_mode],al
623
	mov	[bot_dlg_height],eax
626
	mov	[bot_dlg_height],eax
624
	mov	[s_status],eax
627
	mov	[s_status],eax
Line 628... Line 631...
628
	add	[exit_tab_item],sizeof.TABITEM
631
	add	[exit_tab_item],sizeof.TABITEM
629
	jmp	key.alt_x.direct
632
	jmp	key.alt_x.direct
630
	ret
633
	ret
631
    @@: call	key.ctrl_f4.close
634
    @@: call	key.ctrl_f4.close
632
	ret
635
	ret
633
 
-
 
-
 
636
;-----------------------------------------------------------------------------
634
  btn.bot.find:
637
  btn.bot.find:
635
	movzx	ecx,[tb_find.length]
638
	movzx	ecx,[tb_find.length]
636
	mov	[s_search.size],ecx
639
	mov	[s_search.size],ecx
637
	mov	esi,tb_find.text
640
	mov	esi,tb_find.text
638
	mov	edi,s_search
641
	mov	edi,s_search
Line 681... Line 684...
681
	mov	[bot_mode],al
684
	mov	[bot_mode],al
682
	mov	[bot_dlg_height],eax
685
	mov	[bot_dlg_height],eax
683
	call	key.f3
686
	call	key.f3
684
	call	drawwindow
687
	call	drawwindow
685
	ret
688
	ret
686
 
-
 
-
 
689
;-----------------------------------------------------------------------------
687
  btn.bot.appearance:
690
  btn.bot.appearance:
688
    @@: xor	eax,eax
691
    @@: xor	eax,eax
689
	mov	[bot_mode],al
692
	mov	[bot_mode],al
690
	mov	[bot_dlg_height],eax
693
	mov	[bot_dlg_height],eax
691
	call	optsdlg_handler.xchg_colors
694
	call	optsdlg_handler.xchg_colors
Line 693... Line 696...
693
	mov	[tab_bar.Style],al
696
	mov	[tab_bar.Style],al
Line 694... Line 697...
694
 
697
 
695
	stdcall save_settings
698
	stdcall save_settings
696
	call	drawwindow
699
	call	drawwindow
697
	ret
-
 
-
 
700
	ret
698
 
701
;-----------------------------------------------------------------------------
699
tabpos_round db 4,3,1,2
-
 
-
 
702
tabpos_round db 4,3,1,2
700
 
703
;-----------------------------------------------------------------------------
701
  btn.bot.tabpos:
704
  btn.bot.tabpos:
702
	movzx	eax,[tabs_pos]
705
	movzx	eax,[tabs_pos]
703
	mov	al,[tabpos_round+eax-1]
706
	mov	al,[tabpos_round+eax-1]
704
	mov	[tabs_pos],al
707
	mov	[tabs_pos],al
705
    @@: call	optsdlg_handler.draw_tabpos
708
    @@: call	optsdlg_handler.draw_tabpos
-
 
709
	ret
706
	ret
710
;-----------------------------------------------------------------------------