Subversion Repositories fastphp

Compare Revisions

Regard whitespace Rev 88 → Rev 89

/trunk/EditorMain.dfm
135,10 → 135,11
Gutter.Gradient = True
Gutter.GradientStartColor = cl3DLight
Highlighter = SynPHPSyn1
Options = [eoAutoIndent, eoDragDropEditing, eoEnhanceHomeKey, eoEnhanceEndKey, eoGroupUndo, eoHideShowScrollbars, eoKeepCaretX, eoScrollByOneLess, eoShowScrollHint, eoTabIndent]
Options = [eoAutoIndent, eoDragDropEditing, eoDropFiles, eoEnhanceHomeKey, eoEnhanceEndKey, eoGroupUndo, eoHideShowScrollbars, eoKeepCaretX, eoScrollByOneLess, eoShowScrollHint, eoTabIndent]
SearchEngine = SynEditSearch1
WantTabs = True
OnChange = SynEdit1Change
OnDropFiles = SynEdit1DropFiles
OnGutterClick = SynEdit1GutterClick
OnMouseCursor = SynEdit1MouseCursor
OnPaintTransient = SynEdit1PaintTransient
/trunk/EditorMain.pas
176,6 → 176,8
procedure FileModTimerTimer(Sender: TObject);
procedure GotoPHPdir1Click(Sender: TObject);
procedure PHPShell1Click(Sender: TObject);
procedure SynEdit1DropFiles(Sender: TObject; X, Y: Integer;
AFiles: TStrings);
private
hMutex: THandle;
CurSearchTerm: string;
189,7 → 191,6
function InputRequestCallback(var data: AnsiString): boolean;
function OutputNotifyCallback(const data: AnsiString): boolean;
procedure RightTrimAll;
procedure WMDropFiles(var Msg: TWMDropFiles); message WM_DROPFILES;
protected
ChmIndex: TMemIniFile;
FScrapFile: string;
514,6 → 515,25
RefreshModifySign;
end;
 
procedure TForm1.SynEdit1DropFiles(Sender: TObject; X, Y: Integer;
AFiles: TStrings);
var
FileName: string;
const
WARN_FILE_COUNT = 10;
begin
if AFiles.Count > WARN_FILE_COUNT then
begin
if not MessageDlg(Format('Are you sure you want to open %d files?', [WARN_FILE_COUNT]), mtConfirmation, mbYesNoCancel, 0) <> mrYes then
exit;
end;
 
for FileName in AFiles do
begin
ShellExecute(0, 'open', PChar(ParamStr(0)), PChar('"' + FileName + '"'), '', SW_NORMAL);
end;
end;
 
procedure TForm1.SynEdit1GutterClick(Sender: TObject; Button: TMouseButton; X,
Y, Line: Integer; Mark: TSynEditMark);
begin
826,46 → 846,6
Cancel := true;
end;
 
procedure TForm1.WMDropFiles(var Msg: TWMDropFiles);
var
DropH: HDROP; // drop handle
DroppedFileCount: Integer; // number of files dropped
FileNameLength: Integer; // length of a dropped file name
FileName: string; // a dropped file name
I: Integer; // loops thru all dropped files
DropPoint: TPoint; // point where files dropped
begin
inherited;
// Store drop handle from the message
DropH := Msg.Drop;
try
// Get count of files dropped
DroppedFileCount := DragQueryFile(DropH, $FFFFFFFF, nil, 0);
// Get name of each file dropped and process it
for I := 0 to Pred(DroppedFileCount) do
begin
// get length of file name
FileNameLength := DragQueryFile(DropH, I, nil, 0);
// create string large enough to store file
SetLength(FileName, FileNameLength);
// get the file name
DragQueryFile(DropH, I, PChar(FileName), FileNameLength + 1);
// process file name (application specific)
// ... processing code here
ShellExecute(0, 'open', PChar(ParamStr(0)), PChar('"' + FileName + '"'), '', SW_NORMAL);
end;
// Optional: Get point at which files were dropped
DragQueryPoint(DropH, DropPoint);
// ... do something with drop point here
finally
// Tidy up - release the drop handle
// don't use DropH again after this
DragFinish(DropH);
end;
// Note we handled message
Msg.Result := 0;
end;
 
procedure TForm1.BeforeNavigate(const URL: OleVariant; var Cancel: WordBool);
var
s, myURL: string;
/trunk/Private/Wishlist.txt
0,0 → 1,27
 
Wishlist for FastPHP
--------------------
 
1. Code folding
=> I need a highlighter that is a subclass of TSynCustomCodeFoldingHighlighter
 
2. Regions like C# or Delphi (with folding)
=> We would need to "invent" a notation for regions which doesn't break PHP syntax obviously
maybe as simple as <?php
#region "test"
#endregion
?>
 
3. Code completion
 
4. See the method arguments while you are typing a method
 
5. Gutter
=> Works with Lazarus, but not with Delphi!
 
6. Files in tabs?
 
7. More intelligent find of the correct method/function/symbol when you press F1
 
8. When dark theme is enabled, the left top pixel cannot be used to open the window menu (close by double click).
This is extremely annoying if you are used to close maximized windows this way.