diff options
-rw-r--r-- | src/HelpTopic.pas | 2 | ||||
-rw-r--r-- | src/HelpWindow.pas | 115 | ||||
-rw-r--r-- | src/docview.lpi | 83 | ||||
-rw-r--r-- | src/docview.lpr | 2 |
4 files changed, 41 insertions, 161 deletions
diff --git a/src/HelpTopic.pas b/src/HelpTopic.pas index 9872059f..6e75d02d 100644 --- a/src/HelpTopic.pas +++ b/src/HelpTopic.pas @@ -15,7 +15,7 @@ Interface // RichTextView. uses - Classes, HelpWindow, IPFFileFormatUnit; + Classes, HelpWindowDimensions, IPFFileFormatUnit; Type THelpLink = class(TObject) diff --git a/src/HelpWindow.pas b/src/HelpWindow.pas deleted file mode 100644 index 5d6fea59..00000000 --- a/src/HelpWindow.pas +++ /dev/null @@ -1,115 +0,0 @@ -Unit HelpWindow; - -{$mode objfpc}{$H+} - -// NewView - a new OS/2 Help Viewer -// Copyright 2001 Aaron Lawrence (aaronl at consultant dot com) -// This software is released under the Gnu Public License - see readme.txt - -Interface - -// What a misnomer. This really just contains a few definitions -// and functions relevant to helpwindow dimensions. - -uses - IPFFileFormatUnit; - -const - ptCharacters = 0; - ptPercentage = 1; - ptPixels = 2; - ptPoints = 3; - ptDynamic = 4; - - XPosRight = 577; - YPosTop = 577; - XYPosCenter = 578; - -type - THelpWindowRect = class - Left: longint; - Bottom: longint; - Width: longint; - Height: longint; - constructor Create; - end; - -procedure SetFootnoteRect( Var Rect: THelpWindowRect ); - -procedure ReadHelpSize( const XY: THelpXYPair; - Var Rect: THelpWindowRect ); -procedure ReadHelpPosition( const XY: THelpXYPair; - Var Rect: THelpWindowRect ); - - -Implementation - -constructor THelpWindowRect.Create; -begin - Left:= -1; - Bottom:= -1; - Width:= -1; - Height:= -1; -end; - -function GetPos( const PositionType: uint8; - const Value: longint ): longint; -begin - case PositionType of - ptCharacters: - Result:= Value; - ptPercentage: - Result:= Value; - ptPixels: - Result:= Value * 5; - ptPoints: - Result:= Value; - ptDynamic: - case Value of - 1: Result:= 0; // left - 2: Result:= XPosRight; // right - 4: Result:= 0; // bottom - 8: Result:= YPosTop; // top - 16: Result:= 50; //XYPosCenter; // center. - end; - end; -end; - -procedure ReadHelpPosition( const XY: THelpXYPair; - Var Rect: THelpWindowRect ); -var - XPositionType: uint8; - YPositionType: uint8; -begin - // read origin - XPositionType:= XY.Flags div 16; - YPositionType:= XY.Flags and 15; - - if XY.X <> -1 then - Rect.Left:= GetPos( XPositionType, XY.X ); - if XY.Y <> -1 then - Rect.Bottom:= GetPos( YPositionType, XY.Y ); -end; - -procedure ReadHelpSize( const XY: THelpXYPair; - Var Rect: THelpWindowRect ); -begin - if XY.X <> -1 then - Rect.Width:= XY.X; - if XY.Y <> -1 then - Rect.Height:= XY.Y; -end; - -procedure SetFootnoteRect( Var Rect: THelpWindowRect ); -begin - with Rect do - begin - Left:= 10; - Width:= 80; - Bottom:= 10; - Height:= 40; - end; -end; - -Initialization -End. diff --git a/src/docview.lpi b/src/docview.lpi index c2f330e7..508ed4e0 100644 --- a/src/docview.lpi +++ b/src/docview.lpi @@ -32,7 +32,7 @@ <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> - <Units Count="23"> + <Units Count="22"> <Unit0> <Filename Value="docview.lpr"/> <IsPartOfProject Value="True"/> @@ -44,109 +44,104 @@ <UnitName Value="frm_main"/> </Unit1> <Unit2> - <Filename Value="HelpWindow.pas"/> + <Filename Value="IPFEscapeCodes.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="HelpWindow"/> + <UnitName Value="IPFEscapeCodes"/> </Unit2> <Unit3> - <Filename Value="IPFEscapeCodes.pas"/> + <Filename Value="HelpTopic.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="IPFEscapeCodes"/> + <UnitName Value="HelpTopic"/> </Unit3> <Unit4> - <Filename Value="HelpTopic.pas"/> + <Filename Value="HelpFile.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="HelpTopic"/> + <UnitName Value="HelpFile"/> </Unit4> <Unit5> - <Filename Value="HelpFile.pas"/> + <Filename Value="CompareWordUnit.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="HelpFile"/> + <UnitName Value="CompareWordUnit"/> </Unit5> <Unit6> - <Filename Value="CompareWordUnit.pas"/> + <Filename Value="SearchTable.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="CompareWordUnit"/> + <UnitName Value="SearchTable"/> </Unit6> <Unit7> - <Filename Value="SearchTable.pas"/> + <Filename Value="TextSearchQuery.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="SearchTable"/> + <UnitName Value="TextSearchQuery"/> </Unit7> <Unit8> - <Filename Value="TextSearchQuery.pas"/> + <Filename Value="nvUtilities.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="TextSearchQuery"/> + <UnitName Value="nvUtilities"/> </Unit8> <Unit9> - <Filename Value="nvUtilities.pas"/> + <Filename Value="nvNullObjects.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="nvUtilities"/> + <UnitName Value="nvNullObjects"/> </Unit9> <Unit10> - <Filename Value="nvNullObjects.pas"/> + <Filename Value="../../../../../opt/git/dunit2/3rdparty/epiktimer/epiktimer.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="nvNullObjects"/> + <UnitName Value="EpikTimer"/> </Unit10> <Unit11> - <Filename Value="../../../../../opt/git/dunit2/3rdparty/epiktimer/epiktimer.pas"/> + <Filename Value="../docs/inf04.txt"/> <IsPartOfProject Value="True"/> - <UnitName Value="EpikTimer"/> </Unit11> <Unit12> - <Filename Value="../docs/inf04.txt"/> - <IsPartOfProject Value="True"/> - </Unit12> - <Unit13> <Filename Value="SearchUnit.pas"/> <IsPartOfProject Value="True"/> <UnitName Value="SearchUnit"/> - </Unit13> - <Unit14> + </Unit12> + <Unit13> <Filename Value="../components/richtext/RichTextStyleUnit.pas"/> <IsPartOfProject Value="True"/> <UnitName Value="RichTextStyleUnit"/> - </Unit14> - <Unit15> + </Unit13> + <Unit14> <Filename Value="../components/richtext/CanvasFontManager.pas"/> <IsPartOfProject Value="True"/> <UnitName Value="CanvasFontManager"/> - </Unit15> - <Unit16> + </Unit14> + <Unit15> <Filename Value="../components/richtext/ACLStringUtility.pas"/> <IsPartOfProject Value="True"/> <UnitName Value="ACLStringUtility"/> - </Unit16> - <Unit17> + </Unit15> + <Unit16> <Filename Value="../components/richtext/RichTextDocumentUnit.pas"/> <IsPartOfProject Value="True"/> <UnitName Value="RichTextDocumentUnit"/> - </Unit17> - <Unit18> + </Unit16> + <Unit17> <Filename Value="../components/richtext/RichTextView.pas"/> <IsPartOfProject Value="True"/> <UnitName Value="RichTextView"/> - </Unit18> - <Unit19> + </Unit17> + <Unit18> <Filename Value="../components/richtext/RichTextLayoutUnit.pas"/> <IsPartOfProject Value="True"/> <UnitName Value="RichTextLayoutUnit"/> - </Unit19> - <Unit20> + </Unit18> + <Unit19> <Filename Value="../components/richtext/RichTextDisplayUnit.pas"/> <IsPartOfProject Value="True"/> <UnitName Value="RichTextDisplayUnit"/> - </Unit20> - <Unit21> + </Unit19> + <Unit20> <Filename Value="IPFFileFormatUnit.pas"/> <IsPartOfProject Value="True"/> <UnitName Value="IPFFileFormatUnit"/> - </Unit21> - <Unit22> + </Unit20> + <Unit21> <Filename Value="HelpWindowDimensions.pas"/> <IsPartOfProject Value="True"/> <UnitName Value="HelpWindowDimensions"/> - </Unit22> + </Unit21> </Units> </ProjectOptions> <CompilerOptions> diff --git a/src/docview.lpr b/src/docview.lpr index bceaa006..ec03e603 100644 --- a/src/docview.lpr +++ b/src/docview.lpr @@ -8,7 +8,7 @@ uses {$ENDIF}{$ENDIF} Classes, {$IFDEF Timing}EpikTimer,{$ENDIF} - fpg_main, frm_main, HelpWindow, IPFEscapeCodes, HelpTopic, CompareWordUnit, SearchTable, + fpg_main, frm_main, IPFEscapeCodes, HelpTopic, CompareWordUnit, SearchTable, TextSearchQuery, nvUtilities, nvNullObjects, HelpFile, SearchUnit, fpg_cmdlineparams, customstyle, IPFFileFormatUnit, HelpWindowDimensions, RichTextStyleUnit, CanvasFontManager, ACLStringUtility, RichTextDocumentUnit, RichTextView, |