diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-08-11 17:07:34 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2010-08-11 18:21:38 +0200 |
commit | f038b1019731c61de8de52d46e8e7d8f538224ac (patch) | |
tree | 659b5f8f22727ae5172e525b994e2d82a050c2dd /docview/src | |
parent | 15c057a201db9af730d6ad717301367b5a5c2dfb (diff) | |
download | fpGUI-f038b1019731c61de8de52d46e8e7d8f538224ac.tar.xz |
docview: Replaced fake NullObject unit with HelpBitmap unit.
Diffstat (limited to 'docview/src')
-rw-r--r-- | docview/src/HelpFile.pas | 11 | ||||
-rw-r--r-- | docview/src/IPFFileFormatUnit.pas | 6 | ||||
-rw-r--r-- | docview/src/docview.lpi | 74 | ||||
-rw-r--r-- | docview/src/docview.lpr | 4 | ||||
-rw-r--r-- | docview/src/frm_main.pas | 4 | ||||
-rw-r--r-- | docview/src/nvUtilities.pas | 6 |
6 files changed, 56 insertions, 49 deletions
diff --git a/docview/src/HelpFile.pas b/docview/src/HelpFile.pas index ac5e68e7..bca6aedd 100644 --- a/docview/src/HelpFile.pas +++ b/docview/src/HelpFile.pas @@ -16,9 +16,8 @@ uses ,fpg_imagelist ,IPFFileFormatUnit ,HelpTopic -// ,HelpBitmap + ,HelpBitmap ,SearchTable - ,nvNullObjects // Fake various classes like TImageList ; type @@ -190,7 +189,8 @@ uses // DebugUnit, // ACLFileIOUtility, // ACLLanguageUnit; - nvUtilities + fpg_main + ,nvUtilities ,ACLStringUtility ; @@ -1079,8 +1079,9 @@ begin + ': ' + e.Message );} begin - Bitmap := THelpBitmap.Create; - Bitmap.LoadFromResourceName( 'MissingBitmap' ); // TODO: Add image resource to DocView +// Bitmap := THelpBitmap.Create; + Bitmap := THelpBitmap(fpgImages.GetImage('stdimg.dlg.critical')); +// Bitmap.LoadFromResourceName( 'MissingBitmap' ); // TODO: Add image resource to DocView end; end; diff --git a/docview/src/IPFFileFormatUnit.pas b/docview/src/IPFFileFormatUnit.pas index 1acc7857..b954f4c8 100644 --- a/docview/src/IPFFileFormatUnit.pas +++ b/docview/src/IPFFileFormatUnit.pas @@ -2,11 +2,7 @@ Unit IPFFileFormatUnit; {$mode objfpc}{$H+} -// NewView - a new OS/2 Help Viewer -// Copyright 2003 Aaron Lawrence (aaronl at consultant dot com) -// This software is released under the Gnu Public License - see readme.txt - -Interface +interface // Definition of IPF file header and other structures diff --git a/docview/src/docview.lpi b/docview/src/docview.lpi index 47544ba7..e8a7850b 100644 --- a/docview/src/docview.lpi +++ b/docview/src/docview.lpi @@ -79,101 +79,101 @@ <UnitName Value="nvUtilities"/> </Unit8> <Unit9> - <Filename Value="nvNullObjects.pas"/> + <Filename Value="../docs/inf04.txt"/> <IsPartOfProject Value="True"/> - <UnitName Value="nvNullObjects"/> </Unit9> <Unit10> - <Filename Value="../docs/inf04.txt"/> + <Filename Value="SearchUnit.pas"/> <IsPartOfProject Value="True"/> + <UnitName Value="SearchUnit"/> </Unit10> <Unit11> - <Filename Value="SearchUnit.pas"/> + <Filename Value="../components/richtext/RichTextStyleUnit.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="SearchUnit"/> + <UnitName Value="RichTextStyleUnit"/> </Unit11> <Unit12> - <Filename Value="../components/richtext/RichTextStyleUnit.pas"/> + <Filename Value="../components/richtext/CanvasFontManager.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="RichTextStyleUnit"/> + <UnitName Value="CanvasFontManager"/> </Unit12> <Unit13> - <Filename Value="../components/richtext/CanvasFontManager.pas"/> + <Filename Value="../components/richtext/ACLStringUtility.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="CanvasFontManager"/> + <UnitName Value="ACLStringUtility"/> </Unit13> <Unit14> - <Filename Value="../components/richtext/ACLStringUtility.pas"/> + <Filename Value="../components/richtext/RichTextDocumentUnit.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="ACLStringUtility"/> + <UnitName Value="RichTextDocumentUnit"/> </Unit14> <Unit15> - <Filename Value="../components/richtext/RichTextDocumentUnit.pas"/> + <Filename Value="../components/richtext/RichTextView.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="RichTextDocumentUnit"/> + <UnitName Value="RichTextView"/> </Unit15> <Unit16> - <Filename Value="../components/richtext/RichTextView.pas"/> + <Filename Value="../components/richtext/RichTextLayoutUnit.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="RichTextView"/> + <UnitName Value="RichTextLayoutUnit"/> </Unit16> <Unit17> - <Filename Value="../components/richtext/RichTextLayoutUnit.pas"/> + <Filename Value="../components/richtext/RichTextDisplayUnit.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="RichTextLayoutUnit"/> + <UnitName Value="RichTextDisplayUnit"/> </Unit17> <Unit18> - <Filename Value="../components/richtext/RichTextDisplayUnit.pas"/> + <Filename Value="IPFFileFormatUnit.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="RichTextDisplayUnit"/> + <UnitName Value="IPFFileFormatUnit"/> </Unit18> <Unit19> - <Filename Value="IPFFileFormatUnit.pas"/> + <Filename Value="HelpWindowDimensions.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="IPFFileFormatUnit"/> + <UnitName Value="HelpWindowDimensions"/> </Unit19> <Unit20> - <Filename Value="HelpWindowDimensions.pas"/> + <Filename Value="NewViewConstantsUnit.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="HelpWindowDimensions"/> + <UnitName Value="NewViewConstantsUnit"/> </Unit20> <Unit21> - <Filename Value="NewViewConstantsUnit.pas"/> + <Filename Value="SettingsUnit.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="NewViewConstantsUnit"/> + <UnitName Value="SettingsUnit"/> </Unit21> <Unit22> - <Filename Value="SettingsUnit.pas"/> + <Filename Value="dvconstants.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="SettingsUnit"/> + <UnitName Value="dvConstants"/> </Unit22> <Unit23> - <Filename Value="dvconstants.pas"/> + <Filename Value="dvHelpers.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="dvConstants"/> + <UnitName Value="dvHelpers"/> </Unit23> <Unit24> - <Filename Value="dvHelpers.pas"/> + <Filename Value="HelpWindow.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="dvHelpers"/> + <UnitName Value="HelpWindow"/> </Unit24> <Unit25> - <Filename Value="HelpWindow.pas"/> + <Filename Value="../TODO.txt"/> <IsPartOfProject Value="True"/> - <UnitName Value="HelpWindow"/> </Unit25> <Unit26> - <Filename Value="../TODO.txt"/> + <Filename Value="frm_configuration.pas"/> <IsPartOfProject Value="True"/> + <UnitName Value="frm_configuration"/> </Unit26> <Unit27> - <Filename Value="frm_configuration.pas"/> + <Filename Value="arrows.inc"/> <IsPartOfProject Value="True"/> - <UnitName Value="frm_configuration"/> </Unit27> <Unit28> - <Filename Value="arrows.inc"/> + <Filename Value="HelpBitmap.pas"/> <IsPartOfProject Value="True"/> + <UnitName Value="HelpBitmap"/> </Unit28> </Units> </ProjectOptions> diff --git a/docview/src/docview.lpr b/docview/src/docview.lpr index 87087b59..91e50323 100644 --- a/docview/src/docview.lpr +++ b/docview/src/docview.lpr @@ -8,11 +8,11 @@ uses {$ENDIF}{$ENDIF} Classes, fpg_main, frm_main, IPFEscapeCodes, HelpTopic, CompareWordUnit, SearchTable, - TextSearchQuery, nvUtilities, nvNullObjects, HelpFile, SearchUnit, + TextSearchQuery, nvUtilities, HelpFile, SearchUnit, fpg_cmdlineparams, IPFFileFormatUnit, HelpWindowDimensions, NewViewConstantsUnit, SettingsUnit, RichTextStyleUnit, CanvasFontManager, ACLStringUtility, RichTextDocumentUnit, RichTextView, RichTextLayoutUnit, - RichTextDisplayUnit, dvconstants, dvHelpers, frm_configuration; + RichTextDisplayUnit, dvconstants, dvHelpers, frm_configuration, HelpBitmap; procedure MainProc; diff --git a/docview/src/frm_main.pas b/docview/src/frm_main.pas index 9e853f35..383b0429 100644 --- a/docview/src/frm_main.pas +++ b/docview/src/frm_main.pas @@ -1701,6 +1701,10 @@ begin nil {Highlights} ); { TODO -oGraeme : We do not support images yet } +// THelpFile(CurrentTopic.HelpFile).GetImages(ImageOf) +// THelpFile( Topic.HelpFile ).GetImages( ImageOffsets, +// Images ); + ImageIndices.Free; //writeln(lText); diff --git a/docview/src/nvUtilities.pas b/docview/src/nvUtilities.pas index 8dc928a1..568fbc19 100644 --- a/docview/src/nvUtilities.pas +++ b/docview/src/nvUtilities.pas @@ -46,6 +46,7 @@ procedure DeallocateMemory( Var P: pointer ); // Alias method which is the same as Move() but with less confusing name procedure MemCopy(const src; var dest; size: SizeInt); +procedure FillMem( Dest: pointer; Size: longint; Data: Byte ); // Allows for debug output and quite disable of output procedure ProfileEvent(const AString: string); // Return AFilename's size in bytes @@ -212,6 +213,11 @@ begin Move(src, dest, size); end; +procedure FillMem( Dest: pointer; Size: longint; Data: Byte ); +begin + FillChar( Dest^, Size, Data ); +end; + procedure ProfileEvent(const AString: string); begin {$IFDEF DEBUG} |