1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-10 19:35:10 -05:00

Added export to HTML

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@366 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
Raymond 2010-01-03 14:50:26 +00:00
parent 215dfea1fd
commit 49779bf2ed
3 changed files with 1943 additions and 1904 deletions

View File

@ -1,7 +1,7 @@
object Form1: TForm1
Left = 273
Left = 443
Height = 557
Top = 233
Top = 303
Width = 734
ActiveControl = ScriptPanel
Caption = 'THA FUKING MUFASA'
@ -233,10 +233,10 @@ object Form1: TForm1
OnDockDrop = ScriptPanelDockDrop
OnDockOver = ScriptPanelDockOver
object PageControl1: TPageControl
Left = 150
Left = 155
Height = 296
Top = 0
Width = 584
Width = 579
Align = alClient
Images = Mufasa_Image_List
PopupMenu = TabPopup
@ -382,7 +382,7 @@ object Form1: TForm1
end
end
object Splitter1: TSplitter
Left = 145
Left = 150
Height = 296
Top = 0
Width = 5
@ -391,14 +391,13 @@ object Form1: TForm1
end
inline frmFunctionList: TFunctionListFrame
Height = 296
Width = 145
Width = 150
ClientHeight = 296
ClientWidth = 145
ClientWidth = 150
TabOrder = 3
Visible = False
inherited FunctionList: TTreeView
Height = 275
Width = 145
Width = 150
OnChange = FunctionListChange
OnDeletion = nil
OnEnter = FunctionListEnter
@ -406,7 +405,7 @@ object Form1: TForm1
end
inherited editSearchList: TEdit
Top = 275
Width = 145
Width = 150
OnExit = editSearchListExit
OnKeyPress = editSearchListKeyPress
end
@ -1207,13 +1206,20 @@ object Form1: TForm1
object MenuExtra: TMenuItem
Caption = 'Extra'
object MenuitemFillFunctionList: TMenuItem
Caption = 'Fill Function List'
Caption = '&Fill Function List'
OnClick = MenuitemFillFunctionListClick
end
object UpdateMenuButton: TMenuItem
Caption = 'Update'
Caption = '&Update'
OnClick = UpdateMenuButtonClick
end
object MenuItemDivider9: TMenuItem
Caption = '-'
end
object MenuItemExportHTML: TMenuItem
Caption = '&Export script as HTML'
OnClick = MenuItemExportHTMLClick
end
end
object MenuHelp: TMenuItem
Caption = '&Help'

File diff suppressed because it is too large Load Diff

View File

@ -36,6 +36,7 @@ uses
mmlpsthread,synedittypes,
window, // for the comp picker and selector
colourpicker, framescript, windowselector, lcltype, ActnList, StdActns,
SynExportHTML,
SynEditKeyCmds, SynEditHighlighter, SynEditMarkupSpecialLine,SynEditMarkupHighAll,
SynEditMiscClasses, LMessages, Buttons, PairSplitter,about, framefunctionlist,
ocr, updateform;
@ -95,6 +96,8 @@ type
MenuEdit: TMenuItem;
MenuHelp: TMenuItem;
MenuExtra: TMenuItem;
MenuItemExportHTML: TMenuItem;
MenuItemDivider9: TMenuItem;
UpdateTimer: TTimer;
ToolButton3: TToolButton;
UpdateButton: TToolButton;
@ -239,6 +242,7 @@ type
procedure MenuItemAboutClick(Sender: TObject);
procedure MenuItemCloseTabsClick(Sender: TObject);
procedure MenuItemDebugImageClick(Sender: TObject);
procedure MenuItemExportHTMLClick(Sender: TObject);
procedure MenuitemFillFunctionListClick(Sender: TObject);
procedure MenuItemHideClick(Sender: TObject);
procedure MenuItemShowClick(Sender: TObject);
@ -1258,6 +1262,33 @@ begin
DebugImgForm.Hide;
end;
procedure TForm1.MenuItemExportHTMLClick(Sender: TObject);
var
SynExporterHTML : TSynExporterHTML;
begin;
SynExporterHTML := TSynExporterHTML.Create(nil);
SynExporterHTML.Highlighter := CurrScript.SynFreePascalSyn1;
SynExporterHTML.ExportAsText:= True;
with TSaveDialog.Create(nil) do
try
Filter:= 'HTML Files (*.html;*.htm)|*.html;*.htm|All files(*.*)|*.*';
Options:= [ofOverwritePrompt,ofEnableSizing];
DefaultExt:= 'html';
if Execute then
begin
if CurrScript.ScriptName <> '' then
SynExporterHTML.Title:= 'Simba - ' + CurrScript.ScriptName
else
SynExporterHTML.Title:= 'Cogat - Untitled';
SynExporterHTML.ExportAll(CurrScript.SynEdit.Lines);
SynExporterHTML.SaveToFile(FileName);
end;
finally
free;
SynExporterHTML.Free;
end;
end;
function GetMethodName( Decl : string; PlusNextChar : boolean) : string;
var
I : integer;