mirror of
https://github.com/moparisthebest/Simba
synced 2025-02-24 15:31:51 -05:00
Made the function list functional! :-)
Extra -> Fill Function List And the dragging w0rks. git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@331 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
d5ee9fdbc5
commit
8f88d8a0ab
@ -1,42 +1,36 @@
|
||||
object FunctionListFrame: TFunctionListFrame
|
||||
Left = 0
|
||||
Height = 327
|
||||
Top = 0
|
||||
Width = 113
|
||||
Align = alLeft
|
||||
ClientHeight = 327
|
||||
ClientWidth = 113
|
||||
TabOrder = 0
|
||||
DesignLeft = 401
|
||||
DesignTop = 219
|
||||
object FunctionList: TTreeView
|
||||
Left = 0
|
||||
Height = 300
|
||||
Top = 0
|
||||
Width = 113
|
||||
Align = alClient
|
||||
DefaultItemHeight = 19
|
||||
ReadOnly = True
|
||||
ScrollBars = ssAutoBoth
|
||||
TabOrder = 0
|
||||
OnMouseDown = FunctionListMouseDown
|
||||
OnMouseUp = FunctionListMouseUp
|
||||
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips]
|
||||
Items.Data = {
|
||||
F9FFFFFF020001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF020000000000
|
||||
00000105000000436F6C6F72FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000
|
||||
00000000000900000046696E64436F6C6F72FFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFF00000000000000000008000000476574436F6C6F72
|
||||
}
|
||||
end
|
||||
object editSearchList: TEdit
|
||||
Left = 0
|
||||
Height = 27
|
||||
Top = 300
|
||||
Width = 113
|
||||
Align = alBottom
|
||||
OnChange = editSearchListChange
|
||||
OnExit = editSearchListExit
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object FunctionListFrame: TFunctionListFrame
|
||||
Left = 0
|
||||
Height = 327
|
||||
Top = 0
|
||||
Width = 115
|
||||
Align = alLeft
|
||||
ClientHeight = 327
|
||||
ClientWidth = 115
|
||||
TabOrder = 0
|
||||
DesignLeft = 401
|
||||
DesignTop = 219
|
||||
object FunctionList: TTreeView
|
||||
Left = 0
|
||||
Height = 306
|
||||
Top = 0
|
||||
Width = 115
|
||||
Align = alClient
|
||||
DefaultItemHeight = 15
|
||||
ReadOnly = True
|
||||
ScrollBars = ssAutoBoth
|
||||
TabOrder = 0
|
||||
OnMouseDown = FunctionListMouseDown
|
||||
OnMouseUp = FunctionListMouseUp
|
||||
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips]
|
||||
end
|
||||
object editSearchList: TEdit
|
||||
Left = 0
|
||||
Height = 21
|
||||
Top = 306
|
||||
Width = 115
|
||||
Align = alBottom
|
||||
OnChange = editSearchListChange
|
||||
OnExit = editSearchListExit
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
|
@ -1,21 +1,16 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TFunctionListFrame','FORMDATA',[
|
||||
'TPF0'#18'TFunctionListFrame'#17'FunctionListFrame'#4'Left'#2#0#6'Height'#3'G'
|
||||
+#1#3'Top'#2#0#5'Width'#2'q'#5'Align'#7#6'alLeft'#12'ClientHeight'#3'G'#1#11
|
||||
+'ClientWidth'#2'q'#8'TabOrder'#2#0#10'DesignLeft'#3#145#1#9'DesignTop'#3#219
|
||||
+#0#0#9'TTreeView'#12'FunctionList'#4'Left'#2#0#6'Height'#3','#1#3'Top'#2#0#5
|
||||
+'Width'#2'q'#5'Align'#7#8'alClient'#17'DefaultItemHeight'#2#19#8'ReadOnly'#9
|
||||
+#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#0#11'OnMouseDown'#7#21'Functi'
|
||||
+'onListMouseDown'#9'OnMouseUp'#7#19'FunctionListMouseUp'#7'Options'#11#17'tv'
|
||||
+'oAutoItemHeight'#16'tvoHideSelection'#21'tvoKeepCollapsedNodes'#11'tvoReadO'
|
||||
+'nly'#14'tvoShowButtons'#12'tvoShowLines'#11'tvoShowRoot'#11'tvoToolTips'#0
|
||||
+#10'Items.Data'#10'w'#0#0#0#249#255#255#255#2#0#1#0#0#0#255#255#255#255#255
|
||||
+#255#255#255#255#255#255#255#255#255#255#255#2#0#0#0#0#0#0#0#1#5#0#0#0'Color'
|
||||
+#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#0#0#0#0#0#0
|
||||
+#0#0#0#9#0#0#0'FindColor'#255#255#255#255#255#255#255#255#255#255#255#255#255
|
||||
+#255#255#255#0#0#0#0#0#0#0#0#0#8#0#0#0'GetColor'#0#0#5'TEdit'#14'editSearchL'
|
||||
+'ist'#4'Left'#2#0#6'Height'#2#27#3'Top'#3','#1#5'Width'#2'q'#5'Align'#7#8'al'
|
||||
+'Bottom'#8'OnChange'#7#20'editSearchListChange'#6'OnExit'#7#18'editSearchLis'
|
||||
+'tExit'#8'TabOrder'#2#1#0#0#0
|
||||
]);
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TFunctionListFrame','FORMDATA',[
|
||||
'TPF0'#18'TFunctionListFrame'#17'FunctionListFrame'#4'Left'#2#0#6'Height'#3'G'
|
||||
+#1#3'Top'#2#0#5'Width'#2's'#5'Align'#7#6'alLeft'#12'ClientHeight'#3'G'#1#11
|
||||
+'ClientWidth'#2's'#8'TabOrder'#2#0#10'DesignLeft'#3#145#1#9'DesignTop'#3#219
|
||||
+#0#0#9'TTreeView'#12'FunctionList'#4'Left'#2#0#6'Height'#3'2'#1#3'Top'#2#0#5
|
||||
+'Width'#2's'#5'Align'#7#8'alClient'#17'DefaultItemHeight'#2#15#8'ReadOnly'#9
|
||||
+#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#0#11'OnMouseDown'#7#21'Functi'
|
||||
+'onListMouseDown'#9'OnMouseUp'#7#19'FunctionListMouseUp'#7'Options'#11#17'tv'
|
||||
+'oAutoItemHeight'#16'tvoHideSelection'#21'tvoKeepCollapsedNodes'#11'tvoReadO'
|
||||
+'nly'#14'tvoShowButtons'#12'tvoShowLines'#11'tvoShowRoot'#11'tvoToolTips'#0#0
|
||||
+#0#5'TEdit'#14'editSearchList'#4'Left'#2#0#6'Height'#2#21#3'Top'#3'2'#1#5'Wi'
|
||||
+'dth'#2's'#5'Align'#7#8'alBottom'#8'OnChange'#7#20'editSearchListChange'#6'O'
|
||||
+'nExit'#7#18'editSearchListExit'#8'TabOrder'#2#1#0#0#0
|
||||
]);
|
||||
|
@ -1,105 +1,107 @@
|
||||
unit framefunctionlist;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, ComCtrls, StdCtrls, Controls;
|
||||
|
||||
type
|
||||
|
||||
{ TFunctionListFrame }
|
||||
|
||||
TFunctionListFrame = class(TFrame)
|
||||
editSearchList: TEdit;
|
||||
FunctionList: TTreeView;
|
||||
procedure editSearchListChange(Sender: TObject);
|
||||
procedure editSearchListExit(Sender: TObject);
|
||||
procedure FunctionListMouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure FunctionListMouseUp(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure DockFormOnClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
TestUnit, Graphics;
|
||||
|
||||
{ TFunctionListFrame }
|
||||
|
||||
procedure TFunctionListFrame.editSearchListChange(Sender: TObject);
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
if(editSearchList.Text = '')then
|
||||
begin
|
||||
editSearchList.Color := clWhite;
|
||||
exit;
|
||||
end;
|
||||
for I := 0 to FunctionList.Items.Count do //WTF LOOPS FAIL. for I := 1 to 3 do ;; would make I 4 after a successful, non-brakeing run :<
|
||||
begin
|
||||
if(I = FunctionList.Items.Count)then break;
|
||||
if(pos(lowercase(editSearchList.Text), lowercase(FunctionList.Items[I].Text)) > 0)then
|
||||
break;
|
||||
end;
|
||||
if(I = FunctionList.Items.Count)then
|
||||
editSearchList.Color := 6711039
|
||||
else
|
||||
editSearchList.Color := clWhite;
|
||||
end;
|
||||
|
||||
procedure TFunctionListFrame.editSearchListExit(Sender: TObject);
|
||||
begin
|
||||
editSearchList.Color := clWhite;
|
||||
end;
|
||||
|
||||
procedure TFunctionListFrame.DockFormOnClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
begin
|
||||
CloseAction := caHide;
|
||||
Form1.MenuItemFunctionList.Checked := False;
|
||||
end;
|
||||
|
||||
procedure TFunctionListFrame.FunctionListMouseDown(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
N: TTreeNode;
|
||||
begin
|
||||
N := Self.FunctionList.GetNodeAt(x, y);
|
||||
if(N = nil)then
|
||||
begin
|
||||
Self.DragKind := dkDock;
|
||||
Self.BeginDrag(false, 40);
|
||||
exit;
|
||||
end;
|
||||
Self.DragKind := dkDrag;
|
||||
if(Button = mbLeft) and (N.Level > 0)then
|
||||
Self.BeginDrag(False, 10);
|
||||
end;
|
||||
|
||||
procedure TFunctionListFrame.FunctionListMouseUp(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
F: ^TCustomDockForm;
|
||||
begin
|
||||
if(Self.Parent is TCustomDockForm)then
|
||||
begin
|
||||
F := @Self.Parent; //can't typecast parent as a TCustomDockForm
|
||||
F^.Caption := 'Function List';
|
||||
F^.BorderStyle := bsSizeable;
|
||||
F^.OnClose := @DockFormOnClose;
|
||||
Form1.Splitter1.Hide;
|
||||
end;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I framefunctionlist.lrs}
|
||||
|
||||
end.
|
||||
|
||||
unit framefunctionlist;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, ComCtrls, StdCtrls, Controls;
|
||||
|
||||
type
|
||||
|
||||
{ TFunctionListFrame }
|
||||
|
||||
TFunctionListFrame = class(TFrame)
|
||||
editSearchList: TEdit;
|
||||
FunctionList: TTreeView;
|
||||
procedure editSearchListChange(Sender: TObject);
|
||||
procedure editSearchListExit(Sender: TObject);
|
||||
procedure FunctionListMouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure FunctionListMouseUp(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure DockFormOnClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
DraggingNode : TTreeNode;
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
TestUnit, Graphics;
|
||||
|
||||
{ TFunctionListFrame }
|
||||
|
||||
procedure TFunctionListFrame.editSearchListChange(Sender: TObject);
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
if(editSearchList.Text = '')then
|
||||
begin
|
||||
editSearchList.Color := clWhite;
|
||||
exit;
|
||||
end;
|
||||
for I := 0 to FunctionList.Items.Count do //WTF LOOPS FAIL. for I := 1 to 3 do ;; would make I 4 after a successful, non-brakeing run :<
|
||||
begin
|
||||
if(I = FunctionList.Items.Count)then break;
|
||||
if(pos(lowercase(editSearchList.Text), lowercase(FunctionList.Items[I].Text)) > 0)then
|
||||
break;
|
||||
end;
|
||||
if(I = FunctionList.Items.Count)then
|
||||
editSearchList.Color := 6711039
|
||||
else
|
||||
editSearchList.Color := clWhite;
|
||||
end;
|
||||
|
||||
procedure TFunctionListFrame.editSearchListExit(Sender: TObject);
|
||||
begin
|
||||
editSearchList.Color := clWhite;
|
||||
end;
|
||||
|
||||
procedure TFunctionListFrame.DockFormOnClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
begin
|
||||
CloseAction := caHide;
|
||||
Form1.MenuItemFunctionList.Checked := False;
|
||||
end;
|
||||
|
||||
procedure TFunctionListFrame.FunctionListMouseDown(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
N: TTreeNode;
|
||||
begin
|
||||
N := Self.FunctionList.GetNodeAt(x, y);
|
||||
if(N = nil)then
|
||||
begin
|
||||
Self.DragKind := dkDock;
|
||||
Self.BeginDrag(false, 40);
|
||||
exit;
|
||||
end;
|
||||
Self.DragKind := dkDrag;
|
||||
if(Button = mbLeft) and (N.Level > 0)then
|
||||
Self.BeginDrag(False, 10);
|
||||
DraggingNode := N;
|
||||
end;
|
||||
|
||||
procedure TFunctionListFrame.FunctionListMouseUp(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
F: ^TCustomDockForm;
|
||||
begin
|
||||
if(Self.Parent is TCustomDockForm)then
|
||||
begin
|
||||
F := @Self.Parent; //can't typecast parent as a TCustomDockForm
|
||||
F^.Caption := 'Function List';
|
||||
F^.BorderStyle := bsSizeable;
|
||||
F^.OnClose := @DockFormOnClose;
|
||||
Form1.Splitter1.Hide;
|
||||
end;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I framefunctionlist.lrs}
|
||||
|
||||
end.
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,153 +1,154 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TScriptFrame','FORMDATA',[
|
||||
'TPF0'#12'TScriptFrame'#11'ScriptFrame'#4'Left'#2#0#6'Height'#3'H'#1#3'Top'#2
|
||||
+#0#5'Width'#3#141#1#12'ClientHeight'#3'H'#1#11'ClientWidth'#3#141#1#8'TabOrd'
|
||||
+'er'#2#0#10'DesignLeft'#3#20#3#9'DesignTop'#3#164#1#0#244#8'TSynEdit'#7'SynE'
|
||||
+'dit'#4'Left'#2#0#6'Height'#3'H'#1#3'Top'#2#0#5'Width'#3#141#1#5'Align'#7#8
|
||||
+'alClient'#11'Font.Height'#2#243#9'Font.Name'#6#11'Courier New'#10'Font.Pitc'
|
||||
+'h'#7#7'fpFixed'#12'Font.Quality'#7#16'fqNonAntialiased'#11'ParentColor'#8#10
|
||||
+'ParentFont'#8#9'PopupMenu'#7#17'Form1.ScriptPopup'#8'TabOrder'#2#0#10'OnDra'
|
||||
+'gDrop'#7#15'SynEditDragDrop'#10'OnDragOver'#7#15'SynEditDragOver'#9'OnKeyDo'
|
||||
+'wn'#7#14'SynEditKeyDown'#12'Gutter.Width'#2'9'#19'Gutter.MouseActions'#14#1
|
||||
+#5'Shift'#11#0#9'ShiftMask'#11#0#6'Button'#7#6'mbLeft'#10'ClickCount'#7#5'cc'
|
||||
+'Any'#8'ClickDir'#7#6'cdDown'#7'Command'#2#13#9'MoveCaret'#8#6'Option'#2#0#8
|
||||
+'Priority'#2#0#0#1#5'Shift'#11#0#9'ShiftMask'#11#0#6'Button'#7#7'mbRight'#10
|
||||
+'ClickCount'#7#8'ccSingle'#8'ClickDir'#7#4'cdUp'#7'Command'#2#12#9'MoveCaret'
|
||||
+#8#6'Option'#2#0#8'Priority'#2#0#0#0#11'Highlighter'#7#17'SynFreePascalSyn1'
|
||||
+#10'Keystrokes'#14#1#7'Command'#7#4'ecUp'#8'ShortCut'#2'&'#0#1#7'Command'#7#7
|
||||
+'ecSelUp'#8'ShortCut'#3'& '#0#1#7'Command'#7#10'ecScrollUp'#8'ShortCut'#3'&@'
|
||||
+#0#1#7'Command'#7#6'ecDown'#8'ShortCut'#2'('#0#1#7'Command'#7#9'ecSelDown'#8
|
||||
+'ShortCut'#3'( '#0#1#7'Command'#7#12'ecScrollDown'#8'ShortCut'#3'(@'#0#1#7'C'
|
||||
+'ommand'#7#6'ecLeft'#8'ShortCut'#2'%'#0#1#7'Command'#7#9'ecSelLeft'#8'ShortC'
|
||||
+'ut'#3'% '#0#1#7'Command'#7#10'ecWordLeft'#8'ShortCut'#3'%@'#0#1#7'Command'#7
|
||||
+#13'ecSelWordLeft'#8'ShortCut'#3'%`'#0#1#7'Command'#7#7'ecRight'#8'ShortCut'
|
||||
+#2''''#0#1#7'Command'#7#10'ecSelRight'#8'ShortCut'#3''' '#0#1#7'Command'#7#11
|
||||
+'ecWordRight'#8'ShortCut'#3'''@'#0#1#7'Command'#7#14'ecSelWordRight'#8'Short'
|
||||
+'Cut'#3'''`'#0#1#7'Command'#7#10'ecPageDown'#8'ShortCut'#2'"'#0#1#7'Command'
|
||||
+#7#13'ecSelPageDown'#8'ShortCut'#3'" '#0#1#7'Command'#7#12'ecPageBottom'#8'S'
|
||||
+'hortCut'#3'"@'#0#1#7'Command'#7#15'ecSelPageBottom'#8'ShortCut'#3'"`'#0#1#7
|
||||
+'Command'#7#8'ecPageUp'#8'ShortCut'#2'!'#0#1#7'Command'#7#11'ecSelPageUp'#8
|
||||
+'ShortCut'#3'! '#0#1#7'Command'#7#9'ecPageTop'#8'ShortCut'#3'!@'#0#1#7'Comma'
|
||||
+'nd'#7#12'ecSelPageTop'#8'ShortCut'#3'!`'#0#1#7'Command'#7#11'ecLineStart'#8
|
||||
+'ShortCut'#2'$'#0#1#7'Command'#7#14'ecSelLineStart'#8'ShortCut'#3'$ '#0#1#7
|
||||
+'Command'#7#11'ecEditorTop'#8'ShortCut'#3'$@'#0#1#7'Command'#7#14'ecSelEdito'
|
||||
+'rTop'#8'ShortCut'#3'$`'#0#1#7'Command'#7#9'ecLineEnd'#8'ShortCut'#2'#'#0#1#7
|
||||
+'Command'#7#12'ecSelLineEnd'#8'ShortCut'#3'# '#0#1#7'Command'#7#14'ecEditorB'
|
||||
+'ottom'#8'ShortCut'#3'#@'#0#1#7'Command'#7#17'ecSelEditorBottom'#8'ShortCut'
|
||||
+#3'#`'#0#1#7'Command'#7#12'ecToggleMode'#8'ShortCut'#2'-'#0#1#7'Command'#7#6
|
||||
+'ecCopy'#8'ShortCut'#3'-@'#0#1#7'Command'#7#7'ecPaste'#8'ShortCut'#3'- '#0#1
|
||||
+#7'Command'#7#12'ecDeleteChar'#8'ShortCut'#2'.'#0#1#7'Command'#7#5'ecCut'#8
|
||||
+'ShortCut'#3'. '#0#1#7'Command'#7#16'ecDeleteLastChar'#8'ShortCut'#2#8#0#1#7
|
||||
+'Command'#7#16'ecDeleteLastChar'#8'ShortCut'#3#8' '#0#1#7'Command'#7#16'ecDe'
|
||||
+'leteLastWord'#8'ShortCut'#3#8'@'#0#1#7'Command'#7#6'ecUndo'#8'ShortCut'#4#8
|
||||
+#128#0#0#0#1#7'Command'#7#6'ecRedo'#8'ShortCut'#4#8#160#0#0#0#1#7'Command'#7
|
||||
+#11'ecLineBreak'#8'ShortCut'#2#13#0#1#7'Command'#7#11'ecSelectAll'#8'ShortCu'
|
||||
+'t'#3'A@'#0#1#7'Command'#7#6'ecCopy'#8'ShortCut'#3'C@'#0#1#7'Command'#7#13'e'
|
||||
+'cBlockIndent'#8'ShortCut'#3'I`'#0#1#7'Command'#7#11'ecLineBreak'#8'ShortCut'
|
||||
+#3'M@'#0#1#7'Command'#7#15'ecBlockUnindent'#8'ShortCut'#3'U`'#0#1#7'Command'
|
||||
+#7#7'ecPaste'#8'ShortCut'#3'V@'#0#1#7'Command'#7#5'ecCut'#8'ShortCut'#3'X@'#0
|
||||
+#1#7'Command'#7#12'ecDeleteLine'#8'ShortCut'#3'Y@'#0#1#7'Command'#7#11'ecDel'
|
||||
+'eteEOL'#8'ShortCut'#3'Y`'#0#1#7'Command'#7#6'ecUndo'#8'ShortCut'#3'Z@'#0#1#7
|
||||
+'Command'#7#6'ecRedo'#8'ShortCut'#3'Z`'#0#1#7'Command'#7#13'ecGotoMarker0'#8
|
||||
+'ShortCut'#3'0@'#0#1#7'Command'#7#13'ecGotoMarker1'#8'ShortCut'#3'1@'#0#1#7
|
||||
+'Command'#7#13'ecGotoMarker2'#8'ShortCut'#3'2@'#0#1#7'Command'#7#13'ecGotoMa'
|
||||
+'rker3'#8'ShortCut'#3'3@'#0#1#7'Command'#7#13'ecGotoMarker4'#8'ShortCut'#3'4'
|
||||
+'@'#0#1#7'Command'#7#13'ecGotoMarker5'#8'ShortCut'#3'5@'#0#1#7'Command'#7#13
|
||||
+'ecGotoMarker6'#8'ShortCut'#3'6@'#0#1#7'Command'#7#13'ecGotoMarker7'#8'Short'
|
||||
+'Cut'#3'7@'#0#1#7'Command'#7#13'ecGotoMarker8'#8'ShortCut'#3'8@'#0#1#7'Comma'
|
||||
+'nd'#7#13'ecGotoMarker9'#8'ShortCut'#3'9@'#0#1#7'Command'#7#12'ecSetMarker0'
|
||||
+#8'ShortCut'#3'0`'#0#1#7'Command'#7#12'ecSetMarker1'#8'ShortCut'#3'1`'#0#1#7
|
||||
+'Command'#7#12'ecSetMarker2'#8'ShortCut'#3'2`'#0#1#7'Command'#7#12'ecSetMark'
|
||||
+'er3'#8'ShortCut'#3'3`'#0#1#7'Command'#7#12'ecSetMarker4'#8'ShortCut'#3'4`'#0
|
||||
+#1#7'Command'#7#12'ecSetMarker5'#8'ShortCut'#3'5`'#0#1#7'Command'#7#12'ecSet'
|
||||
+'Marker6'#8'ShortCut'#3'6`'#0#1#7'Command'#7#12'ecSetMarker7'#8'ShortCut'#3
|
||||
+'7`'#0#1#7'Command'#7#12'ecSetMarker8'#8'ShortCut'#3'8`'#0#1#7'Command'#7#12
|
||||
+'ecSetMarker9'#8'ShortCut'#3'9`'#0#1#7'Command'#7#12'EcFoldLevel1'#8'ShortCu'
|
||||
+'t'#4'1'#160#0#0#0#1#7'Command'#7#12'EcFoldLevel2'#8'ShortCut'#4'2'#160#0#0#0
|
||||
,#1#7'Command'#7#12'EcFoldLevel1'#8'ShortCut'#4'3'#160#0#0#0#1#7'Command'#7#12
|
||||
+'EcFoldLevel1'#8'ShortCut'#4'4'#160#0#0#0#1#7'Command'#7#12'EcFoldLevel1'#8
|
||||
+'ShortCut'#4'5'#160#0#0#0#1#7'Command'#7#12'EcFoldLevel6'#8'ShortCut'#4'6'
|
||||
+#160#0#0#0#1#7'Command'#7#12'EcFoldLevel7'#8'ShortCut'#4'7'#160#0#0#0#1#7'Co'
|
||||
+'mmand'#7#12'EcFoldLevel8'#8'ShortCut'#4'8'#160#0#0#0#1#7'Command'#7#12'EcFo'
|
||||
+'ldLevel9'#8'ShortCut'#4'9'#160#0#0#0#1#7'Command'#7#12'EcFoldLevel0'#8'Shor'
|
||||
+'tCut'#4'0'#160#0#0#0#1#7'Command'#7#13'EcFoldCurrent'#8'ShortCut'#4'-'#160#0
|
||||
+#0#0#1#7'Command'#7#15'EcUnFoldCurrent'#8'ShortCut'#4'+'#160#0#0#0#1#7'Comma'
|
||||
+'nd'#7#18'EcToggleMarkupWord'#8'ShortCut'#4'M'#128#0#0#0#1#7'Command'#7#14'e'
|
||||
+'cNormalSelect'#8'ShortCut'#3'N`'#0#1#7'Command'#7#14'ecColumnSelect'#8'Shor'
|
||||
+'tCut'#3'C`'#0#1#7'Command'#7#12'ecLineSelect'#8'ShortCut'#3'L`'#0#1#7'Comma'
|
||||
+'nd'#7#5'ecTab'#8'ShortCut'#2#9#0#1#7'Command'#7#10'ecShiftTab'#8'ShortCut'#3
|
||||
+#9' '#0#1#7'Command'#7#14'ecMatchBracket'#8'ShortCut'#3'B`'#0#1#7'Command'#7
|
||||
+#10'ecColSelUp'#8'ShortCut'#4'&'#160#0#0#0#1#7'Command'#7#12'ecColSelDown'#8
|
||||
+'ShortCut'#4'('#160#0#0#0#1#7'Command'#7#12'ecColSelLeft'#8'ShortCut'#4'%'
|
||||
+#160#0#0#0#1#7'Command'#7#13'ecColSelRight'#8'ShortCut'#4''''#160#0#0#0#1#7
|
||||
+'Command'#7#16'ecColSelPageDown'#8'ShortCut'#4'"'#160#0#0#0#1#7'Command'#7#18
|
||||
+'ecColSelPageBottom'#8'ShortCut'#4'"'#224#0#0#0#1#7'Command'#7#14'ecColSelPa'
|
||||
+'geUp'#8'ShortCut'#4'!'#160#0#0#0#1#7'Command'#7#15'ecColSelPageTop'#8'Short'
|
||||
+'Cut'#4'!'#224#0#0#0#1#7'Command'#7#17'ecColSelLineStart'#8'ShortCut'#4'$'
|
||||
+#160#0#0#0#1#7'Command'#7#15'ecColSelLineEnd'#8'ShortCut'#4'#'#160#0#0#0#1#7
|
||||
+'Command'#7#17'ecColSelEditorTop'#8'ShortCut'#4'$'#224#0#0#0#1#7'Command'#7
|
||||
+#20'ecColSelEditorBottom'#8'ShortCut'#4'#'#224#0#0#0#0#12'MouseActions'#14#1
|
||||
+#5'Shift'#11#0#9'ShiftMask'#11#7'ssShift'#5'ssAlt'#0#6'Button'#7#6'mbLeft'#10
|
||||
+'ClickCount'#7#8'ccSingle'#8'ClickDir'#7#6'cdDown'#7'Command'#2#1#9'MoveCare'
|
||||
+'t'#9#6'Option'#2#0#8'Priority'#2#0#0#1#5'Shift'#11#7'ssShift'#0#9'ShiftMask'
|
||||
+#11#7'ssShift'#5'ssAlt'#0#6'Button'#7#6'mbLeft'#10'ClickCount'#7#8'ccSingle'
|
||||
+#8'ClickDir'#7#6'cdDown'#7'Command'#2#1#9'MoveCaret'#9#6'Option'#2#1#8'Prior'
|
||||
+'ity'#2#0#0#1#5'Shift'#11#5'ssAlt'#0#9'ShiftMask'#11#7'ssShift'#5'ssAlt'#0#6
|
||||
+'Button'#7#6'mbLeft'#10'ClickCount'#7#8'ccSingle'#8'ClickDir'#7#6'cdDown'#7
|
||||
+'Command'#2#3#9'MoveCaret'#9#6'Option'#2#0#8'Priority'#2#0#0#1#5'Shift'#11#7
|
||||
+'ssShift'#5'ssAlt'#0#9'ShiftMask'#11#7'ssShift'#5'ssAlt'#0#6'Button'#7#6'mbL'
|
||||
+'eft'#10'ClickCount'#7#8'ccSingle'#8'ClickDir'#7#6'cdDown'#7'Command'#2#3#9
|
||||
+'MoveCaret'#9#6'Option'#2#1#8'Priority'#2#0#0#1#5'Shift'#11#0#9'ShiftMask'#11
|
||||
+#0#6'Button'#7#7'mbRight'#10'ClickCount'#7#8'ccSingle'#8'ClickDir'#7#4'cdUp'
|
||||
+#7'Command'#2#12#9'MoveCaret'#8#6'Option'#2#0#8'Priority'#2#0#0#1#5'Shift'#11
|
||||
+#0#9'ShiftMask'#11#0#6'Button'#7#6'mbLeft'#10'ClickCount'#7#8'ccDouble'#8'Cl'
|
||||
+'ickDir'#7#6'cdDown'#7'Command'#2#6#9'MoveCaret'#9#6'Option'#2#0#8'Priority'
|
||||
+#2#0#0#1#5'Shift'#11#0#9'ShiftMask'#11#0#6'Button'#7#6'mbLeft'#10'ClickCount'
|
||||
+#7#8'ccTriple'#8'ClickDir'#7#6'cdDown'#7'Command'#2#7#9'MoveCaret'#9#6'Optio'
|
||||
+'n'#2#0#8'Priority'#2#0#0#1#5'Shift'#11#0#9'ShiftMask'#11#0#6'Button'#7#6'mb'
|
||||
+'Left'#10'ClickCount'#7#6'ccQuad'#8'ClickDir'#7#6'cdDown'#7'Command'#2#8#9'M'
|
||||
+'oveCaret'#9#6'Option'#2#0#8'Priority'#2#0#0#1#5'Shift'#11#0#9'ShiftMask'#11
|
||||
+#0#6'Button'#7#8'mbMiddle'#10'ClickCount'#7#8'ccSingle'#8'ClickDir'#7#6'cdDo'
|
||||
+'wn'#7'Command'#2#10#9'MoveCaret'#9#6'Option'#2#0#8'Priority'#2#0#0#1#5'Shif'
|
||||
+'t'#11#6'ssCtrl'#0#9'ShiftMask'#11#7'ssShift'#5'ssAlt'#6'ssCtrl'#0#6'Button'
|
||||
+#7#6'mbLeft'#10'ClickCount'#7#8'ccSingle'#8'ClickDir'#7#4'cdUp'#7'Command'#2
|
||||
+#11#9'MoveCaret'#8#6'Option'#2#0#8'Priority'#2#0#0#0#15'MouseSelActions'#14#1
|
||||
+#5'Shift'#11#0#9'ShiftMask'#11#0#6'Button'#7#6'mbLeft'#10'ClickCount'#7#8'cc'
|
||||
+'Single'#8'ClickDir'#7#6'cdDown'#7'Command'#2#9#9'MoveCaret'#8#6'Option'#2#0
|
||||
+#8'Priority'#2#0#0#0#13'Lines.Strings'#1#6#12'program new;'#6#5'begin'#6#4'e'
|
||||
+'nd.'#0#21'BracketHighlightStyle'#7#8'sbhsBoth'#8'OnChange'#7#13'SynEditChan'
|
||||
+'ge'#16'OnProcessCommand'#7#21'SynEditProcessCommand'#19'OnSpecialLineColors'
|
||||
+#7#24'SynEditSpecialLineColors'#0#244#18'TSynGutterPartList'#0#0#15'TSynGutt'
|
||||
+'erMarks'#0#5'Width'#2#23#0#0#20'TSynGutterLineNumber'#0#5'Width'#2#17#12'Mo'
|
||||
+'useActions'#14#0#21'MarkupInfo.Background'#7#9'clBtnFace'#21'MarkupInfo.For'
|
||||
+'eground'#7#6'clNone'#10'DigitCount'#2#2#30'ShowOnlyLineNumbersMultiplesOf'#2
|
||||
+#1#9'ZeroStart'#8#12'LeadingZeros'#8#0#0#17'TSynGutterChanges'#0#5'Width'#2#4
|
||||
+#13'ModifiedColor'#4#252#233#0#0#10'SavedColor'#7#7'clGreen'#0#0#19'TSynGutt'
|
||||
+'erSeparator'#0#5'Width'#2#2#0#0#21'TSynGutterCodeFolding'#0#12'MouseActions'
|
||||
+#14#1#5'Shift'#11#0#9'ShiftMask'#11#0#6'Button'#7#7'mbRight'#10'ClickCount'#7
|
||||
+#8'ccSingle'#8'ClickDir'#7#4'cdUp'#7'Command'#2#16#9'MoveCaret'#8#6'Option'#2
|
||||
+#0#8'Priority'#2#0#0#1#5'Shift'#11#0#9'ShiftMask'#11#7'ssShift'#0#6'Button'#7
|
||||
+#8'mbMiddle'#10'ClickCount'#7#5'ccAny'#8'ClickDir'#7#6'cdDown'#7'Command'#2
|
||||
,#14#9'MoveCaret'#8#6'Option'#2#0#8'Priority'#2#0#0#1#5'Shift'#11#7'ssShift'#0
|
||||
+#9'ShiftMask'#11#7'ssShift'#0#6'Button'#7#8'mbMiddle'#10'ClickCount'#7#5'ccA'
|
||||
+'ny'#8'ClickDir'#7#6'cdDown'#7'Command'#2#14#9'MoveCaret'#8#6'Option'#2#1#8
|
||||
+'Priority'#2#0#0#1#5'Shift'#11#0#9'ShiftMask'#11#0#6'Button'#7#6'mbLeft'#10
|
||||
+'ClickCount'#7#5'ccAny'#8'ClickDir'#7#6'cdDown'#7'Command'#2#0#9'MoveCaret'#8
|
||||
+#6'Option'#2#0#8'Priority'#2#0#0#0#21'MarkupInfo.Background'#7#6'clNone'#21
|
||||
+'MarkupInfo.Foreground'#7#6'clGray'#20'MouseActionsExpanded'#14#1#5'Shift'#11
|
||||
+#0#9'ShiftMask'#11#0#6'Button'#7#6'mbLeft'#10'ClickCount'#7#5'ccAny'#8'Click'
|
||||
+'Dir'#7#6'cdDown'#7'Command'#2#14#9'MoveCaret'#8#6'Option'#2#0#8'Priority'#2
|
||||
+#0#0#0#21'MouseActionsCollapsed'#14#1#5'Shift'#11#6'ssCtrl'#0#9'ShiftMask'#11
|
||||
+#6'ssCtrl'#0#6'Button'#7#6'mbLeft'#10'ClickCount'#7#5'ccAny'#8'ClickDir'#7#6
|
||||
+'cdDown'#7'Command'#2#15#9'MoveCaret'#8#6'Option'#2#0#8'Priority'#2#0#0#1#5
|
||||
+'Shift'#11#0#9'ShiftMask'#11#6'ssCtrl'#0#6'Button'#7#6'mbLeft'#10'ClickCount'
|
||||
+#7#5'ccAny'#8'ClickDir'#7#6'cdDown'#7'Command'#2#15#9'MoveCaret'#8#6'Option'
|
||||
+#2#1#8'Priority'#2#0#0#0#0#0#0#0#17'TSynFreePascalSyn'#17'SynFreePascalSyn1'
|
||||
+#7'Enabled'#8#23'CommentAttri.Foreground'#7#6'clBlue'#18'CommentAttri.Style'
|
||||
+#11#6'fsBold'#0#26'IdentifierAttri.Foreground'#7#9'clDefault'#22'NumberAttri'
|
||||
+'.Foreground'#7#6'clNavy'#22'StringAttri.Foreground'#7#6'clBlue'#22'SymbolAt'
|
||||
+'tri.Foreground'#7#5'clRed'#25'DirectiveAttri.Foreground'#7#5'clRed'#20'Dire'
|
||||
+'ctiveAttri.Style'#11#6'fsBold'#0#12'CompilerMode'#7#9'pcmObjFPC'#14'NestedC'
|
||||
+'omments'#9#4'left'#3'@'#1#3'top'#2#16#0#0#0
|
||||
]);
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TScriptFrame','FORMDATA',[
|
||||
'TPF0'#12'TScriptFrame'#11'ScriptFrame'#4'Left'#2#0#6'Height'#3'H'#1#3'Top'#2
|
||||
+#0#5'Width'#3#141#1#12'ClientHeight'#3'H'#1#11'ClientWidth'#3#141#1#8'TabOrd'
|
||||
+'er'#2#0#10'DesignLeft'#3#20#3#9'DesignTop'#3#164#1#0#244#8'TSynEdit'#7'SynE'
|
||||
+'dit'#4'Left'#2#0#6'Height'#3'H'#1#3'Top'#2#0#5'Width'#3#141#1#5'Align'#7#8
|
||||
+'alClient'#11'Font.Height'#2#243#9'Font.Name'#6#11'Courier New'#10'Font.Pitc'
|
||||
+'h'#7#7'fpFixed'#12'Font.Quality'#7#16'fqNonAntialiased'#11'ParentColor'#8#10
|
||||
+'ParentFont'#8#9'PopupMenu'#7#17'Form1.ScriptPopup'#8'TabOrder'#2#0#10'OnDra'
|
||||
+'gDrop'#7#15'SynEditDragDrop'#10'OnDragOver'#7#15'SynEditDragOver'#9'OnKeyDo'
|
||||
+'wn'#7#14'SynEditKeyDown'#24'BookMarkOptions.OnChange'#13#12'Gutter.Width'#2
|
||||
+'9'#19'Gutter.MouseActions'#14#1#5'Shift'#11#0#9'ShiftMask'#11#0#6'Button'#7
|
||||
+#6'mbLeft'#10'ClickCount'#7#5'ccAny'#8'ClickDir'#7#6'cdDown'#7'Command'#2#13
|
||||
+#9'MoveCaret'#8#6'Option'#2#0#8'Priority'#2#0#0#1#5'Shift'#11#0#9'ShiftMask'
|
||||
+#11#0#6'Button'#7#7'mbRight'#10'ClickCount'#7#8'ccSingle'#8'ClickDir'#7#4'cd'
|
||||
+'Up'#7'Command'#2#12#9'MoveCaret'#8#6'Option'#2#0#8'Priority'#2#0#0#0#11'Hig'
|
||||
+'hlighter'#7#17'SynFreePascalSyn1'#10'Keystrokes'#14#1#7'Command'#7#4'ecUp'#8
|
||||
+'ShortCut'#2'&'#0#1#7'Command'#7#7'ecSelUp'#8'ShortCut'#3'& '#0#1#7'Command'
|
||||
+#7#10'ecScrollUp'#8'ShortCut'#3'&@'#0#1#7'Command'#7#6'ecDown'#8'ShortCut'#2
|
||||
+'('#0#1#7'Command'#7#9'ecSelDown'#8'ShortCut'#3'( '#0#1#7'Command'#7#12'ecSc'
|
||||
+'rollDown'#8'ShortCut'#3'(@'#0#1#7'Command'#7#6'ecLeft'#8'ShortCut'#2'%'#0#1
|
||||
+#7'Command'#7#9'ecSelLeft'#8'ShortCut'#3'% '#0#1#7'Command'#7#10'ecWordLeft'
|
||||
+#8'ShortCut'#3'%@'#0#1#7'Command'#7#13'ecSelWordLeft'#8'ShortCut'#3'%`'#0#1#7
|
||||
+'Command'#7#7'ecRight'#8'ShortCut'#2''''#0#1#7'Command'#7#10'ecSelRight'#8'S'
|
||||
+'hortCut'#3''' '#0#1#7'Command'#7#11'ecWordRight'#8'ShortCut'#3'''@'#0#1#7'C'
|
||||
+'ommand'#7#14'ecSelWordRight'#8'ShortCut'#3'''`'#0#1#7'Command'#7#10'ecPageD'
|
||||
+'own'#8'ShortCut'#2'"'#0#1#7'Command'#7#13'ecSelPageDown'#8'ShortCut'#3'" '#0
|
||||
+#1#7'Command'#7#12'ecPageBottom'#8'ShortCut'#3'"@'#0#1#7'Command'#7#15'ecSel'
|
||||
+'PageBottom'#8'ShortCut'#3'"`'#0#1#7'Command'#7#8'ecPageUp'#8'ShortCut'#2'!'
|
||||
+#0#1#7'Command'#7#11'ecSelPageUp'#8'ShortCut'#3'! '#0#1#7'Command'#7#9'ecPag'
|
||||
+'eTop'#8'ShortCut'#3'!@'#0#1#7'Command'#7#12'ecSelPageTop'#8'ShortCut'#3'!`'
|
||||
+#0#1#7'Command'#7#11'ecLineStart'#8'ShortCut'#2'$'#0#1#7'Command'#7#14'ecSel'
|
||||
+'LineStart'#8'ShortCut'#3'$ '#0#1#7'Command'#7#11'ecEditorTop'#8'ShortCut'#3
|
||||
+'$@'#0#1#7'Command'#7#14'ecSelEditorTop'#8'ShortCut'#3'$`'#0#1#7'Command'#7#9
|
||||
+'ecLineEnd'#8'ShortCut'#2'#'#0#1#7'Command'#7#12'ecSelLineEnd'#8'ShortCut'#3
|
||||
+'# '#0#1#7'Command'#7#14'ecEditorBottom'#8'ShortCut'#3'#@'#0#1#7'Command'#7
|
||||
+#17'ecSelEditorBottom'#8'ShortCut'#3'#`'#0#1#7'Command'#7#12'ecToggleMode'#8
|
||||
+'ShortCut'#2'-'#0#1#7'Command'#7#6'ecCopy'#8'ShortCut'#3'-@'#0#1#7'Command'#7
|
||||
+#7'ecPaste'#8'ShortCut'#3'- '#0#1#7'Command'#7#12'ecDeleteChar'#8'ShortCut'#2
|
||||
+'.'#0#1#7'Command'#7#5'ecCut'#8'ShortCut'#3'. '#0#1#7'Command'#7#16'ecDelete'
|
||||
+'LastChar'#8'ShortCut'#2#8#0#1#7'Command'#7#16'ecDeleteLastChar'#8'ShortCut'
|
||||
+#3#8' '#0#1#7'Command'#7#16'ecDeleteLastWord'#8'ShortCut'#3#8'@'#0#1#7'Comma'
|
||||
+'nd'#7#6'ecUndo'#8'ShortCut'#4#8#128#0#0#0#1#7'Command'#7#6'ecRedo'#8'ShortC'
|
||||
+'ut'#4#8#160#0#0#0#1#7'Command'#7#11'ecLineBreak'#8'ShortCut'#2#13#0#1#7'Com'
|
||||
+'mand'#7#11'ecSelectAll'#8'ShortCut'#3'A@'#0#1#7'Command'#7#6'ecCopy'#8'Shor'
|
||||
+'tCut'#3'C@'#0#1#7'Command'#7#13'ecBlockIndent'#8'ShortCut'#3'I`'#0#1#7'Comm'
|
||||
+'and'#7#11'ecLineBreak'#8'ShortCut'#3'M@'#0#1#7'Command'#7#15'ecBlockUninden'
|
||||
+'t'#8'ShortCut'#3'U`'#0#1#7'Command'#7#7'ecPaste'#8'ShortCut'#3'V@'#0#1#7'Co'
|
||||
+'mmand'#7#5'ecCut'#8'ShortCut'#3'X@'#0#1#7'Command'#7#12'ecDeleteLine'#8'Sho'
|
||||
+'rtCut'#3'Y@'#0#1#7'Command'#7#11'ecDeleteEOL'#8'ShortCut'#3'Y`'#0#1#7'Comma'
|
||||
+'nd'#7#6'ecUndo'#8'ShortCut'#3'Z@'#0#1#7'Command'#7#6'ecRedo'#8'ShortCut'#3
|
||||
+'Z`'#0#1#7'Command'#7#13'ecGotoMarker0'#8'ShortCut'#3'0@'#0#1#7'Command'#7#13
|
||||
+'ecGotoMarker1'#8'ShortCut'#3'1@'#0#1#7'Command'#7#13'ecGotoMarker2'#8'Short'
|
||||
+'Cut'#3'2@'#0#1#7'Command'#7#13'ecGotoMarker3'#8'ShortCut'#3'3@'#0#1#7'Comma'
|
||||
+'nd'#7#13'ecGotoMarker4'#8'ShortCut'#3'4@'#0#1#7'Command'#7#13'ecGotoMarker5'
|
||||
+#8'ShortCut'#3'5@'#0#1#7'Command'#7#13'ecGotoMarker6'#8'ShortCut'#3'6@'#0#1#7
|
||||
+'Command'#7#13'ecGotoMarker7'#8'ShortCut'#3'7@'#0#1#7'Command'#7#13'ecGotoMa'
|
||||
+'rker8'#8'ShortCut'#3'8@'#0#1#7'Command'#7#13'ecGotoMarker9'#8'ShortCut'#3'9'
|
||||
+'@'#0#1#7'Command'#7#12'ecSetMarker0'#8'ShortCut'#3'0`'#0#1#7'Command'#7#12
|
||||
+'ecSetMarker1'#8'ShortCut'#3'1`'#0#1#7'Command'#7#12'ecSetMarker2'#8'ShortCu'
|
||||
+'t'#3'2`'#0#1#7'Command'#7#12'ecSetMarker3'#8'ShortCut'#3'3`'#0#1#7'Command'
|
||||
+#7#12'ecSetMarker4'#8'ShortCut'#3'4`'#0#1#7'Command'#7#12'ecSetMarker5'#8'Sh'
|
||||
+'ortCut'#3'5`'#0#1#7'Command'#7#12'ecSetMarker6'#8'ShortCut'#3'6`'#0#1#7'Com'
|
||||
+'mand'#7#12'ecSetMarker7'#8'ShortCut'#3'7`'#0#1#7'Command'#7#12'ecSetMarker8'
|
||||
+#8'ShortCut'#3'8`'#0#1#7'Command'#7#12'ecSetMarker9'#8'ShortCut'#3'9`'#0#1#7
|
||||
+'Command'#7#12'EcFoldLevel1'#8'ShortCut'#4'1'#160#0#0#0#1#7'Command'#7#12'Ec'
|
||||
,'FoldLevel2'#8'ShortCut'#4'2'#160#0#0#0#1#7'Command'#7#12'EcFoldLevel1'#8'Sh'
|
||||
+'ortCut'#4'3'#160#0#0#0#1#7'Command'#7#12'EcFoldLevel1'#8'ShortCut'#4'4'#160
|
||||
+#0#0#0#1#7'Command'#7#12'EcFoldLevel1'#8'ShortCut'#4'5'#160#0#0#0#1#7'Comman'
|
||||
+'d'#7#12'EcFoldLevel6'#8'ShortCut'#4'6'#160#0#0#0#1#7'Command'#7#12'EcFoldLe'
|
||||
+'vel7'#8'ShortCut'#4'7'#160#0#0#0#1#7'Command'#7#12'EcFoldLevel8'#8'ShortCut'
|
||||
+#4'8'#160#0#0#0#1#7'Command'#7#12'EcFoldLevel9'#8'ShortCut'#4'9'#160#0#0#0#1
|
||||
+#7'Command'#7#12'EcFoldLevel0'#8'ShortCut'#4'0'#160#0#0#0#1#7'Command'#7#13
|
||||
+'EcFoldCurrent'#8'ShortCut'#4'-'#160#0#0#0#1#7'Command'#7#15'EcUnFoldCurrent'
|
||||
+#8'ShortCut'#4'+'#160#0#0#0#1#7'Command'#7#18'EcToggleMarkupWord'#8'ShortCut'
|
||||
+#4'M'#128#0#0#0#1#7'Command'#7#14'ecNormalSelect'#8'ShortCut'#3'N`'#0#1#7'Co'
|
||||
+'mmand'#7#14'ecColumnSelect'#8'ShortCut'#3'C`'#0#1#7'Command'#7#12'ecLineSel'
|
||||
+'ect'#8'ShortCut'#3'L`'#0#1#7'Command'#7#5'ecTab'#8'ShortCut'#2#9#0#1#7'Comm'
|
||||
+'and'#7#10'ecShiftTab'#8'ShortCut'#3#9' '#0#1#7'Command'#7#14'ecMatchBracket'
|
||||
+#8'ShortCut'#3'B`'#0#1#7'Command'#7#10'ecColSelUp'#8'ShortCut'#4'&'#160#0#0#0
|
||||
+#1#7'Command'#7#12'ecColSelDown'#8'ShortCut'#4'('#160#0#0#0#1#7'Command'#7#12
|
||||
+'ecColSelLeft'#8'ShortCut'#4'%'#160#0#0#0#1#7'Command'#7#13'ecColSelRight'#8
|
||||
+'ShortCut'#4''''#160#0#0#0#1#7'Command'#7#16'ecColSelPageDown'#8'ShortCut'#4
|
||||
+'"'#160#0#0#0#1#7'Command'#7#18'ecColSelPageBottom'#8'ShortCut'#4'"'#224#0#0
|
||||
+#0#1#7'Command'#7#14'ecColSelPageUp'#8'ShortCut'#4'!'#160#0#0#0#1#7'Command'
|
||||
+#7#15'ecColSelPageTop'#8'ShortCut'#4'!'#224#0#0#0#1#7'Command'#7#17'ecColSel'
|
||||
+'LineStart'#8'ShortCut'#4'$'#160#0#0#0#1#7'Command'#7#15'ecColSelLineEnd'#8
|
||||
+'ShortCut'#4'#'#160#0#0#0#1#7'Command'#7#17'ecColSelEditorTop'#8'ShortCut'#4
|
||||
+'$'#224#0#0#0#1#7'Command'#7#20'ecColSelEditorBottom'#8'ShortCut'#4'#'#224#0
|
||||
+#0#0#0#12'MouseActions'#14#1#5'Shift'#11#0#9'ShiftMask'#11#7'ssShift'#5'ssAl'
|
||||
+'t'#0#6'Button'#7#6'mbLeft'#10'ClickCount'#7#8'ccSingle'#8'ClickDir'#7#6'cdD'
|
||||
+'own'#7'Command'#2#1#9'MoveCaret'#9#6'Option'#2#0#8'Priority'#2#0#0#1#5'Shif'
|
||||
+'t'#11#7'ssShift'#0#9'ShiftMask'#11#7'ssShift'#5'ssAlt'#0#6'Button'#7#6'mbLe'
|
||||
+'ft'#10'ClickCount'#7#8'ccSingle'#8'ClickDir'#7#6'cdDown'#7'Command'#2#1#9'M'
|
||||
+'oveCaret'#9#6'Option'#2#1#8'Priority'#2#0#0#1#5'Shift'#11#5'ssAlt'#0#9'Shif'
|
||||
+'tMask'#11#7'ssShift'#5'ssAlt'#0#6'Button'#7#6'mbLeft'#10'ClickCount'#7#8'cc'
|
||||
+'Single'#8'ClickDir'#7#6'cdDown'#7'Command'#2#3#9'MoveCaret'#9#6'Option'#2#0
|
||||
+#8'Priority'#2#0#0#1#5'Shift'#11#7'ssShift'#5'ssAlt'#0#9'ShiftMask'#11#7'ssS'
|
||||
+'hift'#5'ssAlt'#0#6'Button'#7#6'mbLeft'#10'ClickCount'#7#8'ccSingle'#8'Click'
|
||||
+'Dir'#7#6'cdDown'#7'Command'#2#3#9'MoveCaret'#9#6'Option'#2#1#8'Priority'#2#0
|
||||
+#0#1#5'Shift'#11#0#9'ShiftMask'#11#0#6'Button'#7#7'mbRight'#10'ClickCount'#7
|
||||
+#8'ccSingle'#8'ClickDir'#7#4'cdUp'#7'Command'#2#12#9'MoveCaret'#8#6'Option'#2
|
||||
+#0#8'Priority'#2#0#0#1#5'Shift'#11#0#9'ShiftMask'#11#0#6'Button'#7#6'mbLeft'
|
||||
+#10'ClickCount'#7#8'ccDouble'#8'ClickDir'#7#6'cdDown'#7'Command'#2#6#9'MoveC'
|
||||
+'aret'#9#6'Option'#2#0#8'Priority'#2#0#0#1#5'Shift'#11#0#9'ShiftMask'#11#0#6
|
||||
+'Button'#7#6'mbLeft'#10'ClickCount'#7#8'ccTriple'#8'ClickDir'#7#6'cdDown'#7
|
||||
+'Command'#2#7#9'MoveCaret'#9#6'Option'#2#0#8'Priority'#2#0#0#1#5'Shift'#11#0
|
||||
+#9'ShiftMask'#11#0#6'Button'#7#6'mbLeft'#10'ClickCount'#7#6'ccQuad'#8'ClickD'
|
||||
+'ir'#7#6'cdDown'#7'Command'#2#8#9'MoveCaret'#9#6'Option'#2#0#8'Priority'#2#0
|
||||
+#0#1#5'Shift'#11#0#9'ShiftMask'#11#0#6'Button'#7#8'mbMiddle'#10'ClickCount'#7
|
||||
+#8'ccSingle'#8'ClickDir'#7#6'cdDown'#7'Command'#2#10#9'MoveCaret'#9#6'Option'
|
||||
+#2#0#8'Priority'#2#0#0#1#5'Shift'#11#6'ssCtrl'#0#9'ShiftMask'#11#7'ssShift'#5
|
||||
+'ssAlt'#6'ssCtrl'#0#6'Button'#7#6'mbLeft'#10'ClickCount'#7#8'ccSingle'#8'Cli'
|
||||
+'ckDir'#7#4'cdUp'#7'Command'#2#11#9'MoveCaret'#8#6'Option'#2#0#8'Priority'#2
|
||||
+#0#0#0#15'MouseSelActions'#14#1#5'Shift'#11#0#9'ShiftMask'#11#0#6'Button'#7#6
|
||||
+'mbLeft'#10'ClickCount'#7#8'ccSingle'#8'ClickDir'#7#6'cdDown'#7'Command'#2#9
|
||||
+#9'MoveCaret'#8#6'Option'#2#0#8'Priority'#2#0#0#0#13'Lines.Strings'#1#6#12'p'
|
||||
+'rogram new;'#6#5'begin'#6#4'end.'#0#21'BracketHighlightStyle'#7#8'sbhsBoth'
|
||||
+#8'OnChange'#7#13'SynEditChange'#16'OnProcessCommand'#7#21'SynEditProcessCom'
|
||||
+'mand'#19'OnSpecialLineColors'#7#24'SynEditSpecialLineColors'#0#244#18'TSynG'
|
||||
+'utterPartList'#0#0#15'TSynGutterMarks'#0#5'Width'#2#23#0#0#20'TSynGutterLin'
|
||||
+'eNumber'#0#5'Width'#2#17#12'MouseActions'#14#0#21'MarkupInfo.Background'#7#9
|
||||
+'clBtnFace'#21'MarkupInfo.Foreground'#7#6'clNone'#10'DigitCount'#2#2#30'Show'
|
||||
+'OnlyLineNumbersMultiplesOf'#2#1#9'ZeroStart'#8#12'LeadingZeros'#8#0#0#17'TS'
|
||||
+'ynGutterChanges'#0#5'Width'#2#4#13'ModifiedColor'#4#252#233#0#0#10'SavedCol'
|
||||
+'or'#7#7'clGreen'#0#0#19'TSynGutterSeparator'#0#5'Width'#2#2#0#0#21'TSynGutt'
|
||||
+'erCodeFolding'#0#12'MouseActions'#14#1#5'Shift'#11#0#9'ShiftMask'#11#0#6'Bu'
|
||||
+'tton'#7#7'mbRight'#10'ClickCount'#7#8'ccSingle'#8'ClickDir'#7#4'cdUp'#7'Com'
|
||||
+'mand'#2#16#9'MoveCaret'#8#6'Option'#2#0#8'Priority'#2#0#0#1#5'Shift'#11#0#9
|
||||
+'ShiftMask'#11#7'ssShift'#0#6'Button'#7#8'mbMiddle'#10'ClickCount'#7#5'ccAny'
|
||||
,#8'ClickDir'#7#6'cdDown'#7'Command'#2#14#9'MoveCaret'#8#6'Option'#2#0#8'Prio'
|
||||
+'rity'#2#0#0#1#5'Shift'#11#7'ssShift'#0#9'ShiftMask'#11#7'ssShift'#0#6'Butto'
|
||||
+'n'#7#8'mbMiddle'#10'ClickCount'#7#5'ccAny'#8'ClickDir'#7#6'cdDown'#7'Comman'
|
||||
+'d'#2#14#9'MoveCaret'#8#6'Option'#2#1#8'Priority'#2#0#0#1#5'Shift'#11#0#9'Sh'
|
||||
+'iftMask'#11#0#6'Button'#7#6'mbLeft'#10'ClickCount'#7#5'ccAny'#8'ClickDir'#7
|
||||
+#6'cdDown'#7'Command'#2#0#9'MoveCaret'#8#6'Option'#2#0#8'Priority'#2#0#0#0#21
|
||||
+'MarkupInfo.Background'#7#6'clNone'#21'MarkupInfo.Foreground'#7#6'clGray'#20
|
||||
+'MouseActionsExpanded'#14#1#5'Shift'#11#0#9'ShiftMask'#11#0#6'Button'#7#6'mb'
|
||||
+'Left'#10'ClickCount'#7#5'ccAny'#8'ClickDir'#7#6'cdDown'#7'Command'#2#14#9'M'
|
||||
+'oveCaret'#8#6'Option'#2#0#8'Priority'#2#0#0#0#21'MouseActionsCollapsed'#14#1
|
||||
+#5'Shift'#11#6'ssCtrl'#0#9'ShiftMask'#11#6'ssCtrl'#0#6'Button'#7#6'mbLeft'#10
|
||||
+'ClickCount'#7#5'ccAny'#8'ClickDir'#7#6'cdDown'#7'Command'#2#15#9'MoveCaret'
|
||||
+#8#6'Option'#2#0#8'Priority'#2#0#0#1#5'Shift'#11#0#9'ShiftMask'#11#6'ssCtrl'
|
||||
+#0#6'Button'#7#6'mbLeft'#10'ClickCount'#7#5'ccAny'#8'ClickDir'#7#6'cdDown'#7
|
||||
+'Command'#2#15#9'MoveCaret'#8#6'Option'#2#1#8'Priority'#2#0#0#0#0#0#0#0#17'T'
|
||||
+'SynFreePascalSyn'#17'SynFreePascalSyn1'#7'Enabled'#8#23'CommentAttri.Foregr'
|
||||
+'ound'#7#6'clBlue'#18'CommentAttri.Style'#11#6'fsBold'#0#26'IdentifierAttri.'
|
||||
+'Foreground'#7#9'clDefault'#22'NumberAttri.Foreground'#7#6'clNavy'#22'String'
|
||||
+'Attri.Foreground'#7#6'clBlue'#22'SymbolAttri.Foreground'#7#5'clRed'#25'Dire'
|
||||
+'ctiveAttri.Foreground'#7#5'clRed'#20'DirectiveAttri.Style'#11#6'fsBold'#0#12
|
||||
+'CompilerMode'#7#9'pcmObjFPC'#14'NestedComments'#9#4'left'#3'@'#1#3'top'#2#16
|
||||
+#0#0#0
|
||||
]);
|
||||
|
@ -1,246 +1,247 @@
|
||||
{
|
||||
This file is part of the Mufasa Macro Library (MML)
|
||||
Copyright (c) 2009 by Raymond van Venetië and Merlijn Wajer
|
||||
|
||||
MML is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
MML is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with MML. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
See the file COPYING, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
framescript for the Mufasa Macro Library
|
||||
}
|
||||
unit framescript;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, SynHighlighterPas, SynEdit, SynEditMarkupHighAll,
|
||||
mmlpsthread,ComCtrls, SynEditKeyCmds, LCLType, SynEditMarkupSpecialLine, Graphics, Controls;
|
||||
|
||||
type
|
||||
TScriptState = (ss_None,ss_Running,ss_Paused,ss_Stopping);
|
||||
{
|
||||
ss_None: Means the script either hasn't been run yet, or it has ended (Succesfully or terminated)
|
||||
ss_Running: Means the script is running as we speak :-)
|
||||
ss_Paused: Means the script is currently in pause modus.
|
||||
ss_Stopping: Means we've asked PS-Script politely to stop the script (next time we press the stop button we won't be that nice).
|
||||
}
|
||||
{ TScriptFrame }
|
||||
|
||||
TScriptFrame = class(TFrame)
|
||||
SynEdit: TSynEdit;
|
||||
SynFreePascalSyn1: TSynFreePascalSyn;
|
||||
procedure SynEditChange(Sender: TObject);
|
||||
procedure SynEditDragDrop(Sender, Source: TObject; X, Y: Integer);
|
||||
procedure SynEditDragOver(Sender, Source: TObject; X, Y: Integer;
|
||||
State: TDragState; var Accept: Boolean);
|
||||
procedure SynEditKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState
|
||||
);
|
||||
procedure SynEditProcessCommand(Sender: TObject;
|
||||
var Command: TSynEditorCommand; var AChar: TUTF8Char; Data: pointer);
|
||||
procedure SynEditSpecialLineColors(Sender: TObject; Line: integer;
|
||||
var Special: boolean; var FG, BG: TColor);
|
||||
private
|
||||
OwnerPage : TPageControl;
|
||||
OwnerSheet : TTabSheet;//The owner TTabsheet -> For title setting
|
||||
public
|
||||
ScriptErrorLine : integer; //Highlight the error line!
|
||||
ScriptFile : string;//The path to the saved/opened file currently in the SynEdit
|
||||
StartText : string;//The text synedit holds upon start/open/save
|
||||
ScriptName : string;//The name of the currently opened/saved file.
|
||||
ScriptDefault : string;//The default script e.g. program new; begin end.
|
||||
ScriptChanged : boolean;//We need this for that little * (edited star).
|
||||
ScriptThread : TMMLPSThread;//Just one thread for now..
|
||||
FScriptState : TScriptState;//Stores the ScriptState, if you want the Run/Pause/Start buttons to change accordingly, acces through Form1
|
||||
procedure undo;
|
||||
procedure redo;
|
||||
procedure ErrorThread(ErrorAtLine,ErrorPosition : integer; ErrorStr : string; ErrorType : TErrorType);
|
||||
procedure MakeActiveScriptFrame;
|
||||
procedure ScriptThreadTerminate(Sender: TObject);
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
implementation
|
||||
uses
|
||||
TestUnit, SynEditTypes, LCLIntF, StrUtils;
|
||||
|
||||
{ TScriptFrame }
|
||||
|
||||
procedure TScriptFrame.SynEditChange(Sender: TObject);
|
||||
begin
|
||||
ScriptErrorLine:= -1;
|
||||
if not ScriptChanged then
|
||||
begin;
|
||||
ScriptChanged:= True;
|
||||
Form1.Caption:= Format(WindowTitle,[ScriptName + '*']);
|
||||
OwnerSheet.Caption:=ScriptName + '*';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TScriptFrame.SynEditDragDrop(Sender, Source: TObject; X, Y: Integer);
|
||||
begin
|
||||
SynEdit.InsertTextAtCaret('will implement later');
|
||||
end;
|
||||
|
||||
procedure TScriptFrame.SynEditDragOver(Sender, Source: TObject; X, Y: Integer;
|
||||
State: TDragState; var Accept: Boolean);
|
||||
begin
|
||||
Accept := Source = Form1.frmFunctionList;
|
||||
if(Accept)then
|
||||
begin
|
||||
SynEdit.CaretXY := SynEdit.PixelsToLogicalPos(point(x, y));
|
||||
if(not(Form1.Active))then Form1.BringToFront;
|
||||
if(Form1.ActiveControl <> SynEdit)then Form1.ActiveControl := SynEdit;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TScriptFrame.SynEditKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
begin
|
||||
if key = VK_F3 then
|
||||
begin;
|
||||
Form1.ActionFindNextExecute(Sender);
|
||||
key := 0;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TScriptFrame.SynEditProcessCommand(Sender: TObject;
|
||||
var Command: TSynEditorCommand; var AChar: TUTF8Char; Data: pointer);
|
||||
begin
|
||||
if Command = ecUndo then
|
||||
begin;
|
||||
Command:= ecNone;
|
||||
Self.Undo;
|
||||
end else
|
||||
if Command = ecRedo then
|
||||
begin;
|
||||
Command := ecNone;
|
||||
Self.Redo;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TScriptFrame.SynEditSpecialLineColors(Sender: TObject;
|
||||
Line: integer; var Special: boolean; var FG, BG: TColor);
|
||||
begin
|
||||
if line = ScriptErrorLine then
|
||||
begin;
|
||||
Special := true;
|
||||
BG := $50a0ff;
|
||||
FG := 0;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TScriptFrame.undo;
|
||||
begin
|
||||
SynEdit.Undo;
|
||||
if ScriptChanged then
|
||||
if SynEdit.Lines.Text = StartText then
|
||||
begin;
|
||||
Form1.Caption:= format(WindowTitle,[ScriptName]);
|
||||
OwnerSheet.Caption:= ScriptName;
|
||||
ScriptChanged := false;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TScriptFrame.redo;
|
||||
begin
|
||||
SynEdit.Redo;
|
||||
if ScriptChanged then
|
||||
if SynEdit.Lines.Text = StartText then
|
||||
begin;
|
||||
Form1.Caption:= format(WindowTitle,[ScriptName]);
|
||||
OwnerSheet.Caption := ScriptName;
|
||||
ScriptChanged := false;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TScriptFrame.ErrorThread(ErrorAtLine, ErrorPosition: integer;
|
||||
ErrorStr: string; ErrorType: TErrorType);
|
||||
begin
|
||||
MakeActiveScriptFrame;
|
||||
ScriptErrorLine:= ErrorAtLine;
|
||||
SynEdit.Invalidate;
|
||||
SynEdit.SelStart:= ErrorPosition;
|
||||
formWriteln(Format('Error: %s at line %d',[errorstr,erroratline]));
|
||||
end;
|
||||
|
||||
procedure TScriptFrame.MakeActiveScriptFrame;
|
||||
var
|
||||
i : integer;
|
||||
begin
|
||||
if Form1.Visible then
|
||||
for i := 0 to OwnerPage.PageCount - 1 do
|
||||
if OwnerPage.Pages[i] = OwnerSheet then
|
||||
begin;
|
||||
OwnerPage.TabIndex := i;
|
||||
if OwnerSheet.CanFocus then
|
||||
OwnerSheet.SetFocus;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TScriptFrame.ScriptThreadTerminate(Sender: TObject);
|
||||
begin
|
||||
FScriptState:= ss_None;
|
||||
Form1.RefreshTab;
|
||||
end;
|
||||
|
||||
constructor TScriptFrame.Create(TheOwner: TComponent);
|
||||
var
|
||||
MarkCaret : TSynEditMarkupHighlightAllCaret;
|
||||
begin
|
||||
inherited Create(TheOwner);
|
||||
OwnerSheet := TTabSheet(TheOwner);
|
||||
OwnerPage := TPageControl(OwnerSheet.Owner);
|
||||
StartText:= SynEdit.Lines.text;
|
||||
ScriptDefault:= StartText;
|
||||
ScriptName:= 'Untitled';
|
||||
ScriptChanged := false;
|
||||
FScriptState:= ss_None;
|
||||
ScriptErrorLine:= -1;
|
||||
OwnerSheet.Caption:= ScriptName;
|
||||
SynEdit.IncrementColor.Background := $30D070;
|
||||
SynEdit.HighlightAllColor.Background:= clYellow;
|
||||
SynEdit.HighlightAllColor.Foreground:= clDefault;
|
||||
MarkCaret := TSynEditMarkupHighlightAllCaret(SynEdit.MarkupByClass[TSynEditMarkupHighlightAllCaret]);
|
||||
if assigned(MarkCaret) then
|
||||
begin
|
||||
with MarkCaret.MarkupInfo do
|
||||
begin;
|
||||
Background :=$E6E6E6;
|
||||
FrameColor := clGray;
|
||||
end;
|
||||
MarkCaret.Enabled := True;
|
||||
MarkCaret.FullWord:= True;
|
||||
MarkCaret.FullWordMaxLen:= 3;
|
||||
MarkCaret.WaitTime := 1500;
|
||||
MarkCaret.IgnoreKeywords := true;
|
||||
end;
|
||||
end;
|
||||
|
||||
destructor TScriptFrame.Destroy;
|
||||
begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I framescript.lrs}
|
||||
|
||||
end.
|
||||
|
||||
{
|
||||
This file is part of the Mufasa Macro Library (MML)
|
||||
Copyright (c) 2009 by Raymond van Venetië and Merlijn Wajer
|
||||
|
||||
MML is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
MML is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with MML. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
See the file COPYING, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
framescript for the Mufasa Macro Library
|
||||
}
|
||||
unit framescript;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, SynHighlighterPas, SynEdit, SynEditMarkupHighAll,
|
||||
mmlpsthread,ComCtrls, SynEditKeyCmds, LCLType, SynEditMarkupSpecialLine, Graphics, Controls;
|
||||
|
||||
type
|
||||
TScriptState = (ss_None,ss_Running,ss_Paused,ss_Stopping);
|
||||
{
|
||||
ss_None: Means the script either hasn't been run yet, or it has ended (Succesfully or terminated)
|
||||
ss_Running: Means the script is running as we speak :-)
|
||||
ss_Paused: Means the script is currently in pause modus.
|
||||
ss_Stopping: Means we've asked PS-Script politely to stop the script (next time we press the stop button we won't be that nice).
|
||||
}
|
||||
{ TScriptFrame }
|
||||
|
||||
TScriptFrame = class(TFrame)
|
||||
SynEdit: TSynEdit;
|
||||
SynFreePascalSyn1: TSynFreePascalSyn;
|
||||
procedure SynEditChange(Sender: TObject);
|
||||
procedure SynEditDragDrop(Sender, Source: TObject; X, Y: Integer);
|
||||
procedure SynEditDragOver(Sender, Source: TObject; X, Y: Integer;
|
||||
State: TDragState; var Accept: Boolean);
|
||||
procedure SynEditKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState
|
||||
);
|
||||
procedure SynEditProcessCommand(Sender: TObject;
|
||||
var Command: TSynEditorCommand; var AChar: TUTF8Char; Data: pointer);
|
||||
procedure SynEditSpecialLineColors(Sender: TObject; Line: integer;
|
||||
var Special: boolean; var FG, BG: TColor);
|
||||
private
|
||||
OwnerPage : TPageControl;
|
||||
OwnerSheet : TTabSheet;//The owner TTabsheet -> For title setting
|
||||
public
|
||||
ScriptErrorLine : integer; //Highlight the error line!
|
||||
ScriptFile : string;//The path to the saved/opened file currently in the SynEdit
|
||||
StartText : string;//The text synedit holds upon start/open/save
|
||||
ScriptName : string;//The name of the currently opened/saved file.
|
||||
ScriptDefault : string;//The default script e.g. program new; begin end.
|
||||
ScriptChanged : boolean;//We need this for that little * (edited star).
|
||||
ScriptThread : TMMLPSThread;//Just one thread for now..
|
||||
FScriptState : TScriptState;//Stores the ScriptState, if you want the Run/Pause/Start buttons to change accordingly, acces through Form1
|
||||
procedure undo;
|
||||
procedure redo;
|
||||
procedure ErrorThread(ErrorAtLine,ErrorPosition : integer; ErrorStr : string; ErrorType : TErrorType);
|
||||
procedure MakeActiveScriptFrame;
|
||||
procedure ScriptThreadTerminate(Sender: TObject);
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
implementation
|
||||
uses
|
||||
TestUnit, SynEditTypes, LCLIntF, StrUtils,framefunctionlist;
|
||||
|
||||
{ TScriptFrame }
|
||||
|
||||
procedure TScriptFrame.SynEditChange(Sender: TObject);
|
||||
begin
|
||||
ScriptErrorLine:= -1;
|
||||
if not ScriptChanged then
|
||||
begin;
|
||||
ScriptChanged:= True;
|
||||
Form1.Caption:= Format(WindowTitle,[ScriptName + '*']);
|
||||
OwnerSheet.Caption:=ScriptName + '*';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TScriptFrame.SynEditDragDrop(Sender, Source: TObject; X, Y: Integer);
|
||||
begin
|
||||
if TFunctionListFrame(Source).DraggingNode.Data <> nil then
|
||||
SynEdit.InsertTextAtCaret(PChar(TFunctionListFrame(Source).DraggingNode.Data));
|
||||
end;
|
||||
|
||||
procedure TScriptFrame.SynEditDragOver(Sender, Source: TObject; X, Y: Integer;
|
||||
State: TDragState; var Accept: Boolean);
|
||||
begin
|
||||
Accept := Source = Form1.frmFunctionList;
|
||||
if(Accept)then
|
||||
begin
|
||||
SynEdit.CaretXY := SynEdit.PixelsToLogicalPos(point(x, y));
|
||||
if(not(Form1.Active))then Form1.BringToFront;
|
||||
if(Form1.ActiveControl <> SynEdit)then Form1.ActiveControl := SynEdit;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TScriptFrame.SynEditKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
begin
|
||||
if key = VK_F3 then
|
||||
begin;
|
||||
Form1.ActionFindNextExecute(Sender);
|
||||
key := 0;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TScriptFrame.SynEditProcessCommand(Sender: TObject;
|
||||
var Command: TSynEditorCommand; var AChar: TUTF8Char; Data: pointer);
|
||||
begin
|
||||
if Command = ecUndo then
|
||||
begin;
|
||||
Command:= ecNone;
|
||||
Self.Undo;
|
||||
end else
|
||||
if Command = ecRedo then
|
||||
begin;
|
||||
Command := ecNone;
|
||||
Self.Redo;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TScriptFrame.SynEditSpecialLineColors(Sender: TObject;
|
||||
Line: integer; var Special: boolean; var FG, BG: TColor);
|
||||
begin
|
||||
if line = ScriptErrorLine then
|
||||
begin;
|
||||
Special := true;
|
||||
BG := $50a0ff;
|
||||
FG := 0;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TScriptFrame.undo;
|
||||
begin
|
||||
SynEdit.Undo;
|
||||
if ScriptChanged then
|
||||
if SynEdit.Lines.Text = StartText then
|
||||
begin;
|
||||
Form1.Caption:= format(WindowTitle,[ScriptName]);
|
||||
OwnerSheet.Caption:= ScriptName;
|
||||
ScriptChanged := false;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TScriptFrame.redo;
|
||||
begin
|
||||
SynEdit.Redo;
|
||||
if ScriptChanged then
|
||||
if SynEdit.Lines.Text = StartText then
|
||||
begin;
|
||||
Form1.Caption:= format(WindowTitle,[ScriptName]);
|
||||
OwnerSheet.Caption := ScriptName;
|
||||
ScriptChanged := false;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TScriptFrame.ErrorThread(ErrorAtLine, ErrorPosition: integer;
|
||||
ErrorStr: string; ErrorType: TErrorType);
|
||||
begin
|
||||
MakeActiveScriptFrame;
|
||||
ScriptErrorLine:= ErrorAtLine;
|
||||
SynEdit.Invalidate;
|
||||
SynEdit.SelStart:= ErrorPosition;
|
||||
formWriteln(Format('Error: %s at line %d',[errorstr,erroratline]));
|
||||
end;
|
||||
|
||||
procedure TScriptFrame.MakeActiveScriptFrame;
|
||||
var
|
||||
i : integer;
|
||||
begin
|
||||
if Form1.Visible then
|
||||
for i := 0 to OwnerPage.PageCount - 1 do
|
||||
if OwnerPage.Pages[i] = OwnerSheet then
|
||||
begin;
|
||||
OwnerPage.TabIndex := i;
|
||||
if OwnerSheet.CanFocus then
|
||||
OwnerSheet.SetFocus;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TScriptFrame.ScriptThreadTerminate(Sender: TObject);
|
||||
begin
|
||||
FScriptState:= ss_None;
|
||||
Form1.RefreshTab;
|
||||
end;
|
||||
|
||||
constructor TScriptFrame.Create(TheOwner: TComponent);
|
||||
var
|
||||
MarkCaret : TSynEditMarkupHighlightAllCaret;
|
||||
begin
|
||||
inherited Create(TheOwner);
|
||||
OwnerSheet := TTabSheet(TheOwner);
|
||||
OwnerPage := TPageControl(OwnerSheet.Owner);
|
||||
StartText:= SynEdit.Lines.text;
|
||||
ScriptDefault:= StartText;
|
||||
ScriptName:= 'Untitled';
|
||||
ScriptChanged := false;
|
||||
FScriptState:= ss_None;
|
||||
ScriptErrorLine:= -1;
|
||||
OwnerSheet.Caption:= ScriptName;
|
||||
SynEdit.IncrementColor.Background := $30D070;
|
||||
SynEdit.HighlightAllColor.Background:= clYellow;
|
||||
SynEdit.HighlightAllColor.Foreground:= clDefault;
|
||||
MarkCaret := TSynEditMarkupHighlightAllCaret(SynEdit.MarkupByClass[TSynEditMarkupHighlightAllCaret]);
|
||||
if assigned(MarkCaret) then
|
||||
begin
|
||||
with MarkCaret.MarkupInfo do
|
||||
begin;
|
||||
Background :=$E6E6E6;
|
||||
FrameColor := clGray;
|
||||
end;
|
||||
MarkCaret.Enabled := True;
|
||||
MarkCaret.FullWord:= True;
|
||||
MarkCaret.FullWordMaxLen:= 3;
|
||||
MarkCaret.WaitTime := 1500;
|
||||
MarkCaret.IgnoreKeywords := true;
|
||||
end;
|
||||
end;
|
||||
|
||||
destructor TScriptFrame.Destroy;
|
||||
begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I framescript.lrs}
|
||||
|
||||
end.
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
<TargetFileExt Value=""/>
|
||||
<Title Value="Mufasa Stand Alone"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<ActiveEditorIndexAtStart Value="8"/>
|
||||
<ActiveEditorIndexAtStart Value="7"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<ProjectVersion Value=""/>
|
||||
@ -36,14 +36,14 @@
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="270">
|
||||
<Units Count="264">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="project1"/>
|
||||
<CursorPos X="100" Y="21"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="16"/>
|
||||
<EditorIndex Value="18"/>
|
||||
<UsageCount Value="205"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit0>
|
||||
@ -139,8 +139,8 @@
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="TestUnit"/>
|
||||
<CursorPos X="57" Y="467"/>
|
||||
<TopLine Value="449"/>
|
||||
<CursorPos X="28" Y="1149"/>
|
||||
<TopLine Value="1130"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<UsageCount Value="202"/>
|
||||
<Loaded Value="True"/>
|
||||
@ -208,7 +208,7 @@
|
||||
<UnitName Value="MufasaTypes"/>
|
||||
<CursorPos X="3" Y="34"/>
|
||||
<TopLine Value="16"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<EditorIndex Value="8"/>
|
||||
<UsageCount Value="201"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit22>
|
||||
@ -249,7 +249,7 @@
|
||||
<UnitName Value="windowutil"/>
|
||||
<CursorPos X="56" Y="17"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="20"/>
|
||||
<EditorIndex Value="22"/>
|
||||
<UsageCount Value="95"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit27>
|
||||
@ -266,7 +266,7 @@
|
||||
<UnitName Value="finder"/>
|
||||
<CursorPos X="58" Y="23"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="11"/>
|
||||
<EditorIndex Value="13"/>
|
||||
<UsageCount Value="201"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit29>
|
||||
@ -350,7 +350,7 @@
|
||||
<Filename Value="../../Units/MMLAddon/PSInc/pscompile.inc"/>
|
||||
<CursorPos X="117" Y="32"/>
|
||||
<TopLine Value="4"/>
|
||||
<EditorIndex Value="18"/>
|
||||
<EditorIndex Value="20"/>
|
||||
<UsageCount Value="100"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit41>
|
||||
@ -652,7 +652,7 @@
|
||||
<UnitName Value="dtm"/>
|
||||
<CursorPos X="62" Y="135"/>
|
||||
<TopLine Value="12"/>
|
||||
<EditorIndex Value="17"/>
|
||||
<EditorIndex Value="19"/>
|
||||
<UsageCount Value="200"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit86>
|
||||
@ -669,7 +669,7 @@
|
||||
<UnitName Value="colourpicker"/>
|
||||
<CursorPos X="93" Y="170"/>
|
||||
<TopLine Value="155"/>
|
||||
<EditorIndex Value="13"/>
|
||||
<EditorIndex Value="15"/>
|
||||
<UsageCount Value="201"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit88>
|
||||
@ -696,7 +696,7 @@
|
||||
<UnitName Value="windowselector"/>
|
||||
<CursorPos X="54" Y="139"/>
|
||||
<TopLine Value="116"/>
|
||||
<EditorIndex Value="12"/>
|
||||
<EditorIndex Value="14"/>
|
||||
<UsageCount Value="201"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit91>
|
||||
@ -732,7 +732,7 @@
|
||||
<UnitName Value="dtmutil"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="151"/>
|
||||
<EditorIndex Value="15"/>
|
||||
<EditorIndex Value="17"/>
|
||||
<UsageCount Value="206"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit96>
|
||||
@ -747,7 +747,7 @@
|
||||
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/dtm.inc"/>
|
||||
<CursorPos X="33" Y="34"/>
|
||||
<TopLine Value="30"/>
|
||||
<EditorIndex Value="19"/>
|
||||
<EditorIndex Value="21"/>
|
||||
<UsageCount Value="54"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit98>
|
||||
@ -814,7 +814,7 @@
|
||||
<UnitName Value="ocr"/>
|
||||
<CursorPos X="24" Y="161"/>
|
||||
<TopLine Value="145"/>
|
||||
<EditorIndex Value="7"/>
|
||||
<EditorIndex Value="9"/>
|
||||
<UsageCount Value="200"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit107>
|
||||
@ -1135,9 +1135,11 @@
|
||||
<ComponentName Value="ScriptFrame"/>
|
||||
<ResourceBaseClass Value="Frame"/>
|
||||
<UnitName Value="framescript"/>
|
||||
<CursorPos X="59" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="22" Y="82"/>
|
||||
<TopLine Value="79"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<UsageCount Value="200"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit151>
|
||||
<Unit152>
|
||||
<Filename Value="framesynedit.lrs"/>
|
||||
@ -1359,7 +1361,7 @@
|
||||
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/ocr.inc"/>
|
||||
<CursorPos X="55" Y="4"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="10"/>
|
||||
<EditorIndex Value="12"/>
|
||||
<UsageCount Value="42"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit185>
|
||||
@ -1762,317 +1764,278 @@
|
||||
<UsageCount Value="4"/>
|
||||
</Unit242>
|
||||
<Unit243>
|
||||
<Filename Value="../../../../Documents/lazarus/lcl/lclintf.pas"/>
|
||||
<UnitName Value="LCLIntf"/>
|
||||
<CursorPos X="77" Y="75"/>
|
||||
<TopLine Value="67"/>
|
||||
<UsageCount Value="4"/>
|
||||
</Unit243>
|
||||
<Unit244>
|
||||
<Filename Value="../../../../Documents/fpc/rtl/inc/systemh.inc"/>
|
||||
<Filename Value="../../../Documents/fpc/rtl/inc/systemh.inc"/>
|
||||
<CursorPos X="35" Y="574"/>
|
||||
<TopLine Value="558"/>
|
||||
<UsageCount Value="4"/>
|
||||
</Unit244>
|
||||
<Unit245>
|
||||
<Filename Value="../../../../Documents/fpc/rtl/linux/linux.pp"/>
|
||||
</Unit243>
|
||||
<Unit244>
|
||||
<Filename Value="../../../Documents/fpc/rtl/linux/linux.pp"/>
|
||||
<UnitName Value="Linux"/>
|
||||
<CursorPos X="65" Y="26"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="5"/>
|
||||
</Unit245>
|
||||
<Unit246>
|
||||
<Filename Value="../../../../Documents/fpc/packages/libc/src/libc.pp"/>
|
||||
</Unit244>
|
||||
<Unit245>
|
||||
<Filename Value="../../../Documents/fpc/packages/libc/src/libc.pp"/>
|
||||
<UnitName Value="libc"/>
|
||||
<CursorPos X="10" Y="66"/>
|
||||
<TopLine Value="46"/>
|
||||
<UsageCount Value="4"/>
|
||||
</Unit246>
|
||||
<Unit247>
|
||||
<Filename Value="../../../../Documents/fpc/packages/libc/src/unistdh.inc"/>
|
||||
</Unit245>
|
||||
<Unit246>
|
||||
<Filename Value="../../../Documents/fpc/packages/libc/src/unistdh.inc"/>
|
||||
<CursorPos X="115" Y="195"/>
|
||||
<TopLine Value="162"/>
|
||||
<UsageCount Value="4"/>
|
||||
</Unit247>
|
||||
<Unit248>
|
||||
<Filename Value="../../../../../../usr/lib/lazarus/components/mouseandkeyinput/keyinputintf.pas"/>
|
||||
</Unit246>
|
||||
<Unit247>
|
||||
<Filename Value="../../../usr/lib/lazarus/components/mouseandkeyinput/keyinputintf.pas"/>
|
||||
<UnitName Value="KeyInputIntf"/>
|
||||
<CursorPos X="16" Y="50"/>
|
||||
<TopLine Value="47"/>
|
||||
<UsageCount Value="7"/>
|
||||
</Unit248>
|
||||
<Unit249>
|
||||
</Unit247>
|
||||
<Unit248>
|
||||
<Filename Value="project1.lpi"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="4"/>
|
||||
<SyntaxHighlighter Value="XML"/>
|
||||
</Unit249>
|
||||
<Unit250>
|
||||
</Unit248>
|
||||
<Unit249>
|
||||
<Filename Value="../../Units/MMLCore/ocrutil.pas"/>
|
||||
<UnitName Value="ocrutil"/>
|
||||
<CursorPos X="78" Y="32"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="9"/>
|
||||
<EditorIndex Value="11"/>
|
||||
<UsageCount Value="42"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit250>
|
||||
<Unit251>
|
||||
<Filename Value="../../../../Documents/fpc/rtl/objpas/sysutils/filutilh.inc"/>
|
||||
</Unit249>
|
||||
<Unit250>
|
||||
<Filename Value="../../../Documents/fpc/rtl/objpas/sysutils/filutilh.inc"/>
|
||||
<CursorPos X="25" Y="87"/>
|
||||
<TopLine Value="62"/>
|
||||
<UsageCount Value="4"/>
|
||||
</Unit251>
|
||||
<Unit252>
|
||||
<Filename Value="../../../../Documents/lazarus/lcl/graphics.pp"/>
|
||||
<UnitName Value="Graphics"/>
|
||||
<CursorPos X="69" Y="249"/>
|
||||
<TopLine Value="236"/>
|
||||
<UsageCount Value="4"/>
|
||||
</Unit252>
|
||||
<Unit253>
|
||||
<Filename Value="../../../../Documents/fpc/packages/x11/src/xlib.pp"/>
|
||||
<UnitName Value="xlib"/>
|
||||
<CursorPos X="10" Y="1831"/>
|
||||
<TopLine Value="1811"/>
|
||||
<UsageCount Value="4"/>
|
||||
</Unit253>
|
||||
<Unit254>
|
||||
<Filename Value="../../../../Documents/lazarus/lcl/intfgraphics.pas"/>
|
||||
</Unit250>
|
||||
<Unit251>
|
||||
<Filename Value="../../../Documents/lazarus/lcl/intfgraphics.pas"/>
|
||||
<UnitName Value="IntfGraphics"/>
|
||||
<CursorPos X="37" Y="3116"/>
|
||||
<TopLine Value="3105"/>
|
||||
<UsageCount Value="18"/>
|
||||
</Unit254>
|
||||
<Unit255>
|
||||
<Filename Value="../../../../Documents/lazarus/lcl/include/winapih.inc"/>
|
||||
<CursorPos X="10" Y="177"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="5"/>
|
||||
</Unit255>
|
||||
<Unit256>
|
||||
<Filename Value="../../../../Documents/lazarus/lcl/lcltype.pp"/>
|
||||
<UnitName Value="LCLType"/>
|
||||
<CursorPos X="3" Y="673"/>
|
||||
<TopLine Value="653"/>
|
||||
<UsageCount Value="5"/>
|
||||
</Unit256>
|
||||
<Unit257>
|
||||
<Filename Value="../../../../Documents/lazarus/lcl/comctrls.pp"/>
|
||||
<UnitName Value="ComCtrls"/>
|
||||
<CursorPos X="9" Y="2978"/>
|
||||
<TopLine Value="2957"/>
|
||||
<UsageCount Value="7"/>
|
||||
</Unit257>
|
||||
<Unit258>
|
||||
<Filename Value="../../../../Documents/lazarus/lcl/include/treeview.inc"/>
|
||||
</Unit251>
|
||||
<Unit252>
|
||||
<Filename Value="../../../Documents/lazarus/lcl/include/treeview.inc"/>
|
||||
<CursorPos X="44" Y="276"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="6"/>
|
||||
</Unit258>
|
||||
<Unit259>
|
||||
<Filename Value="../../../../Documents/lazarus/lcl/imglist.pp"/>
|
||||
</Unit252>
|
||||
<Unit253>
|
||||
<Filename Value="../../../Documents/lazarus/lcl/imglist.pp"/>
|
||||
<UnitName Value="ImgList"/>
|
||||
<CursorPos X="15" Y="170"/>
|
||||
<TopLine Value="138"/>
|
||||
<UsageCount Value="7"/>
|
||||
</Unit259>
|
||||
<Unit260>
|
||||
<Filename Value="../../../../Documents/lazarus/lcl/include/graphic.inc"/>
|
||||
</Unit253>
|
||||
<Unit254>
|
||||
<Filename Value="../../../Documents/lazarus/lcl/include/graphic.inc"/>
|
||||
<CursorPos X="1" Y="177"/>
|
||||
<TopLine Value="157"/>
|
||||
<UsageCount Value="6"/>
|
||||
</Unit260>
|
||||
<Unit261>
|
||||
<Filename Value="../../../../../../usr/local/share/lazarus/lcl/controls.pp"/>
|
||||
</Unit254>
|
||||
<Unit255>
|
||||
<Filename Value="../../../usr/local/share/lazarus/lcl/controls.pp"/>
|
||||
<UnitName Value="Controls"/>
|
||||
<CursorPos X="5" Y="288"/>
|
||||
<TopLine Value="276"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit261>
|
||||
<Unit262>
|
||||
<Filename Value="../../../../../../usr/local/share/lazarus/lcl/forms.pp"/>
|
||||
</Unit255>
|
||||
<Unit256>
|
||||
<Filename Value="../../../usr/local/share/lazarus/lcl/forms.pp"/>
|
||||
<UnitName Value="Forms"/>
|
||||
<CursorPos X="22" Y="671"/>
|
||||
<TopLine Value="657"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit262>
|
||||
<Unit263>
|
||||
</Unit256>
|
||||
<Unit257>
|
||||
<Filename Value="framefunctionlist.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="FunctionListFrame"/>
|
||||
<ResourceBaseClass Value="Frame"/>
|
||||
<UnitName Value="framefunctionlist"/>
|
||||
<CursorPos X="46" Y="76"/>
|
||||
<TopLine Value="45"/>
|
||||
<CursorPos X="29" Y="79"/>
|
||||
<TopLine Value="70"/>
|
||||
<EditorIndex Value="7"/>
|
||||
<UsageCount Value="28"/>
|
||||
</Unit263>
|
||||
<Unit264>
|
||||
<Filename Value="../../../../../../usr/local/share/lazarus/lcl/comctrls.pp"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit257>
|
||||
<Unit258>
|
||||
<Filename Value="../../../usr/local/share/lazarus/lcl/comctrls.pp"/>
|
||||
<UnitName Value="ComCtrls"/>
|
||||
<CursorPos X="3" Y="2630"/>
|
||||
<TopLine Value="2626"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit264>
|
||||
<Unit265>
|
||||
<Filename Value="../../../../../../usr/local/share/lazarus/lcl/graphics.pp"/>
|
||||
</Unit258>
|
||||
<Unit259>
|
||||
<Filename Value="../../../usr/local/share/lazarus/lcl/graphics.pp"/>
|
||||
<UnitName Value="Graphics"/>
|
||||
<CursorPos X="3" Y="258"/>
|
||||
<TopLine Value="246"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit265>
|
||||
<Unit266>
|
||||
<Filename Value="../../../../FPC/FPCSVN/rtl/inc/varianth.inc"/>
|
||||
</Unit259>
|
||||
<Unit260>
|
||||
<Filename Value="../../../FPC/FPCSVN/rtl/inc/varianth.inc"/>
|
||||
<CursorPos X="10" Y="503"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit266>
|
||||
<Unit267>
|
||||
</Unit260>
|
||||
<Unit261>
|
||||
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
|
||||
<UnitName Value="fontloader"/>
|
||||
<CursorPos X="58" Y="217"/>
|
||||
<TopLine Value="185"/>
|
||||
<EditorIndex Value="8"/>
|
||||
<CursorPos X="19" Y="200"/>
|
||||
<TopLine Value="183"/>
|
||||
<EditorIndex Value="10"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit267>
|
||||
<Unit268>
|
||||
</Unit261>
|
||||
<Unit262>
|
||||
<Filename Value="../../Units/MMLCore/mufasatypesutil.pas"/>
|
||||
<UnitName Value="mufasatypesutil"/>
|
||||
<CursorPos X="69" Y="43"/>
|
||||
<TopLine Value="23"/>
|
||||
<EditorIndex Value="14"/>
|
||||
<EditorIndex Value="16"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit268>
|
||||
<Unit269>
|
||||
</Unit262>
|
||||
<Unit263>
|
||||
<Filename Value="../../Units/MMLCore/ocrold.pas"/>
|
||||
<UnitName Value="ocr"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="441"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit269>
|
||||
</Unit263>
|
||||
</Units>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1237" Column="46" TopLine="1225"/>
|
||||
<Caret Line="3" Column="50" TopLine="1"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1251" Column="43" TopLine="1239"/>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="77" Column="57" TopLine="58"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1261" Column="63" TopLine="1239"/>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="31" Column="28" TopLine="1"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1271" Column="41" TopLine="1259"/>
|
||||
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
|
||||
<Caret Line="114" Column="45" TopLine="79"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1276" Column="43" TopLine="1259"/>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="134" Column="19" TopLine="115"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="33" Column="82" TopLine="25"/>
|
||||
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
|
||||
<Caret Line="200" Column="15" TopLine="178"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="3" Column="50" TopLine="1"/>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="150" Column="41" TopLine="132"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="77" Column="57" TopLine="58"/>
|
||||
<Caret Line="153" Column="52" TopLine="132"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="31" Column="28" TopLine="1"/>
|
||||
<Caret Line="40" Column="72" TopLine="23"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
|
||||
<Caret Line="114" Column="45" TopLine="79"/>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="560" Column="40" TopLine="542"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="134" Column="19" TopLine="115"/>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="5" Column="123" TopLine="1"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
|
||||
<Caret Line="200" Column="15" TopLine="178"/>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="150" Column="32" TopLine="132"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="150" Column="41" TopLine="132"/>
|
||||
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
|
||||
<Caret Line="187" Column="37" TopLine="170"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="153" Column="52" TopLine="132"/>
|
||||
<Caret Line="145" Column="72" TopLine="132"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="40" Column="72" TopLine="23"/>
|
||||
<Caret Line="148" Column="30" TopLine="124"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="560" Column="40" TopLine="542"/>
|
||||
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
|
||||
<Caret Line="72" Column="10" TopLine="56"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="5" Column="123" TopLine="1"/>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="159" Column="1" TopLine="144"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="150" Column="32" TopLine="132"/>
|
||||
<Caret Line="41" Column="24" TopLine="21"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
|
||||
<Caret Line="187" Column="37" TopLine="170"/>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="467" Column="57" TopLine="441"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="145" Column="72" TopLine="132"/>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="454" Column="44" TopLine="446"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="148" Column="30" TopLine="124"/>
|
||||
<Caret Line="161" Column="24" TopLine="145"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
|
||||
<Caret Line="72" Column="10" TopLine="56"/>
|
||||
<Caret Line="101" Column="11" TopLine="79"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="159" Column="1" TopLine="144"/>
|
||||
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
|
||||
<Caret Line="117" Column="3" TopLine="103"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="41" Column="24" TopLine="21"/>
|
||||
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
|
||||
<Caret Line="114" Column="2" TopLine="94"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="467" Column="57" TopLine="441"/>
|
||||
<Caret Line="467" Column="57" TopLine="449"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="454" Column="44" TopLine="446"/>
|
||||
<Caret Line="468" Column="57" TopLine="449"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="161" Column="24" TopLine="145"/>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="470" Column="57" TopLine="449"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
|
||||
<Caret Line="101" Column="11" TopLine="79"/>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1127" Column="30" TopLine="1118"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
|
||||
<Caret Line="117" Column="3" TopLine="103"/>
|
||||
<Filename Value="framescript.pas"/>
|
||||
<Caret Line="1" Column="59" TopLine="1"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
|
||||
<Caret Line="114" Column="2" TopLine="94"/>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1167" Column="56" TopLine="1162"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
|
@ -1,11 +1,11 @@
|
||||
object Form1: TForm1
|
||||
Left = 474
|
||||
Left = 274
|
||||
Height = 557
|
||||
Top = 246
|
||||
Top = 233
|
||||
Width = 732
|
||||
ActiveControl = ScriptPanel
|
||||
Caption = 'THA FUKING MUFASA'
|
||||
ClientHeight = 532
|
||||
ClientHeight = 537
|
||||
ClientWidth = 732
|
||||
KeyPreview = True
|
||||
Menu = MainMenu1
|
||||
@ -166,8 +166,8 @@ object Form1: TForm1
|
||||
end
|
||||
object StatusBar: TStatusBar
|
||||
Left = 0
|
||||
Height = 21
|
||||
Top = 511
|
||||
Height = 23
|
||||
Top = 514
|
||||
Width = 732
|
||||
Panels = <
|
||||
item
|
||||
@ -185,7 +185,7 @@ object Form1: TForm1
|
||||
object PanelMemo: TPanel
|
||||
Left = 0
|
||||
Height = 154
|
||||
Top = 357
|
||||
Top = 360
|
||||
Width = 732
|
||||
Align = alBottom
|
||||
ClientHeight = 154
|
||||
@ -205,19 +205,19 @@ object Form1: TForm1
|
||||
Cursor = crVSplit
|
||||
Left = 0
|
||||
Height = 5
|
||||
Top = 352
|
||||
Top = 355
|
||||
Width = 732
|
||||
Align = alBottom
|
||||
ResizeAnchor = akBottom
|
||||
end
|
||||
object ScriptPanel: TPanel
|
||||
Left = 0
|
||||
Height = 328
|
||||
Height = 331
|
||||
Top = 24
|
||||
Width = 732
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 328
|
||||
ClientHeight = 331
|
||||
ClientWidth = 732
|
||||
DockSite = True
|
||||
TabOrder = 4
|
||||
@ -225,7 +225,7 @@ object Form1: TForm1
|
||||
OnDockOver = ScriptPanelDockOver
|
||||
object PageControl1: TPageControl
|
||||
Left = 118
|
||||
Height = 293
|
||||
Height = 296
|
||||
Top = 0
|
||||
Width = 614
|
||||
Align = alClient
|
||||
@ -244,7 +244,7 @@ object Form1: TForm1
|
||||
object SearchPanel: TPanel
|
||||
Left = 0
|
||||
Height = 35
|
||||
Top = 293
|
||||
Top = 296
|
||||
Width = 732
|
||||
Align = alBottom
|
||||
BevelOuter = bvSpace
|
||||
@ -340,7 +340,7 @@ object Form1: TForm1
|
||||
end
|
||||
object LabeledEditSearch: TLabeledEdit
|
||||
Left = 104
|
||||
Height = 27
|
||||
Height = 21
|
||||
Top = 6
|
||||
Width = 174
|
||||
EditLabel.AnchorSideLeft.Control = LabeledEditSearch
|
||||
@ -348,10 +348,10 @@ object Form1: TForm1
|
||||
EditLabel.AnchorSideTop.Side = asrCenter
|
||||
EditLabel.AnchorSideRight.Control = LabeledEditSearch
|
||||
EditLabel.AnchorSideBottom.Control = LabeledEditSearch
|
||||
EditLabel.Left = 65
|
||||
EditLabel.Height = 18
|
||||
EditLabel.Top = 10
|
||||
EditLabel.Width = 36
|
||||
EditLabel.Left = 73
|
||||
EditLabel.Height = 14
|
||||
EditLabel.Top = 9
|
||||
EditLabel.Width = 28
|
||||
EditLabel.Caption = 'Find: '
|
||||
EditLabel.ParentColor = False
|
||||
LabelPosition = lpLeft
|
||||
@ -364,9 +364,9 @@ object Form1: TForm1
|
||||
end
|
||||
object CheckBoxMatchCase: TCheckBox
|
||||
Left = 320
|
||||
Height = 22
|
||||
Height = 17
|
||||
Top = 7
|
||||
Width = 98
|
||||
Width = 72
|
||||
Caption = 'Match case'
|
||||
OnClick = CheckBoxMatchCaseClick
|
||||
TabOrder = 1
|
||||
@ -374,22 +374,26 @@ object Form1: TForm1
|
||||
end
|
||||
object Splitter1: TSplitter
|
||||
Left = 113
|
||||
Height = 293
|
||||
Height = 296
|
||||
Top = 0
|
||||
Width = 5
|
||||
OnCanResize = Splitter1CanResize
|
||||
Visible = False
|
||||
end
|
||||
inline frmFunctionList: TFunctionListFrame
|
||||
Height = 293
|
||||
ClientHeight = 293
|
||||
Height = 296
|
||||
Width = 113
|
||||
ClientHeight = 296
|
||||
ClientWidth = 113
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
inherited FunctionList: TTreeView
|
||||
Height = 266
|
||||
Height = 275
|
||||
Width = 113
|
||||
end
|
||||
inherited editSearchList: TEdit
|
||||
Top = 266
|
||||
Top = 275
|
||||
Width = 113
|
||||
OnExit = nil
|
||||
end
|
||||
end
|
||||
@ -1186,6 +1190,13 @@ object Form1: TForm1
|
||||
OnClick = MenuItemFunctionListClick
|
||||
end
|
||||
end
|
||||
object MenuExtra: TMenuItem
|
||||
Caption = 'Extra'
|
||||
object MenuitemFillFunctionList: TMenuItem
|
||||
Caption = 'Fill Function List'
|
||||
OnClick = MenuitemFillFunctionListClick
|
||||
end
|
||||
end
|
||||
object MenuHelp: TMenuItem
|
||||
Caption = '&Help'
|
||||
object MenuItemAbout: TMenuItem
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -91,6 +91,8 @@ type
|
||||
MenuFile: TMenuItem;
|
||||
MenuEdit: TMenuItem;
|
||||
MenuHelp: TMenuItem;
|
||||
MenuExtra: TMenuItem;
|
||||
MenuitemFillFunctionList: TMenuItem;
|
||||
MenuItemFunctionList: TMenuItem;
|
||||
MenuItemHide: TMenuItem;
|
||||
MenuItemDebugImage: TMenuItem;
|
||||
@ -226,6 +228,7 @@ type
|
||||
procedure MenuItemAboutClick(Sender: TObject);
|
||||
procedure MenuItemCloseTabsClick(Sender: TObject);
|
||||
procedure MenuItemDebugImageClick(Sender: TObject);
|
||||
procedure MenuitemFillFunctionListClick(Sender: TObject);
|
||||
procedure MenuItemHideClick(Sender: TObject);
|
||||
procedure MenuItemShowClick(Sender: TObject);
|
||||
procedure MenuItemTabCloseClick(Sender: TObject);
|
||||
@ -1124,6 +1127,60 @@ begin
|
||||
DebugImgForm.Hide;
|
||||
end;
|
||||
|
||||
procedure TForm1.MenuitemFillFunctionListClick(Sender: TObject);
|
||||
function GetMethodName( Decl : string; PlusNextChar : boolean) : string;
|
||||
var
|
||||
I : integer;
|
||||
ii : integer;
|
||||
begin;
|
||||
I := pos(' ',Decl) + 1;
|
||||
for ii := i to Length(decl) do
|
||||
begin;
|
||||
if (Decl[ii] = '(') or (Decl[ii] = ';') then
|
||||
begin;
|
||||
if PlusNextChar then
|
||||
result := result + decl[ii];
|
||||
exit;
|
||||
end;
|
||||
result := result + decl[ii];
|
||||
end;
|
||||
//We made it out of the loop.. This is a method without ';' we might wanne add that!
|
||||
if PlusNextChar then
|
||||
result := result + ';';
|
||||
end;
|
||||
|
||||
var
|
||||
Methods : TExpMethodArr;
|
||||
LastSection : string;
|
||||
Sections : TStringList;
|
||||
i : integer;
|
||||
Index : integer;
|
||||
TempNode : TTreeNode;
|
||||
Tree : TTreeView;
|
||||
begin
|
||||
Methods := TMMLPSThread.GetExportedMethods;
|
||||
Tree := frmFunctionList.FunctionList;
|
||||
Tree.Items.Clear;
|
||||
Sections := TStringList.Create;
|
||||
LastSection := '';
|
||||
for i := 0 to high(Methods) do
|
||||
begin;
|
||||
if Methods[i].Section <> LastSection then
|
||||
begin;
|
||||
LastSection := Methods[i].Section;
|
||||
Index := Sections.IndexOf(LastSection);
|
||||
if Index <> -1 then
|
||||
TempNode := Tree.Items.Item[index]
|
||||
else
|
||||
begin
|
||||
TempNode := Tree.Items.Add(nil,LastSection);
|
||||
Sections.Add(LastSection);
|
||||
end;
|
||||
end;
|
||||
Tree.Items.AddChild(Tempnode,GetMethodName(Methods[i].FuncDecl,false)).data := strnew(PChar(GetMethodName(Methods[i].FuncDecl,true)));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.MenuItemHideClick(Sender: TObject);
|
||||
begin
|
||||
if Self.Visible = false then
|
||||
|
@ -25,7 +25,7 @@ AddFunction(@ThreadSafeCall,'function ThreadSafeCall(ProcName: string; var V: TV
|
||||
AddFunction(@psWriteln,'procedure writeln(s : string);');
|
||||
|
||||
{ DTM }
|
||||
|
||||
SetCurrSection('DTM');
|
||||
AddFunction(@PrintpDTM, 'Procedure PrintpDTM(tDTM : pDTM);');
|
||||
AddFunction(@ps_GetDTM ,'function GetDTM(index: Integer; out dtm: pDTM): Boolean;');
|
||||
AddFunction(@pDTMToTDTM, 'Function pDTMToTDTM(Const DTM: pDTM): TDTM;');
|
||||
@ -40,7 +40,7 @@ AddFunction(@ps_addDTM, 'function AddDTM(d: TDTM): Integer;');
|
||||
AddFunction(@ps_addpDTM, 'function AddpDTM(d: pDTM): Integer;');
|
||||
|
||||
{maths}
|
||||
|
||||
SetCurrSection('Math');
|
||||
AddFunction(@ceil,'function ceil(e : extended) : integer');
|
||||
AddFunction(@power,'function pow(base,exponent : extended) : extended');
|
||||
AddFunction(@max,'function Max(a, b: Integer): Integer;');
|
||||
@ -54,6 +54,7 @@ AddFunction(@hypot,'function Hypot(X, Y: Extended): Extended;');
|
||||
AddFunction(@RandomRange,'function RandomRange(aFrom,aTo: Integer): Integer;');
|
||||
|
||||
{window}
|
||||
SetCurrSection('Window');
|
||||
AddFunction(@Freeze, 'function freeze:boolean;');
|
||||
AddFunction(@Unfreeze, 'function unfreeze: boolean;');
|
||||
AddFunction(@GetClientDimensions, 'procedure GetClientDimensions(out w, h:integer);');
|
||||
@ -63,6 +64,7 @@ AddFunction(@SetTargetArray, 'procedure SetTargetArray(P: Integer; Size: TPoint)
|
||||
AddFunction(@ActivateClient, 'procedure activateclient;');
|
||||
|
||||
{files}
|
||||
SetCurrSection('Files');
|
||||
AddFunction(@ps_CreateFile, 'function CreateFile(Path: string): Integer;');
|
||||
AddFunction(@ps_OpenFile, 'function OpenFile(Path: string; Shared: Boolean): Integer;');
|
||||
AddFunction(@ps_RewriteFile, 'function RewriteFile(Path: string; Shared: Boolean): Integer;');
|
||||
@ -75,6 +77,7 @@ AddFunction(@ps_SetFileCharPointer, 'Function SetFileCharPointer(FileNum, cChars
|
||||
AddFunction(@ps_FilePointerPos, 'function FilePointerPos(FileNum: Integer): Integer;');
|
||||
|
||||
{other}
|
||||
SetCurrSection('Other');
|
||||
AddFunction(@SaveScreenshot,'procedure SaveScreenshot(FileName: string);');
|
||||
AddFunction(@psWait, 'procedure wait(t: integer);');
|
||||
AddFunction(@psWait, 'procedure Sleep(t: integer);');
|
||||
@ -98,6 +101,7 @@ AddFunction(@Capitalize,'function Capitalize(str : string) : string;');
|
||||
AddFunction(@OpenWebPage,'procedure OpenWebPage(url : string);');
|
||||
|
||||
{Color + Color Finders}
|
||||
SetCurrSection('Color');
|
||||
AddFunction(@GetColor,'function GetColor(x, y: Integer): Integer;');
|
||||
AddFunction(@FindColor, 'function findcolor(out x, y: integer; color, x1, y1, x2, y2: integer): boolean;');
|
||||
AddFunction(@findcolortoleranceOptimised, 'function findcolortoleranceOptimised(out x, y: integer; color, x1, y1, x2, y2, tol: integer): boolean;');
|
||||
@ -116,6 +120,7 @@ AddFunction(@FindColoredAreaTolerance, 'function FindColoredAreaTolerance(var x,
|
||||
AddFunction(@ColorToHSL, 'procedure ColorToHSL(c: integer; out r,g,b: extended);');
|
||||
|
||||
{Mouse etc.}
|
||||
SetCurrSection('Mouse');
|
||||
AddFunction(@MoveMouse, 'procedure MoveMouse(x, y: integer);');
|
||||
AddFunction(@GetMousePos, 'procedure GetMousePos(out x, y: integer);');
|
||||
AddFunction(@HoldMouse, 'procedure HoldMouse(x, y: integer; clickType: integer);');
|
||||
@ -124,6 +129,7 @@ AddFunction(@ClickMouse, 'procedure ClickMouse(x, y: integer; clickType: integer
|
||||
|
||||
|
||||
{Keyboard}
|
||||
SetCurrSection('Keyboard');
|
||||
AddFunction(@KeyDown, 'procedure KeyDown(key: Word);');
|
||||
AddFunction(@KeyUp, 'procedure KeyUp(key: Word);');
|
||||
AddFunction(@PressKey, 'procedure PressKey(key: Word);');
|
||||
@ -132,11 +138,12 @@ AddFunction(@isKeyDown, 'function isKeyDown(key: Word): Boolean;');
|
||||
AddFunction(@GetKeyCode, 'function GetKeyCode(Key : char) : byte');
|
||||
|
||||
{ OCR}
|
||||
|
||||
SetCurrSection('OCR');
|
||||
AddFunction(@rs_GetUpText, 'function rs_GetUpText: string;');
|
||||
|
||||
|
||||
{Bitmaps}
|
||||
SetCurrSection('Bitmaps');
|
||||
AddFunction(@GetMufasaBitmap,'function GetMufasaBitmap(bmp : integer) : TMufasaBitmap;');
|
||||
AddFunction(@CreateBitmap,'function CreateBitmap(w,h :integer) : integer;');
|
||||
AddFunction(@FreeBitmap,'procedure FreeBitmap(Bmp : integer);');
|
||||
@ -183,4 +190,5 @@ AddFunction(@DrawATPABitmap,'procedure DrawATPABitmap(bitmap : integer; ATPA : T
|
||||
AddFunction(@DrawATPABitmapEx,'procedure DrawATPABitmapEx(bitmap : integer; ATPA : T2DPointArray; Colors : TIntegerArray);');
|
||||
|
||||
{tpa}
|
||||
SetCurrSection('TPA');
|
||||
AddFunction(@SplitTPAEx,'function SplitTPAEx(arr: TPointArray; w, h: Integer): T2DPointArray;');
|
||||
|
@ -52,9 +52,11 @@ type
|
||||
TErrorType = (errRuntime,errCompile);
|
||||
TOnError = procedure (ErrorAtLine,ErrorPosition : integer; ErrorStr : string; ErrorType : TErrorType) of object;
|
||||
TExpMethod = record
|
||||
Section : string;
|
||||
FuncDecl : string;
|
||||
FuncPtr : Pointer;
|
||||
end;
|
||||
TExpMethodArr = array of TExpMethod;
|
||||
|
||||
TMMLPSThread = class(TThread)
|
||||
procedure OnProcessDirective(Sender: TPSPreProcessor;
|
||||
@ -80,13 +82,14 @@ type
|
||||
procedure OnThreadTerminate(Sender: TObject);
|
||||
procedure Execute; override;
|
||||
public
|
||||
ExportedMethods : array of TExpMethod;
|
||||
ExportedMethods : TExpMethodArr;
|
||||
PSScript : TPSScript; // Moved to public, as we can't kill it otherwise.
|
||||
Client : TClient;
|
||||
StartTime : LongWord;
|
||||
SyncInfo : PSyncInfo; //We need this for callthreadsafe
|
||||
property OnError : TOnError read FOnError write FOnError;
|
||||
procedure LoadMethods;
|
||||
class function GetExportedMethods : TExpMethodArr;
|
||||
procedure SetPSScript(Script : string);
|
||||
procedure SetDebug( writelnProc : TWritelnProc );
|
||||
procedure SetDbgImg( DebugImageInfo : TDbgImgInfo);
|
||||
@ -417,6 +420,12 @@ end;
|
||||
procedure TMMLPSThread.LoadMethods;
|
||||
var
|
||||
c : integer;
|
||||
CurrSection : string;
|
||||
procedure SetCurrSection(str : string);
|
||||
begin;
|
||||
CurrSection := Str;
|
||||
end;
|
||||
|
||||
procedure AddFunction( Ptr : Pointer; DeclStr : String);
|
||||
begin;
|
||||
// SetLength(ExportedMethods,c+1);
|
||||
@ -424,17 +433,49 @@ begin;
|
||||
raise exception.create('PSThread.LoadMethods: Exported more than 200 functions');
|
||||
ExportedMethods[c].FuncDecl:= DeclStr;
|
||||
ExportedMethods[c].FuncPtr:= Ptr;
|
||||
ExportedMethods[c].Section:= CurrSection;
|
||||
inc(c);
|
||||
end;
|
||||
|
||||
begin
|
||||
c := 0;
|
||||
CurrSection := 'Other';
|
||||
SetLength(ExportedMethods,200);
|
||||
{$i PSInc/psexportedmethods.inc}
|
||||
|
||||
SetLength(ExportedMethods,c);
|
||||
end;
|
||||
|
||||
class function TMMLPSThread.GetExportedMethods: TExpMethodArr;
|
||||
var
|
||||
c : integer;
|
||||
CurrSection : string;
|
||||
procedure SetCurrSection(str : string);
|
||||
begin;
|
||||
CurrSection := Str;
|
||||
end;
|
||||
|
||||
procedure AddFunction( Ptr : Pointer; DeclStr : String);
|
||||
begin;
|
||||
// SetLength(ExportedMethods,c+1);
|
||||
if c >= 200 then
|
||||
raise exception.create('PSThread.LoadMethods: Exported more than 200 functions');
|
||||
Result[c].FuncDecl:= DeclStr;
|
||||
Result[c].FuncPtr:= Ptr;
|
||||
Result[c].Section:= CurrSection;
|
||||
inc(c);
|
||||
end;
|
||||
|
||||
begin
|
||||
c := 0;
|
||||
CurrSection := 'Other';
|
||||
SetLength(Result,200);
|
||||
{$i PSInc/psexportedmethods.inc}
|
||||
|
||||
SetLength(Result,c);
|
||||
|
||||
end;
|
||||
|
||||
procedure TMMLPSThread.SetPSScript(Script: string);
|
||||
begin
|
||||
PSScript.Script.Text:= Script;
|
||||
|
Loading…
x
Reference in New Issue
Block a user