mirror of
https://github.com/moparisthebest/Simba
synced 2025-03-03 02:41:54 -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:
parent
215dfea1fd
commit
49779bf2ed
@ -1,7 +1,7 @@
|
|||||||
object Form1: TForm1
|
object Form1: TForm1
|
||||||
Left = 273
|
Left = 443
|
||||||
Height = 557
|
Height = 557
|
||||||
Top = 233
|
Top = 303
|
||||||
Width = 734
|
Width = 734
|
||||||
ActiveControl = ScriptPanel
|
ActiveControl = ScriptPanel
|
||||||
Caption = 'THA FUKING MUFASA'
|
Caption = 'THA FUKING MUFASA'
|
||||||
@ -233,10 +233,10 @@ object Form1: TForm1
|
|||||||
OnDockDrop = ScriptPanelDockDrop
|
OnDockDrop = ScriptPanelDockDrop
|
||||||
OnDockOver = ScriptPanelDockOver
|
OnDockOver = ScriptPanelDockOver
|
||||||
object PageControl1: TPageControl
|
object PageControl1: TPageControl
|
||||||
Left = 150
|
Left = 155
|
||||||
Height = 296
|
Height = 296
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 584
|
Width = 579
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Images = Mufasa_Image_List
|
Images = Mufasa_Image_List
|
||||||
PopupMenu = TabPopup
|
PopupMenu = TabPopup
|
||||||
@ -382,7 +382,7 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object Splitter1: TSplitter
|
object Splitter1: TSplitter
|
||||||
Left = 145
|
Left = 150
|
||||||
Height = 296
|
Height = 296
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 5
|
Width = 5
|
||||||
@ -391,14 +391,13 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
inline frmFunctionList: TFunctionListFrame
|
inline frmFunctionList: TFunctionListFrame
|
||||||
Height = 296
|
Height = 296
|
||||||
Width = 145
|
Width = 150
|
||||||
ClientHeight = 296
|
ClientHeight = 296
|
||||||
ClientWidth = 145
|
ClientWidth = 150
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
Visible = False
|
|
||||||
inherited FunctionList: TTreeView
|
inherited FunctionList: TTreeView
|
||||||
Height = 275
|
Height = 275
|
||||||
Width = 145
|
Width = 150
|
||||||
OnChange = FunctionListChange
|
OnChange = FunctionListChange
|
||||||
OnDeletion = nil
|
OnDeletion = nil
|
||||||
OnEnter = FunctionListEnter
|
OnEnter = FunctionListEnter
|
||||||
@ -406,7 +405,7 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
inherited editSearchList: TEdit
|
inherited editSearchList: TEdit
|
||||||
Top = 275
|
Top = 275
|
||||||
Width = 145
|
Width = 150
|
||||||
OnExit = editSearchListExit
|
OnExit = editSearchListExit
|
||||||
OnKeyPress = editSearchListKeyPress
|
OnKeyPress = editSearchListKeyPress
|
||||||
end
|
end
|
||||||
@ -1207,13 +1206,20 @@ object Form1: TForm1
|
|||||||
object MenuExtra: TMenuItem
|
object MenuExtra: TMenuItem
|
||||||
Caption = 'Extra'
|
Caption = 'Extra'
|
||||||
object MenuitemFillFunctionList: TMenuItem
|
object MenuitemFillFunctionList: TMenuItem
|
||||||
Caption = 'Fill Function List'
|
Caption = '&Fill Function List'
|
||||||
OnClick = MenuitemFillFunctionListClick
|
OnClick = MenuitemFillFunctionListClick
|
||||||
end
|
end
|
||||||
object UpdateMenuButton: TMenuItem
|
object UpdateMenuButton: TMenuItem
|
||||||
Caption = 'Update'
|
Caption = '&Update'
|
||||||
OnClick = UpdateMenuButtonClick
|
OnClick = UpdateMenuButtonClick
|
||||||
end
|
end
|
||||||
|
object MenuItemDivider9: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object MenuItemExportHTML: TMenuItem
|
||||||
|
Caption = '&Export script as HTML'
|
||||||
|
OnClick = MenuItemExportHTMLClick
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object MenuHelp: TMenuItem
|
object MenuHelp: TMenuItem
|
||||||
Caption = '&Help'
|
Caption = '&Help'
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -36,6 +36,7 @@ uses
|
|||||||
mmlpsthread,synedittypes,
|
mmlpsthread,synedittypes,
|
||||||
window, // for the comp picker and selector
|
window, // for the comp picker and selector
|
||||||
colourpicker, framescript, windowselector, lcltype, ActnList, StdActns,
|
colourpicker, framescript, windowselector, lcltype, ActnList, StdActns,
|
||||||
|
SynExportHTML,
|
||||||
SynEditKeyCmds, SynEditHighlighter, SynEditMarkupSpecialLine,SynEditMarkupHighAll,
|
SynEditKeyCmds, SynEditHighlighter, SynEditMarkupSpecialLine,SynEditMarkupHighAll,
|
||||||
SynEditMiscClasses, LMessages, Buttons, PairSplitter,about, framefunctionlist,
|
SynEditMiscClasses, LMessages, Buttons, PairSplitter,about, framefunctionlist,
|
||||||
ocr, updateform;
|
ocr, updateform;
|
||||||
@ -95,6 +96,8 @@ type
|
|||||||
MenuEdit: TMenuItem;
|
MenuEdit: TMenuItem;
|
||||||
MenuHelp: TMenuItem;
|
MenuHelp: TMenuItem;
|
||||||
MenuExtra: TMenuItem;
|
MenuExtra: TMenuItem;
|
||||||
|
MenuItemExportHTML: TMenuItem;
|
||||||
|
MenuItemDivider9: TMenuItem;
|
||||||
UpdateTimer: TTimer;
|
UpdateTimer: TTimer;
|
||||||
ToolButton3: TToolButton;
|
ToolButton3: TToolButton;
|
||||||
UpdateButton: TToolButton;
|
UpdateButton: TToolButton;
|
||||||
@ -239,6 +242,7 @@ type
|
|||||||
procedure MenuItemAboutClick(Sender: TObject);
|
procedure MenuItemAboutClick(Sender: TObject);
|
||||||
procedure MenuItemCloseTabsClick(Sender: TObject);
|
procedure MenuItemCloseTabsClick(Sender: TObject);
|
||||||
procedure MenuItemDebugImageClick(Sender: TObject);
|
procedure MenuItemDebugImageClick(Sender: TObject);
|
||||||
|
procedure MenuItemExportHTMLClick(Sender: TObject);
|
||||||
procedure MenuitemFillFunctionListClick(Sender: TObject);
|
procedure MenuitemFillFunctionListClick(Sender: TObject);
|
||||||
procedure MenuItemHideClick(Sender: TObject);
|
procedure MenuItemHideClick(Sender: TObject);
|
||||||
procedure MenuItemShowClick(Sender: TObject);
|
procedure MenuItemShowClick(Sender: TObject);
|
||||||
@ -1258,6 +1262,33 @@ begin
|
|||||||
DebugImgForm.Hide;
|
DebugImgForm.Hide;
|
||||||
end;
|
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;
|
function GetMethodName( Decl : string; PlusNextChar : boolean) : string;
|
||||||
var
|
var
|
||||||
I : integer;
|
I : integer;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user