Subversion Repositories Kolibri OS

Rev

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

Rev 312 Rev 617
Line 1... Line 1...
1
;-----------------------------------------------------------------------------
1
;-----------------------------------------------------------------------------
2
func draw_editor ;///// DRAW EDITOR //////////////////////////////////////////
2
proc draw_editor ;///// DRAW EDITOR //////////////////////////////////////////
3
;-----------------------------------------------------------------------------
3
;-----------------------------------------------------------------------------
Line 4... Line 4...
4
 
4
 
5
	mov	ebx,[cur_editor.Bounds.Left-2]
5
	mov	ebx,[cur_editor.Bounds.Left-2]
6
	mov	bx,word[cur_editor.Bounds.Right]
6
	mov	bx,word[cur_editor.Bounds.Right]
Line 59... Line 59...
59
	call	draw_editor_caret
59
	call	draw_editor_caret
60
 
60
 
Line 61... Line 61...
61
  .exit:
61
  .exit:
62
	ret
62
	ret
63
endf
63
endp
Line 64... Line 64...
64
 
64
 
65
;-----------------------------------------------------------------------------
65
;-----------------------------------------------------------------------------
66
func draw_editor_gutter ;///// DRAW EDITOR GUTTER (LEFT PANEL) ///////////////
66
proc draw_editor_gutter ;///// DRAW EDITOR GUTTER (LEFT PANEL) ///////////////
67
;-----------------------------------------------------------------------------
67
;-----------------------------------------------------------------------------
68
	cmp	[cur_editor.Gutter.Visible],0
68
	cmp	[cur_editor.Gutter.Visible],0
Line 69... Line 69...
69
	je	.exit
69
	je	.exit
Line 119... Line 119...
119
    @@: add	esp,4*8*2
119
    @@: add	esp,4*8*2
120
 
120
 
Line 121... Line 121...
121
  .exit:
121
  .exit:
122
	ret
122
	ret
123
endf
123
endp
Line 124... Line 124...
124
 
124
 
125
;-----------------------------------------------------------------------------
125
;-----------------------------------------------------------------------------
126
func draw_editor_vscroll ;///// DRAW EDITOR VERTICAL SCROLL BAR //////////////
126
proc draw_editor_vscroll ;///// DRAW EDITOR VERTICAL SCROLL BAR //////////////
127
;-----------------------------------------------------------------------------
127
;-----------------------------------------------------------------------------
128
	mov	ebx,[cur_editor.Bounds.Right]
128
	mov	ebx,[cur_editor.Bounds.Right]
129
	shl	ebx,16
129
	shl	ebx,16
130
	add	ebx,(-SCRLW)*65536+SCRLW
130
	add	ebx,(-SCRLW)*65536+SCRLW
Line 228... Line 228...
228
	add	ecx,(SCRLW)*65536-SCRLW*2-1
228
	add	ecx,(SCRLW)*65536-SCRLW*2-1
229
	mcall	38,,,[cl_3d_inset]
229
	mcall	38,,,[cl_3d_inset]
230
 
230
 
Line 231... Line 231...
231
	ret
231
	ret
232
endf
232
endp
Line 233... Line 233...
233
 
233
 
234
;-----------------------------------------------------------------------------
234
;-----------------------------------------------------------------------------
235
func draw_editor_hscroll ;///// DRAW EDITOR HORIZONTAL SCROLL BAR ////////////
235
proc draw_editor_hscroll ;///// DRAW EDITOR HORIZONTAL SCROLL BAR ////////////
236
;-----------------------------------------------------------------------------
236
;-----------------------------------------------------------------------------
237
	mov	ebx,[cur_editor.Bounds.Left-2]
237
	mov	ebx,[cur_editor.Bounds.Left-2]
238
	mov	bx,SCRLW
238
	mov	bx,SCRLW
239
	mov	ecx,[cur_editor.Bounds.Bottom]
239
	mov	ecx,[cur_editor.Bounds.Bottom]
Line 336... Line 336...
336
	pop	cx
336
	pop	cx
337
	mcall	38,,,[cl_3d_inset]
337
	mcall	38,,,[cl_3d_inset]
338
 
338
 
Line 339... Line 339...
339
	ret
339
	ret
340
endf
340
endp
Line 341... Line 341...
341
 
341
 
342
;-----------------------------------------------------------------------------
342
;-----------------------------------------------------------------------------
343
func draw_editor_text.part ;///// DRAW EDITOR TEXT (PARTLY) //////////////////
343
proc draw_editor_text.part ;///// DRAW EDITOR TEXT (PARTLY) //////////////////
344
;-----------------------------------------------------------------------------
344
;-----------------------------------------------------------------------------
345
; EAX = start line
345
; EAX = start line
346
; EBX = end line
346
; EBX = end line
347
;-----------------------------------------------------------------------------
347
;-----------------------------------------------------------------------------
Line 412... Line 412...
412
 
412
 
Line 413... Line 413...
413
  .exit:
413
  .exit:
414
	popad
414
	popad
415
	ret
415
	ret
416
endf
416
endp
Line 417... Line 417...
417
 
417
 
418
;-----------------------------------------------------------------------------
418
;-----------------------------------------------------------------------------
419
func draw_editor_text ;///// DRAW EDITOR TEXT ////////////////////////////////
419
proc draw_editor_text ;///// DRAW EDITOR TEXT ////////////////////////////////
420
;-----------------------------------------------------------------------------
420
;-----------------------------------------------------------------------------
421
	cmp	[cur_editor.Lines],0
421
	cmp	[cur_editor.Lines],0
422
	jne	@f
422
	jne	@f
423
	ret
423
	ret
Line 806... Line 806...
806
  .exit.2:
806
  .exit.2:
807
	popad
807
	popad
808
	add	esp,4
808
	add	esp,4
809
	ret
809
	ret
810
endf
810
endp
Line 811... Line 811...
811
 
811
 
812
;-----------------------------------------------------------------------------
812
;-----------------------------------------------------------------------------
813
func draw_editor_text.get_next_part ;/////////////////////////////////////////
813
proc draw_editor_text.get_next_part ;/////////////////////////////////////////
814
;-----------------------------------------------------------------------------
814
;-----------------------------------------------------------------------------
815
; Input:
815
; Input:
816
;  ECX = current letter
816
;  ECX = current letter
817
;  ESI = string
817
;  ESI = string
Line 924... Line 924...
924
	xchg	edx,esi
924
	xchg	edx,esi
925
	mov	ecx,[cur_line_len]
925
	mov	ecx,[cur_line_len]
926
	mov	eax,[color_tbl.text]
926
	mov	eax,[color_tbl.text]
927
	ret
927
	ret
928
endf
928
endp
929
 
929
 
Line 930... Line 930...
930
;-----------------------------------------------------------------------------
930
;-----------------------------------------------------------------------------
931
func draw_editor_caret ;///// DRAW EDITOR TEXT CARET /////////////////////////
931
proc draw_editor_caret ;///// DRAW EDITOR TEXT CARET /////////////////////////
932
;-----------------------------------------------------------------------------
932
;-----------------------------------------------------------------------------
933
	cmp	[bot_mode],0
933
	cmp	[bot_mode],0
934
	jne	@f
934
	jne	@f
935
	mov	ebx,[cur_editor.Caret.X]
935
	mov	ebx,[cur_editor.Caret.X]
936
	sub	ebx,[cur_editor.TopLeft.X]
936
	sub	ebx,[cur_editor.TopLeft.X]
Line 964... Line 964...
964
	pop	ecx
964
	pop	ecx
965
	loop	.lp8
965
	loop	.lp8
966
    @@:
966
    @@:
967
	ret
967
	ret
968
endf
968
endp
969
 
969
 
Line 970... Line 970...
970
;-----------------------------------------------------------------------------
970
;-----------------------------------------------------------------------------
971
func editor_realloc_lines ;///// ADD $DELTA$ TO LINES SIZE ///////////////////
971
proc editor_realloc_lines ;///// ADD $DELTA$ TO LINES SIZE ///////////////////
972
;-----------------------------------------------------------------------------
972
;-----------------------------------------------------------------------------
973
; EAX = delta
973
; EAX = delta
974
;-----------------------------------------------------------------------------
974
;-----------------------------------------------------------------------------
975
	push	ebx ecx
975
	push	ebx ecx
976
	mov	ebx,[cur_editor.Lines.Size]
976
	mov	ebx,[cur_editor.Lines.Size]
977
	add	ebx,eax
977
	add	ebx,eax
978
	mov	eax,[cur_editor.Lines]
978
	mov	eax,[cur_editor.Lines]
979
	mov	[cur_editor.Lines.Size],ebx
979
	mov	[cur_editor.Lines.Size],ebx
980
	mov	ecx,eax
980
	mov	ecx,eax
981
	call	mem.ReAlloc
981
	stdcall	mem.ReAlloc,eax,ebx
982
	mov	[cur_editor.Lines],eax
982
	mov	[cur_editor.Lines],eax
983
	sub	eax,ecx
983
	sub	eax,ecx
984
	pop	ecx ebx
984
	pop	ecx ebx
985
	ret
985
	ret
986
endf
986
endp
Line 987... Line 987...
987
 
987
 
988
REDRAW_TEXT	 = 00000001b
988
REDRAW_TEXT	 = 00000001b
989
REDRAW_HSCROLL	 = 00000010b
989
REDRAW_HSCROLL	 = 00000010b
990
REDRAW_VSCROLL	 = 00000100b
990
REDRAW_VSCROLL	 = 00000100b
991
REDRAW_ONELINE	 = 00001000b
991
REDRAW_ONELINE	 = 00001000b
Line 992... Line 992...
992
REDRAW_TWOLINES  = 00010000b
992
REDRAW_TWOLINES  = 00010000b
993
 
993
 
994
;-----------------------------------------------------------------------------
994
;-----------------------------------------------------------------------------
995
func editor_check_for_changes ;///// EDITOR CHANGES CHECKER //////////////////
995
proc editor_check_for_changes ;///// EDITOR CHANGES CHECKER //////////////////
996
;-----------------------------------------------------------------------------
996
;-----------------------------------------------------------------------------
997
	call	.check_cursor_visibility
997
	call	.check_cursor_visibility
Line 1179... Line 1179...
1179
	push	[cur_editor.Caret.X] [cur_editor.Caret.Y]
1179
	push	[cur_editor.Caret.X] [cur_editor.Caret.Y]
1180
	pop	[cur_editor.SelStart.Y] [cur_editor.SelStart.X]
1180
	pop	[cur_editor.SelStart.Y] [cur_editor.SelStart.X]
1181
    @@: pop	ebx eax
1181
    @@: pop	ebx eax
1182
	ret
1182
	ret
1183
endf
1183
endp
1184
1184