mirror of
https://github.com/moparisthebest/Simba
synced 2025-01-30 23:00:18 -05:00
Fixed issue with function list.
git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@534 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
ff42373876
commit
7f150e1204
@ -23,6 +23,7 @@ object FunctionListFrame: TFunctionListFrame
|
||||
OnDblClick = FunctionListDblClick
|
||||
OnDeletion = FunctionListDeletion
|
||||
OnMouseDown = FunctionListMouseDown
|
||||
OnMouseUp = FunctionListMouseUp
|
||||
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips]
|
||||
end
|
||||
object editSearchList: TEdit
|
||||
|
@ -8,20 +8,20 @@ LazarusResources.Add('TFunctionListFrame','FORMDATA',[
|
||||
+'Left'#2#0#6'Height'#3#227#1#3'Top'#2#18#5'Width'#3#182#0#5'Align'#7#8'alCli'
|
||||
+'ent'#17'DefaultItemHeight'#2#15#8'ReadOnly'#9#10'ScrollBars'#7#10'ssAutoBot'
|
||||
+'h'#8'TabOrder'#2#0#10'OnDblClick'#7#20'FunctionListDblClick'#10'OnDeletion'
|
||||
+#7#20'FunctionListDeletion'#11'OnMouseDown'#7#21'FunctionListMouseDown'#7'Op'
|
||||
+'tions'#11#17'tvoAutoItemHeight'#16'tvoHideSelection'#21'tvoKeepCollapsedNod'
|
||||
+'es'#11'tvoReadOnly'#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#245#1#5'Width'#3#182#0#5'Align'#7#8'alBottom'#8'OnChange'#7#20'editS'
|
||||
+'earchListChange'#8'TabOrder'#2#1#0#0#6'TLabel'#17'FunctionListLabel'#4'Left'
|
||||
+#2#2#6'Height'#2#14#3'Top'#2#2#5'Width'#3#178#0#5'Align'#7#5'alTop'#9'Alignm'
|
||||
+'ent'#7#8'taCenter'#20'BorderSpacing.Around'#2#2#7'Caption'#6#12'Functionlis'
|
||||
+'t'#10'Font.Style'#11#6'fsBold'#0#11'ParentColor'#8#10'ParentFont'#8#11'OnMo'
|
||||
+'useDown'#7#26'FunctionListLabelMouseDown'#0#0#12'TSpeedButton'#11'CloseButt'
|
||||
+'on'#4'Left'#3#134#0#6'Height'#2#16#3'Top'#2#2#5'Width'#2#16#7'Anchors'#11#5
|
||||
+'akTop'#7'akRight'#0#5'Color'#7#9'clBtnFace'#4'Flat'#9#10'Glyph.Data'#10':'#9
|
||||
+#0#0'6'#9#0#0'BM6'#9#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0' '#0
|
||||
+#0#0#0#0#0#9#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
|
||||
+#7#20'FunctionListDeletion'#11'OnMouseDown'#7#21'FunctionListMouseDown'#9'On'
|
||||
+'MouseUp'#7#19'FunctionListMouseUp'#7'Options'#11#17'tvoAutoItemHeight'#16't'
|
||||
+'voHideSelection'#21'tvoKeepCollapsedNodes'#11'tvoReadOnly'#14'tvoShowButton'
|
||||
+'s'#12'tvoShowLines'#11'tvoShowRoot'#11'tvoToolTips'#0#0#0#5'TEdit'#14'editS'
|
||||
+'earchList'#4'Left'#2#0#6'Height'#2#21#3'Top'#3#245#1#5'Width'#3#182#0#5'Ali'
|
||||
+'gn'#7#8'alBottom'#8'OnChange'#7#20'editSearchListChange'#8'TabOrder'#2#1#0#0
|
||||
+#6'TLabel'#17'FunctionListLabel'#4'Left'#2#2#6'Height'#2#14#3'Top'#2#2#5'Wid'
|
||||
+'th'#3#178#0#5'Align'#7#5'alTop'#9'Alignment'#7#8'taCenter'#20'BorderSpacing'
|
||||
+'.Around'#2#2#7'Caption'#6#12'Functionlist'#10'Font.Style'#11#6'fsBold'#0#11
|
||||
+'ParentColor'#8#10'ParentFont'#8#11'OnMouseDown'#7#26'FunctionListLabelMouse'
|
||||
+'Down'#0#0#12'TSpeedButton'#11'CloseButton'#4'Left'#3#134#0#6'Height'#2#16#3
|
||||
+'Top'#2#2#5'Width'#2#16#7'Anchors'#11#5'akTop'#7'akRight'#0#5'Color'#7#9'clB'
|
||||
+'tnFace'#4'Flat'#9#10'Glyph.Data'#10':'#9#0#0'6'#9#0#0'BM6'#9#0#0#0#0#0#0'6'
|
||||
+#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0' '#0#0#0#0#0#0#9#0#0'd'#0#0#0'd'#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#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#0#0#0#0#0#0#0#0#0
|
||||
@ -42,30 +42,30 @@ LazarusResources.Add('TFunctionListFrame','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#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#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#255#0#0
|
||||
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0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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#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
|
||||
@ -83,6 +83,6 @@ LazarusResources.Add('TFunctionListFrame','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#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#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#16'CloseButtonC'
|
||||
+'lick'#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#16'CloseButtonClick'#0#0#0
|
||||
]);
|
||||
|
@ -27,6 +27,8 @@ type
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure DockFormOnClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure CloseButtonClick(Sender: TObject);
|
||||
procedure FunctionListMouseUp(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
private
|
||||
FFilterTree : TTreeView;
|
||||
procedure FilterTreeVis(Vis : boolean);
|
||||
@ -127,6 +129,31 @@ begin
|
||||
Form1.MenuItemFunctionList.Checked := False;
|
||||
end;
|
||||
|
||||
procedure TFunctionListFrame.FunctionListMouseUp(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
N: TTreeNode;
|
||||
MethodInfo : TMethodInfo;
|
||||
begin
|
||||
if InCodeCompletion then
|
||||
begin;
|
||||
Writeln('Not yet implemented');
|
||||
exit;
|
||||
end;
|
||||
if not (Sender is TTreeView) then
|
||||
exit;
|
||||
N := TTreeView(Sender).GetNodeAt(x, y);
|
||||
if(N = nil)then
|
||||
exit;
|
||||
if button = mbRight then
|
||||
if N.Data <> nil then
|
||||
begin
|
||||
MethodInfo := PMethodInfo(N.data)^;
|
||||
if (MethodInfo.BeginPos > 0) then
|
||||
Form1.CurrScript.SynEdit.SelStart := MethodInfo.BeginPos + 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFunctionListFrame.FilterTreeVis(Vis: boolean);
|
||||
begin
|
||||
FunctionList.Visible:= not Vis;
|
||||
@ -334,6 +361,8 @@ procedure TFunctionListFrame.FunctionListMouseDown(Sender: TObject;
|
||||
var
|
||||
N: TTreeNode;
|
||||
begin
|
||||
if button = mbRight then
|
||||
exit;
|
||||
if InCodeCompletion then
|
||||
begin;
|
||||
Writeln('Not yet implemented');
|
||||
|
@ -102,7 +102,7 @@ procedure TScriptFrame.SynEditDragDrop(Sender, Source: TObject; X, Y: Integer);
|
||||
begin
|
||||
if Source is TFunctionListFrame then
|
||||
if TFunctionListFrame(Source).DraggingNode.Data <> nil then
|
||||
SynEdit.InsertTextAtCaret( GetMethodName(PChar(TFunctionListFrame(Source).DraggingNode.Data),true));
|
||||
SynEdit.InsertTextAtCaret( GetMethodName(PMethodInfo(TFunctionListFrame(Source).DraggingNode.Data)^.MethodStr,true));
|
||||
end;
|
||||
|
||||
procedure TScriptFrame.SynEditDragOver(Sender, Source: TObject; X, Y: Integer;
|
||||
@ -323,7 +323,7 @@ begin
|
||||
ScriptErrorLine:= -1;
|
||||
OwnerSheet.Caption:= ScriptName;
|
||||
SynEdit.Options:= SynEdit.Options- [eoGroupUndo];
|
||||
SynEdit.Options:= SynEdit.Options+ [eoGroupUndo];
|
||||
SynEdit.Options:= SynEdit.Options+ [eoGroupUndo,eoPersistentCaret];
|
||||
SynEdit.IncrementColor.Background := $30D070;
|
||||
SynEdit.HighlightAllColor.Background:= clYellow;
|
||||
SynEdit.HighlightAllColor.Foreground:= clDefault;
|
||||
|
@ -430,7 +430,6 @@ object Form1: TForm1
|
||||
Height = 257
|
||||
Width = 150
|
||||
OnChange = FunctionListChange
|
||||
OnDeletion = nil
|
||||
OnEnter = FunctionListEnter
|
||||
OnExit = FunctionListExit
|
||||
end
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -43,7 +43,7 @@ uses
|
||||
ColorBox , about, framefunctionlist, ocr, updateform, simbasettings;
|
||||
|
||||
const
|
||||
SimbaVersion = 533;
|
||||
SimbaVersion = 534;
|
||||
|
||||
type
|
||||
|
||||
@ -1240,11 +1240,6 @@ begin
|
||||
begin
|
||||
MethodInfo := PMethodInfo(node.Data)^;
|
||||
StatusBar.Panels[Panel_ScriptPath].Text := MethodInfo.MethodStr;
|
||||
if MethodInfo.BeginPos > 0 then
|
||||
begin
|
||||
CurrScript.SynEdit.SelStart := MethodInfo.BeginPos;
|
||||
CurrScript.SynEdit.SetFocus;
|
||||
end;
|
||||
end;
|
||||
if Node.level = 0 then
|
||||
StatusBar.Panels[Panel_ScriptPath].Text := 'Section: ' + Node.Text;
|
||||
|
Loading…
Reference in New Issue
Block a user