1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-12-23 15:58:51 -05:00

Added "Find next" to the right click menu, which finds the next instance of the selected text

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@207 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
bullzeye95 2009-11-07 20:26:26 +00:00
parent 854f40ba35
commit cb02863bb7
8 changed files with 130 additions and 121 deletions

View File

@ -58,7 +58,7 @@ object ColourHistoryForm: TColourHistoryForm
Left = 360
Height = 18
Top = 64
Width = 74
Width = 75
Caption = 'CoordValue'
ParentColor = False
end

View File

@ -1,5 +1,3 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TColourHistoryForm','FORMDATA',[
'TPF0'#18'TColourHistoryForm'#17'ColourHistoryForm'#4'Left'#3#238#1#6'Height'
+#3#250#0#3'Top'#3'+'#1#5'Width'#3#233#1#13'ActiveControl'#7#11'ColourValue'#7
@ -16,6 +14,6 @@ LazarusResources.Add('TColourHistoryForm','FORMDATA',[
+'tion'#6#15'Pick New Colour'#8'TabOrder'#2#3#0#0#5'TEdit'#11'ColourValue'#4
+'Left'#3'h'#1#6'Height'#2#27#3'Top'#2#16#5'Width'#2'p'#8'ReadOnly'#9#8'TabOr'
+'der'#2#4#4'Text'#6#11'ColourValue'#0#0#6'TLabel'#10'CoordValue'#4'Left'#3'h'
+#1#6'Height'#2#18#3'Top'#2'@'#5'Width'#2'J'#7'Caption'#6#10'CoordValue'#11'P'
+#1#6'Height'#2#18#3'Top'#2'@'#5'Width'#2'K'#7'Caption'#6#10'CoordValue'#11'P'
+'arentColor'#8#0#0#0
]);

View File

@ -6,8 +6,8 @@ object ScriptFrame: TScriptFrame
ClientHeight = 324
ClientWidth = 400
TabOrder = 0
DesignLeft = 556
DesignTop = 242
DesignLeft = 1272
DesignTop = 155
object SynEdit: TSynEdit
Left = 0
Height = 324
@ -23,7 +23,7 @@ object ScriptFrame: TScriptFrame
PopupMenu = Form1.ScriptPopup
TabOrder = 0
BookMarkOptions.OnChange = nil
Gutter.Width = 61
Gutter.Width = 57
Gutter.MouseActions = <
item
Shift = []
@ -598,7 +598,7 @@ object ScriptFrame: TScriptFrame
Width = 23
end
object TSynGutterLineNumber
Width = 21
Width = 17
MouseActions = <>
MarkupInfo.Background = clBtnFace
MarkupInfo.Foreground = clNone

View File

@ -3,12 +3,12 @@
LazarusResources.Add('TScriptFrame','FORMDATA',[
'TPF0'#12'TScriptFrame'#11'ScriptFrame'#4'Left'#2#0#6'Height'#3'D'#1#3'Top'#2
+#0#5'Width'#3#144#1#12'ClientHeight'#3'D'#1#11'ClientWidth'#3#144#1#8'TabOrd'
+'er'#2#0#10'DesignLeft'#3','#2#9'DesignTop'#3#242#0#0#8'TSynEdit'#7'SynEdit'
+'er'#2#0#10'DesignLeft'#3#248#4#9'DesignTop'#3#155#0#0#8'TSynEdit'#7'SynEdit'
+#4'Left'#2#0#6'Height'#3'D'#1#3'Top'#2#0#5'Width'#3#144#1#5'Align'#7#8'alCli'
+'ent'#11'Font.Height'#2#243#9'Font.Name'#6#11'Courier New'#10'Font.Pitch'#7#7
+'fpFixed'#12'Font.Quality'#7#16'fqNonAntialiased'#11'ParentColor'#8#10'Paren'
+'tFont'#8#9'PopupMenu'#7#17'Form1.ScriptPopup'#8'TabOrder'#2#0#24'BookMarkOp'
+'tions.OnChange'#13#12'Gutter.Width'#2'='#19'Gutter.MouseActions'#14#1#5'Shi'
+'tions.OnChange'#13#12'Gutter.Width'#2'9'#19'Gutter.MouseActions'#14#1#5'Shi'
+'ft'#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'Priori'
+'ty'#2#0#0#1#5'Shift'#11#0#9'ShiftMask'#11#0#6'Button'#7#7'mbRight'#10'Click'
@ -118,7 +118,7 @@ LazarusResources.Add('TScriptFrame','FORMDATA',[
+'nd.'#0#21'BracketHighlightStyle'#7#8'sbhsBoth'#8'OnChange'#7#13'SynEditChan'
+'ge'#16'OnProcessCommand'#7#21'SynEditProcessCommand'#19'OnSpecialLineColors'
+#7#24'SynEditSpecialLineColors'#0#18'TSynGutterPartList'#0#0#15'TSynGutterMa'
+'rks'#0#5'Width'#2#23#0#0#20'TSynGutterLineNumber'#0#5'Width'#2#21#12'MouseA'
+'rks'#0#5'Width'#2#23#0#0#20'TSynGutterLineNumber'#0#5'Width'#2#17#12'MouseA'
+'ctions'#14#0#21'MarkupInfo.Background'#7#9'clBtnFace'#21'MarkupInfo.Foregro'
+'und'#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

View File

@ -7,7 +7,7 @@
<TargetFileExt Value=""/>
<Title Value="Mufasa Stand Alone"/>
<UseXPManifest Value="True"/>
<ActiveEditorIndexAtStart Value="4"/>
<ActiveEditorIndexAtStart Value="0"/>
</General>
<VersionInfo>
<ProjectVersion Value=""/>
@ -164,10 +164,13 @@
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="TestUnit"/>
<CursorPos X="3" Y="821"/>
<TopLine Value="819"/>
<CursorPos X="81" Y="525"/>
<TopLine Value="513"/>
<EditorIndex Value="0"/>
<UsageCount Value="202"/>
<Bookmarks Count="1">
<Item0 X="27" Y="538" ID="1"/>
</Bookmarks>
<Loaded Value="True"/>
</Unit17>
<Unit18>
@ -275,7 +278,7 @@
<CursorPos X="29" Y="29"/>
<TopLine Value="24"/>
<EditorIndex Value="7"/>
<UsageCount Value="49"/>
<UsageCount Value="50"/>
<Loaded Value="True"/>
</Unit31>
<Unit32>
@ -284,7 +287,7 @@
<CursorPos X="18" Y="57"/>
<TopLine Value="46"/>
<EditorIndex Value="12"/>
<UsageCount Value="73"/>
<UsageCount Value="74"/>
<Loaded Value="True"/>
</Unit32>
<Unit33>
@ -726,7 +729,7 @@
<IsPartOfProject Value="True"/>
<UnitName Value="colourpicker"/>
<CursorPos X="36" Y="188"/>
<TopLine Value="157"/>
<TopLine Value="162"/>
<EditorIndex Value="3"/>
<UsageCount Value="201"/>
<Loaded Value="True"/>
@ -866,7 +869,7 @@
<UnitName Value="ocr"/>
<CursorPos X="19" Y="91"/>
<TopLine Value="75"/>
<UsageCount Value="173"/>
<UsageCount Value="175"/>
</Unit116>
<Unit117>
<Filename Value="../../Units/PascalScript/uPSR_extctrls.pas"/>
@ -881,7 +884,7 @@
<UnitName Value="project"/>
<CursorPos X="46" Y="15"/>
<TopLine Value="1"/>
<UsageCount Value="170"/>
<UsageCount Value="172"/>
</Unit118>
<Unit119>
<Filename Value="../../../FPC/FPCCheckout/rtl/inc/heap.inc"/>
@ -995,7 +998,7 @@
<UnitName Value="web"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="98"/>
<UsageCount Value="100"/>
</Unit136>
<Unit137>
<Filename Value="../../../lazarus/lcl/lazhelphtml.pas"/>
@ -1195,7 +1198,7 @@
<CursorPos X="1" Y="69"/>
<TopLine Value="46"/>
<EditorIndex Value="1"/>
<UsageCount Value="91"/>
<UsageCount Value="93"/>
<Loaded Value="True"/>
</Unit161>
<Unit162>
@ -1474,7 +1477,7 @@
<CursorPos X="72" Y="28"/>
<TopLine Value="14"/>
<EditorIndex Value="13"/>
<UsageCount Value="16"/>
<UsageCount Value="17"/>
<Loaded Value="True"/>
</Unit203>
<Unit204>
@ -1503,7 +1506,7 @@
<UnitName Value="colourpickersort"/>
<CursorPos X="11" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="30"/>
<UsageCount Value="32"/>
</Unit207>
<Unit208>
<Filename Value="colourhistory.pas"/>
@ -1514,7 +1517,7 @@
<CursorPos X="2" Y="137"/>
<TopLine Value="116"/>
<EditorIndex Value="4"/>
<UsageCount Value="28"/>
<UsageCount Value="30"/>
<Loaded Value="True"/>
</Unit208>
<Unit209>
@ -1559,123 +1562,123 @@
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="testunit.pas"/>
<Caret Line="822" Column="28" TopLine="810"/>
<Caret Line="261" Column="22" TopLine="249"/>
</Position1>
<Position2>
<Filename Value="colourhistory.pas"/>
<Caret Line="85" Column="32" TopLine="69"/>
<Filename Value="testunit.pas"/>
<Caret Line="312" Column="10" TopLine="300"/>
</Position2>
<Position3>
<Filename Value="colourhistory.pas"/>
<Caret Line="92" Column="32" TopLine="69"/>
<Filename Value="testunit.pas"/>
<Caret Line="537" Column="39" TopLine="524"/>
</Position3>
<Position4>
<Filename Value="testunit.pas"/>
<Caret Line="501" Column="35" TopLine="484"/>
<Caret Line="535" Column="87" TopLine="524"/>
</Position4>
<Position5>
<Filename Value="testunit.pas"/>
<Caret Line="859" Column="51" TopLine="840"/>
<Caret Line="536" Column="7" TopLine="525"/>
</Position5>
<Position6>
<Filename Value="colourhistory.pas"/>
<Caret Line="77" Column="1" TopLine="69"/>
<Filename Value="testunit.pas"/>
<Caret Line="4" Column="70" TopLine="1"/>
</Position6>
<Position7>
<Filename Value="colourhistory.pas"/>
<Caret Line="25" Column="44" TopLine="11"/>
<Filename Value="testunit.pas"/>
<Caret Line="96" Column="38" TopLine="85"/>
</Position7>
<Position8>
<Filename Value="framescript.pas"/>
<Caret Line="27" Column="46" TopLine="19"/>
<Filename Value="testunit.pas"/>
<Caret Line="263" Column="29" TopLine="251"/>
</Position8>
<Position9>
<Filename Value="colourhistory.pas"/>
<Caret Line="51" Column="12" TopLine="28"/>
<Filename Value="testunit.pas"/>
<Caret Line="314" Column="17" TopLine="302"/>
</Position9>
<Position10>
<Filename Value="testunit.pas"/>
<Caret Line="30" Column="49" TopLine="26"/>
<Caret Line="522" Column="32" TopLine="510"/>
</Position10>
<Position11>
<Filename Value="testunit.pas"/>
<Caret Line="38" Column="24" TopLine="26"/>
<Caret Line="544" Column="72" TopLine="526"/>
</Position11>
<Position12>
<Filename Value="framescript.pas"/>
<Caret Line="69" Column="29" TopLine="46"/>
<Filename Value="testunit.pas"/>
<Caret Line="542" Column="91" TopLine="530"/>
</Position12>
<Position13>
<Filename Value="colourhistory.pas"/>
<Caret Line="113" Column="3" TopLine="96"/>
<Filename Value="testunit.pas"/>
<Caret Line="544" Column="70" TopLine="530"/>
</Position13>
<Position14>
<Filename Value="colourhistory.pas"/>
<Caret Line="36" Column="49" TopLine="23"/>
<Filename Value="testunit.pas"/>
<Caret Line="537" Column="27" TopLine="526"/>
</Position14>
<Position15>
<Filename Value="testunit.pas"/>
<Caret Line="14" Column="63" TopLine="1"/>
<Caret Line="539" Column="62" TopLine="529"/>
</Position15>
<Position16>
<Filename Value="colourhistory.pas"/>
<Caret Line="115" Column="43" TopLine="100"/>
<Filename Value="testunit.pas"/>
<Caret Line="533" Column="6" TopLine="524"/>
</Position16>
<Position17>
<Filename Value="testunit.pas"/>
<Caret Line="324" Column="37" TopLine="318"/>
<Caret Line="435" Column="11" TopLine="430"/>
</Position17>
<Position18>
<Filename Value="colourhistory.pas"/>
<Caret Line="99" Column="49" TopLine="82"/>
<Filename Value="testunit.pas"/>
<Caret Line="2" Column="70" TopLine="1"/>
</Position18>
<Position19>
<Filename Value="testunit.pas"/>
<Caret Line="979" Column="62" TopLine="960"/>
<Caret Line="68" Column="14" TopLine="56"/>
</Position19>
<Position20>
<Filename Value="testunit.pas"/>
<Caret Line="821" Column="31" TopLine="810"/>
<Caret Line="100" Column="17" TopLine="88"/>
</Position20>
<Position21>
<Filename Value="colourhistory.pas"/>
<Caret Line="90" Column="43" TopLine="83"/>
<Filename Value="testunit.pas"/>
<Caret Line="135" Column="16" TopLine="123"/>
</Position21>
<Position22>
<Filename Value="testunit.pas"/>
<Caret Line="823" Column="51" TopLine="807"/>
<Caret Line="171" Column="37" TopLine="159"/>
</Position22>
<Position23>
<Filename Value="colourhistory.pas"/>
<Caret Line="131" Column="37" TopLine="107"/>
<Filename Value="testunit.pas"/>
<Caret Line="172" Column="35" TopLine="159"/>
</Position23>
<Position24>
<Filename Value="colourhistory.pas"/>
<Caret Line="119" Column="76" TopLine="107"/>
<Filename Value="testunit.pas"/>
<Caret Line="173" Column="31" TopLine="159"/>
</Position24>
<Position25>
<Filename Value="colourhistory.pas"/>
<Caret Line="98" Column="14" TopLine="84"/>
<Filename Value="testunit.pas"/>
<Caret Line="174" Column="24" TopLine="159"/>
</Position25>
<Position26>
<Filename Value="colourhistory.pas"/>
<Caret Line="97" Column="14" TopLine="84"/>
<Filename Value="testunit.pas"/>
<Caret Line="254" Column="28" TopLine="243"/>
</Position26>
<Position27>
<Filename Value="colourhistory.pas"/>
<Caret Line="94" Column="47" TopLine="84"/>
<Filename Value="testunit.pas"/>
<Caret Line="662" Column="39" TopLine="650"/>
</Position27>
<Position28>
<Filename Value="colourhistory.pas"/>
<Caret Line="97" Column="58" TopLine="86"/>
<Filename Value="testunit.pas"/>
<Caret Line="670" Column="38" TopLine="658"/>
</Position28>
<Position29>
<Filename Value="colourhistory.pas"/>
<Caret Line="96" Column="58" TopLine="86"/>
<Filename Value="testunit.pas"/>
<Caret Line="721" Column="27" TopLine="709"/>
</Position29>
<Position30>
<Filename Value="colourhistory.pas"/>
<Caret Line="102" Column="38" TopLine="86"/>
<Filename Value="testunit.pas"/>
<Caret Line="4" Column="66" TopLine="1"/>
</Position30>
</JumpHistory>
</ProjectOptions>

View File

@ -1,7 +1,7 @@
object Form1: TForm1
Left = 274
Left = 474
Height = 557
Top = 233
Top = 246
Width = 731
ActiveControl = ScriptPanel
Caption = 'THA FUKING MUFASA'
@ -261,10 +261,10 @@ object Form1: TForm1
EditLabel.AnchorSideTop.Side = asrCenter
EditLabel.AnchorSideRight.Control = LabeledEditSearch
EditLabel.AnchorSideBottom.Control = LabeledEditSearch
EditLabel.Left = 67
EditLabel.Left = 65
EditLabel.Height = 18
EditLabel.Top = 10
EditLabel.Width = 34
EditLabel.Width = 36
EditLabel.Caption = 'Find: '
EditLabel.ParentColor = False
LabelPosition = lpLeft
@ -365,7 +365,7 @@ object Form1: TForm1
Left = 320
Height = 22
Top = 6
Width = 97
Width = 98
Caption = 'Match case'
OnClick = CheckBoxMatchCaseClick
TabOrder = 1
@ -2121,7 +2121,7 @@ object Form1: TForm1
Caption = 'Cut'
ImageIndex = 3
OnExecute = ActionCutExecute
ShortCut = 16451
ShortCut = 16472
end
object ActionCopy: TAction
Caption = 'Copy'
@ -2422,5 +2422,12 @@ object Form1: TForm1
Action = ActionSelectAll
OnClick = ActionSelectAllExecute
end
object PopupItemDivider3: TMenuItem
Caption = '-'
end
object PopupItemFind: TMenuItem
Action = ActionFindNext
OnClick = ActionFindNextExecute
end
end
end

View File

@ -1,9 +1,9 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TForm1','FORMDATA',[
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#18#1#6'Height'#3'-'#2#3'Top'#3#233#0#5'Wi'
+'dth'#3#219#2#13'ActiveControl'#7#11'ScriptPanel'#7'Caption'#6#17'THA FUKING'
+' MUFASA'#12'ClientHeight'#3#20#2#11'ClientWidth'#3#219#2#10'KeyPreview'#9#4
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#218#1#6'Height'#3'-'#2#3'Top'#3#246#0#5'W'
+'idth'#3#219#2#13'ActiveControl'#7#11'ScriptPanel'#7'Caption'#6#17'THA FUKIN'
+'G MUFASA'#12'ClientHeight'#3#20#2#11'ClientWidth'#3#219#2#10'KeyPreview'#9#4
+'Menu'#7#9'MainMenu1'#7'OnClose'#7#9'FormClose'#8'OnCreate'#7#10'FormCreate'
+#9'OnDestroy'#7#11'FormDestroy'#10'OnShortCut'#7#13'FormShortCuts'#8'Positio'
+'n'#7#14'poScreenCenter'#10'LCLVersion'#6#6'0.9.29'#7'Visible'#9#0#8'TToolBa'
@ -71,8 +71,8 @@ LazarusResources.Add('TForm1','FORMDATA',[
+'nchorSideLeft.Control'#7#17'LabeledEditSearch'#31'EditLabel.AnchorSideTop.C'
+'ontrol'#7#17'LabeledEditSearch'#28'EditLabel.AnchorSideTop.Side'#7#9'asrCen'
+'ter!EditLabel.AnchorSideRight.Control'#7#17'LabeledEditSearch"EditLabel.Anc'
+'horSideBottom.Control'#7#17'LabeledEditSearch'#14'EditLabel.Left'#2'C'#16'E'
+'ditLabel.Height'#2#18#13'EditLabel.Top'#2#10#15'EditLabel.Width'#2'"'#17'Ed'
+'horSideBottom.Control'#7#17'LabeledEditSearch'#14'EditLabel.Left'#2'A'#16'E'
+'ditLabel.Height'#2#18#13'EditLabel.Top'#2#10#15'EditLabel.Width'#2'$'#17'Ed'
+'itLabel.Caption'#6#6'Find: '#21'EditLabel.ParentColor'#8#13'LabelPosition'#7
+#6'lpLeft'#8'TabOrder'#2#0#8'OnChange'#7#16'EditSearchChange'#7'OnEnter'#7#22
+'LabeledEditSearchEnter'#6'OnExit'#7#21'LabeledEditSearchExit'#9'OnKeyDown'#7
@ -144,7 +144,7 @@ LazarusResources.Add('TForm1','FORMDATA',[
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#9'NumGlyphs'#2#0#7'OnClick'#7#22'SpeedButto'
+'nSearchClick'#0#0#9'TCheckBox'#17'CheckBoxMatchCase'#4'Left'#3'@'#1#6'Heigh'
+'t'#2#22#3'Top'#2#6#5'Width'#2'a'#7'Caption'#6#10'Match case'#7'OnClick'#7#22
+'t'#2#22#3'Top'#2#6#5'Width'#2'b'#7'Caption'#6#10'Match case'#7'OnClick'#7#22
+'CheckBoxMatchCaseClick'#8'TabOrder'#2#1#0#0#0#0#9'TMainMenu'#9'MainMenu1'#4
+'left'#3'0'#2#0#9'TMenuItem'#8'MenuFile'#7'Caption'#6#4'File'#13'SubMenuImag'
+'es'#7#17'Mufasa_Image_List'#0#9'TMenuItem'#11'MenuItemNew'#6'Action'#7#15'A'
@ -2189,7 +2189,7 @@ LazarusResources.Add('TForm1','FORMDATA',[
+'OnExecute'#7#23'ActionClearDebugExecute'#0#0#7'TAction'#15'ActionFindStart'
+#7'Caption'#6#8'Find ...'#9'OnExecute'#7#22'ActionFindstartExecute'#8'ShortC'
+'ut'#3'F@'#0#0#7'TAction'#9'ActionCut'#7'Caption'#6#3'Cut'#10'ImageIndex'#2#3
+#9'OnExecute'#7#16'ActionCutExecute'#8'ShortCut'#3'C@'#0#0#7'TAction'#10'Act'
+#9'OnExecute'#7#16'ActionCutExecute'#8'ShortCut'#3'X@'#0#0#7'TAction'#10'Act'
+'ionCopy'#7'Caption'#6#4'Copy'#10'ImageIndex'#2#22#9'OnExecute'#7#17'ActionC'
+'opyExecute'#8'ShortCut'#3'C@'#0#0#7'TAction'#11'ActionPaste'#7'Caption'#6#5
+'Paste'#10'ImageIndex'#2#11#9'OnExecute'#7#18'ActionPasteExecute'#8'ShortCut'
@ -2490,5 +2490,7 @@ LazarusResources.Add('TForm1','FORMDATA',[
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#7'OnClick'#7#19'ActionDelet'
+'eExecute'#0#0#9'TMenuItem'#17'PopupItemDivider2'#7'Caption'#6#1'-'#0#0#9'TM'
+'enuItem'#18'PopupItemSelectAll'#6'Action'#7#15'ActionSelectAll'#7'OnClick'#7
+#22'ActionSelectAllExecute'#0#0#0#0
+#22'ActionSelectAllExecute'#0#0#9'TMenuItem'#17'PopupItemDivider3'#7'Caption'
+#6#1'-'#0#0#9'TMenuItem'#13'PopupItemFind'#6'Action'#7#14'ActionFindNext'#7
+'OnClick'#7#21'ActionFindNextExecute'#0#0#0#0
]);

View File

@ -101,6 +101,8 @@ type
PopupItemDivider1: TMenuItem;
PopupItemRedo: TMenuItem;
PopupItemUndo: TMenuItem;
PopupItemDivider3: TMenuItem;
PopupItemFind: TMenuItem;
MenuItemFind: TMenuItem;
MenuItemDivider4: TMenuItem;
MenuItemDivider3: TMenuItem;
@ -250,16 +252,13 @@ type
procedure RunScript;
procedure PauseScript;
procedure StopScript;
procedure Cut;
procedure Copy;
procedure Paste;
procedure AddTab;
function DeleteTab( TabIndex : integer; CloseLast : boolean) : boolean;
procedure ClearTab( TabIndex : integer);
procedure CloseTabs( Exclude : integer);overload;//-1 for none
procedure CloseTabs;overload;
procedure SetEditActions;
procedure DoSearch(Next : boolean; HighlightAll : boolean);
procedure DoSearch(Str: String; Next : boolean; HighlightAll : boolean);
procedure RefreshTab;//Refreshes all the form items that depend on the Script (Panels, title etc.)
end;
@ -432,21 +431,6 @@ begin
end;
end;
procedure TForm1.Cut;
begin
CurrScript.SynEdit.CutToClipboard;
end;
procedure TForm1.Copy;
begin
CurrScript.SynEdit.CopyToClipboard;
end;
procedure TForm1.Paste;
begin
CurrScript.SynEdit.PasteFromClipboard;
end;
procedure TForm1.AddTab;
var
Tab : TMufasaTab;
@ -530,8 +514,20 @@ end;
begin
if CurrScript.SynEdit.Focused or ScriptPopup.HandleAllocated then
begin
with CurrScript.SynEdit do
EditActions(CanUndo,CanRedo,SelText <> '',SelText <> '',CanPaste,SelText <> '')
begin
EditActions(CanUndo,CanRedo,SelText <> '',SelText <> '',CanPaste,SelText <> '');
if(SelText <> '')then
begin
PopupItemFind.Enabled:= True;
if(Length(SelText) > 20)then
PopupItemFind.Caption:= Format('Find next: "%s"', [Copy(SelText, 1, 17) + '...'])
else
PopupItemFind.Caption:= Format('Find next: "%s"', [SelText]);
end;
end
end
else if Memo1.Focused then
with Memo1 do
EditActions(CanUndo,False,SelText <>'',SelText <> '',True,SelText <> '')
@ -539,7 +535,7 @@ begin
EditActions(false,false,false,false,false,false);
end;
procedure TForm1.DoSearch(Next: boolean; HighlightAll : boolean);
procedure TForm1.DoSearch(Str: String; Next: boolean; HighlightAll : boolean);
var
Res : integer;
CurrPos : TPoint;
@ -548,7 +544,7 @@ begin
SearchOptions:= [];
if CheckBoxMatchCase.Checked then
SearchOptions := [ssoMatchCase];
if LabeledEditSearch.Text = '' then
if Str = '' then
begin
res := -1;
CurrScript.Synedit.SetHighlightSearch('',[]);
@ -558,15 +554,15 @@ begin
end
else
begin
Writeln('Searching: ' + LabeledEditSearch.Text);
Writeln('Searching: ' + Str);
if next then
CurrPos := CurrScript.SynEdit.LogicalCaretXY
else
CurrPos := SearchStart;
Res := CurrScript.SynEdit.SearchReplaceEx(LabeledEditSearch.Text,'',SearchOptions,CurrPos);
Res := CurrScript.SynEdit.SearchReplaceEx(Str,'',SearchOptions,CurrPos);
if res = 0 then
begin
res := CurrScript.SynEdit.SearchReplaceEx(LabeledEditSearch.text,'',SearchOptions,Point(0,0));
res := CurrScript.SynEdit.SearchReplaceEx(Str,'',SearchOptions,Point(0,0));
if res > 0 then
begin;
Writeln('End of document reached');
@ -588,7 +584,7 @@ begin
LabeledEditSearch.Font.Color:= clWindowText;
with CurrScript.SynEdit do
if HighlightAll then
SetHighlightSearch(LabeledEditSearch.text,[])
SetHighlightSearch(Str,[])
else
SetHighlightSearch('',[]);
end;
@ -663,7 +659,7 @@ end;
procedure TForm1.ActionCopyExecute(Sender: TObject);
begin
if CurrScript.SynEdit.Focused or ScriptPopup.HandleAllocated then
Self.Copy
CurrScript.SynEdit.CopyToClipboard
else if Memo1.Focused then
Memo1.CopyToClipboard;
end;
@ -671,7 +667,7 @@ end;
procedure TForm1.ActionCutExecute(Sender: TObject);
begin
if CurrScript.SynEdit.Focused or ScriptPopup.HandleAllocated then
Self.Cut
CurrScript.SynEdit.CutToClipboard
else if Memo1.Focused then
Memo1.CutToClipboard;
end;
@ -686,7 +682,10 @@ end;
procedure TForm1.ActionFindNextExecute(Sender: TObject);
begin
DoSearch(true,false);
if(ScriptPopup.HandleAllocated)then
DoSearch(CurrScript.SynEdit.SelText, true, false)
else
DoSearch(LabeledEditSearch.Text, true, false);
end;
procedure TForm1.ActionFindstartExecute(Sender: TObject);
@ -719,7 +718,7 @@ end;
procedure TForm1.ActionPasteExecute(Sender: TObject);
begin
if CurrScript.SynEdit.Focused or ScriptPopup.HandleAllocated then
Self.Paste
CurrScript.SynEdit.PasteFromClipboard
else if Memo1.Focused then
Memo1.PasteFromClipboard;
end;
@ -805,7 +804,7 @@ end;
procedure TForm1.CheckBoxMatchCaseClick(Sender: TObject);
begin
RefreshTab;
DoSearch(false,true);
DoSearch(LabeledEditSearch.Text, false, true);
CurrScript.SynEdit.UseIncrementalColor:= true;
end;
@ -827,7 +826,7 @@ end;
procedure TForm1.EditSearchChange(Sender: TObject);
begin
DoSearch(false,true);
DoSearch(LabeledEditSearch.Text, false, true);
end;
procedure TForm1.FormClose(Sender: TObject; var CloseAction: TCloseAction);
@ -922,7 +921,7 @@ procedure TForm1.LabeledEditSearchKeyPress(Sender: TObject; var Key: char);
begin
if key = #13 then
begin;
DoSearch(true,true);
DoSearch(LabeledEditSearch.Text, true, true);
key := #0;
// LabeledEditSearch.SelStart:= Length(LabeledEditSearch.Text);
end;