Skip to content

Commit

Permalink
ver. 2.1.2
Browse files Browse the repository at this point in the history
- Added property "AutoLoadOnHotSpotClick" to TMarkdownViewer
- Fixed resize Font changing Monitor-DPI
- Fixed Toolbar switching Captions On/Off
- Reset scrollbar position to top after loading new file
  • Loading branch information
carloBarazzetta committed Mar 19, 2024
1 parent 1f6d30e commit 39bfa58
Show file tree
Hide file tree
Showing 91 changed files with 7,962 additions and 3,234 deletions.
2 changes: 1 addition & 1 deletion Build.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
call "C:\BDS\Studio\22.0\bin\rsvars.bat"
call "C:\BDS\Studio\23.0\bin\rsvars.bat"
msbuild.exe "Source\MDHelpViewer.dproj" /target:Clean;Build /p:Platform=Win64 /p:config=release
msbuild.exe "Source\MDHelpViewer.dproj" /target:Clean;Build /p:Platform=Win32 /p:config=release

Expand Down
1 change: 1 addition & 0 deletions Demo/Help/1100.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@

This is the File Menu with files operations...

Return to [Index](Index.md) to see all the operation available.
1 change: 1 addition & 0 deletions Demo/Help/1200.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@

This is the Edit Menu with Edit operations...

Return to [Index](Index.md) to see all the operation available.
5 changes: 2 additions & 3 deletions Demo/Help/BrowseTab.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ In the "grid" you can move the cursors in every directions to read the data.

At the bottom of the Tab, you can see a preview image of the fish and a full description.

At the top-right, you can use the ["Data Navigator"](DataNav.md) to move the data cursor and edit table.
At the top-right, you can use the ["Data Navigator"](DataNavigator.md) to move the data cursor and edit table.

Click to the ["Edit Data" Tab](EditTab.md) to Edit the data.

![Browse Tab Page](BrowseDataTab.png)


You can also Click on the ["Menu Bar"](Menu.md) to see all the operation available.
Return to [Index](Index.md) to see all the operation available.

4 changes: 2 additions & 2 deletions Demo/Help/EditTab.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ At the bottom-left of the Tab, you can change the image associated to the fish.

At the right of the panel you can enter a full description.

At the top-right, you can use the ["Data Navigator"](DataNav.md) to move the data cursor and edit table.
At the top-right, you can use the ["Data Navigator"](DataNavigator.md) to move the data cursor and edit table.

Click to the ["Browse Data" Tab](BrowseTab.md) to view the list.

![Edit Tab Page](EditDataTab.png)

You can also Click on the ["Menu Bar"](Menu.md) to see all the operation available.
Return to [Index](Index.md) to see all the operation available.

2 changes: 1 addition & 1 deletion Demo/Help/Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**A simple application to edit a table**

You can see an Index of the application functions [here...](Index.mdown)
You can see an Index of the application functions [here...](Index.md)

This is only a simple demo, not all the operations are available, expecially the menu items.

Expand Down
27 changes: 21 additions & 6 deletions Demo/Help/Home_1000.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,41 @@

Author:
Carlo Barazzetta
https://github.com/EtheaDev/MarkdownHelpViewer

[https://github.com/EtheaDev/MarkdownHelpViewer](https://github.com/EtheaDev/MarkdownHelpViewer)

Copyright © 2023-2024 all rights reserved.

Delphi Markdown
https://github.com/grahamegrieve/delphi-markdown

[https://github.com/grahamegrieve/delphi-markdown](https://github.com/grahamegrieve/delphi-markdown)

Copyright (c) 2011+, Health Intersections Pty Ltd All rights reserved.

Synopse/SynPDF https://github.com/synopse/SynPDF
Synopse/SynPDF [https://github.com/synopse/SynPDF](https://github.com/synopse/SynPDF)

Copyright © Synopse: all right reserved.

HtmlToPdf https://github.com/MuzioValerio/HtmlToPdf
HtmlToPdf [https://github.com/MuzioValerio/HtmlToPdf](https://github.com/MuzioValerio/HtmlToPdf)

Copyright © Muzio Valerio.

- Image32 Library - http://www.angusj.com/delphi/image32/Docs/_Body.htm
Image32 Library - [http://www.angusj.com/delphi/image32/Docs/_Body.htm](http://www.angusj.com/delphi/image32/Docs/_Body.htm)

Copyright ©2019-2023 Angus Johnson.

HTMLViewer - https://github.com/BerndGabriel/HtmlViewer
HTMLViewer - [https://github.com/BerndGabriel/HtmlViewer](https://github.com/BerndGabriel/HtmlViewer)

Copyright (c) 1995 - 2008 by L. David Baldwin

Copyright (c) 1995 - 2023 by Anders Melander (DitherUnit.pas)

Copyright (c) 1995 - 2023 by Ron Collins (HtmlGif1.pas)

Copyright (c) 2008 - 2009 by Sebastian Zierer (Delphi 2009 Port)

Copyright (c) 2008 - 2010 by Arvid Winkelsdorf (Fixes)

Copyright (c) 2009 - 2023 by HtmlViewer Team

Return to [Index](Index.md) to see all the operation available.
10 changes: 10 additions & 0 deletions Demo/Source/MainForm.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,16 @@ object fmMain: TfmMain
Caption = 'Instant Help'
ExplicitWidth = 64
end
object MarkdownViewer: TMarkdownViewer
Left = 4
Top = 19
Width = 163
Height = 385
Align = alClient
TabOrder = 0
ExplicitLeft = 2
ExplicitTop = 22
end
end
object MainMenu: TMainMenu
Left = 288
Expand Down
11 changes: 3 additions & 8 deletions Demo/Source/MainForm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ interface
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.Menus, Data.DB, Vcl.DBCtrls,
Vcl.StdCtrls, Vcl.ExtCtrls, Vcl.Grids, Vcl.DBGrids, Datasnap.DBClient,
Vcl.ComCtrls, Vcl.Mask, MarkDownViewerComponents;
Vcl.ComCtrls, Vcl.Mask, MarkDownViewerComponents, Vcl.Buttons, HTMLUn2,
HtmlView;

type
TfmMain = class(TForm)
Expand Down Expand Up @@ -100,6 +101,7 @@ TfmMain = class(TForm)
EmbeddedHelpPanel: TPanel;
RightSplitter: TSplitter;
HelpTitleLabel: TLabel;
MarkdownViewer: TMarkdownViewer;
procedure MenuItemClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure HelpMenuItemClick(Sender: TObject);
Expand All @@ -109,7 +111,6 @@ TfmMain = class(TForm)
procedure ShowHelpEmbeddedClick(Sender: TObject);
procedure PageControlChange(Sender: TObject);
private
MarkdownViewer: TMarkDownViewer;
procedure ShowEmbeddedHelp;
public
{ Public declarations }
Expand Down Expand Up @@ -152,15 +153,9 @@ procedure TfmMain.FormCreate(Sender: TObject);
//Register "ServerRoot" folder for any MarkdownViewer
RegisterMDViewerServerRoot(ExtractFilePath(Application.ExeName)+'..\Help');

//Manually create components (so you can test it without installing into IDE)
MarkdownViewer := TMarkdownViewer.Create(Self);
MarkdownViewer.Parent := EmbeddedHelpPanel;
MarkdownViewer.Align := alClient;

HelpTitleLabel.Font.Style := [fsBold];
EmbeddedHelpPanel.Width := 400;


Caption := Application.Title;
TitleLabel.Font.Height := Round(TitleLabel.Font.Height * 1.5);
ClientDataSet.Open;
Expand Down
20 changes: 10 additions & 10 deletions Ext/HTMLViewer/Source/BegaHtmlPrintPreviewForm.pas
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-------------------------------------------------------------------------------
Copyright (C) 2006-2012 by Bernd Gabriel.
Copyright (C) 2006-2023 by Bernd Gabriel.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down Expand Up @@ -47,14 +47,14 @@ TBegaHtmlPrintPreviewForm = class(TBegaCustomPrintPreviewForm)
private
FFrameViewer: TFVBase; // TFrameViewer or TFrameBrowser
FHtmlViewer: THtmlViewer;
function canPrint: Boolean;
function CanPrint: Boolean;
function CurrentViewer: THtmlViewer;
function PreviewGetSize(Sender: TObject; MFPrinter: TBegaMetaFilePrinter; out Width, Height: Integer): Boolean;
procedure PreviewCreatePages(Sender: TObject; MFPrinter: TBegaMetaFilePrinter; var Done: Boolean);
procedure PreviewPrintPages(Sender: TObject; MFPrinter: TBegaMetaFilePrinter; FirstPage, LastPage, Copies: Integer);
procedure setFrameViewer(const Value: TFVBase);
procedure setHtmlViewer(const Value: THtmlViewer);
procedure updateEvents;
procedure SetFrameViewer(const Value: TFVBase);
procedure SetHtmlViewer(const Value: THtmlViewer);
procedure UpdateEvents;
public
property FrameViewer: TFVBase read FFrameViewer write setFrameViewer;
property HtmlViewer: THtmlViewer read FHtmlViewer write setHtmlViewer;
Expand Down Expand Up @@ -158,26 +158,26 @@ procedure TBegaHtmlPrintPreviewForm.PreviewPrintPages(Sender: TObject;
end;

//- BG ----------------------------------------------------------- 26.03.2007 --
procedure TBegaHtmlPrintPreviewForm.setFrameViewer(const Value: TFVBase);
procedure TBegaHtmlPrintPreviewForm.SetFrameViewer(const Value: TFVBase);
begin
FFrameViewer := Value;
FHtmlViewer := nil;
updateEvents;
UpdateEvents;
Preview.createPages;
end;

//- BG ----------------------------------------------------------- 26.03.2007 --
procedure TBegaHtmlPrintPreviewForm.setHtmlViewer(
procedure TBegaHtmlPrintPreviewForm.SetHtmlViewer(
const Value: THtmlViewer);
begin
FFrameViewer := nil;
FHtmlViewer := Value;
updateEvents;
UpdateEvents;
Preview.createPages;
end;

//- BG ----------------------------------------------------------- 27.03.2007 --
procedure TBegaHtmlPrintPreviewForm.updateEvents;
procedure TBegaHtmlPrintPreviewForm.UpdateEvents;
begin
if CurrentViewer <> nil then
begin
Expand Down
Loading

0 comments on commit 39bfa58

Please sign in to comment.