Subversion Repositories Kolibri OS

Rev

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