From: Jos v.d.V. <jo...@us...> - 2006-07-12 09:08:42
|
Update of /cvsroot/win32forth/win32forth/apps/Win32ForthIDE In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv12946/apps/Win32ForthIDE Modified Files: ScintillaMDI.f Log Message: Jos: Repaired OpenHighlightedFile: ( Note: duplicate file ) Index: ScintillaMDI.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/ScintillaMDI.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ScintillaMDI.f 5 Jun 2006 09:19:00 -0000 1.1 --- ScintillaMDI.f 12 Jul 2006 08:43:19 -0000 1.2 *************** *** 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 ) *************** *** 101,105 **** SetName: EditFile UpdateFileName: super ! ;M : MessageBox ( n a1 n1 -- n2 ) --- 101,105 ---- SetName: EditFile UpdateFileName: super ! ;M : MessageBox ( n a1 n1 -- n2 ) *************** *** 114,118 **** : GetSaveFilename ( -- addr len ) GetHandle: self Start: SaveSourceFileDialog count ! ; \ pad place pad ?DEFEXT pad count ; \ add default extension (.f) if needed :M GetTextLength: ( -- n ) --- 114,118 ---- : GetSaveFilename ( -- addr len ) GetHandle: self Start: SaveSourceFileDialog count ! ; \ pad place pad ?DEFEXT pad count ; \ add default extension (.f) if needed :M GetTextLength: ( -- n ) *************** *** 255,259 **** CanUndo: ChildWindow ;M ! :M Undo: ( -- ) Undo: ChildWindow ;M --- 255,259 ---- CanUndo: ChildWindow ;M ! :M Undo: ( -- ) Undo: ChildWindow ;M *************** *** 261,271 **** CanRedo: ChildWindow ;M ! :M Redo: ( -- ) Redo: ChildWindow ;M ! :M Cut: ( -- ) Cut: ChildWindow ;M ! :M Copy: ( -- ) Copy: ChildWindow ;M --- 261,271 ---- CanRedo: ChildWindow ;M ! :M Redo: ( -- ) Redo: ChildWindow ;M ! :M Cut: ( -- ) Cut: ChildWindow ;M ! :M Copy: ( -- ) Copy: ChildWindow ;M *************** *** 273,294 **** 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 -- ) --- 273,294 ---- 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 -- ) *************** *** 311,323 **** 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 -- ) --- 311,323 ---- 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 -- ) *************** *** 406,413 **** :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) --- 406,413 ---- :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) *************** *** 481,485 **** \ ---------------------------------------------------------------------------- ! : DexBlock { addr \ FirstLine? -- } ?Selection: self if true to FirstLine? --- 481,485 ---- \ ---------------------------------------------------------------------------- ! : DexBlock { addr \ FirstLine? -- } ?Selection: self if true to FirstLine? *************** *** 499,515 **** 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 --- 499,515 ---- 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 *************** *** 545,581 **** \ ---------------------------------------------------------------------------- ! : 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 --- 545,578 ---- \ ---------------------------------------------------------------------------- ! : 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 |