Rev 71 | Rev 75 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 71 | Rev 72 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | unit EditorMain; |
1 | unit EditorMain; |
2 | 2 | ||
3 | {$Include 'FastPHP.inc'} |
3 | {$Include 'FastPHP.inc'} |
4 | 4 | ||
5 | // TODO 70423 * <fastphp> bug beheben, bei dem php.exe im hintergrund geöffnet bleibt, wenn man den editor schließt !!!!!!!!! |
- | |
6 | - | ||
7 | (* |
5 | (* |
8 | This program requires |
6 | This program requires |
9 | - Microsoft Internet Controls (TWebBrowser) |
7 | - Microsoft Internet Controls (TWebBrowser) |
10 | If you are using Delphi 10.1 Starter Edition, please import the ActiveX TLB |
8 | If you are using Delphi 10.1 Starter Edition, please import the ActiveX TLB |
11 | "Microsoft Internet Controls" |
9 | "Microsoft Internet Controls" |
12 | - SynEdit |
10 | - SynEdit |
13 | You can obtain SynEdit via Embarcadero GetIt |
11 | You can obtain SynEdit via Embarcadero GetIt |
14 | *) |
12 | *) |
15 | 13 | ||
- | 14 | // TODO: if a scrapfile is already open, create a new scrap file (scrap2.php) |
|
16 | // TODO: localize |
15 | // TODO: localize |
17 | // TODO: wieso geht copy paste im twebbrowser nicht??? |
16 | // TODO: wieso geht copy paste im twebbrowser nicht??? |
18 | // TODO: Wieso dauert webbrowser1 erste kompilierung so lange??? |
17 | // TODO: Wieso dauert webbrowser1 erste kompilierung so lange??? |
19 | // TODO: wieso kommt syntax fehler zweimal? einmal stderr einmal stdout? |
18 | // TODO: wieso kommt syntax fehler zweimal? einmal stderr einmal stdout? |
20 | // TODO: Browser titlebar (link preview) |
19 | // TODO: Browser titlebar (link preview) |
Line 30... | Line 29... | ||
30 | // - webbrowser1 nur laden, wenn man den tab anwählt? |
29 | // - webbrowser1 nur laden, wenn man den tab anwählt? |
31 | // - doppelklick auf tab soll diesen schließen |
30 | // - doppelklick auf tab soll diesen schließen |
32 | // - Onlinehelp (www) aufrufen |
31 | // - Onlinehelp (www) aufrufen |
33 | // - Let all colors be adjustable |
32 | // - Let all colors be adjustable |
34 | // - code in bildschirmmitte (horizontal)? |
33 | // - code in bildschirmmitte (horizontal)? |
- | 34 | // - search in files of a directory |
|
- | 35 | // - multi tab? |
|
- | 36 | // - DDE (drag n drop) |
|
- | 37 | // - check if file has been modified in another application |
|
35 | 38 | ||
36 | interface |
39 | interface |
37 | 40 | ||
38 | uses |
41 | uses |
39 | // TODO: "{$IFDEF USE_SHDOCVW_TLB}_TLB{$ENDIF}" does not work with Delphi 10.2 |
42 | // TODO: "{$IFDEF USE_SHDOCVW_TLB}_TLB{$ENDIF}" does not work with Delphi 10.2 |
Line 452... | Line 455... | ||
452 | 455 | ||
453 | // TODO 70421 * <fastphp> flush() mittels ContentCallBack implementieren... ich möchte bei langen scripts statusanzeigen realisieren können mit javascript das stück für stück geladen wird !!!!!!!! |
456 | // TODO 70421 * <fastphp> flush() mittels ContentCallBack implementieren... ich möchte bei langen scripts statusanzeigen realisieren können mit javascript das stück für stück geladen wird !!!!!!!! |
454 | // TODO 70422 * <fastphp> wenn ein script hängt, soll man es abwürgen dürfen!!!!!! |
457 | // TODO 70422 * <fastphp> wenn ein script hängt, soll man es abwürgen dürfen!!!!!! |
455 | memo2.Lines.Text := RunPHPScript(GetScrapFile, Sender=ActionLint, False); |
458 | memo2.Lines.Text := RunPHPScript(GetScrapFile, Sender=ActionLint, False); |
456 | 459 | ||
457 | - | ||
- | 460 | {$REGION 'Show in Web Browser'} |
|
458 | // Webbrowser1.LoadHTML(MarkUpLineReference(memo2.Lines.Text), GetScrapFile); |
461 | Webbrowser1.LoadHTML(MarkUpLineReference(memo2.Lines.Text), GetScrapFile); |
459 | 462 | ||
460 | // Alternatively: |
463 | // Alternatively: |
461 | (* |
464 | (* |
462 | ss := TstringStream.Create; |
465 | ss := TstringStream.Create; |
463 | ss.WriteString(MarkUpLineReference(memo2.Lines.Text)); |
466 | ss.WriteString(MarkUpLineReference(memo2.Lines.Text)); |
464 | ss.Position := 0; |
467 | ss.Position := 0; |
465 | Webbrowser1.LoadStream(ss, GetScrapFile); |
468 | Webbrowser1.LoadStream(ss, GetScrapFile); |
466 | Webbrowser1.Wait; |
469 | Webbrowser1.Wait; |
467 | ss.Free; |
470 | ss.Free; |
468 | *) |
471 | *) |
- | 472 | {$ENDREGION} |
|
469 | 473 | ||
470 | if IsTextHTML(memo2.lines.text) then |
474 | if IsTextHTML(memo2.lines.text) then |
471 | PageControl1.ActivePage := HtmlTabSheet |
475 | PageControl1.ActivePage := HtmlTabSheet |
472 | else |
476 | else |
473 | PageControl1.ActivePage := PlaintextTabSheet; |
477 | PageControl1.ActivePage := PlaintextTabSheet; |
Line 1258... | Line 1262... | ||
1258 | Originalword := w; |
1262 | Originalword := w; |
1259 | // w := StringReplace(w, '_', '-', [rfReplaceAll]); |
1263 | // w := StringReplace(w, '_', '-', [rfReplaceAll]); |
1260 | w := LowerCase(w); |
1264 | w := LowerCase(w); |
1261 | CurSearchTerm := w; |
1265 | CurSearchTerm := w; |
1262 | 1266 | ||
- | 1267 | internalHtmlFile := ChmIndex.ReadString('function', CurSearchTerm, ''); |
|
- | 1268 | if internalHtmlFile = '' then |
|
1263 | internalHtmlFile := ChmIndex.ReadString('_HelpWords_', CurSearchTerm, ''); |
1269 | internalHtmlFile := ChmIndex.ReadString('_HelpWords_', CurSearchTerm, ''); |
1264 | if internalHtmlFile = '' then |
1270 | if internalHtmlFile = '' then |
1265 | begin |
1271 | begin |
1266 | HelpTabsheet.TabVisible := false; |
1272 | HelpTabsheet.TabVisible := false; |
1267 | HlpPrevPageIndex := -1; |
1273 | HlpPrevPageIndex := -1; |