mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 14:25:38 +03:00
Replaced Documents tabbar (means two bugs are fixed now)
Removed Projects tabbar and added a new item to the statusbar
This commit is contained in:
parent
cd7f15f112
commit
c9765e50c8
@ -114,8 +114,8 @@ IncludeVerInfo=1
|
||||
AutoIncBuild=1
|
||||
MajorVer=1
|
||||
MinorVer=4
|
||||
Release=0
|
||||
Build=17
|
||||
Release=1
|
||||
Build=1
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
@ -126,11 +126,17 @@ CodePage=1252
|
||||
[Version Info Keys]
|
||||
CompanyName=AMX Mod X Dev Team
|
||||
FileDescription=
|
||||
FileVersion=1.4.0.17
|
||||
FileVersion=1.4.1.1
|
||||
InternalName=gaben
|
||||
LegalCopyright=AMX Mod X Dev Team
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=AMXX-Studio
|
||||
ProductVersion=1.4.0.0
|
||||
ProductVersion=1.4.1.0
|
||||
Comments=
|
||||
[HistoryLists\hlConditionals]
|
||||
Count=1
|
||||
Item0=madExcept
|
||||
[HistoryLists\hlUnitAliases]
|
||||
Count=1
|
||||
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
|
@ -122,22 +122,22 @@ begin
|
||||
eCache.Free;
|
||||
|
||||
i := 0;
|
||||
if PAWNProjects.Count > 1 then begin
|
||||
PAWNProjects.Close(0);
|
||||
if PawnProjects.Count > 1 then begin
|
||||
PawnProjects.Close(0, True);
|
||||
i := 1;
|
||||
end;
|
||||
if CPPProjects.Count > 1 then begin
|
||||
CPPProjects.Close(0);
|
||||
CPPProjects.Close(0, True);
|
||||
i := 1;
|
||||
end;
|
||||
if OtherProjects.Count > 1 then begin
|
||||
OtherProjects.Close(0);
|
||||
OtherProjects.Close(0, True);
|
||||
i := 1;
|
||||
end;
|
||||
|
||||
if i = 1 then begin
|
||||
ActivateProjects(0, False); // Started := True is already set here
|
||||
PAWNProjects.Activate(PAWNProjects.Count -1, False, False);
|
||||
PAWNProjects.Activate(PawnProjects.Count -1, False, False);
|
||||
end;
|
||||
UpdateCI(frmMain.sciEditor.GetCurrentLineNumber);
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
@ -70,11 +70,11 @@ begin
|
||||
eCallTips := '';
|
||||
eKeywords := '';
|
||||
|
||||
if (not Application.Terminated) and (Started) and (not frmMain.pnlLoading.Visible) and (frmMain.trvExplorer.Visible) then begin
|
||||
if (Plugin_UpdateCodeExplorer(GetCurrLang.Name, ActiveDoc.FileName, frmMain.tsMain.Items[frmMain.tsMain.ActiveTabIndex].Caption, True)) and (frmMain.tsMain.ActiveTabIndex = 0) then begin
|
||||
if (not Application.Terminated) and (Started) and (not frmMain.pnlLoading.Visible) and (frmMain.trvExplorer.Visible) and (Assigned(ActiveDoc)) then begin
|
||||
if (Plugin_UpdateCodeExplorer(GetCurrLang.Name, ActiveDoc.FileName, frmMain.tbDocs.SelectedTab.Caption, True)) and (frmMain.stlIDEs.ItemIndex = 0) then begin
|
||||
try
|
||||
if CheckAU then begin
|
||||
if Plugin_UpdateCodeExplorer(GetCurrLang.Name, ActiveDoc.FileName, frmMain.tsMain.Items[frmMain.tsMain.ActiveTabIndex].Caption, True) then begin
|
||||
if Plugin_UpdateCodeExplorer(GetCurrLang.Name, ActiveDoc.FileName, frmMain.stlIDEs.Strings[frmMain.stlIDEs.ItemIndex], True) then begin
|
||||
// analyze code
|
||||
with ParseCodePawn(eCode, ExtractFileName(ActiveDoc.FileName)) do begin
|
||||
eConstants.Assign(Constants);
|
||||
@ -358,7 +358,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
Plugin_UpdateCodeExplorer(GetCurrLang.Name, ActiveDoc.FileName, frmMain.tsMain.Items[frmMain.tsMain.ActiveTabIndex].Caption, False);
|
||||
Plugin_UpdateCodeExplorer(GetCurrLang.Name, ActiveDoc.FileName, frmMain.stlIDEs.Strings[frmMain.stlIDEs.ItemIndex], False);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -372,13 +372,13 @@ end;
|
||||
|
||||
procedure UpdateCI(eLine: Integer);
|
||||
begin
|
||||
if eUpdating then exit;
|
||||
if (eUpdating) or (not Assigned(ActiveDoc)) then exit;
|
||||
eUpdating := True;
|
||||
if not Plugin_UpdateCodeInspector(GetCurrLang.Name, ActiveDoc.FileName, frmMain.tsMain.Items[frmMain.tsMain.ActiveTabIndex].Caption, True) then exit;
|
||||
if not Plugin_UpdateCodeInspector(GetCurrLang.Name, ActiveDoc.FileName, frmMain.tbDocs.SelectedTab.Caption, True) then exit;
|
||||
|
||||
if GetCurrLang.Name = 'Pawn' then begin
|
||||
UpdateCI_Pawn(eLine);
|
||||
Plugin_UpdateCodeInspector(GetCurrLang.Name, ActiveDoc.FileName, frmMain.tsMain.Items[frmMain.tsMain.ActiveTabIndex].Caption, False);
|
||||
Plugin_UpdateCodeInspector(GetCurrLang.Name, ActiveDoc.FileName, frmMain.tbDocs.SelectedTab.Caption, False);
|
||||
end;
|
||||
eUpdating := False;
|
||||
end;
|
||||
|
@ -5,7 +5,8 @@ interface
|
||||
uses SysUtils, Classes, Windows, Forms, Controls, SpTBXTabs, TBX, SciLexer,
|
||||
SciLexerMemo, ExtCtrls, Graphics, sciKeyBindings, ComCtrls, TB2Item,
|
||||
sciLexerMod, ScintillaLanguageManager, Menus, SpTBXItem, Registry,
|
||||
ShellApi, DDEMan, IdFTP, IdFTPList, IdException, JvInspector, JvComCtrls;
|
||||
ShellApi, DDEMan, IdFTP, IdFTPList, IdException, JvInspector, JvComCtrls,
|
||||
JvTabBar;
|
||||
|
||||
type TDocument = class(TCollectionItem)
|
||||
private
|
||||
@ -53,7 +54,7 @@ type TDocCollection = class(TCollection)
|
||||
function Add(AFilename: String; AHighlighter: String = ''): TDocument; reintroduce;
|
||||
function Open(AFilename: String; AHighlighter: String = ''): Integer;
|
||||
function Save(AIndex: Integer; AFilename: String = ''): Boolean;
|
||||
procedure Close(AIndex: Integer);
|
||||
procedure Close(AIndex: Integer; RemoveTab: Boolean);
|
||||
procedure Activate(Document: Integer; RestoreCaret: Boolean; SaveLastDoc: Boolean = True); overload;
|
||||
procedure Activate(Document: TDocument; RestoreCaret: Boolean; SaveLastDoc: Boolean = True); overload;
|
||||
published
|
||||
@ -77,7 +78,7 @@ procedure FillCodeExplorer(Lang: String);
|
||||
function IEInstalled: Boolean;
|
||||
function GetAMXXDir(ListenServer: Boolean): String;
|
||||
|
||||
function CloseDocument(eDocument: TDocument; SaveActiveDoc: Boolean = False): Boolean;
|
||||
function CloseDocument(eDocument: TDocument; SaveActiveDoc, RemoveTab: Boolean): Boolean;
|
||||
function AddExtension(eFilename, eHighlighter: String): String;
|
||||
|
||||
function ShowColorDialog(var Color: TColor; ePaintImage: TImage): Boolean;
|
||||
@ -439,10 +440,10 @@ begin
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
function CloseDocument(eDocument: TDocument; SaveActiveDoc: Boolean = False): Boolean;
|
||||
function CloseDocument(eDocument: TDocument; SaveActiveDoc, RemoveTab: Boolean): Boolean;
|
||||
var Collection: TDocCollection;
|
||||
begin
|
||||
case frmMain.tsMain.ActiveTabIndex of
|
||||
case frmMain.stlIDEs.ItemIndex of
|
||||
0: Collection := PawnProjects;
|
||||
1: Collection := CPPProjects;
|
||||
else Collection := OtherProjects;
|
||||
@ -452,16 +453,18 @@ begin
|
||||
if (eDocument.Modified) then begin
|
||||
case MessageBox(frmMain.Handle, PChar(Format(lCloseModify, [ExtractFileName(eDocument.FileName)])), PChar(Application.Title), MB_ICONQUESTION + MB_YESNOCANCEL) of
|
||||
mrYes: begin
|
||||
Collection.Activate(eDocument, True);
|
||||
frmMain.mnuSave.Click;
|
||||
if not eDocument.Untitled then
|
||||
Collection.Close(eDocument.Index);
|
||||
Result := not eDocument.Untitled;
|
||||
if Result then
|
||||
Collection.Close(eDocument.Index, RemoveTab);
|
||||
end;
|
||||
mrNo: Collection.Close(eDocument.Index);
|
||||
mrNo: Collection.Close(eDocument.Index, RemoveTab);
|
||||
mrCancel: Result := False;
|
||||
end;
|
||||
end
|
||||
else
|
||||
Collection.Close(eDocument.Index);
|
||||
Collection.Close(eDocument.Index, RemoveTab);
|
||||
end;
|
||||
|
||||
function AddExtension(eFilename, eHighlighter: String): String;
|
||||
@ -554,12 +557,11 @@ end;
|
||||
procedure ActivateProjects(Index: Integer; JumpToLastDoc: Boolean);
|
||||
var Collection: TDocCollection;
|
||||
i: integer;
|
||||
TabItem: TSpTBXTabItem;
|
||||
OldIndex: Integer;
|
||||
begin
|
||||
if not Plugin_ProjectsChange(CurrProjects, Index, True) then begin
|
||||
Started := False;
|
||||
frmMain.tsMain.ActiveTabIndex := CurrProjects;
|
||||
frmMain.stlIDEs.ItemIndex := CurrProjects;
|
||||
Started := True;
|
||||
exit;
|
||||
end;
|
||||
@ -577,21 +579,17 @@ begin
|
||||
|
||||
|
||||
Started := False; // dont run this command twice
|
||||
frmMain.tsMain.Items[Index].Checked := True; // select tab
|
||||
frmMain.stlIDEs.ItemIndex := Index;
|
||||
CurrProjects := Index;
|
||||
|
||||
tsDocuments.Items.Clear;
|
||||
for i := 0 to Collection.Count -1 do begin
|
||||
TabItem := TSpTBXTabItem.Create(tsDocuments);
|
||||
TabItem.Caption := TDocument(Collection.Items[i]).Title;
|
||||
TabItem.OnSelect := frmMain.OnTabSelect;
|
||||
tsDocuments.Items.Add(TabItem);
|
||||
end;
|
||||
tbDocs.Tabs.Clear;
|
||||
for i := 0 to Collection.Count -1 do
|
||||
tbDocs.AddTab(TDocument(Collection.Items[i]).Title);
|
||||
Started := True;
|
||||
|
||||
if JumpToLastDoc then begin
|
||||
Started := False;
|
||||
tsDocuments.Items[Collection.ActiveDocument.Index].Checked := True;
|
||||
tbDocs.Tabs[Collection.ActiveDocument.Index].Selected := True;
|
||||
Collection.Activate(Collection.ActiveDocument.Index, True);
|
||||
Started := True;
|
||||
end;
|
||||
@ -765,10 +763,8 @@ begin
|
||||
if not Started then exit;
|
||||
|
||||
frmMain.pnlLoading.Show;
|
||||
for i := 0 to frmMain.tsDocuments.Items.Count -1 do
|
||||
frmMain.tsDocuments.Items[i].Enabled := i = frmMain.tsDocuments.ActiveTabIndex;
|
||||
for i := 0 to frmMain.tsMain.Items.Count -1 do
|
||||
frmMain.tsMain.Items[i].Enabled := i = frmMain.tsMain.ActiveTabIndex;
|
||||
for i := 0 to frmMain.tbDocs.Tabs.Count -1 do
|
||||
frmMain.tbDocs.Tabs[i].Enabled := i = frmMain.tbDocs.SelectedTab.Index;
|
||||
for i := 0 to frmMain.tbxMenu.Items.Count -1 do
|
||||
frmMain.tbxMenu.Items[i].Enabled := False;
|
||||
for i := 0 to frmMain.tbxToolbar.Items.Count -1 do
|
||||
@ -779,6 +775,7 @@ begin
|
||||
frmMain.tbxCodeSnippets.Items[i].Enabled := False;
|
||||
for i := 0 to frmMain.tcTools.Items.Count -1 do
|
||||
frmMain.tcTools.Items[i].Enabled := False;
|
||||
frmMain.cboCurrentIDE.Enabled := False;
|
||||
frmMain.ppmDocuments.Items.Enabled := False;
|
||||
frmMain.sciEditor.ReadOnly := ReadOnly;
|
||||
end;
|
||||
@ -789,10 +786,8 @@ begin
|
||||
if not Started then exit;
|
||||
|
||||
frmMain.pnlLoading.Hide;
|
||||
for i := 0 to frmMain.tsDocuments.Items.Count -1 do
|
||||
frmMain.tsDocuments.Items[i].Enabled := True;
|
||||
for i := 0 to frmMain.tsMain.Items.Count -1 do
|
||||
frmMain.tsMain.Items[i].Enabled := True;
|
||||
for i := 0 to frmMain.tbDocs.Tabs.Count -1 do
|
||||
frmMain.tbDocs.Tabs[i].Enabled := True;
|
||||
for i := 0 to frmMain.tbxMenu.Items.Count -1 do
|
||||
frmMain.tbxMenu.Items[i].Enabled := True;
|
||||
for i := 0 to frmMain.tbxToolbar.Items.Count -1 do
|
||||
@ -804,11 +799,11 @@ begin
|
||||
for i := 0 to frmMain.tcTools.Items.Count -1 do
|
||||
frmMain.tcTools.Items[i].Enabled := True;
|
||||
|
||||
frmMain.tiCPP.Enabled := eCPP;
|
||||
frmMain.mnuNewHeaderCPP.Enabled := eCPP;
|
||||
frmMain.mnuNewModule.Enabled := eCPP;
|
||||
frmMain.mnuNewUnit.Enabled := eCPP;
|
||||
|
||||
frmMain.cboCurrentIDE.Enabled := True;
|
||||
frmMain.ppmDocuments.Items.Enabled := True;
|
||||
frmMain.sciEditor.ReadOnly := False;
|
||||
end;
|
||||
@ -947,6 +942,7 @@ end;
|
||||
|
||||
procedure TDocCollection.Activate(Document: Integer; RestoreCaret: Boolean; SaveLastDoc: Boolean = True);
|
||||
begin
|
||||
if Document < Count then
|
||||
Activate(TDocument(Items[Document]), RestoreCaret, SaveLastDoc);
|
||||
end;
|
||||
|
||||
@ -954,7 +950,7 @@ procedure TDocCollection.Activate(Document: TDocument; RestoreCaret: Boolean; Sa
|
||||
begin
|
||||
if not Plugin_DocChange(Document.Index, Document.FileName, Document.Highlighter, RestoreCaret, True) then begin
|
||||
Started := False;
|
||||
TSpTBXTabItem(frmMain.tsDocuments.Items[ActiveDoc.Index]).Checked := True;
|
||||
TJvTabBarItem(frmMain.tbDocs.Tabs[ActiveDoc.Index]).Selected := True;
|
||||
Started := True;
|
||||
exit;
|
||||
end;
|
||||
@ -983,7 +979,7 @@ begin
|
||||
frmMain.sciEditor.Lines.Clear;
|
||||
if Started then begin
|
||||
Started := False;
|
||||
frmMain.tsDocuments.Items[Document.Index].Checked := True;
|
||||
frmMain.tbDocs.Tabs[Document.Index].Selected := True;
|
||||
if (frmMain.Canvas.TextWidth(Document.FileName) > frmMain.mnuFilename.CustomWidth) and (not Document.Untitled) then
|
||||
frmMain.mnuFilename.Caption := ExtractFileName(Document.FileName)
|
||||
else
|
||||
@ -1024,7 +1020,6 @@ begin
|
||||
end;
|
||||
|
||||
function TDocCollection.Add(AFilename: String; AHighlighter: String = ''): TDocument;
|
||||
var TabItem: TSpTBXTabItem;
|
||||
begin
|
||||
if AHighlighter = '' then
|
||||
AHighlighter := Highlighter;
|
||||
@ -1064,43 +1059,63 @@ begin
|
||||
Title := '< ' + IntToStr(Count) + #32 + ExtractFileName(AFilename) + ' >';
|
||||
|
||||
if not Started then exit;
|
||||
if (Self = PawnProjects) and (frmMain.tsMain.ActiveTabIndex <> 0) then exit;
|
||||
if (Self = CPPProjects) and (frmMain.tsMain.ActiveTabIndex <> 1) then exit;
|
||||
if (Self = OtherProjects) and (frmMain.tsMain.ActiveTabIndex <> 2) then exit;
|
||||
if (Self = PawnProjects) and (frmMain.stlIDEs.ItemIndex <> 0) then exit;
|
||||
if (Self = CPPProjects) and (frmMain.stlIDEs.ItemIndex <> 1) then exit;
|
||||
if (Self = OtherProjects) and (frmMain.stlIDEs.ItemIndex <> 2) then exit;
|
||||
|
||||
TabItem := TSpTBXTabItem.Create(frmMain.tsDocuments);
|
||||
TabItem.Caption := Title;
|
||||
TabItem.OnSelect := frmMain.OnTabSelect;
|
||||
frmMain.tsDocuments.Items.Add(TabItem);
|
||||
Started := False;
|
||||
frmMain.tbDocs.AddTab(Title);
|
||||
Started := True;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TDocCollection.Close(AIndex: Integer);
|
||||
procedure TDocCollection.Close(AIndex: Integer; RemoveTab: Boolean);
|
||||
var Collection: TDocCollection;
|
||||
i: integer;
|
||||
begin
|
||||
case frmMain.tsMain.ActiveTabIndex of
|
||||
case frmMain.stlIDEs.ItemIndex of
|
||||
0: Collection := PawnProjects;
|
||||
1: Collection := CPPProjects;
|
||||
else Collection := OtherProjects;
|
||||
end;
|
||||
|
||||
if Collection = Self then begin
|
||||
frmMain.tsDocuments.Items.Delete(AIndex);
|
||||
frmMain.tsDocuments.Refresh;
|
||||
if RemoveTab then
|
||||
frmMain.tbDocs.Tabs.Delete(AIndex);
|
||||
if ActiveDoc.Index = AIndex then
|
||||
ActiveDoc := nil;
|
||||
end;
|
||||
|
||||
Delete(AIndex);
|
||||
for i := 0 to Count -1 do
|
||||
TDocument(Items[i]).Title := '< ' + IntToStr(i +1) + #32 + ExtractFileName(TDocument(Items[i]).FileName) + ' >';
|
||||
|
||||
if Collection = Self then begin
|
||||
for i := 0 to frmMain.tsDocuments.Items.Count -1 do
|
||||
TSpTBXTabItem(frmMain.tsDocuments.Items[i]).Caption := TDocument(Items[i]).Title;
|
||||
if (Collection = Self) then begin
|
||||
try
|
||||
for i := 0 to frmMain.tbDocs.Tabs.Count -1 do
|
||||
TJvTabBarItem(frmMain.tbDocs.Tabs[i]).Caption := TDocument(Items[i]).Title;
|
||||
except
|
||||
// no idea how to fix this
|
||||
end;
|
||||
end;
|
||||
|
||||
if Count = 0 then
|
||||
Add('', '');
|
||||
if Count = 0 then begin
|
||||
with Add('', '') do begin
|
||||
if Self = PawnProjects then begin
|
||||
Code := '/* Plugin generated by AMXX-Studio */' + #13#10 + #13#10;
|
||||
Code := Code + '#include <amxmodx>' + #13#10;
|
||||
Code := Code + '#include <amxmisc>' + #13#10 + #13#10;
|
||||
Code := Code + '#define PLUGIN "' + eConfig.ReadString('Misc', 'DefaultPluginName', 'New Plugin') + '"' + #13#10;
|
||||
Code := Code + '#define VERSION "' + eConfig.ReadString('Misc', 'DefaultPluginVersion', '1.0') + '"' + #13#10;
|
||||
Code := Code + '#define AUTHOR "' + eConfig.ReadString('Misc', 'DefaultPluginAuthor', 'Your name') + '"' + #13#10 + #13#10 + #13#10;
|
||||
Code := Code + 'public plugin_init() {' + #13#10;
|
||||
Code := Code + ' register_plugin(PLUGIN, VERSION, AUTHOR)' + #13#10;
|
||||
Code := Code + ' ' + #13#10;
|
||||
Code := Code + ' // Add your code here...' + #13#10;
|
||||
Code := Code + '}' + #13#10;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
if (AIndex -1 < Count) and (AIndex <> 0) then
|
||||
Activate(AIndex -1, True, False)
|
||||
|
@ -1,6 +1,6 @@
|
||||
object frmMain: TfrmMain
|
||||
Left = 257
|
||||
Top = 297
|
||||
Left = 240
|
||||
Top = 291
|
||||
Width = 888
|
||||
Height = 646
|
||||
Caption = 'AMXX-Studio'
|
||||
@ -44,6 +44,26 @@ object frmMain: TfrmMain
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object splRight: TSplitter
|
||||
Left = 669
|
||||
Top = 95
|
||||
Height = 499
|
||||
Align = alRight
|
||||
end
|
||||
object spcRight1: TImage
|
||||
Left = 877
|
||||
Top = 95
|
||||
Width = 3
|
||||
Height = 499
|
||||
Align = alRight
|
||||
end
|
||||
object spcLeft1: TImage
|
||||
Left = 0
|
||||
Top = 95
|
||||
Width = 3
|
||||
Height = 499
|
||||
Align = alLeft
|
||||
end
|
||||
object tbxTopDock: TSpTBXDock
|
||||
Left = 0
|
||||
Top = 0
|
||||
@ -657,86 +677,285 @@ object frmMain: TfrmMain
|
||||
end
|
||||
end
|
||||
end
|
||||
object tsMain: TSpTBXTabSet
|
||||
object sbStatus: TSpTBXStatusBar
|
||||
Left = 0
|
||||
Top = 594
|
||||
Width = 880
|
||||
Height = 25
|
||||
object mnuFilename: TSpTBXRightAlignSpacerItem
|
||||
CustomWidth = 542
|
||||
CaptionW = 'Untitled.sma'
|
||||
end
|
||||
object sepStatus0: TSpTBXSeparatorItem
|
||||
end
|
||||
object cboCurrentIDE: TSpTBXDropDownItem
|
||||
Caption = 'Pawn'
|
||||
EditWidth = 75
|
||||
RadioItem = True
|
||||
Text = 'Pawn'
|
||||
ReadOnly = True
|
||||
DropDownList = True
|
||||
object stlIDEs: TSpTBXStringList
|
||||
MinWidth = 72
|
||||
Strings.Strings = (
|
||||
'Pawn'
|
||||
'C++'
|
||||
'Other')
|
||||
OnClick = stlIDEsClick
|
||||
end
|
||||
end
|
||||
object sepStatus1: TSpTBXSeparatorItem
|
||||
end
|
||||
object mnuShowCodeTools: TSpTBXItem
|
||||
AutoCheck = True
|
||||
Checked = True
|
||||
OnClick = mnuShowCodeToolsClick
|
||||
CaptionW = 'Show Code-Tools'
|
||||
end
|
||||
object sepStatus2: TSpTBXSeparatorItem
|
||||
end
|
||||
object mnuModified: TSpTBXRightAlignSpacerItem
|
||||
CustomWidth = 50
|
||||
end
|
||||
object sepStatus3: TSpTBXSeparatorItem
|
||||
end
|
||||
object mnuCaret: TSpTBXRightAlignSpacerItem
|
||||
Alignment = taCenter
|
||||
CustomWidth = 80
|
||||
CaptionW = 'Ln 0 Ch 0'
|
||||
end
|
||||
end
|
||||
object tbDocs: TJvTabBar
|
||||
Left = 0
|
||||
Top = 72
|
||||
Width = 880
|
||||
Height = 524
|
||||
Align = alClient
|
||||
Tabs = <
|
||||
item
|
||||
Caption = '< Unknown.sma >'
|
||||
end>
|
||||
Painter = mtpDocuments
|
||||
OnTabClosing = tbDocsTabClosing
|
||||
OnTabSelected = tbDocsTabSelected
|
||||
OnMouseDown = tbDocsMouseDown
|
||||
end
|
||||
object tcTools: TSpTBXTabControl
|
||||
Left = 672
|
||||
Top = 95
|
||||
Width = 205
|
||||
Height = 499
|
||||
Align = alRight
|
||||
ActiveTabIndex = 0
|
||||
TabPosition = ttpBottom
|
||||
ThemeType = tttTBX
|
||||
OnActiveTabChange = tsMainActiveTabChange
|
||||
OnActiveTabChange = tcToolsActiveTabChange
|
||||
HiddenItems = <>
|
||||
object tiPawn: TSpTBXTabItem
|
||||
object tiTools: TSpTBXTabItem
|
||||
Checked = True
|
||||
OnClick = tiPawnClick
|
||||
TabPosition = ttpBottom
|
||||
ThemeType = tttTBX
|
||||
CaptionW = 'Pawn Projects'
|
||||
CaptionW = 'Code-Tools'
|
||||
end
|
||||
object tiCPP: TSpTBXTabItem
|
||||
Enabled = False
|
||||
OnClick = tiCPPClick
|
||||
object tiNotes: TSpTBXTabItem
|
||||
TabPosition = ttpBottom
|
||||
ThemeType = tttTBX
|
||||
CaptionW = 'C++ Projects'
|
||||
CaptionW = 'Notes'
|
||||
end
|
||||
object tiOther: TSpTBXTabItem
|
||||
OnClick = tiOtherClick
|
||||
TabPosition = ttpBottom
|
||||
ThemeType = tttTBX
|
||||
CaptionW = 'Other'
|
||||
end
|
||||
object tsDocuments: TSpTBXTabSet
|
||||
object tsNotes: TSpTBXTabSheet
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 880
|
||||
Height = 501
|
||||
Align = alClient
|
||||
ActiveTabIndex = 0
|
||||
TabAutofitMaxSize = 100
|
||||
ThemeType = tttTBX
|
||||
OnActiveTabChange = tsDocumentsActiveTabChange
|
||||
HiddenItems = <>
|
||||
object tiDocument1: TSpTBXTabItem
|
||||
Checked = True
|
||||
OnSelect = OnTabSelect
|
||||
CustomWidth = 100
|
||||
ThemeType = tttTBX
|
||||
CaptionW = '< 1 Untitled.sma >'
|
||||
Width = 205
|
||||
Height = 476
|
||||
Caption = 'Notes'
|
||||
ImageIndex = -1
|
||||
TabItem = 'tiNotes'
|
||||
object imgRight4: TImage
|
||||
Left = 202
|
||||
Top = 26
|
||||
Width = 1
|
||||
Height = 448
|
||||
Align = alRight
|
||||
end
|
||||
object spcLeft1: TImage
|
||||
Left = 0
|
||||
Top = 23
|
||||
Width = 3
|
||||
Height = 478
|
||||
object imgBottom4: TImage
|
||||
Left = 2
|
||||
Top = 474
|
||||
Width = 201
|
||||
Height = 2
|
||||
Align = alBottom
|
||||
end
|
||||
object imgTop4: TImage
|
||||
Left = 2
|
||||
Top = 24
|
||||
Width = 201
|
||||
Height = 2
|
||||
Align = alTop
|
||||
end
|
||||
object imgLeft4: TImage
|
||||
Left = 2
|
||||
Top = 26
|
||||
Width = 1
|
||||
Height = 448
|
||||
Align = alLeft
|
||||
end
|
||||
object spcRight1: TImage
|
||||
Left = 877
|
||||
Top = 23
|
||||
object tbxNotes: TSpTBXToolbar
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 201
|
||||
Height = 22
|
||||
Align = alTop
|
||||
Caption = 'tbxNotes'
|
||||
Images = ilImages
|
||||
TabOrder = 0
|
||||
object mnuBold: TSpTBXItem
|
||||
AutoCheck = True
|
||||
ImageIndex = 29
|
||||
OnClick = mnuBoldClick
|
||||
CaptionW = 'Bold'
|
||||
end
|
||||
object mnuItalic: TSpTBXItem
|
||||
AutoCheck = True
|
||||
ImageIndex = 27
|
||||
OnClick = mnuItalicClick
|
||||
CaptionW = 'Italic'
|
||||
end
|
||||
object mnuUnderline: TSpTBXItem
|
||||
AutoCheck = True
|
||||
ImageIndex = 28
|
||||
OnClick = mnuUnderlineClick
|
||||
CaptionW = 'Underline'
|
||||
end
|
||||
object sepNotes: TSpTBXSeparatorItem
|
||||
end
|
||||
object mnuSelectColor: TSpTBXSubmenuItem
|
||||
ImageIndex = 26
|
||||
CaptionW = 'Select color'
|
||||
object cpNotes: TTBXColorPalette
|
||||
Color = clBlack
|
||||
PaletteOptions = [tpoCustomImages]
|
||||
OnChange = cpNotesChange
|
||||
end
|
||||
end
|
||||
end
|
||||
object rtfNotes: TRichEdit
|
||||
Left = 3
|
||||
Top = 26
|
||||
Width = 199
|
||||
Height = 448
|
||||
Align = alClient
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 1
|
||||
WantTabs = True
|
||||
OnKeyDown = rtfNotesKeyDown
|
||||
OnMouseDown = rtfNotesMouseDown
|
||||
end
|
||||
end
|
||||
object tsExplorer: TSpTBXTabSheet
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 205
|
||||
Height = 476
|
||||
Caption = 'Code-Tools'
|
||||
ImageIndex = -1
|
||||
TabItem = 'tiTools'
|
||||
object spcBottom2: TImage
|
||||
Left = 2
|
||||
Top = 474
|
||||
Width = 201
|
||||
Height = 2
|
||||
Align = alBottom
|
||||
end
|
||||
object spcLeft2: TImage
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 3
|
||||
Height = 478
|
||||
Height = 472
|
||||
Align = alLeft
|
||||
end
|
||||
object spcRight2: TImage
|
||||
Left = 200
|
||||
Top = 2
|
||||
Width = 3
|
||||
Height = 472
|
||||
Align = alRight
|
||||
end
|
||||
object splRight: TSplitter
|
||||
Left = 669
|
||||
Top = 23
|
||||
Height = 478
|
||||
Align = alRight
|
||||
object pnlDock: TSpTBXMultiDock
|
||||
Left = 5
|
||||
Top = 2
|
||||
Width = 195
|
||||
Height = 472
|
||||
Position = dpxClient
|
||||
object pnlCodeExplorer: TSpTBXDockablePanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = 'Code-Explorer'
|
||||
DockedWidth = 191
|
||||
DockPos = 0
|
||||
TabOrder = 0
|
||||
OnVisibleChanged = pnlCodeExplorerVisibleChanged
|
||||
object trvExplorer: TTreeView
|
||||
Left = 0
|
||||
Top = 26
|
||||
Width = 191
|
||||
Height = 198
|
||||
Align = alClient
|
||||
Images = ilImages
|
||||
Indent = 19
|
||||
ReadOnly = True
|
||||
SortType = stBoth
|
||||
TabOrder = 1
|
||||
OnClick = trvExplorerClick
|
||||
OnCollapsed = trvExplorerCollapsed
|
||||
OnDblClick = trvExplorerDblClick
|
||||
OnExpanded = trvExplorerExpanded
|
||||
Items.Data = {
|
||||
07000000220000002A0000002A000000FFFFFFFFFFFFFFFF0000000000000000
|
||||
09436F6E7374616E7473200000002A0000002A000000FFFFFFFFFFFFFFFF0000
|
||||
00000100000007446566696E65641E0000002A0000002A000000FFFFFFFFFFFF
|
||||
FFFF0000000000000000054356617273210000002A0000002A000000FFFFFFFF
|
||||
FFFFFFFF000000000000000008466F727761726473210000002A0000002A0000
|
||||
00FFFFFFFFFFFFFFFF000000000000000008496E636C75646564200000002A00
|
||||
00002A000000FFFFFFFFFFFFFFFF0000000003000000074D6574686F64732000
|
||||
00002A0000002A000000FFFFFFFFFFFFFFFF0000000000000000074465666175
|
||||
6C741F0000002A0000002A000000FFFFFFFFFFFFFFFF00000000000000000645
|
||||
76656E74731F0000002A0000002A000000FFFFFFFFFFFFFFFF00000000000000
|
||||
000653746F636B73200000002A0000002A000000FFFFFFFFFFFFFFFF00000000
|
||||
00000000074E617469766573220000002A0000002A000000FFFFFFFFFFFFFFFF
|
||||
0000000000000000095661726961626C6573}
|
||||
end
|
||||
end
|
||||
object pnlCodeInspector: TSpTBXDockablePanel
|
||||
Left = 0
|
||||
Top = 228
|
||||
Caption = 'Code-Inspector'
|
||||
DockedWidth = 191
|
||||
DockPos = 228
|
||||
TabOrder = 1
|
||||
OnVisibleChanged = pnlCodeInspectorVisibleChanged
|
||||
object jviCode: TJvInspector
|
||||
Left = 0
|
||||
Top = 26
|
||||
Width = 191
|
||||
Height = 198
|
||||
Align = alClient
|
||||
Divider = 110
|
||||
ItemHeight = 16
|
||||
Painter = JvInspectorDotNETPainter
|
||||
OnItemValueChanged = jviCodeItemValueChanged
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object pnlParent: TPanel
|
||||
Left = 3
|
||||
Top = 23
|
||||
Top = 95
|
||||
Width = 666
|
||||
Height = 478
|
||||
Height = 499
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 1
|
||||
TabOrder = 4
|
||||
object splOutput: TSplitter
|
||||
Left = 0
|
||||
Top = 393
|
||||
Top = 414
|
||||
Width = 666
|
||||
Height = 3
|
||||
Cursor = crVSplit
|
||||
@ -747,7 +966,7 @@ object frmMain: TfrmMain
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 666
|
||||
Height = 393
|
||||
Height = 414
|
||||
Color = clWhite
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clBlack
|
||||
@ -4264,7 +4483,7 @@ object frmMain: TfrmMain
|
||||
end
|
||||
object lstOutput: TListBox
|
||||
Left = 0
|
||||
Top = 396
|
||||
Top = 417
|
||||
Width = 666
|
||||
Height = 82
|
||||
Align = alBottom
|
||||
@ -4325,245 +4544,6 @@ object frmMain: TfrmMain
|
||||
end
|
||||
end
|
||||
end
|
||||
object tcTools: TSpTBXTabControl
|
||||
Left = 672
|
||||
Top = 23
|
||||
Width = 205
|
||||
Height = 478
|
||||
Align = alRight
|
||||
ActiveTabIndex = 0
|
||||
TabPosition = ttpBottom
|
||||
ThemeType = tttTBX
|
||||
OnActiveTabChange = tcToolsActiveTabChange
|
||||
HiddenItems = <>
|
||||
object tiTools: TSpTBXTabItem
|
||||
Checked = True
|
||||
TabPosition = ttpBottom
|
||||
ThemeType = tttTBX
|
||||
CaptionW = 'Code-Tools'
|
||||
end
|
||||
object tiNotes: TSpTBXTabItem
|
||||
TabPosition = ttpBottom
|
||||
ThemeType = tttTBX
|
||||
CaptionW = 'Notes'
|
||||
end
|
||||
object tsNotes: TSpTBXTabSheet
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 205
|
||||
Height = 455
|
||||
Caption = 'Notes'
|
||||
ImageIndex = -1
|
||||
TabItem = 'tiNotes'
|
||||
object imgRight4: TImage
|
||||
Left = 202
|
||||
Top = 26
|
||||
Width = 1
|
||||
Height = 427
|
||||
Align = alRight
|
||||
end
|
||||
object imgBottom4: TImage
|
||||
Left = 2
|
||||
Top = 453
|
||||
Width = 201
|
||||
Height = 2
|
||||
Align = alBottom
|
||||
end
|
||||
object imgTop4: TImage
|
||||
Left = 2
|
||||
Top = 24
|
||||
Width = 201
|
||||
Height = 2
|
||||
Align = alTop
|
||||
end
|
||||
object imgLeft4: TImage
|
||||
Left = 2
|
||||
Top = 26
|
||||
Width = 1
|
||||
Height = 427
|
||||
Align = alLeft
|
||||
end
|
||||
object tbxNotes: TSpTBXToolbar
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 201
|
||||
Height = 22
|
||||
Align = alTop
|
||||
Caption = 'tbxNotes'
|
||||
Images = ilImages
|
||||
TabOrder = 0
|
||||
object mnuBold: TSpTBXItem
|
||||
AutoCheck = True
|
||||
ImageIndex = 29
|
||||
OnClick = mnuBoldClick
|
||||
CaptionW = 'Bold'
|
||||
end
|
||||
object mnuItalic: TSpTBXItem
|
||||
AutoCheck = True
|
||||
ImageIndex = 27
|
||||
OnClick = mnuItalicClick
|
||||
CaptionW = 'Italic'
|
||||
end
|
||||
object mnuUnderline: TSpTBXItem
|
||||
AutoCheck = True
|
||||
ImageIndex = 28
|
||||
OnClick = mnuUnderlineClick
|
||||
CaptionW = 'Underline'
|
||||
end
|
||||
object sepNotes: TSpTBXSeparatorItem
|
||||
end
|
||||
object mnuSelectColor: TSpTBXSubmenuItem
|
||||
ImageIndex = 26
|
||||
CaptionW = 'Select color'
|
||||
object cpNotes: TTBXColorPalette
|
||||
Color = clBlack
|
||||
PaletteOptions = [tpoCustomImages]
|
||||
OnChange = cpNotesChange
|
||||
end
|
||||
end
|
||||
end
|
||||
object rtfNotes: TRichEdit
|
||||
Left = 3
|
||||
Top = 26
|
||||
Width = 199
|
||||
Height = 427
|
||||
Align = alClient
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 1
|
||||
WantTabs = True
|
||||
OnKeyDown = rtfNotesKeyDown
|
||||
OnMouseDown = rtfNotesMouseDown
|
||||
end
|
||||
end
|
||||
object tsExplorer: TSpTBXTabSheet
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 205
|
||||
Height = 455
|
||||
Caption = 'Code-Tools'
|
||||
ImageIndex = -1
|
||||
TabItem = 'tiTools'
|
||||
object spcBottom2: TImage
|
||||
Left = 2
|
||||
Top = 453
|
||||
Width = 201
|
||||
Height = 2
|
||||
Align = alBottom
|
||||
end
|
||||
object spcLeft2: TImage
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 3
|
||||
Height = 451
|
||||
Align = alLeft
|
||||
end
|
||||
object spcRight2: TImage
|
||||
Left = 200
|
||||
Top = 2
|
||||
Width = 3
|
||||
Height = 451
|
||||
Align = alRight
|
||||
end
|
||||
object pnlDock: TSpTBXMultiDock
|
||||
Left = 5
|
||||
Top = 2
|
||||
Width = 195
|
||||
Height = 451
|
||||
Position = dpxClient
|
||||
object pnlCodeExplorer: TSpTBXDockablePanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = 'Code-Explorer'
|
||||
DockedWidth = 191
|
||||
DockPos = 0
|
||||
TabOrder = 0
|
||||
OnVisibleChanged = pnlCodeExplorerVisibleChanged
|
||||
object trvExplorer: TTreeView
|
||||
Left = 0
|
||||
Top = 26
|
||||
Width = 191
|
||||
Height = 188
|
||||
Align = alClient
|
||||
Images = ilImages
|
||||
Indent = 19
|
||||
ReadOnly = True
|
||||
SortType = stBoth
|
||||
TabOrder = 1
|
||||
OnClick = trvExplorerClick
|
||||
OnCollapsed = trvExplorerCollapsed
|
||||
OnDblClick = trvExplorerDblClick
|
||||
OnExpanded = trvExplorerExpanded
|
||||
Items.Data = {
|
||||
07000000220000002A0000002A000000FFFFFFFFFFFFFFFF0000000000000000
|
||||
09436F6E7374616E7473200000002A0000002A000000FFFFFFFFFFFFFFFF0000
|
||||
00000100000007446566696E65641E0000002A0000002A000000FFFFFFFFFFFF
|
||||
FFFF0000000000000000054356617273210000002A0000002A000000FFFFFFFF
|
||||
FFFFFFFF000000000000000008466F727761726473210000002A0000002A0000
|
||||
00FFFFFFFFFFFFFFFF000000000000000008496E636C75646564200000002A00
|
||||
00002A000000FFFFFFFFFFFFFFFF0000000003000000074D6574686F64732000
|
||||
00002A0000002A000000FFFFFFFFFFFFFFFF0000000000000000074465666175
|
||||
6C741F0000002A0000002A000000FFFFFFFFFFFFFFFF00000000000000000645
|
||||
76656E74731F0000002A0000002A000000FFFFFFFFFFFFFFFF00000000000000
|
||||
000653746F636B73200000002A0000002A000000FFFFFFFFFFFFFFFF00000000
|
||||
00000000074E617469766573220000002A0000002A000000FFFFFFFFFFFFFFFF
|
||||
0000000000000000095661726961626C6573}
|
||||
end
|
||||
end
|
||||
object pnlCodeInspector: TSpTBXDockablePanel
|
||||
Left = 0
|
||||
Top = 218
|
||||
Caption = 'Code-Inspector'
|
||||
DockedWidth = 191
|
||||
DockPos = 218
|
||||
TabOrder = 1
|
||||
OnVisibleChanged = pnlCodeInspectorVisibleChanged
|
||||
object jviCode: TJvInspector
|
||||
Left = 0
|
||||
Top = 26
|
||||
Width = 191
|
||||
Height = 187
|
||||
Align = alClient
|
||||
Divider = 110
|
||||
ItemHeight = 16
|
||||
Painter = JvInspectorDotNETPainter
|
||||
OnItemValueChanged = jviCodeItemValueChanged
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object sbStatus: TSpTBXStatusBar
|
||||
Left = 0
|
||||
Top = 596
|
||||
Width = 880
|
||||
Height = 23
|
||||
object mnuFilename: TSpTBXRightAlignSpacerItem
|
||||
CustomWidth = 623
|
||||
CaptionW = 'Untitled.sma'
|
||||
end
|
||||
object sepStatus1: TSpTBXSeparatorItem
|
||||
end
|
||||
object mnuShowCodeTools: TSpTBXItem
|
||||
AutoCheck = True
|
||||
Checked = True
|
||||
OnClick = mnuShowCodeToolsClick
|
||||
CaptionW = 'Show Code-Tools'
|
||||
end
|
||||
object sepStatus2: TSpTBXSeparatorItem
|
||||
end
|
||||
object mnuModified: TSpTBXRightAlignSpacerItem
|
||||
CustomWidth = 50
|
||||
end
|
||||
object sepStatus3: TSpTBXSeparatorItem
|
||||
end
|
||||
object mnuCaret: TSpTBXRightAlignSpacerItem
|
||||
Alignment = taCenter
|
||||
CustomWidth = 80
|
||||
CaptionW = 'Ln 0 Ch 0'
|
||||
end
|
||||
end
|
||||
object TBXSwitcher: TTBXSwitcher
|
||||
Theme = 'OfficeXP'
|
||||
Left = 813
|
||||
@ -6490,7 +6470,6 @@ object frmMain: TfrmMain
|
||||
Top = 36
|
||||
end
|
||||
object sciPrinter: TSciPrinter
|
||||
Editor = sciEditor
|
||||
Title = 'DelphiSci'
|
||||
HeaderFont.Charset = DEFAULT_CHARSET
|
||||
HeaderFont.Color = clBlack
|
||||
@ -6573,7 +6552,6 @@ object frmMain: TfrmMain
|
||||
end
|
||||
object sciSearchReplace: TSciSearchReplace
|
||||
SearchForSelWord = False
|
||||
Editor = sciEditor
|
||||
Left = 692
|
||||
Top = 36
|
||||
end
|
||||
@ -7799,11 +7777,11 @@ object frmMain: TfrmMain
|
||||
'XS_AMX'
|
||||
'XS_AMXX'
|
||||
'xvar_exists - BLA blubb XD')
|
||||
IgnoreCase = True
|
||||
IgnoreCase = False
|
||||
ChooseSingle = False
|
||||
AutoHide = True
|
||||
DropRestOfWord = False
|
||||
CancelAtStart = False
|
||||
CancelAtStart = True
|
||||
FromDocument = False
|
||||
Editor = sciEditor
|
||||
WordCharacters = '_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
|
||||
@ -7814,9 +7792,12 @@ object frmMain: TfrmMain
|
||||
Top = 6
|
||||
end
|
||||
object ppmDocuments: TSpTBXPopupMenu
|
||||
Images = ilImages
|
||||
Left = 662
|
||||
Top = 6
|
||||
object mnuPClose: TSpTBXItem
|
||||
ImageIndex = 46
|
||||
Images = ilImages
|
||||
OnClick = mnuPCloseClick
|
||||
CaptionW = 'Close file'
|
||||
end
|
||||
@ -7827,6 +7808,8 @@ object frmMain: TfrmMain
|
||||
object sepDocuments: TSpTBXSeparatorItem
|
||||
end
|
||||
object mnuPSave: TSpTBXItem
|
||||
ImageIndex = 1
|
||||
Images = ilImages
|
||||
CaptionW = 'Save file'
|
||||
end
|
||||
end
|
||||
@ -7835,4 +7818,23 @@ object frmMain: TfrmMain
|
||||
Left = 662
|
||||
Top = 36
|
||||
end
|
||||
object mtpDocuments: TJvModernTabBarPainter
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
DisabledFont.Charset = DEFAULT_CHARSET
|
||||
DisabledFont.Color = clGrayText
|
||||
DisabledFont.Height = -11
|
||||
DisabledFont.Name = 'MS Sans Serif'
|
||||
DisabledFont.Style = []
|
||||
SelectedFont.Charset = DEFAULT_CHARSET
|
||||
SelectedFont.Color = clWindowText
|
||||
SelectedFont.Height = -11
|
||||
SelectedFont.Name = 'MS Sans Serif'
|
||||
SelectedFont.Style = []
|
||||
Left = 632
|
||||
Top = 6
|
||||
end
|
||||
end
|
||||
|
@ -20,7 +20,8 @@ uses
|
||||
ShellAPI, IdFTPCommon, IdAntiFreezeBase, IdAntiFreeze, JvComponent,
|
||||
JvInspector, JvExControls, JvPluginManager, JvgLanguageLoader,
|
||||
JvWndProcHook, CommCtrl, JvPageList, JvPageListTreeView,
|
||||
SciSearchReplaceBase, SpTBXControls;
|
||||
SciSearchReplaceBase, SpTBXControls, JvTabBar, TB2ExtItems, SpTBXEditors,
|
||||
TBXLists, SpTBXLists;
|
||||
|
||||
type
|
||||
TfrmMain = class(TForm)
|
||||
@ -129,13 +130,6 @@ type
|
||||
mnuTPaste: TSpTBXItem;
|
||||
sepTEdit2: TSpTBXSeparatorItem;
|
||||
mnuTSelectAll: TSpTBXItem;
|
||||
tsMain: TSpTBXTabSet;
|
||||
tiPawn: TSpTBXTabItem;
|
||||
tiCPP: TSpTBXTabItem;
|
||||
tsDocuments: TSpTBXTabSet;
|
||||
tiDocument1: TSpTBXTabItem;
|
||||
spcLeft1: TImage;
|
||||
spcRight1: TImage;
|
||||
sciCallTips: TSciCallTips;
|
||||
sbStatus: TSpTBXStatusBar;
|
||||
sepGenerators1: TSpTBXSeparatorItem;
|
||||
@ -143,7 +137,6 @@ type
|
||||
infoNewCPP: TSpTBXRightAlignSpacerItem;
|
||||
sepNew1: TSpTBXSeparatorItem;
|
||||
mnuPaster: TSpTBXItem;
|
||||
tiOther: TSpTBXTabItem;
|
||||
sciPropertyLoader: TSciPropertyLoader;
|
||||
odOpen: TOpenDialog;
|
||||
sdSave: TSaveDialog;
|
||||
@ -166,9 +159,41 @@ type
|
||||
mnuFoldAll: TSpTBXItem;
|
||||
sepView1: TSpTBXSeparatorItem;
|
||||
sciPrinter: TSciPrinter;
|
||||
pnlParent: TPanel;
|
||||
sciEditor: TScintilla;
|
||||
splRight: TSplitter;
|
||||
mnuCopyMessage: TSpTBXItem;
|
||||
mnuCopyAll: TSpTBXItem;
|
||||
mnuSaveToFile: TSpTBXItem;
|
||||
sepOutput: TSpTBXSeparatorItem;
|
||||
ppmEditor: TSpTBXPopupMenu;
|
||||
mnuEditorCopy: TSpTBXItem;
|
||||
mnuEditorPaste: TSpTBXItem;
|
||||
mnuEditorCut: TSpTBXItem;
|
||||
sepEditorMenu2: TSpTBXSeparatorItem;
|
||||
mnuEditorUndo: TSpTBXItem;
|
||||
mnuEditorRedo: TSpTBXItem;
|
||||
sepEditorMenu3: TSpTBXSeparatorItem;
|
||||
mnuToogleBookmark: TSpTBXItem;
|
||||
mnuGoToBookmark: TSpTBXItem;
|
||||
mnuEditorDelete: TSpTBXItem;
|
||||
sepEditorMenu1: TSpTBXSeparatorItem;
|
||||
mnuEditorSelectAll: TSpTBXItem;
|
||||
sciSearchReplace: TSciSearchReplace;
|
||||
IdFTP: TIdFTP;
|
||||
sciAutoComplete: TSciAutoComplete;
|
||||
mnuHTML: TSpTBXItem;
|
||||
ppmDocuments: TSpTBXPopupMenu;
|
||||
mnuPClose: TSpTBXItem;
|
||||
mnuPSave: TSpTBXItem;
|
||||
sepDocuments: TSpTBXSeparatorItem;
|
||||
mnuPCloseAllFiles: TSpTBXItem;
|
||||
mnuMenuGenerator: TSpTBXItem;
|
||||
JvInspectorDotNETPainter: TJvInspectorDotNETPainter;
|
||||
mnuConnectionGen: TSpTBXItem;
|
||||
sepView3: TSpTBXSeparatorItem;
|
||||
mnuShowCodeExplorer: TSpTBXItem;
|
||||
mnuShowCodeInspector: TSpTBXItem;
|
||||
mnuRestoreBackup: TSpTBXItem;
|
||||
tbDocs: TJvTabBar;
|
||||
mtpDocuments: TJvModernTabBarPainter;
|
||||
tcTools: TSpTBXTabControl;
|
||||
tiTools: TSpTBXTabItem;
|
||||
tiNotes: TSpTBXTabItem;
|
||||
@ -189,49 +214,24 @@ type
|
||||
spcBottom2: TImage;
|
||||
spcLeft2: TImage;
|
||||
spcRight2: TImage;
|
||||
lstOutput: TListBox;
|
||||
splOutput: TSplitter;
|
||||
mnuCopyMessage: TSpTBXItem;
|
||||
mnuCopyAll: TSpTBXItem;
|
||||
mnuSaveToFile: TSpTBXItem;
|
||||
sepOutput: TSpTBXSeparatorItem;
|
||||
ppmEditor: TSpTBXPopupMenu;
|
||||
mnuEditorCopy: TSpTBXItem;
|
||||
mnuEditorPaste: TSpTBXItem;
|
||||
mnuEditorCut: TSpTBXItem;
|
||||
sepEditorMenu2: TSpTBXSeparatorItem;
|
||||
mnuEditorUndo: TSpTBXItem;
|
||||
mnuEditorRedo: TSpTBXItem;
|
||||
sepEditorMenu3: TSpTBXSeparatorItem;
|
||||
mnuToogleBookmark: TSpTBXItem;
|
||||
mnuGoToBookmark: TSpTBXItem;
|
||||
mnuEditorDelete: TSpTBXItem;
|
||||
sepEditorMenu1: TSpTBXSeparatorItem;
|
||||
mnuEditorSelectAll: TSpTBXItem;
|
||||
sciSearchReplace: TSciSearchReplace;
|
||||
IdFTP: TIdFTP;
|
||||
pnlLoading: TSpTBXPanel;
|
||||
pbLoading: TSpTBXProgressBar;
|
||||
cmdCancel: TSpTBXButton;
|
||||
sciAutoComplete: TSciAutoComplete;
|
||||
mnuHTML: TSpTBXItem;
|
||||
ppmDocuments: TSpTBXPopupMenu;
|
||||
mnuPClose: TSpTBXItem;
|
||||
mnuPSave: TSpTBXItem;
|
||||
sepDocuments: TSpTBXSeparatorItem;
|
||||
mnuPCloseAllFiles: TSpTBXItem;
|
||||
mnuMenuGenerator: TSpTBXItem;
|
||||
pnlDock: TSpTBXMultiDock;
|
||||
pnlCodeExplorer: TSpTBXDockablePanel;
|
||||
trvExplorer: TTreeView;
|
||||
pnlCodeInspector: TSpTBXDockablePanel;
|
||||
JvInspectorDotNETPainter: TJvInspectorDotNETPainter;
|
||||
jviCode: TJvInspector;
|
||||
mnuConnectionGen: TSpTBXItem;
|
||||
sepView3: TSpTBXSeparatorItem;
|
||||
mnuShowCodeExplorer: TSpTBXItem;
|
||||
mnuShowCodeInspector: TSpTBXItem;
|
||||
mnuRestoreBackup: TSpTBXItem;
|
||||
splRight: TSplitter;
|
||||
spcRight1: TImage;
|
||||
spcLeft1: TImage;
|
||||
pnlParent: TPanel;
|
||||
splOutput: TSplitter;
|
||||
sciEditor: TScintilla;
|
||||
lstOutput: TListBox;
|
||||
pnlLoading: TSpTBXPanel;
|
||||
pbLoading: TSpTBXProgressBar;
|
||||
cmdCancel: TSpTBXButton;
|
||||
sepStatus0: TSpTBXSeparatorItem;
|
||||
cboCurrentIDE: TSpTBXDropDownItem;
|
||||
stlIDEs: TSpTBXStringList;
|
||||
procedure FormConstrainedResize(Sender: TObject; var MinWidth,
|
||||
MinHeight, MaxWidth, MaxHeight: Integer);
|
||||
procedure mnuExitClick(Sender: TObject);
|
||||
@ -247,9 +247,6 @@ type
|
||||
procedure trvExplorerCollapsed(Sender: TObject; Node: TTreeNode);
|
||||
procedure trvExplorerExpanded(Sender: TObject; Node: TTreeNode);
|
||||
procedure mnuSettingsClick(Sender: TObject);
|
||||
procedure tsMainActiveTabChange(Sender: TObject; ItemIndex: Integer);
|
||||
procedure tsDocumentsActiveTabChange(Sender: TObject;
|
||||
ItemIndex: Integer);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure mnuTOpenClick(Sender: TObject);
|
||||
procedure mnuTSaveClick(Sender: TObject);
|
||||
@ -348,8 +345,6 @@ type
|
||||
var CancelDisplay: Boolean);
|
||||
procedure mnuMOTDGeneratorClick(Sender: TObject);
|
||||
procedure mnuHeaderPawnClick(Sender: TObject);
|
||||
procedure OnTabSelect(Sender: TTBCustomItem; Viewer: TTBItemViewer;
|
||||
Selecting: Boolean);
|
||||
procedure mnuPCloseClick(Sender: TObject);
|
||||
procedure mnuPCloseAllFilesClick(Sender: TObject);
|
||||
procedure mnuTNewClick(Sender: TObject);
|
||||
@ -380,12 +375,18 @@ type
|
||||
Item: TJvCustomInspectorItem);
|
||||
procedure mnuRestoreBackupClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure stlIDEsClick(Sender: TObject);
|
||||
procedure tbDocsTabSelected(Sender: TObject; Item: TJvTabBarItem);
|
||||
procedure tbDocsMouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure tbDocsTabClosing(Sender: TObject; Item: TJvTabBarItem;
|
||||
var AllowClose: Boolean);
|
||||
private
|
||||
procedure UpdateNotes;
|
||||
public
|
||||
IRCPasterStop: Boolean;
|
||||
eErrorLine: Integer;
|
||||
SelectedTab: TSpTBXTabItem;
|
||||
SelectedTab: TJvTabBarItem;
|
||||
procedure OnCodeSnippetClick(Sender: TObject);
|
||||
procedure OnCustomClick(Sender: TObject);
|
||||
procedure SetErrorLine(eLine: Integer);
|
||||
@ -415,7 +416,7 @@ procedure TfrmMain.FormConstrainedResize(Sender: TObject; var MinWidth,
|
||||
MinHeight, MaxWidth, MaxHeight: Integer);
|
||||
begin
|
||||
pnlLoading.Left := sciEditor.Left + 3 + (sciEditor.Width div 2) - (pnlLoading.Width div 2);
|
||||
pnlLoading.Top := tsDocuments.Top + sciEditor.Top + ((sciEditor.Height * 5) div 6) - (pnlLoading.Height div 2);
|
||||
pnlLoading.Top := tbDocs.Top + sciEditor.Top + ((sciEditor.Height * 5) div 6) - (pnlLoading.Height div 2);
|
||||
|
||||
if (Canvas.TextWidth(ActiveDoc.FileName) + 10 > mnuFilename.CustomWidth) then
|
||||
mnuFilename.Caption := ExtractFileName(ActiveDoc.FileName)
|
||||
@ -645,65 +646,7 @@ begin
|
||||
sciEditor.Gutter1.Width := 40;
|
||||
end;
|
||||
|
||||
{ Change Tab -> }
|
||||
|
||||
procedure TfrmMain.tsMainActiveTabChange(Sender: TObject;
|
||||
ItemIndex: Integer);
|
||||
begin
|
||||
if (not Started) or (frmMain.pnlLoading.Visible) then exit;
|
||||
|
||||
if (lstOutput.Visible) then begin
|
||||
if Plugin_VisibleControlChange(CTRL_OUTPUT, False) then begin
|
||||
splOutput.Hide;
|
||||
lstOutput.Hide;
|
||||
Plugin_VisibleControlChange(CTRL_OUTPUT, False);
|
||||
end;
|
||||
end;
|
||||
|
||||
case tsMain.ActiveTabIndex of
|
||||
0: begin
|
||||
mnuTNew.Caption := 'New Plugin';
|
||||
end;
|
||||
1: begin
|
||||
mnuTNew.Caption := 'New Unit';
|
||||
sciCallTips.ApiStrings.Clear;
|
||||
sciAutoComplete.AStrings.Clear;
|
||||
end;
|
||||
2: begin
|
||||
mnuTNew.Caption := 'New Textfile';
|
||||
sciCallTips.ApiStrings.Clear;
|
||||
sciAutoComplete.AStrings.Clear;
|
||||
end;
|
||||
end;
|
||||
ActivateProjects(ItemIndex, True);
|
||||
|
||||
trvExplorer.Items.Clear;
|
||||
FillCodeExplorer(GetCurrLang.Name);
|
||||
end;
|
||||
|
||||
procedure TfrmMain.tsDocumentsActiveTabChange(Sender: TObject;
|
||||
ItemIndex: Integer);
|
||||
var Collection: TDocCollection;
|
||||
begin
|
||||
if (not Started) or (pnlLoading.Visible) then exit;
|
||||
|
||||
if (lstOutput.Visible) then begin
|
||||
if Plugin_VisibleControlChange(CTRL_OUTPUT, False) then begin
|
||||
splOutput.Hide;
|
||||
lstOutput.Hide;
|
||||
Plugin_VisibleControlChange(CTRL_OUTPUT, False);
|
||||
end;
|
||||
end;
|
||||
|
||||
case tsMain.ActiveTabIndex of
|
||||
0: Collection := PawnProjects; // Pawn
|
||||
1: Collection := CPPProjects; // C++
|
||||
else Collection := OtherProjects; // Other
|
||||
end;
|
||||
Collection.Activate(ItemIndex, True);
|
||||
end;
|
||||
|
||||
{ <- Change Tab | Settings -> }
|
||||
{ Settings -> }
|
||||
|
||||
procedure TfrmMain.FormShow(Sender: TObject);
|
||||
begin
|
||||
@ -770,7 +713,7 @@ procedure TfrmMain.mnuEmptyPluginClick(Sender: TObject);
|
||||
begin
|
||||
if not Plugin_CreateNewFile(NEW_Pawn_EMPTYPLUGIN, True) then exit;
|
||||
|
||||
if tsMain.ActiveTabIndex <> 0 then
|
||||
if stlIDEs.ItemIndex <> 0 then
|
||||
ActivateProjects(0, False);
|
||||
|
||||
PawnProjects.Activate(PawnProjects.Add(''), True);
|
||||
@ -781,7 +724,7 @@ procedure TfrmMain.mnuNewPluginClick(Sender: TObject);
|
||||
begin
|
||||
if not Plugin_CreateNewFile(NEW_Pawn_PLUGIN, True) then exit;
|
||||
|
||||
if tsMain.ActiveTabIndex <> 0 then
|
||||
if stlIDEs.ItemIndex <> 0 then
|
||||
ActivateProjects(0, False);
|
||||
|
||||
PawnProjects.Activate(PawnProjects.Add(''), False);
|
||||
@ -825,7 +768,7 @@ begin
|
||||
eExt := ExtractFileExt(odOpen.FileName);
|
||||
eExt := LowerCase(eExt);
|
||||
if (eExt = '.sma') or (eExt = '.inc') or (eExt = '.inl') then begin // Pawn files
|
||||
if tsMain.ActiveTabIndex <> 0 then
|
||||
if stlIDEs.ItemIndex <> 0 then
|
||||
ActivateProjects(0, False);
|
||||
PawnProjects.Open(odOpen.FileName);
|
||||
end
|
||||
@ -833,28 +776,28 @@ begin
|
||||
if not eCPP then
|
||||
MessageBox(Handle, PChar(lNoCPP), PChar(Application.Title), MB_ICONWARNING)
|
||||
else begin
|
||||
if tsMain.ActiveTabIndex <> 1 then
|
||||
if stlIDEs.ItemIndex <> 1 then
|
||||
ActivateProjects(1, False);
|
||||
CPPProjects.Open(odOpen.FileName);
|
||||
end;
|
||||
end
|
||||
else if (eExt = '.htm') or (eExt = '.html') then begin // HTML files
|
||||
if tsMain.ActiveTabIndex <> 2 then
|
||||
if stlIDEs.ItemIndex <> 2 then
|
||||
ActivateProjects(2, False);
|
||||
OtherProjects.Open(odOpen.FileName, 'HTML');
|
||||
end
|
||||
else if (eExt = '.sql') then begin // SQL databases
|
||||
if tsMain.ActiveTabIndex <> 2 then
|
||||
if stlIDEs.ItemIndex <> 2 then
|
||||
ActivateProjects(2, False);
|
||||
OtherProjects.Open(odOpen.FileName, 'SQL');
|
||||
end
|
||||
else if (eExt = '.xml') then begin // XML files
|
||||
if tsMain.ActiveTabIndex <> 2 then
|
||||
if stlIDEs.ItemIndex <> 2 then
|
||||
ActivateProjects(2, False);
|
||||
OtherProjects.Open(odOpen.FileName, 'XML');
|
||||
end
|
||||
else begin // Other files and/or Textfiles
|
||||
if tsMain.ActiveTabIndex <> 2 then
|
||||
if stlIDEs.ItemIndex <> 2 then
|
||||
ActivateProjects(2, False);
|
||||
OtherProjects.Open(odOpen.FileName, 'null');
|
||||
end;
|
||||
@ -864,7 +807,7 @@ procedure TfrmMain.mnuNewTextfileClick(Sender: TObject);
|
||||
begin
|
||||
if not Plugin_CreateNewFile(NEW_OTHER_TEXTFILE, True) then exit;
|
||||
|
||||
if tsMain.ActiveTabIndex <> 2 then
|
||||
if stlIDEs.ItemIndex <> 2 then
|
||||
ActivateProjects(2, False);
|
||||
|
||||
OtherProjects.Activate(OtherProjects.Add(''), True);
|
||||
@ -876,7 +819,7 @@ procedure TfrmMain.mnuNewHTMLClick(Sender: TObject);
|
||||
begin
|
||||
if not Plugin_CreateNewFile(NEW_OTHER_HTML, True) then exit;
|
||||
|
||||
if tsMain.ActiveTabIndex <> 2 then
|
||||
if stlIDEs.ItemIndex <> 2 then
|
||||
ActivateProjects(2, True);
|
||||
|
||||
OtherProjects.Activate(OtherProjects.Add('', 'HTML'), True);
|
||||
@ -896,7 +839,7 @@ procedure TfrmMain.mnuNewSQLClick(Sender: TObject);
|
||||
begin
|
||||
if not Plugin_CreateNewFile(NEW_OTHER_SQL, True) then exit;
|
||||
|
||||
if tsMain.ActiveTabIndex <> 2 then
|
||||
if stlIDEs.ItemIndex <> 2 then
|
||||
ActivateProjects(2, False);
|
||||
|
||||
OtherProjects.Activate(OtherProjects.Add('', 'SQL'), True);
|
||||
@ -908,7 +851,7 @@ procedure TfrmMain.mnuNewXMLClick(Sender: TObject);
|
||||
begin
|
||||
if not Plugin_CreateNewFile(NEW_OTHER_XML, True) then exit;
|
||||
|
||||
if tsMain.ActiveTabIndex <> 2 then
|
||||
if stlIDEs.ItemIndex <> 2 then
|
||||
ActivateProjects(2, False);
|
||||
|
||||
OtherProjects.Activate(OtherProjects.Add('', 'XML'), True);
|
||||
@ -939,8 +882,7 @@ begin
|
||||
if sdSave.Execute then begin
|
||||
ActiveDoc.FileName := AddExtension(sdSave.FileName, ActiveDoc.Highlighter);
|
||||
ActiveDoc.Save;
|
||||
// Don't know why tsDocuments.Items[0].Caption := '???'; not works, but this does:
|
||||
TSpTBXTabItem(tsDocuments.Items[ActiveDoc.Index]).Caption := ActiveDoc.Title;
|
||||
tbDocs.Tabs[ActiveDoc.Index].Caption := ActiveDoc.Title;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -999,7 +941,7 @@ end;
|
||||
|
||||
procedure TfrmMain.mnuCloseClick(Sender: TObject);
|
||||
begin
|
||||
CloseDocument(ActiveDoc);
|
||||
CloseDocument(ActiveDoc, True, True);
|
||||
end;
|
||||
|
||||
procedure TfrmMain.mnuShowCodeToolsClick(Sender: TObject);
|
||||
@ -1287,7 +1229,7 @@ procedure TfrmMain.mnuSaveAllFilesClick(Sender: TObject);
|
||||
var a, b: integer;
|
||||
Collection: TDocCollection;
|
||||
begin
|
||||
case tsMain.ActiveTabIndex of
|
||||
case stlIDEs.ItemIndex of
|
||||
0: Collection := PawnProjects;
|
||||
1: Collection := CPPProjects;
|
||||
else Collection := OtherProjects;
|
||||
@ -1315,7 +1257,7 @@ begin
|
||||
if sdSave.Execute then begin
|
||||
TDocument(Collection.Items[b]).FileName := AddExtension(sdSave.FileName, TDocument(Collection.Items[b]).Highlighter);
|
||||
TDocument(Collection.Items[b]).Save;
|
||||
TSpTBXTabItem(tsDocuments.Items[b]).Caption := TDocument(Collection.Items[b]).Title;
|
||||
TJvTabBarItem(tbDocs.Tabs[b]).Caption := TDocument(Collection.Items[b]).Title;
|
||||
end
|
||||
else
|
||||
exit;
|
||||
@ -1355,7 +1297,7 @@ procedure TfrmMain.mnuCloseAllFilesClick(Sender: TObject);
|
||||
var i: integer;
|
||||
Collection: TDocCollection;
|
||||
begin
|
||||
case tsMain.ActiveTabIndex of
|
||||
case stlIDEs.ItemIndex of
|
||||
0: Collection := PawnProjects;
|
||||
1: Collection := CPPProjects;
|
||||
else Collection := OtherProjects;
|
||||
@ -1370,7 +1312,7 @@ begin
|
||||
|
||||
if frmAllFilesForm.ShowModal = mrOk then begin
|
||||
for i := Collection.Count - 1 downto 0 do begin
|
||||
if not CloseDocument(TDocument(Collection.Items[i])) then
|
||||
if not CloseDocument(TDocument(Collection.Items[i]), True, True) then
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
@ -1500,7 +1442,7 @@ begin
|
||||
ActiveDoc.Code := sciEditor.Lines.Text;
|
||||
frmClose.trvFiles.Items.Clear;
|
||||
{ Pawn Projects }
|
||||
eRoot := frmClose.trvFiles.Items.Add(nil, tsMain.Items[0].Caption);
|
||||
eRoot := frmClose.trvFiles.Items.Add(nil, stlIDEs.Strings[0]);
|
||||
for i := 0 to PawnProjects.Count - 1 do begin
|
||||
if TDocument(PawnProjects.Items[i]).Modified then
|
||||
frmClose.trvFiles.Items.AddChild(eRoot, IntToStr(i + 1) + '. ' + ExtractFileName(TDocument(PawnProjects.Items[i]).FileName));
|
||||
@ -1510,7 +1452,7 @@ begin
|
||||
else
|
||||
eRoot.Expand(False);
|
||||
{ C++ Projects }
|
||||
eRoot := frmClose.trvFiles.Items.Add(nil, tsMain.Items[1].Caption);
|
||||
eRoot := frmClose.trvFiles.Items.Add(nil, stlIDEs.Strings[1]);
|
||||
for i := 0 to CPPProjects.Count - 1 do begin
|
||||
if TDocument(CPPProjects.Items[i]).Modified then
|
||||
frmClose.trvFiles.Items.AddChild(eRoot, IntToStr(i + 1) + '. ' + ExtractFileName(TDocument(CPPProjects.Items[i]).FileName));
|
||||
@ -1520,7 +1462,7 @@ begin
|
||||
else
|
||||
eRoot.Expand(False);
|
||||
{ Other Projects }
|
||||
eRoot := frmClose.trvFiles.Items.Add(nil, tsMain.Items[2].Caption);
|
||||
eRoot := frmClose.trvFiles.Items.Add(nil, stlIDEs.Strings[2]);
|
||||
for i := 0 to OtherProjects.Count - 1 do begin
|
||||
if TDocument(OtherProjects.Items[i]).Modified then
|
||||
frmClose.trvFiles.Items.AddChild(eRoot, IntToStr(i + 1) + '. ' + ExtractFileName(TDocument(OtherProjects.Items[i]).FileName));
|
||||
@ -1547,7 +1489,7 @@ begin
|
||||
if frmClose.cmdSave.Caption = lSaveCaption then begin
|
||||
for i := 0 to frmClose.trvFiles.Items.Count - 1 do begin
|
||||
{ Pawn Projects }
|
||||
if frmClose.trvFiles.Items[i].Text = tsMain.Items[0].Caption then begin
|
||||
if frmClose.trvFiles.Items[i].Text = stlIDEs.Strings[0] then begin
|
||||
with frmClose.trvFiles.Items[i] do begin
|
||||
for k := 0 to Count - 1 do begin
|
||||
if frmClose.trvFiles.Checked[Item[k]] then begin
|
||||
@ -1571,7 +1513,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
{ C++ Projects }
|
||||
if frmClose.trvFiles.Items[i].Text = tsMain.Items[1].Caption then begin
|
||||
if frmClose.trvFiles.Items[i].Text = stlIDEs.Items[1].Caption then begin
|
||||
with frmClose.trvFiles.Items[i] do begin
|
||||
for k := 0 to Count - 1 do begin
|
||||
if frmClose.trvFiles.Checked[Item[k]] then begin
|
||||
@ -1595,7 +1537,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
{ Other Projects }
|
||||
if frmClose.trvFiles.Items[i].Text = tsMain.Items[2].Caption then begin
|
||||
if frmClose.trvFiles.Items[i].Text = stlIDEs.Strings[2] then begin
|
||||
with frmClose.trvFiles.Items[i] do begin
|
||||
for k := 0 to Count - 1 do begin
|
||||
if frmClose.trvFiles.Checked[Item[k]] then begin
|
||||
@ -1747,7 +1689,7 @@ begin
|
||||
|
||||
if (LowerCase(ExtractFileExt(ActiveDoc.FileName)) = '.inl') or (LowerCase(ExtractFileExt(ActiveDoc.FileName)) = '.inc') or (LowerCase(ExtractFileExt(ActiveDoc.FileName)) = '.h') then exit;
|
||||
|
||||
if tsMain.ActiveTabIndex = 0 then
|
||||
if stlIDEs.ItemIndex = 0 then
|
||||
DoCompilePawn(COMP_DEFAULT)
|
||||
else if (LowerCase(ExtractFileExt(ActiveDoc.FileName)) = '.htm') or (LowerCase(ExtractFileExt(ActiveDoc.FileName)) = '.html') then begin
|
||||
if IEInstalled then
|
||||
@ -1850,7 +1792,7 @@ begin
|
||||
if not Plugin_Compile(COMP_STARTHL, GetCurrLang.Name, ActiveDoc.FileName, True) then
|
||||
exit;
|
||||
|
||||
if tsMain.ActiveTabIndex = 0 then
|
||||
if stlIDEs.ItemIndex = 0 then
|
||||
DoCompilePawn(COMP_STARTHL);
|
||||
end;
|
||||
|
||||
@ -1859,7 +1801,7 @@ begin
|
||||
if not Plugin_Compile(COMP_UPLOAD, GetCurrLang.Name, ActiveDoc.FileName, True) then
|
||||
exit;
|
||||
|
||||
if tsMain.ActiveTabIndex = 0 then
|
||||
if stlIDEs.ItemIndex = 0 then
|
||||
DoCompilePawn(COMP_UPLOAD);
|
||||
end;
|
||||
|
||||
@ -2129,7 +2071,7 @@ procedure TfrmMain.mnuHeaderPawnClick(Sender: TObject);
|
||||
begin
|
||||
if not Plugin_CreateNewFile(NEW_Pawn_HEADER, True) then exit;
|
||||
|
||||
if tsMain.ActiveTabIndex <> 0 then
|
||||
if stlIDEs.ItemIndex <> 0 then
|
||||
ActivateProjects(0, False);
|
||||
|
||||
PawnProjects.Activate(PawnProjects.Add('Untitled.inc'), False);
|
||||
@ -2138,27 +2080,18 @@ begin
|
||||
Plugin_CreateNewFile(NEW_Pawn_HEADER, False);
|
||||
end;
|
||||
|
||||
procedure TfrmMain.OnTabSelect(Sender: TTBCustomItem;
|
||||
Viewer: TTBItemViewer; Selecting: Boolean);
|
||||
begin
|
||||
if (GetAsyncKeyState(VK_RBUTTON) <> 0) and (not pnlLoading.Visible) and (not Selecting) then begin
|
||||
SelectedTab := TSpTBXTabItem(Sender);
|
||||
ppmDocuments.Popup(Mouse.CursorPos.X, Mouse.CursorPos.Y);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmMain.mnuPCloseClick(Sender: TObject);
|
||||
var Collection: TDocCollection;
|
||||
begin
|
||||
try
|
||||
case tsMain.ActiveTabIndex of
|
||||
case stlIDEs.ItemIndex of
|
||||
0: Collection := PawnProjects; // Pawn
|
||||
1: Collection := CPPProjects; // C++
|
||||
else Collection := OtherProjects; // Other
|
||||
end;
|
||||
|
||||
if tsDocuments.Items.IndexOf(SelectedTab) <> -1 then
|
||||
CloseDocument(TDocument(Collection.Items[tsDocuments.Items.IndexOf(SelectedTab)]));
|
||||
if tbDocs.Tabs.IndexOf(SelectedTab) <> -1 then
|
||||
CloseDocument(TDocument(Collection.Items[tbDocs.Tabs.IndexOf(SelectedTab)]), True, True);
|
||||
except
|
||||
Application.ProcessMessages; // :o
|
||||
end;
|
||||
@ -2171,7 +2104,7 @@ end;
|
||||
|
||||
procedure TfrmMain.mnuTNewClick(Sender: TObject);
|
||||
begin
|
||||
case tsMain.ActiveTabIndex of
|
||||
case stlIDEs.ItemIndex of
|
||||
0: mnuNewPlugin.Click;
|
||||
1: mnuNewUnit.Click;
|
||||
2: mnuNewTextfile.Click;
|
||||
@ -2453,7 +2386,7 @@ begin
|
||||
mnuOpenClick(nil);
|
||||
odOpen.FileName := eTemp;
|
||||
end;
|
||||
SCM_CURRPROJECTS: Msg.Result := tsMain.ActiveTabIndex;
|
||||
SCM_CURRPROJECTS: Msg.Result := stlIDEs.ItemIndex;
|
||||
SCM_COMPILE: mnuDoCompile.Click;
|
||||
SCM_COMPILE_UPLOAD: mnuCompileAndUpload.Click;
|
||||
SCM_COMPILE_STARTHL: mnuCompileAndStartHL.Click;
|
||||
@ -2660,7 +2593,7 @@ begin
|
||||
else
|
||||
PawnProjects.Save(eIntData, eData);
|
||||
end;
|
||||
SCM_Pawn_CLOSEFILE: PawnProjects.Close(eIntData);
|
||||
SCM_Pawn_CLOSEFILE: PawnProjects.Close(eIntData, True);
|
||||
SCM_Pawn_ISUNTITLED: begin
|
||||
try
|
||||
if TDocument(PawnProjects.Items[eIntData]).Untitled then
|
||||
@ -2672,20 +2605,20 @@ begin
|
||||
end;
|
||||
end;
|
||||
SCM_Pawn_ACTIVATE: begin
|
||||
if tsMain.ActiveTabIndex <> 0 then
|
||||
if stlIDEs.ItemIndex <> 0 then
|
||||
ActivateProjects(0, eIntData = 1)
|
||||
else
|
||||
Msg.Result := 0;
|
||||
end;
|
||||
SCM_Pawn_ACTIVATEDOC: PawnProjects.Activate(eIntData, Pos('r', eData) <> 0, Pos('s', eData) <> 0);
|
||||
SCM_Pawn_GETNOTES: begin
|
||||
if (tsMain.ActiveTabIndex = 0) and (tsDocuments.ActiveTabIndex = eIntData) then
|
||||
if (stlIDEs.ItemIndex = 0) and (tbDocs.SelectedTab.Index = eIntData) then
|
||||
Msg.Result := Integer(PChar(GetRTFText(rtfNotes)))
|
||||
else
|
||||
Msg.Result := Integer(PChar(TDocument(PawnProjects.Items[eIntData]).NotesText));
|
||||
end;
|
||||
SCM_Pawn_SETNOTES: begin
|
||||
if (tsMain.ActiveTabIndex = 0) and (tsDocuments.ActiveTabIndex = eIntData) then
|
||||
if (stlIDEs.ItemIndex = 0) and (tbDocs.SelectedTab.Index = eIntData) then
|
||||
SetRTFText(rtfNotes, eData)
|
||||
else
|
||||
TDocument(PawnProjects.Items[eIntData]).NotesText := eData;
|
||||
@ -2693,7 +2626,7 @@ begin
|
||||
SCM_Pawn_GETFILENAME: Msg.Result := Integer(PChar(TDocument(PawnProjects.Items[eIntData]).FileName));
|
||||
SCM_Pawn_FILECOUNT: Msg.Result := PawnProjects.Count;
|
||||
SCM_Pawn_GETTEXT: begin
|
||||
if (tsMain.ActiveTabIndex = 0) and (tsDocuments.ActiveTabIndex = eIntData) then
|
||||
if (stlIDEs.ItemIndex = 0) and (tbDocs.SelectedTab.Index = eIntData) then
|
||||
Msg.Result := Integer(sciEditor.Lines.GetText)
|
||||
else
|
||||
Msg.Result := Integer(PChar(TDocument(PawnProjects.Items[eIntData]).Code));
|
||||
@ -2714,7 +2647,7 @@ begin
|
||||
end;
|
||||
SCM_CPP_CLOSEFILE: begin
|
||||
if eCPP then
|
||||
CPPProjects.Close(eIntData)
|
||||
CPPProjects.Close(eIntData, True)
|
||||
else
|
||||
Msg.Result := 0;
|
||||
end;
|
||||
@ -2729,7 +2662,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
SCM_CPP_ACTIVATE: begin
|
||||
if (eCPP) and (tsMain.ActiveTabIndex <> 1) then
|
||||
if (eCPP) and (stlIDEs.ItemIndex <> 1) then
|
||||
ActivateProjects(1, eIntData = 1)
|
||||
else
|
||||
Msg.Result := 0;
|
||||
@ -2743,26 +2676,24 @@ begin
|
||||
SCM_CPP_ACTIVATEIDE: begin
|
||||
eCPP := eIntData = 1;
|
||||
if eCPP then begin
|
||||
tiCPP.Enabled := True;
|
||||
mnuNewHeaderCPP.Enabled := True;
|
||||
mnuNewModule.Enabled := True;
|
||||
mnuNewUnit.Enabled := True;
|
||||
end
|
||||
else begin
|
||||
tiCPP.Enabled := False;
|
||||
mnuNewHeaderCPP.Enabled := False;
|
||||
mnuNewModule.Enabled := False;
|
||||
mnuNewUnit.Enabled := False;
|
||||
end;
|
||||
end;
|
||||
SCM_CPP_GETNOTES: begin
|
||||
if (tsMain.ActiveTabIndex = 1) and (tsDocuments.ActiveTabIndex = eIntData) then
|
||||
if (stlIDEs.ItemIndex = 1) and (tbDocs.SelectedTab.Index = eIntData) then
|
||||
Msg.Result := Integer(PChar(GetRTFText(rtfNotes)))
|
||||
else
|
||||
Msg.Result := Integer(PChar(TDocument(CPPProjects.Items[eIntData]).NotesText));
|
||||
end;
|
||||
SCM_CPP_SETNOTES: begin
|
||||
if (tsMain.ActiveTabIndex = 1) and (tsDocuments.ActiveTabIndex = eIntData) then
|
||||
if (stlIDEs.ItemIndex = 1) and (tbDocs.SelectedTab.Index = eIntData) then
|
||||
SetRTFText(rtfNotes, eData)
|
||||
else
|
||||
TDocument(CPPProjects.Items[eIntData]).NotesText := eData;
|
||||
@ -2770,7 +2701,7 @@ begin
|
||||
SCM_CPP_GETFILENAME: Msg.Result := Integer(PChar(TDocument(CPPProjects.Items[eIntData]).FileName));
|
||||
SCM_CPP_FILECOUNT: Msg.Result := CPPProjects.Count;
|
||||
SCM_CPP_GETTEXT: begin
|
||||
if (tsMain.ActiveTabIndex = 1) and (tsDocuments.ActiveTabIndex = eIntData) then
|
||||
if (stlIDEs.ItemIndex = 1) and (tbDocs.SelectedTab.Index = eIntData) then
|
||||
Msg.Result := Integer(sciEditor.Lines.GetText)
|
||||
else
|
||||
Msg.Result := Integer(PChar(TDocument(CPPProjects.Items[eIntData]).Code));
|
||||
@ -2794,20 +2725,20 @@ begin
|
||||
end;
|
||||
end;
|
||||
SCM_OTHER_ACTIVATE: begin
|
||||
if tsMain.ActiveTabIndex <> 2 then
|
||||
if stlIDEs.ItemIndex <> 2 then
|
||||
ActivateProjects(2, eIntData = 1)
|
||||
else
|
||||
Msg.Result := 0;
|
||||
end;
|
||||
SCM_OTHER_ACTIVATEDOC: OtherProjects.Activate(eIntData, Pos('r', eData) <> 0, Pos('s', eData) <> 0);
|
||||
SCM_OTHER_GETNOTES: begin
|
||||
if (tsMain.ActiveTabIndex = 2) and (tsDocuments.ActiveTabIndex = eIntData) then
|
||||
if (stlIDEs.ItemIndex = 2) and (tbDocs.SelectedTab.Index = eIntData) then
|
||||
Msg.Result := Integer(PChar(GetRTFText(rtfNotes)))
|
||||
else
|
||||
Msg.Result := Integer(PChar(TDocument(OtherProjects.Items[eIntData]).NotesText));
|
||||
end;
|
||||
SCM_OTHER_SETNOTES: begin
|
||||
if (tsMain.ActiveTabIndex = 2) and (tsDocuments.ActiveTabIndex = eIntData) then
|
||||
if (stlIDEs.ItemIndex = 2) and (tbDocs.SelectedTab.Index = eIntData) then
|
||||
SetRTFText(rtfNotes, eData)
|
||||
else
|
||||
TDocument(OtherProjects.Items[eIntData]).NotesText := eData;
|
||||
@ -2815,7 +2746,7 @@ begin
|
||||
SCM_OTHER_GETFILENAME: Msg.Result := Integer(PChar(TDocument(OtherProjects.Items[eIntData]).FileName));
|
||||
SCM_OTHER_FILECOUNT: Msg.Result := OtherProjects.Count;
|
||||
SCM_OTHER_GETTEXT: begin
|
||||
if (tsMain.ActiveTabIndex = 2) and (tsDocuments.ActiveTabIndex = eIntData) then
|
||||
if (stlIDEs.ItemIndex = 2) and (tbDocs.SelectedTab.Index = eIntData) then
|
||||
Msg.Result := Integer(sciEditor.Lines.GetText)
|
||||
else
|
||||
Msg.Result := Integer(PChar(TDocument(OtherProjects.Items[eIntData]).Code));
|
||||
@ -2840,8 +2771,8 @@ begin
|
||||
end;
|
||||
end;
|
||||
SCM_OUTPUT_INDEXOF: Msg.Result := lstOutput.Items.IndexOf(eData);
|
||||
SCM_ACTIVE_DOCUMENT: Msg.Result := tsDocuments.ActiveTabIndex;
|
||||
SCM_ACTIVE_PROJECTS: Msg.Result := tsMain.ActiveTabIndex;
|
||||
SCM_ACTIVE_DOCUMENT: Msg.Result := tbDocs.SelectedTab.Index;
|
||||
SCM_ACTIVE_PROJECTS: Msg.Result := stlIDEs.ItemIndex;
|
||||
SCM_EDITOR_SETTEXT: sciEditor.Lines.SetText(Msg.CopyDataStruct.lpData);
|
||||
SCM_EDITOR_GETTEXT: Msg.Result := Integer(sciEditor.Lines.GetText);
|
||||
SCM_EDTIOR_SETCALLTIPS: sciCallTips.ApiStrings.Text := eData;
|
||||
@ -3035,6 +2966,8 @@ end;
|
||||
|
||||
procedure TfrmMain.FormCreate(Sender: TObject);
|
||||
begin
|
||||
stlIDEs.ItemIndex := 0;
|
||||
|
||||
sciEditor.StreamClass := TSciMyStream;
|
||||
sciEditor.OnCallTipClick := sciEditorCallTipClick; // god why doesn't delphi save this
|
||||
eACList := TmxJsCollection.Create(TACFunction);
|
||||
@ -3042,5 +2975,97 @@ begin
|
||||
eACList.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'config\ACList.cfg');
|
||||
end;
|
||||
|
||||
procedure TfrmMain.stlIDEsClick(Sender: TObject);
|
||||
begin
|
||||
if (stlIDEs.Strings[stlIDEs.ItemIndex] = 'C++') and (not eCPP) then begin
|
||||
stlIDEs.ItemIndex := CurrProjects;
|
||||
MessageBox(Handle, 'C++ IDE is currenty not implemented!', 'Error', MB_ICONERROR);
|
||||
exit;
|
||||
end;
|
||||
|
||||
cboCurrentIDE.Text := stlIDEs.Strings[stlIDEs.ItemIndex];
|
||||
if (not Started) or (frmMain.pnlLoading.Visible) then exit;
|
||||
|
||||
if (lstOutput.Visible) then begin
|
||||
if Plugin_VisibleControlChange(CTRL_OUTPUT, False) then begin
|
||||
splOutput.Hide;
|
||||
lstOutput.Hide;
|
||||
Plugin_VisibleControlChange(CTRL_OUTPUT, False);
|
||||
end;
|
||||
end;
|
||||
|
||||
case stlIDEs.ItemIndex of
|
||||
0: begin
|
||||
mnuTNew.Caption := 'New Plugin';
|
||||
end;
|
||||
1: begin
|
||||
mnuTNew.Caption := 'New Unit';
|
||||
sciCallTips.ApiStrings.Clear;
|
||||
sciAutoComplete.AStrings.Clear;
|
||||
end;
|
||||
2: begin
|
||||
mnuTNew.Caption := 'New Textfile';
|
||||
sciCallTips.ApiStrings.Clear;
|
||||
sciAutoComplete.AStrings.Clear;
|
||||
end;
|
||||
end;
|
||||
ActivateProjects(stlIDEs.ItemIndex, True);
|
||||
|
||||
trvExplorer.Items.Clear;
|
||||
FillCodeExplorer(GetCurrLang.Name);
|
||||
end;
|
||||
|
||||
procedure TfrmMain.tbDocsTabSelected(Sender: TObject; Item: TJvTabBarItem);
|
||||
var Collection: TDocCollection;
|
||||
begin
|
||||
if (not Started) or (pnlLoading.Visible) or (not Assigned(Item)) or (Screen.Cursor <> crDefault) then exit;
|
||||
|
||||
if (lstOutput.Visible) then begin
|
||||
if Plugin_VisibleControlChange(CTRL_OUTPUT, False) then begin
|
||||
splOutput.Hide;
|
||||
lstOutput.Hide;
|
||||
Plugin_VisibleControlChange(CTRL_OUTPUT, False);
|
||||
end;
|
||||
end;
|
||||
|
||||
case stlIDEs.ItemIndex of
|
||||
0: Collection := PawnProjects; // Pawn
|
||||
1: Collection := CPPProjects; // C++
|
||||
else Collection := OtherProjects; // Other
|
||||
end;
|
||||
Collection.Activate(Item.Index, True);
|
||||
end;
|
||||
|
||||
procedure TfrmMain.tbDocsMouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
if Button = mbRight then begin
|
||||
SelectedTab := tbDocs.TabAt(X, Y);
|
||||
if Assigned(SelectedTab) then
|
||||
ppmDocuments.Popup(Mouse.CursorPos.X, Mouse.CursorPos.Y);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmMain.tbDocsTabClosing(Sender: TObject; Item: TJvTabBarItem;
|
||||
var AllowClose: Boolean);
|
||||
var Collection: TDocCollection;
|
||||
begin
|
||||
AllowClose := False;
|
||||
if (Started) and (Screen.Cursor = crDefault) and (not pnlLoading.Visible) then begin
|
||||
Screen.Cursor := crHourGlass;
|
||||
case stlIDEs.ItemIndex of
|
||||
0: Collection := PawnProjects; // Pawn
|
||||
1: Collection := CPPProjects; // C++
|
||||
else Collection := OtherProjects; // Other
|
||||
end;
|
||||
|
||||
if tbDocs.Tabs.IndexOf(Item) <> -1 then begin
|
||||
if CloseDocument(TDocument(Collection.Items[tbDocs.Tabs.IndexOf(Item)]), True, False) then
|
||||
tbDocs.Tabs.Delete(tbDocs.Tabs.IndexOf(Item));
|
||||
end;
|
||||
Screen.Cursor := crDefault;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -64,7 +64,7 @@ object frmSettings: TfrmSettings
|
||||
Top = 0
|
||||
Width = 351
|
||||
Height = 260
|
||||
ActivePage = jspAutocompleteCheck
|
||||
ActivePage = jspHighlighter
|
||||
PropagateEnable = False
|
||||
Align = alClient
|
||||
OnChange = jplSettingsChange
|
||||
|
Loading…
Reference in New Issue
Block a user