Skip to content

Commit 471b747

Browse files
16 Dec 2024: ver. 2.3.3
- Updated Demo for FireMonkey
1 parent 1bfda28 commit 471b747

File tree

98 files changed

+11056
-6388
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+11056
-6388
lines changed

Build.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ call "C:\BDS\Studio\23.0\bin\rsvars.bat"
22
msbuild.exe "Source\MDHelpViewer.dproj" /target:Clean;Build /p:Platform=Win64 /p:config=release
33
msbuild.exe "Source\MDHelpViewer.dproj" /target:Clean;Build /p:Platform=Win32 /p:config=release
44

5-
call C:\ETHEA\Certificate\SignFileWithSectico.bat \ETHEA\MarkDownHelpViewer\Bin32\MDHelpViewer.exe
6-
call C:\ETHEA\Certificate\SignFileWithSectico.bat \ETHEA\MarkDownHelpViewer\Bin64\MDHelpViewer.exe
5+
call D:\ETHEA\Certificate\SignFileWithSectico.bat D:\ETHEA\MarkDownHelpViewer\Bin32\MDHelpViewer.exe
6+
call D:\ETHEA\Certificate\SignFileWithSectico.bat D:\ETHEA\MarkDownHelpViewer\Bin64\MDHelpViewer.exe
77

88
:INNO
99
"C:\Program Files (x86)\Inno Setup 6\iscc.exe" "\ETHEA\MarkDownHelpViewer\Setup\MarkDownHelpViewerSetup.iss"
@@ -13,7 +13,7 @@ pause
1313
EXIT
1414

1515
:SIGNSETUP
16-
call \ETHEA\Certificate\SignFileWithSectico.bat \ETHEA\MarkDownHelpViewer\Setup\Output\MarkDownHelpViewerSetup.exe
16+
call D:\ETHEA\Certificate\SignFileWithSectico.bat D:\ETHEA\MarkDownHelpViewer\Setup\Output\MarkDownHelpViewerSetup.exe
1717

1818
:END
1919
pause

Demo/Source/MainFormFmx.fmx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@ object MainForm: TMainForm
515515
Size.PlatformDefault = False
516516
TabOrder = 2
517517
Text = 'Transform MD -> HTML'
518+
TextSettings.Trimming = None
518519
OnClick = TransformButtonClick
519520
end
520521
object WebBrowser: TWebBrowser

Demo/Source/MainFormFmx.pas

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,24 @@
33
interface
44

55
uses
6-
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
7-
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs,
8-
MarkdownProcessor, FMX.Memo.Types, FMX.StdCtrls, FMX.Controls.Presentation,
9-
FMX.ScrollBox, FMX.Memo, FMX.WebBrowser;
6+
System.SysUtils
7+
, System.Types
8+
, System.UITypes
9+
, System.Classes
10+
, System.Variants
11+
, FMX.Types
12+
, FMX.Controls
13+
, FMX.Forms
14+
, FMX.Graphics
15+
, FMX.Dialogs
16+
, FMX.Memo.Types
17+
, FMX.StdCtrls
18+
, FMX.Controls.Presentation
19+
, FMX.ScrollBox
20+
, FMX.Memo
21+
, FMX.WebBrowser
22+
, MarkdownProcessor
23+
;
1024

1125
resourcestring
1226
FILE_NOT_FOUND = 'File "%s" not found!';
@@ -36,16 +50,19 @@ TMainForm = class(TForm)
3650
implementation
3751

3852
uses
39-
System.Win.Registry
40-
, System.IOUtils
53+
System.IOUtils
54+
{$IFDEF MSWINDOWS}
55+
, System.Win.Registry
4156
, Winapi.ShellAPI
4257
, Winapi.Windows
4358
, MarkDownHelpViewer
59+
{$ENDIF}
4460
, MarkdownUtils
4561
;
4662

4763
{$R *.fmx}
4864

65+
{$IFDEF MSWINDOWS}
4966
procedure ShowMarkdownFile(const AFileName: TFileName;
5067
const AHelpString: string; const AContext: Integer = 0);
5168
var
@@ -83,12 +100,22 @@ procedure ShowMarkdownFile(const AFileName: TFileName;
83100
raise Exception.Create(MD_HELP_VIEWER_NOT_FOUND);
84101
{$ENDIF}
85102
end;
103+
{$ENDIF}
86104

87105
procedure TMainForm.FormKeyUp(Sender: TObject; var Key: Word; var KeyChar: Char;
88106
Shift: TShiftState);
107+
{$IFDEF MSWINDOWS}
108+
var
109+
LFileName: string;
110+
{$ENDIF}
89111
begin
112+
{$IFDEF MSWINDOWS}
90113
if Key = vkF1 then
91-
ShowMarkdownFile('ReadMe.md', 'README',0);
114+
begin
115+
LFileName := TPath.Combine(TPath.GetDocumentsPath,'ReadMe.md');
116+
ShowMarkdownFile(LFileName, 'README',0);
117+
end;
118+
{$ENDIF}
92119
end;
93120

94121
procedure TMainForm.TransformButtonClick(Sender: TObject);

Demo/Source/MarkDownHelpViewerDemo.dpr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,13 @@ begin
4141
Application.MainFormOnTaskbar := True;
4242
Application.Title := 'Markdown Help Viewer Demo App';
4343
Application.HelpFile := ExtractFilePath(Application.ExeName)+'..\Help\Home.md';
44-
(* No need to add those lines if you have installed the Markdown HelpViewer
4544
{$IFDEF WIN32}
4645
RegisterMDViewerLocation(ExtractFilePath(Application.ExeName)+
4746
'..\..\Bin32\MDHelpViewer.exe');
4847
{$ELSE}
4948
RegisterMDViewerLocation(ExtractFilePath(Application.ExeName)+
5049
'..\..\Bin64\MDHelpViewer.exe');
5150
{$ENDIF}
52-
*)
5351
Application.CreateForm(TfmMain, fmMain);
5452
Application.Run;
5553
end.

Demo/Source/MarkDownHelpViewerDemo.dproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<PropertyGroup>
33
<ProjectGuid>{586BBC24-8A31-4295-98B2-F25E4CE572F7}</ProjectGuid>
4-
<ProjectVersion>20.1</ProjectVersion>
4+
<ProjectVersion>20.2</ProjectVersion>
55
<FrameworkType>VCL</FrameworkType>
66
<Base>True</Base>
77
<Config Condition="'$(Config)'==''">Debug</Config>
88
<Platform Condition="'$(Platform)'==''">Win64</Platform>
99
<TargetedPlatforms>3</TargetedPlatforms>
1010
<AppType>Application</AppType>
1111
<MainSource>MarkdownHelpViewerDemo.dpr</MainSource>
12+
<ProjectName Condition="'$(ProjectName)'==''">MarkDownHelpViewerDemo</ProjectName>
1213
</PropertyGroup>
1314
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
1415
<Base>true</Base>
0 Bytes
Binary file not shown.

Demo/Source/MarkDownHelpViewerDemoFMX.dproj

Lines changed: 143 additions & 29 deletions
Large diffs are not rendered by default.
41.5 KB
Binary file not shown.

Ext/HTMLViewer/Source/HTMLSubs.pas

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,15 @@ TFontObj = class(TFontObjBase) {font information}
176176
// BG, 10.02.2013: owns its objects.
177177
TFontList = class(TFontObjBaseList) {a list of TFontObj's}
178178
private
179-
function GetFont(Index: Integer): TFontObj; {$ifdef UseInline} inline; {$endif}
179+
function GetFont(Index: TListSize): TFontObj; {$ifdef UseInline} inline; {$endif}
180180
public
181181
constructor CreateCopy(ASection: TSection; T: TFontList);
182182
function GetFontAt(Posn: Integer; out OHang: Integer): ThtFont;
183183
// function GetFontCountAt(Posn, Leng: Integer): Integer;
184184
function GetFontObjAt(Posn: Integer): TFontObj; overload;
185185
function GetFontObjAt(Posn, Leng: Integer; out Obj: TFontObj): Integer; overload;
186186
procedure Decrement(N: Integer; Document: ThtDocument);
187-
property Items[Index: Integer]: TFontObj read GetFont; default;
187+
property Items[Index: TListSize]: TFontObj read GetFont; default;
188188
end;
189189

190190
// BG, 10.02.2013: does not own its font objects.
@@ -1093,11 +1093,11 @@ TFormControlObj = class(TFloatingObj)
10931093
//BG, 15.01.2011:
10941094
TFormControlObjList = class(TFloatingObjList)
10951095
private
1096-
function GetItem(Index: Integer): TFormControlObj; {$ifdef UseInline} inline; {$endif}
1096+
function GetItem(Index: TListSize): TFormControlObj; {$ifdef UseInline} inline; {$endif}
10971097
public
10981098
procedure ActivateTabbing;
10991099
procedure DeactivateTabbing;
1100-
property Items[Index: Integer]: TFormControlObj read GetItem; default;
1100+
property Items[Index: TListSize]: TFormControlObj read GetItem; default;
11011101
end;
11021102

11031103
TImageFormControlObj = class(TFormControlObj)
@@ -2696,7 +2696,7 @@ constructor TFontList.CreateCopy(ASection: TSection; T: TFontList);
26962696
end;
26972697

26982698
//-- BG ---------------------------------------------------------- 10.02.2013 --
2699-
function TFontList.GetFont(Index: Integer): TFontObj;
2699+
function TFontList.GetFont(Index: TListSize): TFontObj;
27002700
begin
27012701
Result := TFontObj(inherited Items[Index]);
27022702
end;
@@ -15593,7 +15593,7 @@ procedure TFormControlObjList.DeactivateTabbing;
1559315593
end;
1559415594

1559515595
//-- BG ---------------------------------------------------------- 15.01.2011 --
15596-
function TFormControlObjList.GetItem(Index: Integer): TFormControlObj;
15596+
function TFormControlObjList.GetItem(Index: TListSize): TFormControlObj;
1559715597
begin
1559815598
{$ifdef UseGenerics}
1559915599
Result := inherited Items[Index] as TFormControlObj;

Ext/HTMLViewer/Source/HTMLUn2.pas

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,9 @@ TIndentRec = class
276276

277277
TIndentRecList = class(TObjectList)
278278
private
279-
function Get(Index: Integer): TIndentRec; {$ifdef UseInline} inline; {$endif}
279+
function Get(Index: TListSize): TIndentRec; {$ifdef UseInline} inline; {$endif}
280280
public
281-
property Items[Index: Integer]: TIndentRec read Get; default;
281+
property Items[Index: TListSize]: TIndentRec read Get; default;
282282
end;
283283

284284
TIndentManager = class
@@ -3779,7 +3779,7 @@ procedure ThvMeter.SetHighColor(const value: TColor);
37793779
{ TIndentRecList }
37803780

37813781
//-- BG ---------------------------------------------------------- 06.10.2016 --
3782-
function TIndentRecList.Get(Index: Integer): TIndentRec;
3782+
function TIndentRecList.Get(Index: TListSize): TIndentRec;
37833783
begin
37843784
Result := inherited Get(Index);
37853785
end;

0 commit comments

Comments
 (0)