Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
297 mikedld 1
 
178 heavyiron 2
POP_IHEIGHT = 16
3
;POP_HEIGHT  = popup_text.cnt_item*POP_IHEIGHT+popup_text.cnt_sep*4+4
4
5
 
6
	mov	[popup_active],1
7
	mov	[pi_cur],0
8
	mov	ebp,[esp]
9
	mcall	14
10
	movzx	ebx,ax
11
	shr	eax,16
12
	movzx	ecx,[ebp+POPUP.x]
13
	add	cx,[ebp+POPUP.width]
14
	cmp	ecx,eax
15
	jle	@f
16
	mov	cx,[ebp+POPUP.width]
17
	sub	[ebp+POPUP.x],cx
18
    @@: movzx	ecx,[ebp+POPUP.y]
19
	add	cx,[ebp+POPUP.height]
20
	cmp	ecx,ebx
21
	jle	@f
22
	mov	cx,[ebp+POPUP.height]
23
	sub	[ebp+POPUP.y],cx
24
    @@: mcall	40,01100111b		; ipc mouse button key redraw
25
	cmp	[mi_cur],0
26
	jl	.2
27
	sub	esp,32-16
28
	push	0 0 8 0
29
	mcall	60,1,esp,32
30
  .2:	call	draw_popup_wnd
31
32
 
33
	cmp	[main_closed],1
34
	je	close_popup
35
	mcall	10
36
	cmp	eax,1
37
	je	popup_thread_start.2
38
	cmp	eax,2
39
	je	key_popup
40
	cmp	eax,3
41
	je	button_popup
42
	cmp	eax,6
43
	je	mouse_popup
44
	cmp	eax,7
45
	jne	still_popup
46
47
 
297 mikedld 48
	mov	dword[POPUP_STACK-32+4],8
178 heavyiron 49
	movzx	ebx,[ebp+POPUP.x]
50
	movzx	ecx,[ebp+POPUP.y]
51
	movzx	edx,[ebp+POPUP.width]
52
	movzx	esi,[ebp+POPUP.height]
53
	mcall	67
54
	jmp	still_popup
55
56
 
57
	mov	ecx,mst2
58
	call	get_mouse_event
59
	cmp	al,MEV_LDOWN
60
	je	check_popup_click
61
	cmp	al,MEV_MOVE
62
	je	check_popup_move
63
64
 
65
	cmp	ax,[p_info2.window_stack_position]
66
	jne	close_popup
67
68
 
69
70
 
71
	mov	eax,[pi_cur]
72
	or	al,al
73
	js	close_popup
74
	jz	still_popup
75
	mov	ebx,[ebp+POPUP.actions]
76
	mov	[just_from_popup],1
77
	call	dword[ebx+eax*4-4]
297 mikedld 78
	inc	[just_from_popup]
178 heavyiron 79
	jmp	close_popup
80
81
 
82
	mov	eax,[pi_cur]
83
	call	get_active_popup_item
84
	cmp	eax,[pi_cur]
85
	je	still_popup
86
	call	draw_popup_wnd
87
	jmp	still_popup
88
89
 
90
	mcall	;2
91
	cmp	ah,27
92
	jne	still_popup
93
94
 
95
	mcall	17
96
97
 
98
	mcall	18,3,[p_info.PID]
99
	mov	[popup_active],0
100
	mov	[mi_cur],0
297 mikedld 101
	mcall	-1
178 heavyiron 102
103
 
104
	mcall	12,1
105
106
 
107
	mov	bx,[ebp+POPUP.width]
108
	mov	ecx,dword[ebp+POPUP.y-2]
109
	mov	cx,[ebp+POPUP.height]
110
	mcall	0,,,0x01000000,0x01000000
111
112
 
113
	movzx	ecx,cx
114
	pushd	0 0 ebx ecx
297 mikedld 115
	call	draw_3d_panel
178 heavyiron 116
117
 
118
	mov	eax,4
119
	mpack	ebx,3*6,3
120
	mov	ecx,[sc.work_text]
121
	mov	edx,[ebp+POPUP.data]
297 mikedld 122
    @@: inc	[pi_sel]
178 heavyiron 123
	inc	edx
124
	movzx	esi,byte[edx-1]
125
	cmp	byte[edx],'-'
126
	jne	.lp1
127
	pushad
128
	mov	ecx,ebx
129
	shl	ecx,16
130
	mov	cx,bx
131
	movzx	ebx,[ebp+POPUP.width]
132
	add	ebx,0x00010000-1
133
	add	ecx,0x00010001
134
	mcall	38,,,[cl_3d_inset]
297 mikedld 135
	add	ecx,0x00010001
178 heavyiron 136
	mcall	,,,[cl_3d_outset]
297 mikedld 137
	popad
178 heavyiron 138
	add	ebx,4
139
	jmp	.lp2
140
  .lp1: mov	edi,[pi_sel]
141
	cmp	edi,[pi_cur]
142
	jne	.lp3
143
	test	byte[ebp+edi-1],0x01
297 mikedld 144
	jz	.lp3
178 heavyiron 145
	pushad
146
	movzx	ecx,bx
147
	shl	ecx,16
148
	mov	cl,POP_IHEIGHT-1
149
	movzx	ebx,[ebp+POPUP.width]
150
	add	ebx,0x00010000-1
151
	mcall	13,,,[cl_3d_pushed]
297 mikedld 152
	rol	ecx,16
178 heavyiron 153
	mov	ax,cx
154
	rol	ecx,16
155
	mov	cx,ax
156
	mcall	38,,,[cl_3d_inset]
297 mikedld 157
	add	ecx,(POP_IHEIGHT-1)*65536+POP_IHEIGHT-1
178 heavyiron 158
	mcall	,,,[cl_3d_outset]
297 mikedld 159
	popad
178 heavyiron 160
  .lp3: add	ebx,(POP_IHEIGHT-7)/2
161
162
 
163
	test	byte[ebp+edi-1],0x02
164
	jz	.lp8
165
	movzx	ecx,bx
166
	shr	ebx,16
167
	add	ebx,-11
280 mikedld 168
	add	ecx,2
169
	mov	edx,[sc.work_text]
170
	call	draw_check
171
  .lp8: popad
178 heavyiron 172
173
 
297 mikedld 174
	test	byte[ebp+edi-1],0x01
175
	jnz	.lp5
178 heavyiron 176
	add	ebx,0x00010001
177
	mov	ecx,[cl_3d_outset]
178
	mcall
179
	sub	ebx,0x00010001
180
	mov	ecx,[cl_3d_inset]
181
  .lp5: mcall
182
	push	ebx
183
	add	edx,esi
184
	inc	edx
185
	movzx	esi,byte[edx-1]
186
	add	ebx,[ebp+POPUP.acc_ofs]
297 mikedld 187
	cmp	edi,[pi_cur]
178 heavyiron 188
	je	.lp4
189
	mov	ecx,[cl_3d_inset]
297 mikedld 190
  .lp4: test	byte[ebp+edi-1],0x01
191
	jnz	.lp6
178 heavyiron 192
	add	ebx,0x00010001
193
	mov	ecx,[cl_3d_outset]
194
	mcall
195
	sub	ebx,0x00010001
196
	mov	ecx,[cl_3d_inset]
197
  .lp6: mcall
198
	pop	ebx
199
	add	ebx,POP_IHEIGHT-(POP_IHEIGHT-7)/2
200
  .lp2: add	edx,esi
201
	cmp	byte[edx],0
202
	jne	@b
203
  .exit:
204
	mcall	12,2
205
	ret
206
endf
207
208
 
267 mikedld 209
	mov	ebx,[p_info.box.left]
210
	add	ebx,[p_info.client_box.left]
211
    @@: dec	ecx
212
	jz	@f
213
	add	edx,8+1
214
	movzx	esi,byte[edx-1]
215
	add	edx,esi
216
	jmp	@b
217
    @@: movzx	ecx,word[edx+2]
218
	add	ebx,ecx
219
220
 
221
	mov	ebx,[p_info.box.top]
222
	add	ebx,[p_info.client_box.top]
223
	add	ebx,ATOPH-1
224
	mov	[eax+POPUP.y],bx
225
	mov	[POPUP_STACK],eax
226
	ret
227
endf
228
229
 
230
231
 
232
	or	byte[mm.File+3],0x01
233
	cmp	[f_info.length],0
234
	jne	@f
235
	and	byte[mm.File+3],0xFE
236
    @@: ret
237
238
 
239
	or	byte[mm.Edit+2],0x01
240
	cmp	[copy_size],0
241
	jne	@f
242
	and	byte[mm.Edit+2],0xFE
243
    @@: or	dword[mm.Edit+0],0x01000101
244
	cmp	[sel.selected],0
245
	jne	@f
246
	and	dword[mm.Edit+0],0xFEFFFEFE
247
    @@: ret
248
249
 
250
	mov	byte[mm.Search+0],0
251
	ret
252
  .run:
253
	ret
254
  .recode:
255
	ret
256
  .options:
257
	;mov     word[mm.Options+0],0
297 mikedld 258
	mov	byte[mm.Options+5],0
267 mikedld 259
	or	byte[mm.Options+2],0x02
260
	test	[options],OPTS_SECURESEL
261
	jnz	@f
262
	and	byte[mm.Options+2],0xFD
263
    @@: or	byte[mm.Options+3],0x02
264
	test	[options],OPTS_AUTOBRACES
265
	jnz	@f
266
	and	byte[mm.Options+3],0xFD
267
    @@: or	byte[mm.Options+4],0x02
268
	test	[options],OPTS_AUTOINDENT
269
	jnz	@f
270
	and	byte[mm.Options+4],0xFD
271
    @@: or	byte[mm.Options+6],0x02
272
	test	[options],OPTS_OPTIMSAVE
273
	jnz	@f
274
	and	byte[mm.Options+6],0xFD
275
    @@: or	byte[mm.Options+8],0x02
276
	test	[options],OPTS_LINENUMS
277
	jnz	@f
278
	and	byte[mm.Options+8],0xFD
279
    @@: ret
280
281
 
178 heavyiron 282
pi_cur	 dd ?
283
p_pos	 dd ?
284
popup_active db 0
297 mikedld 285