Subversion Repositories Kolibri OS

Rev

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

Rev 1753 Rev 2033
Line 1... Line 1...
1
;************************************************************************
1
;************************************************************************
-
 
2
; v.016 30.07.2011
-
 
3
; Start with open file path
-
 
4
; Show working file path
-
 
5
; Some optimization
-
 
6
;
-
 
7
; Marat Zakiyanov aka Mario79, aka Mario
-
 
8
;************************************************************************
2
; v.015 08.03.2010
9
; v.015 08.03.2010
3
; Support for OpenDialog - Open and Save
10
; Support for OpenDialog - Open and Save
4
; Some optimization
11
; Some optimization
-
 
12
;
-
 
13
; Marat Zakiyanov aka Mario79, aka Mario
5
;************************************************************************
14
;************************************************************************
6
; v.014 05.02.2010
15
; v.014 05.02.2010
7
; 
16
; 
8
; PageUp, PageDown      - áâà ­¨æ  ¢¢¥àå/¢­¨§
17
; PageUp, PageDown      - áâà ­¨æ  ¢¢¥àå/¢­¨§
9
; Ctrl+UP, Ctrl+Down    - ¯à®ªàã⪠ áâà ­¨æë ­  áâப㠢¢¥àå/¢­¨§ ¡¥§ ᬥ饭¨ï ªãàá®à 
18
; Ctrl+UP, Ctrl+Down    - ¯à®ªàã⪠ áâà ­¨æë ­  áâப㠢¢¥àå/¢­¨§ ¡¥§ ᬥ饭¨ï ªãàá®à 
Line 43... Line 52...
43
	dd	0x1
52
	dd	0x1
44
	dd	START	;program start
53
	dd	START	;program start
45
	dd	I_END	;program image	size
54
	dd	I_END	;program image	size
46
	dd	(D_END+0x600) and not 3	;required amount of memory
55
	dd	(D_END+0x600) and not 3	;required amount of memory
47
	dd	(D_END+0x600) and not 3	;stack
56
	dd	(D_END+0x600) and not 3	;stack
48
	dd	0x0	;buf_cmd_lin
57
	dd	fname_buf
49
	dd	cur_dir_path
58
	dd	cur_dir_path
Line 50... Line 59...
50
 
59
 
Line 51... Line 60...
51
_title	equ 'HeEd 0.15', 0
60
_title	equ 'HeEd 0.16', 0
52
 
61
 
53
include	'lang.inc'
62
include	'lang.inc'
54
include '../../../config.inc'		;for nightbuild
63
include '../../../config.inc'		;for nightbuild
Line 93... Line 102...
93
 
102
 
94
START:
103
START:
Line 95... Line 104...
95
	mcall	68,11
104
	mcall	68,11
96
 
-
 
-
 
105
 
97
load_libraries l_libs_start,end_l_libs
106
load_libraries l_libs_start,end_l_libs
98
 
107
;--------------------------------------------------------------------
99
;OpenDialog	initialisation
108
;OpenDialog	initialisation
-
 
109
	push    dword OpenDialog_data
-
 
110
	call    [OpenDialog_Init]
-
 
111
;--------------------------------------------------------------------	
-
 
112
	mov	esi,fname_buf
Line -... Line 113...
-
 
113
	cmp	[esi],byte 0
-
 
114
	je	.start_temp_file_name
-
 
115
	
-
 
116
	cld
-
 
117
@@:
-
 
118
	lodsb
-
 
119
	test	al,al
-
 
120
	jne	@b
-
 
121
	
-
 
122
	std
-
 
123
@@:
-
 
124
	lodsb
-
 
125
	cmp	al,'/'	
-
 
126
	jne	@b
100
	push    dword OpenDialog_data
127
	add	esi,2
101
	call    [OpenDialog_Init]
128
	jmp	.selected_start_file_name
-
 
129
;--------------------------------------------------------------------	
-
 
130
.start_temp_file_name:
102
 
131
	mov	esi,start_temp_file_name
103
	mov	edi,filename_area
132
.selected_start_file_name:
104
	mov	esi,start_temp_file_name
133
	mov	edi,filename_area
105
	xor	eax,eax
134
	xor	eax,eax
106
	cld
135
	cld
Line 113... Line 142...
113
	mcall	40,0x27
142
	mcall	40,0x27
Line 114... Line 143...
114
 
143
 
115
	mcall	68,12,32*1024	;áâà ­¨ç­ë© ¡ãä¥à
144
	mcall	68,12,32*1024	;áâà ­¨ç­ë© ¡ãä¥à
116
	mov	[screen_table],eax
145
	mov	[screen_table],eax
117
	mcall	68,12,4*1024
-
 
-
 
146
	mcall	68,12,4*1024
118
;	mov	[blocks_table],eax
147
 
119
	mov	[file_buffer],eax
-
 
120
;	mov	esi,eax
-
 
121
;	mcall	68,12,4*1024
-
 
122
;	mov	[esi],eax
-
 
123
;	mov	[blocks_counter],1
148
	mov	[file_buffer],eax
124
 
-
 
125
;	mcall	68,12,1024	;Procinfo area for function 9 in MenuBar
-
 
126
;	mov	[menu_data_1.procinfo],eax
-
 
127
;	mov	[menu_data_2.procinfo],eax
149
 
128
	mcall	68,12,1024
150
	mcall	68,12,1024
Line 129... Line 151...
129
	mov	[copy_buf],eax
151
	mov	[copy_buf],eax
Line 151... Line 173...
151
;	jmp	open_file
173
;	jmp	open_file
152
	mcall	9,procinfo,-1
174
	mcall	9,procinfo,-1
153
	mov	ecx,[ebx+30]	; PID
175
	mov	ecx,[ebx+30]	; PID
154
	mcall	18,21
176
	mcall	18,21
155
	mov	[active_process],eax	; WINDOW SLOT
177
	mov	[active_process],eax	; WINDOW SLOT
156
 
-
 
-
 
178
;--------------------------------------------------------------------
-
 
179
; open the file if program has a file path, when it was launched
-
 
180
	cmp	[fname_buf],byte 0
-
 
181
	jne	open_dialog.start
-
 
182
;--------------------------------------------------------------------
157
redraw_all:
183
redraw_all:
158
	call	control_minimal_window_size
184
	call	control_minimal_window_size
159
	call	draw_window_1
185
	call	draw_window_1
160
still:
186
still:
161
	mcall	10
187
	mcall	10
Line 1308... Line 1334...
1308
	mov	edx,[low_area];
1334
	mov	edx,[low_area];
1309
	mov	esi,1
1335
	mov	esi,1
1310
	mov	ecx,8
1336
	mov	ecx,8
1311
	call	hex_output
1337
	call	hex_output
1312
	ret
1338
	ret
-
 
1339
;---------------------------------------------------------------------
-
 
1340
align	4
-
 
1341
create_title:
-
 
1342
	mov	edi,title_buf
-
 
1343
	mov	esi,title
-
 
1344
	cld
1313
 
1345
@@:
-
 
1346
	lodsb
-
 
1347
	stosb
-
 
1348
	test	al,al
-
 
1349
	jne	@b
-
 
1350
	mov	[edi-1],byte ' '
-
 
1351
	mov	esi,fname_buf
1314
 
1352
@@:
-
 
1353
	lodsb
-
 
1354
	stosb
-
 
1355
	test	al,al
-
 
1356
	jne	@b
-
 
1357
	ret
-
 
1358
;---------------------------------------------------------------------
1315
align	4
1359
align	4
1316
draw_window:
1360
draw_window:
-
 
1361
	call	create_title
1317
	xor	esi,esi
1362
	xor	esi,esi
1318
	mcall	0,100*65536+653,100*65536+360,((0x73 shl 24) + frgrd_color),,title
1363
	mcall	0,100*65536+653,100*65536+360,((0x73 shl 24) + frgrd_color),,title_buf	;title
1319
	mcall	9,threath_buf,-1
1364
	mcall	9,threath_buf,-1
1320
	cmp	byte [threath_buf+70],3	;®ª­® á¢ñà­ãâ® ¢ § £®«®¢®ª?
1365
	cmp	byte [threath_buf+70],3	;®ª­® á¢ñà­ãâ® ¢ § £®«®¢®ª?
1321
	jnae	@f
1366
	jnae	@f
1322
.@d:
1367
.@d:
1323
	call	end_draw
1368
	call	end_draw
Line 2814... Line 2859...
2814
 
2859
 
2815
;	cmp	[OpenDialog_data.status],2	; OpenDialog does not start
2860
;	cmp	[OpenDialog_data.status],2	; OpenDialog does not start
2816
;	je	.sysxtree	; some kind of alternative, instead OpenDialog
2861
;	je	.sysxtree	; some kind of alternative, instead OpenDialog
2817
	cmp	[OpenDialog_data.status],1
2862
	cmp	[OpenDialog_data.status],1
-
 
2863
	jne	still
2818
	jne	still
2864
.start:
2819
	mov	esi,fname_buf
2865
	mov	esi,fname_buf
2820
.load:
2866
.load:
2821
	mov	edi,file_name
2867
	mov	edi,file_name
2822
	cld
2868
	cld
Line 3408... Line 3454...
3408
help_is_open_already	db ?  ;¥á«¨ ®ª­® á¯à ¢ª¨ ®âªàëâ®, â® §¤¥áì 1
3454
help_is_open_already	db ?  ;¥á«¨ ®ª­® á¯à ¢ª¨ ®âªàëâ®, â® §¤¥áì 1
3409
help_window_pid 	dd ?
3455
help_window_pid 	dd ?
Line 3410... Line 3456...
3410
 
3456
 
3411
func_70	f70
3457
func_70	f70
-
 
3458
;---------------------------------------------------------------------
-
 
3459
title_buf:
-
 
3460
	rb 4096
3412
;---------------------------------------------------------------------
3461
;---------------------------------------------------------------------
3413
fname_buf:
3462
fname_buf:
3414
	rb 4096
3463
	rb 4096
3415
;---------------------------------------------------------------------
3464
;---------------------------------------------------------------------
3416
temp_dir_pach:
3465
temp_dir_pach: