1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-12-23 07:48:50 -05:00

Added a right click menu for the synedit; added some actions to the action list and made the main menu and popup menu use them; added some options to the edit menu; made the edit menu and popup menu arguments enabled/disabled based on whether or not they could be used. Do not have an icon for the delete action

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@199 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
bullzeye95 2009-11-07 05:27:39 +00:00
parent 00755e9fdd
commit 36c1b63de3
6 changed files with 894 additions and 787 deletions

View File

@ -6,8 +6,8 @@ object ScriptFrame: TScriptFrame
ClientHeight = 300
ClientWidth = 400
TabOrder = 0
DesignLeft = 836
DesignTop = 409
DesignLeft = 1272
DesignTop = 153
object SynEdit: TSynEdit
Left = 0
Height = 300
@ -20,8 +20,10 @@ object ScriptFrame: TScriptFrame
Font.Quality = fqNonAntialiased
ParentColor = False
ParentFont = False
PopupMenu = Form1.ScriptPopup
TabOrder = 0
Gutter.Width = 61
BookMarkOptions.OnChange = nil
Gutter.Width = 57
Gutter.MouseActions = <
item
Shift = []
@ -596,7 +598,7 @@ object ScriptFrame: TScriptFrame
Width = 23
end
object TSynGutterLineNumber
Width = 21
Width = 17
MouseActions = <>
MarkupInfo.Background = clBtnFace
MarkupInfo.Foreground = clNone

View File

@ -1,18 +1,21 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TScriptFrame','FORMDATA',[
'TPF0'#12'TScriptFrame'#11'ScriptFrame'#4'Left'#2#0#6'Height'#3','#1#3'Top'#2
+#0#5'Width'#3#144#1#12'ClientHeight'#3','#1#11'ClientWidth'#3#144#1#8'TabOrd'
+'er'#2#0#10'DesignLeft'#3'D'#3#9'DesignTop'#3#153#1#0#8'TSynEdit'#7'SynEdit'
+'er'#2#0#10'DesignLeft'#3#248#4#9'DesignTop'#3#153#0#0#8'TSynEdit'#7'SynEdit'
+#4'Left'#2#0#6'Height'#3','#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#8'TabOrder'#2#0#12'Gutter.Width'#2'='#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'&@'
+'tFont'#8#9'PopupMenu'#7#17'Form1.ScriptPopup'#8'TabOrder'#2#0#24'BookMarkOp'
+'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'
+'Count'#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'e'
+'cSelUp'#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'
@ -62,8 +65,8 @@ LazarusResources.Add('TScriptFrame','FORMDATA',[
+'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'
,'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'
@ -115,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
@ -126,8 +129,8 @@ LazarusResources.Add('TScriptFrame','FORMDATA',[
+#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'ccAny'
,#8'ClickDir'#7#6'cdDown'#7'Command'#2#14#9'MoveCaret'#8#6'Option'#2#1#8'Prio'
,'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#1#8'Prio'
+'rity'#2#0#0#1#5'Shift'#11#0#9'ShiftMask'#11#0#6'Button'#7#6'mbLeft'#10'Clic'
+'kCount'#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'Ma'

View File

@ -7,7 +7,7 @@
<TargetFileExt Value=""/>
<Title Value="Mufasa Stand Alone"/>
<UseXPManifest Value="True"/>
<ActiveEditorIndexAtStart Value="13"/>
<ActiveEditorIndexAtStart Value="0"/>
</General>
<VersionInfo>
<ProjectVersion Value=""/>
@ -162,8 +162,8 @@
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="TestUnit"/>
<CursorPos X="78" Y="265"/>
<TopLine Value="249"/>
<CursorPos X="45" Y="306"/>
<TopLine Value="293"/>
<EditorIndex Value="0"/>
<UsageCount Value="202"/>
<Loaded Value="True"/>
@ -273,7 +273,7 @@
<CursorPos X="29" Y="29"/>
<TopLine Value="24"/>
<EditorIndex Value="4"/>
<UsageCount Value="43"/>
<UsageCount Value="44"/>
<Loaded Value="True"/>
</Unit31>
<Unit32>
@ -282,7 +282,7 @@
<CursorPos X="18" Y="57"/>
<TopLine Value="46"/>
<EditorIndex Value="13"/>
<UsageCount Value="67"/>
<UsageCount Value="68"/>
<Loaded Value="True"/>
</Unit32>
<Unit33>
@ -385,8 +385,8 @@
<Filename Value="../../Units/MMLAddon/PSInc/pscompile.inc"/>
<CursorPos X="67" Y="97"/>
<TopLine Value="87"/>
<EditorIndex Value="16"/>
<UsageCount Value="89"/>
<EditorIndex Value="15"/>
<UsageCount Value="90"/>
<Loaded Value="True"/>
</Unit46>
<Unit47>
@ -423,7 +423,7 @@
<CursorPos X="30" Y="28"/>
<TopLine Value="16"/>
<EditorIndex Value="7"/>
<UsageCount Value="33"/>
<UsageCount Value="34"/>
<Loaded Value="True"/>
</Unit51>
<Unit52>
@ -575,17 +575,17 @@
<Unit74>
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/mouse.inc"/>
<CursorPos X="5" Y="32"/>
<TopLine Value="4"/>
<TopLine Value="6"/>
<EditorIndex Value="6"/>
<UsageCount Value="10"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit74>
<Unit75>
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/other.inc"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="17"/>
<UsageCount Value="33"/>
<EditorIndex Value="16"/>
<UsageCount Value="34"/>
<Loaded Value="True"/>
</Unit75>
<Unit76>
@ -836,7 +836,7 @@
<UnitName Value="mmath"/>
<CursorPos X="32" Y="42"/>
<TopLine Value="16"/>
<UsageCount Value="192"/>
<UsageCount Value="193"/>
</Unit111>
<Unit112>
<Filename Value="../../../Documents/fpc/rtl/objpas/types.pp"/>
@ -873,7 +873,7 @@
<CursorPos X="19" Y="91"/>
<TopLine Value="75"/>
<EditorIndex Value="9"/>
<UsageCount Value="162"/>
<UsageCount Value="163"/>
<Loaded Value="True"/>
</Unit116>
<Unit117>
@ -889,7 +889,7 @@
<UnitName Value="project"/>
<CursorPos X="46" Y="15"/>
<TopLine Value="1"/>
<UsageCount Value="159"/>
<UsageCount Value="160"/>
</Unit118>
<Unit119>
<Filename Value="../../../FPC/FPCCheckout/rtl/inc/heap.inc"/>
@ -1003,7 +1003,7 @@
<UnitName Value="web"/>
<CursorPos X="90" Y="16"/>
<TopLine Value="1"/>
<UsageCount Value="87"/>
<UsageCount Value="88"/>
</Unit136>
<Unit137>
<Filename Value="../../../lazarus/lcl/lazhelphtml.pas"/>
@ -1202,8 +1202,8 @@
<UnitName Value="framescript"/>
<CursorPos X="40" Y="146"/>
<TopLine Value="126"/>
<EditorIndex Value="18"/>
<UsageCount Value="80"/>
<EditorIndex Value="17"/>
<UsageCount Value="81"/>
<Loaded Value="True"/>
</Unit161>
<Unit162>
@ -1427,7 +1427,7 @@
<CursorPos X="33" Y="4"/>
<TopLine Value="1"/>
<EditorIndex Value="8"/>
<UsageCount Value="24"/>
<UsageCount Value="25"/>
<Loaded Value="True"/>
</Unit195>
<Unit196>
@ -1484,7 +1484,7 @@
<CursorPos X="72" Y="28"/>
<TopLine Value="14"/>
<EditorIndex Value="14"/>
<UsageCount Value="10"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit203>
<Unit204>
@ -1498,9 +1498,7 @@
<Filename Value="../../../../Documents/fpc/rtl/unix/aliasctp.inc"/>
<CursorPos X="33" Y="45"/>
<TopLine Value="31"/>
<EditorIndex Value="15"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit205>
<Unit206>
<Filename Value="../../../../Documents/fpc/rtl/inc/ctypes.pp"/>
@ -1513,123 +1511,123 @@
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="testunit.pas"/>
<Caret Line="746" Column="53" TopLine="740"/>
<Caret Line="859" Column="57" TopLine="844"/>
</Position1>
<Position2>
<Filename Value="testunit.pas"/>
<Caret Line="36" Column="5" TopLine="23"/>
<Caret Line="677" Column="20" TopLine="665"/>
</Position2>
<Position3>
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
<Caret Line="196" Column="24" TopLine="190"/>
<Filename Value="testunit.pas"/>
<Caret Line="851" Column="47" TopLine="846"/>
</Position3>
<Position4>
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/colour.inc"/>
<Caret Line="10" Column="25" TopLine="2"/>
<Filename Value="testunit.pas"/>
<Caret Line="2" Column="73" TopLine="1"/>
</Position4>
<Position5>
<Filename Value="testunit.pas"/>
<Caret Line="36" Column="5" TopLine="23"/>
<Caret Line="225" Column="15" TopLine="213"/>
</Position5>
<Position6>
<Filename Value="testunit.pas"/>
<Caret Line="677" Column="17" TopLine="663"/>
<Caret Line="318" Column="18" TopLine="306"/>
</Position6>
<Position7>
<Filename Value="testunit.pas"/>
<Caret Line="678" Column="17" TopLine="663"/>
<Caret Line="337" Column="40" TopLine="325"/>
</Position7>
<Position8>
<Filename Value="testunit.pas"/>
<Caret Line="3" Column="69" TopLine="1"/>
<Caret Line="363" Column="18" TopLine="359"/>
</Position8>
<Position9>
<Filename Value="testunit.pas"/>
<Caret Line="44" Column="37" TopLine="37"/>
<Caret Line="383" Column="18" TopLine="379"/>
</Position9>
<Position10>
<Filename Value="testunit.pas"/>
<Caret Line="317" Column="35" TopLine="303"/>
<Caret Line="411" Column="13" TopLine="399"/>
</Position10>
<Position11>
<Filename Value="framescript.pas"/>
<Caret Line="65" Column="26" TopLine="51"/>
<Filename Value="testunit.pas"/>
<Caret Line="416" Column="13" TopLine="399"/>
</Position11>
<Position12>
<Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="35" Column="22" TopLine="19"/>
<Filename Value="testunit.pas"/>
<Caret Line="421" Column="13" TopLine="399"/>
</Position12>
<Position13>
<Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="273" Column="8" TopLine="250"/>
<Filename Value="testunit.pas"/>
<Caret Line="502" Column="15" TopLine="490"/>
</Position13>
<Position14>
<Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="195" Column="82" TopLine="187"/>
<Filename Value="testunit.pas"/>
<Caret Line="503" Column="17" TopLine="490"/>
</Position14>
<Position15>
<Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="243" Column="32" TopLine="220"/>
<Filename Value="testunit.pas"/>
<Caret Line="504" Column="51" TopLine="490"/>
</Position15>
<Position16>
<Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="242" Column="19" TopLine="220"/>
<Filename Value="testunit.pas"/>
<Caret Line="505" Column="15" TopLine="490"/>
</Position16>
<Position17>
<Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="198" Column="10" TopLine="193"/>
<Filename Value="testunit.pas"/>
<Caret Line="511" Column="28" TopLine="490"/>
</Position17>
<Position18>
<Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="232" Column="25" TopLine="209"/>
<Filename Value="testunit.pas"/>
<Caret Line="514" Column="22" TopLine="502"/>
</Position18>
<Position19>
<Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="243" Column="43" TopLine="218"/>
<Filename Value="testunit.pas"/>
<Caret Line="517" Column="24" TopLine="502"/>
</Position19>
<Position20>
<Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="31" Column="21" TopLine="19"/>
<Filename Value="testunit.pas"/>
<Caret Line="522" Column="36" TopLine="502"/>
</Position20>
<Position21>
<Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="235" Column="17" TopLine="221"/>
<Filename Value="testunit.pas"/>
<Caret Line="530" Column="15" TopLine="518"/>
</Position21>
<Position22>
<Filename Value="../../Units/Linux/xtest.pas"/>
<Caret Line="28" Column="72" TopLine="14"/>
<Filename Value="testunit.pas"/>
<Caret Line="531" Column="15" TopLine="518"/>
</Position22>
<Position23>
<Filename Value="../../../../Documents/fpc/rtl/unix/aliasctp.inc"/>
<Caret Line="45" Column="33" TopLine="31"/>
<Filename Value="testunit.pas"/>
<Caret Line="537" Column="20" TopLine="518"/>
</Position23>
<Position24>
<Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="199" Column="18" TopLine="192"/>
<Filename Value="testunit.pas"/>
<Caret Line="29" Column="60" TopLine="27"/>
</Position24>
<Position25>
<Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="235" Column="25" TopLine="219"/>
<Filename Value="testunit.pas"/>
<Caret Line="436" Column="26" TopLine="424"/>
</Position25>
<Position26>
<Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="233" Column="25" TopLine="220"/>
<Filename Value="testunit.pas"/>
<Caret Line="437" Column="31" TopLine="424"/>
</Position26>
<Position27>
<Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="243" Column="24" TopLine="220"/>
<Filename Value="testunit.pas"/>
<Caret Line="468" Column="44" TopLine="464"/>
</Position27>
<Position28>
<Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="244" Column="24" TopLine="229"/>
<Filename Value="testunit.pas"/>
<Caret Line="1" Column="82" TopLine="1"/>
</Position28>
<Position29>
<Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="243" Column="65" TopLine="229"/>
<Filename Value="testunit.pas"/>
<Caret Line="193" Column="49" TopLine="182"/>
</Position29>
<Position30>
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
<Caret Line="198" Column="23" TopLine="182"/>
<Filename Value="testunit.pas"/>
<Caret Line="305" Column="20" TopLine="293"/>
</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
@ -408,6 +408,7 @@ object Form1: TForm1
end
object MenuItemSaveAs: TMenuItem
Action = ActionSaveScriptAs
Caption = 'Save as...'
OnClick = ActionSaveAsExecute
end
object MenuItemSaveAll: TMenuItem
@ -580,8 +581,9 @@ object Form1: TForm1
object MenuEdit: TMenuItem
Caption = 'Edit'
SubMenuImages = Mufasa_Image_List
OnClick = MenuEditClick
object MenuItemUndo: TMenuItem
Caption = 'Undo'
Action = ActionUndo
Bitmap.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000000000000000
@ -618,12 +620,10 @@ object Form1: TForm1
00000000000000000000000000000000000000A0C4FF00000000000000000000
0000000000000000000000000000000000000000000000000000
}
ImageIndex = 18
ShortCut = 16474
OnClick = MenuItemUndoClick
OnClick = ActionUndoExecute
end
object MenuItemRedo: TMenuItem
Caption = 'Redo'
Action = ActionRedo
Bitmap.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF000000
@ -660,15 +660,13 @@ object Form1: TForm1
00000000000000000000000000000000000000000000000000000000000000A0
C4FF000000000000000000000000000000000000000000000000
}
ImageIndex = 12
ShortCut = 24666
OnClick = MenuItemRedoClick
OnClick = ActionRedoExecute
end
object MenuItemDivider3: TMenuItem
Caption = '-'
end
object MenuItemCut: TMenuItem
Caption = 'Cut'
Action = ActionCut
Bitmap.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
@ -705,12 +703,10 @@ object Form1: TForm1
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF009A6B2731AA7E43A19260
1805FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
ImageIndex = 3
ShortCut = 16472
OnClick = MenuItemCutClick
OnClick = ActionCutExecute
end
object MenuItemCopy: TMenuItem
Caption = 'Copy'
Action = ActionCopy
Bitmap.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
@ -747,55 +743,26 @@ object Form1: TForm1
55CECC8857DECB8856DBCC8856DBCB8757DBCA8350D0C479426EB2673C08FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
ImageIndex = 22
ShortCut = 16451
OnClick = MenuItemCopyClick
OnClick = ActionCopyExecute
end
object MenuItemPaste: TMenuItem
Caption = 'Paste'
Bitmap.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF005E5E5E025B5B5B775858588A5555558A5252
528A4F4F4F8A4C4C4C8A4A4A4A8A4848488A4646468A444444662063984A2063
98CF206398FF206398FF206398FF246395FF587388FFF7F7F7FFF0F0F0FFF0F0
F0FFF0F0F0FFF0F0F0FFF0F0F0FFF0F0F0FFF3F3F3FA46464684206398C262A5
D7FF65A8DAFF64A6D9FF62A4D8FF629FD1FF758EA4FFEFEFEFFFE7E7E7FFE7E7
E7FFE7E7E7FFE7E7E7FFE6E6E6FFE6E6E6FFECECECFA49494984206398FF68AB
DCFF488ECFFF468BCEFF4387CDFF4484C6FF6885A1FFF0F0F0FFB4B4B4FFB4B4
B4FFB4B4B4FFB4B4B4FFB4B4B4FFB3B3B3FFEDEDEDFA4C4C4C84206398FF69AE
DCFF4A93D1FF488FD0FF468BCEFF4788C7FF6C88A3FFF0F0F0FFE8E8E8FFE8E8
E8FFE7E7E7FFE7E7E7FFE7E7E7FFE7E7E7FFEDEDEDFA4F4F4F84206398FF6BB1
DEFF4D97D3FF4B93D2FF488FD0FF4A8CC9FF6F8BA5FFF1F1F1FFB6B6B6FFB5B5
B5FFB5B5B5FFB4B4B4FFB4B4B4FFB4B4B4FFEDEDEDFA53535384206398FF6DB3
DFFF509CD5FF4E98D3FF4B94D1FF4C91CBFF708EA7FFF1F1F1FFE9E9E9FFE9E9
E9FFE8E8E8FFE8E8E8FFE8E8E8FFE7E7E7FFEDEDEDFA56565684206398FF70B5
E0FF529FD7FF509CD6FF4E98D4FF4F95CDFF7391AAFFF1F1F1FFB7B7B7FFB6B6
B6FFB6B6B6FFB6B6B6FFB5B5B5FFB5B5B5FFEEEEEEFA5A5A5A84206398FF73B7
E1FF57A3D7FF53A0D7FF509DD5FF5299CFFF7594ACFFF8F8F8FFF2F2F2FFF2F2
F2FFF2F2F2FFF2F2F2FFF2F2F2FFF1F1F1FFF4F4F4FA5E5E5E84206398FF76B9
E2FF5CA7D9FF58A4D8FF53A0D7FF539ED5FF618BA9FF6488A1FF6487A1FF6386
A0FF69879FFF4A6881FF6A6A6A8A6868688A6565658A62626263206398FF7ABB
E3FF61AADBFF5AA5D9FF53A0D7FF529FD7FF529FD7FF529FD7FF529FD7FF529F
D7FF62A3D8FF206398FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00206398FF7CBD
E4FF65AEDDFF62ABDCFF5EA8DAFF5CA7D9FF5CA7D9FF5CA7D9FF5CA7D9FF529F
D7FF62A3D8FF206398FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00206398FF7FBF
E4FF69B2DEFF4A9BDAFF4497DCFF4396DCFF4296DCFF4295DCFF4195DBFF519E
D6FF6CB2DEFF206398FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00206398E071B3
DBFE7EBFE4FF4E9DDFFFB5EEFDFF75D4F0FF75D4F0FFB5EEFDFF4B9BDEFF6EB4
E0FF6DB3DFF9206398F3FFFFFF00FFFFFF00FFFFFF00FFFFFF00206398322063
98B2206398FF3775A4FFB6EFFEFF80DBF3FF80DBF3FFB6EFFEFF2E6EA1FF2063
98FF206398A520639853FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF002063982A206398FF206398FF206398FF206398FF206398FF206398F0FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
ImageIndex = 11
ShortCut = 16470
OnClick = MenuItemPasteClick
Action = ActionPaste
OnClick = ActionPasteExecute
end
object MenuItemDelete: TMenuItem
Action = ActionDelete
OnClick = ActionDeleteExecute
end
object MenuItemDivider4: TMenuItem
Caption = '-'
end
object MenuItemSelectAll: TMenuItem
Action = ActionSelectAll
OnClick = ActionSelectAllExecute
end
object MenuItemDivider5: TMenuItem
Caption = '-'
end
object MenuItemFind: TMenuItem
Action = ActionFindStart
OnClick = ActionFindstartExecute
@ -1908,9 +1875,87 @@ object Form1: TForm1
OnExecute = ActionFindstartExecute
ShortCut = 16454
end
object ActionCut: TAction
Caption = 'Cut'
ImageIndex = 3
OnExecute = ActionCutExecute
ShortCut = 16451
end
object ActionCopy: TAction
Caption = 'Copy'
ImageIndex = 22
OnExecute = ActionCopyExecute
ShortCut = 16451
end
object ActionPaste: TAction
Caption = 'Paste'
ImageIndex = 10
OnExecute = ActionPasteExecute
ShortCut = 16470
end
object ActionDelete: TAction
Caption = 'Delete'
OnExecute = ActionDeleteExecute
ShortCut = 46
end
object ActionSelectAll: TAction
Caption = 'Select All'
OnExecute = ActionSelectAllExecute
ShortCut = 16449
end
object ActionUndo: TAction
Caption = 'Undo'
ImageIndex = 18
OnExecute = ActionUndoExecute
ShortCut = 16474
end
object ActionRedo: TAction
Caption = 'Redo'
ImageIndex = 12
OnExecute = ActionRedoExecute
ShortCut = 16473
end
end
object DebugTimer: TTimer
OnTimer = ProcessDebugStream
left = 640
end
object ScriptPopup: TPopupMenu
OnPopup = ScriptPopupPopup
left = 680
object PopupItemUndo: TMenuItem
Action = ActionUndo
OnClick = ActionUndoExecute
end
object PopupItemRedo: TMenuItem
Action = ActionRedo
OnClick = ActionRedoExecute
end
object PopupItemDivider1: TMenuItem
Caption = '-'
end
object PopupItemCut: TMenuItem
Action = ActionCut
OnClick = ActionCutExecute
end
object PopupItemCopy: TMenuItem
Action = ActionCopy
OnClick = ActionCopyExecute
end
object PopupItemPaste: TMenuItem
Action = ActionPaste
OnClick = ActionPasteExecute
end
object PopupItemDelete: TMenuItem
Action = ActionDelete
OnClick = ActionDeleteExecute
end
object PopupItemDivider2: TMenuItem
Caption = '-'
end
object PopupItemSelectAll: TMenuItem
Action = ActionSelectAll
OnClick = ActionSelectAllExecute
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -58,6 +58,13 @@ type
{ TForm1 }
TForm1 = class(TForm)
ActionRedo: TAction;
ActionUndo: TAction;
ActionSelectAll: TAction;
ActionDelete: TAction;
ActionPaste: TAction;
ActionCopy: TAction;
ActionCut: TAction;
ActionFindStart: TAction;
ActionClearDebug: TAction;
ActionSaveAll: TAction;
@ -77,6 +84,18 @@ type
Memo1: TMemo;
MenuFile: TMenuItem;
MenuEdit: TMenuItem;
PopupItemDelete: TMenuItem;
MenuItemDelete: TMenuItem;
MenuItemDivider5: TMenuItem;
MenuItemSelectAll: TMenuItem;
PopupItemSelectAll: TMenuItem;
PopupItemDivider2: TMenuItem;
PopupItemPaste: TMenuItem;
PopupItemCopy: TMenuItem;
PopupItemCut: TMenuItem;
PopupItemDivider1: TMenuItem;
PopupItemRedo: TMenuItem;
PopupItemUndo: TMenuItem;
MenuItemFind: TMenuItem;
MenuItemDivider4: TMenuItem;
MenuItemDivider3: TMenuItem;
@ -91,6 +110,7 @@ type
MenuItemDivider2: TMenuItem;
MenuItemDivider: TMenuItem;
PageControl1: TPageControl;
ScriptPopup: TPopupMenu;
SearchPanel: TPanel;
ScriptPanel: TPanel;
TabPopup: TPopupMenu;
@ -142,18 +162,25 @@ type
MTrayIcon: TTrayIcon;
procedure ActionClearDebugExecute(Sender: TObject);
procedure ActionCloseTabExecute(Sender: TObject);
procedure ActionCopyExecute(Sender: TObject);
procedure ActionCutExecute(Sender: TObject);
procedure ActionDeleteExecute(Sender: TObject);
procedure ActionFindstartExecute(Sender: TObject);
procedure ActionNewExecute(Sender: TObject);
procedure ActionNewTabExecute(Sender: TObject);
procedure ActionOpenExecute(Sender: TObject);
procedure ActionPasteExecute(Sender: TObject);
procedure ActionPauseExecute(Sender: TObject);
procedure ActionRedoExecute(Sender: TObject);
procedure ActionRunExecute(Sender: TObject);
procedure ActionSaveAllExecute(Sender: TObject);
procedure ActionSaveAsExecute(Sender: TObject);
procedure ActionSaveExecute(Sender: TObject);
procedure ActionSelectAllExecute(Sender: TObject);
procedure ActionStopExecute(Sender: TObject);
procedure ActionTabLastExecute(Sender: TObject);
procedure ActionTabNextExecute(Sender: TObject);
procedure ActionUndoExecute(Sender: TObject);
procedure EditSearchChange(Sender: TObject);
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormCreate(Sender: TObject);
@ -164,23 +191,19 @@ type
procedure LabeledEditSearchKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure LabeledEditSearchKeyPress(Sender: TObject; var Key: char);
procedure MenuEditClick(Sender: TObject);
procedure MenuItemCloseTabsClick(Sender: TObject);
procedure MenuItemCopyClick(Sender: TObject);
procedure MenuItemCutClick(Sender: TObject);
procedure MenuItemExitClick(Sender: TObject);
procedure MenuItemPasteClick(Sender: TObject);
procedure MenuItemShowClick(Sender: TObject);
procedure MenuItemTabCloseClick(Sender: TObject);
procedure MenuItemTabCloseOthersClick(Sender: TObject);
procedure OnLinePSScript(Sender: TObject);
procedure ButtonPickClick(Sender: TObject);
procedure MenuItemRedoClick(Sender: TObject);
procedure ButtonSelectorDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure NoTray(Sender: TObject);
procedure PageControl1Change(Sender: TObject);
procedure ButtonTrayClick(Sender: TObject);
procedure MenuItemUndoClick(Sender: TObject);
procedure PageControl1Changing(Sender: TObject; var AllowChange: Boolean);
procedure PageControl1ContextPopup(Sender: TObject; MousePos: TPoint;
var Handled: Boolean);
@ -190,6 +213,7 @@ type
procedure PageControl1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure ProcessDebugStream(Sender: TObject);
procedure ScriptPopupPopup(Sender: TObject);
private
PopupTab : integer;
SearchStart : TPoint;
@ -270,6 +294,19 @@ begin
end;
end;
procedure TForm1.ScriptPopupPopup(Sender: TObject);
begin
with CurrScript.SynEdit do
begin
PopupItemUndo.Enabled:= CanUndo;
PopupItemRedo.Enabled:= CanRedo;
PopupItemCut.Enabled:= SelText <> '';
PopupItemCopy.Enabled:= SelText <> '';
PopupItemPaste.Enabled:= CanPaste;
PopupItemDelete.Enabled:= SelText <> '';
end;
end;
procedure formWriteln( S : String);
begin
writeln('formWriteln: ' + s);
@ -580,6 +617,30 @@ begin
Self.ClearScript; //DeleteTab would take care of this already, but yeah, it's neater this way.
end;
procedure TForm1.ActionCopyExecute(Sender: TObject);
begin
if CurrScript.SynEdit.Focused or ScriptPopup.HandleAllocated then
Self.Copy
else if Memo1.Focused then
Memo1.CopyToClipboard;
end;
procedure TForm1.ActionCutExecute(Sender: TObject);
begin
if CurrScript.SynEdit.Focused or ScriptPopup.HandleAllocated then
Self.Cut
else if Memo1.Focused then
Memo1.CutToClipboard;
end;
procedure TForm1.ActionDeleteExecute(Sender: TObject);
begin
if CurrScript.SynEdit.Focused or ScriptPopup.HandleAllocated then
CurrScript.SynEdit.ClearSelection
else if Memo1.Focused then
Memo1.ClearSelection;
end;
procedure TForm1.ActionFindstartExecute(Sender: TObject);
begin
if sender = LabeledEditSearch then
@ -610,11 +671,27 @@ begin
Self.OpenScript;
end;
procedure TForm1.ActionPasteExecute(Sender: TObject);
begin
if CurrScript.SynEdit.Focused or ScriptPopup.HandleAllocated then
Self.Paste
else if Memo1.Focused then
Memo1.PasteFromClipboard;
end;
procedure TForm1.ActionPauseExecute(Sender: TObject);
begin
Self.PauseScript;
end;
procedure TForm1.ActionRedoExecute(Sender: TObject);
begin
if CurrScript.SynEdit.Focused or ScriptPopup.HandleAllocated then
CurrScript.Redo
else if Memo1.Focused then
Memo1.Undo; //?
end;
procedure TForm1.ActionRunExecute(Sender: TObject);
begin
Self.RunScript;
@ -644,6 +721,14 @@ begin
Self.SaveCurrentScript;
end;
procedure TForm1.ActionSelectAllExecute(Sender: TObject);
begin
if CurrScript.SynEdit.Focused or ScriptPopup.HandleAllocated then
CurrScript.SynEdit.SelectAll
else if Memo1.Focused then
Memo1.SelectAll;
end;
procedure TForm1.ActionStopExecute(Sender: TObject);
begin
Self.StopScript;
@ -661,6 +746,14 @@ begin
PageControl1.TabIndex:= CurrIndex;
end;
procedure TForm1.ActionUndoExecute(Sender: TObject);
begin
if CurrScript.SynEdit.Focused or ScriptPopup.HandleAllocated then
CurrScript.Undo
else if Memo1.Focused then
Memo1.Undo;
end;
procedure TForm1.EditSearchChange(Sender: TObject);
begin
DoSearch(false);
@ -763,43 +856,40 @@ begin
end;
end;
procedure TForm1.MenuEditClick(Sender: TObject);
begin
if CurrScript.SynEdit.Focused or ScriptPopup.HandleAllocated then
with CurrScript.SynEdit do
begin
MenuItemUndo.Enabled:= CanUndo;
MenuItemRedo.Enabled:= CanRedo;
MenuItemCut.Enabled:= SelText <> '';
MenuItemCopy.Enabled:= SelText <> '';
MenuItemPaste.Enabled:= CanPaste;
MenuItemDelete.Enabled:= SelText <> '';
end else if Memo1.Focused then
with Memo1 do
begin
MenuItemUndo.Enabled:= CanUndo;
MenuItemRedo.Enabled:= False;
MenuItemCut.Enabled:= SelText <> '';
MenuItemCopy.Enabled:= SelText <> '';
MenuItemPaste.Enabled:= CurrScript.SynEdit.CanPaste;
MenuItemDelete.Enabled:= SelText <> '';
end;
end;
procedure TForm1.MenuItemCloseTabsClick(Sender: TObject);
begin
Self.CloseTabs;
end;
procedure TForm1.MenuItemCopyClick(Sender: TObject);
begin
if CurrScript.SynEdit.Focused then
Self.Copy
else if Memo1.Focused then
Memo1.CopyToClipboard;
end;
procedure TForm1.MenuItemCutClick(Sender: TObject);
begin
if CurrScript.SynEdit.Focused then
Self.Cut
else if Memo1.Focused then
Memo1.CutToClipboard;
end;
procedure TForm1.MenuItemExitClick(Sender: TObject);
begin
Self.Close;
end;
procedure TForm1.MenuItemPasteClick(Sender: TObject);
begin
if CurrScript.SynEdit.Focused then
Self.Paste
else if Memo1.Focused then
Memo1.PasteFromClipboard;
end;
procedure TForm1.MenuItemShowClick(Sender: TObject);
begin
@ -836,11 +926,6 @@ begin
end;
procedure TForm1.MenuItemRedoClick(Sender: TObject);
begin
CurrScript.redo;
end;
procedure TForm1.ButtonSelectorDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
@ -866,11 +951,6 @@ begin
Form1.Hide;
end;
procedure TForm1.MenuItemUndoClick(Sender: TObject);
begin
CurrScript.Undo;
end;
procedure TForm1.PageControl1Changing(Sender: TObject; var AllowChange: Boolean
);
begin