Browse Source

Initial Release on http://luaforge.net

Jean-Francois Goulet 20 years ago
parent
commit
2f5d1465de

BIN
LuaEdit/Bin/HdrBld.dll


BIN
LuaEdit/Graphics/DotNet_Style/HeaderBuilder/AddElement.bmp


BIN
LuaEdit/Graphics/DotNet_Style/HeaderBuilder/CallSample.bmp


BIN
LuaEdit/Graphics/DotNet_Style/HeaderBuilder/Clear.bmp


BIN
LuaEdit/Graphics/DotNet_Style/HeaderBuilder/Copyright.bmp


BIN
LuaEdit/Graphics/DotNet_Style/HeaderBuilder/EditElement.bmp


BIN
LuaEdit/Graphics/DotNet_Style/HeaderBuilder/Preview.bmp


BIN
LuaEdit/Graphics/DotNet_Style/HeaderBuilder/RemoveElement.bmp


BIN
LuaEdit/Graphics/DotNet_Style/HeaderBuilder/Settings.bmp


+ 75 - 0
LuaEdit/HeaderBuilder/EditParam.dfm

@@ -0,0 +1,75 @@
+object frmEditParam: TfrmEditParam
+  Left = 391
+  Top = 315
+  BorderStyle = bsToolWindow
+  Caption = 'Edit Parameter'
+  ClientHeight = 128
+  ClientWidth = 272
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  FormStyle = fsStayOnTop
+  OldCreateOrder = False
+  Position = poScreenCenter
+  DesignSize = (
+    272
+    128)
+  PixelsPerInch = 96
+  TextHeight = 13
+  object Label1: TLabel
+    Left = 16
+    Top = 8
+    Width = 31
+    Height = 13
+    Caption = 'Name:'
+  end
+  object Label2: TLabel
+    Left = 16
+    Top = 52
+    Width = 47
+    Height = 13
+    Caption = 'Comment:'
+  end
+  object btnCancel: TButton
+    Left = 190
+    Top = 96
+    Width = 75
+    Height = 25
+    Anchors = [akRight, akBottom]
+    Cancel = True
+    Caption = '&Cancel'
+    ModalResult = 2
+    TabOrder = 0
+  end
+  object btnOK: TButton
+    Left = 110
+    Top = 96
+    Width = 75
+    Height = 25
+    Anchors = [akRight, akBottom]
+    Caption = '&OK'
+    Default = True
+    ModalResult = 1
+    TabOrder = 1
+    OnClick = btnOKClick
+  end
+  object txtName: TEdit
+    Left = 16
+    Top = 22
+    Width = 241
+    Height = 21
+    Anchors = [akLeft, akTop, akRight]
+    TabOrder = 2
+  end
+  object txtComment: TEdit
+    Left = 16
+    Top = 66
+    Width = 241
+    Height = 21
+    Anchors = [akLeft, akTop, akRight]
+    TabOrder = 3
+  end
+end

+ 44 - 0
LuaEdit/HeaderBuilder/EditParam.pas

@@ -0,0 +1,44 @@
+unit EditParam;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, StdCtrls;
+
+type
+  TfrmEditParam = class(TForm)
+    btnCancel: TButton;
+    btnOK: TButton;
+    Label1: TLabel;
+    Label2: TLabel;
+    txtName: TEdit;
+    txtComment: TEdit;
+    procedure btnOKClick(Sender: TObject);
+  private
+    { Private declarations }
+  public
+    { Public declarations }
+  end;
+
+var
+  frmEditParam: TfrmEditParam;
+
+implementation
+
+{$R *.dfm}
+
+procedure TfrmEditParam.btnOKClick(Sender: TObject);
+begin
+  ModalResult := mrNone;
+  
+  if txtName.Text = '' then
+  begin
+    Windows.MessageBox(Self.Handle, 'You must enter a name for the parameter.', 'Header Builder', MB_OK+MB_ICONERROR);
+    txtName.SetFocus;
+  end
+  else
+    ModalResult := mrOk;
+end;
+
+end.

+ 684 - 0
LuaEdit/HeaderBuilder/FctHdrBld.dfm

@@ -0,0 +1,684 @@
+object frmFctHdrBld: TfrmFctHdrBld
+  Left = 441
+  Top = 265
+  BorderStyle = bsToolWindow
+  Caption = 'Function Header Builder'
+  ClientHeight = 418
+  ClientWidth = 376
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  FormStyle = fsStayOnTop
+  OldCreateOrder = False
+  Position = poScreenCenter
+  OnShow = FormShow
+  PixelsPerInch = 96
+  TextHeight = 13
+  object Panel1: TPanel
+    Left = 0
+    Top = 388
+    Width = 376
+    Height = 30
+    Align = alBottom
+    BevelOuter = bvNone
+    TabOrder = 0
+    object btnCancel: TButton
+      Left = 296
+      Top = 0
+      Width = 75
+      Height = 25
+      Cancel = True
+      Caption = '&Cancel'
+      ModalResult = 2
+      TabOrder = 0
+    end
+    object btnOK: TButton
+      Left = 216
+      Top = 0
+      Width = 75
+      Height = 25
+      Caption = '&OK'
+      Default = True
+      ModalResult = 1
+      TabOrder = 1
+      OnClick = btnOKClick
+    end
+  end
+  object Panel2: TPanel
+    Left = 0
+    Top = 32
+    Width = 376
+    Height = 356
+    Align = alClient
+    BevelOuter = bvNone
+    TabOrder = 1
+    object Label2: TLabel
+      Left = 16
+      Top = 144
+      Width = 56
+      Height = 13
+      Caption = 'Parameters:'
+    end
+    object Label1: TLabel
+      Left = 16
+      Top = 8
+      Width = 75
+      Height = 13
+      Caption = 'Function Name:'
+    end
+    object Label3: TLabel
+      Left = 16
+      Top = 56
+      Width = 47
+      Height = 13
+      Caption = 'Comment:'
+    end
+    object lblCallSample: TLabel
+      Left = 16
+      Top = 304
+      Width = 58
+      Height = 13
+      Caption = 'Call Sample:'
+    end
+    object Label5: TLabel
+      Left = 16
+      Top = 264
+      Width = 65
+      Height = 13
+      Caption = 'Return Value:'
+    end
+    object txtFunctionName: TEdit
+      Left = 16
+      Top = 21
+      Width = 345
+      Height = 21
+      TabOrder = 0
+    end
+    object memoComment: TMemo
+      Left = 16
+      Top = 69
+      Width = 345
+      Height = 65
+      ScrollBars = ssVertical
+      TabOrder = 1
+    end
+    object txtCallSample: TEdit
+      Left = 16
+      Top = 318
+      Width = 345
+      Height = 21
+      TabOrder = 2
+    end
+    object lvwParams: TListView
+      Left = 16
+      Top = 157
+      Width = 345
+      Height = 100
+      Columns = <
+        item
+          Caption = 'Name'
+          Width = 125
+        end
+        item
+          AutoSize = True
+          Caption = 'Comment'
+        end>
+      ReadOnly = True
+      RowSelect = True
+      TabOrder = 3
+      ViewStyle = vsReport
+    end
+    object txtReturn: TEdit
+      Left = 16
+      Top = 277
+      Width = 345
+      Height = 21
+      TabOrder = 4
+    end
+  end
+  object tlbMain: TToolBar
+    Left = 0
+    Top = 0
+    Width = 376
+    AutoSize = True
+    BorderWidth = 2
+    Flat = True
+    Images = imlToolbar
+    TabOrder = 2
+    object tbtnPreview: TToolButton
+      Left = 0
+      Top = 0
+      Hint = 'Show Preview Window...'
+      ImageIndex = 0
+      ParentShowHint = False
+      ShowHint = True
+    end
+    object ToolButton2: TToolButton
+      Left = 23
+      Top = 0
+      Hint = 'Clear Form'
+      ImageIndex = 1
+      ParentShowHint = False
+      ShowHint = True
+      OnClick = ToolButton2Click
+    end
+    object ToolButton1: TToolButton
+      Left = 46
+      Top = 0
+      Width = 8
+      Caption = 'ToolButton1'
+      ImageIndex = 2
+      Style = tbsSeparator
+    end
+    object tbtnAddParam: TToolButton
+      Left = 54
+      Top = 0
+      Hint = 'Add Parameter Element'
+      Caption = 'tbtnAddParam'
+      ImageIndex = 3
+      ParentShowHint = False
+      ShowHint = True
+      OnClick = tbtnAddParamClick
+    end
+    object tbtnRemoveParam: TToolButton
+      Left = 77
+      Top = 0
+      Hint = 'Remove Selected Parameter Element'
+      ImageIndex = 4
+      OnClick = tbtnRemoveParamClick
+    end
+    object tbtnEdit: TToolButton
+      Left = 100
+      Top = 0
+      Hint = 'Edit Selected Parameter...'
+      ImageIndex = 5
+      ParentShowHint = False
+      ShowHint = True
+      OnClick = tbtnEditClick
+    end
+    object ToolButton9: TToolButton
+      Left = 123
+      Top = 0
+      Width = 8
+      Caption = 'ToolButton9'
+      ImageIndex = 5
+      Style = tbsSeparator
+    end
+    object tbtnCopyright: TToolButton
+      Left = 131
+      Top = 0
+      Hint = 'Show/Hide Copyright Tag'
+      ImageIndex = 6
+      ParentShowHint = False
+      ShowHint = True
+      Style = tbsCheck
+    end
+    object tbtnCallSample: TToolButton
+      Left = 154
+      Top = 0
+      Hint = 'Show/Hide Call Sample'
+      ImageIndex = 7
+      ParentShowHint = False
+      ShowHint = True
+      Style = tbsCheck
+      OnClick = tbtnCallSampleClick
+    end
+    object ToolButton4: TToolButton
+      Left = 177
+      Top = 0
+      Width = 8
+      Caption = 'ToolButton4'
+      ImageIndex = 3
+      Style = tbsSeparator
+    end
+    object tbtnSettings: TToolButton
+      Left = 185
+      Top = 0
+      Hint = 'Header Builder Settings...'
+      ImageIndex = 2
+      ParentShowHint = False
+      ShowHint = True
+      OnClick = tbtnSettingsClick
+    end
+  end
+  object imlToolbar: TImageList
+    Left = 272
+    Top = 5
+    Bitmap = {
+      494C010108000900040010001000FFFFFFFFFF00FFFFFFFFFFFFFFFF424D3600
+      0000000000003600000028000000400000003000000001002000000000000030
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000848484008484
+      8400848484008484840084848400848484008484840084848400848484008484
+      8400848484008484840084848400848484000000000000000000848484000000
+      0000000000000000000084848400848484008484840084848400848484008484
+      8400848484008484840084848400848484000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000848484000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000848484000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000
+      0000FFFFFF0000FFFF0000000000848484000000000000000000FFFFFF000000
+      00000000000000000000FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000
+      0000FFFFFF0000FFFF0000000000848484000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000848484000000000000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000000000C6C6
+      C60000000000FFFFFF000000000084848400000000000000000000FFFF000000
+      0000000000000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000000000C6C6
+      C60000000000FFFFFF0000000000848484000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000840000000000FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000000000FF
+      FF00C6C6C6000000000000000000848484000000000000000000FFFFFF000000
+      00000000000000000000FFFFFF0000FFFF00FFFFFF0000FFFF000000000000FF
+      FF00C6C6C6000000000000000000848484000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000084000000840000FFFF00FFFF
+      FF0000FFFF00FFFFFF00848484000000840000FFFF00FFFFFF00000000000000
+      000000000000000000000000000084848400000000000000000000FFFF000000
+      0000000000000000000000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000
+      0000000000000000000000000000848484000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000084848400000084008484840000FF
+      FF00FFFFFF00848484000000840084848400FFFFFF0000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF0000000000848484000000000000000000FFFFFF000000
+      00000000000000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF0000000000848484000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000008400000084008484
+      840000FFFF000000840000008400FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF000000000084848400000000000000000000FFFF000000
+      0000000000000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000000000848484000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000084848400000084000000
+      84000000840000008400FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF0000000000848484000000000000000000FFFFFF000000
+      00000000000000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF0000000000848484000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000084848400000084000000
+      840000008400FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF000000000084848400000000000000000000FFFF000000
+      0000000000000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000000000848484000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000008484840000008400000084000000
+      8400000084008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000840000008400848484000000
+      0000000084000000840084848400000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000840000008400848484000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000008400000084008484840000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000004D4D4D004D4D4D004D4D4D004D4D
+      4D004D4D4D004D4D4D004D4D4D004D4D4D004D4D4D004D4D4D004D4D4D004D4D
+      4D0000000000000000004D4D4D004D4D4D000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000E3E3E30000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000848484008484
+      8400848484008484840084848400848484008484840084848400848484008484
+      8400848484008484840084848400848484004D4D4D00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF004D4D
+      4D00000000004D4D4D004D4D4D004D4D4D0000000000ABABAB006C6C6C009797
+      970000000000000000000000000000000000000000000000000000000000DEDE
+      DE00A3A3A3008C8C8C00E3E3E300000000004D4D4D004D4D4D004D4D4D004D4D
+      4D004D4D4D004D4D4D004D4D4D004D4D4D004D4D4D004D4D4D004D4D4D004D4D
+      4D00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000848484004D4D4D00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF004D4D4D004D4D4D004D4D4D004D4D
+      4D00A6A6A6004D4D4D004D4D4D00000000008D79E9002A01DF003F28A5006363
+      6300C4C4C4000000000000000000000000000000000000000000CFCFCF00604E
+      B0002F08D800A3A3A30000000000000000004D4D4D00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF004D4D
+      4D00000000000000000000000000000000000000000000000000FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000
+      0000FFFFFF0000FFFF0000000000848484004D4D4D00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF004D4D4D00A6A6A600D3D3D300D3D3D300A6A6
+      A6004D4D4D00A6A6A6000000000000000000B8ABF1002A01DF00310BDC00524D
+      69007C7C7C00D7D7D700000000000000000000000000C2C0CE004529C2002A01
+      DF007B69CB000000000000000000000000004D4D4D00FFFFFF004D4D4D004D4D
+      4D00FFFFFF004D4D4D004D4D4D004D4D4D004D4D4D004D4D4D00FFFFFF004D4D
+      4D0000000000000000000000000000000000000000000000000000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000000000C6C6
+      C60000000000FFFFFF0000000000848484004D4D4D00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF004D4D4D00A6A6A600D3D3D300D3D3D300FFFF4D00A6A6
+      A600A6A6A6004D4D4D00000000000000000000000000846DEA002A01DF003D1C
+      D1005D5D5D0090909000DBDBDB0000000000C2C0CE003918CC002F08D800A098
+      C200000000000000000000000000000000004D4D4D00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF004D4D
+      4D00000000000000000000000000000000000000000000000000FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000000000FF
+      FF00C6C6C6000000000000000000848484004D4D4D00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF004D4D4D00D3D3D300D3D3D300D3D3D300D3D3D300A6A6
+      A600D3D3D3004D4D4D0000000000000000000000000000000000775EE9002A01
+      DF005137C100626262008E8E8E00B2AFBD003918CC002F08D800A098C2000000
+      0000000000000000000000000000000000004D4D4D00FFFFFF004D4D4D004D4D
+      4D00FFFFFF004D4D4D004D4D4D004D4D4D004D4D4D004D4D4D00FFFFFF004D4D
+      4D0000000000000000000000000000000000000000000000000000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000
+      0000000000000000000000000000848484004D4D4D00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF004D4D4D00D3D3D300FFFF4D00D3D3D300D3D3D300A6A6
+      A600D3D3D3004D4D4D000000000000000000000000000000000000000000775E
+      E9002A01DF005036C100514E5C003312C7002D07D700A098C200000000000000
+      0000000000000000000000000000000000004D4D4D00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF004D4D
+      4D0000000000000000000000000000000000FFFFFF0000000000FFFFFF008484
+      840000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF0000000000848484004D4D4D00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF004D4D4D00A6A6A600FFFF4D00FFFF4D00D3D3D300A6A6
+      A600A6A6A6004D4D4D0000000000000000000000000000000000000000000000
+      0000775DE7002A01DF002D07D7002C06D60068608A00D4D4D400000000000000
+      0000000000000000000000000000000000004D4D4D00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF004D4D4D00FFFFFF00FFFFFF004D4D
+      4D00000000000000000000000000000000008484840000FFFF0000FFFF008484
+      8400FFFFFF0000FFFF008484840000FFFF00FFFFFF00FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000000000848484004D4D4D00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF004D4D4D00A6A6A600D3D3D300D3D3D300A6A6
+      A6004D4D4D000000000000000000000000000000000000000000000000000000
+      0000C2C0CE003009D9002A01DF00472BC300717171008D8D8D00CFCFCF00F2F2
+      F200000000000000000000000000000000004D4D4D00FFFFFF004D4D4D004D4D
+      4D00FFFFFF00FFFFFF00FFFFFF004D4D4D00D3D3D3004D4D4D00FFFFFF004D4D
+      4D00000000000000000000000000A64D4D000000000084848400FFFFFF008484
+      840000FFFF008484840000FFFF00FFFFFF0000FFFF0000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF0000000000848484004D4D4D00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF004D4D4D004D4D4D004D4D4D004D4D
+      4D0000000000000000000000000000000000000000000000000000000000C2C0
+      CE003918CC002F08D8006E5AC9003610E000583CD4007A77850082828200BEBE
+      BE00ECECEC000000000000000000000000004D4D4D00FFFFFF004D4D4D00D3D3
+      D3004D4D4D00FFFFFF004D4D4D00D3D3D3004D4D4D00D3D3D3004D4D4D004D4D
+      4D004D4D4D0000000000A64D4D00A64D4D00848484008484840084848400FFFF
+      FF0084848400FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000000000848484004D4D4D00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF004D4D
+      4D00000000000000000000000000000000000000000000000000C2C0CE003918
+      CC002A01DF00877DB500E9E9E900D2CAF400431FE1004A28DD00776F99007979
+      7900AEAEAE00EEEEEE0000000000000000004D4D4D00FFFFFF00FFFFFF004D4D
+      4D00D3D3D3004D4D4D00D3D3D3004D4D4D00D3D3D3004D4D4D00D3D3D300D3D3
+      D300D3D3D3004D4D4D00A64D4D00A64D4D00FFFFFF0000FFFF008484840000FF
+      FF00FFFFFF008484840084848400848484008484840000000000000000000000
+      0000000000000000000000000000000000004D4D4D00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF004D4D4D004D4D4D004D4D4D004D4D
+      4D000000000000000000000000000000000000000000B6B4C2003917CB002A01
+      DF007061B400E4E4E4000000000000000000ECE9F7005E3FE500360FDF00796C
+      B20086868600D5D5D50000000000000000004D4D4D004D4D4D004D4D4D004D4D
+      4D004D4D4D00D3D3D3004D4D4D00D3D3D3004D4D4D00D3D3D300D3D3D300D3D3
+      D300D3D3D300D3D3D300A64D4D00A64D4D00000000008484840000FFFF008484
+      840000FFFF008484840000FFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000004D4D4D00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF004D4D4D00D3D3D3004D4D4D000000
+      000000000000000000000000000000000000C1B9E3003917CB002A01DF005945
+      B400DDDDDD000000000000000000000000000000000000000000917CEC002A01
+      DF00CAC5E1000000000000000000000000000000000000000000000000000000
+      0000000000004D4D4D00D3D3D3004D4D4D00D3D3D300D3D3D300D3D3D300D3D3
+      D300D3D3D300D3D3D300A64D4D00A64D4D008484840000FFFF00000000008484
+      8400FFFFFF00000000008484840000FFFF000000000000000000000000000000
+      0000000000000000000000000000000000004D4D4D00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF004D4D4D004D4D4D00000000000000
+      000000000000000000000000000000000000411DDF002A01DF004529C200CFCF
+      CF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000004D4D4D00D3D3D300D3D3D300D3D3D300D3D3D300D3D3
+      D300D3D3D3004D4D4D00A64D4D00A64D4D0000FFFF0000000000000000008484
+      840000FFFF000000000000000000848484000000000000000000000000000000
+      0000000000000000000000000000000000004D4D4D004D4D4D004D4D4D004D4D
+      4D004D4D4D004D4D4D004D4D4D004D4D4D004D4D4D0000000000000000000000
+      0000000000000000000000000000000000003610E0004D2CE100DAD7E5000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000004D4D4D004D4D4D004D4D4D004D4D4D004D4D
+      4D004D4D4D0000000000A64D4D00A64D4D000000000000000000000000008484
+      8400FFFFFF000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000424D3E000000000000003E000000
+      2800000040000000300000000100010000000000800100000000000000000000
+      000000000000000000000000FFFFFF0000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000FFFF80FFFFFFFFFFFFFF80FFF83FE7E7
+      C000C000E7CFCE7380008000DFF7CFF380008000B83BCE7300008000B39B9E79
+      0000800067FD9E790000800067FD9F390000800067FD9F998000800067FD9F99
+      8000800067FD999980008000B39BC99300018001B83BCC3311FFE3FFDFF7CFF3
+      F8FF80FFE7CFE7E7FC7F80FFF83FFFFFFFFFFFFFFFFFFFFF000CFFFBFFFFC000
+      00088FE1000F8000000107C3000F800000030387000F80000003810F000F8000
+      0003C01F000F80000003E03F000F00000003F03F000F00000007F00F000E8000
+      000FE00700040000000FC00300000001000F8303000081FF001F07C7F80024FF
+      003F0FFFFC0066FF007F1FFFFE04E7FF}
+  end
+  object xmpMenuPainter: TXPMenu
+    DimLevel = 30
+    GrayLevel = 10
+    Font.Charset = DEFAULT_CHARSET
+    Font.Color = clMenuText
+    Font.Height = -11
+    Font.Name = 'Tahoma'
+    Font.Style = []
+    Color = clWhite
+    DrawMenuBar = True
+    IconBackColor = clBtnFace
+    MenuBarColor = clBtnFace
+    SelectColor = 15717318
+    SelectBorderColor = 13003057
+    SelectFontColor = clMenuText
+    DisabledColor = clGrayText
+    SeparatorColor = clBtnFace
+    CheckedColor = clHighlight
+    IconWidth = 24
+    DrawSelect = True
+    UseSystemColors = False
+    UseDimColor = False
+    OverrideOwnerDraw = False
+    Gradient = False
+    FlatMenu = False
+    AutoDetect = False
+    XPContainers = [xccToolbar, xccCoolbar, xccControlbar, xccScrollBox, xccPageScroller]
+    Active = True
+    Left = 304
+    Top = 5
+  end
+end

+ 285 - 0
LuaEdit/HeaderBuilder/FctHdrBld.pas

@@ -0,0 +1,285 @@
+unit FctHdrBld;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, StdCtrls, ExtCtrls, XPMenu, ImgList, ComCtrls, ToolWin, Grids,
+  ValEdit, XPMan, Registry;
+
+type
+  TfrmFctHdrBld = class(TForm)
+    Panel1: TPanel;
+    btnCancel: TButton;
+    btnOK: TButton;
+    Panel2: TPanel;
+    Label2: TLabel;
+    txtFunctionName: TEdit;
+    Label1: TLabel;
+    tlbMain: TToolBar;
+    tbtnPreview: TToolButton;
+    ToolButton2: TToolButton;
+    imlToolbar: TImageList;
+    Label3: TLabel;
+    memoComment: TMemo;
+    lblCallSample: TLabel;
+    txtCallSample: TEdit;
+    ToolButton1: TToolButton;
+    tbtnSettings: TToolButton;
+    ToolButton4: TToolButton;
+    tbtnCopyright: TToolButton;
+    tbtnCallSample: TToolButton;
+    tbtnEdit: TToolButton;
+    xmpMenuPainter: TXPMenu;
+    tbtnAddParam: TToolButton;
+    tbtnRemoveParam: TToolButton;
+    ToolButton9: TToolButton;
+    lvwParams: TListView;
+    Label5: TLabel;
+    txtReturn: TEdit;
+    procedure ToolButton2Click(Sender: TObject);
+    procedure tbtnAddParamClick(Sender: TObject);
+    procedure tbtnRemoveParamClick(Sender: TObject);
+    procedure tbtnEditClick(Sender: TObject);
+    procedure FormShow(Sender: TObject);
+    procedure btnOKClick(Sender: TObject);
+    procedure tbtnCallSampleClick(Sender: TObject);
+    procedure tbtnSettingsClick(Sender: TObject);
+  private
+    { Private declarations }
+  public
+    { Public declarations }
+    procedure ParseLine(sLine: String);
+    procedure ClearForm(bPrompt: Boolean = False);
+    procedure CheckButtons;
+    function GetHeader: String;
+  end;
+
+var
+  frmFctHdrBld: TfrmFctHdrBld;
+
+implementation
+
+uses
+  EditParam, Settings;
+
+{$R *.dfm}
+
+procedure TfrmFctHdrBld.ParseLine(sLine: String);
+var
+  xPos: Integer;
+  sTemp: String;
+  EqTokenPos, ParenTokenPos: Integer;
+  pItem: TListItem;
+begin
+  // Clear the form before auto-filling infos
+  ClearForm;
+
+  if sLine <> '' then
+  begin
+    if Pos('function', sLine) > 0 then
+    begin
+      // look for the '=' token if any
+      EqTokenPos := Pos('=', sLine);
+      sTemp := '';
+
+      // if we got an '=' token then we look for the very first word on left
+      //of '=' token wich is the function name
+      if EqTokenPos > 0 then
+      begin
+        xPos := EqTokenPos - 1;
+
+        // get end of very first word on left
+        while sLine[xPos] = ' ' do
+          Dec(xPos);
+
+        // start collecting chars
+        while sLine[xPos] <> ' ' do
+        begin
+          sTemp := sLine[xPos] + sTemp;
+          Dec(xPos);
+        end;
+      end
+      else   // if we don't have an '=' token then this means the function name
+      begin  // is the very word on the right of the 'function' token
+        xPos := Pos('function', sLine) + Length('function');
+
+        // get end of very first word on right
+        while sLine[xPos] = ' ' do
+          Inc(xPos);
+
+        // start collecting chars
+        while (not (sLine[xPos] in [' ', '('])) do
+        begin
+          sTemp := sTemp + sLine[xPos];
+          Inc(xPos);
+        end;
+      end;
+
+      // Once here we should have the function name
+      txtFunctionName.Text := sTemp;
+      sTemp := '';
+
+      // now it's time to get the parameters list
+      ParenTokenPos := Pos('(', sLine);
+
+      // if there is any parameters, we get them
+      if ParenTokenPos > 0 then
+      begin
+        xPos := ParenTokenPos + 1;
+        sTemp := '';
+
+        // get parameters until we get closing paren
+        while sLine[xPos] <> ')' do
+        begin
+          while (not (sLine[xPos] in [')', ','])) do
+          begin
+            sTemp := sTemp + sLine[xPos];
+            Inc(xPos);
+          end;
+
+          if sLine[xPos] = ',' then
+            Inc(xPos);
+
+          pItem := lvwParams.Items.Add;
+          pItem.Caption := Trim(sTemp);
+          pItem.SubItems.Add('');
+          sTemp := '';
+        end;
+      end;
+    end;
+  end;
+end;
+
+procedure TfrmFctHdrBld.ClearForm(bPrompt: Boolean = False);
+var
+  bCanClear: Boolean;
+begin
+  bCanClear := True;
+  
+  if bPrompt then
+    bCanClear := (Windows.MessageBox(Self.Handle, 'Are you sure you want to clear the form?', 'Header Builder', MB_YESNO+MB_ICONQUESTION) = IDYES);
+
+  if bCanClear then
+  begin
+    txtFunctionName.Text := '';
+    txtCallSample.Text := '';
+    txtCallSample.Text := '';
+    memoComment.Lines.Clear;
+    lvwParams.Items.Clear;
+  end;
+end;
+
+function TfrmFctHdrBld.GetHeader: String;
+var
+  pReg: TRegistry;
+  sTemplate, sToday, sInitialRealese: String;
+  sCopyright, sDevelopperName: String;
+begin
+  pReg := TRegistry.Create;
+  sToday := DateTimeToStr(Now);
+
+  if pReg.OpenKey('\Software\LuaEdit\HdrBld', False) then
+  begin
+    sDevelopperName := pReg.ReadString('DevelopperName');
+    sInitialRealese := pReg.ReadString('InitialRelease');
+    sCopyright := pReg.ReadString('Copyright');
+
+    if pReg.OpenKey('\Software\LuaEdit\HdrBld\FctHdr', False) then
+    begin
+      sTemplate := pReg.ReadString('Template');
+
+      if not FileExists(sTemplate) then
+      begin
+        Windows.MessageBox(Self.Handle, Pchar('The template ' + sTemplate + ' is innexistant! No header was generated.'), 'Header Builder', MB_OK+MB_ICONERROR);
+      end
+      else
+      begin
+
+      end;
+    end;
+  end;
+
+  pReg.Free;
+end;
+
+procedure TfrmFctHdrBld.ToolButton2Click(Sender: TObject);
+begin
+  ClearForm(True);
+end;
+
+procedure TfrmFctHdrBld.tbtnAddParamClick(Sender: TObject);
+var
+  pItem: TListItem;
+begin
+  pItem := lvwParams.Items.Add;
+  pItem.Caption := '*New Parameter*';
+  pItem.SubItems.Add('');
+  CheckButtons;
+end;
+
+procedure TfrmFctHdrBld.tbtnRemoveParamClick(Sender: TObject);
+begin
+  if Assigned(lvwParams.Selected) then
+  begin
+    lvwParams.Items.Delete(lvwParams.Selected.Index);
+    CheckButtons;
+  end;
+end;
+
+procedure TfrmFctHdrBld.tbtnEditClick(Sender: TObject);
+begin
+  if Assigned(lvwParams.Selected) then
+  begin
+    frmEditParam := TfrmEditParam.Create(nil);
+    frmEditParam.txtName.Text := lvwParams.Selected.Caption;
+    frmEditParam.txtComment.Text := lvwParams.Selected.SubItems[0];
+
+    if frmEditParam.ShowModal = mrOk then
+    begin
+      lvwParams.Selected.Caption := frmEditParam.txtName.Text;
+      lvwParams.Selected.SubItems[0] := frmEditParam.txtComment.Text;
+    end;
+
+    FreeAndNil(frmEditParam);
+  end;
+end;
+
+procedure TfrmFctHdrbld.CheckButtons;
+begin
+  tbtnRemoveParam.Enabled := not (lvwParams.Items.Count = 0);
+  tbtnEdit.Enabled := not (lvwParams.Items.Count = 0);
+end;
+
+procedure TfrmFctHdrBld.FormShow(Sender: TObject);
+begin
+  CheckButtons;
+end;
+
+procedure TfrmFctHdrBld.btnOKClick(Sender: TObject);
+begin
+  ModalResult := mrNone;
+
+  if txtFunctionName.Text = '' then
+  begin
+    Windows.MessageBox(Self.Handle, 'You must enter a function name for the header.', 'Header Builder', MB_OK+MB_ICONERROR);
+    txtFunctionName.SetFocus;
+  end
+  else
+    ModalResult := mrOk;
+end;
+
+procedure TfrmFctHdrBld.tbtnCallSampleClick(Sender: TObject);
+begin
+  lblCallSample.Enabled := tbtnCallSample.Down;
+  txtCallSample.Enabled := tbtnCallSample.Down; 
+end;
+
+procedure TfrmFctHdrBld.tbtnSettingsClick(Sender: TObject);
+begin
+  frmSettings := TfrmSettings.Create(nil);
+  frmSettings.ShowModal;
+  FreeAndNil(frmSettings);
+end;
+
+end.

+ 44 - 0
LuaEdit/HeaderBuilder/HdrBld.cfg

@@ -0,0 +1,44 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O-
+-$P+
+-$Q+
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-vn
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"..\bin"
+-LE"c:\program files\borland\delphi7\Projects\Bpl"
+-LN"c:\program files\borland\delphi7\Projects\Bpl"
+-U"c:\program files\borland\delphi7\Lib\Debug;C:\Prog\Delphi\Component\JEDI\jcl\lib\D7\debug"
+-O"c:\program files\borland\delphi7\Lib\Debug;C:\Prog\Delphi\Component\JEDI\jcl\lib\D7\debug"
+-I"c:\program files\borland\delphi7\Lib\Debug;C:\Prog\Delphi\Component\JEDI\jcl\lib\D7\debug"
+-R"c:\program files\borland\delphi7\Lib\Debug;C:\Prog\Delphi\Component\JEDI\jcl\lib\D7\debug"
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST

+ 145 - 0
LuaEdit/HeaderBuilder/HdrBld.dof

@@ -0,0 +1,145 @@
+[FileVersion]
+Version=7.0
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=0
+P=1
+Q=1
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=1
+SymbolLibrary=1
+SymbolPlatform=1
+UnitLibrary=1
+UnitPlatform=1
+UnitDeprecated=1
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=1
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=
+[Directories]
+OutputDir=..\bin
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=$(DELPHI)\Lib\Debug;C:\Prog\Delphi\Component\JEDI\jcl\lib\D7\debug
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP;DJcl;JvStdCtrlsD7R;JvAppFrmD7R;JvCoreD7R;JvBandsD7R;JvDockingD7R;JvDotNetCtrlsD7R;JvEDID7R;qrpt;JvGlobusD7R;JvHMID7R;JvInspectorD7R;JvInterpreterD7R;JvJansD7R;JvManagedThreadsD7R;JvCmpD7R;JvMMD7R;JvNetD7R;JvPageCompsD7R;JvPluginD7R;JvPrintPreviewD7R;JvCtrlsD7R;JvSystemD7R;JvTimeFrameworkD7R;JvUIBD7R;JvValidatorsD7R;JvWizardD7R;JvXPCtrlsD7R;JvCryptD7R;JvCustomD7R;JvBDED7R;JvDBD7R;JvDlgsD7R
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+[Parameters]
+RunParams=C:\Prog\Delphi\LuaEdit\Bin\PackLCD.lua
+HostApplication=C:\Prog\Delphi\LuaEdit\Bin\LuaEdit.exe
+Launcher=
+UseLauncher=0
+DebugCWD=
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+[Version Info]
+IncludeVerInfo=1
+AutoIncBuild=1
+MajorVer=1
+MinorVer=0
+Release=0
+Build=14
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=3084
+CodePage=1252
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.14
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+[HistoryLists\hlUnitAliases]
+Count=1
+Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+[HistoryLists\hlSearchPath]
+Count=1
+Item0=$(DELPHI)\Lib\Debug;C:\Prog\Delphi\Component\JEDI\jcl\lib\D7\debug
+[HistoryLists\hlOutputDirectorry]
+Count=1
+Item0=..\bin

+ 27 - 0
LuaEdit/HeaderBuilder/HdrBld.dpr

@@ -0,0 +1,27 @@
+library HdrBld;
+
+{ Important note about DLL memory management: ShareMem must be the
+  first unit in your library's USES clause AND your project's (select
+  Project-View Source) USES clause if your DLL exports any procedures or
+  functions that pass strings as parameters or function results. This
+  applies to all strings passed to and from your DLL--even those that
+  are nested in records and classes. ShareMem is the interface unit to
+  the BORLNDMM.DLL shared memory manager, which must be deployed along
+  with your DLL. To avoid using BORLNDMM.DLL, pass string information
+  using PChar or ShortString parameters. }
+
+uses
+  SysUtils,
+  Classes,
+  FctHdrBld in 'FctHdrBld.pas' {frmFctHdrBld},
+  HdrBldMain in 'HdrBldMain.pas',
+  EditParam in 'EditParam.pas' {frmEditParam},
+  Settings in 'Settings.pas' {frmSettings};
+
+{$R *.res}
+
+exports
+  FunctionHeaderBuilder;
+
+begin
+end.

BIN
LuaEdit/HeaderBuilder/HdrBld.res


+ 47 - 0
LuaEdit/HeaderBuilder/HdrBldMain.pas

@@ -0,0 +1,47 @@
+unit HdrBldMain;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Themes, UxTheme;
+
+function FunctionHeaderBuilder(sLine: PChar): PChar;
+
+implementation
+
+uses
+  FctHdrBld;
+
+function FunctionHeaderBuilder(sLine: PChar): PChar;
+begin
+  // leave those important lines here...
+  // There is a bug with the themes and forms placed in dll
+  // The dll don't have the time to free the theme handle and the when it does it,
+  // the hoset application (LuaEdit) already did it so... Runtime Error 216
+  ThemeServices.ApplyThemeChange;
+  InitThemeLibrary;
+
+  // Create the form first
+  frmFctHdrBld := TfrmFctHdrBld.Create(nil);
+
+  if sLine <> '' then
+    frmFctHdrBld.ParseLine(StrPas(sLine));
+
+  if frmFctHdrBld.ShowModal = mrOk then
+  begin
+    Result := PChar(frmFctHdrBld.GetHeader);
+  end
+  else
+    Result := '';
+
+  FreeAndNil(frmFctHdrBld);
+
+  // leave those important lines here...
+  // There is a bug with the themes and forms placed in dll
+  // The dll don't have the time to free the theme handle and the when it does it,
+  // the hoset application (LuaEdit) already did it so... Runtime Error 216
+  ThemeServices.ApplyThemeChange;
+  FreeThemeLibrary;
+end;
+
+end.

+ 192 - 0
LuaEdit/HeaderBuilder/Settings.dfm

@@ -0,0 +1,192 @@
+object frmSettings: TfrmSettings
+  Left = 488
+  Top = 343
+  BorderStyle = bsToolWindow
+  Caption = 'Header Builder Settings'
+  ClientHeight = 216
+  ClientWidth = 392
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  FormStyle = fsStayOnTop
+  OldCreateOrder = False
+  Position = poScreenCenter
+  PixelsPerInch = 96
+  TextHeight = 13
+  object Panel1: TPanel
+    Left = 0
+    Top = 181
+    Width = 392
+    Height = 35
+    Align = alBottom
+    BevelOuter = bvNone
+    TabOrder = 0
+    object btnCancel: TButton
+      Left = 312
+      Top = 6
+      Width = 75
+      Height = 25
+      Cancel = True
+      Caption = '&Cancel'
+      ModalResult = 2
+      TabOrder = 0
+    end
+    object btnOK: TButton
+      Left = 232
+      Top = 6
+      Width = 75
+      Height = 25
+      Caption = '&OK'
+      Default = True
+      ModalResult = 1
+      TabOrder = 1
+    end
+  end
+  object Panel2: TPanel
+    Left = 0
+    Top = 0
+    Width = 392
+    Height = 181
+    Align = alClient
+    BevelOuter = bvNone
+    TabOrder = 1
+    object PageControl1: TPageControl
+      Left = 0
+      Top = 0
+      Width = 392
+      Height = 181
+      ActivePage = TabSheet3
+      Align = alClient
+      TabOrder = 0
+      object TabSheet3: TTabSheet
+        Caption = 'General'
+        ImageIndex = 2
+        object Label3: TLabel
+          Left = 8
+          Top = 11
+          Width = 89
+          Height = 13
+          Caption = 'Developper Name:'
+        end
+        object Label4: TLabel
+          Left = 240
+          Top = 11
+          Width = 47
+          Height = 13
+          Caption = 'Copyright:'
+        end
+        object Label5: TLabel
+          Left = 8
+          Top = 56
+          Width = 69
+          Height = 13
+          Caption = 'Initial Release:'
+        end
+        object txtDevelopper: TEdit
+          Left = 8
+          Top = 26
+          Width = 225
+          Height = 21
+          TabOrder = 0
+        end
+        object txtCopyright: TEdit
+          Left = 240
+          Top = 26
+          Width = 137
+          Height = 21
+          TabOrder = 1
+        end
+        object txtInitialRelease: TEdit
+          Left = 8
+          Top = 71
+          Width = 369
+          Height = 21
+          TabOrder = 2
+        end
+      end
+      object TabSheet1: TTabSheet
+        Caption = 'Functions'
+        object Label1: TLabel
+          Left = 8
+          Top = 11
+          Width = 72
+          Height = 13
+          Caption = 'Template Path:'
+        end
+        object txtFctTemplatePath: TEdit
+          Left = 8
+          Top = 26
+          Width = 345
+          Height = 21
+          TabOrder = 0
+          OnChange = txtFctTemplatePathChange
+        end
+        object btnBrowseFctTpl: TButton
+          Left = 360
+          Top = 27
+          Width = 19
+          Height = 19
+          Caption = '...'
+          TabOrder = 1
+          OnClick = btnBrowseFctTplClick
+        end
+        object btnEditFctTpl: TButton
+          Left = 8
+          Top = 51
+          Width = 75
+          Height = 25
+          Caption = 'Edit...'
+          Enabled = False
+          TabOrder = 2
+        end
+      end
+      object TabSheet2: TTabSheet
+        Caption = 'Files'
+        ImageIndex = 1
+        object Label2: TLabel
+          Left = 8
+          Top = 11
+          Width = 72
+          Height = 13
+          Caption = 'Template Path:'
+        end
+        object txtFileTemplatePath: TEdit
+          Left = 8
+          Top = 26
+          Width = 345
+          Height = 21
+          TabOrder = 0
+          OnChange = txtFileTemplatePathChange
+        end
+        object btnBrowseFileTpl: TButton
+          Left = 360
+          Top = 27
+          Width = 19
+          Height = 19
+          Caption = '...'
+          TabOrder = 1
+          OnClick = btnBrowseFileTplClick
+        end
+        object btnEditFileTpl: TButton
+          Left = 8
+          Top = 51
+          Width = 75
+          Height = 25
+          Caption = 'Edit...'
+          Enabled = False
+          TabOrder = 2
+        end
+      end
+    end
+  end
+  object odlgTemplate: TOpenDialog
+    Filter = 'Template Files (*.tpl)|*.tpl'
+    Options = [ofHideReadOnly, ofPathMustExist, ofEnableSizing]
+    Title = 'Open Template File'
+    Left = 10
+    Top = 184
+  end
+end

+ 96 - 0
LuaEdit/HeaderBuilder/Settings.pas

@@ -0,0 +1,96 @@
+unit Settings;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, ComCtrls, StdCtrls, ExtCtrls, Registry;
+
+type
+  TfrmSettings = class(TForm)
+    Panel1: TPanel;
+    btnCancel: TButton;
+    btnOK: TButton;
+    Panel2: TPanel;
+    PageControl1: TPageControl;
+    TabSheet1: TTabSheet;
+    TabSheet2: TTabSheet;
+    Label1: TLabel;
+    odlgTemplate: TOpenDialog;
+    txtFctTemplatePath: TEdit;
+    btnBrowseFctTpl: TButton;
+    TabSheet3: TTabSheet;
+    btnEditFctTpl: TButton;
+    Label2: TLabel;
+    txtFileTemplatePath: TEdit;
+    btnBrowseFileTpl: TButton;
+    btnEditFileTpl: TButton;
+    Label3: TLabel;
+    txtDevelopper: TEdit;
+    Label4: TLabel;
+    txtCopyright: TEdit;
+    Label5: TLabel;
+    txtInitialRelease: TEdit;
+    procedure btnBrowseFctTplClick(Sender: TObject);
+    procedure btnBrowseFileTplClick(Sender: TObject);
+    procedure txtFileTemplatePathChange(Sender: TObject);
+    procedure txtFctTemplatePathChange(Sender: TObject);
+  private
+    { Private declarations }
+    function Browse(sInitial: String): String;
+  public
+    { Public declarations }
+  end;
+
+var
+  frmSettings: TfrmSettings;
+
+implementation
+
+{$R *.dfm}
+
+function TfrmSettings.Browse(sInitial: String): String;
+var
+  pReg: TRegistry;
+begin
+  pReg := TRegistry.Create;
+  Result := '';
+
+  if sInitial = '' then
+  begin
+    if pReg.OpenKey('\Software\LuaEdit\HdrBld', False) then
+      sInitialPath := pReg.ReadString('LastBrowsePath');
+  end;
+
+  odlgTemplate.InitialDir := sInitial;
+  if odlgTemplate.Execute then
+  begin
+    Result := odlgTemplate.FileName;
+    if pReg.OpenKey('\Software\LuaEdit\HdrBld', True) then
+      pReg.WriteString('LastBrowsePath', ExtractFilePath(odlgTemplate.FileName));
+  end;
+
+  pReg.Free;
+end;
+
+procedure TfrmSettings.btnBrowseFctTplClick(Sender: TObject);
+begin
+  txtFctTemplatePath.Text := Browse(txtFctTemplatePath.Text);
+end;
+
+procedure TfrmSettings.btnBrowseFileTplClick(Sender: TObject);
+begin
+  txtFileTemplatePath.Text := Browse(txtFileTemplatePath.Text);
+end;
+
+procedure TfrmSettings.txtFileTemplatePathChange(Sender: TObject);
+begin
+  btnEditFileTpl.Enabled := (txtFileTemplatePath.Text <> '');
+end;
+
+procedure TfrmSettings.txtFctTemplatePathChange(Sender: TObject);
+begin
+  btnEditFctTpl.Enabled := (txtFctTemplatePath.Text <> '');
+end;
+
+end.