Browse Source

+ initial implementation

michael 22 years ago
parent
commit
32c9496a2f

+ 13 - 0
utils/fpdoc/fpde/fpde.pp

@@ -0,0 +1,13 @@
+program fpde;
+{$mode objfpc}
+{$H+}
+{ $apptype gui}
+
+uses fpgtk,fpglib,fpgtkext,frmmain,pgeditor;
+
+begin
+  application := TFPgtkApplication.Create;
+  application.MainWindow := TMainForm.Create;
+  application.Run;
+  application.Free;
+end.

+ 142 - 0
utils/fpdoc/fpde/fpdemsg.pp

@@ -0,0 +1,142 @@
+{$mode objfpc}
+{$h+}
+
+unit fpdemsg;
+
+interface
+
+ResourceString
+
+{ ---------------------------------------------------------------------
+    Strings which appear in the program
+  ---------------------------------------------------------------------}
+  
+
+  SFPDE        = 'Free Pascal documentation editor';
+  SName        = 'Name';
+  SOK          = ' OK ';
+  SCancel      = ' Cancel ';
+  SNewDocument = 'New document';
+  SNew         = 'New';
+  SInsertLink  = 'Insert link';
+  SInsertTable = 'Insert table';
+  SForFile     = ' in file ';
+  SForPackage  = ' in package ';
+  SForModule   = ' in module ';
+  SLinkTarget  = 'Link target';
+  SLinkText    = 'Link text';
+  STableRows   = 'Rows';
+  STableCols   = 'Columns';
+  STableHeader = 'Use header row';
+  SFileModified = 'Document "%s" was modified, would you like to save it?';
+  SDeletePackage = 'Are you sure you want to delete package "%s" ?';
+  SDeleteModule  = 'Are you sure you want to delete module "%s" ?';
+  SDeleteElement = 'Are you sure you want to delete element "%s" ?';
+  SRenamePackage = 'Rename package';
+  SRenameModule  = 'Rename module';
+  SRenameElement = 'Rename element';
+  SNoElement = 'No element selected';
+  SDataForElement = 'Documentation for element "%s":';
+  SShortDescription = 'Short';
+  SDescription = 'Description';
+  SErrors = 'Errors';
+  SSeeAlso = 'See Also';
+  SMakeSkelFromSource = 'Make new document from source file';
+  SSkelErrorWithFile = 'makeskel reported an error (%d). Try to load produced file anyway ?';
+  SSkelErrorWithoutFile = 'makeskel reported an error (%d) and produced no file.';
+  SOptConfirmDelete = 'Confirm node deletion';
+  SOptCreateBackup = 'Backup existing files';
+  SOptSkipEmptyNodes = 'Do not create empty nodes';
+  SOptBackupExtension = 'Backup file extension';
+  SOptDefaultExtension = 'Default extension for new files';
+  SOptMaxRecentUsed = 'Items in MRU list';
+  SAboutText = 'fpdoc editor 1.0'#10'(c) 2002 Michael Van Canneyt'#10+
+               'See http://www.freepascal.org/';
+  
+{ ---------------------------------------------------------------------
+    Menu strings
+  ---------------------------------------------------------------------}
+  
+  SMenuOpen          = '_Open';
+  SMenuNew           = '_New';
+  SMenuNewFromSource = 'New from so_urce';
+  SMenuSave          = '_Save';
+  SMenuSaveAs        = 'Save _as';
+  SMenuRecent        = '_Recent';
+  SMenuClose         = '_Close';
+  SMenuExit          = 'E_xit';
+  SMenuFile          = 'File';
+  
+  SMenuInsert          = 'Insert';
+  SMenuInsertPackage   = '_Package';
+  SMenuInsertModule    = '_Module';
+  SMenuInsertElement   = '_Element';
+  SMenuInsertLink      = '_Link';
+  SMenuInsertTable     = '_Table';
+
+  SMenuFormat           = 'Format';
+  SMenuFormatBold       = '_Bold';
+  SMenuFormatUnderLine  = '_Underline';
+  SMenuFormatItalics    = '_Italic';
+  SMenuformatVariable   = '_Variable';
+  SMenuFormatRemark     = '_Remark';
+  SMenuFormatParaGraph  = '_Paragraph';
+  SMenuFormatCode       = '_Code';
+  SMenuFormatFile       = '_File';
+
+  SMenuRename           = 'Rename';
+  SMenuDelete           = 'Delete';
+
+  SMenuExtra            = 'Extra';
+  SMenuExtraoptions     = 'Options';
+
+  SMenuHelp             = 'Help';
+  SMenuHelpAbout            = 'About';
+    
+{ ---------------------------------------------------------------------
+    Hint strings  
+  ---------------------------------------------------------------------}
+  SHintFileNew       = 'New file';
+  SHintFileOpen      = 'Open file';
+  SHintFileSave      = 'Save file';
+  SHintFileSaveAs    = 'Save file as';
+  
+  SHintInsertPackage = 'New package';
+  SHintInsertModule  = 'New module';
+  SHintInsertElement = 'New element';
+  SHintInsertLink    = 'Insert link';
+  ShintInsertTable   = 'Insert table';
+  
+  SMarkSelection     = 'Mark selection %s';
+  
+  SHMenuExtraOptions = 'Show options dialog';
+  SHMenuHelpAbout        = 'About this program';   
+   
+{ ---------------------------------------------------------------------
+    Error messages.
+  ---------------------------------------------------------------------}
+  
+  
+  SErrNoPackageForModule = 'No package found to insert module "%s"';
+  SErrNoNodeForPackage   = 'No node found for package "%s"';
+  SErrNoNodeForModule    = 'No node found for module "%s"';
+  SErrNoModuleForElement = 'No module found to insert element "%s"';
+  SErrNoNodeForElement   = 'No node found for element "%s"';
+
+
+  SSaveFileTitle = 'Enter filename to save to';
+  SOpenFileTitle = 'Select file to open';
+
+Function FormatHint(S : String) : String;
+
+implementation
+
+uses sysutils;
+
+Function FormatHint(S : String) : String;
+
+begin
+  Result:=Format(SMarkSelection,[S]);
+end;
+
+end.

+ 103 - 0
utils/fpdoc/fpde/fpdeopts.pp

@@ -0,0 +1,103 @@
+{$mode objfpc}
+{$H+}
+unit fpdeopts;
+
+Interface
+
+uses SysUtils,IniFiles;
+
+Var
+  SkipEmptyNodes   : Boolean;  
+  ConfirmDelete    : Boolean;
+  CreateBackup     : Boolean;
+  MaxRecentUsed    : Integer;
+  BackupExtension  : String;  
+  DefaultExtension : String;
+
+Procedure LoadOptions;
+Procedure SaveOptions;
+Function  GetOptionFileName : String;
+
+Implementation
+
+Const
+  DefFilename         = 'fpde.ini';
+  SecPrefs            = 'Preferences';
+  KeySkipEmptyNodes   = 'SkipEmptyNodes';
+  KeyConfirmDelete    = 'ConfirmDelete';
+  KeyCreateBackup     = 'CreateBackup';
+  KeyBackupExtension  = 'BackupExtension';  
+  KeyDefaultExtension = 'DefaultExtension';
+  KeyMaxRecentUsed    = 'MaxMRUitems';
+  
+{$ifndef win32}
+Function GetOptionFileName : String;
+
+Const
+  fpdedir = '.fpde';
+
+Var
+  HomeDir : String;
+
+begin
+  HomeDir:=GetEnvironmentVariable('HOME');
+  If (HomeDir<>'') then
+    begin
+    HomeDir:=IncludeTrailingPathDelimiter(HomeDir)+fpdedir;
+    If not DirectoryExists(HomeDir) then
+      If Not CreateDir(HomeDir) then
+        HomeDir:=''
+      else
+        HomeDir:=HomeDir;  
+    end;
+  Result:=IncludeTrailingPathDelimiter(HomeDir)+DefFileName;
+end;
+
+{$else}
+
+Function GetOptionFileName : String;
+
+begin
+  Result:=ExtractFilePath(Paramstr(0))+DefFileName;  
+end;
+{$endif}
+
+Procedure LoadOptions;
+
+begin
+  With TInifile.Create(GetOptionFileName) do
+    Try
+      SkipEmptyNodes:=ReadBool(SecPrefs,KeySkipEmptyNodes,SkipEmptyNodes);
+      ConfirmDelete:=ReadBool(SecPrefs,KeyConfirmDelete,ConfirmDelete);
+      CreateBackup:=ReadBool(SecPrefs,KeyCreateBackup,CreateBackup);
+      BackupExtension:=ReadString(SecPrefs,KeyBackupExtension,BackupExtension);
+      DefaultExtension:=ReadString(SecPrefs,KeyDefaultExtension,DefaultExtension);
+    finally
+      Free;
+    end;
+end;
+
+Procedure SaveOptions;
+
+begin
+  With TInifile.Create(GetOptionFileName) do
+    Try
+      WriteBool(SecPrefs,KeySkipEmptyNodes,SkipEmptyNodes);
+      WriteBool(SecPrefs,KeyConfirmDelete,ConfirmDelete);
+      WriteBool(SecPrefs,KeyCreateBackup,CreateBackup);
+      WriteString(SecPrefs,KeyBackupExtension,BackupExtension);
+      WriteString(SecPrefs,KeyDefaultExtension,DefaultExtension);
+      UpdateFile;
+    finally
+      Free;
+    end;
+end;
+
+Initialization
+  SkipEmptyNodes   := True;
+  ConfirmDelete    := True;
+  CreateBackup     := True;
+  BackupExtension  := '.~xml';
+  DefaultExtension := '.xml';
+  MaxRecentUSed    := 10;
+end.

+ 60 - 0
utils/fpdoc/fpde/frmabout.pp

@@ -0,0 +1,60 @@
+{$mode objfpc}
+{$h+}
+
+unit frmabout;
+
+interface
+
+uses fpgtk,gtk,classes,sysutils;
+
+Type
+  TAboutForm = Class (TFPGtkWindow)
+    FAboutText : TFPGtkLabel;
+    FSeparator : TFPGtkHSeparator;
+    FVBox : TFPgtkVBox;
+    FOK,
+    FCancel : TFPGtkButton;
+    FButtonBox: TFPgtkHBox;
+    Constructor Create;
+    Procedure CreateWindow;
+  end;
+  
+Implementation
+
+uses fpdemsg;
+
+Constructor TAboutForm.Create;
+
+begin
+  Inherited Create(GTK_WINDOW_DIALOG);
+  CreateWindow;
+end;
+
+Procedure TAboutForm.CreateWindow;
+
+begin
+  FVBox:=TFPGtkVBox.Create;
+  FVBox.Spacing:=4;
+  FVBox.Border:=8;
+  Add(FVBox);
+  // About text
+  FAboutText:=TFPgtkLabel.Create(SAboutText);
+  // button area
+  FOK:=TFpGtkButton.CreateWithLabel(SOK);
+  FOK.ConnectClicked(@CloseWithResult,IntToPointer(drOK));
+  FCancel:=TFPgtkButton.CreateWithLabel(SCancel);
+  FCancel.ConnectCLicked(@CloseWithResult,IntToPointer(drCancel));
+  FSeparator:=TFPgtkHSeparator.Create;
+  FButtonBox:=TfpGtkHBox.Create;
+  FButtonBox.Spacing:=4;
+  FButtonBox.PackEnd(FOK,false,false,4);
+  FButtonBox.PackEnd(FCancel,false,false,4);
+  // Add to window
+  FVBox.PackStart(FAboutText,True,True,0);
+  FVBox.PackStart(FSeparator,False,False,4);
+  FVBox.PackStart(FButtonBox,false,false,0);
+end;
+
+
+
+end.  

+ 86 - 0
utils/fpdoc/fpde/frmlink.pp

@@ -0,0 +1,86 @@
+{$mode objfpc}
+{$h+}
+
+unit frmlink;
+
+interface
+
+uses fpgtk,gtk,classes,sysutils;
+
+Type
+  TLinkForm = Class (TFPGtkWindow)
+    FTable : TFPGtkTable;
+    FLLinkTarget,
+    FLLinkText : TFPGtkLabel;
+    FLinkText : TFPGtkEntry;
+    FLinkTarget : TFPGtkCombo;
+    FSeparator : TFPGtkHSeparator;
+    FVBox : TFPgtkVBox;
+    FOK,
+    FCancel : TFPGtkButton;
+    FButtonBox: TFPgtkHBox;
+    Constructor Create;
+    Procedure CreateWindow;
+    Procedure OnShow(Sender : TFpGtkObject;Data : Pointer);
+  end;
+  
+Implementation
+
+uses fpdemsg;
+
+Constructor TLinkForm.Create;
+
+begin
+  Inherited Create(GTK_WINDOW_DIALOG);
+  CreateWindow;
+end;
+
+Procedure TLinkForm.CreateWindow;
+
+Var
+  OH,OV : TgtkAttachOPtions;
+  
+begin
+  FVBox:=TFPGtkVBox.Create;
+  FVBox.Spacing:=4;
+  FVBox.Border:=8;
+  Add(FVBox);
+  // Table area
+  FTable:=TFPGtkTable.Create(2,2);
+  FLLinktarget:=TFPGtkLabel.Create(SLinkTarget);
+  FLLinktarget.Justify:=GTK_JUSTIFY_RIGHT;
+  FLLinkText:=TFPGtkLabel.Create(SLinkText);
+  FLLinktext.Justify:=GTK_JUSTIFY_RIGHT;
+  FLinkText:=TFPgtkEntry.Create;
+  FlinkTarget:=TFPGtkCombo.Create;
+  OH:=GTK_EXPAND or GTK_FILL;
+  FTable.Attach(FLLinkTarget,0,1,0,1,0,GTK_FILL,4,4);
+  FTable.Attach(FLLinkText,0,1,1,2,0,GTK_FILL,4,4);
+  FTable.Attach(FLinkTarget,1,2,0,1,OH,0,4,4);
+  FTable.Attach(FLinkText,1,2,1,2,OH,0,4,4);
+  // button area
+  FOK:=TFpGtkButton.CreateWithLabel(SOK);
+  FOK.ConnectClicked(@CloseWithResult,IntToPointer(drOK));
+  FCancel:=TFPgtkButton.CreateWithLabel(SCancel);
+  FCancel.ConnectCLicked(@CloseWithResult,IntToPointer(drCancel));
+  FSeparator:=TFPgtkHSeparator.Create;
+  FButtonBox:=TfpGtkHBox.Create;
+  FButtonBox.Spacing:=4;
+  FButtonBox.PackEnd(FOK,false,false,4);
+  FButtonBox.PackEnd(FCancel,false,false,4);
+  // Add to window
+  FVBox.PackStart(FTable,False,False,0);
+  FVBox.PackStart(FSeparator,False,False,4);
+  FVBox.PackStart(FButtonBox,false,false,0);
+  // Some events;
+  ConnectShow(@OnShow,Nil);
+end;
+
+Procedure TLinkForm.OnShow(Sender : TFpgtkObject; Data : Pointer);
+
+begin
+  FocusedWidget(FLinkTarget.entry);
+end;
+
+
+end.  

+ 888 - 0
utils/fpdoc/fpde/frmmain.pp

@@ -0,0 +1,888 @@
+{$mode objfpc}
+{$h+}
+unit frmmain;
+
+interface
+
+uses 
+  gtk,gdk,fpgtk,fpgtkext,pgEditor,frmlink,sysutils,classes,fpdeopts;
+
+Const
+  DefaultTooltips = True;
+  DefaultToolBarStyle = GTK_TOOLBAR_ICONS;
+  DefaultToolbarRelief = GTK_RELIEF_NONE;
+  SFileTemplate = 'template.xml';
+
+Type
+  TNodeType = (ntfile,ntPackage,ntModule,ntElement);
+
+  TMainForm = Class(TFPGtkWindow)
+  Private
+    FRecent : TStrings;
+    FPages : TFPGtkNoteBook;
+    FVBox : TFPGTKVBox;
+    FMenu : TFpGTKMenuBar;
+    FNewImage,
+    FOpenImage,
+    FSaveImage,
+    FSaveAsImage,
+    FNewPackageImage,
+    FNewModuleImage,
+    FNewElementImage,
+    FBoldImage,
+    FUnderlineImage,
+    FItalicsImage,
+    FParagraphImage,
+    FVarImage,
+    FLinkImage,
+    FRemarkImage,
+    FTableImage : TFPGtkPixmap;
+    FHelpMenu,
+    FExtraMenu,
+    FInsertMenu,
+    FFormatMenu,
+    FFileMenu : TFPGtkMenuItem;
+    FToolbarFrame : TFPGtkFrame;
+    FFormatToolBar,
+    FToolsToolBar,
+    FMainToolBar : TFPGtkToolbar;
+    FFileOpen,
+    FFileNew,
+    FFileNewFromFile,
+    FFileSave,
+    FFileSaveAs,
+    FFileRecent,
+    FFileClose,
+    FFileExit,
+    FInsertPackage,
+    FInsertModule,
+    FInsertElement,
+    FInsertLink,
+    FInsertTable,
+    FFormatParagraph,
+    FFormatBold,
+    FFormatItalic,
+    FFormatUnderline,
+    FFormatRemark,
+    FFormatVariable,
+    FFormatCode,
+    FFormatFile,
+    FExtraoptions,
+    FHelpAbout : TFPGtkMenuItem;
+    // Utility functions
+    Function  FormatMenuItem(ACaption : String; tt : TTagType) : TFPgtkMenuItem;
+    Function  FormatMenuItem(ACaption : String; tt : TTagType; Accel : PAccelKeyDef) : TFPgtkMenuItem;
+    // Editor functions.
+    procedure BuildReopenList;
+    Procedure AddTorecent(FN : String);
+    Procedure OpenFile(FN : String);
+    Procedure SaveEditorAs(E : TEditorPage);
+    Procedure SaveEditor(E : TEditorPage);
+    Function  CloseEditor(E : TEditorPage) : Boolean;
+    Procedure LoadRecent;
+    Procedure SaveRecent;
+    Procedure CreateForm;
+    Function  CreatePage : TEditorPage;
+    Function  Currenteditor : TEditorPage;
+    Function  AllowClose : Boolean;
+    // Callbacks
+    Procedure TagClick(Sender : TFPGtkObject; Data : Pointer);
+    Procedure FileReopen(Sender: TFPGTKObject;data : Pointer);
+    Procedure FileOpenClick(Sender : TFPGtkObject; Data : Pointer);
+    Procedure FileNewClick(Sender : TFPGtkObject; Data : Pointer);
+    Procedure FileNewFromFileClick(Sender : TFPGtkObject; Data : Pointer);
+    Procedure FileSaveAsClick(Sender : TFPGtkObject; Data : Pointer);
+    Procedure FileSaveClick(Sender : TFPGtkObject; Data : Pointer);
+    Procedure FileExitClick(Sender : TFPGtkObject; Data : Pointer);
+    Procedure FileCloseClick(Sender : TFPGtkObject; Data : Pointer);
+    Procedure OptionsClick(Sender : TFPGtkObject; Data : Pointer);
+    Procedure HelpAboutClick(Sender : TFPGtkObject; Data : Pointer);
+    Procedure InsertNodeClick(Sender : TFPGtkObject; Data : Pointer);
+    Procedure LinkClick(Sender : TFPGtkObject; Data : Pointer);
+    Procedure TableClick(Sender : TFPGtkObject; Data : Pointer);
+    Procedure GetLinkData(Sender : TFPGtkWindow;Data : Pointer; Action : Integer;Initiator : TFPGtkObject);
+    Procedure GetTableData(Sender : TFPGtkWindow;Data : Pointer; Action : Integer;Initiator : TFPGtkObject);
+    Procedure GetNodeData(Sender : TFPGtkWindow;Data : Pointer; Action : Integer;Initiator : TFPGtkObject);
+    Procedure GetSkeletonData(Sender : TFPGtkWindow;Data : Pointer; Action : Integer;Initiator : TFPGtkObject);
+    Procedure DialogSetFilename(Sender : TFPGtkWindow;Data : Pointer; Action : Integer;Initiator : TFPGtkObject);
+    Function OnDeleteEvent(Sender:TFPgtkWidget; Event:PGdkEvent; data:pointer): boolean;
+  Public
+    Constructor create;
+    Destructor Destroy; override;
+  end;
+
+Const
+  NodeNames : Array[TNodeType] of String 
+            = ('file','package','module','element');
+
+implementation
+
+uses fpdemsg,frmnewnode,frmtable,frmmakeskel,process,frmOptions,frmAbout,inifiles,xpms;
+
+
+Function TMainForm.CreatePage : TEditorPage;
+
+begin
+  Result:=TEditorPage.Create;
+  Result.FileNameLabel:=TFPgtkLabel.Create(SNewDocument);
+  FPages.AppendPage(Result, REsult.FileNameLabel);
+  FPages.Page:=Result;
+end;
+
+Function PixmapFromFile (FN : String; Const ImgArray : Array of string) :TFPGtkPixmap;
+
+begin
+  Result:=TFPGtkPixmap.CReate;
+{$ifdef debug}
+  writeln('loading ','bitmaps'+directoryseparator+FN);
+{$endif}  
+  If FileExists('bitmaps'+directoryseparator+FN) then
+    Result.LoadFromFile('bitmaps'+directoryseparator+FN)
+  else 
+    Result.loadFromArray(ImgArray);  
+    
+end;
+
+Function TMainForm.FormatMenuItem(ACaption : String; tt : TTagType) : TFPgtkMenuItem;
+
+begin
+  Result:=NewMenuItem(ACaption,FormatHint(ACaption),'',@TagClick,Pointer(tt));
+end;
+
+Function TMainForm.FormatMenuItem(ACaption : String; tt : TTagType; Accel : PAccelKeyDef) : TFPgtkMenuItem;
+
+begin
+  Result:=NewMenuItem(ACaption,FormatHint(ACaption),'',Accel,@TagClick,Pointer(tt));
+end;
+
+Procedure TMainForm.CreateForm;
+
+Var
+  V : TFPGtkHBox;
+  FAccelGroup: Integer;
+
+begin
+  Title:=SFPDE;
+  FAccelGroup:=AccelGroupNew;
+  {  File menu }
+{$ifdef debug}
+  Writeln('Menu');
+{$endif}  
+//anAG : integer; aKey : guint; aMods 
+  FFileOpen:=NewMenuItem(SMenuOpen,'','',MakeAccelKeyDef(Self,FaccelGroup,GDK_O,[amcontrol]),@FileOpenClick,Nil);
+  FFileNew:=NewMenuItem(SMenuNew,'','',MakeAccelKeyDef(Self,FaccelGroup,GDK_N,[amcontrol]),@FileNewClick,Nil);
+  FFileNewFromFile:=NewMenuItem(SMenuNewFromSource,'','',@FileNewFromFileClick,Nil);
+  FFileSave:=NewMenuItem(SMenuSave,'','',MakeAccelKeyDef(Self,FaccelGroup,GDK_S,[amcontrol]),@FileSaveClick,Nil);
+  FFileSaveAs:=NewMenuItem(SMenuSaveAs,'','',@FileSaveAsClick,Nil);
+  FFileRecent:=NewSubMenu(SMenuRecent,'','',[]);
+  FFileClose:=NewMenuItem(SMenuClose,'','',MakeAccelKeyDef(Self,FaccelGroup,GDK_W,[amcontrol]),@FileCLoseClick,Nil);
+  FFileExit:=NewMenuItem(SMenuExit,'','',MakeAccelKeyDef(Self,FaccelGroup,GDK_Q,[amcontrol]),@FileExitClick,Nil);
+  FFileMenu:=NewSubMenu(SMenuFile,'','',[FFileNew,FFileNewFromFile,FFileOpen,FFileRecent,FFileSave,FFileSaveAs,FFileClose,NewLine,FFileExit]);
+  
+  {  Insert menu }
+  FInsertPackage:=NewMenuItem(SMenuInsertPackage,SHintInsertPackage,'',MakeAccelKeyDef(Self,FaccelGroup,GDK_P,[amcontrol]),@InsertNodeClick,Pointer(ntpackage));
+  FInsertModule:=NewMenuItem(SMenuInsertModule,SHintInsertModule,'',MakeAccelKeyDef(Self,FaccelGroup,GDK_M,[amcontrol]),@InsertNodeClick,Pointer(ntmodule));
+  FInsertElement:=NewMenuItem(SMenuInsertElement,SHintInsertElement,'',MakeAccelKeyDef(Self,FaccelGroup,GDK_E,[amcontrol]),@InsertNodeClick,Pointer(ntElement));
+  FinsertLink:=NewMenuItem(SMenuInsertLink,SHintInsertLink,'',MakeAccelKeyDef(Self,FaccelGroup,GDK_L,[amcontrol]),@LinkClick,Nil);
+  FinsertTable:=NewMenuItem(SMenuInsertTable,SHintInsertTable,'',MakeAccelKeyDef(Self,FaccelGroup,GDK_T,[amcontrol]),@TableClick,Nil);
+  FInsertMenu:=NewSubMenu(SMenuInsert,'','',[FInsertPackage,FInsertModule,FInsertElement,NewLine,FInsertLink,FinsertTable]);
+  
+  { Format menu }
+  
+  FFormatBold:=FormatMenuItem(SMenuFormatBold,ttBold,MakeAccelKeyDef(Self,FaccelGroup,GDK_B,[amcontrol]));
+  FFormatItalic:=FormatMenuItem(SMenuFormatItalics,ttItalic,MakeAccelKeyDef(Self,FaccelGroup,GDK_I,[amcontrol]));
+  FFormatUnderline:=FormatMenuItem(SMenuFormatUnderline,ttUnderline,MakeAccelKeyDef(Self,FaccelGroup,GDK_U,[amcontrol]));
+  FFormatVariable:=FormatMenuItem(SMenuFormatVariable,ttVariable);
+  FFormatFile:=FormatMenuItem(SMenuFormatFile,ttFile);
+  FFormatParagraph:=FormatMenuItem(SMenuFormatParagraph,ttParagraph);
+  FFormatRemark:=FormatMenuItem(SMenuFormatRemark,ttRemark);
+  FFormatCode:=FormatMenuItem(SMenuFormatCode,ttCode);
+  FFormatMenu:=NewSubMenu(SMenuFormat,'','',[FFormatBold,FFormatItalic,FFormatUnderline,FFormatVariable,FFormatFile,
+                                             NewLine,FFormatParagraph,FFormatRemark,FFormatCode]);
+
+  { Extra menu }
+  FExtraOptions:=NewMenuItem(SMenuExtraOptions,SHMenuExtraOptions,'',@OptionsClick,Nil);
+  FExtraMenu:=NewSubMenu(SMenuExtra,'','',[FExtraOptions]);   
+
+  { Help menu }
+  FHelpAbout:=NewMenuItem(SMenuHelpAbout,SHMenuHelpAbout,'',@HelpAboutClick,Nil);
+  FHelpMenu:=NewSubMenu(SMenuHelp,'','',[FHelpAbout]);   
+
+  FMenu:=NewMenuBar([FFileMenu,FInsertMenu,FFormatMenu,FExtraMenu,FHelpMenu]);
+{$ifdef debug}
+  Writeln('Toolbar pixmaps');
+{$endif}
+
+  { Tool bar bitmaps }
+  FNewImage:=PixMapFromFile('new.xpm',ImgNew);
+  FOpenImage:=PixmapFromFile('open.xpm',ImgOpen);
+  FSaveImage:=PixmapFromFile('save.xpm',ImgSave);
+  FSaveAsImage:=PixMapFromFile('saveas.xpm',ImgSaveAs);
+  FNewPackageImage:=PixMapFromFile('newpackage.xpm',ImgNewPackage);
+  FNewModuleImage:=PixMapFromFile('newmodule.xpm',ImgNewModule);
+  FNewElementImage:=PixMapFromFile('newelement.xpm',ImgNewElement);
+  FBoldImage:=PixMapFromFile('bold.xpm',ImgBold);
+  FUnderlineImage:=PixMapFromFile('underline.xpm',ImgUnderline);
+  FItalicsImage:=PixMapFromFile('italic.xpm',ImgItalic);
+  FParagraphImage:=PixMapFromFile('para.xpm',ImgPara);
+  FVarImage:=PixMapFromFile('var.xpm',ImgVar);
+  FRemarkImage:=PixMapFromFile('remark.xpm',ImgRemark);
+  FLinkImage:=PixMapFromFile('link.xpm',ImgLink);
+  FTableImage:=PixMapFromFile('table.xpm',ImgTable);
+
+  { Tool bars }
+{$ifdef debug}
+  Writeln('Main toolbar');
+{$endif}
+
+  FMainToolBar:=TFPGtkToolbar.Create;
+  With FMainToolbar do
+    begin
+    Style:=DefaultToolbarStyle;
+    ButtonRelief:=DefaultToolbarRelief;
+    EnableTooltips:=DefaultTooltips;
+// AppendElement (ButtonType:TGtkToolbarChildType; PrevRadioBut:TFPgtkWidget; Text:string; TooltipText:string; TooltipPrivate:string; Icon:TFPgtkWidget; CallBack:TFPgtkSignalProcedure; data:pointer) : TFPgtkWidget;
+    AppendItem(SMenuNew,SHintFileNew,'',FNewImage,@FileNewClick,Nil);
+    AppendItem(SMenuOpen,SHintFileOpen,'',FOpenImage,@FileOpenClick,Nil);
+    AppendItem(SmenuSave,SHintFileSave,'',FSaveImage,@FileSaveClick,Nil);
+    AppendItem(SMenuSaveAs,SHintFileSaveAs,'',FSaveAsImage,@FileSaveAsClick,Nil);
+    AppendSpace;
+    AppendItem(SMenuInsertPackage,SHintInsertPackage,'',FNewPackageImage,@InsertNodeClick,Pointer(ntPackage));
+    AppendItem(SMenuInsertModule,SHintInsertModule,'',FNewModuleImage,@InsertNodeClick,Pointer(ntModule));
+    AppendItem(SMenuInsertEleMent,SHintInsertElement,'',FNewElementImage,@InsertNodeClick,Pointer(ntElement));
+    AppendSpace;
+    end;
+{$ifdef debug}
+  Writeln('Format Toolbars');
+{$endif}
+
+  FFormatToolBar:=TFPGtkToolbar.Create;
+  With FFormatToolbar do
+    begin
+    Style:=DefaultToolBarStyle;
+    ButtonRelief:=DefaultToolbarRelief;
+    EnableTooltips:=DefaultTooltips;
+    AppendItem(SMenuFormatParaGraph,Format(SMarkSelection,[SMenuFormatParaGraph]),'',FParagraphImage,@TagClick,Pointer(ttParagraph));
+    AppendItem(SMenuFormatBold,Format(SMarkSelection,[SMenuFormatBold]),'',FBoldImage,@TagClick,Pointer(ttBold));
+    AppendItem(SMenuFormatItalics,Format(SMarkSelection,[SMenuFormatItalics]),'',FItalicsImage,@TagClick,Pointer(ttItalic));
+    AppendItem(SMenuFormatUnderline,Format(SMarkSelection,[SMenuFormatUnderline]),'',FUnderlineImage,@TagClick,Pointer(ttUnderline));
+    AppendItem(SMenuFormatVariable,Format(SMarkSelection,[SMenuFormatVariable]),'',FVarImage,@TagClick,Pointer(ttVariable));
+    AppendItem(SmenuFormatRemark,Format(SMarkSelection,[SmenuFormatRemark]),'',FRemarkImage,@TagClick,Pointer(ttRemark));
+    FFormatToolbar.AppendSpace;
+    end;
+{$ifdef debug}
+  Writeln('Tools toolbar');
+{$endif}
+
+  FToolsToolBar:=TFPGtkToolbar.Create;
+  With FToolsToolbar do
+    begin
+    Style:=DefaultToolBarStyle;
+    ButtonRelief:=DefaultToolBarRelief;
+    EnableTooltips:=DefaultToolTips;
+    AppendItem(SMenuInsertLink,SHintInsertLink,'',FlinkImage,@LinkCLick,Nil);
+    AppendItem(SMenuInsertTable,SHintInsertTable,'',FTableImage,@TableClick,Nil);
+    AppendSpace;
+    end;
+
+{$ifdef debug}
+  Writeln('end Toolbars');
+{$endif}
+
+  V:=TFPGtkHBox.Create;
+  V.PackStart(FMainToolbar,False,False,2);
+  V.PackStart(FFormatToolBar,False,False,2);
+  V.Packstart(FToolsToolbar,True,True,2);
+
+  FToolbarFrame:=TFPGtkFrame.Create;
+  FtoolbarFrame.Add(V);
+
+  { Pages }
+
+  FPages:=TFPGtkNotebook.Create;
+
+  { Place everything on form }
+  FVBox:=TFPGTKVBox.create;
+  FVBox.PackStart(FMenu,false, true, 0);
+  FVBox.PackStart(FToolBarFrame,false, true, 0);
+  FVBox.PackStart(FPages,true, true, 0);
+  Self.add(FVBox);
+  setusize(640,480);
+  ConnectDeleteEvent(@OnDeleteEvent,Nil);
+end;
+
+Constructor TMainForm.create;
+
+begin
+  FRecent:=TStringList.Create;
+  Inherited Create(gtk_window_dialog);
+  CreateForm;
+  LoadOptions;
+  LoadRecent;
+end;
+
+Destructor TMainForm.Destroy;
+
+begin
+  SaveRecent;
+  FRecent.Free;
+  Inherited;
+end;
+
+
+Procedure TMainForm.LoadRecent;
+
+Var
+  I,Count : Integer;
+  S : String;
+
+begin
+  FRecent.Clear;
+  With TInifile.Create(GetoptionFileName) do
+    begin
+    Count:=ReadInteger('Recent','Count',0);
+    For I:=1 to Count do
+      begin
+      S:=ReadString('Recent','File'+IntToStr(i),'');
+      If S<>'' then
+        FRecent.Add(S);
+      end;
+    end;
+  BuildReopenList;
+end;
+
+Procedure TMainForm.SaveRecent;
+
+Var
+  I,Count : Integer;
+  S : String;
+
+begin
+  With TInifile.Create(GetoptionFileName) do
+    try
+      EraseSection('Recent');
+      WriteInteger('Recent','Count',FRecent.Count);
+      For I:=1 to FRecent.Count do
+        WriteString('Recent','File'+IntToStr(i),FRecent[i-1]);
+      UpdateFile;
+    Finally
+      Free;
+    end;
+end;
+
+
+{
+  Menu handlers
+}
+
+
+Procedure TMainForm.DialogSetFilename(Sender : TFPGtkWindow;Data : Pointer; Action : Integer;Initiator : TFPGtkObject);
+
+type
+  PString = ^AnsiString;
+
+begin
+  PString(Data)^:=(Sender as TFPgtkFileSelection).Filename;
+end;
+
+Procedure TMainForm.AddTorecent(FN : String);
+
+Var
+  Index : Integer;
+
+begin
+  FN:=ExpandFileName(FN);
+  With FRecent do
+    begin
+    Index:=IndexOf(FN);
+    If Index<>-1 then
+      Delete(Index);
+    Insert(0,FN);
+    While Count>MaxRecentUsed do
+      Delete(Count-1);
+    end;
+  BuildReopenList;
+end;
+
+Procedure TMainForm.OpenFile(FN : String);
+
+Var
+  EFN : String;
+
+begin
+  IF (FN<>'') then
+    begin
+    If FileExists(FN) then
+      With CreatePage do
+        begin
+        LoadFromFile(FN);
+        AddToRecent(Fn);
+        end;
+    end;
+end;
+
+Procedure TMainForm.FileOpenClick(Sender : TFPGtkObject; Data : Pointer);
+
+var
+  fs : TFPgtkFileSelection;
+  FN : String;
+begin
+  fs := TFPgtkFileSelection.Create (gtk_window_dialog);
+  FN:='';
+  with fs do
+    begin
+    Title:=SOpenFileTitle;
+    OKButton.ConnectClicked (@(CloseWithResult), inttopointer(drOk));
+    CancelButton.ConnectClicked (@(CloseWindow), nil);
+    if execute (nil, @FN, @DialogSetFilename) = drOk then
+      OpenFile(FN);
+    end;
+end;
+
+Procedure TMainForm.FileNewClick(Sender : TFPGtkObject; Data : Pointer);
+
+Const
+  template = '<?xml version="1.0" encoding="ISO8859-1"?>'+LineEnding+
+             '<fpdoc-descriptions>'+LineEnding+
+             '</fpdoc-descriptions>'+LineEnding;
+
+Var
+  S : TStringStream;
+
+begin
+  With CreatePage do
+    begin
+    If FileExists(SFileTemplate) then
+      LoadFromFile(SFileTemplate)
+    else
+      begin
+      S:=TStringStream.Create(Template);
+      Try
+        LoadFromStream(S)
+      finally
+        S.Free;
+      end;
+      end;
+    end;
+end;
+
+Type 
+  TSkeletonData = Record
+    InputFile,
+    OutputFile,
+    PackageName,
+    AdditionalOptions : String;
+    DisableArguments,
+    DisableResults,
+    DisablePrivate,
+    DisableProtected,
+    DisableSeeAlso,
+    DisableErrors : Boolean;
+  end;
+  PSkeletonData = ^TSkeletonData;
+
+Procedure TMainForm.GetSkeletonData(Sender : TFPGtkWindow;Data : Pointer; Action : Integer;Initiator : TFPGtkObject);
+
+begin
+  With (Sender as TMakeSkelForm), PSkeletonData(Data)^ do
+    begin
+    InputFile:=FInputFile.FileName;
+    OutputFile:=FOutputFile.FileName;
+    PackageName:=FPackageName.Text;
+    AdditionalOptions:=FadditionalOptions.Text;
+    DisableArguments:=FDisableArguments.Active;
+    DisableResults:=FDisableResults.Active;
+    DisablePrivate:=FDisablePrivate.Active;
+    DisableProtected:=FDisableProtected.Active;
+    DisableSeeAlso:=FDisableSeeAlso.Active;
+    DisableErrors:=FDisableErrors.Active;
+    end;
+end;
+
+Function CreateSkeletonFile(Const S : TSkeletonData) : Boolean;
+
+Var
+  Cmd : String;
+
+begin
+  With S do
+    begin
+    cmd:='makeskel ';
+    cmd:=cmd+format('--input=''%s %s''',[Inputfile,Additionaloptions]);
+    cmd:=cmd+' --output='+OutputFile;
+    cmd:=cmd+' --package='+PackageName;
+    If DisableErrors then
+      cmd:=cmd+' --disable-errors';
+    If DisableSeeAlso then
+      cmd:=cmd+' --disable-seealso';
+    If DisableProtected then
+      cmd:=cmd+' --disable-protected'
+    else if DisablePrivate then
+      cmd:=cmd+' --disable-private';
+    If DisableResults then
+      cmd:=cmd+' --disable-function-results';
+    If DisableArguments then
+      cmd:=cmd+' --disable-arguments';
+    Writeln(cmd);
+    With TProcess.Create(Nil) do
+      try
+        CommandLine:=cmd;
+        options:=[poWaitOnExit];
+        Execute;
+        If (ExitStatus<>0) then
+          begin
+          If FileExists(OutputFile) then
+            Result:=MessageDlg(SSkelErrorWithFile,[ExitStatus],mtWarning,mbYesNo,0)=mrYes
+          else
+            begin
+            MessageDlg(SSkelErrorWithoutFile,[ExitStatus],mtError,[mbOk],0);  
+            Result:=False;
+            end;
+          end
+        else  
+          Result:=FileExists(OutputFile);
+      finally
+        Free;
+      end;
+    end;
+end;
+
+
+  
+Procedure TMainForm.FileNewFromFileClick(Sender : TFPGtkObject; Data : Pointer);
+
+Var
+  SkeletonData : TSkeletonData;
+  CmdLine : String;
+  
+begin
+  With TMakeSkelform.Create do
+    begin
+    Title:=SMakeSkelFromSource;
+    If Execute(Nil,@SkeletonData,@GetSkeletonData)=drOK Then
+      If CreateSkeletonFile(SkeletonData) then
+        OpenFile(SkeletonData.OutPutFile)
+    end;
+end;
+
+Procedure TMainForm.SaveEditor(E : TEditorPage);
+
+begin
+  With E do
+    begin
+    if (FileName=SNewDocument) then
+      SaveEditorAs(E)
+    else
+      SaveToFile(FileName);
+    end;
+end;
+
+Procedure TMainForm.SaveEditorAs(E : TEditorPage);
+
+var
+  fs : TFPgtkFileSelection;
+  FN : String;
+
+begin
+  fs := TFPgtkFileSelection.Create (gtk_window_dialog);
+  FN:='';
+  with fs do
+    begin
+    Title:=SSaveFileTitle;
+    OKButton.ConnectClicked (@(CloseWithResult), inttopointer(drOk));
+    CancelButton.ConnectClicked (@(CloseWindow), nil);
+    FileName:=E.FileName;
+    if execute (nil, @FN, @DialogSetFilename) = drOk then
+      begin
+      IF (FN<>'') then
+        begin
+        If ExtractFileExt(FN)='' then
+          FN:=FN+DefaultExtension;
+        E.SaveToFile(FN);
+        AddToRecent(FN);
+        end;
+      end;
+    end;
+end;
+
+Function TMainForm.CloseEditor(E : TEditorPage) : Boolean;
+
+begin
+  Result:=Not E.Modified;
+  If Not Result then
+    Case MessageDlg(SFileModified,[E.FileName],mtConfirmation,mbYesNoCancel,0) of
+      mrYes : begin
+              SaveEditor(E);
+              E.Free;
+              Result:=True;
+              end;
+      mrNo  : begin
+              E.Free;
+              Result:=True;
+              end;
+    end
+  else
+    E.Free;     
+end;
+
+Procedure TMainForm.FileSaveClick(Sender : TFPGtkObject; Data : Pointer);
+                                                                        
+begin                                                                   
+  If Assigned(CurrentEditor) then
+    SaveEditor(CurrentEditor);
+end;                                                                    
+
+Procedure TMainForm.FileSaveAsClick(Sender : TFPGtkObject; Data : Pointer);
+
+begin
+  If Assigned(CurrentEditor) then
+    SaveEditorAs(CurrentEditor);
+end;
+
+
+Procedure TMainForm.FileExitClick(Sender : TFPGtkObject; Data : Pointer);
+
+begin
+  If AllowClose then
+    Close;//(Sender,Data);
+end;
+
+
+Procedure TMainForm.FileCloseClick(Sender : TFPGtkObject; Data : Pointer);
+
+begin
+  If Assigned(CurrentEditor) then
+    CloseEditor(CurrentEditor)
+  else
+    Writeln('No current editor to close')  ;
+end;
+
+Function TMainForm.Currenteditor : TEditorPage;
+
+begin
+  With FPages do
+    Result:=(Page as TEditorPage);
+end;
+
+Procedure TMainForm.GetNodeData(Sender : TFPGtkWindow;Data : Pointer; Action : Integer;Initiator : TFPGtkObject);
+
+type
+  PString = ^AnsiString;
+
+begin
+  With (Sender as TNewNodeForm) do
+    PString(Data)^:=FENodeName.Text;
+end;
+
+
+Procedure TMainForm.InsertNodeClick(Sender : TFPGtkObject; Data : Pointer);
+
+Var
+  S : AnsiString;
+  Nt : TNodeType;     
+
+begin
+  If (CurrentEditor<>Nil) then
+    begin
+    With TNewNodeForm.Create do
+      begin
+      nt:=TNodeType(Data);
+      S:=SNew+' '+NodeNames[nt];
+      Case nt of
+        ntPackage : S:=S+SForFile+ExtractFileName(CurrentEditor.FileName);
+        ntModule: If (CurrentEditor.CurrentPackage<>Nil) then
+                     S:=S+SForPackage+CurrentEditor.CurrentPackage['name'];
+        ntElement: begin
+                   If (CurrentEditor.CurrentModule<>Nil) then
+                      S:=S+SForModule+CurrentEditor.CurrentModule['name'];
+                   If Assigned(CurrentEditor.CurrentElement) then
+                     FENodeName.Selection:=CurrentEditor.CurrentElement['name'];
+                   end;   
+      end;
+      Title:=S;   
+      S:='';
+      If Execute(Nil,@S,@GetNodeData)=drOK Then
+        Case nt of
+          ntPackage : CurrentEditor.NewPackage(S);
+          ntModule  : CurrentEditor.NewModule(S);
+          ntElement : CurrentEditor.NewElement(S);
+        end;
+      end;  
+    end;
+end;
+
+Procedure TMainForm.TagClick(Sender : TFPGtkObject; Data : Pointer);
+
+begin
+  CurrentEditor.InsertTag(TTagType(Data));
+end;
+
+Type
+  TLinkData = Record
+    LText,LTarget : String;
+  end;
+  PLinkData = ^TLinkData;
+
+  TTableData = Record
+    Cols,Rows : Integer;
+    UseHeader : Boolean;
+  end;
+  PTableData = ^TTableData;
+
+Procedure TMainForm.GetLinkData(Sender : TFPGtkWindow;Data : Pointer; Action : Integer;Initiator : TFPGtkObject);
+
+begin
+  With (Sender as TLinkForm),PlinkData(Data)^ do
+    begin
+    LText:=FlinkText.Text;
+    LTarget:=FLinkTarget.Entry.Text;
+    end;
+end;
+
+Procedure TMainForm.GetTableData(Sender : TFPGtkWindow;Data : Pointer; Action : Integer;Initiator : TFPGtkObject);
+
+begin
+  With (Sender as TTableForm),PTableData(Data)^ do
+    begin
+    Rows:=FTableRows.AsInteger;
+    Cols:=FTableCols.AsInteger;
+    UseHeader:=FUSeHeader.Active;
+    end;
+end;
+
+Procedure TMainForm.LinkClick(Sender : TFPGtkObject; Data : Pointer);
+
+Var
+  LinkData : TLinkData;
+  S : TstringList;
+  L : TFPgtkListItemGroup;
+  
+begin
+  If Assigned(CurrentEditor) then
+    begin
+    L:=TFpGtkListItemGroup.Create;
+    Try
+      S:=TStringList.Create;
+      Try
+        S.Sorted:=True;
+        CurrentEditor.GetElementList(S);
+        L.FillFromList(S);
+      finally
+        S.Free;
+      end;    
+      With TLinkForm.Create do
+        begin
+        Title:=SInsertLink;
+        FLinkText.Text:=CurrentEditor.CurrentSelection;
+        FLinkTarget.List.AppendItems(L);
+        If Execute(Nil,@LinkData,@GetLinkData)=drOK Then
+          With LinkData do
+          CurrentEditor.InsertLink(LTarget,LText);
+        end;
+    finally
+      L.Free;
+    end;  
+    end;
+end;
+
+Procedure TMainForm.TableClick(Sender : TFPGtkObject; Data : Pointer);
+
+Var
+  TableData : TTableData;
+
+begin
+  With TTableForm.Create do
+    begin
+    Title:=SInsertTable;
+    FTableRows.AsInteger:=3;
+    FTableCols.AsInteger:=3;
+    If Execute(Nil,@TableData,@GetTableData)=drOK Then
+      With TableData do
+        CurrentEditor.InsertTable(Cols,Rows,UseHeader);
+    end;
+end;
+
+
+Function TMainForm.AllowClose : Boolean;
+
+Var
+  P : TFPgtkWidget;
+
+begin
+  P:=FPages.Page;
+  Result:=True;
+  While (P<>Nil) and Result do
+    begin
+    Result:=CloseEditor(P as TEditorPage);
+    P:=FPages.Page;
+    end;
+end;
+
+Function TMainForm.OnDeleteEvent(Sender:TFPgtkWidget; Event:PGdkEvent; data:pointer): boolean;
+
+begin
+  Result:=Not AllowClose;
+end;
+
+Procedure TMainForm.OptionsClick(Sender : TFPGtkObject; Data : Pointer);
+
+begin
+  With TOptionsForm.Create do
+    Execute(Nil,Nil,Nil);
+end;
+
+Procedure TMainForm.HelpAboutClick(Sender : TFPGtkObject; Data : Pointer);
+
+begin
+  With TAboutForm.Create do
+    Execute(Nil,Nil,Nil);
+end;
+
+Type
+  TRecentMenuItem = Class (TFPGtkMenuItem)
+    FileName : String;
+  end;
+
+Procedure TMainForm.FileReopen(Sender: TFPGTKObject;data : Pointer);
+
+begin
+  OpenFile((Sender as TRecentMenuItem).FileName);
+end;
+
+
+
+procedure TMainForm.BuildReopenList;
+
+  Function NewRecentMenuItem (Nr : Integer;AFileName : string) : TRecentMenuItem;
+
+  begin
+    If Nr<10 then
+      result := TRecentMenuItem.CreateWithLabel('_'+IntToStr(Nr)+' '+AFileName)
+    else
+      result := TRecentMenuItem.CreateWithLabel(AFileName);
+    result.FileName:=AFileName;
+    Result.ConnectActivate(@FileReopen,Nil);
+  end;
+
+var I : integer;
+    mi : TFPgtkMenuItem;
+
+begin
+  with FRecent do
+    begin
+    with FFileRecent do
+      begin
+      if assigned(SubMenu) then
+        SubMenu.Free;
+      SubMenu := TFPgtkMenu.Create;
+      with (submenu as TFPgtkMenu) do
+        for I := FRecent.count-1 downto 0 do
+          begin
+          mi := NewRecentMenuItem (I,FRecent[I]);
+          Append (mi);
+          end;
+      end;
+    end;
+end;
+
+end.

+ 198 - 0
utils/fpdoc/fpde/frmmakeskel.pp

@@ -0,0 +1,198 @@
+{$mode objfpc}
+{$h+}
+
+unit frmmakeskel;
+
+interface
+
+uses fpgtk,fpgtkext,gtk,classes,sysutils;
+
+Type
+  TMakeSkelForm = Class (TFPGtkWindow)
+    FTable : TFPGtkTable;
+    FInputFile,
+    FOutputFile : TFPgtkFileEntry;
+    FPackageName,
+    FAdditionalOptions : TFPgtkEntry;
+    FDisableArguments,
+    FDisableResults,
+    FDisableSeeAlso,
+    FDisableProtected,
+    FDisablePrivate,
+    FDisableErrors : TFPGtkToggleButton;
+    FLInputFile,
+    FLOutPutfile,
+    FLPackageName,
+    FLAdditionalOptions,
+    FLDisableArguments,
+    FLDisableResults,
+    FLDisableSeeAlso,
+    FLDisableProtected,
+    FLDisablePrivate,
+    FLDisableErrors : TFPGtkLabel;
+    FDisableFrame : TFPgtkFrame;
+    FDisableTable : TFPgtkTable;
+    FSeparator : TFPGtkHSeparator;
+    FVBox : TFPgtkVBox;
+    FOK,
+    FCancel : TFPGtkButton;
+    FButtonBox: TFPgtkHBox;
+    Constructor Create;
+    Procedure CreateWindow;
+    Procedure OnShow(Sender : TFpGtkObject;Data : Pointer);
+    Procedure OnOKClick(Sender : TFpGtkObject;Data : Pointer);
+  end;
+  
+Implementation
+
+resourcestring
+  SDisableCode = 'Do not generate nodes for';
+  SArguments = 'Function arguments';
+  SResults = 'Function results';
+  SProtected = 'Protected class members';
+  SPrivate = 'Private class members';
+  SSeeAlso = 'See also section';
+  SErrors = 'Errors section';
+  SInputfile = 'Input file';
+  SOutputFile = 'Output file';
+  SPackageName = 'Package name';
+  SAdditionalOptions = 'Additional options';
+  SOK = 'OK';
+  SCancel = 'Cancel';
+  SNeedInputFileName = 'An input filename is required.';
+  SNeedOutputFileName = 'An output filename is required.';
+  SNeedPackageName  = 'A package name is required.';
+  
+Constructor TMakeSkelForm.Create;
+
+begin
+  Inherited Create(GTK_WINDOW_DIALOG);
+  CreateWindow;
+end;
+
+Procedure TMakeSkelForm.CreateWindow;
+
+Var
+  OH,OV : TgtkAttachOPtions;
+  
+  Function CreateToggle : TFPgtkToggleButton;
+  
+  begin
+    Result:=TFPgtkToggleButton.Create;
+    Result.SetUsize(14,14);
+  end;
+   
+  Function CreateLLabel(S : String) : TFPgtkLabel;
+  
+  begin
+    Result:=TFPgtkLabel.Create(S);
+    Result.Justify:=GTK_JUSTIFY_LEFT;
+  end;
+  
+  Function CreateRLabel(S : String) : TFPgtkLabel;
+  
+  begin
+    Result:=TFPgtkLabel.Create(S);
+    Result.Justify:=GTK_JUSTIFY_RIGHT;
+  end;
+  
+begin
+  FVBox:=TFPGtkVBox.Create;
+  FVBox.Spacing:=4;
+  FVBox.Border:=8;
+  Add(FVBox);
+  // input options table area
+  FTable:=TFPGtkTable.Create(2,4);
+  FLInputFile:=CreateRLabel(SInputFile);
+  FInputFile:=TFPgtkFileEntry.Create;
+  FLOutputFile:=CreateRLabel(SOutputFile);
+  FOutputFile:=TFPgtkFileEntry.Create;
+  FLAdditionalOptions:=CreateRLabel(SAdditionalOptions);
+  FAdditionalOptions:=TFPgtkEntry.Create;
+  FLPackageName:=CreateRLabel(SPackageName);
+  FPackageName:=TFPgtkEntry.Create;
+  // Pack in table.
+  OH:=GTK_EXPAND or GTK_FILL;
+  With FTable do
+    begin
+    Attach(FLInputFile,0,1,0,1,GTK_FILL,0,4,4);
+    Attach(FLOutputFile,0,1,1,2,GTK_FILL,0,4,4);
+    Attach(FLPackageName,0,1,2,3,GTK_FILL,0,4,4);
+    Attach(FLAdditionalOptions,0,1,3,4,GTK_FILL,0,4,4);
+    Attach(FInputFile,1,2,0,1,OH,0,4,4);
+    Attach(FOutputFile,1,2,1,2,OH,0,4,4);
+    Attach(FPackageName,1,2,2,3,OH,0,4,4);
+    Attach(FAdditionalOptions,1,2,3,4,OH,0,4,4);
+    end;
+  FDisableArguments:=CreateToggle;
+  FDisableResults:=CreateToggle;
+  FDisableSeeAlso:=CreateToggle;
+  FDisableProtected:=CreateToggle;
+  FDisablePrivate:=CreateToggle;
+  FDisableErrors:=CreateToggle;
+  FLDisableArguments:=CreateLLabel(SArguments);
+  FLDisableResults:=CreateLLabel(SResults);
+  FLDisableSeeAlso:=CreateLLabel(SSeeAlso);
+  FLDisableProtected:=CreateLLabel(SProtected);
+  FLDisablePrivate:=CreateLLabel(SPrivate);
+  FLDisableErrors:=CreateLLabel(SErrors);
+  FDisableTable:=TFPgtkTable.Create(2,6);
+  With FDisableTable do
+    begin
+    // Checks
+    Attach(FDisableArguments   ,0,1,0,1,0,GTK_FILL,4,4);
+    Attach(FDisableResults     ,0,1,1,2,0,GTK_FILL,4,4);
+    Attach(FDisableProtected   ,0,1,2,3,0,GTK_FILL,4,4);
+    Attach(FDisablePrivate     ,0,1,3,4,0,GTK_FILL,4,4);
+    Attach(FDisableErrors      ,0,1,4,5,0,GTK_FILL,4,4);
+    Attach(FDisableSeeAlso     ,0,1,5,6,0,GTK_FILL,4,4);
+    // Labels
+    Attach(FLDisableArguments  ,1,2,0,1,GTK_FILL,0,4,4);
+    Attach(FLDisableResults    ,1,2,1,2,GTK_FILL,0,4,4);
+    Attach(FLDisableProtected  ,1,2,2,3,GTK_FILL,0,4,4);
+    Attach(FLDisablePrivate    ,1,2,3,4,GTK_FILL,0,4,4);
+    Attach(FLDisableErrors     ,1,2,4,5,GTK_FILL,0,4,4);
+    Attach(FLDisableSeeAlso    ,1,2,5,6,GTK_FILL,0,4,4);
+    end;
+  FDisableFrame:=TFpgtkFrame.Create;
+  FDisableFrame.Text:=SDisableCode;
+  FDisableFrame.Add(FDisableTable);
+  // button area
+  FOK:=TFpGtkButton.CreateWithLabel(SOK);
+  FOK.ConnectClicked(@OnOkCLick,Nil);
+  FCancel:=TFPgtkButton.CreateWithLabel(SCancel);
+  FCancel.ConnectCLicked(@CloseWithResult,IntToPointer(drCancel));
+  FSeparator:=TFPgtkHSeparator.Create;
+  FButtonBox:=TfpGtkHBox.Create;
+  FButtonBox.Spacing:=4;
+  FButtonBox.PackEnd(FOK,false,false,4);
+  FButtonBox.PackEnd(FCancel,false,false,4);
+  // Add to window
+  FVBox.PackStart(FTable,False,False,0);
+  FVBox.PackStart(FDisableFrame,False,False,4);
+  FVBox.PackStart(FSeparator,False,False,4);
+  FVBox.PackStart(FButtonBox,false,false,0);
+  // Some events;
+  ConnectShow(@OnShow,Nil);
+end;
+
+Procedure TMakeSkelForm.OnShow(Sender : TFpgtkObject; Data : Pointer);
+
+begin
+  FocusedWidget(FInputFile.Edit);
+end;
+
+Procedure TMakeSkelForm.OnOkClick(Sender : TFpgtkObject; Data : Pointer);
+
+begin
+  If (FInputFile.FileName='') then
+    MessageDlg(SNeedInputFileName,mtError,[mbOk],0)
+  else If (FOutPutFile.FileName='') then
+    MessageDlg(SNeedOutPutFileName,mtError,[mbOk],0)
+  Else if (FPackageName.Text='') then
+    MessageDlg(SNeedPackageName,mtError,[mbOk],0)
+  else     
+    CloseWithResult(Sender,IntToPointer(drOK));
+end;
+    
+end.  

+ 81 - 0
utils/fpdoc/fpde/frmnewnode.pp

@@ -0,0 +1,81 @@
+{$mode objfpc}
+{$h+}
+
+unit frmnewnode;
+
+interface
+
+uses fpgtk,gtk,classes,sysutils;
+
+Type
+  TNewNodeForm = Class (TFPGtkWindow)
+    FTable : TFPGtkTable;
+    FLENodeName : TFPGtkLabel;
+    FENodeName : TFPGtkEntry;
+    FSeparator : TFPGtkHSeparator;
+    FVBox : TFPgtkVBox;
+    FOK,
+    FCancel : TFPGtkButton;
+    FButtonBox: TFPgtkHBox;
+    Constructor Create;
+    Procedure CreateWindow;
+    Procedure OnShow(Sender : TFpGtkObject;Data : Pointer);
+  end;
+  
+Implementation
+
+uses 
+  fpdemsg;
+  
+Constructor TNewNodeForm.Create;
+
+begin
+  Inherited Create(GTK_WINDOW_DIALOG);
+  CreateWindow;
+end;
+
+Procedure TNewNodeForm.CreateWindow;
+
+Var
+  OH,OV : TgtkAttachOPtions;
+  
+begin
+  FVBox:=TFPGtkVBox.Create;
+  FVBox.Spacing:=4;
+  FVBox.Border:=8;
+  Add(FVBox);
+  // Table area
+  FTable:=TFPGtkTable.Create(1,1);
+  FLENodeName:=TFPGtkLabel.Create(SName);
+  FLENodeName.Justify:=GTK_JUSTIFY_RIGHT;
+  FENodeName:=TFPgtkEntry.Create;
+  FENodeName.GrabFocus;
+  OH:=GTK_EXPAND or GTK_FILL;
+  FTable.Attach(FLENodeName,0,1,0,1,0,GTK_FILL,4,4);
+  FTable.Attach(FENodeName,1,2,0,1,OH,0,4,4);
+  // button area
+  FOK:=TFpGtkButton.CreateWithLabel(SOK);
+  FOK.ConnectClicked(@CloseWithResult,IntToPointer(drOK));
+  FCancel:=TFPgtkButton.CreateWithLabel(SCancel);
+  FCancel.ConnectCLicked(@CloseWithResult,IntToPointer(drCancel));
+  FSeparator:=TFPgtkHSeparator.Create;
+  FButtonBox:=TfpGtkHBox.Create;
+  FButtonBox.Spacing:=4;
+  FButtonBox.PackEnd(FOK,false,false,4);
+  FButtonBox.PackEnd(FCancel,false,false,4);
+  // Add to window
+  FVBox.PackStart(FTable,False,False,0);
+  FVBox.PackStart(FSeparator,False,False,4);
+  FVBox.PackStart(FButtonBox,false,false,0);
+  // Some events;
+  ConnectShow(@OnShow,Nil);
+end;
+
+Procedure TNewNodeForm.OnShow(Sender : TFpgtkObject; Data : Pointer);
+
+begin
+  FocusedWidget(FENodeName);
+end;
+
+
+end.  

+ 169 - 0
utils/fpdoc/fpde/frmoptions.pp

@@ -0,0 +1,169 @@
+{$mode objfpc}
+{$h+}
+
+unit frmoptions;
+
+interface
+
+uses fpgtk,gtk,classes,sysutils;
+
+Type
+  TOptionsForm = Class (TFPGtkWindow)
+    FTable : TFPGtkTable;
+    FLCreateBackup,
+    FLSkipEmptyNodes,
+    FLConfirmDelete,
+    FLMaxRecentUsed,
+    FLbackupExtension,
+    FLDefaultExtension : TFPGtkLabel;
+    FCreateBackup,
+    FSkipEmptyNodes,
+    FConfirmDelete : TFPGtkToggleButton;
+    FBackupExtension,
+    FDefaultExtension : TFPGtkEntry;
+    FMaxRecentUsed : TFPGtkSpinButton;
+    FSeparator : TFPGtkHSeparator;
+    FVBox : TFPgtkVBox;
+    FHBox : TFPgtkHBox;
+    FOK,
+    FCancel : TFPGtkButton;
+    FButtonBox: TFPgtkHBox;
+    Constructor Create;
+    Procedure CreateWindow;
+    Procedure OnShow(Sender : TFpGtkObject;Data : Pointer);
+    Procedure SaveResult(Sender : TFpGtkObject;Data : Pointer);
+    Procedure OptionsToForm;
+    Procedure FormToOptions;
+  end;
+  
+Implementation
+
+uses fpdemsg,fpdeopts;
+
+Function MakeLabel(Caption : String) : TFPgtkLabel;
+
+begin
+  Result:=TFPGtkLabel.Create(Caption);
+  Result.Justify:=GTK_JUSTIFY_RIGHT;
+end;
+
+Function MakeCheck : TFPgtkToggleButton;
+
+begin
+  Result:=TFPgtkToggleButton.create;
+  Result.SetUsize(14,14);
+end;
+
+
+Constructor TOptionsForm.Create;
+
+begin
+  Inherited Create(GTK_WINDOW_DIALOG);
+  CreateWindow;
+end;
+
+Function PackBox(W : TFpGtkWidget) : TFpGtkHbox;
+
+begin 
+  Result:=TFPGtkHBox.Create;
+  Result.PackStart(W,True,False,0);
+end;
+
+
+Procedure ToptionsForm.CreateWindow;
+
+Var
+  OH,OV : TgtkAttachOPtions;
+  B : TfpgtkHbox;
+    
+begin
+  FVBox:=TFPGtkVBox.Create;
+  FVBox.Spacing:=4;
+  FVBox.Border:=8;
+  Add(FVBox);
+  // Table area
+  FTable:=TFPGtkTable.Create(2,6);
+  FLCreateBackup:=MakeLabel(SOptCreateBackup);
+  FLSkipEmptyNodes:=MakeLabel(SOptSkipEmptyNodes);
+  FLConfirmDelete:=MakeLabel(SOptConfirmDelete);
+  FLbackupExtension:=MakeLabel(SOptBackupExtension);
+  FLDefaultExtension:=MakeLabel(SOptDefaultExtension);
+  FLMaxRecentUsed:=MakeLabel(SOptMaxRecentUsed);
+  FCreateBackup:=MakeCheck;
+  FSkipEmptyNodes:=MakeCheck;
+  FConfirmDelete:=MakeCheck;
+  FBackupExtension:=TFpGtkEntry.Create;
+  FDefaultExtension:=TFpGtkEntry.Create;
+  FMaxRecentUsed:=TFPGtkSpinButton.Create;
+  FMaxRecentUsed.Adjustment.Upper:=32;
+  OH:=GTK_EXPAND or GTK_FILL;
+  FTable.Attach(FLConfirmDelete    ,0,1,0,1,GTK_FILL,0,4,4);
+  FTable.Attach(FLSkipEmptyNodes   ,0,1,1,2,GTK_FILL,0,4,4);
+  FTable.Attach(FLCreatebackup     ,0,1,2,3,GTK_FILL,0,4,4);
+  FTable.Attach(FLBackupExtension  ,0,1,3,4,GTK_FILL,0,4,4);
+  FTable.Attach(FLDefaultExtension ,0,1,4,5,GTK_FILL,0,4,4);
+  FTable.Attach(FLMaxrecentUSed    ,0,1,5,6,GTK_FILL,0,4,4);
+  
+  FTable.Attach(PackBox(FConfirmDelete)  ,1,2,0,1,0,GTK_FILL,4,4);
+  FTable.Attach(PackBox(FSkipEmptyNodes) ,1,2,1,2,0,GTK_FILL,4,4);
+  FTable.Attach(PackBox(FCreatebackup)   ,1,2,2,3,0,GTK_FILL,4,4);
+  FTable.Attach(FBackupExtension         ,1,2,3,4,0,GTK_FILL,4,4);
+  FTable.Attach(FDefaultExtension        ,1,2,4,5,0,GTK_FILL,4,4);
+  FTable.Attach(FMaxRecentUsed           ,1,2,5,6,0,GTK_FILL,4,4);
+  
+  // button area
+  FOK:=TFpGtkButton.CreateWithLabel(SOK);
+  FOK.ConnectClicked(@SaveResult,Nil);
+  FCancel:=TFPgtkButton.CreateWithLabel(SCancel);
+  FCancel.ConnectCLicked(@CloseWithResult,IntToPointer(drCancel));
+  FSeparator:=TFPgtkHSeparator.Create;
+  FButtonBox:=TfpGtkHBox.Create;
+  FButtonBox.Spacing:=4;
+  FButtonBox.PackEnd(FOK,false,false,4);
+  FButtonBox.PackEnd(FCancel,false,false,4);
+  // Add to window
+  FVBox.PackStart(FTable,False,False,0);
+  FVBox.PackStart(FSeparator,False,False,4);
+  FVBox.PackStart(FButtonBox,false,false,0);
+  // Some events;
+  ConnectShow(@OnShow,Nil);
+end;
+
+Procedure TOptionsForm.OnShow(Sender : TFpgtkObject; Data : Pointer);
+
+begin
+  OptionsToForm;
+  FocusedWidget(FConfirmDelete);
+end;
+
+Procedure TOptionsForm.SaveResult(Sender : TFpgtkObject; Data : Pointer);
+
+begin
+  FormToOptions;
+  CloseWithResult(Sender,IntToPointer(drOK));
+end;  
+
+Procedure TOptionsForm.OptionsToForm;
+
+begin
+  FCreateBackup.Active:=CreateBackup;
+  FSkipEmptyNodes.Active:=SkipEmptyNodes;
+  FConfirmDelete.Active:=ConfirmDelete;
+  FBackupExtension.Text:=BackupExtension;
+  FDefaultExtension.Text:=DefaultExtension;
+  FMaxRecentUsed.AsInteger:=MaxRecentUsed;
+end;
+
+Procedure TOptionsForm.FormToOptions;
+
+begin
+  CreateBackup:=FCreateBackup.Active;
+  SkipEmptyNodes:=FSkipEmptyNodes.Active;
+  ConfirmDelete:=FConfirmDelete.Active;
+  BackupExtension:=FBackupExtension.Text;
+  DefaultExtension:=FDefaultExtension.Text;
+  MaxRecentUsed:=FMaxRecentUsed.AsInteger;
+  SaveOptions;
+end;
+
+end.

+ 97 - 0
utils/fpdoc/fpde/frmtable.pp

@@ -0,0 +1,97 @@
+{$mode objfpc}
+{$h+}
+
+unit frmtable;
+
+interface
+
+uses fpgtk,gtk,classes,sysutils;
+
+Type
+  TTableForm = Class (TFPGtkWindow)
+    FTable : TFPGtkTable;
+    FLTableRows,
+    FLTableCols,
+    FLUseHeader : TFPGtkLabel;
+    FTableRows,
+    FTableCols : TFPGtkSpinButton;
+    FUseHeader : TFPGtkToggleButton;
+    FSeparator : TFPGtkHSeparator;
+    FVBox : TFPgtkVBox;
+    FHBox : TFPgtkHBox;
+    FOK,
+    FCancel : TFPGtkButton;
+    FButtonBox: TFPgtkHBox;
+    Constructor Create;
+    Procedure CreateWindow;
+    Procedure OnShow(Sender : TFpGtkObject;Data : Pointer);
+  end;
+  
+Implementation
+
+uses fpdemsg;
+
+Constructor TTableForm.Create;
+
+begin
+  Inherited Create(GTK_WINDOW_DIALOG);
+  CreateWindow;
+end;
+
+Procedure TTableForm.CreateWindow;
+
+Var
+  OH,OV : TgtkAttachOPtions;
+  
+begin
+  FVBox:=TFPGtkVBox.Create;
+  FVBox.Spacing:=4;
+  FVBox.Border:=8;
+  Add(FVBox);
+  // Table area
+  FTable:=TFPGtkTable.Create(2,3);
+  FLTableRows:=TFPGtkLabel.Create(STableRows);
+  FLTableRows.Justify:=GTK_JUSTIFY_RIGHT;
+  FLTableCols:=TFPGtkLabel.Create(STableCols);
+  FLTableCols.Justify:=GTK_JUSTIFY_RIGHT;
+  FLUseHeader:=TFPGtkLabel.Create(STableHeader);
+  FLUseHeader.Justify:=GTK_JUSTIFY_RIGHT;
+  FTableRows:=TFPGtkSpinButton.Create;
+  FTableCols:=TFPGtkSpinButton.Create;
+  FUSeHeader:=TFPgtkToggleButton.Create;
+  FUseHeader.SetUSize(14,14);
+  FHBox:=TFPgtkHBox.Create;
+  FHBox.PackStart(FuseHeader,True,False,0);
+  OH:=GTK_EXPAND or GTK_FILL;
+  FTable.Attach(FLTableRows,0,1,0,1,0,GTK_FILL,4,4);
+  FTable.Attach(FLTableCols,0,1,1,2,0,GTK_FILL,4,4);
+  FTable.Attach(FLUseHeader,0,1,2,3,0,GTK_FILL,4,4);
+  FTable.Attach(FTableRows,1,2,0,1,OH,0,4,4);
+  FTable.Attach(FTableCols,1,2,1,2,OH,0,4,4);
+  FTable.Attach(FHBox,1,2,2,3,0,GTK_FILL,4,4);
+  // button area
+  FOK:=TFpGtkButton.CreateWithLabel(SOK);
+  FOK.ConnectClicked(@CloseWithResult,IntToPointer(drOK));
+  FCancel:=TFPgtkButton.CreateWithLabel(SCancel);
+  FCancel.ConnectCLicked(@CloseWithResult,IntToPointer(drCancel));
+  FSeparator:=TFPgtkHSeparator.Create;
+  FButtonBox:=TfpGtkHBox.Create;
+  FButtonBox.Spacing:=4;
+  FButtonBox.PackEnd(FOK,false,false,4);
+  FButtonBox.PackEnd(FCancel,false,false,4);
+  // Add to window
+  FVBox.PackStart(FTable,False,False,0);
+  FVBox.PackStart(FSeparator,False,False,4);
+  FVBox.PackStart(FButtonBox,false,false,0);
+  // Some events;
+  ConnectShow(@OnShow,Nil);
+end;
+
+Procedure TTableForm.OnShow(Sender : TFpgtkObject; Data : Pointer);
+
+begin
+  FocusedWidget(FTableRows);
+end;
+
+
+end.  

+ 1541 - 0
utils/fpdoc/fpde/pgeditor.pp

@@ -0,0 +1,1541 @@
+{$mode objfpc}
+{$h+}
+
+unit pgEditor;
+
+interface
+
+uses SysUtils,Classes,gdk,fpgtk,gtk,fpgtkext,dom,xmlread,xmlwrite;
+
+Type
+  TTagType = (ttBold,ttItalic,ttUnderline,ttParagraph,ttVariable,ttRemark,
+              ttNumberedList,ttUnnumberedList,ttListItem,ttTable,ttRow,
+              ttCell,TTHeader,ttPre,ttCode,ttLink,ttFile);
+
+  TNodeTreeItem = Class(TFPGtkTreeItem)
+  Private
+    Fnode : TDomElement;
+  Public
+    Constructor Create (ANode : TDomElement); virtual;
+    Property Node : TDomElement Read Fnode;
+  end;
+
+  TModuleTreeItem = Class(TNodeTreeItem);
+
+  TPackageTreeItem = Class(TNodeTreeItem)
+  Private
+    HaveSubTree : Boolean;
+  Public
+    Procedure CheckSubTree;
+  end;
+
+  TNodeSelectEvent = Procedure (Sender : TObject; Node : TDomElement) Of Object;
+  
+  TPackageEditor = Class(TFPGtkVPaned)
+  Private
+    FCurrentPackage,
+    FCurrentElement,
+    FCurrentModule : TDomElement;
+    FOnSelectElement,
+    FOnSelectPackage,
+    FOnSelectionChanged,
+//    FOnDeSelectElement,
+    FOnSelectModule : TNodeSelectEvent;
+    FDescriptionNode : TDomNode;
+    FModuleTree : TFPGtkScrollTree;
+    FElementTree : TFPGtkScrollTree;
+    FModuleNode : TNodeTreeItem;
+    FModified : Boolean;
+    PMMenu : TFPgtkMenu;
+    PMNode : TNodeTreeItem;
+    FRenameMenu,
+    FDeleteMenu : TFPgtkMenuItem;
+    Procedure MenuRenameClick(Sender : TFPGtkWidget; Data : Pointer);
+    Procedure MenuDeleteClick(Sender : TFPGtkWidget; Data : Pointer);
+    Function  PopupModuleMenu(Sender:TFPgtkWidget; Event:PGdkEventButton; data:pointer): boolean;
+    Procedure SelectModule(Sender : TFPGtkWidget; Data : Pointer);
+    Procedure SelectPackage(Sender : TFPGtkWidget; Data : Pointer);
+    Procedure SelectElement(Sender : TFPGtkWidget; Data : Pointer);
+//    Procedure DeSelectElement(Sender : TFPGtkWidget; Data : Pointer);
+//    Procedure DoSelectionChanged(Sender : TFPGtkWidget; Data : Pointer);
+    Procedure ShowModuleElements(Module : TDomElement);
+    Procedure SetCurrentModule(Value : TDomElement);
+    Procedure SetCurrentPackage(Value : TDomElement);
+    Function  FindPackageNode(P : TDomElement) : TNodeTreeItem;
+    Function  FindModuleNodeInNode(M : TDomElement; N : TNodeTreeItem) : TNodeTreeItem;
+    Function  FindElementNode(E : TDomElement; N : TNodeTreeItem) : TNodeTreeItem;
+    Procedure SetCurrentElement(E : TDomElement);
+    Function  CreateElementNode(E : TDomelement) : TNodeTreeItem;
+    Procedure DeletePackage(N : TNodeTreeItem);
+    Procedure DeleteModule(N : TNodeTreeItem);
+    Procedure DeleteElement(N : TNodeTreeItem);
+    Procedure RenamePackage(N : TNodeTreeItem);
+    Procedure RenameModule(N : TNodeTreeItem);
+    Procedure RenameElement(N : TNodeTreeItem);
+    Function  GetSelectedNode : TNodeTreeItem;
+    Procedure GetNameData(Sender : TFPGtkWindow;Data : Pointer; Action : Integer;Initiator : TFPGtkObject);
+    Function  NewName(ATitle : String;Var AName : String) : Boolean;
+    Procedure ClearElements;
+  Public
+    Constructor Create;
+    Procedure SetDescriptionNode (Value : TDomNode);
+    Procedure Refresh;
+    Procedure AddElement(E : TDomElement);
+    Procedure DeletePackage(P : TDomElement);
+    Procedure DeleteModule(M : TDomElement);
+    Procedure DeleteElement(E : TDomElement);
+    Procedure RenamePackage(P : TDomElement);
+    Procedure RenameModule(M : TDomElement);
+    Procedure RenameElement(E : TDomElement);
+    Property ModuleTree : TFPGtkScrollTree Read FModuleTree;
+    Property ElementTree : TFPGtkScrollTree Read FElementTree;
+    Property DescriptionNode : TDomNode Read FDescriptionNode Write SetDescriptionNode;
+    Property OnSelectModule : TNodeSelectEvent Read FOnSelectModule Write FOnSelectmodule;
+    Property OnSelectPackage : TNodeSelectEvent Read FOnSelectPackage Write FOnSelectPackage;
+//    Property OnDeSelectElement : TNodeSelectEvent Read FOnDeSelectElement Write FOnDeSelectElement;
+    Property OnSelectElement : TNodeSelectEvent Read FOnSelectElement Write FOnSelectElement;
+//    Property OnSelectionChanged : TNodeSelectEvent Read FOnSelectionChanged Write FOnSelectionChanged;
+    Property CurrentPackage : TDomElement Read FCurrentPackage Write SetCurrentPackage;
+    Property CurrentModule : TDomElement Read FCurrentModule Write SetCurrentModule;
+    Property CurrentElement: TDomElement Read FCurrentElement  Write SetCurrentElement;
+    Property Modified : Boolean Read FModified Write FModified;
+  end;
+
+  TElementEditor = Class(TFPGtkVBox)
+  Private
+    FShortNode,
+    FDescrNode,
+    FErrorsNode,
+    FSeeAlsoNode,
+    Felement : TDomElement;
+    FLabel  : TFPGtkLabel;
+    FShortEntry : TFPGtkEntry;
+    FDescrMemo,
+    FErrorsMemo,
+    FSeeAlsoMemo : TFPGtkScrollText;
+    FCurrentEditable : TFPGtkEditable;
+    FModified : Boolean;
+    Procedure GetNodes;
+    Procedure SetElement (Value : TDomElement);
+    Function CurrentEditable : TFPGtkEditable;
+    Function OnEditableFocusIn(Sender : TFPGtkWidget; Event : PGDKEventFocus;Data : Pointer) : Boolean;
+    Function GetCurrentSelection : String;
+    Procedure OnTextModified(Sender : TFPGtkWidget; Data : Pointer);
+  Public
+    Procedure Refresh;
+    Constructor Create;
+    Function  TestSave(S : String) : Boolean;
+    Function  CurrentXML : String;
+    Function  Save : Boolean;
+    Procedure DeleteElement;
+    Procedure InsertTag (tagName : String);
+    Procedure InsertTag (TagType : TTagType);
+    Procedure InsertLink(LinkTarget,LinkText : String);
+    Procedure InsertTable(Cols,Rows : Integer; UseHeader : Boolean);
+    Property  Element : TDomElement Read FElement Write SetElement;
+    Property CurrentSelection : String Read GetCurrentSelection;
+    Property Modified : Boolean Read FModified Write FModified;
+  end;
+
+
+  TEditorPage = Class(TFPGtkHPaned)
+  Private
+    FChangingSelection : Boolean;
+    FFileNameLabel : TFpGtkLabel;
+    FDocument : TXMLDocument;
+    FPackages : TPackageEditor;
+    FElement : TElementEditor;
+    FFileNAme : String;
+    Procedure ElementSelected(Sender : TObject; Node : TDomElement) ;
+//    Procedure SelectionChanged(Sender : TFPgtkWidget; Node : TDomElement) ;
+//    Procedure ElementDeSelected(Sender : TObject; Node : TDomElement) ;
+    Function GetCurrentSelection : String;
+    Function GetCurrentPackage : TDomElement;
+    Function GetCurrentModule : TDomElement;
+    Function GetCurrentElement : TDomElement;
+    Procedure SetCurrentModule(Value : TDomElement);
+    Procedure SetCurrentPackage(Value : TDomElement);
+    Procedure SetCurrentElement(Value : TDomElement);
+    Procedure SetModified(Value : Boolean);
+    Function  GetModified : Boolean;
+    Function MakeBackup(FN : String) : Boolean;
+  Public
+    Constructor Create;
+    Function  FirstPackage : TDomElement;
+    Function  FirstModule(APackage : TDomElement) : TDomElement;
+    Procedure DisplayDocument;
+    Procedure ClearDocument;
+    Procedure LoadFromFile(FN : String);
+    Procedure LoadFromStream(S : TStream);
+    Procedure SaveToFile(FN : String);
+    Procedure SetFileName(FN : String);
+    Procedure InsertTag(TagType : TTagType);
+    Procedure InsertLink(LinkTarget,LinkText : String);
+    Procedure InsertTable(Cols,Rows : Integer; UseHeader : Boolean);
+    Procedure NewPackage(APackageName : String);
+    Procedure NewModule(AModuleName : String);
+    Procedure NewElement(AElementName : String);
+    Procedure GetElementList(List : TStrings);
+    Property FileName : String Read FFileName;
+    Property CurrentSelection : String Read GetCurrentSelection;
+    Property CurrentPackage : TDomElement Read GetCurrentPackage Write SetCurrentPackage;
+    Property CurrentModule : TDomElement Read GetCurrentModule Write SetCurrentModule;
+    Property CurrentElement : TDomElement Read GetCurrentElement Write SetCurrentElement;
+    Property FileNameLabel : TFPgtkLabel Read FFileNameLabel Write FFileNameLabel;
+    Property Modified : Boolean Read GetModified Write SetModified;
+  end;
+
+Const
+  TagNames : Array[TTagType] of string = ('b','i','u','p','var','remark',
+              'ol','ul','li','table','tr',
+              'td','th','pre','code','link','file'
+  );
+
+  
+implementation
+
+uses fpdemsg,frmnewnode,fpdeopts;
+
+{ ---------------------------------------------------------------------
+  TElementEditor
+  ---------------------------------------------------------------------}
+
+  
+Constructor TElementEditor.Create;
+
+Var
+  F1,F2 : TFPGtkVPaned;
+  V : TFPgtkVBox;
+  L : TFpGtkLabel;
+
+begin
+  Inherited Create;
+  FLabel:=TFPgtkLabel.Create(SNoElement);
+  PackStart(FLabel,False,false,0);
+  L:=TFPGtkLabel.Create(SShortDescription);
+  V:=TFPGtkVBox.Create;
+  // Short
+  FShortEntry:=TFPGtkEntry.Create;
+//  FShortEntry.ConnectEnterNotify(@OnEnterEditable,Nil);
+//  FShortEntry.ConnectStateChanged(@OnEditableStateChanged,Nil);
+  FShortEntry.ConnectFocusInEvent(@OnEditableFocusIn,Nil);
+  FShortEntry.ConnectChanged(@OnTextModified,Nil);
+  V.PackStart(L,False,False,0);
+  V.PackStart(FShortEntry,True,true,0);
+  PackStart(V,false,false,0);
+  // Errors
+  L:=TFPGtkLabel.Create(SErrors);
+  V:=TFPGtkVBox.Create;
+  FErrorsMemo:=TFPGtkScrollText.Create;
+//  FErrorsMemo.TheText.ConnectEnterNotify(@OnEnterEditable,Nil);
+  FErrorsMemo.TheText.ConnectFocusInEvent(@OnEditableFocusIn,Nil);
+  FErrorsMemo.TheText.ConnectChanged(@OnTextModified,Nil);
+  FErrorsMemo.setusize(400,50);
+  V.PackStart(L,False,False,0);
+  V.PackStart(FErrorsMemo,True,true,0);
+  F2:=TFPGtkVPaned.Create;
+  F2.Pack1(V,True,True);
+  // See Also
+  L:=TFPGtkLabel.Create(SSeeAlso);
+  V:=TFPGtkVBox.Create;
+  FSeeAlsoMemo:=TFPGtkScrollText.Create;
+//  FSeeAlsoMemo.TheText.ConnectEnterNotify(@OnEnterEditable,Nil);
+  FSeeAlsoMemo.TheText.ConnectFocusInEvent(@OnEditableFocusIn,Nil);
+   FSeeAlsoMemo.TheText.ConnectChanged(@OnTextModified,Nil);
+  FSeeAlsoMemo.setusize(400,50);
+  V.PackStart(L,False,False,0);
+  V.PackStart(FSeeAlsoMemo,True,true,0);
+  F2.Pack2(V,False,True);
+  // Descr
+  L:=TFPGtkLabel.Create(SDescription);
+  V:=TFPGtkVBox.Create;
+  FDescrMemo:=TFPGtkScrollText.Create;
+//  FDescrMemo.TheText.ConnectEnterNotify(@OnEnterEditable,Nil);
+  FDescrMemo.TheText.ConnectFocusInEvent(@OnEditableFocusIn,Nil);
+  FDescrMemo.TheText.ConnectChanged(@OnTextModified,Nil);
+  FDescrMemo.setusize(400,150);
+  V.PackStart(L,False,False,0);
+  V.PackStart(FDescrMemo,True,true,0);
+  F1:=TFPGtkVPaned.Create;
+  F1.Pack1(V,True,True);
+  F1.Pack2(F2,False,True);
+  PackStart(F1,true,true,0);
+end;
+
+Procedure TElementEditor.SetElement (Value : TDomElement);
+
+begin
+  If (Value<>FElement) then
+    If not Modified or Save then
+      begin
+      FElement:=Value;
+      Refresh;
+      end;
+end;
+
+Procedure TElementEditor.DeleteElement;
+
+begin
+  FElement:=Nil;
+  Refresh;
+end;
+
+Procedure TElementEditor.Refresh;
+
+Var
+  S : TSTringStream;
+
+  Function NodeToString(E : TDomElement) : String;
+
+  Var
+    N : TDomNode;
+
+  begin
+    If (E=Nil) then
+      Result:=''
+    else
+      begin  
+      S.Seek(0,soFromBeginning);
+      S.Size:=0;
+      N:=E.FirstChild;
+      While Assigned(N) do
+        begin
+        WriteXml(N,S);
+        N:=N.NextSibling;  
+        end;  
+      Result:=S.Datastring;
+    end;
+  end;
+  
+  Function RemoveLineFeeds(S : String) : String;
+  
+  Var 
+    I : Integer; 
+  
+  begin
+    Result:=S;
+    For I:=1 to Length(Result) do
+      If Result[i] in [#10,#13] then
+        Result[i]:=' ';
+  end;
+  
+begin
+  GetNodes;
+  If Assigned(Felement) then
+    FLabel.Text:=Format(SDataForElement,[FElement['name']])
+  else
+    FLabel.Text:=SNoElement; 
+  S:=TStringStream.Create('');
+  Try
+    FShortEntry.Text:=RemoveLineFeeds(NodeToString(FShortNode));
+    FDescrMemo.Text:=NodeToString(FDescrNode);
+    FErrorsMemo.Text:=NodeToString(FErrorsNode);
+    FSeeAlsoMemo.Text:=NodeToString(FSeeAlsoNode);
+    FModified:=False;
+  Finally
+    S.Free;
+  end;
+end;
+
+Function TElementeditor.TestSave(S : String) : Boolean;
+
+Const
+  Head = '<?xml version="1.0" encoding="ISO8859-1"?><fpdoc-descriptions>';
+  Tail = '</fpdoc-descriptions>';
+  SErrorSaving = 'There is an error in the documentation nodes:'+LineEnding+
+                 '%s'+LineEnding+
+                 'Please correct it first and try saving again.';
+                 
+Var
+  D : TXMLDocument;
+  SS : TStringStream;
+
+begin
+//  Writeln('In testsave');
+  Result:=Length(S)=0;
+  If Not Result then
+    begin
+    SS:=TStringStream.Create(Head+S+Tail);
+    Try
+      Try
+        ReadXmlFile(D,SS);
+        Result:=True;
+      except
+        On E : Exception do 
+           MessageDlg(SErrorSaving,[E.Message],mtError,[mbOK],0)
+      end;  
+    finally 
+      D.Free;
+      SS.Free;
+    end;
+    end;
+end;
+
+Function  TElementEditor.CurrentXML : String;
+
+  Function GetNodeString(NodeName,Value : String) : String; 
+  
+  begin
+    Result:='';
+    If (Value<>'') Then
+      Result:=Format('<%s>%s</%s>',[NodeName,Value,NodeName])
+    else If Not SkipEmptyNodes then
+      result:='<'+NodeName+'/>';
+  end;
+
+
+begin
+//  Writeln('In currentxml');
+  Result:='';
+  If Not Assigned(FElement) then 
+    Exit;
+  Result:=GetNodeString('short',Trim(FShortEntry.Text));
+  Result:=Result+GetNodeString('descr',trim(FDescrMemo.Text));
+  Result:=Result+GetNodeString('errors',trim(FErrorsMemo.Text));
+  Result:=Result+GetNodeString('seealso',trim(FSeeAlsoMemo.Text));
+//  Writeln('Currentxml : ',Result);
+end;
+
+Function TElementEditor.Save : Boolean;
+
+Var
+  SS : TStringStream;
+  S : String;
+  
+
+begin
+  Result:=False;
+  S:=CurrentXML;
+  If TestSave(S) then 
+    begin
+//    Writeln('Saving data');
+    SS:=TStringStream.Create(S);
+    Try 
+      // Free child nodes.
+      With FElement do
+        While FirstChild<>Nil do
+          RemoveChild(FirstChild);
+      // Read them again from stream.  
+      SS.Seek(0,soFromBeginning);
+      ReadXMLFragment(FElement,SS);
+      FModified:=False;
+      Result:=True;
+    Finally
+      SS.Free;
+    end;  
+    end;
+end;
+
+
+Procedure TElementEditor.InsertTag (tagName : String);
+
+Var
+  PB,PE : Integer;
+
+begin
+  If Assigned(CurrentEditable) then 
+    With CurrentEditable do
+      begin
+      PB:=SelectionStart;
+      PE:=SelectionEnd;
+      InsertText('</'+TagName+'>',PE);
+      InsertText('<'+TagName+'>',PB);
+      SelectionStart:=PB+Length(TagName)+2;
+      FModified:=True;
+      end;
+end;
+
+Procedure TElementEditor.InsertTag(TagType : TTagType);
+
+begin
+  InsertTag(TagNames[TagTYpe]);
+end;
+
+Procedure TElementEditor.InsertLink(LinkTarget,LinkText : String);
+
+begin
+  If CurrentEditable<>Nil then
+    With CurrentEditable do
+      begin
+      If (LinkText<>'') then
+        Selection:='<link id="'+LinkTarget+'">'+LinkText+'</link>'
+      else
+        Selection:='<link id="'+LinkTarget+'"/>';
+      end;
+end;
+
+Procedure TElementEditor.InsertTable(Cols,Rows : Integer; UseHeader : Boolean);
+
+Var
+  I,J : Integer;
+  R,T : String;
+
+begin
+  If (CurrentEditable=FDescrMemo.TheText) or
+     (CurrentEditable=FErrorsMemo.TheText) then
+    begin  
+    R:='<tr>';
+    For I:=1 to Cols do
+      R:=R+'<td></td>';
+    R:=R+'</tr>'+lineEnding;  
+    T:='';
+    If UseHeader then 
+      begin
+      Dec(Rows);
+      T:='<tr>';
+      For I:=1 to Cols do
+        T:=T+'<th></th>';
+      T:=T+'</tr>'+lineEnding;  
+      end;
+    For I:=1 to rows do
+      T:=T+R;
+    T:=LineEnding+'<table>'+LineEnding+T+'</table>'+LineEnding;  
+    With CurrentEditable do
+      Selection:=t;
+    end;  
+end;
+
+Procedure TElementEditor.GetNodes;
+
+Var 
+  Node : TDomNode;
+  S : String;
+  
+begin
+  FShortNode:=Nil;
+  FDescrNode:=Nil;
+  FErrorsNode:=Nil;
+  FSeeAlsoNode:=Nil;
+  If Assigned(FElement) then
+    begin
+    Node:=FElement.FirstChild;
+    While Assigned(Node) do
+      begin
+      If (Node.NodeType=ELEMENT_NODE) then
+        begin
+        S:=Node.NodeName;
+        If S='short' then
+          FShortNode:=TDomElement(Node)
+        else if S='descr' then
+          FDescrNode:=TDomElement(Node)
+        else if S='errors' then
+          FErrorsNode:=TDomElement(Node)
+        else if S='seealso' then
+          FSeeAlsoNode:=TDomElement(Node);
+        end;
+      Node:=Node.NextSibling;
+      end;
+    end;
+end;
+
+Function TElementEditor.CurrentEditable : TFPGtkEditable;
+
+begin
+  Result:=FCurrentEditable;
+end;
+
+Function TElementEditor.OnEditableFocusIn(Sender : TFPGtkWidget; Event : PGDKEventFocus;Data : Pointer) : Boolean;
+
+begin
+  FCurrentEditable:=Sender as TFPGtkEditable;
+  Result:=False;
+end;
+
+Procedure TElementEditor.OnTextModified(Sender : TFPGtkWidget; Data : Pointer);
+
+begin
+  FModified:=True;
+end;
+
+Function TElementEditor.GetCurrentSelection : String;
+
+begin
+  If CurrentEditable=Nil then
+    begin
+    Writeln('No current editable');
+    Result:=''
+    end
+  else  
+    Result:=CurrentEditable.Selection;
+end;
+
+{ ---------------------------------------------------------------------
+  TNodeTreeItem
+  ---------------------------------------------------------------------}
+
+Constructor TNodeTreeItem.Create (ANode : TDomElement);
+
+begin
+  Inherited Create;
+  FNode:=Anode;
+  Text:=ANode['name'];
+end;
+
+Procedure TPackageTreeItem.CheckSubTree;
+
+begin
+  If (SubTree=Nil) then
+    SubTree:=TFPgtkTree.Create;
+end;
+
+{ ---------------------------------------------------------------------
+  TPackageEditor
+  ---------------------------------------------------------------------}
+
+Constructor TPackageEditor.Create;
+
+begin
+  Inherited;
+  FModuleTree:=TFPGtkScrollTree.Create;
+  FElementTree:=TFPGtkScrollTree.Create;
+//  FelementTree.Tree.ConnectSelectionChanged(@DoSelectionChanged,Nil);
+  PMMenu:=TFPgtkMenu.Create;
+  FRenameMenu:=NewMenuItem(SMenuRename,'','',@MenuRenameClick,Nil);
+  FDeleteMenu:=NewMenuItem(SMenuDelete,'','',@MenuDeleteClick,Nil);
+  PMMenu.Append(FRenameMenu);
+  PMMenu.Append(FDeleteMenu);
+  Add1(FModuleTree);
+  Add2(FElementTree);
+end;
+
+function TPackageEditor.PopupModuleMenu(Sender:TFPgtkWidget; Event:PGdkEventButton; data:pointer): boolean;
+
+begin
+  PMNode:=Sender as TNodeTreeItem;
+  Result:=(event^.thetype=GDK_BUTTON_PRESS) and (event^.button=3);
+  If Result then
+    PMMenu.Popup(3);
+end;
+
+Procedure TPackageEditor.SetDescriptionNode (Value : TDomNode);
+
+begin
+  FDescriptionNode:=Value;
+  Refresh;
+end;
+
+
+{Procedure TPackageEditor.DoSelectionChanged(Sender : TFPGtkWidget; Data : Pointer);
+
+Var
+  N : TNodeTreeItem;
+  E : TDomElement;
+
+begin
+//  Writeln('In doselectionchanged');
+  If Assigned(FOnSelectionChanged) Then
+    begin
+//    Writeln('Getting selected node');
+    N:=GetSelectedNode;
+    If N<>Nil then
+      E:=N.Node
+    else
+      E:=Nil;  
+    FOnSelectionChanged(Sender,E);
+    end;
+end;
+}
+Procedure TPackageEditor.SelectModule(Sender : TFPGtkWidget; Data : Pointer);
+
+Var 
+  W : TFPGtkWidget;
+
+begin
+  FCurrentModule:=TDomElement(Data);
+  FCurrentPackage:=FCurrentModule.ParentNode as TDomElement;
+  ShowModuleElements(FCurrentModule);
+  If Assigned(FOnSelectModule) then
+    FOnSelectModule(Self,FCurrentModule);
+end;
+
+Procedure TPackageEditor.SelectPackage(Sender : TFPGtkWidget; Data : Pointer);
+
+begin
+  FCurrentPackage:=TDomElement(Data);
+  If Assigned(FOnSelectPackage) then
+    FOnSelectPackage(Self,FCurrentPackage);
+end;
+
+Function  TPackageEditor.GetSelectedNode : TNodeTreeItem;
+
+Var
+  G : TFPgtkGroup;
+  
+begin
+  G:=TFPgtkGroup.Create;
+  try  
+    FModuleTree.Tree.GetSelection(G);
+    If G.Count>0 then 
+      try
+        Result:=TObject(G[0]) as TNodeTreeItem;
+      except
+        Result:=Nil;
+      end
+    else
+      Result:=Nil; 
+ finally
+   G.Free;
+ end;
+// Writeln('Getselectednode done'); 
+end;
+
+Procedure TPackageEditor.MenuRenameClick(Sender : TFPGtkWidget; Data : Pointer);
+
+Var
+  N : TNodeTreeItem;
+  E : TDomElement;
+
+begin
+  N:=PMNode;
+  If (N<>Nil) then
+    If N.Node.NodeName='package' then
+      RenamePackage(N)
+    Else if N.Node.NodeName='module' then
+      RenameModule(N)
+    else  if N.Node.NodeName='element' then
+      RenameElement(N)
+end;
+
+
+Procedure TPackageEditor.MenuDeleteClick(Sender : TFPGtkWidget; Data : Pointer);
+
+Var
+  N : TNodeTreeItem;
+  E : TDomElement;
+
+begin
+  N:=PMNode;
+  If (N<>Nil) then
+    If N.Node.NodeName='package' then
+      DeletePackage(N)
+    Else if N.Node.NodeName='module' then
+      DeleteModule(N)
+    else if N.Node.NodeName='element' then
+      DeleteElement(N);
+end;
+
+
+Procedure TPackageEditor.DeletePackage(N : TNodeTreeItem);
+
+begin
+  If (Not ConfirmDelete) or 
+     (MessageDlg(SDeletePackage,[N.Node['name']],mtConfirmation,mbYesNo,0)=mrYes) then
+    begin 
+    N.Node.ParentNode.RemoveChild(N.Node);
+    Refresh; 
+    FModified:=True;
+    end;
+end;
+
+
+Procedure TPackageEditor.DeleteModule(N : TNodeTreeItem);
+
+begin
+  If (Not ConfirmDelete) or 
+     (MessageDlg(SDeleteModule,[N.Node['name']],mtConfirmation,mbYesNo,0)=mrYes) then
+    begin 
+    N.Node.ParentNode.RemoveChild(N.Node);
+    Refresh; 
+    FModified:=True;
+    end;
+end;
+
+Procedure TPackageEditor.GetNameData(Sender : TFPGtkWindow;Data : Pointer; Action : Integer;Initiator : TFPGtkObject);
+
+type
+  PString = ^AnsiString;
+
+begin
+  With (Sender as TNewNodeForm) do
+    PString(Data)^:=FENodeName.Text;
+end;
+
+Function TPackageEditor.NewName(ATitle : String;Var AName : String) : Boolean;
+
+Var
+  S : String;
+
+begin
+  With TNewNodeForm.Create do
+    begin
+    Title:=ATitle;
+    FENodeName.Text:=AName;
+    Result:=Execute(Nil,@S,@GetNameData)=drOK;
+    If Result Then 
+      AName:=S;
+    end;
+end;
+
+Procedure TPackageEditor.RenamePackage(N : TNodeTreeItem);
+
+Var
+  S : String;
+
+begin
+  S:=N.Node['name'];
+  If NewName(SRenamePackage,S) then
+    begin
+    N.Node['name']:=S;
+    N.Text:=S;
+    FModified:=True;
+    end;
+end;
+
+
+Procedure TPackageEditor.RenameModule(N : TNodeTreeItem);
+
+Var 
+  S : String;
+
+begin
+  S:=N.Node['name'];
+  If NewName(SRenameModule,S) then
+    begin
+    N.Node['name']:=S;
+    N.Text:=S;
+    FModified:=True;
+    end;
+end;
+
+Procedure TPackageEditor.RenameElement(N : TNodeTreeItem);
+
+Var
+  S : String;
+
+begin
+  S:=N.Node['name'];
+  If NewName(SRenameElement,S) then
+    begin
+    N.Node['name']:=S;
+    N.Text:=S;
+    FModified:=True;
+    end;
+end;
+
+Procedure TPackageEditor.SelectElement(Sender : TFPGtkWidget; Data : Pointer);
+
+
+begin
+  FCurrentElement:=TDomElement(Data);
+  If Assigned(FOnSelectElement) then
+    FOnSelectElement(Self,FCurrentElement);
+end;
+
+{
+Procedure TPackageEditor.DeSelectElement(Sender : TFPGtkWidget; Data : Pointer);
+
+Var
+  M : TDomElement;
+
+begin
+//  Writeln('In Deselectelement');
+  M:=TDomElement(Data);
+  If Assigned(FOnDeSelectElement) then
+    FOnDeSelectElement(Self,M);
+end;
+}
+
+Function TPackageEditor.CreateElementNode(E : TDomelement) : TNodeTreeItem;
+
+begin
+  Result:=TNodeTreeItem.Create(E);
+  Result.ConnectSelect(@SelectElement,E);
+//  Result.ConnectDeselect(@DeselectElement,E);
+end;
+
+Procedure TPackageEditor.DeleteElement(N : TNodeTreeItem);
+
+Var
+  Reposition : Boolean;
+  Index : Integer;
+  
+begin
+  Reposition:=(N.Node=CurrentElement);
+  With (FModuleNode.Subtree as TFPgtkTree) do
+    begin
+    Index:=ChildPosition(N);
+    Remove(N);
+    FModified:=True;
+    If Reposition then
+      SelectItem(Index);
+    end;  
+end;
+
+Procedure TPackageEditor.DeleteElement(E : TDomElement);
+
+Var
+  N : TNodeTreeItem;
+  
+begin
+  N:=FindElementNode(E,Nil);
+  If (N<>Nil) then
+    DeleteElement(N);
+end;
+
+Procedure TPackageEditor.DeletePackage(P : TDomElement);
+
+Var
+  N : TNodeTreeItem;
+
+begin
+  N:=FindPackageNode(P);
+  If N<>NIl then
+    DeletePackage(N);
+end;
+
+
+Procedure TPackageEditor.DeleteModule(M : TDomElement);
+
+Var
+  N : TNodeTreeItem;
+
+begin
+  N:=FindModuleNodeInNode(M,Nil);
+  If N<>NIl then
+    DeleteModule(N);
+end;
+
+
+Procedure TPackageEditor.RenamePackage(P : TDomElement);
+
+Var
+  N : TNodeTreeItem;
+
+begin
+  N:=FindPackageNode(P);
+  If N<>NIl then
+    RenamePackage(N);
+end;
+
+
+Procedure TPackageEditor.RenameModule(M : TDomElement);
+
+Var
+  N : TNodeTreeItem;
+
+begin
+  N:=FindModuleNodeInNode(M,Nil);
+  If N<>NIl then
+    RenameModule(N);
+end;
+
+
+Procedure TPackageEditor.RenameElement(E : TDomElement);
+
+Var
+  N : TNodeTreeItem;
+
+begin
+  N:=FindElementNode(E,Nil);
+  If N<>NIl then
+    RenameElement(N);
+end;
+
+Procedure TPackageEditor.ClearElements;
+
+begin
+  FElementTree.Tree.ClearItems(0,-1);
+end;
+
+Procedure TPackageEditor.ShowModuleElements(Module : TDomElement);
+
+Var
+  Node : TDomNode;
+  ETreeNode : TNodeTreeItem;
+  S : TStringList;
+  I : Integer;
+
+begin
+  ClearElements;
+  If Assigned(Module) then
+    begin
+    FModuleNode:=CreateElementNode(Module);
+    FElementTree.Tree.Append(FModuleNode);
+    FModuleNode.Show;
+    FModuleNode.SubTree:=TFPGtkTree.Create;
+    S:=TStringList.Create;
+    Try
+      S.Sorted:=True;
+      Node:=Module.FirstChild;
+      While Assigned(Node) do
+        begin  
+        If (Node.NodeType=ELEMENT_NODE) and (Node.NodeName='element') then
+          begin
+          ETreeNode:=CreateElementNode(TDomElement(Node));
+          ETreeNode.ConnectButtonPressEvent(@PopupModuleMenu,Nil);
+          S.AddObject(TDomElement(Node)['name'],ETreeNode);
+          end;
+        Node:=Node.NextSibling;
+        end;
+      For I:=0 to S.Count-1 do
+        begin
+        ETreeNode:=TNodeTreeItem(S.Objects[i]);
+        (FModuleNode.SubTree as TFPgtKTree).Append(ETreeNode);
+        //ETreeNode.Show;
+        end;
+      Finally
+        S.Free;
+      end;
+    FModuleNode.Expand;
+    // NOT (!!) FModuleNode.Select; this cannot be undone...
+    FElementTree.Tree.SelectChild(FModuleNode);
+    end;
+  FelementTree.Tree.SelectionMode:=GTK_SELECTION_BROWSE;  
+
+end;
+
+Procedure TPackageEditor.Refresh;
+
+var 
+  Node,SubNode : TDomNode;
+  FTreeNode : TPackageTreeItem;
+  MTreeNode: TFPGtkTreeItem;
+
+begin
+  FModuleTree.Tree.ClearItems(0,-1);
+  If Assigned(FDescriptionNode) then
+    begin
+    Node:=FDescriptionNode.FirstChild;
+    While Assigned(Node) do
+      begin  
+      If (Node.NodeType=ELEMENT_NODE) and (Node.NodeName='package') then
+        begin
+        FTreeNode:=TPackageTreeItem.Create(TDomElement(Node));
+        FTreeNode.ConnectSelect(@Selectpackage,Node);
+        FTreeNode.ConnectButtonPressEvent(@PopupModuleMenu,Nil);
+        FModuleTree.Tree.Append(FTreeNode);
+        FTreeNode.Show;
+        SubNode:=Node.FirstChild;
+        While Assigned(SubNode) do
+          begin
+          If (SubNode.NodeType=ELEMENT_NODE) and (SubNode.NodeName='module') then
+            begin
+            MTreeNode:=TModuleTreeItem.Create(TDomElement(SubNode));
+            MtreeNode.ConnectSelect(@SelectModule,SubNode);
+            MTreeNode.ConnectButtonPressEvent(@PopupModuleMenu,Nil);
+            FTreeNode.CheckSubtree;
+            TFPGtkTree(FTreeNode.SubTree).Append(MTreeNode);
+            //MTreeNode.Show;
+            end;
+          SubNode:=SubNode.NextSibling;  
+          end;
+        end;
+        Node:=Node.NextSibling;
+      end;
+    end;
+  CurrentModule:=Nil;  
+  FModified:=False;
+end;
+
+Function TPackageEditor.FindPackageNode(P : TDomElement) : TNodeTreeItem;
+
+Var
+  N : TNodeTreeItem;
+  G : TFPgtkWidgetGroup;
+  I : Integer;
+  
+begin
+  Result:=Nil;
+  G:=FModuleTree.Tree.Children;
+  I:=0;
+  While (Result=Nil) and (I<G.Count) do
+    begin
+    If G.Items[i] is TNodeTreeItem then
+      begin
+      If TNodeTreeItem(G.items[i]).Node=P then 
+        Result:=TNodeTreeItem(G.items[i]);
+      end
+    else
+      Writeln('Child ',i,' of tee is not a node :',G.Items[i].ClassName);
+    Inc(I);  
+    end;  
+  If (Result=Nil) then
+    Raise Exception.CreateFmt(SErrNoNodeForPackage,[P['name']]);
+end;
+
+Function TPackageEditor.FindModuleNodeInNode(M : TDomElement; N : TNodeTreeItem) : TNodeTreeItem;
+
+Var
+  SN : TNodeTreeItem;
+  G : TFPgtkWidgetGroup;
+  I : Integer;
+  
+begin
+  Result:=Nil;
+  If (N<>Nil) then
+    SN:=N
+  else  
+    SN:=FindPackageNode(M.ParentNode as TDomElement);
+  If Assigned(SN) and Assigned(SN.SubTree) Then  
+    begin
+    G:=(SN.SubTree as TFpGtkTree).Children;
+    I:=0;
+    While (Result=Nil) and (I<G.Count) do
+      begin
+      If G.Items[i] is TNodeTreeItem then
+        begin
+        If TNodeTreeItem(G.items[i]).Node=M then 
+          Result:=TNodeTreeItem(G.items[i]);
+        end
+      else
+        Writeln('Child ',i,' of tree is not a node :',G.Items[i].ClassName);
+      Inc(I);  
+      end;  
+    end;   
+  If (Result=Nil) then
+    Raise Exception.CreateFmt(SErrNoNodeForModule,[M['name']]);
+end;
+
+Function TPackageEditor.FindElementNode(E : TDomElement; N : TNodeTreeItem) : TNodeTreeItem;
+
+Var
+  SN : TNodeTreeItem;
+  G : TFPgtkWidgetGroup;
+  I : Integer;
+  
+begin
+  Result:=Nil;
+  If (N<>Nil) then
+    SN:=N
+  else  
+    SN:=FModuleNode; // FindModuleNodeInNode(E.ParentNode as TDomElement,Nil);
+  If E.NodeName='module' then
+    Result:=FModuleNode
+  else If Assigned(SN) and Assigned(SN.SubTree) Then  
+    begin
+    G:=(SN.SubTree as TFpGtkTree).Children;
+    I:=0;
+    While (Result=Nil) and (I<G.Count) do
+      begin
+      If G.Items[i] is TNodeTreeItem then
+        begin
+        If TNodeTreeItem(G.items[i]).Node=E then 
+          Result:=TNodeTreeItem(G.items[i]);
+        end
+      else
+        Writeln('Child ',i,' of tree is not a node :',G.Items[i].ClassName);
+      Inc(I);  
+      end;  
+    end;   
+  If (Result=Nil) then
+    Raise Exception.CreateFmt(SErrNoNodeForElement,[E['name']]);
+end;
+
+Procedure TPackageEditor.AddElement(E : TDomElement);
+
+Var 
+  N : TNodeTreeItem;
+
+begin
+//  Writeln('Adding element ',E['name']);
+  N:=CreateElementNode(E);
+//  Writeln('Appending node element ',N.Node['name']);
+  (FModuleNode.Subtree as TFpGtKTree).Append(N);
+//  Writeln('Setting current node');
+  CurrentElement:=E;
+  FModified:=True;
+end;
+
+Procedure TPackageEditor.SetCurrentElement(E : TDomElement);
+
+Var 
+  N : TNodeTreeItem;
+
+begin
+//  Writeln('In setcurrentelement');
+  If (E<>FCurrentElement) then
+    begin
+    If Assigned(FCurrentElement) then
+      begin
+      N:=FindElementNode(FCurrentElement,Nil);
+      If Assigned(N) then
+        N.Deselect;
+      end;  
+    CurrentModule:=E.ParentNode as TDomElement;
+    N:=FindElementNode(E,Nil);
+    With (FModuleNode.Subtree as TFPgtkTree) do
+      SelectChild(N);
+    end;
+end;
+
+Procedure TPackageEditor.SetCurrentModule(Value : TDomElement);
+
+Var
+  N1,N2 : TNodeTreeItem;
+
+begin
+  If (FCurrentModule<>Value) then
+    begin
+    FCurrentModule:=Value;
+    If Assigned(Value) then
+      begin
+      FCurrentPackage:=Value.ParentNode as TDomElement;
+      N1:=FindPackageNode(FCurrentPackage);
+      N1.Expand;
+      N2:=FindModuleNodeInNode(FCurrentModule,N1);
+      (N1.SubTree as TFPgtkTree).SelectChild(N2);
+      end
+    Else
+      ClearElements;  
+    end;   
+end;
+
+
+Procedure TPackageEditor.SetCurrentPackage(Value : TDomElement);
+
+Var
+  N : TNodeTreeItem;
+
+begin
+  FCurrentPackage:=Value;
+  N:=FindPackageNode(Value);
+  N.Expand;
+  N.Select;
+end;
+
+
+{ ---------------------------------------------------------------------
+  TPageEditor
+  ---------------------------------------------------------------------}
+
+Constructor TEditorPage.Create;
+
+begin
+  Inherited Create;
+  FPackages:=TPackageEditor.Create;
+  FElement:=TElementEditor.Create;
+//  Fpackages.OnSelectionChanged:=@SelectionChanged;
+  FPackages.OnSelectElement:=@ElementSelected;
+//  FPackages.OnDeselectElement:=@ElementDeSelected;
+  Add1(FPackages);
+  Add2(FElement);
+end;
+
+
+
+Procedure TEditorPage.ClearDocument;
+
+begin
+  if (FDocument<>nil) then
+    begin
+    FDocument.Free;
+    FDocument:=Nil;
+    end;
+end;
+
+Procedure TEditorPage.LoadFromFile(FN : String);
+
+Var
+  F : TFileStream;
+
+begin
+  ClearDocument;
+  F:=TFileStream.Create(FN,fmOpenRead);
+  Try
+    SetFileName(FN);
+    ReadXMLFile(FDocument,F);
+    DisplayDocument;
+  finally
+    F.Free;
+  end;
+end;
+
+Procedure TEditorPage.LoadFromStream(S : TStream);
+
+begin
+  ClearDocument;
+  ReadXMLFile(FDocument,S);
+  SetFileName(SNewDocument);
+  DisplayDocument;
+end;
+
+Procedure TEditorPage.SetFileName(FN : String);
+
+begin
+  FFileName:=FN;
+  FFileNameLabel.Text:=ChangeFileExt(ExtractFileName(FN),'');
+end;
+
+Function TEditorPage.MakeBackup(FN : String) : Boolean;
+
+Var
+  BN : String;
+
+begin
+  Result:=Not CreateBackup;
+  If not Result then
+    begin
+    BN:=ChangeFileExt(FN,BackupExtension);
+    Result:=RenameFile(FN,BN);
+    end;
+end;
+
+Procedure TEditorPage.SaveToFile(FN : String);
+
+begin
+  If FElement.Modified then
+    FElement.Save;
+  If (not FileExists(FN)) or MakeBackup(FN) then
+    begin
+    WriteXMLFile(FDocument,FN);
+    if (FN<>FFileName) then
+      SetFileName(FN);
+    end;  
+end;
+
+Procedure TEditorPage.DisplayDocument;
+
+begin
+  FPackages.DescriptionNode:=FDocument.DocumentElement;
+end;
+
+{
+Procedure TEditorPage.SelectionChanged(Sender : TFPgtkWidget; Node : TDomElement) ;
+
+//Procedure TEditorPage.SelectionChanged(Sender : TObject; Node : TDomElement) ;
+
+Var
+  OldNode : TDomElement;
+
+begin
+  If Not FChangingSelection then
+    begin
+    FChangingSelection:=True;
+    Try
+      OldNode:=FElement.Element;
+      If (OldNode<>Node) then
+        begin
+        FElement.Element:=Node;
+        {
+          if the switch didn't succeed, it means that something went wrong
+          when saving the old node, so we reselect the old node.
+        } 
+        If FElement.Element<>Node then
+          begin
+          FPackages.CurrentElement:=OldNode;
+          end;
+        end; 
+    Finally
+      FChangingSelection:=False;
+    end;   
+    end;
+end;
+}
+
+Procedure TEditorPage.ElementSelected(Sender : TObject; Node : TDomElement) ;
+
+Var
+  OldNode : TDomElement;
+
+begin
+//  Writeln('In ElementSelected');
+  OldNode:=FElement.Element;
+  If OldNode<>Node then
+    begin
+    FElement.Element:=Node;
+    {
+      if the switch didn't succeed, it means that something went wrong
+      when saving the old node, so we reselect the old node.
+    } 
+{    If FElement.Element<>Node then
+      FPackages.CurrentElement:=OldNode;
+}    end; 
+end;
+
+{
+Procedure TEditorPage.ElementDeselected(Sender : TObject; Node : TDomElement) ;
+
+begin
+  With FElement do
+    If Modified then
+      Save;
+end;
+}
+
+Procedure TEditorPage.InsertTag(TagType : TTagType);
+
+begin
+  FElement.InsertTag(TagType)
+end;
+
+Procedure TEditorPage.InsertLink(LinkTarget,LinkText : String);
+
+begin
+  FElement.InsertLink(LinkTarget,LinkText);
+end;
+
+
+Procedure TEditorPage.InsertTable(Cols,Rows : Integer; UseHeader : Boolean);
+
+begin
+  Felement.InsertTable(Cols,Rows,UseHeader);
+end;
+
+Function TEditorPage.GetCurrentSelection : String;
+
+begin
+  Result:=FElement.CurrentSelection;
+end;
+
+Procedure TEditorPage.NewPackage(APackageName : String);
+
+Var
+  P : TDomElement;
+
+begin
+  P:=FDocument.CreateElement('package');
+  P['name']:=APAckageName;
+  FDocument.DocumentElement.AppendChild(P);
+  FPackages.Refresh;
+  FPackages.FModified:=True;
+  CurrentPackage:=P;
+end;
+
+Function TEditorPage.FirstPackage : TDomElement;
+
+Var
+  N : TDomNode;
+
+begin
+  N:=FDocument.DocumentElement.FirstChild;
+  While (N<>Nil) and 
+        Not ((N.NodeType=ELEMENT_NODE) and 
+             (N.NodeName='package')) do
+    N:=N.NextSibling;
+  Result:=TDomElement(N);
+end;
+
+Function TEditorPage.FirstModule(APackage : TDomElement) : TDomElement;
+
+Var 
+  N : TDomNode;
+
+begin
+  N:=APAckage.FirstChild;
+  While (N<>Nil) and 
+        Not ((N.NodeType=ELEMENT_NODE) and 
+               (N.NodeName='module')) do
+      N:=N.NextSibling;
+  Result:=TDomElement(N);
+end;
+
+Procedure TEditorPage.NewModule(AModuleName : String);
+
+Var 
+  M,P : TDomElement;
+  
+begin
+  If CurrentPackage<>Nil then
+    P:=CurrentPackage
+  else
+    P:=FirstPackage;
+  If (P=Nil) then  
+    Raise Exception.CreateFmt(SErrNoPackageForModule,[AModuleName]);
+  M:=FDocument.CreateElement('module');
+  M['name']:=AModuleName;
+  P.AppendChild(M);
+  FPackages.Refresh;
+  FPackages.FModified:=True;
+  CurrentModule:=M;
+end;
+
+Procedure TEditorPage.NewElement(AElementName : String);
+
+Var 
+  P,E,M : TDomElement;
+  N : TDomNode;
+  
+begin
+  If CurrentModule<>Nil then
+    M:=CurrentModule
+  else
+    begin
+    P:=FirstPackage;
+    If P<>Nil then
+      M:=FirstModule(P)
+    else
+      M:=Nil;
+    If M<>Nil then
+      CurrentModule:=M;  
+    end;  
+  If (M=Nil) then  
+    Raise Exception.CreateFmt(SErrNoModuleForElement,[AElementName]);
+  E:=FDocument.CreateElement('module');
+  E['name']:=AElementName;
+  M.AppendChild(E);
+  FPackages.AddElement(E);
+end;
+
+Function TEditorPage.GetCurrentPackage : TDomElement;
+
+begin
+  Result:=FPackages.CurrentPackage;
+end;
+
+
+Function TEditorPage.GetCurrentModule : TDomElement;
+
+begin
+  Result:=FPackages.CurrentModule;
+end;
+
+
+Function TEditorPage.GetCurrentElement : TDomElement;
+begin
+  Result:=FElement.Element;
+end;
+
+Procedure TEditorPage.SetCurrentElement(Value : TDomElement);
+
+begin
+  FPackages.CurrentElement:=Value;
+end;
+
+
+Procedure TEditorPage.SetCurrentModule(Value : TDomElement);
+
+begin
+  FPackages.CurrentModule:=Value;
+end;
+
+
+Procedure TEditorPage.SetCurrentPackage(Value : TDomElement);
+
+begin
+  FPackages.CurrentPackage:=Value;
+end;
+
+Procedure TEditorPage.SetModified(Value : Boolean);
+
+begin
+end;
+
+Function TEditorPage.GetModified : Boolean;
+
+begin
+  Result:=FPackages.Modified or FElement.Modified;
+end;
+
+Procedure TEditorPage.GetElementList(List : TStrings);
+
+Var
+  N : TDOmNode;
+
+begin
+ With List do
+   begin
+   Clear;
+   If Assigned(CurrentModule) then
+     begin
+     N:=Currentmodule.FirstChild;
+     While (N<>Nil) do
+       begin
+       If (N is TDomElement) and (N.NodeName='element') then
+         Add(TDomElement(N)['name']);
+       N:=N.NextSibling;  
+       end;
+     end;  
+   end;
+end;
+
+end.

+ 2192 - 0
utils/fpdoc/fpde/xpms.pp

@@ -0,0 +1,2192 @@
+{$h+}
+unit xpms;
+
+interface
+
+Const
+
+{ file: bold.xpm 38 lines } 
+
+ ImgBold : Array[1..33] of string = (
+{ columns rows colors chars-per-pixel }
+'16 16 16 1',
+'  c black',
+'. c maroon',
+'X c green',
+'o c olive',
+'O c navy',
+'+ c purple',
+'@ c teal',
+'# c fractal',
+'$ c silver',
+'% c red',
+'& c lime',
+'* c yellow',
+'= c blue',
+'- c fuchsia',
+'; c aqua',
+': c gray100',
+{ pixels }
+'$$$$$$$$$$$$$$$$',
+'$$$$$$$$$$$$$$$$',
+'$$$$$$$$$$$$$$$$',
+'$$$        $$$$$',
+'$$$$   $$   $$$$',
+'$$$$   $$   $$$$',
+'$$$$   $$   $$$$',
+'$$$$       $$$$$',
+'$$$$   $$   $$$$',
+'$$$$   $$   $$$$',
+'$$$$   $$   $$$$',
+'$$$        $$$$$',
+'$$$$$$$$$$$$$$$$',
+'$$$$$$$$$$$$$$$$',
+'$$$$$$$$$$$$$$$$',
+'$$$$$$$$$$$$$$$$'
+);
+
+{----------------------------------------------------------------------}
+
+{ file: italic.xpm  38 }
+
+ImgItalic : Array[1..33] of string = (
+{ columns rows colors chars-per-pixel }
+'16 16 16 1',
+'  c black',
+'. c maroon',
+'X c green',
+'o c olive',
+'O c navy',
+'+ c purple',
+'@ c teal',
+'# c fractal',
+'$ c silver',
+'% c red',
+'& c lime',
+'* c yellow',
+'= c blue',
+'- c fuchsia',
+'; c aqua',
+': c gray100',
+{ pixels }
+'$$$$$$$$$$$$$$$$',
+'$$$$$$$$$$$$$$$$',
+'$$$$$$$$$$$$$$$$',
+'$$$$$$$     $$$$',
+'$$$$$$$$  #$$$$$',
+'$$$$$$$#  $$$$$$',
+'$$$$$$$  #$$$$$$',
+'$$$$$$#  $$$$$$$',
+'$$$$$$  #$$$$$$$',
+'$$$$$#  $$$$$$$$',
+'$$$$$  #$$$$$$$$',
+'$$$      $$$$$$$',
+'$$$$$$$$$$$$$$$$',
+'$$$$$$$$$$$$$$$$',
+'$$$$$$$$$$$$$$$$',
+'$$$$$$$$$$$$$$$$'
+);
+
+{----------------------------------------------------------------------}
+
+{ file: link.xpm  32 }
+ImgLink : Array[1..27] of string = (
+{ columns rows colors chars-per-pixel }
+'16 16 10 1',
+'  c black',
+'. c gray44',
+'X c navy',
+'o c blue',
+'O c green',
+'+ c teal',
+'@ c fractal',
+'# c silver',
+'$ c gray100',
+'% c None',
+{ pixels }
+'%%%@@@@@@%%%%%%%',
+'%%@@+#OOO %%%%%%',
+'%@$#$OOOOO %%%%%',
+'@@o$#ooooOO@%%%%',
+'@o#OOXOOoOO %%%%',
+'@oOOOOOX+XO %%%%',
+'@ooOOOOOOoo %%%%',
+'@ooooOOOO+o %%%%',
+'@XoooOOOOoX@%%%%',
+'% ooo    X    %%',
+'%% X #$#$ $#$# %',
+'%%% #         # ',
+'%%% $ @ ### @ $ ',
+'%%% #         # ',
+'%%%% #$#$ $#$# %',
+'%%%%%    %    %%'
+);
+
+{----------------------------------------------------------------------}
+
+{ file: new.xpm  229 XPM }
+
+ImgNew : Array[1..227] of string = (
+'24 24 202 2',
+'  	c None',
+'. 	c #8CA7DE',
+'+ 	c #BED0EC',
+'@ 	c #C1D3ED',
+'# 	c #C1D1EC',
+'$ 	c #C1D0EA',
+'% 	c #C0CEE8',
+'& 	c #BFCCE6',
+'* 	c #BECBE4',
+'= 	c #BEC9E1',
+'- 	c #BDC7DF',
+'; 	c #BDC5DD',
+'> 	c #A6AECE',
+', 	c #7681B3',
+''' 	c #8582B8',
+') 	c #95A3E0',
+'! 	c #FEFEFF',
+'~ 	c #FFFFFF',
+'{ 	c #D9DBE9',
+'] 	c #8BC5F1',
+'^ 	c #F8FAFD',
+'/ 	c #D0D4E5',
+'( 	c #8CC3EF',
+'_ 	c #6CBAF3',
+': 	c #FCFDFF',
+'< 	c #F9FEFF',
+'[ 	c #CBD1E5',
+'} 	c #8DC4EF',
+'| 	c #6DBBF3',
+'1 	c #50B4F8',
+'2 	c #94A1DD',
+'3 	c #F8F9FC',
+'4 	c #FBFDFF',
+'5 	c #F4F9FD',
+'6 	c #F3FBFF',
+'7 	c #C6CEE3',
+'8 	c #85B5E3',
+'9 	c #6AADE5',
+'0 	c #54A6E9',
+'a 	c #39A0EF',
+'b 	c #939DDA',
+'c 	c #F7F9FC',
+'d 	c #FCFEFF',
+'e 	c #EEF5FC',
+'f 	c #EBF5FC',
+'g 	c #D1DDEE',
+'h 	c #7681B2',
+'i 	c #7680AD',
+'j 	c #767FAA',
+'k 	c #767FAB',
+'l 	c #777FAF',
+'m 	c #919AD5',
+'n 	c #F5FAFD',
+'o 	c #EFF6FC',
+'p 	c #E9F2FA',
+'q 	c #E2EFFA',
+'r 	c #DEEDFA',
+'s 	c #DBEEFB',
+'t 	c #C9DBE7',
+'u 	c #AFBDC8',
+'v 	c #A2B0BA',
+'w 	c #9DACB7',
+'x 	c #837EA0',
+'y 	c #9097D1',
+'z 	c #F5F9FE',
+'A 	c #EFF5FC',
+'B 	c #E9F2FB',
+'C 	c #E3F0FA',
+'D 	c #DDECF9',
+'E 	c #D7E9F8',
+'F 	c #D1E6F8',
+'G 	c #CCE4F6',
+'H 	c #C0D9EB',
+'I 	c #ABC1D1',
+'J 	c #97A8B5',
+'K 	c #817C9C',
+'L 	c #8F93CD',
+'M 	c #F7F8FB',
+'N 	c #EAF2FB',
+'O 	c #E3EFFA',
+'P 	c #CBE3F6',
+'Q 	c #C6E1F5',
+'R 	c #C0DEF4',
+'S 	c #BADBF3',
+'T 	c #A7C4D9',
+'U 	c #837EA4',
+'V 	c #8D90CA',
+'W 	c #F0F6FC',
+'X 	c #EAF2FA',
+'Y 	c #E4F0FA',
+'Z 	c #D8EAF8',
+'` 	c #D2E6F8',
+' .	c #C6E1F6',
+'..	c #C0DEF5',
+'+.	c #BBDCF4',
+'@.	c #B6DAF4',
+'#.	c #AED5F1',
+'$.	c #8682B5',
+'%.	c #8C8DC6',
+'&.	c #F4F9FE',
+'*.	c #EAF3FB',
+'=.	c #DDEDF9',
+'-.	c #D2E7F8',
+';.	c #CDE4F6',
+'>.	c #C1DEF5',
+',.	c #B5D9F3',
+'''.	c #B0D7F2',
+').	c #A8D2F0',
+'!.	c #8683B9',
+'~.	c #8A89C2',
+'{.	c #FEFFFF',
+'].	c #F6FAFE',
+'^.	c #D8E9F9',
+'/.	c #C7E1F5',
+'(.	c #BCDCF4',
+'_.	c #B6D9F3',
+':.	c #ABD5F2',
+'<.	c #A4CFEF',
+'[.	c #8582B9',
+'}.	c #8986BE',
+'|.	c #F4F6FA',
+'1.	c #F8FCFE',
+'2.	c #D8E9F8',
+'3.	c #D2E7F7',
+'4.	c #C2DEF5',
+'5.	c #B0D7F1',
+'6.	c #AAD4F1',
+'7.	c #A5D2F1',
+'8.	c #9ECDEE',
+'9.	c #8481B8',
+'0.	c #8883BB',
+'a.	c #EEF2F8',
+'b.	c #F1F8FD',
+'c.	c #EAF3FA',
+'d.	c #E3EFF9',
+'e.	c #D2E6F7',
+'f.	c #C1DFF4',
+'g.	c #B0D6F2',
+'h.	c #A4D1F0',
+'i.	c #9FD0F0',
+'j.	c #98CBED',
+'k.	c #8381B8',
+'l.	c #8680B7',
+'m.	c #E8EFF7',
+'n.	c #ECF5FC',
+'o.	c #E4EFFA',
+'p.	c #D3E7F7',
+'q.	c #C1DFF5',
+'r.	c #B7D9F3',
+'s.	c #ABD4F1',
+'t.	c #A5D2F0',
+'u.	c #9FCFF0',
+'v.	c #9ACDEF',
+'w.	c #96CAED',
+'x.	c #857BB2',
+'y.	c #E3ECF5',
+'z.	c #E6F2FB',
+'A.	c #DEEDF9',
+'B.	c #B1D7F2',
+'C.	c #A0CFF0',
+'D.	c #99CCEE',
+'E.	c #97CDEF',
+'F.	c #96CBED',
+'G.	c #8378AF',
+'H.	c #DDE9F5',
+'I.	c #E0EFFB',
+'J.	c #D9EAF8',
+'K.	c #C8E1F5',
+'L.	c #C2DEF4',
+'M.	c #ACD4F1',
+'N.	c #A6D2F1',
+'O.	c #97CCEE',
+'P.	c #8377AE',
+'Q.	c #D8E6F4',
+'R.	c #DAECFA',
+'S.	c #D3E7F8',
+'T.	c #C2DFF5',
+'U.	c #9ACDEE',
+'V.	c #8277AE',
+'W.	c #D2E3F3',
+'X.	c #D4E9F9',
+'Y.	c #CEE0F2',
+'Z.	c #CFE7F8',
+'`.	c #C8E2F5',
+' +	c #B7DAF3',
+'.+	c #C8DEF2',
+'++	c #CAE3F7',
+'@+	c #B6DAF3',
+'#+	c #8177AE',
+'$+	c #C4DDF3',
+'%+	c #C6E3F8',
+'&+	c #BFDFF6',
+'*+	c #B8DCF5',
+'=+	c #B2D9F4',
+'-+	c #ACD7F3',
+';+	c #A7D4F3',
+'>+	c #A0D2F2',
+',+	c #9ACFF0',
+'''+	c #98CEF0',
+')+	c #98CFF1',
+'!+	c #797CA9',
+'~+	c #8381B7',
+'                                                ',
+'      . + @ @ # $ % & * = - ; > , ''             ',
+'      ) ! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ { , ] ''           ',
+'      ) ^ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ / , ( _ ''         ',
+'      ) ^ ~ ~ ~ ~ ~ ~ ~ ~ : < [ , } | 1 ''       ',
+'      2 3 ~ ~ ~ ~ ~ ~ ~ 4 5 6 7 , 8 9 0 a ''     ',
+'      b c ~ ~ ~ ~ ~ ~ d 5 e f g h i j k k l     ',
+'      m c ~ ~ ~ ~ ~ : n o p q r s t u v w x     ',
+'      y c ~ ~ ~ ~ d z A B C D E F G H I J K     ',
+'      L M ~ ~ ~ d z o N O D E F P Q R S T U     ',
+'      V M ~ ~ : z W X Y D Z ` G  ...+.@.#.$.    ',
+'      %.M ~ d &.o *.O =.E -.;.Q >.+.,.''.).!.    ',
+'      ~.M {.].A X C D ^.-.;./.>.(._.''.:.<.[.    ',
+'      }.|.1.W X Y =.2.3.G /.4.+._.5.6.7.8.9.    ',
+'      0.a.b.c.d.D 2.e.G Q f.(._.g.6.h.i.j.k.    ',
+'      l.m.n.o.D 2.p.;./.q.(.r.5.s.t.u.v.w.k.    ',
+'      x.y.z.A.E 3.;./.q.+._.B.s.7.C.D.E.F.k.    ',
+'      G.H.I.J.e.;.K.L.(._.B.M.N.C.D.O.E.F.k.    ',
+'      P.Q.R.S.G /.T.(._.''.s.N.C.U.O.O.E.F.k.    ',
+'      V.W.X.;./.>.(._.''.6.7.C.D.O.O.O.E.F.k.    ',
+'      V.Y.Z.`.4.(. +B.s.7.C.v.O.O.O.O.E.F.k.    ',
+'      V..+++T.(.@+B.s.7.u.v.O.O.O.O.O.E.F.k.    ',
+'      #+$+%+&+*+=+-+;+>+,+''+''+''+''+''+''+)+E.k.    ',
+'      !+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+    '
+);
+
+{----------------------------------------------------------------------}
+
+{ file: newelement.xpm  241 }
+
+ImgNewElement : Array[1..239] of string = (
+'24 24 214 2',
+'  	c None',
+'. 	c #FEF258',
+'+ 	c #FEF04B',
+'@ 	c #FEF25E',
+'# 	c #FEF484',
+'$ 	c #FEF68E',
+'% 	c #FEF261',
+'& 	c #FFEF49',
+'* 	c #FEF46D',
+'= 	c #FEF46F',
+'- 	c #FEF691',
+'; 	c #FEF7A9',
+'> 	c #FEF8B9',
+', 	c #FEF8B8',
+''' 	c #FEF7A2',
+') 	c #FEF371',
+'! 	c #FEF269',
+'~ 	c #FEF8B2',
+'{ 	c #FEF9D1',
+'] 	c #FEFCEB',
+'^ 	c #FEFBE9',
+'/ 	c #FEF9C8',
+'( 	c #FEF7A6',
+'_ 	c #FEF267',
+': 	c #FEF25D',
+'< 	c #FEF259',
+'[ 	c #FEF36B',
+'} 	c #FEF7AD',
+'| 	c #FEFADE',
+'1 	c #FEFEFD',
+'2 	c #FEFDFC',
+'3 	c #FEFAD8',
+'4 	c #FEF7A5',
+'5 	c #FEF04F',
+'6 	c #FEF575',
+'7 	c #FEF584',
+'8 	c #FEF7B0',
+'9 	c #FEFAD5',
+'0 	c #FEFCF2',
+'a 	c #FEFCEF',
+'b 	c #FEF9CF',
+'c 	c #FEF7A4',
+'d 	c #FEF153',
+'e 	c #FEF263',
+'f 	c #FEF68F',
+'g 	c #FEF9C4',
+'h 	c #FEF9C3',
+'i 	c #FEF585',
+'j 	c #FEF367',
+'k 	c #FEF46C',
+'l 	c #FEFAC8',
+'m 	c #FDF9D2',
+'n 	c #FBF6BF',
+'o 	c #FAF498',
+'p 	c #FCF169',
+'q 	c #FEF36D',
+'r 	c #FEF695',
+'s 	c #FEF481',
+'t 	c #FEF157',
+'u 	c #FDFBE8',
+'v 	c #F9F7DF',
+'w 	c #DEDBB6',
+'x 	c #EEEBBA',
+'y 	c #F2EDB7',
+'z 	c #F1ECA6',
+'A 	c #F4EB87',
+'B 	c #FBEF58',
+'C 	c #FEF050',
+'D 	c #FEF048',
+'E 	c #FEFDF8',
+'F 	c #FBFAF3',
+'G 	c #F8F7EC',
+'H 	c #DCDACF',
+'I 	c #AFADA0',
+'J 	c #C1BFA3',
+'K 	c #E9E5C4',
+'L 	c #E9E6BE',
+'M 	c #EBE6B0',
+'N 	c #E7E2A8',
+'O 	c #E8E29B',
+'P 	c #ECE486',
+'Q 	c #FDFDFD',
+'R 	c #FAFAFB',
+'S 	c #F6F5F6',
+'T 	c #C3C3C3',
+'U 	c #A5A4A5',
+'V 	c #B9B8B4',
+'W 	c #E8E6DB',
+'X 	c #D3D2C3',
+'Y 	c #B1AF9D',
+'Z 	c #CCC9A7',
+'` 	c #DFDBB9',
+' .	c #DDD9B1',
+'..	c #DBD7AB',
+'+.	c #DBD6A6',
+'@.	c #D7D2A3',
+'#.	c #DBD48C',
+'$.	c #FCFCFD',
+'%.	c #F5F5F8',
+'&.	c #D1D1D7',
+'*.	c #B4B4BD',
+'=.	c #CDCDD2',
+'-.	c #E5E5E5',
+';.	c #D5D4D3',
+'>.	c #9E9D9B',
+',.	c #B2B1AB',
+'''.	c #D3D2C2',
+').	c #D4D1BD',
+'!.	c #B3B09C',
+'~.	c #BEBBA3',
+'{.	c #CFCCB2',
+'].	c #CAC7AB',
+'^.	c #C6C3AA',
+'/.	c #C2BFA8',
+'(.	c #CBC898',
+'_.	c #FBFBFC',
+':.	c #F7F7F9',
+'<.	c #F4F4F6',
+'[.	c #D5D5DB',
+'}.	c #A2A2AC',
+'|.	c #B0B0B9',
+'1.	c #DFDFE6',
+'2.	c #CDCDD5',
+'3.	c #9B9BA4',
+'4.	c #ADADB1',
+'5.	c #CECDCF',
+'6.	c #D3D2CF',
+'7.	c #B9B8B2',
+'8.	c #97958F',
+'9.	c #C1BFB5',
+'0.	c #C8C5B9',
+'a.	c #AFAD9F',
+'b.	c #A7A491',
+'c.	c #BEBCAD',
+'d.	c #B9B7AC',
+'e.	c #B5B2AC',
+'f.	c #B3B1A9',
+'g.	c #AEACA6',
+'h.	c #F8F8F9',
+'i.	c #F2F2F5',
+'j.	c #EEEEF2',
+'k.	c #EAEAEF',
+'l.	c #BFBFC8',
+'m.	c #E2E2E9',
+'n.	c #D6D6DF',
+'o.	c #ADADB8',
+'p.	c #9B9BA8',
+'q.	c #D2D2DD',
+'r.	c #CECED8',
+'s.	c #C1C1C8',
+'t.	c #909094',
+'u.	c #AEADAF',
+'v.	c #C2C0C1',
+'w.	c #B2B1B0',
+'x.	c #939290',
+'y.	c #A6A4A2',
+'z.	c #B5B3B1',
+'A.	c #B1AFAF',
+'B.	c #ADABAC',
+'C.	c #A8A6AB',
+'D.	c #A4A3A9',
+'E.	c #A5A4A4',
+'F.	c #E6E6EC',
+'G.	c #E1E1E8',
+'H.	c #DDDDE6',
+'I.	c #D9D9E2',
+'J.	c #C6C6D0',
+'K.	c #C3C3CF',
+'L.	c #CCCCD9',
+'M.	c #C4C4D1',
+'N.	c #9898A6',
+'O.	c #B9B9C4',
+'P.	c #B5B5BE',
+'Q.	c #8F8E94',
+'R.	c #97969C',
+'S.	c #B0AEB5',
+'T.	c #ADACB3',
+'U.	c #AAA9AE',
+'V.	c #A6A5AC',
+'W.	c #A2A1A9',
+'X.	c #A09FA8',
+'Y.	c #A4A2A3',
+'Z.	c #D0D0DC',
+'`.	c #CCCCD8',
+' +	c #C8C8D5',
+'.+	c #C3C3D2',
+'++	c #90909F',
+'@+	c #ABABBB',
+'#+	c #B8B8C9',
+'$+	c #A0A0B0',
+'%+	c #8A8A99',
+'&+	c #A0A0AE',
+'*+	c #AAA9B7',
+'=+	c #A6A6B3',
+'-+	c #A2A2AF',
+';+	c #9F9EAC',
+'>+	c #9F9EA9',
+',+	c #BFBFCE',
+'''+	c #B9B9CA',
+')+	c #B6B6C8',
+'!+	c #B2B2C5',
+'~+	c #8C8C9D',
+'{+	c #9393A6',
+']+	c #A5A5BB',
+'^+	c #A1A1B7',
+'/+	c #9D9DB4',
+'(+	c #9B9BB0',
+'_+	c #9A9AAE',
+':+	c #AAAABE',
+'<+	c #A1A1B8',
+'[+	c #9C9CB4',
+'}+	c #9999B2',
+'|+	c #9898B1',
+'1+	c #9E9EB5',
+'                              . + @ # $ % &     ',
+'                            * = - ; > , '' ) @   ',
+'                              ! ~ { ] ^ / ( _ : ',
+'                            < [ } | 1 2 3 4 5   ',
+'                            6 7 8 9 0 a b c d   ',
+'                              e f ~ g h ~ i j k ',
+'                      l m n o p % q r s q t     ',
+'                    u v w x y z A B C D t       ',
+'              E F G H I J K L M N O P           ',
+'          Q R S T U V W X Y Z `  ...+.@.#.      ',
+'      $.R %.&.*.=.-.;.>.,.''.).!.~.{.Z ].^./.(.  ',
+'  _.:.<.[.}.|.1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.f.g.',
+'h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.C.D.E.',
+'    F.G.H.I.J.K.L.M.N.p.O.P.Q.R.S.T.U.V.W.X.Y.  ',
+'          Z.`. +.+++@+#+$+%+&+*+=+-+;+>+        ',
+'              ,+''+)+!+~+{+]+^+/+(+_+            ',
+'                    :+]+<+[+}+|+                ',
+'                      1+}+|+                    ',
+'                                                ',
+'                                                ',
+'                                                ',
+'                                                ',
+'                                                ',
+'                                                ');
+
+{----------------------------------------------------------------------}
+
+{ file: newmodule.xpm  311 XPM }
+
+ImgNewModule : Array [1..309] of string = (
+'24 24 284 2',
+'  	c None',
+'. 	c #A9A66D',
+'+ 	c #A09D6F',
+'@ 	c #B9B469',
+'# 	c #E9E066',
+'$ 	c #FEF258',
+'% 	c #FEF04B',
+'& 	c #FEF25E',
+'* 	c #FEF484',
+'= 	c #FEF68E',
+'- 	c #FEF261',
+'; 	c #FFEF49',
+'> 	c #8D8B73',
+', 	c #969371',
+''' 	c #A4A171',
+') 	c #B4B073',
+'! 	c #C2BD73',
+'~ 	c #DBD372',
+'{ 	c #F4ED8F',
+'] 	c #FDF6A8',
+'^ 	c #FEF8B9',
+'/ 	c #FEF8B8',
+'( 	c #FEF7A2',
+'_ 	c #FEF371',
+': 	c #89887F',
+'< 	c #858477',
+'[ 	c #888776',
+'} 	c #949170',
+'| 	c #9D996C',
+'1 	c #A9A467',
+'2 	c #BBB467',
+'3 	c #D3CB6F',
+'4 	c #ECE7AA',
+'5 	c #F6F1CB',
+'6 	c #FBF9E9',
+'7 	c #FEFBE9',
+'8 	c #FEF9C8',
+'9 	c #FEF7A6',
+'0 	c #FEF267',
+'a 	c #FEF25D',
+'b 	c #7C7C7C',
+'c 	c #9D9C98',
+'d 	c #C7C6BC',
+'e 	c #B1AF9F',
+'f 	c #8B8A76',
+'g 	c #918F74',
+'h 	c #999671',
+'i 	c #A39F6F',
+'j 	c #AFAA6C',
+'k 	c #BFB969',
+'l 	c #D6CF70',
+'m 	c #EFE9A8',
+'n 	c #F8F4DA',
+'o 	c #FBFBFA',
+'p 	c #FBFAF9',
+'q 	c #FAF6D5',
+'r 	c #FEF7A5',
+'s 	c #FEF04F',
+'t 	c #7E7E7A',
+'u 	c #85847A',
+'v 	c #A8A796',
+'w 	c #C8C6B2',
+'x 	c #C1BFA3',
+'y 	c #A3A078',
+'z 	c #AAA671',
+'A 	c #BAB673',
+'B 	c #CCC77C',
+'C 	c #EDE694',
+'D 	c #F3EDB0',
+'E 	c #F5F1CF',
+'F 	c #F8F6EC',
+'G 	c #F8F6EA',
+'H 	c #F4EFC8',
+'I 	c #EDE79E',
+'J 	c #E9DE59',
+'K 	c #7E7D7B',
+'L 	c #818079',
+'M 	c #868577',
+'N 	c #8B8A75',
+'O 	c #A09E81',
+'P 	c #C7C59D',
+'Q 	c #D4D0A1',
+'R 	c #D8D399',
+'S 	c #D4CE87',
+'T 	c #D1C971',
+'U 	c #E2DC8A',
+'V 	c #EDE8AB',
+'W 	c #F2EDBD',
+'X 	c #F1EDBC',
+'Y 	c #DFD982',
+'Z 	c #CBC46F',
+'` 	c #C5BF72',
+' .	c #878787',
+'..	c #7F7F7F',
+'+.	c #7D7D7B',
+'@.	c #8A8976',
+'#.	c #9C9B82',
+'$.	c #C1BEA1',
+'%.	c #C4C1A3',
+'&.	c #C0BC8D',
+'*.	c #CCC784',
+'=.	c #C1BB6B',
+'-.	c #CEC66A',
+';.	c #D9D171',
+'>.	c #E5DF90',
+',.	c #E0D97F',
+'''.	c #D8D071',
+').	c #CAC265',
+'!.	c #B9B265',
+'~.	c #A8A361',
+'{.	c #919191',
+'].	c #909090',
+'^.	c #888888',
+'/.	c #7C7C7B',
+'(.	c #82817C',
+'_.	c #A4A499',
+':.	c #C3C2B6',
+'<.	c #B0AFA9',
+'[.	c #82807B',
+'}.	c #878470',
+'|.	c #969270',
+'1.	c #A29E73',
+'2.	c #CAC485',
+'3.	c #CBC579',
+'4.	c #C5BE65',
+'5.	c #C7BF62',
+'6.	c #C4BD5E',
+'7.	c #C3BC67',
+'8.	c #B2AC61',
+'9.	c #A09A59',
+'0.	c #87834D',
+'a.	c #8B8B8B',
+'b.	c #818181',
+'c.	c #9B9B9B',
+'d.	c #C0BFC1',
+'e.	c #9C9BA4',
+'f.	c #6C6B77',
+'g.	c #6F6E76',
+'h.	c #757374',
+'i.	c #817F71',
+'j.	c #84816F',
+'k.	c #8A866D',
+'l.	c #9E9A6F',
+'m.	c #A7A171',
+'n.	c #C6C07F',
+'o.	c #CAC57C',
+'p.	c #ADA75F',
+'q.	c #9E9852',
+'r.	c #979255',
+'s.	c #827D48',
+'t.	c #837F50',
+'u.	c #BAB9C8',
+'v.	c #686781',
+'w.	c #66667A',
+'x.	c #696878',
+'y.	c #6D6B77',
+'z.	c #706F76',
+'A.	c #7B7872',
+'B.	c #8A8870',
+'C.	c #88846E',
+'D.	c #8C886B',
+'E.	c #8C8663',
+'F.	c #A6A073',
+'G.	c #938E58',
+'H.	c #817C48',
+'I.	c #827E4E',
+'J.	c #7C784D',
+'K.	c #6F6B49',
+'L.	c #A8A7BB',
+'M.	c #747292',
+'N.	c #71708A',
+'O.	c #6C6C81',
+'P.	c #6A6A79',
+'Q.	c #787673',
+'R.	c #7B7970',
+'S.	c #767369',
+'T.	c #6B6656',
+'U.	c #665F4A',
+'V.	c #928D6C',
+'W.	c #86825A',
+'X.	c #726F49',
+'Y.	c #706D49',
+'Z.	c #77744F',
+'`.	c #66644A',
+' +	c #747291',
+'.+	c #767490',
+'++	c #76748C',
+'@+	c #717082',
+'#+	c #696873',
+'$+	c #625F64',
+'%+	c #555151',
+'&+	c #534E4B',
+'*+	c #57514A',
+'=+	c #59534A',
+'-+	c #88826E',
+';+	c #7C795C',
+'>+	c #686549',
+',+	c #65634A',
+'''+	c #68664C',
+')+	c #65634C',
+'!+	c #D1D1D1',
+'~+	c #AEAEAE',
+'{+	c #757391',
+']+	c #78758F',
+'^+	c #6D6A7D',
+'/+	c #48434C',
+'(+	c #4A454B',
+'_+	c #4C474B',
+':+	c #4E494B',
+'<+	c #4F4A4B',
+'[+	c #7C7872',
+'}+	c #73715E',
+'|+	c #5E5D4A',
+'1+	c #5D5B4A',
+'2+	c #626050',
+'3+	c #9E9D89',
+'4+	c #949494',
+'5+	c #B2B2B2',
+'6+	c #CACACA',
+'7+	c #B7B7B7',
+'8+	c #989898',
+'9+	c #6A667F',
+'0+	c #423E4C',
+'a+	c #45414C',
+'b+	c #47424C',
+'c+	c #787474',
+'d+	c #6E6D5F',
+'e+	c #616052',
+'f+	c #8F8E81',
+'g+	c #B0AFA4',
+'h+	c #7B7A6F',
+'i+	c #ADADAD',
+'j+	c #C8C8C8',
+'k+	c #C5C5C5',
+'l+	c #666380',
+'m+	c #3E394C',
+'n+	c #403C4C',
+'o+	c #413D4C',
+'p+	c #433E4C',
+'q+	c #44404C',
+'r+	c #747075',
+'s+	c #A9A89F',
+'t+	c #B4B4AB',
+'u+	c #74736B',
+'v+	c #52514B',
+'w+	c #50504B',
+'x+	c #A0A0A0',
+'y+	c #E1E1E4',
+'z+	c #ADACBE',
+'A+	c #7D7B99',
+'B+	c #666381',
+'C+	c #3B374D',
+'D+	c #3B374C',
+'E+	c #3C384C',
+'F+	c #433F52',
+'G+	c #8A8791',
+'H+	c #C3C2C0',
+'I+	c #7F7E7A',
+'J+	c #4F4F4B',
+'K+	c #4E4E4B',
+'L+	c #4D4D4B',
+'M+	c #4C4C4B',
+'N+	c #BABABA',
+'O+	c #A2A2A2',
+'P+	c #CACACD',
+'Q+	c #B1B0C0',
+'R+	c #8A88A3',
+'S+	c #444055',
+'T+	c #7C7987',
+'U+	c #A8A8AB',
+'V+	c #737373',
+'W+	c #797979',
+'X+	c #626262',
+'Y+	c #4C4C4C',
+'Z+	c #9C9C9C',
+'`+	c #BDBDBE',
+' @	c #BEBECA',
+'.@	c #797790',
+'+@	c #858290',
+'@@	c #AEADB1',
+'#@	c #6E6E6E',
+'$@	c #AFAFAF',
+'%@	c #808080',
+'&@	c #707070',
+'                      . + @ # $ % & * = - ;     ',
+'                    > , '' ) ! ~ { ] ^ / ( _ &   ',
+'              : < [ > } | 1 2 3 4 5 6 7 8 9 0 a ',
+'          b c d e f g h i j k l m n o p q r s   ',
+'    b b b b t u v w x y z A B C D E F G H I J   ',
+'b b b b b b K L M N O P Q R S T U V W X V Y Z ` ',
+' ...b b b b +.L M @.#.$.%.&.*.=.-.;.>.,.''.).!.~.',
+'{.].^...b b /.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.9.0.',
+'{.{.{.{.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.',
+'{.{.{.{.{.{.u.v.w.x.y.z.h.A.B.C.D.E.F.G.H.I.J.K.',
+'{.{.{.{.{.{.L.M.N.O.P.y.z.Q.R.S.T.U.V.W.X.Y.Z.`.',
+'{.{.{.{.{.{.L.M. +.+++@+#+$+%+&+*+=+-+;+>+,+''+)+',
+'!+~+{.{.{.{.L.M.M.M.{+]+^+/+(+_+:+<+[+}+|+1+2+3+',
+'4+5+6+7+8+{.L.M.M.M.M.{+9+0+a+b+/+(+c+d+e+f+g+h+',
+'{.{.{.i+j+k+L.M.M.M.M.M.l+m+n+o+p+q+r+s+t+u+v+w+',
+'{.{.{.{.{.x+y+z+A+M.M.M.B+C+D+E+F+G+H+I+J+K+L+M+',
+'{.{.{.{.{.{.N+O+P+Q+R+M.B+C+S+T+U+V+W+X+Y+Y+Y+Y+',
+'{.{.{.{.{.{.N+{.{.Z+`+ @.@+@@@#@Y+Y+W+X+Y+Y+Y+Y+',
+'  {.{.{.{.{.N+{.{.{.{.{.$@#@Y+Y+Y+Y+W+X+Y+Y+Y+Y+',
+'      {.{.{.N+{.{.{.{.{.%@Y+Y+Y+Y+Y+W+X+Y+Y+    ',
+'          {.N+{.{.{.{.{.%@Y+Y+Y+Y+Y+W+&@        ',
+'              {.{.{.{.{.%@Y+Y+Y+Y+Y+            ',
+'                    {.{.%@Y+Y+Y+                ',
+'                      {.%@Y+                    ');
+
+{----------------------------------------------------------------------}
+
+{ file: newpackage.xpm  296  XPM }
+ImgNewPackage : Array[1..294] of string = (
+'24 24 269 2',
+'  	c None',
+'. 	c #98956D',
+'+ 	c #8D8A6F',
+'@ 	c #ABA669',
+'# 	c #E5DB66',
+'$ 	c #FEF258',
+'% 	c #FEF04B',
+'& 	c #FEF25E',
+'* 	c #FEF484',
+'= 	c #FEF68E',
+'- 	c #FEF261',
+'; 	c #FFEF49',
+'> 	c #777573',
+', 	c #827F71',
+''' 	c #928F71',
+') 	c #A5A173',
+'! 	c #B6B173',
+'~ 	c #D4CD72',
+'{ 	c #F2EB8F',
+'] 	c #FDF6A8',
+'^ 	c #FEF8B9',
+'/ 	c #FEF8B8',
+'( 	c #FEF7A2',
+'_ 	c #FEF371',
+': 	c #71717F',
+'< 	c #6D6C77',
+'[ 	c #716F76',
+'} 	c #767473',
+'| 	c #7F7C70',
+'1 	c #8A856C',
+'2 	c #989367',
+'3 	c #AEA767',
+'4 	c #CAC26F',
+'5 	c #E9E4AA',
+'6 	c #F4EFCB',
+'7 	c #FBF9E9',
+'8 	c #FEFBE9',
+'9 	c #FEF9C8',
+'0 	c #FEF7A6',
+'a 	c #FEF267',
+'b 	c #FEF25D',
+'c 	c #62627C',
+'d 	c #898998',
+'e 	c #BBBBBC',
+'f 	c #A1A09F',
+'g 	c #747376',
+'h 	c #7B7974',
+'i 	c #858271',
+'j 	c #918D6F',
+'k 	c #9F9A6C',
+'l 	c #B2AC69',
+'m 	c #CEC770',
+'n 	c #ECE6A8',
+'o 	c #F7F3DA',
+'p 	c #FAFAFA',
+'q 	c #FAF9F9',
+'r 	c #FAF6D5',
+'s 	c #FEF7A5',
+'t 	c #FEF04F',
+'u 	c #65647A',
+'v 	c #6D6C7A',
+'w 	c #979696',
+'x 	c #BCBBB2',
+'y 	c #B5B3A3',
+'z 	c #918E78',
+'A 	c #999671',
+'B 	c #ADA873',
+'C 	c #C2BD7C',
+'D 	c #E9E394',
+'E 	c #F2ECB0',
+'F 	c #F3F0CF',
+'G 	c #F7F5EC',
+'H 	c #F7F5EA',
+'I 	c #F2EDC8',
+'J 	c #EAE49E',
+'K 	c #E5DA59',
+'L 	c #64647B',
+'M 	c #686879',
+'N 	c #6E6D77',
+'O 	c #747375',
+'P 	c #8E8C81',
+'Q 	c #BDBA9D',
+'R 	c #CBC8A1',
+'S 	c #D0CB99',
+'T 	c #CCC687',
+'U 	c #C8C071',
+'V 	c #DCD68A',
+'W 	c #EAE5AB',
+'X 	c #EFEBBD',
+'Y 	c #EFEABC',
+'Z 	c #D9D282',
+'` 	c #C1BA6F',
+' .	c #B9B472',
+'..	c #6C6A88',
+'+.	c #64647F',
+'@.	c #63637B',
+'#.	c #686779',
+'$.	c #737276',
+'%.	c #8A8882',
+'&.	c #B7B5A1',
+'*.	c #C4C1A3',
+'=.	c #BDB98D',
+'-.	c #C3BE84',
+';.	c #B5AF6B',
+'>.	c #C5BD6A',
+',.	c #D1CA71',
+'''.	c #E0DA90',
+').	c #DBD37F',
+'!.	c #D0C871',
+'~.	c #BFB765',
+'{.	c #ABA465',
+'].	c #9A9361',
+'^.	c #747292',
+'/.	c #737191',
+'(.	c #6D6C89',
+'_.	c #62627B',
+':.	c #68687C',
+'<.	c #939299',
+'[.	c #BAB9B6',
+'}.	c #AFAEA9',
+'|.	c #82807B',
+'1.	c #878470',
+'2.	c #969270',
+'3.	c #A29E73',
+'4.	c #C6C185',
+'5.	c #C2BC79',
+'6.	c #BAB365',
+'7.	c #BCB462',
+'8.	c #B9B15E',
+'9.	c #B7B067',
+'0.	c #A59E61',
+'a.	c #948D5A',
+'b.	c #7B744D',
+'c.	c #6F6E8C',
+'d.	c #666681',
+'e.	c #87879B',
+'f.	c #B9B9C1',
+'g.	c #9C9BA4',
+'h.	c #6C6B77',
+'i.	c #6F6E76',
+'j.	c #757374',
+'k.	c #817F71',
+'l.	c #84816F',
+'m.	c #8A866D',
+'n.	c #9E9A6F',
+'o.	c #A7A171',
+'p.	c #C3BE7F',
+'q.	c #C0BA7C',
+'r.	c #9F985F',
+'s.	c #918A52',
+'t.	c #8D8655',
+'u.	c #766E49',
+'v.	c #777151',
+'w.	c #BAB9C8',
+'x.	c #686781',
+'y.	c #66667A',
+'z.	c #696878',
+'A.	c #6D6B77',
+'B.	c #706F76',
+'C.	c #7B7872',
+'D.	c #8A8870',
+'E.	c #88846E',
+'F.	c #8C886B',
+'G.	c #8C8663',
+'H.	c #A6A073',
+'I.	c #898258',
+'J.	c #756D49',
+'K.	c #76704F',
+'L.	c #6F694E',
+'M.	c #615B4A',
+'N.	c #A8A7BB',
+'O.	c #71708A',
+'P.	c #6C6C81',
+'Q.	c #6A6A79',
+'R.	c #787673',
+'S.	c #7B7970',
+'T.	c #767369',
+'U.	c #6B6656',
+'V.	c #665F4A',
+'W.	c #928D6C',
+'X.	c #7B755B',
+'Y.	c #655E49',
+'Z.	c #625C4A',
+'`.	c #6A6450',
+' +	c #58524B',
+'.+	c #747291',
+'++	c #767490',
+'@+	c #76748C',
+'#+	c #717082',
+'$+	c #696873',
+'%+	c #625F64',
+'&+	c #555151',
+'*+	c #534E4B',
+'=+	c #57514A',
+'-+	c #59534A',
+';+	c #88826E',
+'>+	c #706A5D',
+',+	c #56504B',
+'''+	c #5A554D',
+')+	c #56514C',
+'!+	c #C4C4D1',
+'~+	c #9997AF',
+'{+	c #757391',
+']+	c #78758F',
+'^+	c #6D6A7D',
+'/+	c #48434C',
+'(+	c #4A454B',
+'_+	c #4C474B',
+':+	c #4E494B',
+'<+	c #4F4A4B',
+'[+	c #7C7872',
+'}+	c #66615F',
+'|+	c #524D51',
+'1+	c #95928A',
+'2+	c #787695',
+'3+	c #9D9CB2',
+'4+	c #BCBBCA',
+'5+	c #A5A3B8',
+'6+	c #7D7B99',
+'7+	c #6A667F',
+'8+	c #423E4C',
+'9+	c #45414C',
+'0+	c #47424C',
+'a+	c #787474',
+'b+	c #625D60',
+'c+	c #524D53',
+'d+	c #848181',
+'e+	c #A8A5A5',
+'f+	c #6F6B70',
+'g+	c #9795AD',
+'h+	c #B5B4C5',
+'i+	c #666380',
+'j+	c #3E394C',
+'k+	c #403C4C',
+'l+	c #413D4C',
+'m+	c #433E4C',
+'n+	c #44404C',
+'o+	c #747075',
+'p+	c #A19FA0',
+'q+	c #ADABAB',
+'r+	c #66636B',
+'s+	c #8886A1',
+'t+	c #DCDCE4',
+'u+	c #ACABBE',
+'v+	c #666381',
+'w+	c #3B374D',
+'x+	c #3B374C',
+'y+	c #3C384C',
+'z+	c #433F52',
+'A+	c #8A8791',
+'B+	c #C0BEC1',
+'C+	c #726F7A',
+'D+	c #3E3A4C',
+'E+	c #8A88A3',
+'F+	c #C0BFCE',
+'G+	c #AFAEC0',
+'H+	c #444055',
+'I+	c #7B7987',
+'J+	c #A3A1AC',
+'K+	c #666374',
+'L+	c #6C6979',
+'M+	c #545063',
+'N+	c #82809D',
+'O+	c #797790',
+'P+	c #858290',
+'Q+	c #A9A7B1',
+'R+	c #605D6E',
+'S+	c #9F9EB0',
+'T+	c #625F71',
+'                      . + @ # $ % & * = - ;     ',
+'                    > , '' ) ! ~ { ] ^ / ( _ &   ',
+'              : < [ } | 1 2 3 4 5 6 7 8 9 0 a b ',
+'          c d e f g h i j k l m n o p q r s t   ',
+'    c c c c u v w x y z A B C D E F G H I J K   ',
+'c c c c c c L M N O P Q R S T U V W X Y W Z `  .',
+'..+.c c c c @.#.N $.%.&.*.=.-.;.>.,.''.).!.~.{.].',
+'^./.(.+.c c _.:.<.[.}.|.1.2.3.4.5.6.7.8.9.0.a.b.',
+'^.^.^.^.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.',
+'^.^.^.^.^.^.w.x.y.z.A.B.j.C.D.E.F.G.H.I.J.K.L.M.',
+'^.^.^.^.^.^.N.^.O.P.Q.A.B.R.S.T.U.V.W.X.Y.Z.`. +',
+'^.^.^.^.^.^.N.^..+++@+#+$+%+&+*+=+-+;+>+-+,+''+)+',
+'!+~+^.^.^.^.N.^.^.^.{+]+^+/+(+_+:+<+[+}+<+:+|+1+',
+'2+3+4+5+6+^.N.^.^.^.^.{+7+8+9+0+/+(+a+b+c+d+e+f+',
+'^.^.^.g+w.h+N.^.^.^.^.^.i+j+k+l+m+n+o+p+q+r+l+k+',
+'^.^.^.^.^.s+t+u+6+^.^.^.v+w+x+y+z+A+B+C+D+j+y+x+',
+'^.^.^.^.^.^.N.E+F+G+E+^.v+w+H+I+J+K+L+M+w+w+w+w+',
+'^.^.^.^.^.^.N.^.^.N+u+4+O+P+Q+R+w+w+L+M+w+w+w+w+',
+'  ^.^.^.^.^.N.^.^.^.^.^.S+R+w+w+w+w+L+M+w+w+w+w+',
+'      ^.^.^.N.^.^.^.^.^.v+w+w+w+w+w+L+M+w+w+    ',
+'          ^.N.^.^.^.^.^.v+w+w+w+w+w+L+T+        ',
+'              ^.^.^.^.^.v+w+w+w+w+w+            ',
+'                    ^.^.v+w+w+w+                ',
+'                      ^.v+w+                    ');
+
+{----------------------------------------------------------------------}
+
+{ file: open.xpm  293  XPM }
+
+ImgOpen : Array[1..291 ] of string = (
+'24 24 266 2',
+'  	c None',
+'. 	c #0C7706',
+'+ 	c #0D7607',
+'@ 	c #0C7606',
+'# 	c #0B7406',
+'$ 	c #0A7005',
+'% 	c #097005',
+'& 	c #0C7406',
+'* 	c #16830C',
+'= 	c #19910D',
+'- 	c #18970C',
+'; 	c #15900A',
+'> 	c #0E7D08',
+', 	c #D4A319',
+''' 	c #D5A622',
+') 	c #D6A726',
+'! 	c #D6A92A',
+'~ 	c #D7AA2B',
+'{ 	c #D5A61F',
+'] 	c #128409',
+'^ 	c #199E0E',
+'/ 	c #1CA60F',
+'( 	c #138A09',
+'_ 	c #D5A621',
+': 	c #ECD582',
+'< 	c #F3E594',
+'[ 	c #F6E897',
+'} 	c #F9ED9E',
+'| 	c #FBF4A7',
+'1 	c #E8CB5A',
+'2 	c #D2A114',
+'3 	c #0C7506',
+'4 	c #199D0E',
+'5 	c #1DA80F',
+'6 	c #128709',
+'7 	c #D3A316',
+'8 	c #E8CD7A',
+'9 	c #FFFFB5',
+'0 	c #FFFE97',
+'a 	c #FFFC95',
+'b 	c #FFFA93',
+'c 	c #FFFB93',
+'d 	c #FBEE85',
+'e 	c #DAB031',
+'f 	c #D8AD30',
+'g 	c #DBB238',
+'h 	c #DCB43E',
+'i 	c #DEB743',
+'j 	c #DFBA48',
+'k 	c #E1BC4E',
+'l 	c #E3C056',
+'m 	c #13830A',
+'n 	c #20AA11',
+'o 	c #199D0C',
+'p 	c #D7AA2A',
+'q 	c #FAF4B3',
+'r 	c #FFFD96',
+'s 	c #FFF993',
+'t 	c #FFF893',
+'u 	c #FFF791',
+'v 	c #FFF792',
+'w 	c #FDF39F',
+'x 	c #FDF2A1',
+'y 	c #FDF29F',
+'z 	c #FDF19D',
+'A 	c #FDF19B',
+'B 	c #FEF19A',
+'C 	c #FFF398',
+'D 	c #FFF69D',
+'E 	c #0F7708',
+'F 	c #2BA919',
+'G 	c #22AA12',
+'H 	c #D8AB2B',
+'I 	c #FDF8A5',
+'J 	c #FFFD94',
+'K 	c #FFFA94',
+'L 	c #FFF691',
+'M 	c #FFF68F',
+'N 	c #FFF68D',
+'O 	c #FFF48D',
+'P 	c #FFF38D',
+'Q 	c #FFF591',
+'R 	c #FFF189',
+'S 	c #FCEC7F',
+'T 	c #FCEC80',
+'U 	c #0C7306',
+'V 	c #39AD23',
+'W 	c #38B821',
+'X 	c #D7AB29',
+'Y 	c #FCF49E',
+'Z 	c #FFF590',
+'` 	c #FFF58E',
+' .	c #FFF692',
+'..	c #FEF28C',
+'+.	c #EED55D',
+'@.	c #0A7205',
+'#.	c #107708',
+'$.	c #4DBB30',
+'%.	c #4BC22E',
+'&.	c #0A7105',
+'*.	c #D7AA28',
+'=.	c #FBF39C',
+'-.	c #FFF995',
+';.	c #F9EA7C',
+'>.	c #E1BD41',
+',.	c #E5CA7E',
+'''.	c #35AE21',
+').	c #51AF34',
+'!.	c #5CBB3B',
+'~.	c #69CE44',
+'{.	c #5AC739',
+'].	c #49BC2D',
+'^.	c #097004',
+'/.	c #D7AA29',
+'(.	c #FBF39D',
+'_.	c #FFFD95',
+':.	c #FFFA95',
+'<.	c #FFFD99',
+'[.	c #FFFC97',
+'}.	c #FEF38A',
+'|.	c #FCF185',
+'1.	c #F0D961',
+'2.	c #DEB83F',
+'3.	c #F0DFAF',
+'4.	c #FFFBC6',
+'5.	c #FFF392',
+'6.	c #4BAA2F',
+'7.	c #93EB5F',
+'8.	c #83DE55',
+'9.	c #6FD348',
+'0.	c #38A822',
+'a.	c #0B7306',
+'b.	c #FBF29D',
+'c.	c #FFFE96',
+'d.	c #FFFB95',
+'e.	c #EFDA64',
+'f.	c #E8CB56',
+'g.	c #E6C757',
+'h.	c #E5C65F',
+'i.	c #E4C566',
+'j.	c #E4C672',
+'k.	c #F4E8BC',
+'l.	c #FFFAB1',
+'m.	c #FEF186',
+'n.	c #FEF089',
+'o.	c #FEF08A',
+'p.	c #026B00',
+'q.	c #50AF32',
+'r.	c #91E85E',
+'s.	c #8BE55A',
+'t.	c #5ABE3A',
+'u.	c #0E7508',
+'v.	c #D7A927',
+'w.	c #FAF097',
+'x.	c #FFFF9B',
+'y.	c #ECD45A',
+'z.	c #E0BD5F',
+'A.	c #F3E7BA',
+'B.	c #F9F1C1',
+'C.	c #FCF5C3',
+'D.	c #FDF6C0',
+'E.	c #FFFBBE',
+'F.	c #FFF89F',
+'G.	c #FEF188',
+'H.	c #FEF18C',
+'I.	c #FEF08B',
+'J.	c #0B7205',
+'K.	c #62BF3F',
+'L.	c #79D44F',
+'M.	c #1C8111',
+'N.	c #D4A51C',
+'O.	c #D7A926',
+'P.	c #FAF098',
+'Q.	c #FDF88C',
+'R.	c #DFBB4B',
+'S.	c #FBF4CF',
+'T.	c #FFFDA3',
+'U.	c #FFF78F',
+'V.	c #FFF58B',
+'W.	c #FFF589',
+'X.	c #FFF38C',
+'Y.	c #FEF28D',
+'Z.	c #FBE178',
+'`.	c #147B0C',
+' +	c #1F8413',
+'.+	c #E6C64C',
+'++	c #FCF39C',
+'@+	c #F1DF67',
+'#+	c #E8CF88',
+'$+	c #FFFFBE',
+'%+	c #FFF88C',
+'&+	c #FFF38E',
+'*+	c #FADE74',
+'=+	c #FCEE8A',
+'-+	c #D9AD28',
+';+	c #FBF197',
+'>+	c #E6CB52',
+',+	c #F4E6B8',
+'''+	c #FFFD9F',
+')+	c #FFF891',
+'!+	c #FCE178',
+'~+	c #EFD666',
+'{+	c #D3A218',
+']+	c #D7AA27',
+'^+	c #F3E27E',
+'/+	c #E4C460',
+'(+	c #FEFACA',
+'_+	c #FFFA90',
+':+	c #FFF892',
+'<+	c #FBE278',
+'[+	c #FADD73',
+'}+	c #E0BB3C',
+'|+	c #D8AC2A',
+'1+	c #E7C85A',
+'2+	c #EBD593',
+'3+	c #FFFFB7',
+'4+	c #FFF98F',
+'5+	c #FEF18B',
+'6+	c #FFF28D',
+'7+	c #FEE780',
+'8+	c #F0CC59',
+'9+	c #D6A71F',
+'0+	c #D6A820',
+'a+	c #DCB440',
+'b+	c #F9F1C5',
+'c+	c #FFFD9A',
+'d+	c #FFF992',
+'e+	c #FFF490',
+'f+	c #FFF693',
+'g+	c #FFF390',
+'h+	c #FDEE8A',
+'i+	c #FAE781',
+'j+	c #F1D364',
+'k+	c #DDB02E',
+'l+	c #D3A212',
+'m+	c #E1BF63',
+'n+	c #FFFECB',
+'o+	c #FFFB8F',
+'p+	c #FFFA98',
+'q+	c #FFF997',
+'r+	c #FCED89',
+'s+	c #F4DF75',
+'t+	c #EDD05F',
+'u+	c #E6C24A',
+'v+	c #DDB434',
+'w+	c #D7A923',
+'x+	c #D5A51C',
+'y+	c #D4A51B',
+'z+	c #D3A317',
+'A+	c #F0DFA9',
+'B+	c #FFFFB8',
+'C+	c #FFFE99',
+'D+	c #FFF996',
+'E+	c #FDF291',
+'F+	c #F8E781',
+'G+	c #F0D76B',
+'H+	c #E9C955',
+'I+	c #E1BA3F',
+'J+	c #D9AD29',
+'K+	c #D5A61E',
+'L+	c #D6A825',
+'M+	c #E8CA58',
+'N+	c #E1BC43',
+'O+	c #DAAF2D',
+'P+	c #D6A720',
+'Q+	c #D4A31A',
+'                                                ',
+'                        . + @ # $               ',
+'                      % & * = - ; > .           ',
+'      , '' ) ! ~ {             ] ^ / ( $         ',
+'    _ : < [ } | 1 2             3 4 5 6 .       ',
+'  7 8 9 0 a b c d e f g h i j k l m n o .       ',
+'  p q r b s t u v w x y z A B C D E F G .       ',
+'  H I J K s t v L M N O P Q R S T U V W .       ',
+'  X Y r K s t v L Z `  ...+.@.@.@.#.$.%.. . @.&.',
+'  *.=.r K s t t v L -.;.>.,.@.''.).!.~.{.].''.''.^.',
+'  /.(._.:.<.[.u }.|[email protected].''.0.a.  ',
+'  /.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.    ',
+'  v.w.x.y.z.A.B.C.D.E.F.G.H.I.o.I.J.K.L.M.N.    ',
+'  O.P.Q.R.S.T.s U.V.W.X.Y.H.I.o.I.Z.`. +.+      ',
+'  O.++@+#+$+%+u L Z ` &+Y.H.I.o.I.Z.*+=+-+      ',
+'  O.;+>+,+''+)+v L Z ` &+Y.H.I.H.I.Z.!+~+{+      ',
+'  ]+^+/+(+_+:+v L Z ` &+Y.H.I.o.I.<+[+}+        ',
+'  |+1+2+3+4+t v L Z ` &+Y.H.I.5+6+7+8+9+        ',
+'  0+a+b+c+d+t v L Z M e+Q f+g+h+i+j+k+          ',
+'  l+m+n+o+K K :.p+q+e+r+s+t+u+v+w+x+y+          ',
+'  z+A+B+C+D+E+F+G+H+I+J+K+{+                    ',
+'  L+L+L+M+N+O+P+Q+                              ',
+'                                                ',
+'                                                ');
+
+{----------------------------------------------------------------------}
+
+{ file: para.xpm 25  XPM }
+
+ImgPara : Array[1..20] of string = (
+{ columns rows colors chars-per-pixel }
+'16 16 3 1',
+'  c black',
+'. c gray44',
+'X c None',
+{ pixels }
+'XXXXXXXXXXXXXXXX',
+'XXXXXXXXXXXXXXXX',
+'XXXXX        XXX',
+'XXXX    XX XXXXX',
+'XXX     XX XXXXX',
+'XXX     XX XXXXX',
+'XXX     XX XXXXX',
+'XXXX    XX XXXXX',
+'XXXXX   XX XXXXX',
+'XXXXXXX XX XXXXX',
+'XXXXXXX XX XXXXX',
+'XXXXXXX XX XXXXX',
+'XXXXXXX XX XXXXX',
+'XXXXXXX XX XXXXX',
+'XXXXXXXXXXXXXXXX',
+'XXXXXXXXXXXXXXXX'
+);
+
+{----------------------------------------------------------------------}
+
+{ file: remark.xpm  29 XPM }
+ImgRemark : Array[1..24] of string = (
+{ columns rows colors chars-per-pixel }
+'16 16 7 1',
+'  c black',
+'. c gray44',
+'X c maroon',
+'o c fractal',
+'O c silver',
+'+ c gray100',
+'@ c None',
+{ pixels }
+'@@@@@@@@@@@@@@@@',
+'@@@@@@@@@@@@X@@@',
+'      @@@@@XXX@@',
+' ++++  @@@@XXX@@',
+' +ooO O @@@XXX@@',
+' ++++    @@XXX@@',
+' +ooOOO+ @@XXX@@',
+' +++++++ @@XXX@@',
+' +ooooo+ @@oXo@@',
+' +o+++o+ @@@X@@@',
+' +ooooo+ @@@@@@@',
+' +++++++ @@oXo@@',
+'         @@XXX@@',
+'@@@@@@@@@@@oXo@@',
+'@@@@@@@@@@@@@@@@',
+'@@@@@@@@@@@@@@@@'
+);
+
+{----------------------------------------------------------------------}
+
+{ file: save.xpm 255  XPM }
+
+ImgSave : Array[1..253] of string = (
+'24 24 228 2',
+'  	c None',
+'. 	c #6C73AD',
+'+ 	c #4045A1',
+'@ 	c #8789B6',
+'# 	c #CBCBC6',
+'$ 	c #C3C3C4',
+'% 	c #C3C3C3',
+'& 	c #C8C9CF',
+'* 	c #8484B8',
+'= 	c #454496',
+'- 	c #4D4C9A',
+'; 	c #7682B4',
+'> 	c #6B6FBF',
+', 	c #4145AA',
+''' 	c #9B9ECB',
+') 	c #F2F3F3',
+'! 	c #E8E9EF',
+'~ 	c #EBECF0',
+'{ 	c #DFE0E8',
+'] 	c #8A8BC8',
+'^ 	c #5353B8',
+'/ 	c #5D5CB8',
+'( 	c #4E4D9A',
+'_ 	c #6B6EC4',
+': 	c #4145AC',
+'< 	c #A2A5D2',
+'[ 	c #FFFFFF',
+'} 	c #F4F5FC',
+'| 	c #F5F6FD',
+'1 	c #F7F8FF',
+'2 	c #E6E7F1',
+'3 	c #8C8DCC',
+'4 	c #5959C3',
+'5 	c #6261C1',
+'6 	c #A1A4D1',
+'7 	c #FEFFFF',
+'8 	c #E5E5EB',
+'9 	c #CFCFD2',
+'0 	c #D0D1D3',
+'a 	c #CECED0',
+'b 	c #E3E4E9',
+'c 	c #E7E8F2',
+'d 	c #5757C1',
+'e 	c #6160C0',
+'f 	c #EBECF2',
+'g 	c #DFE0E5',
+'h 	c #E0E1E5',
+'i 	c #DFDFE4',
+'j 	c #ECEDF2',
+'k 	c #E6E7EC',
+'l 	c #D1D1D4',
+'m 	c #D2D2D5',
+'n 	c #D0D0D2',
+'o 	c #E5E5E9',
+'p 	c #E7E8F1',
+'q 	c #EEEEF5',
+'r 	c #E7E8ED',
+'s 	c #F0F0F5',
+'t 	c #CACACC',
+'u 	c #CCCCCD',
+'v 	c #C8C9CA',
+'w 	c #E2E2E6',
+'x 	c #FDFFFF',
+'y 	c #F1F2F8',
+'z 	c #F0F1F8',
+'A 	c #F4F5FB',
+'B 	c #E5E6EF',
+'C 	c #A3A6D2',
+'D 	c #F6F7FD',
+'E 	c #E6E7EF',
+'F 	c #9A9ECE',
+'G 	c #F3F5FA',
+'H 	c #ECEDF6',
+'I 	c #EEEFF7',
+'J 	c #F2F3FA',
+'K 	c #E4E5EE',
+'L 	c #8D8ECD',
+'M 	c #6C6FC4',
+'N 	c #4A4EB0',
+'O 	c #4449A5',
+'P 	c #686CB5',
+'Q 	c #8C8FC4',
+'R 	c #A9ABD0',
+'S 	c #BBBCD7',
+'T 	c #BEBFD8',
+'U 	c #BDBED8',
+'V 	c #C2C3D8',
+'W 	c #9090D1',
+'X 	c #6161CC',
+'Y 	c #7681B4',
+'Z 	c #6B6EC3',
+'` 	c #6060C6',
+' .	c #5C5DC1',
+'..	c #6163C4',
+'+.	c #6B6CC8',
+'@.	c #7272CB',
+'#.	c #7677CD',
+'$.	c #7879CD',
+'%.	c #6F6FCD',
+'&.	c #6666CD',
+'*.	c #6565CC',
+'=.	c #6363CC',
+'-.	c #6161CB',
+';.	c #6262CB',
+'>.	c #6261CC',
+',.	c #5F5FCA',
+'''.	c #5F5FC9',
+').	c #6767CE',
+'!.	c #6666CB',
+'~.	c #5C5CBD',
+'{.	c #7271B9',
+'].	c #A5A7D3',
+'^.	c #A0A0C9',
+'/.	c #9999BF',
+'(.	c #9494B8',
+'_.	c #8D8DB1',
+':.	c #9E9FC3',
+'<.	c #B1B2D8',
+'[.	c #C0C2E6',
+'}.	c #7677C5',
+'|.	c #3F3FA7',
+'1.	c #4545AA',
+'2.	c #4949AE',
+'3.	c #6261C2',
+'4.	c #5656B5',
+'5.	c #7B7CAE',
+'6.	c #A8AAC5',
+'7.	c #6565A6',
+'8.	c #6060A1',
+'9.	c #64649D',
+'0.	c #9F9F9E',
+'a.	c #B8B9B4',
+'b.	c #D4D6D3',
+'c.	c #ECEFEC',
+'d.	c #8182C3',
+'e.	c #262690',
+'f.	c #303095',
+'g.	c #37379C',
+'h.	c #5B5BC1',
+'i.	c #6262C2',
+'j.	c #5757B7',
+'k.	c #797AAB',
+'l.	c #8B8CB5',
+'m.	c #2B2B97',
+'n.	c #323297',
+'o.	c #A6A6AD',
+'p.	c #CECFCF',
+'q.	c #E0E3E6',
+'r.	c #F0F3F6',
+'s.	c #8082C4',
+'t.	c #292993',
+'u.	c #333398',
+'v.	c #39399E',
+'w.	c #5C5CC2',
+'x.	c #5858B8',
+'y.	c #7676A5',
+'z.	c #8889AD',
+'A.	c #323298',
+'B.	c #2F2F97',
+'C.	c #4848A0',
+'D.	c #C1C2C9',
+'E.	c #E1E3E5',
+'F.	c #EDF0F3',
+'G.	c #F6F9FD',
+'H.	c #7E7FC2',
+'I.	c #7474A2',
+'J.	c #8484A7',
+'K.	c #3F3F9F',
+'L.	c #7375B5',
+'M.	c #D7D8DE',
+'N.	c #EDEFF2',
+'O.	c #F5F7FB',
+'P.	c #F8FBFE',
+'Q.	c #F7FAFA',
+'R.	c #7C7CBE',
+'S.	c #2A2994',
+'T.	c #71719E',
+'U.	c #7E7DA1',
+'V.	c #3C3D9E',
+'W.	c #6E70B4',
+'X.	c #9DA0C9',
+'Y.	c #E5E8EC',
+'Z.	c #F7FAFE',
+'`.	c #F2F5F9',
+' +	c #EFF0F0',
+'.+	c #7879BB',
+'++	c #2A2A94',
+'@+	c #6565CD',
+'#+	c #5958BA',
+'$+	c #6C6C9B',
+'%+	c #8D8DA1',
+'&+	c #8081B5',
+'*+	c #ACAFCF',
+'=+	c #CACCDF',
+'-+	c #F1F5F9',
+';+	c #F9FCFF',
+'>+	c #EBEDEF',
+',+	c #E8E9E8',
+'''+	c #7776B9',
+')+	c #292A94',
+'!+	c #6464C9',
+'~+	c #6565CB',
+'{+	c #6A699A',
+']+	c #B1B1B0',
+'^+	c #CBCDCD',
+'/+	c #EAEBEE',
+'(+	c #E0E2E3',
+'_+	c #DFDFDE',
+':+	c #7676B6',
+'<+	c #2C2C95',
+'[+	c #353598',
+'}+	c #3A3A9E',
+'|+	c #6C74AE',
+'1+	c #52529F',
+'2+	c #4F4E9C',
+'3+	c #484799',
+'4+	c #7473A3',
+'5+	c #B8B8B7',
+'6+	c #B6B6B8',
+'7+	c #B7B7B9',
+'8+	c #B7B8BA',
+'9+	c #B7B7BA',
+'0+	c #B6B6B7',
+'a+	c #B8B8B8',
+'b+	c #7171A4',
+'c+	c #464598',
+'d+	c #4B4A99',
+'e+	c #4C4B99',
+'    . + @ # $ $ $ $ $ $ $ $ $ $ $ $ % & * = -   ',
+'  ; > , '' ) ! ! ! ! ! ! ! ! ! ! ! ! ~ { ] ^ / ( ',
+'  ; _ : < [ } | | | | | | | | | | | 1 2 3 4 5 ( ',
+'  ; _ : 6 7 8 9 0 0 0 0 0 0 0 0 0 a b c 3 d e ( ',
+'  ; _ : 6 7 f g h h h h h h h h h i j 2 3 d e ( ',
+'  ; _ : 6 7 f g h h h h h h h h h i j 2 3 d e ( ',
+'  ; _ : 6 7 k l m m m m m m m m m n o p 3 d e ( ',
+'  ; _ : 6 7 q r r r r r r r r r r k s 2 3 d e ( ',
+'  ; _ : 6 7 b t u u u u u u u u u v w c 3 d e ( ',
+'  ; _ : 6 x y z y y y y y y y y y z A B 3 d e ( ',
+'  ; _ : C [ A A A A A A A A A A A A D E 3 d e ( ',
+'  ; _ : F G H I z z z z z z z z z z J K L 4 e ( ',
+'  ; M N O P Q R S T U U U U U U U U U V W X e - ',
+'  Y Z `  ...+.@.#.#.#.#.#.#.#.#.#.#.#.$.%.&.e - ',
+'  Y Z &.&.&.*.=.-.;.;.>.>.-.,.,.''.;.*.=.&.).e - ',
+'  Y Z *.!.).~.{.].^./.(._._.:.<.[.}.|.1.2.` 3.- ',
+'  Y Z *.!.).4.5.6.7.8.9.0.a.b.c.[ d.e.f.g.h.i.- ',
+'  Y Z *.!.).j.k.l.m.m.n.o.p.q.r.x s.t.u.v.w.i.- ',
+'  Y Z *.!.).x.y.z.A.B.C.D.E.F.G.x H.t.u.v.w.i.- ',
+'  Y Z *.!.).x.I.J.B.K.L.M.N.O.P.Q.R.S.u.v.w.i.- ',
+'  Y Z *.!.).x.T.U.V.W.X.Y.O.Z.`. +.+++u.v.w.i.- ',
+'  Y Z @+&.).#+$+%+&+*+=+-+;+O.>+,+''+)+u.v.w.i.- ',
+'  Y Z !+!+~+j.{+]+^+E.N.`.-+/+(+_+:+<+[+}+h.e - ',
+'    |+1+( 2+3+4+5+6+7+8+9+7+6+0+a+b+c+d+e+( (   ');
+{----------------------------------------------------------------------}
+{ file: saveas.xpm 247  XPM }
+ImgSaveAs : Array[1..245] of string = (
+'24 24 220 2',
+'  	c None',
+'. 	c #6C73AD',
+'+ 	c #4045A1',
+'@ 	c #8789B6',
+'# 	c #CBCBC6',
+'$ 	c #C3C3C4',
+'% 	c #C3C3C3',
+'& 	c #C8C9CF',
+'* 	c #8484B8',
+'= 	c #454496',
+'- 	c #4D4C9A',
+'; 	c #7682B4',
+'> 	c #6B6FBF',
+', 	c #4145AA',
+''' 	c #9B9ECB',
+') 	c #F2F3F3',
+'! 	c #E8E9EF',
+'~ 	c #EBECF0',
+'{ 	c #DFE0E8',
+'] 	c #8A8BC8',
+'^ 	c #5353B8',
+'/ 	c #5D5CB8',
+'( 	c #4E4D9A',
+'_ 	c #6B6EC4',
+': 	c #4145AC',
+'< 	c #A2A5D2',
+'[ 	c #FFFFFF',
+'} 	c #F4F5FC',
+'| 	c #F5F6FD',
+'1 	c #F7F8FF',
+'2 	c #E6E7F1',
+'3 	c #8C8DCC',
+'4 	c #5959C3',
+'5 	c #6261C1',
+'6 	c #A1A4D1',
+'7 	c #FEFFFF',
+'8 	c #E5E5EB',
+'9 	c #CFCFD2',
+'0 	c #D0D1D3',
+'a 	c #CECED0',
+'b 	c #E3E4E9',
+'c 	c #E7E8F2',
+'d 	c #5757C1',
+'e 	c #6160C0',
+'f 	c #EBECF2',
+'g 	c #DFE0E5',
+'h 	c #E0E1E5',
+'i 	c #DFDFE4',
+'j 	c #ECEDF2',
+'k 	c #E6E7EC',
+'l 	c #D1D1D4',
+'m 	c #D2D2D5',
+'n 	c #D0D0D2',
+'o 	c #E5E5E9',
+'p 	c #E7E8F1',
+'q 	c #EEEEF5',
+'r 	c #E7E8ED',
+'s 	c #F0F0F5',
+'t 	c #CACACC',
+'u 	c #CCCCCD',
+'v 	c #C8C9CA',
+'w 	c #E2E2E6',
+'x 	c #FDFFFF',
+'y 	c #F1F2F8',
+'z 	c #F0F1F8',
+'A 	c #F4F5FB',
+'B 	c #E5E6EF',
+'C 	c #A3A6D2',
+'D 	c #F6F7FD',
+'E 	c #E6E7EF',
+'F 	c #9A9ECE',
+'G 	c #F3F5FA',
+'H 	c #ECEDF6',
+'I 	c #EEEFF7',
+'J 	c #F2F3FA',
+'K 	c #E4E5EE',
+'L 	c #8D8ECD',
+'M 	c #6C6FC4',
+'N 	c #4A4EB0',
+'O 	c #4449A5',
+'P 	c #686CB5',
+'Q 	c #8C8FC4',
+'R 	c #A9ABD0',
+'S 	c #BBBCD7',
+'T 	c #BEBFD8',
+'U 	c #BDBED8',
+'V 	c #C2C3D8',
+'W 	c #9090D1',
+'X 	c #6161CC',
+'Y 	c #7681B4',
+'Z 	c #6B6EC3',
+'` 	c #6060C6',
+' .	c #5C5DC1',
+'..	c #6163C4',
+'+.	c #6B6CC8',
+'@.	c #7272CB',
+'#.	c #7677CD',
+'$.	c #7879CD',
+'%.	c #6F6FCD',
+'&.	c #6666CD',
+'*.	c #6565CC',
+'=.	c #6363CC',
+'-.	c #6161CB',
+';.	c #6262CB',
+'>.	c #6261CC',
+',.	c #5F5FCA',
+'''.	c #5F5FC9',
+').	c #6767CE',
+'!.	c #6666CB',
+'~.	c #5C5CBD',
+'{.	c #7271B9',
+'].	c #A5A7D3',
+'^.	c #A0A0C9',
+'/.	c #9999BF',
+'(.	c #9494B8',
+'_.	c #8D8DB1',
+':.	c #9E9FC3',
+'<.	c #B1B2D8',
+'[.	c #C0C2E6',
+'}.	c #7677C5',
+'|.	c #3F3FA7',
+'1.	c #4545AA',
+'2.	c #4949AE',
+'3.	c #6261C2',
+'4.	c #5656B5',
+'5.	c #7B7CAE',
+'6.	c #A8AAC5',
+'7.	c #6565A6',
+'8.	c #6060A1',
+'9.	c #64649D',
+'0.	c #9F9F9E',
+'a.	c #B8B9B4',
+'b.	c #D4D6D3',
+'c.	c #ECEFEC',
+'d.	c #8182C3',
+'e.	c #262690',
+'f.	c #303095',
+'g.	c #37379C',
+'h.	c #5B5BC1',
+'i.	c #6262C2',
+'j.	c #5757B7',
+'k.	c #797AAB',
+'l.	c #8B8CB5',
+'m.	c #2B2B97',
+'n.	c #323297',
+'o.	c #A6A6AD',
+'p.	c #CECFCF',
+'q.	c #E0E3E6',
+'r.	c #F0F3F6',
+'s.	c #8082C4',
+'t.	c #292993',
+'u.	c #333398',
+'v.	c #39399E',
+'w.	c #5C5CC2',
+'x.	c #5858B8',
+'y.	c #7676A5',
+'z.	c #8889AD',
+'A.	c #323298',
+'B.	c #2F2F97',
+'C.	c #4848A0',
+'D.	c #C1C2C9',
+'E.	c #E1E3E5',
+'F.	c #EDF0F3',
+'G.	c #F6F9FD',
+'H.	c #7E7FC2',
+'I.	c #7474A2',
+'J.	c #8484A7',
+'K.	c #3F3F9F',
+'L.	c #7375B5',
+'M.	c #D7D8DE',
+'N.	c #EDEFF2',
+'O.	c #F5F7FB',
+'P.	c #F8FBFE',
+'Q.	c #F7FAFA',
+'R.	c #7C7CBE',
+'S.	c #2A2994',
+'T.	c #71719E',
+'U.	c #7E7DA1',
+'V.	c #3C3D9E',
+'W.	c #6E70B4',
+'X.	c #9DA0C9',
+'Y.	c #E5E8EC',
+'Z.	c #F7FAFE',
+'`.	c #00FFFF',
+' +	c #2A2A94',
+'.+	c #6565CD',
+'++	c #5958BA',
+'@+	c #6C6C9B',
+'#+	c #8D8DA1',
+'$+	c #8081B5',
+'%+	c #ACAFCF',
+'&+	c #CACCDF',
+'*+	c #F1F5F9',
+'=+	c #F9FCFF',
+'-+	c #292A94',
+';+	c #6464C9',
+'>+	c #6565CB',
+',+	c #6A699A',
+'''+	c #B1B1B0',
+')+	c #CBCDCD',
+'!+	c #F2F5F9',
+'~+	c #EAEBEE',
+'{+	c #2C2C95',
+']+	c #353598',
+'^+	c #6C74AE',
+'/+	c #52529F',
+'(+	c #4F4E9C',
+'_+	c #484799',
+':+	c #7473A3',
+'<+	c #B8B8B7',
+'[+	c #B6B6B8',
+'}+	c #B7B7B9',
+'|+	c #B7B8BA',
+'1+	c #B7B7BA',
+'2+	c #B6B6B7',
+'3+	c #B8B8B8',
+'4+	c #7171A4',
+'5+	c #464598',
+'6+	c #4B4A99',
+'7+	c #4C4B99',
+'    . + @ # $ $ $ $ $ $ $ $ $ $ $ $ % & * = -   ',
+'  ; > , '' ) ! ! ! ! ! ! ! ! ! ! ! ! ~ { ] ^ / ( ',
+'  ; _ : < [ } | | | | | | | | | | | 1 2 3 4 5 ( ',
+'  ; _ : 6 7 8 9 0 0 0 0 0 0 0 0 0 a b c 3 d e ( ',
+'  ; _ : 6 7 f g h h h h h h h h h i j 2 3 d e ( ',
+'  ; _ : 6 7 f g h h h h h h h h h i j 2 3 d e ( ',
+'  ; _ : 6 7 k l m m m m m m m m m n o p 3 d e ( ',
+'  ; _ : 6 7 q r r r r r r r r r r k s 2 3 d e ( ',
+'  ; _ : 6 7 b t u u u u u u u u u v w c 3 d e ( ',
+'  ; _ : 6 x y z y y y y y y y y y z A B 3 d e ( ',
+'  ; _ : C [ A A A A A A A A A A A A D E 3 d e ( ',
+'  ; _ : F G H I z z z z z z z z z z J K L 4 e ( ',
+'  ; M N O P Q R S T U U U U U U U U U V W X e - ',
+'  Y Z `  ...+.@.#.#.#.#.#.#.#.#.#.#.#.$.%.&.e - ',
+'  Y Z &.&.&.*.=.-.;.;.>.>.-.,.,.''.;.*.=.&.).e - ',
+'  Y Z *.!.).~.{.].^./.(._._.:.<.[.}.|.1.2.` 3.- ',
+'  Y Z *.!.).4.5.6.7.8.9.0.a.b.c.[ d.e.f.g.h.i.- ',
+'  Y Z *.!.).j.k.l.m.m.n.o.p.q.r.x s.t.u.v.w.i.- ',
+'  Y Z *.!.).x.y.z.A.B.C.D.E.F.G.x H.t.u.v.w.i.- ',
+'  Y Z *.!.).x.I.J.B.K.L.M.N.O.P.Q.R.S.u.v.w.i.- ',
+'  Y Z *.!.).x.T.U.V.W.X.Y.O.Z.`.`.`. +u.`.`.`.- ',
+'  Y Z .+&.).++@+#+$+%+&+*+=+O.`.`.`.-+u.`.`.`.- ',
+'  Y Z ;+;+>+j.,+''+)+E.N.!+*+~+`.`.`.{+]+`.`.`.- ',
+'    ^+/+( (+_+:+<+[+}+|+1+}+[+2+3+4+5+6+7+( (   ');
+
+{----------------------------------------------------------------------}
+
+{ file: table.xpm  28 XPM }
+
+ImgTable : Array[1..23] of string = (
+{ columns rows colors chars-per-pixel }
+'16 16 6 1',
+'  c black',
+'. c gray44',
+'X c navy',
+'o c fractal',
+'O c gray100',
+'+ c None',
+{ pixels }
+'++++++++++++++++',
+'++++++++++++++++',
+'                ',
+' XXXXXXXXXXXXXX ',
+' XXXXXXXXXXXXXX ',
+' oooooooooooooo ',
+' OOoOOOoOOOoOOO ',
+' OOoOOOoOOOoOOO ',
+' oooooooooooooo ',
+' OOoOOOoOOOoOOO ',
+' OOoOOOoOOOoOOO ',
+' oooooooooooooo ',
+' OOoOOOoOOOoOOO ',
+' OOoOOOoOOOoOOO ',
+'                ',
+'++++++++++++++++'
+);
+
+{----------------------------------------------------------------------}
+
+{ file: underline.xpm   38  XPM }
+ImgUnderline : Array[1..33] of string = (
+{ columns rows colors chars-per-pixel }
+'16 16 16 1',
+'  c black',
+'. c maroon',
+'X c green',
+'o c olive',
+'O c navy',
+'+ c purple',
+'@ c teal',
+'# c fractal',
+'$ c silver',
+'% c red',
+'& c lime',
+'* c yellow',
+'= c blue',
+'- c fuchsia',
+'; c aqua',
+': c gray100',
+{ pixels }
+'$$$$$$$$$$$$$$$$',
+'$$$$$$$$$$$$$$$$',
+'$$$$$$$$$$$$$$$$',
+'$$$    $    $$$$',
+'$$$$  $$$  $$$$$',
+'$$$$  $$$  $$$$$',
+'$$$$  $$$  $$$$$',
+'$$$$  $$$  $$$$$',
+'$$$$  $$$  $$$$$',
+'$$$$  $$$  $$$$$',
+'$$$$  #$#  $$$$$',
+'$$$$$     $$$$$$',
+'$$$$$$$$$$$$$$$$',
+'$$$         $$$$',
+'$$$$$$$$$$$$$$$$',
+'$$$$$$$$$$$$$$$$'
+);
+
+
+{----------------------------------------------------------------------}
+
+
+{ file: var.xpm   26  XPM }
+
+ImgVar : Array[1..21] of string = (
+{ columns rows colors chars-per-pixel }
+'16 16 4 1',
+'  c gray44',
+'. c navy',
+'X c fractal',
+'o c None',
+{ pixels }
+'oooooooooooooooo',
+'oooo......oooooo',
+'oo...XXXX...oooo',
+'oo..XXoooo..Xooo',
+'o..XXoooooo..ooo',
+'o..Xooooooo..Xoo',
+'o..Xooooooo..Xoo',
+'oo..oooooo..XXoo',
+'ooo.Xooooo.XXooo',
+'oooo.oooo.XXoooo',
+'o.oo..ooo..oo.oo',
+'o.....Xoo.....Xo',
+'o.....Xoo.....Xo',
+'ooXXXXXoooXXXXXo',
+'oooooooooooooooo',
+'oooooooooooooooo'
+);
+
+{----------------------------------------------------------------------}
+
+Implementation
+
+end.