Subversion Repositories Kolibri OS

Rev

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

Rev 1102 Rev 1624
Line 32... Line 32...
32
 
32
 
Line 33... Line 33...
33
;purge mov,add,sub            ;  SPEED
33
;purge mov,add,sub            ;  SPEED
Line 34... Line 34...
34
 
34
 
Line 35... Line 35...
35
header '01',1,@CODE,TINYPAD_END,STATIC_MEM_END,MAIN_STACK,@PARAMS,ini_path
35
header '01',1,@CODE,TINYPAD_END,STATIC_MEM_END,MAIN_STACK,@PARAMS,ini_path
36
 
36
 
Line 37... Line 37...
37
APP_VERSION equ 'SVN (4.0.5)'
37
APP_VERSION equ 'SVN (4.0.6)'
Line 180... Line 180...
180
	dec	[do_not_draw]
180
	dec	[do_not_draw]
Line 181... Line 181...
181
 
181
 
182
	mov	al,[tabs_pos]
182
	mov	al,[tabs_pos]
Line -... Line 183...
-
 
183
	mov	[tab_bar.Style],al
-
 
184
 
-
 
185
;---------------------------------------------------------------------
-
 
186
	mov	edi,filename_area
-
 
187
	mov	esi,s_example+5
-
 
188
	call	copy_str_1
-
 
189
 
-
 
190
	mov	esi,tb_opensave.text
-
 
191
	mov	edi,fname_Info
-
 
192
	call	copy_str_1
-
 
193
	xor	eax,eax
-
 
194
	mov	[edi],al
-
 
195
;---------------------------------------------------------------------
-
 
196
;OpenDialog	initialisation
-
 
197
	push    dword OpenDialog_data
-
 
198
	call    [OpenDialog_Init]
-
 
199
;---------------------------------------------------------------------
183
	mov	[tab_bar.Style],al
200
 
184
 
201
 
185
	mcall	66,1,1
202
	mcall	66,1,1
186
	mcall	40,00100111b
203
	mcall	40,00100111b
Line 191... Line 208...
191
 
208
 
192
still:
209
still:
Line 193... Line 210...
193
	call	draw_statusbar ; write current position & number of strings
210
	call	draw_statusbar ; write current position & number of strings
-
 
211
 
-
 
212
  .skip_write:
194
 
213
	cmp	[open_dialog],1
195
  .skip_write:
214
	je	.open_dialog
196
	mcall	10	; wait here until event
215
	mcall	10	; wait here until event
197
	cmp	[main_closed],0
216
	cmp	[main_closed],0
198
	jne	key.alt_x
217
	jne	key.alt_x
Line 204... Line 223...
204
	jz	button
223
	jz	button
205
	sub	eax,3	; mouse ?
224
	sub	eax,3	; mouse ?
206
	jz	mouse
225
	jz	mouse
Line 207... Line 226...
207
 
226
 
-
 
227
	jmp	still.skip_write
-
 
228
;---------------------------------------------------------------------
-
 
229
.open_dialog:
-
 
230
	pusha
-
 
231
 
-
 
232
	call	btn.bot.cancel
-
 
233
 
-
 
234
	mov	esi,tb_opensave.text
-
 
235
	mov	edi,[OpenDialog_data.openfile_pach]
-
 
236
	movzx	ecx,[tb_opensave.length]
-
 
237
	mov	edx,[OpenDialog_data.filename_area]
-
 
238
	mov	ebx,[OpenDialog_data.opendir_pach]
-
 
239
	call	copy_str_2
-
 
240
	movzx	eax,byte [bot_mode2]
-
 
241
	mov	[OpenDialog_data.type],eax
-
 
242
	popa
-
 
243
; invoke OpenDialog
-
 
244
	push    dword OpenDialog_data
-
 
245
	call    [OpenDialog_Start]
-
 
246
 
-
 
247
	cmp	[OpenDialog_data.status],1
-
 
248
	jne	.3
-
 
249
 
-
 
250
	pusha
-
 
251
	mov	edi,tb_opensave.text
-
 
252
	mov	esi,[OpenDialog_data.openfile_pach]
-
 
253
	call	copy_str_1
-
 
254
	sub	edi,tb_opensave.text
-
 
255
	dec	edi
-
 
256
	mov	eax,edi
-
 
257
	mov	[tb_opensave.length],al
Line -... Line 258...
-
 
258
	popa
-
 
259
	
-
 
260
	cmp	[bot_mode2],0
-
 
261
	je	.2
-
 
262
	call	save_file
-
 
263
	jmp	.3
-
 
264
.2:
-
 
265
	call	load_file
-
 
266
.3:
-
 
267
	mov	[open_dialog],0
-
 
268
	jmp	red
-
 
269
;-----------------------------------------------------------------------------
-
 
270
draw_window_for_OD:
-
 
271
	call	drawwindow
-
 
272
	call	draw_statusbar
-
 
273
	ret
-
 
274
;-----------------------------------------------------------------------------
-
 
275
copy_str_2:
-
 
276
	cld
-
 
277
	push	esi ecx
-
 
278
	rep	movsb	; edi  openfile_pach
-
 
279
	xor	eax,eax
-
 
280
	mov	[edi],al
-
 
281
	pop	ecx esi
-
 
282
	mov	edi,ebx
-
 
283
	rep	movsb	; edi opendir_pach
-
 
284
	mov	[edi],al
-
 
285
	mov	esi,edi
-
 
286
	std
-
 
287
@@:
-
 
288
	lodsb
-
 
289
	cmp	al,byte '/'
-
 
290
	jne	@b
-
 
291
	inc	esi
-
 
292
	xor	eax,eax
-
 
293
	mov	[esi],al
-
 
294
	inc	esi
-
 
295
	mov	edi,edx	; edi filename_area
-
 
296
	call	copy_str_1
-
 
297
	ret
-
 
298
;-----------------------------------------------------------------------------
-
 
299
copy_str_1:
-
 
300
	xor	eax,eax
-
 
301
	cld
-
 
302
@@:
-
 
303
	lodsb
-
 
304
	stosb
-
 
305
	test	eax,eax
208
	jmp	still.skip_write
306
	jnz	@b
209
 
307
	ret
210
;-----------------------------------------------------------------------------
308
;-----------------------------------------------------------------------------
211
proc get_event ctx ;//////////////////////////////////////////////////////////
309
proc get_event ctx ;//////////////////////////////////////////////////////////
212
;-----------------------------------------------------------------------------
310
;-----------------------------------------------------------------------------
Line 523... Line 621...
523
;-----------------------------------------------------------------------------
621
;-----------------------------------------------------------------------------
Line 524... Line 622...
524
 
622
 
525
library \
623
library \
526
	libini,'libini.obj',\
624
	libini,'libini.obj',\
527
	libio,'libio.obj',\
625
	libio,'libio.obj',\
-
 
626
	libgfx,'libgfx.obj',\
Line 528... Line 627...
528
	libgfx,'libgfx.obj'
627
	proc_lib,'proc_lib.obj'
529
 
628
 
530
import	libini, \
629
import	libini, \
531
	ini.get_str  ,'ini_get_str',\
630
	ini.get_str  ,'ini_get_str',\
Line 565... Line 664...
565
	gfx.framerect	,'gfx_framerect',\
664
	gfx.framerect	,'gfx_framerect',\
566
	gfx.framerect.ex,'gfx_framerect_ex',\
665
	gfx.framerect.ex,'gfx_framerect_ex',\
567
	gfx.rectangle	,'gfx_rectangle',\
666
	gfx.rectangle	,'gfx_rectangle',\
568
	gfx.rectangle.ex,'gfx_rectangle_ex'
667
	gfx.rectangle.ex,'gfx_rectangle_ex'
Line -... Line 668...
-
 
668
 
-
 
669
import	proc_lib, \
-
 
670
	OpenDialog_Init  ,'OpenDialog_init',\
-
 
671
	OpenDialog_Start  ,'OpenDialog_start'
569
 
672
 
Line 570... Line 673...
570
TINYPAD_END:	 ; end of file
673
TINYPAD_END:	 ; end of file
571
 
674
 
572
;-----------------------------------------------------------------------------
675
;-----------------------------------------------------------------------------
Line 585... Line 688...
585
p_info2 process_information
688
p_info2 process_information
586
sc	system_colors
689
sc	system_colors
Line 587... Line 690...
587
 
690
 
Line -... Line 691...
-
 
691
ini_path rb PATHL
-
 
692
 
-
 
693
;---------------------------------------------------------------------
-
 
694
temp_dir_pach:
-
 
695
	rb 4096
-
 
696
;---------------------------------------------------------------------
-
 
697
fname_Info:
-
 
698
	rb 4096            ; filename
-
 
699
;---------------------------------------------------------------------
-
 
700
filename_area:
588
ini_path rb PATHL
701
	rb 256
589
 
702
;---------------------------------------------------------------------
590
rb 1024*4
703
rb 1024*4
591
MAIN_STACK:
704
MAIN_STACK: