Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
122 diamond 1
;-----------------------------------------------------------------------------
31 halyavin 2
; project name:      TINYPAD
629 mikedld 3
; compiler:          flat assembler 1.67.21
297 mikedld 4
; memory to compile: 3.0/9.0 MBytes (without/with size optimizations)
827 mikedld 5
; version:           SVN (4.0.5)
6
; last update:       2008-07-18 (Jul 18, 2008)
7
; minimal kernel:    revision #823 (svn://kolibrios.org/kernel/trunk)
122 diamond 8
;-----------------------------------------------------------------------------
9
; originally by:     Ville Michael Turjanmaa >> villemt@aton.co.jyu.fi
258 mikedld 10
; maintained by:     Mike Semenyako          >> mike.dld@gmail.com
11
;                    Ivan Poddubny           >> ivan-yar@bk.ru
122 diamond 12
;-----------------------------------------------------------------------------
297 mikedld 13
; TODO (4.1.0):
617 mikedld 14
;   - add vertical selection, undo, goto position, overwrite mode, smart tabulation
178 heavyiron 15
;   - improve window drawing with small dimensions
617 mikedld 16
;   - save/load settings to/from ini file, not executable
17
;   - path autocompletion for open/save dialogs
259 mikedld 18
;   - other bug-fixes and speed/size optimizations
122 diamond 19
;-----------------------------------------------------------------------------
617 mikedld 20
; See history.txt for complete changelog
21
;-----------------------------------------------------------------------------
31 halyavin 22
 
178 heavyiron 23
include 'lang.inc'
617 mikedld 24
 
1702 Lrz 25
include '../../../config.inc'		;for nightbuild
26
include '../../../macros.inc'		; useful stuff
617 mikedld 27
include '../../../struct.inc'
28
include '../../../proc32.inc'
29
 
30
include 'external/libio.inc'
31
 
122 diamond 32
include 'tinypad.inc'
617 mikedld 33
 
297 mikedld 34
;purge mov,add,sub            ;  SPEED
31 halyavin 35
 
987 mikedld 36
header '01',1,@CODE,TINYPAD_END,STATIC_MEM_END,MAIN_STACK,@PARAMS,ini_path
31 halyavin 37
 
1624 mario79 38
APP_VERSION equ 'SVN (4.0.6)'
258 mikedld 39
 
617 mikedld 40
TRUE = 1
41
FALSE = 0
42
 
122 diamond 43
;include 'debug.inc'
280 mikedld 44
;define __DEBUG__ 1
45
;define __DEBUG_LEVEL__ 1
46
;include 'debug-fdo.inc'
31 halyavin 47
 
987 mikedld 48
; compiled-in options
49
 
280 mikedld 50
ASEPC = '-'  ; separator character (char)
51
ATOPH = 19   ; menu bar height (pixels)
52
SCRLW = 16   ; scrollbar widht/height (pixels)
53
ATABW = 8    ; tab key indent width (chars)
54
LINEH = 10   ; line height (pixels)
55
PATHL = 256  ; maximum path length (chars) !!! don't change !!!
56
AMINS = 8    ; minimal scroll thumb size (pixels)
57
LCHGW = 3    ; changed/saved marker width (pixels)
31 halyavin 58
 
280 mikedld 59
STATH = 16   ; status bar height (pixels)
60
TBARH = 18   ; tab bar height (pixels)
31 halyavin 61
 
987 mikedld 62
INI_SEC_PREFIX equ ''
31 halyavin 63
 
122 diamond 64
;-----------------------------------------------------------------------------
65
section @CODE ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
66
;-----------------------------------------------------------------------------
31 halyavin 67
 
3279 mario79 68
	mcall	9,p_info2,-1
3265 mario79 69
	mov	ecx,[ebx+30]	; PID
70
	mcall	18,21
71
	mov	[active_process],eax	; WINDOW SLOT
72
 
258 mikedld 73
	cld
74
	mov	edi,@UDATA
75
	mov	ecx,@PARAMS-@UDATA
76
	mov	al,0
77
	rep	stosb
31 halyavin 78
 
259 mikedld 79
	mcall	68,11
80
	or	eax,eax
81
	jz	key.alt_x.close
82
 
617 mikedld 83
	stdcall dll.Load,@IMPORT
84
	or	eax,eax
85
	jnz	key.alt_x.close
86
 
987 mikedld 87
	mov	edi,ini_path
88
	xor	al,al
89
	mov	ecx,PATHL
90
	repne	scasb
91
	mov	dword[edi-1],'.ini'
92
	mov	byte[edi+3],0
93
 
94
	stdcall load_settings
95
 
617 mikedld 96
	stdcall mem.Alloc,65536
259 mikedld 97
	mov	[temp_buf],eax
98
 
178 heavyiron 99
	inc	[do_not_draw]
100
 
297 mikedld 101
	mov	dword[app_start],7
102
 
258 mikedld 103
	mov	esi,s_example
104
	mov	edi,tb_opensave.text
105
	mov	ecx,s_example.size
106
	mov	[tb_opensave.length],cl
107
	rep	movsb
31 halyavin 108
 
258 mikedld 109
	mov	esi,s_still
110
	mov	edi,s_search
111
	mov	ecx,s_still.size
112
	mov	[s_search.size],ecx
113
	rep	movsb
31 halyavin 114
 
258 mikedld 115
	cmp	byte[@PARAMS],0
116
	jz	no_params
31 halyavin 117
 
122 diamond 118
;// Willow's code to support DOCPAK [
31 halyavin 119
 
258 mikedld 120
	cmp	byte[@PARAMS],'*'
121
	jne	.noipc
178 heavyiron 122
 
123
;// diamond [ (convert size from decimal representation to dword)
124
;--     mov     edx,dword[@PARAMS+1]
258 mikedld 125
	mov	esi,@PARAMS+1
126
	xor	edx,edx
127
	xor	eax,eax
178 heavyiron 128
    @@: lodsb
258 mikedld 129
	test	al,al
130
	jz	@f
131
	lea	edx,[edx*4+edx]
132
	lea	edx,[edx*2+eax-'0']
133
	jmp	@b
178 heavyiron 134
    @@:
135
;// diamond ]
136
 
258 mikedld 137
	add	edx,20
259 mikedld 138
 
617 mikedld 139
	stdcall mem.Alloc,edx
259 mikedld 140
	mov	ebp,eax
280 mikedld 141
	push	eax
259 mikedld 142
 
280 mikedld 143
	mov	dword[ebp+0],0
144
	mov	dword[ebp+4],8
259 mikedld 145
	mcall	60,1,ebp
258 mikedld 146
	mcall	40,1000000b
280 mikedld 147
 
258 mikedld 148
	mcall	23,200
280 mikedld 149
 
258 mikedld 150
	cmp	eax,7
259 mikedld 151
	jne	key.alt_x.close
152
	mov	byte[ebp],1
153
 
154
	mov	ecx,[ebp+12]
280 mikedld 155
	lea	esi,[ebp+16]
259 mikedld 156
	call	create_tab
157
	call	load_from_memory
158
 
280 mikedld 159
	pop	ebp
617 mikedld 160
	stdcall mem.Free,ebp
259 mikedld 161
 
258 mikedld 162
	jmp	@f
122 diamond 163
  .noipc:
31 halyavin 164
 
122 diamond 165
;// Willow's code to support DOCPAK ]
31 halyavin 166
 
258 mikedld 167
	mov	esi,@PARAMS
168
	mov	edi,tb_opensave.text
169
	mov	ecx,PATHL
170
	rep	movsb
171
	mov	edi,tb_opensave.text
172
	mov	ecx,PATHL
173
	xor	al,al
174
	repne	scasb
175
	jne	key.alt_x.close
176
	lea	eax,[edi-tb_opensave.text-1]
177
	mov	[tb_opensave.length],al
297 mikedld 178
	call	load_file
280 mikedld 179
	jnc	@f
31 halyavin 180
 
122 diamond 181
  no_params:
259 mikedld 182
	call	create_tab
31 halyavin 183
 
184
    @@:
280 mikedld 185
	mov	[s_status],0
178 heavyiron 186
	dec	[do_not_draw]
987 mikedld 187
 
188
	mov	al,[tabs_pos]
189
	mov	[tab_bar.Style],al
190
 
1624 mario79 191
;---------------------------------------------------------------------
192
	mov	edi,filename_area
193
	mov	esi,s_example+5
194
	call	copy_str_1
195
 
196
	mov	esi,tb_opensave.text
197
	mov	edi,fname_Info
198
	call	copy_str_1
199
	xor	eax,eax
200
	mov	[edi],al
201
;---------------------------------------------------------------------
202
;OpenDialog	initialisation
203
	push    dword OpenDialog_data
204
	call    [OpenDialog_Init]
205
;---------------------------------------------------------------------
206
 
207
 
258 mikedld 208
	mcall	66,1,1
209
	mcall	40,00100111b
178 heavyiron 210
red:
258 mikedld 211
	call	drawwindow
31 halyavin 212
 
122 diamond 213
;-----------------------------------------------------------------------------
31 halyavin 214
 
122 diamond 215
still:
297 mikedld 216
	call	draw_statusbar ; write current position & number of strings
31 halyavin 217
 
122 diamond 218
  .skip_write:
1624 mario79 219
	cmp	[open_dialog],1
220
	je	.open_dialog
297 mikedld 221
	mcall	10	; wait here until event
3265 mario79 222
 
223
	call	check_active_process_for_clear_all_flags
224
 
258 mikedld 225
	cmp	[main_closed],0
226
	jne	key.alt_x
227
	dec	eax	; redraw ?
228
	jz	red
229
	dec	eax	; key ?
230
	jz	key
231
	dec	eax	; button ?
232
	jz	button
233
	sub	eax,3	; mouse ?
234
	jz	mouse
31 halyavin 235
 
258 mikedld 236
	jmp	still.skip_write
1624 mario79 237
;---------------------------------------------------------------------
238
.open_dialog:
239
	pusha
31 halyavin 240
 
1624 mario79 241
	call	btn.bot.cancel
242
 
243
	mov	esi,tb_opensave.text
244
	mov	edi,[OpenDialog_data.openfile_pach]
245
	movzx	ecx,[tb_opensave.length]
246
	mov	edx,[OpenDialog_data.filename_area]
247
	mov	ebx,[OpenDialog_data.opendir_pach]
248
	call	copy_str_2
249
	movzx	eax,byte [bot_mode2]
250
	mov	[OpenDialog_data.type],eax
251
	popa
252
; invoke OpenDialog
253
	push    dword OpenDialog_data
254
	call    [OpenDialog_Start]
255
 
256
	cmp	[OpenDialog_data.status],1
257
	jne	.3
258
 
259
	pusha
260
	mov	edi,tb_opensave.text
261
	mov	esi,[OpenDialog_data.openfile_pach]
262
	call	copy_str_1
263
	sub	edi,tb_opensave.text
264
	dec	edi
265
	mov	eax,edi
266
	mov	[tb_opensave.length],al
267
	popa
268
 
269
	cmp	[bot_mode2],0
270
	je	.2
271
	call	save_file
272
	jmp	.3
273
.2:
274
	call	load_file
275
.3:
276
	mov	[open_dialog],0
277
	jmp	red
122 diamond 278
;-----------------------------------------------------------------------------
1624 mario79 279
draw_window_for_OD:
280
	call	drawwindow
281
	call	draw_statusbar
282
	ret
283
;-----------------------------------------------------------------------------
3265 mario79 284
check_active_process_for_clear_all_flags:
285
	push	eax
286
	mcall	18,7
287
	cmp	[active_process],eax
288
	je	.exit
289
 
290
	xor	eax,eax
291
	mov	[win_key_flag],al
292
;--------------------------------------
293
.exit:
294
	pop	eax
295
	ret
296
;-----------------------------------------------------------------------------
1624 mario79 297
copy_str_2:
298
	cld
299
	push	esi ecx
300
	rep	movsb	; edi  openfile_pach
301
	xor	eax,eax
302
	mov	[edi],al
303
	pop	ecx esi
304
	mov	edi,ebx
305
	rep	movsb	; edi opendir_pach
306
	mov	[edi],al
307
	mov	esi,edi
308
	std
309
@@:
310
	lodsb
311
	cmp	al,byte '/'
312
	jne	@b
313
	inc	esi
314
	xor	eax,eax
315
	mov	[esi],al
316
	inc	esi
317
	mov	edi,edx	; edi filename_area
318
	call	copy_str_1
319
	ret
320
;-----------------------------------------------------------------------------
321
copy_str_1:
322
	xor	eax,eax
323
	cld
324
@@:
325
	lodsb
326
	stosb
327
	test	eax,eax
328
	jnz	@b
329
	ret
330
;-----------------------------------------------------------------------------
617 mikedld 331
proc get_event ctx ;//////////////////////////////////////////////////////////
122 diamond 332
;-----------------------------------------------------------------------------
617 mikedld 333
	mcall	10
334
	dec	eax	; redraw ?
335
	jz	.redraw
336
	dec	eax	; key ?
337
	jz	.key
338
	dec	eax	; button ?
339
	jz	.button
340
	sub	eax,2	; background ?
341
	jz	.background
342
	dec	eax	; mouse ?
343
	jz	.mouse
344
	dec	eax	; ipc ?
345
	jz	.ipc
346
	dec	eax	; network ?
347
	jz	.network
348
	dec	eax	; debug ?
349
	jz	.debug
350
	sub	eax,7	; irq ?
351
	js	.nothing
352
	cmp	eax,15
353
	jg	.nothing
354
	jmp	.irq
355
 
356
  .nothing:
357
	mov	eax,EV_IDLE
358
	ret
359
 
360
  .redraw:
361
	mov	eax,EV_REDRAW
362
	ret
363
 
364
  .key:
365
	mov	eax,EV_KEY
366
	ret
367
 
368
  .button:
369
	mov	eax,EV_BUTTON
370
	ret
371
 
372
  .background:
373
	mov	eax,EV_BACKGROUND
374
	ret
375
 
376
  .mouse:
377
	mov	eax,EV_MOUSE
378
	ret
379
 
380
  .ipc:
381
	mov	eax,EV_IPC
382
	ret
383
 
384
  .network:
385
	mov	eax,EV_NETWORK
386
	ret
387
 
388
  .debug:
389
	mov	eax,EV_DEBUG
390
	ret
391
endp
392
 
393
;-----------------------------------------------------------------------------
987 mikedld 394
proc load_settings ;//////////////////////////////////////////////////////////
395
;-----------------------------------------------------------------------------
396
	pushad
397
 
398
	invoke	ini.get_int,ini_path,ini_sec_options,ini_options_tabs_pos,2
399
	mov	[tabs_pos],al
400
	invoke	ini.get_int,ini_path,ini_sec_options,ini_options_secure_sel,0
401
	mov	[secure_sel],al
402
	invoke	ini.get_int,ini_path,ini_sec_options,ini_options_auto_braces,0
403
	mov	[auto_braces],al
404
	invoke	ini.get_int,ini_path,ini_sec_options,ini_options_auto_indent,1
405
	mov	[auto_indent],al
406
	invoke	ini.get_int,ini_path,ini_sec_options,ini_options_smart_tab,1
407
	mov	[smart_tab],al
408
	invoke	ini.get_int,ini_path,ini_sec_options,ini_options_optim_save,1
409
	mov	[optim_save],al
410
	invoke	ini.get_int,ini_path,ini_sec_options,ini_options_line_nums,0
411
	mov	[line_nums],al
412
 
413
	invoke	ini.get_color,ini_path,ini_sec_colors,ini_colors_text,0x00000000
414
	mov	[color_tbl.text],eax
415
	invoke	ini.get_color,ini_path,ini_sec_colors,ini_colors_back,0x00ffffff
416
	mov	[color_tbl.back],eax
417
	invoke	ini.get_color,ini_path,ini_sec_colors,ini_colors_text_sel,0x00ffffff
418
	mov	[color_tbl.text.sel],eax
419
	invoke	ini.get_color,ini_path,ini_sec_colors,ini_colors_back_sel,0x000a246a
420
	mov	[color_tbl.back.sel],eax
421
	invoke	ini.get_color,ini_path,ini_sec_colors,ini_colors_symbol,0x003030f0
422
	mov	[color_tbl.symbol],eax
423
	invoke	ini.get_color,ini_path,ini_sec_colors,ini_colors_number,0x00009000
424
	mov	[color_tbl.number],eax
425
	invoke	ini.get_color,ini_path,ini_sec_colors,ini_colors_string,0x00b00000
426
	mov	[color_tbl.string],eax
427
	invoke	ini.get_color,ini_path,ini_sec_colors,ini_colors_comment,0x00808080
428
	mov	[color_tbl.comment],eax
429
	invoke	ini.get_color,ini_path,ini_sec_colors,ini_colors_line_moded,0x00ffee62
430
	mov	[color_tbl.line.moded],eax
431
	invoke	ini.get_color,ini_path,ini_sec_colors,ini_colors_line_saved,0x006ce26c
432
	mov	[color_tbl.line.saved],eax
433
 
434
	invoke	ini.get_int,ini_path,ini_sec_window,ini_window_left,250
435
	mov	[mainwnd_pos.x],eax
436
	invoke	ini.get_int,ini_path,ini_sec_window,ini_window_top,75
437
	mov	[mainwnd_pos.y],eax
438
	invoke	ini.get_int,ini_path,ini_sec_window,ini_window_width,6*80+6+SCRLW+5
439
	mov	[mainwnd_pos.w],eax
440
	invoke	ini.get_int,ini_path,ini_sec_window,ini_window_height,402
441
	mov	[mainwnd_pos.h],eax
442
 
443
	popad
444
	ret
445
endp
446
 
447
;-----------------------------------------------------------------------------
448
proc save_settings ;//////////////////////////////////////////////////////////
449
;-----------------------------------------------------------------------------
450
	pushad
451
 
452
	movzx	eax,[tabs_pos]
453
	invoke	ini.set_int,ini_path,ini_sec_options,ini_options_tabs_pos,eax
454
	movzx	eax,[secure_sel]
455
	invoke	ini.set_int,ini_path,ini_sec_options,ini_options_secure_sel,eax
456
	movzx	eax,[auto_braces]
457
	invoke	ini.set_int,ini_path,ini_sec_options,ini_options_auto_braces,eax
458
	movzx	eax,[auto_indent]
459
	invoke	ini.set_int,ini_path,ini_sec_options,ini_options_auto_indent,eax
460
	movzx	eax,[smart_tab]
461
	invoke	ini.set_int,ini_path,ini_sec_options,ini_options_smart_tab,eax
462
	movzx	eax,[optim_save]
463
	invoke	ini.set_int,ini_path,ini_sec_options,ini_options_optim_save,eax
464
	movzx	eax,[line_nums]
465
	invoke	ini.set_int,ini_path,ini_sec_options,ini_options_line_nums,eax
466
 
467
	invoke	ini.set_color,ini_path,ini_sec_colors,ini_colors_text,[color_tbl.text]
468
	invoke	ini.set_color,ini_path,ini_sec_colors,ini_colors_back,[color_tbl.back]
469
	invoke	ini.set_color,ini_path,ini_sec_colors,ini_colors_text_sel,[color_tbl.text.sel]
470
	invoke	ini.set_color,ini_path,ini_sec_colors,ini_colors_back_sel,[color_tbl.back.sel]
471
	invoke	ini.set_color,ini_path,ini_sec_colors,ini_colors_symbol,[color_tbl.symbol]
472
	invoke	ini.set_color,ini_path,ini_sec_colors,ini_colors_number,[color_tbl.number]
473
	invoke	ini.set_color,ini_path,ini_sec_colors,ini_colors_string,[color_tbl.string]
474
	invoke	ini.set_color,ini_path,ini_sec_colors,ini_colors_comment,[color_tbl.comment]
475
	invoke	ini.set_color,ini_path,ini_sec_colors,ini_colors_line_moded,[color_tbl.line.moded]
476
	invoke	ini.set_color,ini_path,ini_sec_colors,ini_colors_line_saved,[color_tbl.line.saved]
477
 
478
	invoke	ini.set_int,ini_path,ini_sec_window,ini_window_left,[mainwnd_pos.x]
479
	invoke	ini.set_int,ini_path,ini_sec_window,ini_window_top,[mainwnd_pos.y]
480
	invoke	ini.set_int,ini_path,ini_sec_window,ini_window_width,[mainwnd_pos.w]
481
	invoke	ini.set_int,ini_path,ini_sec_window,ini_window_height,[mainwnd_pos.h]
482
 
483
	popad
484
	ret
485
endp
486
 
487
;-----------------------------------------------------------------------------
617 mikedld 488
proc start_fasm ;/////////////////////////////////////////////////////////////
489
;-----------------------------------------------------------------------------
31 halyavin 490
; BL = run after compile
122 diamond 491
;-----------------------------------------------------------------------------
297 mikedld 492
; FASM infile,outfile,/path/to/files[,run]
493
;-----------------------------------------------------------------------------
494
	cmp	[cur_editor.AsmMode],0
258 mikedld 495
	jne	@f
496
	ret
297 mikedld 497
    @@:
498
	mov	eax,[tab_bar.Default.Ptr]
499
	or	eax,eax
500
	jnz	@f
501
	mov	eax,[tab_bar.Current.Ptr]
502
    @@: cmp	byte[eax+TABITEM.Editor.FilePath],'/'
503
	je	@f
504
	ret
505
    @@:
258 mikedld 506
	mov	edi,fasm_parameters
297 mikedld 507
	push	eax
31 halyavin 508
 
297 mikedld 509
	cld
31 halyavin 510
 
297 mikedld 511
	lea	esi,[eax+TABITEM.Editor.FilePath]
512
	add	esi,[eax+TABITEM.Editor.FileName]
513
	push	esi esi
514
    @@: lodsb
515
	cmp	al,0
516
	je	@f
258 mikedld 517
	stosb
297 mikedld 518
	cmp	al,'.'
519
	jne	@b
520
	mov	ecx,esi
521
	jmp	@b
522
    @@:
258 mikedld 523
	mov	al,','
524
	stosb
31 halyavin 525
 
297 mikedld 526
	pop	esi
527
	sub	ecx,esi
528
	dec	ecx
529
	jz	@f
258 mikedld 530
	rep	movsb
297 mikedld 531
    @@:
258 mikedld 532
	mov	al,','
533
	stosb
31 halyavin 534
 
258 mikedld 535
	pop	ecx esi
297 mikedld 536
	add	esi,TABITEM.Editor.FilePath
537
	sub	ecx,esi
258 mikedld 538
	rep	movsb
31 halyavin 539
 
297 mikedld 540
	cmp	bl,0 ; run outfile ?
541
	je	@f
542
	mov	dword[edi],',run'
543
	add	edi,4
544
    @@:
258 mikedld 545
	mov	al,0
546
	stosb
31 halyavin 547
 
297 mikedld 548
	mov	[app_start.filename],app_fasm
549
	mov	[app_start.params],fasm_parameters
178 heavyiron 550
start_ret:
297 mikedld 551
	mcall	70,app_start
258 mikedld 552
	ret
617 mikedld 553
endp
31 halyavin 554
 
122 diamond 555
;-----------------------------------------------------------------------------
617 mikedld 556
proc open_debug_board ;///////////////////////////////////////////////////////
122 diamond 557
;-----------------------------------------------------------------------------
297 mikedld 558
	mov	[app_start.filename],app_board
559
	mov	[app_start.params],0
258 mikedld 560
	jmp	start_ret
617 mikedld 561
endp
31 halyavin 562
 
122 diamond 563
;-----------------------------------------------------------------------------
617 mikedld 564
proc open_sysfuncs_txt ;//////////////////////////////////////////////////////
122 diamond 565
;-----------------------------------------------------------------------------
297 mikedld 566
	mov	[app_start.filename],app_docpak
567
	mov	[app_start.params],sysfuncs_param
258 mikedld 568
	call	start_ret
569
	cmp	eax,0xfffffff0
570
	jb	@f
297 mikedld 571
	mov	[app_start.filename],app_tinypad
572
	mov	[app_start.params],sysfuncs_filename
258 mikedld 573
	call	start_ret
122 diamond 574
    @@: ret
617 mikedld 575
endp
31 halyavin 576
 
297 mikedld 577
set_opt:
178 heavyiron 578
 
297 mikedld 579
  .dialog:
580
	mov	[bot_mode],1
581
	mov	[bot_dlg_height],128
582
	mov	[bot_dlg_handler],optsdlg_handler
583
	mov	[focused_tb],tb_color
584
	mov	al,[tb_color.length]
585
	mov	[tb_color.pos.x],al
586
	mov	[tb_color.sel.x],0
587
	mov	[tb_casesen],1
588
	mov	[cur_part],0
589
	m2m	[cur_color],dword[color_tbl.text]
590
	mov	esi,color_tbl
591
	mov	edi,cur_colors
592
	mov	ecx,10
593
	cld
594
	rep	movsd
595
	call	drawwindow
596
	ret
31 halyavin 597
 
259 mikedld 598
  .line_numbers:
987 mikedld 599
	xor	[line_nums],1
600
	ret
259 mikedld 601
  .optimal_fill:
987 mikedld 602
	xor	[optim_save],1
603
	ret
259 mikedld 604
  .auto_indents:
987 mikedld 605
	xor	[auto_indent],1
606
	ret
259 mikedld 607
  .auto_braces:
987 mikedld 608
	xor	[auto_braces],1
609
	ret
259 mikedld 610
  .secure_sel:
987 mikedld 611
	xor	[secure_sel],1
258 mikedld 612
	ret
31 halyavin 613
 
122 diamond 614
;-----------------------------------------------------------------------------
31 halyavin 615
 
617 mikedld 616
include 'data/tp-defines.inc'
259 mikedld 617
 
122 diamond 618
include 'tp-draw.asm'
619
include 'tp-key.asm'
258 mikedld 620
include 'tp-button.asm'
122 diamond 621
include 'tp-mouse.asm'
622
include 'tp-files.asm'
258 mikedld 623
include 'tp-common.asm'
624
include 'tp-dialog.asm'
122 diamond 625
include 'tp-popup.asm'
626
include 'tp-tbox.asm'
259 mikedld 627
include 'tp-tabctl.asm'
628
include 'tp-editor.asm'
258 mikedld 629
include 'tp-recode.asm'
31 halyavin 630
 
3014 dunkaist 631
include '../../../dll.inc'
178 heavyiron 632
 
31 halyavin 633
;-----------------------------------------------------------------------------
122 diamond 634
section @DATA ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
31 halyavin 635
;-----------------------------------------------------------------------------
636
 
827 mikedld 637
;include_debug_strings
638
 
617 mikedld 639
include 'data/tp-idata.inc'
31 halyavin 640
 
617 mikedld 641
;-----------------------------------------------------------------------------
642
section @IMPORT ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
643
;-----------------------------------------------------------------------------
31 halyavin 644
 
617 mikedld 645
library \
646
	libini,'libini.obj',\
647
	libio,'libio.obj',\
1624 mario79 648
	libgfx,'libgfx.obj',\
649
	proc_lib,'proc_lib.obj'
31 halyavin 650
 
617 mikedld 651
import	libini, \
1102 diamond 652
	ini.get_str  ,'ini_get_str',\
653
	ini.set_str  ,'ini_set_str',\
654
	ini.get_int  ,'ini_get_int',\
655
	ini.set_int  ,'ini_set_int',\
656
	ini.get_color,'ini_get_color',\
657
	ini.set_color,'ini_set_color'
31 halyavin 658
 
617 mikedld 659
import	libio, \
1102 diamond 660
	file.find_first,'file_find_first',\
661
	file.find_next ,'file_find_next',\
662
	file.find_close,'file_find_close',\
663
	file.size      ,'file_size',\
664
	file.open      ,'file_open',\
665
	file.read      ,'file_read',\
666
	file.write     ,'file_write',\
667
	file.seek      ,'file_seek',\
668
	file.tell      ,'file_tell',\
669
	file.eof?      ,'file_iseof',\
670
	file.truncate  ,'file_truncate',\
671
	file.close     ,'file_close'
31 halyavin 672
 
617 mikedld 673
import	libgfx, \
1102 diamond 674
	gfx.open	,'gfx_open',\
675
	gfx.close	,'gfx_close',\
676
	gfx.pen.color	,'gfx_pen_color',\
677
	gfx.brush.color ,'gfx_brush_color',\
678
	gfx.pixel	,'gfx_pixel',\
679
	gfx.move.to	,'gfx_move_to',\
680
	gfx.line.to	,'gfx_line_to',\
681
	gfx.line	,'gfx_line',\
682
	gfx.polyline	,'gfx_polyline',\
683
	gfx.polyline.to ,'gfx_polyline_to',\
684
	gfx.fillrect	,'gfx_fillrect',\
685
	gfx.fillrect.ex ,'gfx_fillrect_ex',\
686
	gfx.framerect	,'gfx_framerect',\
687
	gfx.framerect.ex,'gfx_framerect_ex',\
688
	gfx.rectangle	,'gfx_rectangle',\
689
	gfx.rectangle.ex,'gfx_rectangle_ex'
31 halyavin 690
 
1624 mario79 691
import	proc_lib, \
692
	OpenDialog_Init  ,'OpenDialog_init',\
693
	OpenDialog_Start  ,'OpenDialog_start'
694
 
258 mikedld 695
TINYPAD_END:	 ; end of file
122 diamond 696
 
31 halyavin 697
;-----------------------------------------------------------------------------
122 diamond 698
section @UDATA ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
31 halyavin 699
;-----------------------------------------------------------------------------
700
 
617 mikedld 701
include 'data/tp-udata.inc'
297 mikedld 702
 
31 halyavin 703
;-----------------------------------------------------------------------------
122 diamond 704
section @PARAMS ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
31 halyavin 705
;-----------------------------------------------------------------------------
706
 
707
fasm_parameters:
708
 
258 mikedld 709
p_info	process_information
122 diamond 710
p_info2 process_information
258 mikedld 711
sc	system_colors
122 diamond 712
 
987 mikedld 713
ini_path rb PATHL
714
 
1624 mario79 715
;---------------------------------------------------------------------
716
temp_dir_pach:
717
	rb 4096
718
;---------------------------------------------------------------------
719
fname_Info:
720
	rb 4096            ; filename
721
;---------------------------------------------------------------------
722
filename_area:
723
	rb 256
724
;---------------------------------------------------------------------
259 mikedld 725
rb 1024*4
726
MAIN_STACK:
727
rb 1024*4
728
POPUP_STACK:
729
 
730
STATIC_MEM_END:
731
 
732
diff10 'Main memory size',0,$