From: Jos v.d.V. <jo...@us...> - 2006-07-10 21:35:58
|
Update of /cvsroot/win32forth/win32forth/apps/SciEdit In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23399/apps/SciEdit Modified Files: ScintillaMDI.f Log Message: Jos: Repaired Scintilla Index: ScintillaMDI.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/SciEdit/ScintillaMDI.f,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ScintillaMDI.f 21 Jan 2006 08:59:41 -0000 1.8 --- ScintillaMDI.f 10 Jul 2006 21:35:55 -0000 1.9 *************** *** 33,41 **** int EnsureFinalNewLine? ! :M ?Modified: ( -- f ) ! GetModify: ChildWindow ;M ! :M GetFileType: ( -- n ) ! FT_SOURCE ;M fload ScintillaLexer.f --- 33,41 ---- int EnsureFinalNewLine? ! :M ?Modified: ( -- f ) ! GetModify: ChildWindow ;M ! :M GetFileType: ( -- n ) ! FT_SOURCE ;M fload ScintillaLexer.f *************** *** 74,81 **** WordChars count + dup 34 swap c! ( " ) char+ dup 39 swap c! ( ' ) char+ 0 swap c! ! :M Start: ( parent -- ) ! New> ScintillaControl to ChildWindow ! self to ChildParent ! Start: super 0 to FindMode true to CreateBackup? --- 74,81 ---- WordChars count + dup 34 swap c! ( " ) char+ dup 39 swap c! ( ' ) char+ 0 swap c! ! :M Start: ( parent -- ) ! New> ScintillaControl to ChildWindow ! self to ChildParent ! Start: super 0 to FindMode true to CreateBackup? *************** *** 84,91 **** FindText$ off InitLexer: self ! STYLE_DEFAULT z" Fixedsys" StyleSetFont: ChildWindow WordChars 1+ SetWordChars: ChildWindow ! ShowLineNumbers: ChildWindow \ Monday, August 16 2004 - EAB ! ;M :M GetFileName: ( -- addr ) --- 84,91 ---- FindText$ off InitLexer: self ! STYLE_DEFAULT z" Fixedsys" StyleSetFont: ChildWindow WordChars 1+ SetWordChars: ChildWindow ! ShowLineNumbers: ChildWindow \ Monday, August 16 2004 - EAB ! ;M :M GetFileName: ( -- addr ) *************** *** 100,104 **** :M SetFileName: ( addr len -- ) SetName: EditFile ! ;M : MessageBox ( n a1 n1 -- n2 ) --- 100,104 ---- :M SetFileName: ( addr len -- ) SetName: EditFile ! ;M : MessageBox ( n a1 n1 -- n2 ) *************** *** 113,117 **** : GetSaveFilename ( -- addr len ) GetHandle: self Start: SaveSourceFileDialog count ! ; \ pad place pad ?DEFEXT pad count ; \ add default extension (.f) if needed :M GetTextLength: ( -- n ) --- 113,117 ---- : GetSaveFilename ( -- addr len ) GetHandle: self Start: SaveSourceFileDialog count ! ; \ pad place pad ?DEFEXT pad count ; \ add default extension (.f) if needed :M GetTextLength: ( -- n ) *************** *** 254,258 **** CanUndo: ChildWindow ;M ! :M Undo: ( -- ) Undo: ChildWindow ;M --- 254,258 ---- CanUndo: ChildWindow ;M ! :M Undo: ( -- ) Undo: ChildWindow ;M *************** *** 260,270 **** CanRedo: ChildWindow ;M ! :M Redo: ( -- ) Redo: ChildWindow ;M ! :M Cut: ( -- ) Cut: ChildWindow ;M ! :M Copy: ( -- ) Copy: ChildWindow ;M --- 260,270 ---- CanRedo: ChildWindow ;M ! :M Redo: ( -- ) Redo: ChildWindow ;M ! :M Cut: ( -- ) Cut: ChildWindow ;M ! :M Copy: ( -- ) Copy: ChildWindow ;M *************** *** 272,293 **** CanPaste: ChildWindow ;M ! :M Paste: ( -- ) Paste: ChildWindow ;M ! :M SelectAll: ( -- ) SelectAll: ChildWindow ;M ! :M GotoLine: ( n -- ) ! GotoLine: ChildWindow ;M :M GetLineCount: ( -- n ) ! GetLineCount: ChildWindow ;M ! :M GetSelText: ( addr -- n ) \ *G Copy the selected text to the memory pointed by \i addr \d \ ** and return the length of the selected text (including terminating \ ** 0 byte. If \i addr \d is NULL no text is copied and only the \ ** length is returned. ! GetSelText: ChildWindow ;M :M EnableBackup: ( f -- ) --- 272,293 ---- CanPaste: ChildWindow ;M ! :M Paste: ( -- ) Paste: ChildWindow ;M ! :M SelectAll: ( -- ) SelectAll: ChildWindow ;M ! :M GotoLine: ( n -- ) ! GotoLine: ChildWindow ;M :M GetLineCount: ( -- n ) ! GetLineCount: ChildWindow ;M ! :M GetSelText: ( addr -- n ) \ *G Copy the selected text to the memory pointed by \i addr \d \ ** and return the length of the selected text (including terminating \ ** 0 byte. If \i addr \d is NULL no text is copied and only the \ ** length is returned. ! GetSelText: ChildWindow ;M :M EnableBackup: ( f -- ) *************** *** 310,322 **** SetWhiteSpace: ChildWindow ;M ! :M Colorize: ( f -- ) ! if SCLEX_FORTH ! else SCLEX_NULL ! then dup Lexer <> ! if dup to Lexer SetLexer: ChildWindow ! 0 -1 Colourise: ChildWindow ! else drop ! then ;M :M ViewLineNumbers: ( f -- ) --- 310,322 ---- SetWhiteSpace: ChildWindow ;M ! :M Colorize: ( f -- ) ! if SCLEX_FORTH ! else SCLEX_NULL ! then dup Lexer <> ! if dup to Lexer SetLexer: ChildWindow ! 0 -1 Colourise: ChildWindow ! else drop ! then ;M :M ViewLineNumbers: ( f -- ) *************** *** 405,412 **** :M SaveFileAs: ( -- ) \ save the file under a new name GetSaveFilename ?dup ! if SetFileName: self ! SaveText ! else drop ! then ;M : CreateBackup ( -- ) \ create a Backup of the active file (*.BAK) --- 405,412 ---- :M SaveFileAs: ( -- ) \ save the file under a new name GetSaveFilename ?dup ! if SetFileName: self ! SaveText ! else drop ! then ;M : CreateBackup ( -- ) \ create a Backup of the active file (*.BAK) *************** *** 475,479 **** \ ---------------------------------------------------------------------------- ! : DexBlock { addr \ FirstLine? -- } ?Selection: self if true to FirstLine? --- 475,479 ---- \ ---------------------------------------------------------------------------- ! : DexBlock { addr \ FirstLine? -- } ?Selection: self if true to FirstLine? *************** *** 493,509 **** then ; ! :M DexGlossary: ( -- ) \ *G Turn a block of lines into a Glossary entry. ! z" \ *G " DexBlock ;M :M DexParagraph: ( -- ) \ *G Turn a block of lines into a Paragraph. ! z" \ *P " DexBlock ;M :M DexCodeParagraph: ( -- ) \ *G Turn a block of lines into a Paragraph which is a code example. ! z" \ *E " DexBlock ;M ! : DexStyle { addr len \ slen $buf1 $buf2 -- } 0 GetSelText: ChildWindow dup to slen if slen LocalAlloc: $buf1 $buf1 GetSelText: ChildWindow --- 493,509 ---- then ; ! :M DexGlossary: ( -- ) \ *G Turn a block of lines into a Glossary entry. ! z" \ *G " DexBlock ;M :M DexParagraph: ( -- ) \ *G Turn a block of lines into a Paragraph. ! z" \ *P " DexBlock ;M :M DexCodeParagraph: ( -- ) \ *G Turn a block of lines into a Paragraph which is a code example. ! z" \ *E " DexBlock ;M ! : DexStyle { addr len \ slen $buf1 $buf2 -- } 0 GetSelText: ChildWindow dup to slen if slen LocalAlloc: $buf1 $buf1 GetSelText: ChildWindow *************** *** 539,575 **** \ ---------------------------------------------------------------------------- ! : OpenFile ( adr -- f ) \ f=false = file is opend ! dup count FILE-STATUS nip 0= ! if IDM_OPEN_RECENT_FILE DoCommand false ! else drop true ! then ; :m OpenHighlightedFile: { \ buf$ path$ org-path-ptr -- } ! 0 GetSelText: ChildWindow MAXSTRING CHARS < ! if MAXSTRING CHARS 1+ LocalAlloc: buf$ ! buf$ 1+ GetSelText: ChildWindow 1- 255 min buf$ c! \ try to open the file with the given path ! buf$ ?defext buf$ OpenFile ! if \ try to find the file in the folder of the current file buf$ count "to-pathend" pad place ! GetName: EditFile count "path-only" ! buf$ place buf$ ?+\ pad count buf$ +place ! buf$ OpenFile if \ search for the file in the Forth search path ! buf$ count "to-pathend" buf$ place ! path-ptr to org-path-ptr \ save search path ! MAXSTRING localAlloc: path$ \ set default search path ! path$ to path-ptr program-path-init ! buf$ count "path-file \ search through the Forth path ! org-path-ptr to path-ptr \ restore search path ! 0= if buf$ place buf$ IDM_OPEN_RECENT_FILE DoCommand ! else 2drop beep ! then ! then ! then ! else drop beep ! then ;M Record: scn \ struct SCNotification --- 539,572 ---- \ ---------------------------------------------------------------------------- ! : OpenFile ( adr -- f ) \ f=false = file is opend ! dup count FILE-STATUS nip 0= ! if IDM_OPEN_RECENT_FILE DoCommand false ! else drop true ! then ; :m OpenHighlightedFile: { \ buf$ path$ org-path-ptr -- } ! 0 GetSelText: ChildWindow MAXSTRING CHARS < ! if MAXSTRING CHARS 1+ LocalAlloc: buf$ ! buf$ 1+ GetSelText: ChildWindow 1- 255 min buf$ c! \ try to open the file with the given path ! buf$ ?defext buf$ OpenFile ! if \ try to find the file in the folder of the current file buf$ count "to-pathend" pad place ! GetName: EditFile count "path-only" ! buf$ place buf$ ?+\ pad count buf$ +place ! buf$ OpenFile if \ search for the file in the Forth search path ! buf$ count "to-pathend" buf$ place ! path-ptr program-path-init ! buf$ count "path-file \ search through the Forth path ! 0= if buf$ place buf$ IDM_OPEN_RECENT_FILE DoCommand ! else 2drop beep ! then ! then ! then ! else drop beep ! then ;M Record: scn \ struct SCNotification |