mirror of
https://github.com/moparisthebest/Simba
synced 2024-12-23 15:58:51 -05:00
Renamed the mainform, renamed the testunit added begining for a bitmapConversion tool.
This commit is contained in:
parent
db2c2d3b72
commit
98359e445a
@ -54,15 +54,15 @@ var
|
||||
|
||||
implementation
|
||||
uses
|
||||
TestUnit;
|
||||
simba;
|
||||
{ TAboutForm }
|
||||
|
||||
procedure TAboutForm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
Self.Caption := format('About Simba r%d', [TestUnit.SimbaVersion]);
|
||||
Self.LabelRevision.Caption := format('Revision %d', [TestUnit.SimbaVersion]);
|
||||
Self.Caption := format('About Simba r%d', [simba.SimbaVersion]);
|
||||
Self.LabelRevision.Caption := format('Revision %d', [simba.SimbaVersion]);
|
||||
AboutMemo.Lines.Add('Simba is released under the GPL license.');
|
||||
AboutMemo.Lines.Add(format('You are currently using version: %d',[Testunit.SimbaVersion]));
|
||||
AboutMemo.Lines.Add(format('You are currently using version: %d',[simba.SimbaVersion]));
|
||||
AboutMemo.Lines.Add('');
|
||||
AboutMemo.Lines.Add('Please report bugs at: http://mufasa.villavu.com/mantis/');
|
||||
end;
|
||||
|
26
Projects/SAMufasaGUI/bitmapconv.lfm
Normal file
26
Projects/SAMufasaGUI/bitmapconv.lfm
Normal file
@ -0,0 +1,26 @@
|
||||
object BitmapConvForm: TBitmapConvForm
|
||||
Left = 726
|
||||
Height = 240
|
||||
Top = 192
|
||||
Width = 320
|
||||
Caption = 'BitmapConvForm'
|
||||
ClientHeight = 240
|
||||
ClientWidth = 320
|
||||
LCLVersion = '0.9.29'
|
||||
object Button1: TButton
|
||||
Left = 144
|
||||
Height = 52
|
||||
Top = 152
|
||||
Width = 105
|
||||
Caption = 'Button1'
|
||||
TabOrder = 0
|
||||
end
|
||||
object CheckBox1: TCheckBox
|
||||
Left = 24
|
||||
Height = 17
|
||||
Top = 160
|
||||
Width = 71
|
||||
Caption = 'CheckBox1'
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
32
Projects/SAMufasaGUI/bitmapconv.pas
Normal file
32
Projects/SAMufasaGUI/bitmapconv.pas
Normal file
@ -0,0 +1,32 @@
|
||||
unit bitmapconv;
|
||||
|
||||
{$mode objfpc}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||||
StdCtrls;
|
||||
|
||||
type
|
||||
|
||||
{ TBitmapConvForm }
|
||||
|
||||
TBitmapConvForm = class(TForm)
|
||||
Button1: TButton;
|
||||
CheckBox1: TCheckBox;
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
BitmapConvForm: TBitmapConvForm;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
end.
|
||||
|
@ -104,7 +104,7 @@ var
|
||||
|
||||
implementation
|
||||
uses
|
||||
colour_conv, TestUnit, lclintf, lcltype;
|
||||
colour_conv, simba, lclintf, lcltype;
|
||||
|
||||
constructor TColourPickerObject.Create(C: Integer; P: TPoint; N: String);
|
||||
begin
|
||||
@ -502,7 +502,7 @@ constructor TColourHistoryForm.Create(TheOwner: TComponent);
|
||||
begin
|
||||
inherited Create(TheOwner);
|
||||
|
||||
PickNewColourButton.OnClick:= @Form1.ButtonPickClick;
|
||||
PickNewColourButton.OnClick:= @SimbaForm.ButtonPickClick;
|
||||
end;
|
||||
|
||||
destructor TColourHistoryForm.Destroy;
|
||||
@ -544,12 +544,12 @@ end;
|
||||
|
||||
procedure TColourHistoryForm.SetCHShowMenu(Sender: TObject);
|
||||
begin
|
||||
Form1.MenuItemColourHistory.Checked := True;
|
||||
SimbaForm.MenuItemColourHistory.Checked := True;
|
||||
end;
|
||||
|
||||
procedure TColourHistoryForm.UnSetCHShowMenu(Sender: TObject);
|
||||
begin
|
||||
Form1.MenuItemColourHistory.Checked := False;
|
||||
SimbaForm.MenuItemColourHistory.Checked := False;
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
@ -59,7 +59,7 @@ var
|
||||
implementation
|
||||
|
||||
uses
|
||||
MufasaTypes, math, graphtype, IntfGraphics,TestUnit,lclintf,colour_conv,InterfaceBase;
|
||||
MufasaTypes, math, graphtype, IntfGraphics,simba,lclintf,colour_conv,InterfaceBase;
|
||||
{ TDebugImgForm }
|
||||
|
||||
procedure TDebugImgForm.FormCreate(Sender: TObject);
|
||||
@ -76,7 +76,7 @@ end;
|
||||
|
||||
procedure TDebugImgForm.FormHide(Sender: TObject);
|
||||
begin
|
||||
Form1.MenuItemDebugImage.Checked := False;
|
||||
SimbaForm.MenuItemDebugImage.Checked := False;
|
||||
end;
|
||||
|
||||
procedure TDebugImgForm.BlackDebugImage;
|
||||
|
@ -38,7 +38,7 @@ var
|
||||
|
||||
implementation
|
||||
uses
|
||||
TestUnit, settingssandbox,simbasettings;
|
||||
simba, settingssandbox,simbasettings;
|
||||
|
||||
procedure TExtensionManager.SetOnchange(const AValue: TNotifyEvent);
|
||||
var
|
||||
|
@ -72,7 +72,7 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
TestUnit, Graphics, stringutil, simpleanalyzer,v_ideCodeParser,lclintf;
|
||||
simba, Graphics, stringutil, simpleanalyzer,v_ideCodeParser,lclintf;
|
||||
|
||||
{ TFunctionListFrame }
|
||||
|
||||
@ -99,14 +99,14 @@ procedure TFunctionListFrame.FrameEndDock(Sender, Target: TObject; X, Y: Integer
|
||||
begin
|
||||
if Target is TPanel then
|
||||
begin
|
||||
Form1.SplitterFunctionList.Visible := true;
|
||||
SimbaForm.SplitterFunctionList.Visible := true;
|
||||
CloseButton.Visible:= true;
|
||||
end
|
||||
else if Target is TCustomDockForm then
|
||||
begin
|
||||
TCustomDockForm(Target).Caption := 'Functionlist';
|
||||
TCustomDockForm(Target).OnClose := @DockFormOnClose;
|
||||
Form1.SplitterFunctionList.Visible:= false;
|
||||
SimbaForm.SplitterFunctionList.Visible:= false;
|
||||
CloseButton.Visible:= false;
|
||||
end;
|
||||
end;
|
||||
@ -125,8 +125,8 @@ begin
|
||||
if node.Data <> nil then
|
||||
if InCodeCompletion then
|
||||
begin
|
||||
Form1.CurrScript.SynEdit.InsertTextAtCaret( GetMethodName(PMethodInfo(node.Data)^.MethodStr,true));
|
||||
Form1.RefreshTab;
|
||||
SimbaForm.CurrScript.SynEdit.InsertTextAtCaret( GetMethodName(PMethodInfo(node.Data)^.MethodStr,true));
|
||||
SimbaForm.RefreshTab;
|
||||
end
|
||||
else
|
||||
begin
|
||||
@ -138,10 +138,10 @@ begin
|
||||
if MethodInfo.Filename <> '' then
|
||||
begin;
|
||||
// Writeln(MethodInfo.filename);
|
||||
Form1.LoadScriptFile(MethodInfo.Filename,true,true);
|
||||
SimbaForm.LoadScriptFile(MethodInfo.Filename,true,true);
|
||||
end;
|
||||
Form1.CurrScript.SynEdit.SelStart := MethodInfo.BeginPos + 1;
|
||||
Form1.CurrScript.SynEdit.SelEnd := MethodInfo.EndPos + 1;
|
||||
SimbaForm.CurrScript.SynEdit.SelStart := MethodInfo.BeginPos + 1;
|
||||
SimbaForm.CurrScript.SynEdit.SelEnd := MethodInfo.EndPos + 1;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -172,13 +172,13 @@ end;
|
||||
procedure TFunctionListFrame.DockFormOnClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
begin
|
||||
CloseAction := caHide;
|
||||
Form1.MenuItemFunctionList.Checked := False;
|
||||
SimbaForm.MenuItemFunctionList.Checked := False;
|
||||
end;
|
||||
|
||||
procedure TFunctionListFrame.CloseButtonClick(Sender: TObject);
|
||||
begin
|
||||
self.Hide;
|
||||
Form1.MenuItemFunctionList.Checked := False;
|
||||
SimbaForm.MenuItemFunctionList.Checked := False;
|
||||
end;
|
||||
|
||||
procedure TFunctionListFrame.FunctionListMouseUp(Sender: TObject;
|
||||
@ -248,8 +248,8 @@ begin
|
||||
FillThread.Analyzer := TCodeInsight.Create;
|
||||
with FillThread,FillThread.Analyzer do
|
||||
begin
|
||||
OnFindInclude := @Form1.OnCCFindInclude;
|
||||
FileName := Form1.CurrScript.ScriptFile;
|
||||
OnFindInclude := @SimbaForm.OnCCFindInclude;
|
||||
FileName := SimbaForm.CurrScript.ScriptFile;
|
||||
MS := TMemoryStream.Create;
|
||||
MS.Write(Script[1],length(script));
|
||||
OnTerminate:=@FillThreadTerminate;
|
||||
@ -278,9 +278,9 @@ begin
|
||||
FunctionList.FullCollapse;
|
||||
if InCodeCompletion then
|
||||
begin;
|
||||
Form1.CurrScript.SynEdit.Lines[CompletionCaret.y - 1] := CompletionStart;
|
||||
Form1.CurrScript.SynEdit.LogicalCaretXY:= point(CompletionCaret.x,CompletionCaret.y);
|
||||
Form1.CurrScript.SynEdit.SelEnd:= Form1.CurrScript.SynEdit.SelStart;
|
||||
SimbaForm.CurrScript.SynEdit.Lines[CompletionCaret.y - 1] := CompletionStart;
|
||||
SimbaForm.CurrScript.SynEdit.LogicalCaretXY:= point(CompletionCaret.x,CompletionCaret.y);
|
||||
SimbaForm.CurrScript.SynEdit.SelEnd:= SimbaForm.CurrScript.SynEdit.SelStart;
|
||||
end;
|
||||
FilterTreeVis(False);
|
||||
ScriptNode.Expand(true);
|
||||
@ -403,7 +403,7 @@ begin
|
||||
FilterTreeVis(false);
|
||||
editSearchList.Color := 6711039;
|
||||
if InCodeCompletion then
|
||||
Form1.CurrScript.SynEdit.Lines[CompletionCaret.y - 1] := CompletionStart;
|
||||
SimbaForm.CurrScript.SynEdit.Lines[CompletionCaret.y - 1] := CompletionStart;
|
||||
end;
|
||||
FilterTree.EndUpdate;
|
||||
end;
|
||||
@ -411,7 +411,7 @@ begin
|
||||
if result and InCodeCompletion then
|
||||
begin;
|
||||
str := format(CompletionLine, [InsertStr]);
|
||||
with Form1.CurrScript.SynEdit do
|
||||
with SimbaForm.CurrScript.SynEdit do
|
||||
begin;
|
||||
Lines[CompletionCaret.y - 1] := str;
|
||||
LogicalCaretXY:= StartWordCompletion;
|
||||
|
@ -20,7 +20,7 @@ object ScriptFrame: TScriptFrame
|
||||
Font.Quality = fqNonAntialiased
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
PopupMenu = Form1.ScriptPopup
|
||||
PopupMenu = SimbaForm.ScriptPopup
|
||||
TabOrder = 0
|
||||
OnDragDrop = SynEditDragDrop
|
||||
OnDragOver = SynEditDragOver
|
||||
|
@ -93,7 +93,7 @@ type
|
||||
|
||||
implementation
|
||||
uses
|
||||
TestUnit, SynEditTypes, LCLIntF, StrUtils,framefunctionlist;
|
||||
simba, SynEditTypes, LCLIntF, StrUtils,framefunctionlist;
|
||||
|
||||
function WordAtCaret(e: TSynEdit; var sp, ep: Integer; Start: Integer = -1): string;
|
||||
var
|
||||
@ -156,7 +156,7 @@ begin
|
||||
if not ScriptChanged then
|
||||
begin;
|
||||
ScriptChanged:= True;
|
||||
Form1.Caption:= Format(WindowTitle,[ScriptName + '*']);
|
||||
SimbaForm.Caption:= Format(WindowTitle,[ScriptName + '*']);
|
||||
OwnerSheet.Caption:=ScriptName + '*';
|
||||
end;
|
||||
end;
|
||||
@ -172,8 +172,8 @@ var
|
||||
begin
|
||||
mp := TCodeInsight.Create;
|
||||
mp.FileName := ScriptFile;
|
||||
mp.OnMessage := @Form1.OnCCMessage;
|
||||
mp.OnFindInclude := @Form1.OnCCFindInclude;
|
||||
mp.OnMessage := @SimbaForm.OnCCMessage;
|
||||
mp.OnFindInclude := @SimbaForm.OnCCFindInclude;
|
||||
|
||||
ms := TMemoryStream.Create;
|
||||
SynEdit.Lines.SaveToStream(ms);
|
||||
@ -194,10 +194,10 @@ begin
|
||||
begin
|
||||
if FileExists(TCodeInsight(d.Parser).FileName) then
|
||||
begin;
|
||||
if Form1.LoadScriptFile(TCodeInsight(d.Parser).FileName,true,true) then
|
||||
if SimbaForm.LoadScriptFile(TCodeInsight(d.Parser).FileName,true,true) then
|
||||
begin;
|
||||
Form1.CurrScript.SynEdit.SelStart:= d.StartPos + 1;
|
||||
Form1.CurrScript.SynEdit.SelEnd := d.StartPos + Length(TrimRight(d.RawText)) + 1;
|
||||
SimbaForm.CurrScript.SynEdit.SelStart:= d.StartPos + 1;
|
||||
SimbaForm.CurrScript.SynEdit.SelEnd := d.StartPos + Length(TrimRight(d.RawText)) + 1;
|
||||
end;
|
||||
end
|
||||
else
|
||||
@ -220,7 +220,7 @@ procedure TScriptFrame.SynEditCommandProcessed(Sender: TObject;
|
||||
var
|
||||
Command2 : TSynEditorCommand;
|
||||
begin
|
||||
if (Command = ecChar) and (AChar = '(') and (Form1.ParamHint.Visible = false) and (Form1.ShowHintAuto) then
|
||||
if (Command = ecChar) and (AChar = '(') and (SimbaForm.ParamHint.Visible = false) and (SimbaForm.ShowHintAuto) then
|
||||
begin
|
||||
Command2:= ecCodeHints;
|
||||
SynEditProcessUserCommand(sender,command2,achar,nil);
|
||||
@ -237,12 +237,12 @@ end;
|
||||
procedure TScriptFrame.SynEditDragOver(Sender, Source: TObject; X, Y: Integer;
|
||||
State: TDragState; var Accept: Boolean);
|
||||
begin
|
||||
Accept := Source = Form1.frmFunctionList;
|
||||
Accept := Source = SimbaForm.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;
|
||||
if(not(SimbaForm.Active))then SimbaForm.BringToFront;
|
||||
if(SimbaForm.ActiveControl <> SynEdit)then SimbaForm.ActiveControl := SynEdit;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -251,18 +251,18 @@ procedure TScriptFrame.SynEditKeyDown(Sender: TObject; var Key: Word;
|
||||
begin
|
||||
if key = VK_F3 then
|
||||
begin;
|
||||
Form1.ActionFindNextExecute(Sender);
|
||||
SimbaForm.ActionFindNextExecute(Sender);
|
||||
key := 0;
|
||||
end;
|
||||
if key = VK_ESCAPE then
|
||||
Form1.ParamHint.Hide;
|
||||
SimbaForm.ParamHint.Hide;
|
||||
|
||||
Form1.CodeCompletionForm.HandleKeyDown(Sender, Key, Shift);
|
||||
SimbaForm.CodeCompletionForm.HandleKeyDown(Sender, Key, Shift);
|
||||
end;
|
||||
|
||||
procedure TScriptFrame.SynEditKeyPress(Sender: TObject; var Key: char);
|
||||
begin
|
||||
Form1.CodeCompletionForm.HandleKeyPress(Sender, Key);
|
||||
SimbaForm.CodeCompletionForm.HandleKeyPress(Sender, Key);
|
||||
end;
|
||||
|
||||
procedure TScriptFrame.SynEditMouseLink(Sender: TObject; X, Y: Integer;
|
||||
@ -309,8 +309,8 @@ begin
|
||||
if (Command = ecCodeCompletion) and ((not SynEdit.GetHighlighterAttriAtRowCol(SynEdit.CaretXY, s, Attri)) or
|
||||
((Attri.Name <> SYNS_AttrComment) and (Attri.name <> SYNS_AttrString) and (Attri.name <> SYNS_AttrDirective))) then
|
||||
begin
|
||||
{form1.FunctionListShown(True);
|
||||
with form1.frmFunctionList do
|
||||
{SimbaForm.FunctionListShown(True);
|
||||
with SimbaForm.frmFunctionList do
|
||||
if editSearchList.CanFocus then
|
||||
begin;
|
||||
editSearchList.SetFocus;
|
||||
@ -348,8 +348,8 @@ begin
|
||||
end;}
|
||||
mp := TCodeInsight.Create;
|
||||
mp.FileName := ScriptFile;
|
||||
mp.OnMessage := @Form1.OnCCMessage;
|
||||
mp.OnFindInclude := @Form1.OnCCFindInclude;
|
||||
mp.OnMessage := @SimbaForm.OnCCMessage;
|
||||
mp.OnFindInclude := @SimbaForm.OnCCFindInclude;
|
||||
|
||||
ms := TMemoryStream.Create;
|
||||
ItemList := TStringList.Create;
|
||||
@ -360,7 +360,7 @@ begin
|
||||
|
||||
try
|
||||
Filter := WordAtCaret(Synedit, sp, ep);
|
||||
Form1.CodeCompletionStart := Point(sp, Synedit.CaretY);
|
||||
SimbaForm.CodeCompletionStart := Point(sp, Synedit.CaretY);
|
||||
|
||||
//mp.Run(ms, nil, Synedit.SelStart + (ep - Synedit.CaretX) - 1);
|
||||
s := SynEdit.Lines[SynEdit.Carety-1];
|
||||
@ -382,7 +382,7 @@ begin
|
||||
mp.FillSynCompletionProposal(ItemList, InsertList, s);
|
||||
p := SynEdit.ClientToScreen(SynEdit.RowColumnToPixels(Point(ep, SynEdit.CaretY)));
|
||||
p.y := p.y + SynEdit.LineHeight;
|
||||
Form1.CodeCompletionForm.Show(p, ItemList, InsertList, Filter, SynEdit);
|
||||
SimbaForm.CodeCompletionForm.Show(p, ItemList, InsertList, Filter, SynEdit);
|
||||
finally
|
||||
FreeAndNil(ms);
|
||||
FreeAndNil(mp);
|
||||
@ -392,11 +392,11 @@ begin
|
||||
end;
|
||||
if command = ecCodeHints then
|
||||
begin
|
||||
if Form1.ParamHint.Visible = true then
|
||||
form1.ParamHint.hide;
|
||||
if SimbaForm.ParamHint.Visible = true then
|
||||
SimbaForm.ParamHint.hide;
|
||||
mp := TCodeInsight.Create;
|
||||
mp.OnMessage := @form1.OnCCMessage;
|
||||
mp.OnFindInclude := @form1.OnCCFindInclude;
|
||||
mp.OnMessage := @SimbaForm.OnCCMessage;
|
||||
mp.OnFindInclude := @SimbaForm.OnCCFindInclude;
|
||||
|
||||
ms := TMemoryStream.Create;
|
||||
synedit.Lines.SaveToStream(ms);
|
||||
@ -441,7 +441,7 @@ begin
|
||||
if (not (d is TciProcedureDeclaration)) and (d.Owner is TciProcedureDeclaration) then
|
||||
d := d.Owner;
|
||||
if (TciProcedureDeclaration(d).Params <> '') then
|
||||
Form1.ParamHint.Show(PosToCaretXY(synedit,posi + 1), PosToCaretXY(synedit,bracketpos),
|
||||
SimbaForm.ParamHint.Show(PosToCaretXY(synedit,posi + 1), PosToCaretXY(synedit,bracketpos),
|
||||
TciProcedureDeclaration(d), synedit,mp)
|
||||
else
|
||||
FormWriteln('<no parameters expected>');
|
||||
@ -452,21 +452,21 @@ begin
|
||||
//Do not free the MP, we need to use this.
|
||||
end;
|
||||
end;
|
||||
if Form1.CodeCompletionForm.Visible then
|
||||
if SimbaForm.CodeCompletionForm.Visible then
|
||||
case Command of
|
||||
ecDeleteChar, ecDeleteWord, ecDeleteEOL:
|
||||
begin
|
||||
if (SynEdit.CaretY = Form1.CodeCompletionStart.y) then
|
||||
if (SynEdit.CaretY = SimbaForm.CodeCompletionStart.y) then
|
||||
begin
|
||||
//e.GetWordBoundsAtRowCol(acp_start, sp, ep);
|
||||
s := WordAtCaret(SynEdit, sp, ep, Form1.CodeCompletionStart.x);
|
||||
if (SynEdit.CaretX >= Form1.CodeCompletionStart.x) and (SynEdit.CaretX <= ep) then
|
||||
s := WordAtCaret(SynEdit, sp, ep, SimbaForm.CodeCompletionStart.x);
|
||||
if (SynEdit.CaretX >= SimbaForm.CodeCompletionStart.x) and (SynEdit.CaretX <= ep) then
|
||||
begin
|
||||
Form1.CodeCompletionForm.ListBox.Filter := s;
|
||||
SimbaForm.CodeCompletionForm.ListBox.Filter := s;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
Form1.CodeCompletionForm.Hide;
|
||||
SimbaForm.CodeCompletionForm.Hide;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -491,28 +491,28 @@ begin
|
||||
{$IFDEF UpdateEditButtons}
|
||||
if scSelection in changes then
|
||||
begin;
|
||||
Form1.TT_Cut.Enabled := SynEdit.SelAvail;
|
||||
form1.TT_Copy.Enabled:= Form1.TT_Cut.Enabled;
|
||||
form1.TT_Paste.Enabled:= SynEdit.CanPaste;
|
||||
SimbaForm.TT_Cut.Enabled := SynEdit.SelAvail;
|
||||
SimbaForm.TT_Copy.Enabled:= SimbaForm.TT_Cut.Enabled;
|
||||
SimbaForm.TT_Paste.Enabled:= SynEdit.CanPaste;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
if Form1.CodeCompletionForm.Visible then
|
||||
if SimbaForm.CodeCompletionForm.Visible then
|
||||
if (scAll in Changes) or (scTopLine in Changes) then
|
||||
Form1.CodeCompletionForm.Visible := False
|
||||
SimbaForm.CodeCompletionForm.Visible := False
|
||||
else if (scCaretX in Changes) or (scCaretY in Changes) or (scSelection in Changes) or (scModified in Changes) then
|
||||
begin
|
||||
if (SynEdit.CaretY = Form1.CodeCompletionStart.y) then
|
||||
if (SynEdit.CaretY = SimbaForm.CodeCompletionStart.y) then
|
||||
begin
|
||||
s := WordAtCaret(SynEdit, sp, ep, Form1.CodeCompletionStart.x);
|
||||
if (SynEdit.CaretX >= Form1.CodeCompletionStart.x) and (SynEdit.CaretX - 1 <= ep) then
|
||||
s := WordAtCaret(SynEdit, sp, ep, SimbaForm.CodeCompletionStart.x);
|
||||
if (SynEdit.CaretX >= SimbaForm.CodeCompletionStart.x) and (SynEdit.CaretX - 1 <= ep) then
|
||||
begin
|
||||
Form1.CodeCompletionForm.ListBox.Filter := s;
|
||||
SimbaForm.CodeCompletionForm.ListBox.Filter := s;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
Form1.CodeCompletionForm.Hide;
|
||||
SimbaForm.CodeCompletionForm.Hide;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -522,7 +522,7 @@ begin
|
||||
if ScriptChanged then
|
||||
if SynEdit.Lines.Text = StartText then
|
||||
begin;
|
||||
Form1.Caption:= format(WindowTitle,[ScriptName]);
|
||||
SimbaForm.Caption:= format(WindowTitle,[ScriptName]);
|
||||
OwnerSheet.Caption:= ScriptName;
|
||||
ScriptChanged := false;
|
||||
end;
|
||||
@ -534,7 +534,7 @@ begin
|
||||
if ScriptChanged then
|
||||
if SynEdit.Lines.Text = StartText then
|
||||
begin;
|
||||
Form1.Caption:= format(WindowTitle,[ScriptName]);
|
||||
SimbaForm.Caption:= format(WindowTitle,[ScriptName]);
|
||||
OwnerSheet.Caption := ScriptName;
|
||||
ScriptChanged := false;
|
||||
end;
|
||||
@ -551,10 +551,10 @@ begin
|
||||
else
|
||||
begin
|
||||
ErrorData.Module:= SetDirSeparators(ErrorData.Module);// Set it right ;-)
|
||||
Form1.LoadScriptFile(ErrorData.Module,true,true);//Checks if the file is already open!
|
||||
SimbaForm.LoadScriptFile(ErrorData.Module,true,true);//Checks if the file is already open!
|
||||
ErrorData.Module:= '';
|
||||
Form1.CurrScript.ErrorData := Self.ErrorData;
|
||||
Form1.CurrScript.HandleErrorData;
|
||||
SimbaForm.CurrScript.ErrorData := Self.ErrorData;
|
||||
SimbaForm.CurrScript.HandleErrorData;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
@ -575,7 +575,7 @@ procedure TScriptFrame.MakeActiveScriptFrame;
|
||||
var
|
||||
i : integer;
|
||||
begin
|
||||
if Form1.Visible then
|
||||
if SimbaForm.Visible then
|
||||
for i := 0 to OwnerPage.PageCount - 1 do
|
||||
if OwnerPage.Pages[i] = OwnerSheet then
|
||||
begin;
|
||||
@ -589,7 +589,7 @@ end;
|
||||
procedure TScriptFrame.ScriptThreadTerminate(Sender: TObject);
|
||||
begin
|
||||
FScriptState:= ss_None;
|
||||
Form1.RefreshTab;
|
||||
SimbaForm.RefreshTab;
|
||||
end;
|
||||
procedure AddKey(const SynEdit : TSynEdit; const ACmd: TSynEditorCommand; const AKey: word;const AShift: TShiftState);
|
||||
begin
|
||||
@ -614,7 +614,7 @@ begin
|
||||
FScriptState:= ss_None;
|
||||
ScriptErrorLine:= -1;
|
||||
OwnerSheet.Caption:= ScriptName;
|
||||
SynEdit.Highlighter := Form1.CurrHighlighter;
|
||||
SynEdit.Highlighter := SimbaForm.CurrHighlighter;
|
||||
SynEdit.Options:= SynEdit.Options + [eoTabIndent] - [eoSmartTabs];
|
||||
SynEdit.IncrementColor.Background := $30D070;
|
||||
SynEdit.HighlightAllColor.Background:= clYellow;
|
||||
|
@ -40,19 +40,19 @@
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="46">
|
||||
<Units Count="47">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="project1"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Filename Value="simba.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<ComponentName Value="SimbaForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="TestUnit"/>
|
||||
<UnitName Value="simba"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="../../Units/MMLCore/client.pas"/>
|
||||
@ -288,6 +288,13 @@
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="v_MiscFunctions"/>
|
||||
</Unit45>
|
||||
<Unit46>
|
||||
<Filename Value="bitmapconv.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="BitmapConvForm"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="bitmapconv"/>
|
||||
</Unit46>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
@ -319,4 +326,11 @@
|
||||
<CreateMakefileOnBuild Value="True"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="1">
|
||||
<Item1>
|
||||
<Name Value="ESyntaxError"/>
|
||||
</Item1>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
||||
|
@ -31,12 +31,12 @@ uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads, cmem,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, Forms, testunit, colourhistory, About, internets, debugimage,
|
||||
Interfaces, Forms, simba, colourhistory, About, internets, debugimage,
|
||||
framefunctionlist, simpleanalyzer, updater, updateform, simbasettings,
|
||||
libloader, mufasabase, v_ideCodeInsight, PSDump, v_ideCodeParser,
|
||||
v_AutoCompleteForm, CastaliaPasLex, CastaliaPasLexTypes, CastaliaSimplePasPar,
|
||||
CastaliaSimplePasParTypes, dcpbase64, mPasLex, v_Constants, v_MiscFunctions,
|
||||
extensionmanagergui, mmisc;
|
||||
extensionmanagergui, mmisc, bitmapconv;
|
||||
|
||||
{$R project1.res}
|
||||
|
||||
@ -44,11 +44,12 @@ begin
|
||||
Application.Title:='Simba';
|
||||
Application.Initialize;
|
||||
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.CreateForm(TSimbaForm, SimbaForm);
|
||||
Application.CreateForm(TColourHistoryForm, ColourHistoryForm);
|
||||
Application.CreateForm(TAboutForm, AboutForm);
|
||||
Application.CreateForm(TDebugImgForm, DebugImgForm);
|
||||
Application.CreateForm(TExtensionsForm, ExtensionsForm);
|
||||
Application.CreateForm(TBitmapConvForm, BitmapConvForm);
|
||||
// Application.CreateForm(TSimbaUpdateForm, SimbaUpdateForm);
|
||||
// Application.CreateForm(TSettingsForm, SettingsForm); Done in FormCreate of MainForm
|
||||
Application.Run;
|
||||
|
@ -49,7 +49,7 @@ uses
|
||||
uPSC_extctrls,uPSC_menus, //Compile libs
|
||||
uPSR_std, uPSR_controls,uPSR_classes,uPSR_graphics,uPSR_stdctrls,uPSR_forms,
|
||||
uPSR_extctrls,uPSR_menus, //Runtime-libs
|
||||
testunit,updateform,settingssandbox,bitmaps,files,Dialogs, mmisc//Writeln
|
||||
simba,updateform,settingssandbox,bitmaps,files,Dialogs, mmisc//Writeln
|
||||
;
|
||||
|
||||
function TSimbaPSExtension.HookExists(const HookName: String): Boolean;
|
||||
@ -119,10 +119,10 @@ procedure TSimbaPSExtension.RegisterMyMethods(Sender: TPSScript);
|
||||
begin
|
||||
Sender.Comp.AddTypes('TStringArray','Array of String');
|
||||
Sender.Comp.AddConstantN('AppPath','string').SetString(MainDir + DirectorySeparator);
|
||||
Sender.Comp.AddConstantN('IncludePath','string').SetString(Form1.IncludePath);
|
||||
Sender.Comp.AddConstantN('PluginPath','string').SetString(Form1.PluginPath);
|
||||
Sender.Comp.AddConstantN('FontPath','string').SetString(form1.FontPath);
|
||||
Sender.Comp.AddConstantN('ExtPath','string').SetString(form1.ExtPath);
|
||||
Sender.Comp.AddConstantN('IncludePath','string').SetString(SimbaForm.IncludePath);
|
||||
Sender.Comp.AddConstantN('PluginPath','string').SetString(SimbaForm.PluginPath);
|
||||
Sender.Comp.AddConstantN('FontPath','string').SetString(SimbaForm.FontPath);
|
||||
Sender.Comp.AddConstantN('ExtPath','string').SetString(SimbaForm.ExtPath);
|
||||
Sender.Comp.AddTypeS('TMsgDlgType', '( mtWarning, mtError, mtInformation, mtConfirmati'
|
||||
+'on, mtCustom )');
|
||||
Sender.Comp.AddTypeS('TMsgDlgBtn', '( mbYes, mbNo, mbOK, mbCancel, mbAbort, mbRetry, m'
|
||||
@ -146,8 +146,8 @@ end;
|
||||
|
||||
procedure TSimbaPSExtension.OnPSExecute(Sender: TPSScript);
|
||||
begin
|
||||
Sender.SetVarToInstance('simba',Form1);
|
||||
Sender.SetVarToInstance('Simba_MainMenu',Form1.MainMenu);
|
||||
Sender.SetVarToInstance('simba',SimbaForm);
|
||||
Sender.SetVarToInstance('Simba_MainMenu',SimbaForm.MainMenu);
|
||||
Sender.SetPointerToData('Settings',@Self.Settings,Sender.FindNamedType('TMMLSettingsSandbox'));
|
||||
end;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
object Form1: TForm1
|
||||
object SimbaForm: TSimbaForm
|
||||
Left = 150
|
||||
Height = 623
|
||||
Top = 69
|
File diff suppressed because it is too large
Load Diff
@ -81,14 +81,14 @@ var
|
||||
|
||||
implementation
|
||||
uses
|
||||
internets, TestUnit, simbasettings,lclintf;
|
||||
internets, simba, simbasettings,lclintf;
|
||||
|
||||
function TSimbaUpdateForm.CanUpdate: Boolean;
|
||||
begin
|
||||
GetLatestSimbaVersion;
|
||||
mDebugLn(format('Current Simba version: %d',[TestUnit.SimbaVersion]));
|
||||
mDebugLn(format('Current Simba version: %d',[simba.SimbaVersion]));
|
||||
mDebugLn('Latest Simba Version: ' + IntToStr(FSimbaVersion));
|
||||
Exit(testunit.SimbaVersion < FSimbaVersion);
|
||||
Exit(simba.SimbaVersion < FSimbaVersion);
|
||||
end;
|
||||
|
||||
function TSimbaUpdateForm.GetLatestFontVersion: integer;
|
||||
|
Loading…
Reference in New Issue
Block a user