diff --git a/applications/fpbrowser/demounit.dfm b/applications/fpbrowser/demounit.dfm
new file mode 100755
index 000000000..318c5e8aa
--- /dev/null
+++ b/applications/fpbrowser/demounit.dfm
@@ -0,0 +1,283 @@
+object Form1: TForm1
+ Left = 372
+ Top = 267
+ ClientHeight = 439
+ ClientWidth = 621
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -13
+ Font.Name = 'System'
+ Font.Style = []
+ Menu = MainMenu
+ OldCreateOrder = True
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ OnShow = FormShow
+ PixelsPerInch = 96
+ TextHeight = 16
+ object Panel1: TPanel
+ Left = 0
+ Top = 421
+ Width = 621
+ Height = 18
+ Align = alBottom
+ Alignment = taLeftJustify
+ BevelInner = bvLowered
+ BevelOuter = bvNone
+ TabOrder = 0
+ object ProgressBar: TProgressBar
+ Left = 470
+ Top = 1
+ Width = 150
+ Height = 16
+ Align = alRight
+ TabOrder = 0
+ Visible = False
+ end
+ end
+ object Panel2: TPanel
+ Left = 0
+ Top = 0
+ Width = 621
+ Height = 33
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 1
+ object Edit1: TEdit
+ Left = 190
+ Top = 4
+ Width = 337
+ Height = 24
+ TabStop = False
+ ReadOnly = True
+ TabOrder = 3
+ end
+ object ReloadButton: TButton
+ Left = 10
+ Top = 4
+ Width = 59
+ Height = 24
+ Caption = '&Reload'
+ Enabled = False
+ TabOrder = 0
+ OnClick = ReloadButtonClick
+ end
+ object BackButton: TButton
+ Left = 69
+ Top = 4
+ Width = 59
+ Height = 24
+ Caption = '&Back'
+ Enabled = False
+ TabOrder = 1
+ OnClick = FwdBackClick
+ end
+ object FwdButton: TButton
+ Left = 128
+ Top = 4
+ Width = 59
+ Height = 24
+ Caption = '&Forward'
+ Enabled = False
+ TabOrder = 2
+ OnClick = FwdBackClick
+ end
+ end
+ object Panel3: TPanel
+ Left = 0
+ Top = 33
+ Width = 621
+ Height = 388
+ Align = alClient
+ BevelInner = bvLowered
+ BevelOuter = bvNone
+ Caption = 'Panel3'
+ TabOrder = 2
+ object Viewer: THTMLViewer
+ Left = 1
+ Top = 1
+ Width = 619
+ Height = 386
+ OnHotSpotCovered = HotSpotChange
+ OnHotSpotClick = HotSpotClick
+ OnFormSubmit = SubmitEvent
+ OnHistoryChange = HistoryChange
+ OnProgress = ViewerProgress
+ TabStop = True
+ TabOrder = 0
+ Align = alClient
+ DefBackground = clWindow
+ BorderStyle = htFocused
+ HistoryMaxCount = 6
+ DefFontName = 'Times New Roman'
+ DefPreFontName = 'Courier New'
+ DefFontColor = clWindowText
+ DefOverLinkColor = clFuchsia
+ ImageCacheCount = 6
+ NoSelect = False
+ CharSet = DEFAULT_CHARSET
+ PrintMarginLeft = 2.000000000000000000
+ PrintMarginRight = 2.000000000000000000
+ PrintMarginTop = 2.000000000000000000
+ PrintMarginBottom = 2.000000000000000000
+ PrintScale = 1.000000000000000000
+ OnMouseMove = ViewerMouseMove
+ OnProcessing = ProcessingHandler
+ OnPrintHTMLHeader = ViewerPrintHTMLHeader
+ OnPrintHTMLFooter = ViewerPrintHTMLFooter
+ OnInclude = ViewerInclude
+ OnSoundRequest = SoundRequest
+ OnMetaRefresh = MetaRefreshEvent
+ OnObjectClick = ObjectClick
+ OnRightClick = RightClick
+ object MediaPlayer: TMediaPlayer
+ Left = 336
+ Top = 40
+ Width = 253
+ Height = 30
+ Visible = False
+ TabOrder = 3
+ OnNotify = MediaPlayerNotify
+ end
+ end
+ end
+ object OpenDialog: TOpenDialog
+ DefaultExt = 'htm'
+ Filter = 'html files|*.htm;*.html|all files|*.*'
+ Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist]
+ Left = 329
+ Top = 2
+ end
+ object MainMenu: TMainMenu
+ Left = 291
+ Top = 4
+ object File1: TMenuItem
+ Caption = '&File'
+ object Open: TMenuItem
+ Caption = '&Open'
+ ShortCut = 114
+ OnClick = OpenFileClick
+ end
+ object OpenTextFile: TMenuItem
+ Caption = 'Open &Text File'
+ OnClick = OpenTextFileClick
+ end
+ object OpenImageFile: TMenuItem
+ Caption = 'Open &Image File'
+ OnClick = OpenImageFileClick
+ end
+ object PrinterSetup1: TMenuItem
+ Caption = 'Printer Setup...'
+ OnClick = PrinterSetup1Click
+ end
+ object Printpreview: TMenuItem
+ Caption = 'Print pre&view'
+ Enabled = False
+ OnClick = PrintpreviewClick
+ end
+ object Print1: TMenuItem
+ Caption = '&Print...'
+ Enabled = False
+ OnClick = Print1Click
+ end
+ object N1: TMenuItem
+ Caption = '-'
+ end
+ object Exit1: TMenuItem
+ Caption = 'E&xit'
+ OnClick = Exit1Click
+ end
+ end
+ object Edit2: TMenuItem
+ Caption = '&Edit'
+ OnClick = Edit2Click
+ object Find1: TMenuItem
+ Caption = '&Find'
+ Enabled = False
+ OnClick = Find1Click
+ end
+ object CopyItem: TMenuItem
+ Caption = '&Copy'
+ ShortCut = 16451
+ OnClick = CopyItemClick
+ end
+ object N2: TMenuItem
+ Caption = '-'
+ end
+ object SelectAllItem: TMenuItem
+ Caption = 'Select &All'
+ Enabled = False
+ OnClick = SelectAllItemClick
+ end
+ end
+ object options1: TMenuItem
+ Caption = '&Options'
+ object ShowImages: TMenuItem
+ Caption = '&Show images'
+ OnClick = ShowImagesClick
+ end
+ object Fonts: TMenuItem
+ Caption = 'Default &Font/Colors...'
+ OnClick = FontColorsClick
+ end
+ end
+ object HistoryMenuItem: TMenuItem
+ Caption = '&History'
+ Visible = False
+ end
+ object About1: TMenuItem
+ Caption = '&About'
+ OnClick = About1Click
+ end
+ end
+ object PrintDialog: TPrintDialog
+ FromPage = 1
+ MinPage = 1
+ MaxPage = 9999
+ Options = [poPageNums]
+ ToPage = 1
+ Left = 362
+ Top = 1
+ end
+ object FindDialog: TFindDialog
+ Options = [frDown, frHideWholeWord, frDisableWholeWord]
+ OnFind = FindDialogFind
+ Left = 249
+ Top = 65535
+ end
+ object PopupMenu: TPopupMenu
+ Left = 400
+ Top = 1
+ object Viewimage: TMenuItem
+ Caption = '&View image'
+ OnClick = ViewimageClick
+ end
+ object CopyImageToClipboard: TMenuItem
+ Caption = '&Copy image to clipboard'
+ OnClick = CopyImageToClipboardClick
+ end
+ object N3: TMenuItem
+ Caption = '-'
+ end
+ object OpenInNewWindow: TMenuItem
+ Caption = '&Open in new window'
+ OnClick = OpenInNewWindowClick
+ end
+ end
+ object MetaTimer: TTimer
+ Enabled = False
+ OnTimer = MetaTimerTimer
+ Left = 242
+ Top = 75
+ end
+ object Timer1: TTimer
+ Interval = 200
+ OnTimer = Timer1Timer
+ Left = 291
+ Top = 71
+ end
+ object PrinterSetupDialog: TPrinterSetupDialog
+ Left = 448
+ end
+end
diff --git a/applications/fpbrowser/fdemunit.dfm b/applications/fpbrowser/fdemunit.dfm
new file mode 100644
index 000000000..a515bc400
--- /dev/null
+++ b/applications/fpbrowser/fdemunit.dfm
@@ -0,0 +1,261 @@
+object Form1: TForm1
+ Left = 135
+ Top = 398
+ Caption = 'Frame Demo'
+ ClientHeight = 252
+ ClientWidth = 494
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -13
+ Font.Name = 'System'
+ Font.Style = []
+ Menu = MainMenu1
+ OldCreateOrder = True
+ Position = poDesktopCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ OnShow = FormShow
+ PixelsPerInch = 96
+ TextHeight = 16
+ object Panel2: TPanel
+ Left = 0
+ Top = 229
+ Width = 494
+ Height = 23
+ Align = alBottom
+ Alignment = taLeftJustify
+ BevelInner = bvLowered
+ TabOrder = 0
+ object ProgressBar: TProgressBar
+ Left = 342
+ Top = 2
+ Width = 150
+ Height = 19
+ Align = alRight
+ TabOrder = 0
+ Visible = False
+ end
+ end
+ object FrameViewer: TFrameViewer
+ Left = 0
+ Top = 25
+ Width = 494
+ Height = 204
+ OnHotSpotTargetCovered = HotspotTargetChange
+ OnHotSpotTargetClick = HotSpotTargetClick
+ ImageCacheCount = 6
+ OnHistoryChange = HistoryChange
+ NoSelect = False
+ OnBlankWindowRequest = WindowRequest
+ OnObjectClick = FrameViewerObjectClick
+ OnRightClick = FrameViewerRightClick
+ OnInclude = FrameViewerInclude
+ OnSoundRequest = SoundRequest
+ PrintMarginLeft = 2.000000000000000000
+ PrintMarginRight = 2.000000000000000000
+ PrintMarginTop = 2.000000000000000000
+ PrintMarginBottom = 3.000000000000000000
+ PrintScale = 1.000000000000000000
+ OnPrintHTMLHeader = ViewerPrintHTMLHeader
+ OnPrintHTMLFooter = ViewerPrintHTMLFooter
+ DefBackground = clWindow
+ DefFontName = 'Times New Roman'
+ DefPreFontName = 'Courier New'
+ DefHotSpotColor = clNavy
+ HistoryMaxCount = 6
+ CharSet = DEFAULT_CHARSET
+ OnProcessing = ProcessingHandler
+ Align = alClient
+ TabOrder = 1
+ OnMouseMove = FrameViewerMouseMove
+ OnFormSubmit = SubmitEvent
+ fvOptions = [fvMetaRefresh, fvOverLinksActive, fvPrintMonochromeBlack, fvPrintTableBackground, fvShowVScroll]
+ OnProgress = FrameViewerProgress
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 494
+ Height = 25
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 2
+ object ReloadButton: TButton
+ Left = 8
+ Top = 0
+ Width = 65
+ Height = 25
+ Caption = '&Reload'
+ Enabled = False
+ TabOrder = 0
+ OnClick = ReloadClick
+ end
+ object FwdButton: TButton
+ Left = 72
+ Top = 0
+ Width = 65
+ Height = 25
+ Caption = '&Fwd'
+ Enabled = False
+ TabOrder = 1
+ OnClick = FwdButtonClick
+ end
+ object BackButton: TButton
+ Left = 136
+ Top = 0
+ Width = 65
+ Height = 25
+ Caption = '&Back'
+ Enabled = False
+ TabOrder = 2
+ OnClick = BackButtonClick
+ end
+ object Edit2: TEdit
+ Left = 208
+ Top = 0
+ Width = 337
+ Height = 24
+ TabOrder = 3
+ end
+ end
+ object MediaPlayer: TMediaPlayer
+ Left = 76
+ Top = 115
+ Width = 253
+ Height = 30
+ Visible = False
+ TabOrder = 3
+ OnNotify = MediaPlayerNotify
+ end
+ object MainMenu1: TMainMenu
+ Left = 360
+ Top = 72
+ object File1: TMenuItem
+ Caption = '&File'
+ OnClick = File1Click
+ object Open1: TMenuItem
+ Caption = '&Open'
+ ShortCut = 114
+ OnClick = Open1Click
+ end
+ object SetPrintScale: TMenuItem
+ Caption = 'Set PrintScale'
+ OnClick = SetPrintScaleClick
+ end
+ object PrinterSetup: TMenuItem
+ Caption = 'Printer Setup...'
+ OnClick = PrinterSetupClick
+ end
+ object PrintPreview1: TMenuItem
+ Caption = 'Print Pre&view'
+ Enabled = False
+ OnClick = PrintPreview1Click
+ end
+ object Print1: TMenuItem
+ Caption = '&Print...'
+ OnClick = Print1Click
+ end
+ object N1: TMenuItem
+ Caption = '-'
+ end
+ object Exit1: TMenuItem
+ Caption = '&Exit'
+ OnClick = Exit1Click
+ end
+ end
+ object Edit1: TMenuItem
+ Caption = '&Edit'
+ OnClick = Edit1Click
+ object Find1: TMenuItem
+ Caption = '&Find'
+ ShortCut = 16454
+ OnClick = Find1Click
+ end
+ object Copy1: TMenuItem
+ Caption = '&Copy'
+ ShortCut = 16451
+ OnClick = Copy1Click
+ end
+ object N2: TMenuItem
+ Caption = '-'
+ end
+ object SelectAll1: TMenuItem
+ Caption = '&Select All'
+ OnClick = SelectAll1Click
+ end
+ end
+ object Options1: TMenuItem
+ Caption = '&Options'
+ object Showimages: TMenuItem
+ Caption = '&Show images'
+ Checked = True
+ OnClick = ShowimagesClick
+ end
+ object Fonts: TMenuItem
+ Caption = 'Default &Font/Colors'
+ OnClick = FontsClick
+ end
+ end
+ object HistoryMenuItem: TMenuItem
+ Caption = '&History'
+ Visible = False
+ end
+ object About1: TMenuItem
+ Caption = '&About'
+ OnClick = About1Click
+ end
+ end
+ object OpenDialog: TOpenDialog
+ DefaultExt = 'htm'
+ Filter = 'html files|*.htm;*.html|all files|*.*'
+ Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist]
+ Left = 320
+ Top = 72
+ end
+ object FindDialog: TFindDialog
+ Options = [frDown, frHideWholeWord, frDisableWholeWord]
+ OnFind = FindDialogFind
+ Left = 400
+ Top = 72
+ end
+ object PrintDialog: TPrintDialog
+ FromPage = 1
+ MinPage = 1
+ MaxPage = -1
+ Options = [poPageNums]
+ ToPage = 1
+ Left = 272
+ Top = 73
+ end
+ object PopupMenu: TPopupMenu
+ Left = 360
+ Top = 105
+ object ViewImage: TMenuItem
+ Caption = '&View Image'
+ OnClick = ViewImageClick
+ end
+ object CopyImagetoclipboard: TMenuItem
+ Caption = '&Copy image to clipboard'
+ OnClick = CopyImagetoclipboardClick
+ end
+ object N3: TMenuItem
+ Caption = '-'
+ end
+ object OpenInNewWindow: TMenuItem
+ Caption = '&Open in new window'
+ OnClick = OpenInNewWindowClick
+ end
+ end
+ object Timer1: TTimer
+ Enabled = False
+ Interval = 200
+ OnTimer = Timer1Timer
+ Left = 236
+ Top = 66
+ end
+ object PrinterSetupDialog: TPrinterSetupDialog
+ Left = 440
+ Top = 65
+ end
+end
diff --git a/applications/fpbrowser/fontdlg.dfm b/applications/fpbrowser/fontdlg.dfm
new file mode 100644
index 000000000..8ea95179a
--- /dev/null
+++ b/applications/fpbrowser/fontdlg.dfm
@@ -0,0 +1,177 @@
+object FontForm: TFontForm
+ Left = 200
+ Top = 153
+ BorderIcons = [biSystemMenu]
+ BorderStyle = bsDialog
+ Caption = 'Edit Default Font and Colors'
+ ClientHeight = 339
+ ClientWidth = 307
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -13
+ Font.Name = 'System'
+ Font.Style = []
+ OnCreate = FormCreate
+ OnShow = FormShow
+ PixelsPerInch = 96
+ TextHeight = 16
+ object Label1: TLabel
+ Left = 225
+ Top = 7
+ Width = 66
+ Height = 16
+ Caption = '&Font Color'
+ FocusControl = FontColorGrid
+ end
+ object Label2: TLabel
+ Left = 225
+ Top = 99
+ Width = 65
+ Height = 16
+ Caption = '&Link Color'
+ FocusControl = HotSpotColorGrid
+ end
+ object Label3: TLabel
+ Left = 225
+ Top = 189
+ Width = 61
+ Height = 16
+ Caption = 'Font &Size'
+ FocusControl = FontSizeEdit
+ end
+ object Label4: TLabel
+ Left = 9
+ Top = 200
+ Width = 70
+ Height = 16
+ Caption = 'Font &Name'
+ FocusControl = FontListBox
+ end
+ object Label5: TLabel
+ Left = 122
+ Top = 200
+ Width = 77
+ Height = 16
+ Caption = '&Background'
+ FocusControl = BackListBox
+ end
+ object FontListBox: TListBox
+ Left = 11
+ Top = 217
+ Width = 87
+ Height = 115
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clBlack
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ ItemHeight = 13
+ ParentFont = False
+ Sorted = True
+ TabOrder = 0
+ OnClick = ListBoxClicks
+ end
+ object FontColorGrid: TColorGrid
+ Left = 225
+ Top = 23
+ Width = 72
+ Height = 72
+ ClickEnablesColor = True
+ ForegroundIndex = -1
+ ForegroundEnabled = False
+ BackgroundEnabled = False
+ Selection = 3
+ TabOrder = 2
+ TabStop = True
+ OnChange = FontColorGridChange
+ end
+ object HotSpotColorGrid: TColorGrid
+ Left = 225
+ Top = 114
+ Width = 72
+ Height = 72
+ ClickEnablesColor = True
+ ForegroundIndex = -1
+ ForegroundEnabled = False
+ BackgroundEnabled = False
+ TabOrder = 3
+ TabStop = True
+ OnChange = HotSpotColorGridChange
+ end
+ object BackListBox: TListBox
+ Left = 122
+ Top = 217
+ Width = 87
+ Height = 115
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clBlack
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ ItemHeight = 13
+ ParentFont = False
+ TabOrder = 1
+ OnClick = ListBoxClicks
+ end
+ object OKButton: TButton
+ Left = 234
+ Top = 274
+ Width = 54
+ Height = 25
+ Caption = 'O&K'
+ Default = True
+ ModalResult = 1
+ TabOrder = 5
+ end
+ object Cancel: TButton
+ Left = 234
+ Top = 301
+ Width = 54
+ Height = 25
+ Caption = 'Cancel'
+ ModalResult = 2
+ TabOrder = 7
+ end
+ object ResetButton: TButton
+ Left = 234
+ Top = 246
+ Width = 54
+ Height = 25
+ Caption = '&Reset'
+ TabOrder = 6
+ OnClick = ResetButtonClick
+ end
+ object FontSizeEdit: TSpinEdit
+ Left = 225
+ Top = 206
+ Width = 65
+ Height = 26
+ MaxValue = 24
+ MinValue = 6
+ TabOrder = 4
+ Value = 12
+ OnChange = ListBoxClicks
+ end
+ object FontViewer: THTMLViewer
+ Left = 15
+ Top = 16
+ Width = 193
+ Height = 177
+ Cursor = 2
+ ViewImages = False
+ TabOrder = 8
+ BorderStyle = htSingle
+ HistoryMaxCount = 0
+ DefFontName = 'Times New Roman'
+ DefPreFontName = 'Courier New'
+ NoSelect = True
+ ScrollBars = ssVertical
+ CharSet = DEFAULT_CHARSET
+ PrintMarginLeft = 2.000000000000000000
+ PrintMarginRight = 2.000000000000000000
+ PrintMarginTop = 2.000000000000000000
+ PrintMarginBottom = 2.000000000000000000
+ PrintScale = 1.000000000000000000
+ htOptions = []
+ end
+end
diff --git a/applications/fpbrowser/fontdlg.lfm b/applications/fpbrowser/fontdlg.lfm
new file mode 100644
index 000000000..b6a1b2e7a
--- /dev/null
+++ b/applications/fpbrowser/fontdlg.lfm
@@ -0,0 +1,149 @@
+object FontForm: TFontForm
+ Left = 200
+ Top = 153
+ BorderIcons = [biSystemMenu]
+ BorderStyle = bsDialog
+ Caption = 'Edit Default Font and Colors'
+ ClientHeight = 339
+ Height = 339
+ ClientWidth = 307
+ Width = 307
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -13
+ Font.Name = 'Arial'
+ Font.Style = []
+ OnCreate = FormCreate
+ OnShow = FormShow
+ PixelsPerInch = 96
+ object Label1: TLabel
+ Left = 225
+ Top = 7
+ Width = 66
+ Height = 16
+ Caption = '&Font Color'
+ end
+ object Label2: TLabel
+ Left = 225
+ Top = 99
+ Width = 65
+ Height = 16
+ Caption = '&Link Color'
+ end
+ object Label3: TLabel
+ Left = 225
+ Top = 189
+ Width = 61
+ Height = 16
+ Caption = 'Font &Size'
+ FocusControl = FontSizeEdit
+ end
+ object Label4: TLabel
+ Left = 9
+ Top = 200
+ Width = 70
+ Height = 16
+ Caption = 'Font &Name'
+ FocusControl = FontListBox
+ end
+ object Label5: TLabel
+ Left = 122
+ Top = 200
+ Width = 77
+ Height = 16
+ Caption = '&Background'
+ FocusControl = BackListBox
+ end
+ object FontListBox: TListBox
+ Left = 11
+ Top = 217
+ Width = 87
+ Height = 115
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clBlack
+ Font.Height = -11
+ Font.Name = 'Arial'
+ Font.Style = []
+ ItemHeight = 13
+ ParentFont = False
+ Sorted = True
+ TabOrder = 0
+ OnClick = ListBoxClicks
+ end
+ object BackListBox: TListBox
+ Left = 122
+ Top = 217
+ Width = 87
+ Height = 115
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clBlack
+ Font.Height = -11
+ Font.Name = 'Arial'
+ Font.Style = []
+ ItemHeight = 13
+ ParentFont = False
+ TabOrder = 1
+ OnClick = ListBoxClicks
+ end
+ object OKButton: TButton
+ Left = 234
+ Top = 274
+ Width = 54
+ Height = 25
+ Caption = 'O&K'
+ Default = True
+ ModalResult = 1
+ TabOrder = 5
+ end
+ object Cancel: TButton
+ Left = 234
+ Top = 301
+ Width = 54
+ Height = 25
+ Caption = 'Cancel'
+ ModalResult = 2
+ TabOrder = 7
+ end
+ object ResetButton: TButton
+ Left = 234
+ Top = 246
+ Width = 54
+ Height = 25
+ Caption = '&Reset'
+ TabOrder = 6
+ OnClick = ResetButtonClick
+ end
+ object FontSizeEdit: TSpinEdit
+ Left = 225
+ Top = 206
+ Width = 65
+ Height = 26
+ MaxValue = 24
+ MinValue = 6
+ TabOrder = 4
+ Value = 12
+ OnChange = ListBoxClicks
+ end
+ object FontViewer: THTMLViewer
+ Left = 15
+ Top = 16
+ Width = 193
+ Height = 177
+ Cursor = 2
+ ViewImages = False
+ TabOrder = 8
+ BorderStyle = htSingle
+ HistoryMaxCount = 0
+ DefFontName = 'Times New Roman'
+ DefPreFontName = 'Courier New'
+ NoSelect = True
+ ScrollBars = ssVertical
+ CharSet = DEFAULT_CHARSET
+ PrintMarginLeft = 2.000000000000000000
+ PrintMarginRight = 2.000000000000000000
+ PrintMarginTop = 2.000000000000000000
+ PrintMarginBottom = 2.000000000000000000
+ PrintScale = 1.000000000000000000
+ htOptions = []
+ end
+end
diff --git a/applications/fpbrowser/fontdlg.lrs b/applications/fpbrowser/fontdlg.lrs
new file mode 100644
index 000000000..268bec079
--- /dev/null
+++ b/applications/fpbrowser/fontdlg.lrs
@@ -0,0 +1,42 @@
+LazarusResources.Add('TFontForm','FORMDATA',[
+ 'TPF0'#9'TFontForm'#8'FontForm'#4'Left'#3#200#0#3'Top'#3#153#0#11'BorderIcons'
+ +#11#12'biSystemMenu'#0#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#28'Edit De'
+ +'fault Font and Colors'#12'ClientHeight'#3'S'#1#6'Height'#3'S'#1#11'ClientWi'
+ +'dth'#3'3'#1#5'Width'#3'3'#1#12'Font.Charset'#7#15'DEFAULT_CHARSET'#10'Font.'
+ +'Color'#7#12'clWindowText'#11'Font.Height'#2#243#9'Font.Name'#6#5'Arial'#10
+ +'Font.Style'#11#0#8'OnCreate'#7#10'FormCreate'#6'OnShow'#7#8'FormShow'#13'Pi'
+ +'xelsPerInch'#2'`'#0#6'TLabel'#6'Label1'#4'Left'#3#225#0#3'Top'#2#7#5'Width'
+ +#2'B'#6'Height'#2#16#7'Caption'#6#11'&Font Color'#0#0#6'TLabel'#6'Label2'#4
+ +'Left'#3#225#0#3'Top'#2'c'#5'Width'#2'A'#6'Height'#2#16#7'Caption'#6#11'&Lin'
+ +'k Color'#0#0#6'TLabel'#6'Label3'#4'Left'#3#225#0#3'Top'#3#189#0#5'Width'#2
+ +'='#6'Height'#2#16#7'Caption'#6#10'Font &Size'#12'FocusControl'#7#12'FontSiz'
+ +'eEdit'#0#0#6'TLabel'#6'Label4'#4'Left'#2#9#3'Top'#3#200#0#5'Width'#2'F'#6'H'
+ +'eight'#2#16#7'Caption'#6#10'Font &Name'#12'FocusControl'#7#11'FontListBox'#0
+ +#0#6'TLabel'#6'Label5'#4'Left'#2'z'#3'Top'#3#200#0#5'Width'#2'M'#6'Height'#2
+ +#16#7'Caption'#6#11'&Background'#12'FocusControl'#7#11'BackListBox'#0#0#8'TL'
+ +'istBox'#11'FontListBox'#4'Left'#2#11#3'Top'#3#217#0#5'Width'#2'W'#6'Height'
+ +#2's'#12'Font.Charset'#7#15'DEFAULT_CHARSET'#10'Font.Color'#7#7'clBlack'#11
+ +'Font.Height'#2#245#9'Font.Name'#6#5'Arial'#10'Font.Style'#11#0#10'ItemHeigh'
+ +'t'#2#13#10'ParentFont'#8#6'Sorted'#9#8'TabOrder'#2#0#7'OnClick'#7#13'ListBo'
+ +'xClicks'#0#0#8'TListBox'#11'BackListBox'#4'Left'#2'z'#3'Top'#3#217#0#5'Widt'
+ +'h'#2'W'#6'Height'#2's'#12'Font.Charset'#7#15'DEFAULT_CHARSET'#10'Font.Color'
+ +#7#7'clBlack'#11'Font.Height'#2#245#9'Font.Name'#6#5'Arial'#10'Font.Style'#11
+ +#0#10'ItemHeight'#2#13#10'ParentFont'#8#8'TabOrder'#2#1#7'OnClick'#7#13'List'
+ +'BoxClicks'#0#0#7'TButton'#8'OKButton'#4'Left'#3#234#0#3'Top'#3#18#1#5'Width'
+ +#2'6'#6'Height'#2#25#7'Caption'#6#3'O&K'#7'Default'#9#11'ModalResult'#2#1#8
+ +'TabOrder'#2#5#0#0#7'TButton'#6'Cancel'#4'Left'#3#234#0#3'Top'#3'-'#1#5'Widt'
+ +'h'#2'6'#6'Height'#2#25#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrde'
+ +'r'#2#7#0#0#7'TButton'#11'ResetButton'#4'Left'#3#234#0#3'Top'#3#246#0#5'Widt'
+ +'h'#2'6'#6'Height'#2#25#7'Caption'#6#6'&Reset'#8'TabOrder'#2#6#7'OnClick'#7
+ +#16'ResetButtonClick'#0#0#9'TSpinEdit'#12'FontSizeEdit'#4'Left'#3#225#0#3'To'
+ +'p'#3#206#0#5'Width'#2'A'#6'Height'#2#26#8'MaxValue'#2#24#8'MinValue'#2#6#8
+ +'TabOrder'#2#4#5'Value'#2#12#8'OnChange'#7#13'ListBoxClicks'#0#0#11'THTMLVie'
+ +'wer'#10'FontViewer'#4'Left'#2#15#3'Top'#2#16#5'Width'#3#193#0#6'Height'#3
+ +#177#0#6'Cursor'#2#2#10'ViewImages'#8#8'TabOrder'#2#8#11'BorderStyle'#7#8'ht'
+ +'Single'#15'HistoryMaxCount'#2#0#11'DefFontName'#6#15'Times New Roman'#14'De'
+ +'fPreFontName'#6#11'Courier New'#8'NoSelect'#9#10'ScrollBars'#7#10'ssVertica'
+ +'l'#7'CharSet'#7#15'DEFAULT_CHARSET'#15'PrintMarginLeft'#5#0#0#0#0#0#0#0#128
+ +#0'@'#16'PrintMarginRight'#5#0#0#0#0#0#0#0#128#0'@'#14'PrintMarginTop'#5#0#0
+ +#0#0#0#0#0#128#0'@'#17'PrintMarginBottom'#5#0#0#0#0#0#0#0#128#0'@'#10'PrintS'
+ +'cale'#5#0#0#0#0#0#0#0#128#255'?'#9'htOptions'#11#0#0#0#0
+]);
diff --git a/applications/fpbrowser/fontdlg.pas b/applications/fpbrowser/fontdlg.pas
new file mode 100755
index 000000000..8e3a49dd5
--- /dev/null
+++ b/applications/fpbrowser/fontdlg.pas
@@ -0,0 +1,238 @@
+unit Fontdlg;
+
+interface
+
+uses
+ {$IFNDEF LCL} Windows, Messages, {$ELSE} LclIntf, LMessages, LclType, LResources, {$ENDIF}
+ SysUtils, Classes, Graphics, Controls,
+ Forms, Dialogs, StdCtrls, {$IFNDEF LCL} ColorGrd, {$ENDIF} Htmlview, Spin;
+
+type
+ TFontForm = class(TForm)
+ FontListBox: TListBox;
+{$IFNDEF LCL}
+ FontColorGrid: TColorGrid;
+ HotSpotColorGrid: TColorGrid;
+{$ENDIF}
+ BackListBox: TListBox;
+ OKButton: TButton;
+ Cancel: TButton;
+ ResetButton: TButton;
+ FontSizeEdit: TSpinEdit;
+ Label1: TLabel;
+ Label2: TLabel;
+ Label3: TLabel;
+ Label4: TLabel;
+ Label5: TLabel;
+ FontViewer: THTMLViewer;
+ procedure FormCreate(Sender: TObject);
+ procedure FormShow(Sender: TObject);
+ procedure ResetButtonClick(Sender: TObject);
+ procedure HotSpotColorGridChange(Sender: TObject);
+ procedure FontColorGridChange(Sender: TObject);
+ procedure ListBoxClicks(Sender: TObject);
+ private
+ { Private declarations }
+ FFontColor: TColor;
+ FHotSpotColor: TColor;
+ FFontSize: integer;
+ InitialFontName: string;
+ InitialFontSize: integer;
+ InitialFontColor: TColor;
+ InitialHotSpotColor: TColor;
+ InitialBackground: TColor;
+ procedure AddItem(const Value: string);
+ function GetFontName: TFontName;
+ procedure SetFontName(Value: TFontName);
+ function GetBackground: TColor;
+ procedure SetBackground(Value: TColor);
+ procedure SetFontColor(Value: TColor);
+ procedure SetHotSpotColor(Value: TColor);
+ procedure SetFontSize(Value: integer);
+ procedure LoadAgain;
+ public
+ { Public declarations }
+ property FontName: TFontName read GetFontName write SetFontName;
+ property Background: TColor read GetBackground write SetBackground;
+ property FontColor: TColor read FFontColor write SetFontColor;
+ property FontSize: integer read FFontSize write SetFontSize;
+ property HotSpotColor: TColor read FHotSpotColor write SetHotSpotColor;
+ end;
+
+var
+ FontForm: TFontForm;
+
+implementation
+
+{$IFNDEF LCL}
+{$R *.DFM}
+{$ENDIF}
+const
+ ViewText: string =
+ '
Heading
'+
+ 'Some normal text.'+
+ '- HotSpot Item'+
+ '
- Bold Text'+
+ '
- Italicized Text'+
+ '
Code Text
'+
+ '
'+
+ '
';
+
+procedure TFontForm.LoadAgain;
+begin
+FontViewer.LoadFromBuffer(@ViewText[1], Length(ViewText), '');
+end;
+
+procedure TFontForm.FormCreate(Sender: TObject);
+begin
+FontListBox.Items := Screen.Fonts;
+GetColorValues(AddItem);
+LoadAgain;
+end;
+
+procedure TFontForm.AddItem(const Value: string);
+var
+ Color: TColor;
+begin
+Color := StringToColor(Value);
+if (Color >= 0) or (Color = -16) or (Color = -6) or (Color = -2) then
+ BackListBox.Items.Add(Value);
+end;
+
+function TFontForm.GetFontName: TFontName;
+begin
+{$IFNDEF MSWINDOWS}
+ if Screen.Fonts.Count = 0 then //GTK2 without HasX defined (empty list)?
+ begin
+ Result := FontViewer.DefFontName;
+ Exit;
+ end;
+{$ENDIF}
+try
+ Result := FontListBox.Items[FontListBox.ItemIndex];
+except
+ Result := 'System'; {in case nothing hilited}
+ end;
+end;
+
+procedure TFontForm.SetFontName(Value: TFontName);
+var
+ I: integer;
+begin
+I := FontListBox.Items.IndexOf(Value);
+if I < 0 then
+ I := FontListBox.Items.IndexOf('System');
+{$IFNDEF MSWINDOWS} //System font only makes sense on Windows, so just select first font
+if I < 0 then
+ I := 0;
+if Screen.Fonts.Count > 0 then //Check in case GTK2 without HasX defined
+{$ENDIF}
+FontListBox.ItemIndex := I;
+FontViewer.DefFontName := Value;
+LoadAgain;
+end;
+
+function TFontForm.GetBackground: TColor;
+begin
+try
+ Result := StringToColor(BackListBox.Items[BackListBox.ItemIndex]);
+except
+ Result := clBtnFace;
+ end;
+end;
+
+procedure TFontForm.SetBackground(Value: TColor);
+var
+ I: integer;
+ S: string[80];
+begin
+S := ColorToString(Value);
+I := BackListBox.Items.IndexOf(S);
+if I < 0 then
+ begin
+ BackListBox.Items.Add(S);
+ I := BackListBox.Items.IndexOf(S);
+ end;
+BackListBox.ItemIndex := I;
+FontViewer.DefBackground := Value;
+end;
+
+procedure TFontForm.SetFontSize(Value: integer);
+begin
+FontViewer.DefFontSize := Value;
+FFontSize := Value;
+FontSizeEdit.Value := Value;
+LoadAgain;
+end;
+
+procedure TFontForm.SetFontColor(Value: TColor);
+begin
+FontViewer.DefFontColor := Value;
+FFontColor := Value;
+{$IFNDEF LCL}
+FontColorGrid.ForegroundEnabled := False;
+{$ENDIF}
+LoadAgain;
+end;
+
+procedure TFontForm.SetHotSpotColor(Value: TColor);
+begin
+FontViewer.DefHotSpotColor := Value;
+FHotSpotColor := Value;
+{$IFNDEF LCL}
+HotSpotColorGrid.ForegroundEnabled := False;
+{$ENDIF}
+LoadAgain;
+end;
+
+procedure TFontForm.FormShow(Sender: TObject);
+begin
+InitialFontName := GetFontName;
+InitialFontColor := FFontColor;
+InitialHotSpotColor := FHotSpotColor;
+InitialBackground := GetBackground;
+InitialFontSize := FFontSize;
+end;
+
+procedure TFontForm.ResetButtonClick(Sender: TObject);
+begin
+FontName := InitialFontName;
+FontSize := InitialFontSize;
+FontColor := InitialFontColor;
+HotSpotColor := InitialHotSpotColor;
+Background := InitialBackground;
+end;
+
+procedure TFontForm.HotSpotColorGridChange(Sender: TObject);
+begin
+{$IFNDEF LCL}
+HotSpotColor := HotSpotColorGrid.ForegroundColor;
+{$ENDIF}
+end;
+
+procedure TFontForm.FontColorGridChange(Sender: TObject);
+begin
+{$IFNDEF LCL}
+FontColor := FontColorGrid.ForegroundColor;
+{$ENDIF}
+end;
+
+procedure TFontForm.ListBoxClicks(Sender: TObject);
+begin
+if Sender = FontListBox then
+{$IFNDEF MSWINDOWS}
+ if Screen.Fonts.Count = 0 then else //Check in case GTK2 without HasX defined
+{$ENDIF}
+ FontName := FontListBox.Items[FontListBox.ItemIndex]
+else if Sender = BackListBox then
+ Background := StringToColor(BackListBox.Items[BackListBox.ItemIndex])
+else if Sender = FontSizeEdit then
+ FontSize := FontSizeEdit.Value;
+end;
+
+initialization
+{$IFDEF LCL}
+{$I Fontdlg.lrs} {Include form's resource file}
+{$ENDIF}
+
+end.
diff --git a/applications/fpbrowser/fpbrowser.dpr b/applications/fpbrowser/fpbrowser.dpr
new file mode 100644
index 000000000..e1c240705
--- /dev/null
+++ b/applications/fpbrowser/fpbrowser.dpr
@@ -0,0 +1,29 @@
+program fpbrowser;
+{A program to demonstrate the ThtmlViewer component}
+
+uses
+{$IFDEF LCL}
+ Interfaces,
+{$ENDIF}
+ Forms, laz_synapse,
+ mainform {Form1},
+ Submit in 'Submit.pas' {SubmitForm},
+ Fontdlg in 'Fontdlg.pas' {FontForm},
+ Htmlabt in 'Htmlabt.pas' {AboutBox},
+{$IFNDEF LCL}
+ PreviewForm in 'PreviewForm.pas' {PreviewForm},
+ Gopage in 'Gopage.pas' {GoPageForm},
+ PrintStatusForm in 'PrintStatusForm.pas' {PrnStatusForm},
+{$ENDIF}
+ ImgForm in 'ImgForm.pas', pageloader {ImageForm};
+
+{$IFDEF MSWINDOWS}
+{$R *.res}
+{$ENDIF}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.CreateForm(TSubmitForm, SubmitForm);
+ Application.Run;
+end.
diff --git a/applications/fpbrowser/fpbrowser.lpi b/applications/fpbrowser/fpbrowser.lpi
new file mode 100644
index 000000000..1ed998307
--- /dev/null
+++ b/applications/fpbrowser/fpbrowser.lpi
@@ -0,0 +1,315 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/applications/fpbrowser/gopage.dfm b/applications/fpbrowser/gopage.dfm
new file mode 100644
index 000000000..46b4ded38
--- /dev/null
+++ b/applications/fpbrowser/gopage.dfm
@@ -0,0 +1,66 @@
+object GoPageForm: TGoPageForm
+ Left = 305
+ Top = 180
+ ActiveControl = PageNum
+ BorderStyle = bsDialog
+ Caption = 'Go to Page Number'
+ ClientHeight = 116
+ ClientWidth = 231
+ Font.Color = clBlack
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Bevel1: TBevel
+ Left = 11
+ Top = 8
+ Width = 209
+ Height = 57
+ Shape = bsFrame
+ IsControl = True
+ end
+ object OKBtn: TBitBtn
+ Left = 35
+ Top = 76
+ Width = 77
+ Height = 27
+ Font.Color = clBlack
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ ParentFont = False
+ TabOrder = 1
+ Kind = bkOK
+ Spacing = 3
+ IsControl = True
+ end
+ object CancelBtn: TBitBtn
+ Left = 119
+ Top = 76
+ Width = 77
+ Height = 27
+ Font.Color = clBlack
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ ParentFont = False
+ TabOrder = 2
+ Kind = bkCancel
+ Spacing = 3
+ IsControl = True
+ end
+ object PageNum: TSpinEdit
+ Left = 87
+ Top = 27
+ Width = 57
+ Height = 22
+ MaxValue = 0
+ MinValue = 1
+ TabOrder = 0
+ Value = 0
+ OnEnter = PageNumEnter
+ OnKeyDown = PageNumKeyDown
+ end
+end
diff --git a/applications/fpbrowser/gopage.lfm b/applications/fpbrowser/gopage.lfm
new file mode 100644
index 000000000..e910ade61
--- /dev/null
+++ b/applications/fpbrowser/gopage.lfm
@@ -0,0 +1,64 @@
+object GoPageForm: TGoPageForm
+ Left = 305
+ Top = 180
+ ActiveControl = PageNum
+ BorderStyle = bsDialog
+ Caption = 'Go to Page Number'
+ ClientHeight = 116
+ Height = 116
+ ClientWidth = 231
+ Width = 231
+ Font.Color = clBlack
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ object Bevel1: TBevel
+ Left = 11
+ Top = 8
+ Width = 209
+ Height = 57
+ Shape = bsFrame
+ end
+ object OKBtn: TBitBtn
+ Left = 35
+ Top = 76
+ Width = 77
+ Height = 27
+ Font.Color = clBlack
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ ParentFont = False
+ TabOrder = 1
+ Kind = bkOK
+ Spacing = 3
+ end
+ object CancelBtn: TBitBtn
+ Left = 119
+ Top = 76
+ Width = 77
+ Height = 27
+ Font.Color = clBlack
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ ParentFont = False
+ TabOrder = 2
+ Kind = bkCancel
+ Spacing = 3
+ end
+ object PageNum: TSpinEdit
+ Left = 87
+ Top = 27
+ Width = 57
+ Height = 22
+ MaxValue = 0
+ MinValue = 1
+ TabOrder = 0
+ Value = 0
+ OnEnter = PageNumEnter
+ OnKeyDown = PageNumKeyDown
+ end
+end
diff --git a/applications/fpbrowser/gopage.lrs b/applications/fpbrowser/gopage.lrs
new file mode 100644
index 000000000..4f564b806
--- /dev/null
+++ b/applications/fpbrowser/gopage.lrs
@@ -0,0 +1,18 @@
+LazarusResources.Add('TGoPageForm','FORMDATA',[
+ 'TPF0'#11'TGoPageForm'#10'GoPageForm'#4'Left'#3'1'#1#3'Top'#3#180#0#13'Active'
+ +'Control'#7#7'PageNum'#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#17'Go to P'
+ +'age Number'#12'ClientHeight'#2't'#6'Height'#2't'#11'ClientWidth'#3#231#0#5
+ +'Width'#3#231#0#10'Font.Color'#7#7'clBlack'#11'Font.Height'#2#245#9'Font.Nam'
+ +'e'#6#6'Tahoma'#10'Font.Style'#11#6'fsBold'#0#8'Position'#7#14'poScreenCente'
+ +'r'#13'PixelsPerInch'#2'`'#0#6'TBevel'#6'Bevel1'#4'Left'#2#11#3'Top'#2#8#5'W'
+ +'idth'#3#209#0#6'Height'#2'9'#5'Shape'#7#7'bsFrame'#0#0#7'TBitBtn'#5'OKBtn'#4
+ +'Left'#2'#'#3'Top'#2'L'#5'Width'#2'M'#6'Height'#2#27#10'Font.Color'#7#7'clBl'
+ +'ack'#11'Font.Height'#2#245#9'Font.Name'#6#6'Tahoma'#10'Font.Style'#11#0#10
+ +'ParentFont'#8#8'TabOrder'#2#1#4'Kind'#7#4'bkOK'#7'Spacing'#2#3#0#0#7'TBitBt'
+ +'n'#9'CancelBtn'#4'Left'#2'w'#3'Top'#2'L'#5'Width'#2'M'#6'Height'#2#27#10'Fo'
+ +'nt.Color'#7#7'clBlack'#11'Font.Height'#2#245#9'Font.Name'#6#6'Tahoma'#10'Fo'
+ +'nt.Style'#11#0#10'ParentFont'#8#8'TabOrder'#2#2#4'Kind'#7#8'bkCancel'#7'Spa'
+ +'cing'#2#3#0#0#9'TSpinEdit'#7'PageNum'#4'Left'#2'W'#3'Top'#2#27#5'Width'#2'9'
+ +#6'Height'#2#22#8'MaxValue'#2#0#8'MinValue'#2#1#8'TabOrder'#2#0#5'Value'#2#0
+ +#7'OnEnter'#7#12'PageNumEnter'#9'OnKeyDown'#7#14'PageNumKeyDown'#0#0#0
+]);
diff --git a/applications/fpbrowser/gopage.pas b/applications/fpbrowser/gopage.pas
new file mode 100644
index 000000000..ddea214c2
--- /dev/null
+++ b/applications/fpbrowser/gopage.pas
@@ -0,0 +1,54 @@
+unit Gopage;
+
+interface
+
+uses
+ {$IFNDEF LCL} WinTypes, WinProcs, {$ELSE} LclIntf, LResources, {$ENDIF}
+ Classes, Graphics, Forms, Controls, Buttons,
+ StdCtrls, ExtCtrls, Spin;
+
+type
+ TGoPageForm = class(TForm)
+ OKBtn: TBitBtn;
+ CancelBtn: TBitBtn;
+ Bevel1: TBevel;
+ PageNum: TSpinEdit;
+ procedure PageNumEnter(Sender: TObject);
+ procedure PageNumKeyDown(Sender: TObject; var Key: Word;
+ Shift: TShiftState);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ GoPageForm: TGoPageForm;
+
+implementation
+
+{$IFNDEF LCL}
+{$R *.DFM}
+{$ENDIF}
+
+procedure TGoPageForm.PageNumEnter(Sender: TObject);
+begin
+PageNum.SelectAll;
+end;
+
+procedure TGoPageForm.PageNumKeyDown(Sender: TObject; var Key: Word;
+ Shift: TShiftState);
+begin
+if Key = 13 then
+ Begin
+ Key := 0;
+ OKBtn.Click;
+ end;
+end;
+
+initialization
+{$IFDEF LCL}
+{$I Gopage.lrs} {Include form's resource file}
+{$ENDIF}
+
+end.
diff --git a/applications/fpbrowser/htmlabt.dfm b/applications/fpbrowser/htmlabt.dfm
new file mode 100644
index 000000000..dff22719d
--- /dev/null
+++ b/applications/fpbrowser/htmlabt.dfm
@@ -0,0 +1,61 @@
+object AboutBox: TAboutBox
+ Left = 286
+ Top = 214
+ BorderIcons = [biSystemMenu]
+ BorderStyle = bsDialog
+ Caption = 'About'
+ ClientHeight = 184
+ ClientWidth = 306
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -13
+ Font.Name = 'System'
+ Font.Style = []
+ OldCreateOrder = True
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 16
+ object BitBtn1: TBitBtn
+ Left = 114
+ Top = 146
+ Width = 77
+ Height = 30
+ TabOrder = 0
+ Kind = bkOK
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 306
+ Height = 137
+ Align = alTop
+ BevelInner = bvLowered
+ BevelOuter = bvNone
+ Caption = 'Panel1'
+ TabOrder = 1
+ object Viewer: THTMLViewer
+ Left = 1
+ Top = 1
+ Width = 304
+ Height = 135
+ ViewImages = False
+ Enabled = False
+ TabOrder = 0
+ Align = alClient
+ BorderStyle = htSingle
+ HistoryMaxCount = 0
+ DefFontName = 'Times New Roman'
+ DefPreFontName = 'Courier New'
+ NoSelect = True
+ ScrollBars = ssNone
+ CharSet = DEFAULT_CHARSET
+ PrintMarginLeft = 2.000000000000000000
+ PrintMarginRight = 2.000000000000000000
+ PrintMarginTop = 2.000000000000000000
+ PrintMarginBottom = 2.000000000000000000
+ PrintScale = 1.000000000000000000
+ htOptions = []
+ end
+ end
+end
diff --git a/applications/fpbrowser/htmlabt.lfm b/applications/fpbrowser/htmlabt.lfm
new file mode 100644
index 000000000..1ebf2ab0f
--- /dev/null
+++ b/applications/fpbrowser/htmlabt.lfm
@@ -0,0 +1,61 @@
+object AboutBox: TAboutBox
+ Left = 286
+ Top = 214
+ BorderIcons = [biSystemMenu]
+ BorderStyle = bsDialog
+ Caption = 'About'
+ ClientHeight = 184
+ Height = 184
+ ClientWidth = 306
+ Width = 306
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -13
+ Font.Name = 'Arial'
+ Font.Style = []
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ object BitBtn1: TBitBtn
+ Left = 114
+ Top = 146
+ Width = 77
+ Height = 30
+ TabOrder = 0
+ Kind = bkOK
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 306
+ Height = 137
+ Align = alTop
+ BevelInner = bvLowered
+ BevelOuter = bvNone
+ Caption = 'Panel1'
+ TabOrder = 1
+ object Viewer: THTMLViewer
+ Left = 1
+ Top = 1
+ Width = 304
+ Height = 135
+ ViewImages = False
+ Enabled = False
+ TabOrder = 0
+ Align = alClient
+ BorderStyle = htSingle
+ HistoryMaxCount = 0
+ DefFontName = 'Times New Roman'
+ DefPreFontName = 'Courier New'
+ NoSelect = True
+ ScrollBars = ssNone
+ CharSet = DEFAULT_CHARSET
+ PrintMarginLeft = 2.000000000000000000
+ PrintMarginRight = 2.000000000000000000
+ PrintMarginTop = 2.000000000000000000
+ PrintMarginBottom = 2.000000000000000000
+ PrintScale = 1.000000000000000000
+ htOptions = []
+ end
+ end
+end
diff --git a/applications/fpbrowser/htmlabt.lrs b/applications/fpbrowser/htmlabt.lrs
new file mode 100644
index 000000000..9902682f5
--- /dev/null
+++ b/applications/fpbrowser/htmlabt.lrs
@@ -0,0 +1,20 @@
+LazarusResources.Add('TAboutBox','FORMDATA',[
+ 'TPF0'#9'TAboutBox'#8'AboutBox'#4'Left'#3#30#1#3'Top'#3#214#0#11'BorderIcons'
+ +#11#12'biSystemMenu'#0#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#5'About'#12
+ +'ClientHeight'#3#184#0#6'Height'#3#184#0#11'ClientWidth'#3'2'#1#5'Width'#3'2'
+ +#1#5'Color'#7#9'clBtnFace'#12'Font.Charset'#7#15'DEFAULT_CHARSET'#10'Font.Co'
+ +'lor'#7#12'clWindowText'#11'Font.Height'#2#243#9'Font.Name'#6#5'Arial'#10'Fo'
+ +'nt.Style'#11#0#8'Position'#7#14'poScreenCenter'#13'PixelsPerInch'#2'`'#0#7
+ +'TBitBtn'#7'BitBtn1'#4'Left'#2'r'#3'Top'#3#146#0#5'Width'#2'M'#6'Height'#2#30
+ +#8'TabOrder'#2#0#4'Kind'#7#4'bkOK'#0#0#6'TPanel'#6'Panel1'#4'Left'#2#0#3'Top'
+ +#2#0#5'Width'#3'2'#1#6'Height'#3#137#0#5'Align'#7#5'alTop'#10'BevelInner'#7#9
+ +'bvLowered'#10'BevelOuter'#7#6'bvNone'#7'Caption'#6#6'Panel1'#8'TabOrder'#2#1
+ +#0#11'THTMLViewer'#6'Viewer'#4'Left'#2#1#3'Top'#2#1#5'Width'#3'0'#1#6'Height'
+ +#3#135#0#10'ViewImages'#8#7'Enabled'#8#8'TabOrder'#2#0#5'Align'#7#8'alClient'
+ +#11'BorderStyle'#7#8'htSingle'#15'HistoryMaxCount'#2#0#11'DefFontName'#6#15
+ +'Times New Roman'#14'DefPreFontName'#6#11'Courier New'#8'NoSelect'#9#10'Scro'
+ +'llBars'#7#6'ssNone'#7'CharSet'#7#15'DEFAULT_CHARSET'#15'PrintMarginLeft'#5#0
+ +#0#0#0#0#0#0#128#0'@'#16'PrintMarginRight'#5#0#0#0#0#0#0#0#128#0'@'#14'Print'
+ +'MarginTop'#5#0#0#0#0#0#0#0#128#0'@'#17'PrintMarginBottom'#5#0#0#0#0#0#0#0
+ +#128#0'@'#10'PrintScale'#5#0#0#0#0#0#0#0#128#255'?'#9'htOptions'#11#0#0#0#0#0
+]);
diff --git a/applications/fpbrowser/htmlabt.pas b/applications/fpbrowser/htmlabt.pas
new file mode 100755
index 000000000..325cdfe29
--- /dev/null
+++ b/applications/fpbrowser/htmlabt.pas
@@ -0,0 +1,92 @@
+unit HTMLAbt;
+
+interface
+
+uses
+ {$IFNDEF LCL} Windows, Messages, {$ELSE} LclIntf, LMessages, LclType, LResources, LCLVersion, {$ENDIF}
+ SysUtils, Classes, Graphics, Controls,
+ Forms, Dialogs, StdCtrls, Buttons, Htmlview, ExtCtrls;
+
+const
+ Version = '9.45';
+
+type
+ TAboutBox = class(TForm)
+ BitBtn1: TBitBtn;
+ Panel1: TPanel;
+ Viewer: THTMLViewer;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ constructor CreateIt(Owner: TComponent; const ProgName, CompName: string);
+ end;
+
+var
+ AboutBox: TAboutBox;
+
+implementation
+
+{$IFNDEF LCL}
+{$R *.DFM}
+{$ENDIF}
+
+constructor TAboutBox.CreateIt(Owner: TComponent; const ProgName, CompName: string);
+var
+ S: string[210];
+begin
+inherited Create(Owner);
+//Viewer.DefFontName := 'MS Sans Serif'; //Windows-only font
+Viewer.DefFontName := 'Arial';
+Viewer.DefFontSize := 9;
+Viewer.DefFontColor := clNavy;
+S :=''+
+ ''+
+ ''+ProgName+'
'+
+ 'A demo program for the '+CompName+' component'+
+
+{$IFNDEF LCL}
+ 'Version '+Version+' compiled with Delphi '+
+{$ifdef Windows}
+ '1
'+
+{$endif}
+{$ifdef Ver90}
+ '2'+
+{$endif}
+{$ifdef Ver100}
+ '3'+
+{$endif}
+{$ifdef Ver120}
+ '4'+
+{$endif}
+{$ifdef Ver130}
+ '5'+
+{$endif}
+{$ifdef Ver140}
+ '6'+
+{$endif}
+{$ifdef Ver150}
+ '7'+
+{$endif}
+{$ifdef Ver170}
+ '2005'+
+{$endif}
+{$ifdef Ver180}
+ '2006'+
+{$endif}
+
+{$ELSE}
+ 'Version ' + Version + ' compiled with Lazarus ' + lcl_version + '
' +
+{$ENDIF}
+
+ ''+
+ '';
+Viewer.LoadFromBuffer(@S[1], Length(S), '');
+end;
+
+initialization
+{$IFDEF LCL}
+{$I Htmlabt.lrs} {Include form's resource file}
+{$ENDIF}
+
+end.
diff --git a/applications/fpbrowser/imgform.dfm b/applications/fpbrowser/imgform.dfm
new file mode 100644
index 000000000..e1181c4d9
--- /dev/null
+++ b/applications/fpbrowser/imgform.dfm
@@ -0,0 +1,27 @@
+object ImageForm: TImageForm
+ Left = 591
+ Top = 236
+ AutoScroll = False
+ Caption = 'ImageForm'
+ ClientHeight = 199
+ ClientWidth = 216
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ FormStyle = fsStayOnTop
+ OldCreateOrder = True
+ Position = poDefaultPosOnly
+ OnShow = FormShow
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Image1: TImage
+ Left = 0
+ Top = 0
+ Width = 317
+ Height = 306
+ AutoSize = True
+ end
+end
diff --git a/applications/fpbrowser/imgform.lfm b/applications/fpbrowser/imgform.lfm
new file mode 100644
index 000000000..1cf113877
--- /dev/null
+++ b/applications/fpbrowser/imgform.lfm
@@ -0,0 +1,27 @@
+object ImageForm: TImageForm
+ Left = 591
+ Top = 236
+ AutoScroll = False
+ Caption = 'ImageForm'
+ ClientHeight = 199
+ Height = 199
+ ClientWidth = 216
+ Width = 216
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Arial'
+ Font.Style = []
+ FormStyle = fsStayOnTop
+ Position = poDefaultPosOnly
+ OnShow = FormShow
+ PixelsPerInch = 96
+ object Image1: TImage
+ Left = 0
+ Top = 0
+ Width = 317
+ Height = 306
+ AutoSize = True
+ end
+end
diff --git a/applications/fpbrowser/imgform.lrs b/applications/fpbrowser/imgform.lrs
new file mode 100644
index 000000000..230b68fa4
--- /dev/null
+++ b/applications/fpbrowser/imgform.lrs
@@ -0,0 +1,10 @@
+LazarusResources.Add('TImageForm','FORMDATA',[
+ 'TPF0'#10'TImageForm'#9'ImageForm'#4'Left'#3'O'#2#3'Top'#3#236#0#10'AutoScrol'
+ +'l'#8#7'Caption'#6#9'ImageForm'#12'ClientHeight'#3#199#0#6'Height'#3#199#0#11
+ +'ClientWidth'#3#216#0#5'Width'#3#216#0#5'Color'#7#9'clBtnFace'#12'Font.Chars'
+ +'et'#7#15'DEFAULT_CHARSET'#10'Font.Color'#7#12'clWindowText'#11'Font.Height'
+ +#2#245#9'Font.Name'#6#5'Arial'#10'Font.Style'#11#0#9'FormStyle'#7#11'fsStayO'
+ +'nTop'#8'Position'#7#16'poDefaultPosOnly'#6'OnShow'#7#8'FormShow'#13'PixelsP'
+ +'erInch'#2'`'#0#6'TImage'#6'Image1'#4'Left'#2#0#3'Top'#2#0#5'Width'#3'='#1#6
+ +'Height'#3'2'#1#8'AutoSize'#9#0#0#0
+]);
diff --git a/applications/fpbrowser/imgform.pas b/applications/fpbrowser/imgform.pas
new file mode 100644
index 000000000..d883215d6
--- /dev/null
+++ b/applications/fpbrowser/imgform.pas
@@ -0,0 +1,43 @@
+unit ImgForm;
+
+interface
+
+uses
+ {$IFNDEF LCL} Windows, Messages, {$ELSE} LclIntf, LMessages, LclType, LResources, {$ENDIF}
+ SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ ExtCtrls;
+
+type
+ TImageForm = class(TForm)
+ Image1: TImage;
+ procedure FormShow(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ ImageFormBitmap: TBitmap;
+ end;
+
+var
+ ImageForm: TImageForm;
+
+implementation
+
+{$IFNDEF LCL}
+{$R *.DFM}
+{$ENDIF}
+
+procedure TImageForm.FormShow(Sender: TObject);
+begin
+Image1.Picture.Bitmap := ImageFormBitmap;
+Width := Image1.Width + 30; {makes for better fit}
+ClientHeight := Image1.Height;
+ClientWidth := Image1.Width;
+end;
+
+initialization
+{$IFDEF LCL}
+{$I ImgForm.lrs} {Include form's resource file}
+{$ENDIF}
+
+end.
diff --git a/applications/fpbrowser/mainform.lfm b/applications/fpbrowser/mainform.lfm
new file mode 100644
index 000000000..dcb551ff6
--- /dev/null
+++ b/applications/fpbrowser/mainform.lfm
@@ -0,0 +1,278 @@
+object Form1: TForm1
+ Left = 372
+ Height = 439
+ Top = 267
+ Width = 621
+ ClientHeight = 412
+ ClientWidth = 621
+ Color = clBtnFace
+ Font.Color = clWindowText
+ Font.Height = -13
+ Font.Name = 'Arial'
+ Menu = MainMenu
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ OnShow = FormShow
+ LCLVersion = '0.9.31'
+ object Panel1: TPanel
+ Left = 0
+ Height = 18
+ Top = 394
+ Width = 621
+ Align = alBottom
+ Alignment = taLeftJustify
+ BevelInner = bvLowered
+ BevelOuter = bvNone
+ ClientHeight = 18
+ ClientWidth = 621
+ TabOrder = 0
+ object ProgressBar: TProgressBar
+ Left = 470
+ Height = 16
+ Top = 1
+ Width = 150
+ Align = alRight
+ TabOrder = 0
+ Visible = False
+ end
+ end
+ object Panel2: TPanel
+ Left = 0
+ Height = 33
+ Top = 0
+ Width = 621
+ Align = alTop
+ BevelOuter = bvNone
+ ClientHeight = 33
+ ClientWidth = 621
+ TabOrder = 1
+ object editURL: TEdit
+ Left = 190
+ Height = 23
+ Top = 4
+ Width = 337
+ OnKeyDown = editURLKeyDown
+ TabStop = False
+ TabOrder = 3
+ end
+ object ReloadButton: TButton
+ Left = 10
+ Height = 24
+ Top = 4
+ Width = 59
+ Caption = '&Reload'
+ Enabled = False
+ OnClick = ReloadButtonClick
+ TabOrder = 0
+ end
+ object BackButton: TButton
+ Left = 69
+ Height = 24
+ Top = 4
+ Width = 59
+ Caption = '&Back'
+ Enabled = False
+ OnClick = FwdBackClick
+ TabOrder = 1
+ end
+ object FwdButton: TButton
+ Left = 128
+ Height = 24
+ Top = 4
+ Width = 59
+ Caption = '&Forward'
+ Enabled = False
+ OnClick = FwdBackClick
+ TabOrder = 2
+ end
+ end
+ object Panel3: TPanel
+ Left = 0
+ Height = 361
+ Top = 33
+ Width = 621
+ Align = alClient
+ BevelInner = bvLowered
+ BevelOuter = bvNone
+ Caption = 'Panel3'
+ ClientHeight = 361
+ ClientWidth = 621
+ TabOrder = 2
+ object Viewer: THTMLViewer
+ Left = 1
+ Height = 359
+ Top = 1
+ Width = 619
+ OnHotSpotCovered = HotSpotChange
+ OnHotSpotClick = HotSpotClick
+ OnFormSubmit = SubmitEvent
+ OnHistoryChange = HistoryChange
+ OnProgress = ViewerProgress
+ TabStop = True
+ TabOrder = 0
+ Align = alClient
+ DefBackground = clWindow
+ BorderStyle = htFocused
+ HistoryMaxCount = 6
+ DefFontName = 'Times New Roman'
+ DefPreFontName = 'Courier New'
+ DefFontColor = clWindowText
+ DefOverLinkColor = clFuchsia
+ ImageCacheCount = 6
+ NoSelect = False
+ CharSet = DEFAULT_CHARSET
+ PrintMarginLeft = 2
+ PrintMarginRight = 2
+ PrintMarginTop = 2
+ PrintMarginBottom = 2
+ PrintScale = 1
+ OnMouseMove = ViewerMouseMove
+ OnProcessing = ProcessingHandler
+ OnPrintHTMLHeader = ViewerPrintHTMLHeader
+ OnPrintHTMLFooter = ViewerPrintHTMLFooter
+ OnInclude = ViewerInclude
+ OnSoundRequest = SoundRequest
+ OnMetaRefresh = MetaRefreshEvent
+ OnObjectClick = ObjectClick
+ OnRightClick = RightClick
+ end
+ end
+ object OpenDialog: TOpenDialog
+ DefaultExt = '.htm'
+ Filter = 'html files|*.htm;*.html|all files|*.*'
+ Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist]
+ left = 329
+ top = 2
+ end
+ object MainMenu: TMainMenu
+ left = 291
+ top = 4
+ object File1: TMenuItem
+ Caption = '&File'
+ object Open: TMenuItem
+ Caption = '&Open'
+ ShortCut = 114
+ OnClick = OpenFileClick
+ end
+ object OpenTextFile: TMenuItem
+ Caption = 'Open &Text File'
+ OnClick = OpenTextFileClick
+ end
+ object OpenImageFile: TMenuItem
+ Caption = 'Open &Image File'
+ OnClick = OpenImageFileClick
+ end
+ object PrinterSetup1: TMenuItem
+ Caption = 'Printer Setup...'
+ OnClick = PrinterSetup1Click
+ end
+ object Printpreview: TMenuItem
+ Caption = 'Print pre&view'
+ Enabled = False
+ OnClick = PrintpreviewClick
+ end
+ object Print1: TMenuItem
+ Caption = '&Print...'
+ Enabled = False
+ OnClick = Print1Click
+ end
+ object N1: TMenuItem
+ Caption = '-'
+ end
+ object Exit1: TMenuItem
+ Caption = 'E&xit'
+ OnClick = Exit1Click
+ end
+ end
+ object Edit2: TMenuItem
+ Caption = '&Edit'
+ OnClick = Edit2Click
+ object Find1: TMenuItem
+ Caption = '&Find'
+ Enabled = False
+ OnClick = Find1Click
+ end
+ object CopyItem: TMenuItem
+ Caption = '&Copy'
+ ShortCut = 16451
+ OnClick = CopyItemClick
+ end
+ object N2: TMenuItem
+ Caption = '-'
+ end
+ object SelectAllItem: TMenuItem
+ Caption = 'Select &All'
+ Enabled = False
+ OnClick = SelectAllItemClick
+ end
+ end
+ object options1: TMenuItem
+ Caption = '&Options'
+ object ShowImages: TMenuItem
+ Caption = '&Show images'
+ OnClick = ShowImagesClick
+ end
+ object Fonts: TMenuItem
+ Caption = 'Default &Font/Colors...'
+ OnClick = FontColorsClick
+ end
+ end
+ object HistoryMenuItem: TMenuItem
+ Caption = '&History'
+ Visible = False
+ end
+ object About1: TMenuItem
+ Caption = '&About'
+ OnClick = About1Click
+ end
+ end
+ object PrintDialog: TPrintDialog
+ FromPage = 1
+ MinPage = 1
+ MaxPage = 9999
+ Options = [poPageNums]
+ ToPage = 1
+ left = 362
+ top = 1
+ end
+ object FindDialog: TFindDialog
+ Options = [frDown, frHideWholeWord, frDisableWholeWord]
+ OnFind = FindDialogFind
+ left = 249
+ top = 65535
+ end
+ object PopupMenu: TPopupMenu
+ left = 400
+ top = 1
+ object Viewimage: TMenuItem
+ Caption = '&View image'
+ OnClick = ViewimageClick
+ end
+ object CopyImageToClipboard: TMenuItem
+ Caption = '&Copy image to clipboard'
+ OnClick = CopyImageToClipboardClick
+ end
+ object N3: TMenuItem
+ Caption = '-'
+ end
+ object OpenInNewWindow: TMenuItem
+ Caption = '&Open in new window'
+ OnClick = OpenInNewWindowClick
+ end
+ end
+ object MetaTimer: TTimer
+ Enabled = False
+ OnTimer = MetaTimerTimer
+ left = 242
+ top = 75
+ end
+ object Timer1: TTimer
+ Interval = 200
+ OnTimer = Timer1Timer
+ left = 291
+ top = 71
+ end
+ object PrinterSetupDialog: TPrinterSetupDialog
+ left = 448
+ end
+end
diff --git a/applications/fpbrowser/mainform.lrs b/applications/fpbrowser/mainform.lrs
new file mode 100644
index 000000000..ae8db4020
--- /dev/null
+++ b/applications/fpbrowser/mainform.lrs
@@ -0,0 +1,84 @@
+{ This is an automatically generated lazarus resource file }
+
+LazarusResources.Add('TForm1','FORMDATA',[
+ 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3't'#1#6'Height'#3#183#1#3'Top'#3#11#1#5'Wi'
+ +'dth'#3'm'#2#12'ClientHeight'#3#156#1#11'ClientWidth'#3'm'#2#5'Color'#7#9'cl'
+ +'BtnFace'#10'Font.Color'#7#12'clWindowText'#11'Font.Height'#2#243#9'Font.Nam'
+ +'e'#6#5'Arial'#4'Menu'#7#8'MainMenu'#8'OnCreate'#7#10'FormCreate'#9'OnDestro'
+ +'y'#7#11'FormDestroy'#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6#6'0.9.31'#0#6
+ +'TPanel'#6'Panel1'#4'Left'#2#0#6'Height'#2#18#3'Top'#3#138#1#5'Width'#3'm'#2
+ +#5'Align'#7#8'alBottom'#9'Alignment'#7#13'taLeftJustify'#10'BevelInner'#7#9
+ +'bvLowered'#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#2#18#11'ClientWidth'
+ +#3'm'#2#8'TabOrder'#2#0#0#12'TProgressBar'#11'ProgressBar'#4'Left'#3#214#1#6
+ +'Height'#2#16#3'Top'#2#1#5'Width'#3#150#0#5'Align'#7#7'alRight'#8'TabOrder'#2
+ +#0#7'Visible'#8#0#0#0#6'TPanel'#6'Panel2'#4'Left'#2#0#6'Height'#2'!'#3'Top'#2
+ +#0#5'Width'#3'm'#2#5'Align'#7#5'alTop'#10'BevelOuter'#7#6'bvNone'#12'ClientH'
+ +'eight'#2'!'#11'ClientWidth'#3'm'#2#8'TabOrder'#2#1#0#5'TEdit'#7'editURL'#4
+ +'Left'#3#190#0#6'Height'#2#23#3'Top'#2#4#5'Width'#3'Q'#1#9'OnKeyDown'#7#14'e'
+ +'ditURLKeyDown'#7'TabStop'#8#8'TabOrder'#2#3#0#0#7'TButton'#12'ReloadButton'
+ +#4'Left'#2#10#6'Height'#2#24#3'Top'#2#4#5'Width'#2';'#7'Caption'#6#7'&Reload'
+ +#7'Enabled'#8#7'OnClick'#7#17'ReloadButtonClick'#8'TabOrder'#2#0#0#0#7'TButt'
+ +'on'#10'BackButton'#4'Left'#2'E'#6'Height'#2#24#3'Top'#2#4#5'Width'#2';'#7'C'
+ +'aption'#6#5'&Back'#7'Enabled'#8#7'OnClick'#7#12'FwdBackClick'#8'TabOrder'#2
+ +#1#0#0#7'TButton'#9'FwdButton'#4'Left'#3#128#0#6'Height'#2#24#3'Top'#2#4#5'W'
+ +'idth'#2';'#7'Caption'#6#8'&Forward'#7'Enabled'#8#7'OnClick'#7#12'FwdBackCli'
+ +'ck'#8'TabOrder'#2#2#0#0#0#6'TPanel'#6'Panel3'#4'Left'#2#0#6'Height'#3'i'#1#3
+ +'Top'#2'!'#5'Width'#3'm'#2#5'Align'#7#8'alClient'#10'BevelInner'#7#9'bvLower'
+ +'ed'#10'BevelOuter'#7#6'bvNone'#7'Caption'#6#6'Panel3'#12'ClientHeight'#3'i'
+ +#1#11'ClientWidth'#3'm'#2#8'TabOrder'#2#2#0#11'THTMLViewer'#6'Viewer'#4'Left'
+ +#2#1#6'Height'#3'g'#1#3'Top'#2#1#5'Width'#3'k'#2#16'OnHotSpotCovered'#7#13'H'
+ +'otSpotChange'#14'OnHotSpotClick'#7#12'HotSpotClick'#12'OnFormSubmit'#7#11'S'
+ +'ubmitEvent'#15'OnHistoryChange'#7#13'HistoryChange'#10'OnProgress'#7#14'Vie'
+ +'werProgress'#7'TabStop'#9#8'TabOrder'#2#0#5'Align'#7#8'alClient'#13'DefBack'
+ +'ground'#7#8'clWindow'#11'BorderStyle'#7#9'htFocused'#15'HistoryMaxCount'#2#6
+ +#11'DefFontName'#6#15'Times New Roman'#14'DefPreFontName'#6#11'Courier New'
+ +#12'DefFontColor'#7#12'clWindowText'#16'DefOverLinkColor'#7#9'clFuchsia'#15
+ +'ImageCacheCount'#2#6#8'NoSelect'#8#7'CharSet'#7#15'DEFAULT_CHARSET'#15'Prin'
+ +'tMarginLeft'#5#0#0#0#0#0#0#0#128#0'@'#16'PrintMarginRight'#5#0#0#0#0#0#0#0
+ +#128#0'@'#14'PrintMarginTop'#5#0#0#0#0#0#0#0#128#0'@'#17'PrintMarginBottom'#5
+ +#0#0#0#0#0#0#0#128#0'@'#10'PrintScale'#5#0#0#0#0#0#0#0#128#255'?'#11'OnMouse'
+ +'Move'#7#15'ViewerMouseMove'#12'OnProcessing'#7#17'ProcessingHandler'#17'OnP'
+ +'rintHTMLHeader'#7#21'ViewerPrintHTMLHeader'#17'OnPrintHTMLFooter'#7#21'View'
+ +'erPrintHTMLFooter'#9'OnInclude'#7#13'ViewerInclude'#14'OnSoundRequest'#7#12
+ +'SoundRequest'#13'OnMetaRefresh'#7#16'MetaRefreshEvent'#13'OnObjectClick'#7
+ +#11'ObjectClick'#12'OnRightClick'#7#10'RightClick'#0#0#0#11'TOpenDialog'#10
+ +'OpenDialog'#10'DefaultExt'#6#4'.htm'#6'Filter'#6'%html files|*.htm;*.html|a'
+ +'ll files|*.*'#7'Options'#11#14'ofHideReadOnly'#15'ofPathMustExist'#15'ofFil'
+ +'eMustExist'#0#4'left'#3'I'#1#3'top'#2#2#0#0#9'TMainMenu'#8'MainMenu'#4'left'
+ +#3'#'#1#3'top'#2#4#0#9'TMenuItem'#5'File1'#7'Caption'#6#5'&File'#0#9'TMenuIt'
+ +'em'#4'Open'#7'Caption'#6#5'&Open'#8'ShortCut'#2'r'#7'OnClick'#7#13'OpenFile'
+ +'Click'#0#0#9'TMenuItem'#12'OpenTextFile'#7'Caption'#6#15'Open &Text File'#7
+ +'OnClick'#7#17'OpenTextFileClick'#0#0#9'TMenuItem'#13'OpenImageFile'#7'Capti'
+ +'on'#6#16'Open &Image File'#7'OnClick'#7#18'OpenImageFileClick'#0#0#9'TMenuI'
+ +'tem'#13'PrinterSetup1'#7'Caption'#6#16'Printer Setup...'#7'OnClick'#7#18'Pr'
+ +'interSetup1Click'#0#0#9'TMenuItem'#12'Printpreview'#7'Caption'#6#14'Print p'
+ +'re&view'#7'Enabled'#8#7'OnClick'#7#17'PrintpreviewClick'#0#0#9'TMenuItem'#6
+ +'Print1'#7'Caption'#6#9'&Print...'#7'Enabled'#8#7'OnClick'#7#11'Print1Click'
+ +#0#0#9'TMenuItem'#2'N1'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#5'Exit1'#7'Captio'
+ +'n'#6#5'E&xit'#7'OnClick'#7#10'Exit1Click'#0#0#0#9'TMenuItem'#5'Edit2'#7'Cap'
+ +'tion'#6#5'&Edit'#7'OnClick'#7#10'Edit2Click'#0#9'TMenuItem'#5'Find1'#7'Capt'
+ +'ion'#6#5'&Find'#7'Enabled'#8#7'OnClick'#7#10'Find1Click'#0#0#9'TMenuItem'#8
+ +'CopyItem'#7'Caption'#6#5'&Copy'#8'ShortCut'#3'C@'#7'OnClick'#7#13'CopyItemC'
+ +'lick'#0#0#9'TMenuItem'#2'N2'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#13'SelectAl'
+ +'lItem'#7'Caption'#6#11'Select &All'#7'Enabled'#8#7'OnClick'#7#18'SelectAllI'
+ +'temClick'#0#0#0#9'TMenuItem'#8'options1'#7'Caption'#6#8'&Options'#0#9'TMenu'
+ +'Item'#10'ShowImages'#7'Caption'#6#12'&Show images'#7'OnClick'#7#15'ShowImag'
+ +'esClick'#0#0#9'TMenuItem'#5'Fonts'#7'Caption'#6#23'Default &Font/Colors...'
+ +#7'OnClick'#7#15'FontColorsClick'#0#0#0#9'TMenuItem'#15'HistoryMenuItem'#7'C'
+ ,'aption'#6#8'&History'#7'Visible'#8#0#0#9'TMenuItem'#6'About1'#7'Caption'#6#6
+ +'&About'#7'OnClick'#7#11'About1Click'#0#0#0#12'TPrintDialog'#11'PrintDialog'
+ +#8'FromPage'#2#1#7'MinPage'#2#1#7'MaxPage'#3#15''''#7'Options'#11#10'poPageN'
+ +'ums'#0#6'ToPage'#2#1#4'left'#3'j'#1#3'top'#2#1#0#0#11'TFindDialog'#10'FindD'
+ +'ialog'#7'Options'#11#6'frDown'#15'frHideWholeWord'#18'frDisableWholeWord'#0
+ +#6'OnFind'#7#14'FindDialogFind'#4'left'#3#249#0#3'top'#4#255#255#0#0#0#0#10
+ +'TPopupMenu'#9'PopupMenu'#4'left'#3#144#1#3'top'#2#1#0#9'TMenuItem'#9'Viewim'
+ +'age'#7'Caption'#6#11'&View image'#7'OnClick'#7#14'ViewimageClick'#0#0#9'TMe'
+ +'nuItem'#20'CopyImageToClipboard'#7'Caption'#6#24'&Copy image to clipboard'#7
+ +'OnClick'#7#25'CopyImageToClipboardClick'#0#0#9'TMenuItem'#2'N3'#7'Caption'#6
+ +#1'-'#0#0#9'TMenuItem'#15'OpenInNewWindow'#7'Caption'#6#19'&Open in new wind'
+ +'ow'#7'OnClick'#7#20'OpenInNewWindowClick'#0#0#0#6'TTimer'#9'MetaTimer'#7'En'
+ +'abled'#8#7'OnTimer'#7#14'MetaTimerTimer'#4'left'#3#242#0#3'top'#2'K'#0#0#6
+ +'TTimer'#6'Timer1'#8'Interval'#3#200#0#7'OnTimer'#7#11'Timer1Timer'#4'left'#3
+ +'#'#1#3'top'#2'G'#0#0#19'TPrinterSetupDialog'#18'PrinterSetupDialog'#4'left'
+ +#3#192#1#0#0#0
+]);
diff --git a/applications/fpbrowser/mainform.pas b/applications/fpbrowser/mainform.pas
new file mode 100644
index 000000000..185db1333
--- /dev/null
+++ b/applications/fpbrowser/mainform.pas
@@ -0,0 +1,1070 @@
+{$IFNDEF LCL}
+{$ifdef ver140}
+{$warn Symbol_Platform Off}
+{$endif}
+{$ifdef ver150}
+{$warn Symbol_Platform Off}
+{$Define UseXpMan}
+{$endif}
+{$ifdef ver170}
+{$warn Symbol_Platform Off}
+{$Define UseXpMan}
+{$endif}
+{$ENDIF}
+
+unit mainform;
+{A program to demonstrate the ThtmlViewer component}
+
+interface
+
+uses
+ {$IFNDEF LCL} Windows, Messages, MMSystem, MPlayer, {$ELSE} LclIntf, LMessages, LclType, LResources, FPimage, HtmlMisc, {$ENDIF}
+ SysUtils, Classes, Graphics, Controls,
+ Forms, Dialogs, ExtCtrls, Menus, Htmlview, StdCtrls,
+ Clipbrd, HTMLsubs, {$IFDEF MSWINDOWS} ShellAPI, {$ELSE} Unix, {$ENDIF}
+ {$IFDEF LCL} PrintersDlgs, {$ENDIF}
+ {$ifdef UseXpMan} XpMan, {$endif} {$IFNDEF LCL} Gauges, {$ENDIF} ComCtrls;
+
+const
+ MaxHistories = 6; {size of History list}
+type
+
+ { TForm1 }
+
+ TForm1 = class(TForm)
+ OpenDialog: TOpenDialog;
+ MainMenu: TMainMenu;
+ Panel1: TPanel;
+ Panel2: TPanel;
+ Panel3: TPanel;
+ File1: TMenuItem;
+ Open: TMenuItem;
+ options1: TMenuItem;
+ ShowImages: TMenuItem;
+ Fonts: TMenuItem;
+ editURL: TEdit;
+ ReloadButton: TButton;
+ BackButton: TButton;
+ FwdButton: TButton;
+ HistoryMenuItem: TMenuItem;
+ Exit1: TMenuItem;
+ PrintDialog: TPrintDialog;
+ About1: TMenuItem;
+ Edit2: TMenuItem;
+ Find1: TMenuItem;
+ FindDialog: TFindDialog;
+ Viewer: THTMLViewer;
+ CopyItem: TMenuItem;
+ N2: TMenuItem;
+ SelectAllItem: TMenuItem;
+ OpenTextFile: TMenuItem;
+ OpenImageFile: TMenuItem;
+{$IFNDEF LCL}
+ MediaPlayer: TMediaPlayer;
+{$ENDIF}
+ PopupMenu: TPopupMenu;
+ CopyImageToClipboard: TMenuItem;
+ Viewimage: TMenuItem;
+ N3: TMenuItem;
+ OpenInNewWindow: TMenuItem;
+ MetaTimer: TTimer;
+ Print1: TMenuItem;
+ Printpreview: TMenuItem;
+ Timer1: TTimer;
+ ProgressBar: TProgressBar;
+ PrinterSetupDialog: TPrinterSetupDialog;
+ PrinterSetup1: TMenuItem;
+ procedure editURLKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
+ procedure OpenFileClick(Sender: TObject);
+ procedure HotSpotChange(Sender: TObject; const URL: string);
+ procedure HotSpotClick(Sender: TObject; const URL: string;
+ var Handled: boolean);
+ procedure ShowImagesClick(Sender: TObject);
+ procedure ReloadButtonClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure FwdBackClick(Sender: TObject);
+ procedure HistoryClick(Sender: TObject);
+ procedure HistoryChange(Sender: TObject);
+ procedure Exit1Click(Sender: TObject);
+ procedure FontColorsClick(Sender: TObject);
+ procedure Print1Click(Sender: TObject);
+ procedure About1Click(Sender: TObject);
+ procedure FormShow(Sender: TObject);
+ procedure SubmitEvent(Sender: TObject; Const AnAction, Target, EncType, Method: String;
+ Results: TStringList);
+ procedure Find1Click(Sender: TObject);
+ procedure FindDialogFind(Sender: TObject);
+ procedure ProcessingHandler(Sender: TObject; ProcessingOn: Boolean);
+ procedure CopyItemClick(Sender: TObject);
+ procedure Edit2Click(Sender: TObject);
+ procedure SelectAllItemClick(Sender: TObject);
+ procedure OpenTextFileClick(Sender: TObject);
+ procedure OpenImageFileClick(Sender: TObject);
+ procedure MediaPlayerNotify(Sender: TObject);
+ procedure SoundRequest(Sender: TObject; const SRC: String;
+ Loop: Integer; Terminate: Boolean);
+ procedure CopyImageToClipboardClick(Sender: TObject);
+ procedure ObjectClick(Sender, Obj: TObject; const OnClick: String);
+ procedure ViewimageClick(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure ViewerInclude(Sender: TObject; const Command: String;
+ Params: TStrings; var S: string);
+ procedure RightClick(Sender: TObject;
+ Parameters: TRightClickParameters);
+ procedure OpenInNewWindowClick(Sender: TObject);
+ procedure MetaTimerTimer(Sender: TObject);
+ procedure MetaRefreshEvent(Sender: TObject; Delay: Integer;
+ const URL: String);
+ procedure PrintpreviewClick(Sender: TObject);
+ procedure ViewerMouseMove(Sender: TObject; Shift: TShiftState; X,
+ Y: Integer);
+ procedure Timer1Timer(Sender: TObject);
+ procedure ViewerProgress(Sender: TObject; Stage: TProgressStage;
+ PercentDone: Integer);
+ procedure ViewerPrintHTMLFooter(Sender: TObject; HFViewer: THTMLViewer;
+ NumPage: Integer; LastPage: Boolean; var XL, XR: Integer;
+ var StopPrinting: Boolean);
+ procedure ViewerPrintHTMLHeader(Sender: TObject; HFViewer: THTMLViewer;
+ NumPage: Integer; LastPage: Boolean; var XL, XR: Integer;
+ var StopPrinting: Boolean);
+ procedure PrinterSetup1Click(Sender: TObject);
+ private
+ { Private declarations }
+{$IFDEF LCLCarbon}
+ AppMenu : TMenuItem;
+{$ENDIF}
+ Histories: array[0..MaxHistories-1] of TMenuItem;
+ MediaCount: integer;
+ FoundObject: TImageObj;
+ NewWindowFile: string;
+ NextFile, PresentFile: string;
+ TimerCount: integer;
+ OldTitle: string;
+ HintWindow: THintWindow;
+ HintVisible: boolean;
+
+{$IFNDEF LCL}
+ procedure wmDropFiles(var Message: TMessage); message wm_DropFiles;
+{$ELSE}
+ procedure DropFiles( Sender : TObject;
+ const FileNames: array of string);
+{$ENDIF}
+ procedure CloseAll;
+ public
+ { Public declarations }
+ end;
+
+var
+ Form1: TForm1;
+
+implementation
+
+uses
+ pageloader, {$IFNDEF LCL} PreviewForm, {$ENDIF} HTMLun2, HTMLabt, Submit, ImgForm, FontDlg;
+
+{$IFNDEF LCL}
+{$R *.DFM}
+{$ENDIF}
+
+procedure TForm1.FormCreate(Sender: TObject);
+var
+ I: integer;
+begin
+{$IFNDEF LCL}
+if Screen.Width <= 640 then
+ Position := poDefault; {keeps form on screen better}
+{$ELSE}
+ Position := poScreenCenter;
+{$ENDIF}
+
+{$IFNDEF LCLCarbon}
+OpenDialog.InitialDir := ExtractFilePath(ParamStr(0));
+{$ELSE} //Don't default to within app bundle.
+OpenDialog.InitialDir := ExtractFilePath(ParamStr(0)) + '../../../';
+{$ENDIF}
+
+Caption := 'HTML Demo, Version '+HTMLAbt.Version;
+
+ShowImages.Checked := Viewer.ViewImages;
+Viewer.HistoryMaxCount := MaxHistories; {defines size of history list}
+
+for I := 0 to MaxHistories-1 do
+ begin {create the MenuItems for the history list}
+ Histories[I] := TMenuItem.Create(HistoryMenuItem);
+ HistoryMenuItem.Insert(I, Histories[I]);
+ with Histories[I] do
+ begin
+ Visible := False;
+ OnClick := HistoryClick;
+ Tag := I;
+ end;
+ end;
+
+{$IFDEF LCLCarbon}
+ AppMenu := TMenuItem.Create(Self); //Application menu
+ AppMenu.Caption := #$EF#$A3#$BF; //Unicode Apple logo char
+ MainMenu.Items.Insert(0, AppMenu);
+ MainMenu.Items.Remove(About1); //Remove About as separate menu
+ AppMenu.Add(About1); //Add About as item in application menu
+
+ File1.Remove(File1.Items[File1.Count-2]);
+ File1.Remove(Exit1); //Remove Exit since have Quit
+
+ Find1.ShortCut := ShortCut(VK_F, [ssMeta]);
+ CopyItem.ShortCut := ShortCut(VK_C, [ssMeta]);
+ SelectAllItem.ShortCut := ShortCut(VK_A, [ssMeta]);
+{$ENDIF}
+
+{$IFNDEF LCL}
+DragAcceptFiles(Handle, True);
+{$ELSE}
+AllowDropFiles := True;
+OnDropFiles := DropFiles;
+{$ENDIF}
+HintWindow := THintWindow.Create(Self);
+HintWindow.Color := $C0FFFF;
+end;
+
+procedure TForm1.FormShow(Sender: TObject);
+var
+ S: string;
+ I: integer;
+begin
+// With OS X app, ParamStr not meaningful unless launched with --args switch.
+if (ParamCount >= 1) {$IFDEF LCLCarbon} and (Copy(ParamStr(1), 1, 4) <> '-psn') {$ENDIF} then
+ begin {Parameter is file to load}
+ {$IFNDEF LCL}
+ S := CmdLine;
+ I := Pos('" ', S);
+ if I > 0 then
+ Delete(S, 1, I+1) {delete EXE name in quotes}
+ else Delete(S, 1, Length(ParamStr(0))); {in case no quote marks}
+ I := Pos('"', S);
+ while I > 0 do {remove any quotes from parameter}
+ begin
+ Delete(S, I, 1);
+ I := Pos('"', S);
+ end;
+ {$ELSE}
+ S := ParamStr(1);
+ {$ENDIF}
+ Viewer.LoadFromFile(HtmlToDos(Trim(S)));
+ end;
+end;
+
+procedure TForm1.OpenFileClick(Sender: TObject);
+begin
+ if Viewer.CurrentFile <> '' then
+ OpenDialog.InitialDir := ExtractFilePath(Viewer.CurrentFile);
+ OpenDialog.Filter := 'HTML Files (*.htm,*.html)|*.htm;*.html'; //might have changed
+ if OpenDialog.Execute then
+ begin
+ Update;
+ Viewer.LoadFromFile(OpenDialog.Filename);
+ Caption := Viewer.DocumentTitle;
+ end;
+end;
+
+procedure TForm1.editURLKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
+begin
+ if Key = VK_RETURN then
+ begin
+ MyPageLoader.LoadFromURL(editURL.Text);
+ Viewer.LoadFromString(MyPageLoader.Contents);
+ Caption := Viewer.DocumentTitle;
+ end;
+end;
+
+procedure TForm1.HotSpotChange(Sender: TObject; const URL: string);
+{mouse moved over or away from a hot spot. Change the status line}
+var
+ Caption: string;
+begin
+Caption := '';
+if URL <> '' then
+ Caption := Caption+'URL: '+URL+' ';
+if Viewer.TitleAttr <> '' then
+ Caption := Caption+'Title: '+Viewer.TitleAttr;
+Panel1.Caption := Caption;
+end;
+
+procedure TForm1.HotSpotClick(Sender: TObject; const URL: string;
+ var Handled: boolean);
+{This routine handles what happens when a hot spot is clicked. The assumption
+ is made that DOS filenames are being used. .EXE, .WAV, .MID, and .AVI files are
+ handled here, but other file types could be easily added.
+
+ If the URL is handled here, set Handled to True. If not handled here, set it
+ to False and ThtmlViewer will handle it.}
+const
+ snd_Async = $0001; { play asynchronously }
+var
+ PC: array[0..255] of char;
+{$IFDEF LCL}
+ PC2: array[0..255] of char;
+{$ENDIF}
+ S, Params: string[255];
+ Ext: string[5];
+ ID: string;
+ I, J, K: integer;
+
+begin
+Handled := False;
+
+{The following looks for a link of the form, "IDExpand_XXX". This is interpreted
+ as meaning a block with an ID="XXXPlus" or ID="XXXMinus" attribute should
+ have its Display property toggled.
+}
+I := Pos('IDEXPAND_', Uppercase(URL));
+if I=1 then
+ begin
+ ID := Copy(URL, 10, Length(URL)-9);
+ Viewer.IDDisplay[ID+'Plus'] := not Viewer.IDDisplay[ID+'Plus'];
+ Viewer.IDDisplay[ID+'Minus'] := not Viewer.IDDisplay[ID+'Minus'];
+ Viewer.Reformat;
+ Handled := True;
+ Exit;
+ end;
+
+I := Pos(':', URL);
+J := Pos('FILE:', UpperCase(URL));
+if (I <= 2) or (J > 0) then
+ begin {apparently the URL is a filename}
+ S := URL;
+ K := Pos(' ', S); {look for parameters}
+ if K = 0 then K := Pos('?', S); {could be '?x,y' , etc}
+ if K > 0 then
+ begin
+ Params := Copy(S, K+1, 255); {save any parameters}
+ S[0] := chr(K-1); {truncate S}
+ end
+ else Params := '';
+ S := Viewer.HTMLExpandFileName(S);
+ Ext := Uppercase(ExtractFileExt(S));
+ if Ext = '.WAV' then
+ begin
+ Handled := True;
+{$IFNDEF LCL}
+ sndPlaySound(StrPCopy(PC, S), snd_ASync);
+{$ENDIF}
+ end
+ else if Ext = '.EXE' then
+ begin
+ Handled := True;
+{$IFNDEF LCL}
+ WinExec(StrPCopy(PC, S+' '+Params), sw_Show);
+{$ELSE}
+ {$IFDEF MSWINDOWS}
+ ShellExecute(Handle, nil, StrPCopy(PC, S), StrPCopy(PC2, Params),
+ nil, SW_SHOWNORMAL);
+ {$ELSE} //Not sure if this makes any sense since executable won't have .exe.
+ {$IFDEF LCLCarbon}
+ Shell('open -n "' + S + '" --args "' + Params + '"');
+ {$ELSE}
+ Shell('"' + S + '" "' + Params + '"');
+ {$ENDIF}
+ {$ENDIF}
+{$ENDIF}
+ end
+ else if (Ext = '.MID') or (Ext = '.AVI') then
+ begin
+ Handled := True;
+{$IFNDEF LCL}
+ WinExec(StrPCopy(PC, 'MPlayer.exe /play /close '+S), sw_Show);
+{$ELSE}
+ {$IFDEF MSWINDOWS}
+ ShellExecute(Handle, nil, 'MPlayer.exe', '/play /close',
+ nil, SW_SHOWNORMAL);
+ {$ELSE} //No equivalent to MPlayer?
+ {$ENDIF}
+{$ENDIF}
+ end;
+ {else ignore other extensions}
+ editURL.Text := URL;
+ Exit;
+ end;
+
+I := Pos('MAILTO:', UpperCase(URL));
+J := Pos('HTTP:', UpperCase(URL));
+if (I > 0) or (J > 0) then
+ begin
+{$IFDEF MSWINDOWS}
+ ShellExecute(0, nil, pchar(URL), nil, nil, SW_SHOWNORMAL);
+{$ELSE}
+ {$IFDEF LCLCarbon}
+ Shell('open "' + URL + '"');
+ {$ELSE}
+ Shell('"' + URL + '"'); //use LCL's OpenURL?
+ {$ENDIF}
+{$ENDIF}
+ Handled := True;
+ Exit;
+ end;
+
+editURL.Text := URL; {other protocall}
+end;
+
+procedure TForm1.ShowImagesClick(Sender: TObject);
+{The Show Images menu item was clicked}
+begin
+With Viewer do
+ begin
+ ViewImages := not ViewImages;
+ (Sender as TMenuItem).Checked := ViewImages;
+ end;
+end;
+
+procedure TForm1.ReloadButtonClick(Sender: TObject);
+{the Reload button was clicked}
+begin
+with Viewer do
+ begin
+ ReLoadButton.Enabled := False;
+ ReLoad;
+ ReLoadButton.Enabled := CurrentFile <> '';
+ Viewer.SetFocus;
+ end;
+end;
+
+procedure TForm1.FwdBackClick(Sender: TObject);
+{Either the Forward or Back button was clicked}
+begin
+with Viewer do
+ begin
+ if Sender = BackButton then
+ HistoryIndex := HistoryIndex +1
+ else
+ HistoryIndex := HistoryIndex -1;
+ Self.Caption := DocumentTitle;
+ end;
+end;
+
+procedure TForm1.HistoryChange(Sender: TObject);
+{This event occurs when something changes history list}
+var
+ I: integer;
+ Cap: string[80];
+begin
+with Sender as ThtmlViewer do
+ begin
+ {check to see which buttons are to be enabled}
+ FwdButton.Enabled := HistoryIndex > 0;
+ BackButton.Enabled := HistoryIndex < History.Count-1;
+
+ {Enable and caption the appropriate history menuitems}
+ HistoryMenuItem.Visible := History.Count > 0;
+ for I := 0 to MaxHistories-1 do
+ with Histories[I] do
+ if I < History.Count then
+ Begin
+ Cap := History.Strings[I];
+ if TitleHistory[I] <> '' then
+ Cap := Cap + '--' + TitleHistory[I];
+ Caption := Cap; {Cap limits string to 80 char}
+ Visible := True;
+ Checked := I = HistoryIndex;
+ end
+ else Histories[I].Visible := False;
+ Caption := DocumentTitle; {keep the caption updated}
+ Viewer.SetFocus;
+ end;
+end;
+
+procedure TForm1.HistoryClick(Sender: TObject);
+{A history list menuitem got clicked on}
+begin
+ {Changing the HistoryIndex loads and positions the appropriate document}
+ Viewer.HistoryIndex := (Sender as TMenuItem).Tag;
+end;
+
+procedure TForm1.Exit1Click(Sender: TObject);
+begin
+Close;
+end;
+
+procedure TForm1.FontColorsClick(Sender: TObject);
+var
+ FontForm: TFontForm;
+begin
+FontForm := TFontForm.Create(Self);
+try
+ with FontForm do
+ begin
+ FontName := Viewer.DefFontName;
+ FontColor := Viewer.DefFontColor;
+ FontSize := Viewer.DefFontSize;
+ HotSpotColor := Viewer.DefHotSpotColor;
+ Background := Viewer.DefBackground;
+ if ShowModal = mrOK then
+ begin
+ Viewer.DefFontName := FontName;
+ Viewer.DefFontColor := FontColor;
+ Viewer.DefFontSize := FontSize;
+ Viewer.DefHotSpotColor := HotSpotColor;
+ Viewer.DefBackground := Background;
+ ReloadButtonClick(Self); {reload to see how it looks}
+ end;
+ end;
+finally
+ FontForm.Free;
+ end;
+end;
+
+procedure TForm1.Print1Click(Sender: TObject);
+begin
+with PrintDialog do
+ if Execute then
+ if PrintRange = prAllPages then
+ viewer.Print(1, 9999)
+ else
+ Viewer.Print(FromPage, ToPage);
+end;
+
+procedure TForm1.PrinterSetup1Click(Sender: TObject);
+begin
+{$IFNDEF LCLCarbon}
+PrinterSetupDialog.Execute;
+{$ELSE}
+ MessageDlg('Not yet supported with Carbon widgetset.',
+ mtError, [mbOK], 0);
+{$ENDIF}
+end;
+
+procedure TForm1.About1Click(Sender: TObject);
+begin
+AboutBox := TAboutBox.CreateIt(Self, 'HTMLDemo', 'ThtmlViewer');
+try
+ AboutBox.ShowModal;
+finally
+ AboutBox.Free;
+ end;
+end;
+
+
+procedure TForm1.SubmitEvent(Sender: TObject; const AnAction, Target, EncType, Method: String;
+ Results: TStringList);
+begin
+with SubmitForm do
+ begin
+ ActionText.Text := AnAction;
+ MethodText.Text := Method;
+ ResultBox.Items := Results;
+ Results.Free;
+ Show;
+ end;
+end;
+
+procedure TForm1.Find1Click(Sender: TObject);
+begin
+FindDialog.Execute;
+end;
+
+procedure TForm1.FindDialogFind(Sender: TObject);
+begin
+with FindDialog do
+ begin
+ if not Viewer.FindEx(FindText, frMatchCase in Options, not (frDown in Options)) then
+ MessageDlg('No further occurances of "'+FindText+'"', mtInformation, [mbOK], 0);
+ end;
+end;
+
+procedure TForm1.ProcessingHandler(Sender: TObject; ProcessingOn: Boolean);
+begin
+if ProcessingOn then
+ begin {disable various buttons and menuitems during processing}
+ FwdButton.Enabled := False;
+ BackButton.Enabled := False;
+ ReLoadButton.Enabled := False;
+ Print1.Enabled := False;
+ PrintPreview.Enabled := False;
+ Find1.Enabled := False;
+ SelectAllItem.Enabled := False;
+ Open.Enabled := False;
+ CloseAll; {in case hint window is open}
+ end
+else
+ begin
+ FwdButton.Enabled := Viewer.HistoryIndex > 0;
+ BackButton.Enabled := Viewer.HistoryIndex < Viewer.History.Count-1;
+ ReLoadButton.Enabled := Viewer.CurrentFile <> '';
+ Print1.Enabled := Viewer.CurrentFile <> '';
+ PrintPreview.Enabled := Viewer.CurrentFile <> '';
+ Find1.Enabled := Viewer.CurrentFile <> '';
+ SelectAllItem.Enabled := Viewer.CurrentFile <> '';
+ Open.Enabled := True;
+ end;
+end;
+
+procedure TForm1.CopyItemClick(Sender: TObject);
+begin
+Viewer.CopyToClipboard;
+end;
+
+procedure TForm1.Edit2Click(Sender: TObject);
+begin
+CopyItem.Enabled := Viewer.SelLength <> 0;
+end;
+
+procedure TForm1.SelectAllItemClick(Sender: TObject);
+begin
+Viewer.SelectAll;
+end;
+
+procedure TForm1.OpenTextFileClick(Sender: TObject);
+begin
+if Viewer.CurrentFile <> '' then
+ OpenDialog.InitialDir := ExtractFilePath(Viewer.CurrentFile);
+OpenDialog.Filter := 'HTML Files (*.htm,*.html)|*.htm;*.html'+
+ '|Text Files (*.txt)|*.txt'+
+ '|All Files (*.*)|*.*';
+if OpenDialog.Execute then
+ begin
+ ReloadButton.Enabled := False;
+ Update;
+ Viewer.LoadTextFile(OpenDialog.Filename);
+ if Viewer.CurrentFile <> '' then
+ begin
+ Caption := Viewer.DocumentTitle;
+ ReLoadButton.Enabled := True;
+ end;
+ end;
+end;
+
+procedure TForm1.OpenImageFileClick(Sender: TObject);
+begin
+if Viewer.CurrentFile <> '' then
+ OpenDialog.InitialDir := ExtractFilePath(Viewer.CurrentFile);
+OpenDialog.Filter := 'Graphics Files (*.bmp,*.gif,*.jpg,*.jpeg,*.png)|'+
+ '*.bmp;*.jpg;*.jpeg;*.gif;*.png|'+
+ 'All Files (*.*)|*.*';
+if OpenDialog.Execute then
+ begin
+ ReloadButton.Enabled := False;
+ Viewer.LoadImageFile(OpenDialog.Filename);
+ if Viewer.CurrentFile <> '' then
+ begin
+ Caption := Viewer.DocumentTitle;
+ ReLoadButton.Enabled := True;
+ end;
+ end;
+end;
+
+{$IFNDEF LCL}
+procedure TForm1.wmDropFiles(var Message: TMessage);
+var
+ S: string[200];
+ Ext: string;
+ Count: integer;
+begin
+Count := DragQueryFile(Message.WParam, 0, @S[1], 200);
+Length(S) := Count;
+DragFinish(Message.WParam);
+if Count >0 then
+ begin
+{$ELSE}
+procedure TForm1.DropFiles( Sender : TObject;
+ const FileNames : array of string);
+var
+ S : string;
+ Ext: string;
+begin
+ S := FileNames[0];
+{$ENDIF}
+ Ext := LowerCase(ExtractFileExt(S));
+ if (Ext = '.htm') or (Ext = '.html') then
+ Viewer.LoadFromFile(S)
+ else if (Ext = '.txt') then
+ Viewer.LoadTextFile(S)
+ else if (Ext = '.bmp') or (Ext = '.gif') or (Ext = '.jpg')
+ or (Ext = '.jpeg') or (Ext = '.png') then
+ Viewer.LoadImageFile(S);
+{$IFNDEF LCL}
+ end;
+Message.Result := 0;
+{$ENDIF}
+end;
+
+procedure TForm1.MediaPlayerNotify(Sender: TObject);
+begin
+{$IFNDEF LCL}
+try
+ With MediaPlayer do
+ if NotifyValue = nvSuccessful then
+ begin
+ if MediaCount > 0 then
+ begin
+ Play;
+ Dec(MediaCount);
+ end
+ else
+ Close;
+ end;
+except
+ end;
+{$ENDIF}
+end;
+
+procedure TForm1.SoundRequest(Sender: TObject; const SRC: String;
+ Loop: Integer; Terminate: Boolean);
+begin
+{$IFNDEF LCL}
+try
+ with MediaPlayer do
+ if Terminate then
+ Close
+ else
+ begin
+ Filename := (Sender as ThtmlViewer).HTMLExpandFilename(SRC);
+ Notify := True;
+ Open;
+ if Loop < 0 then MediaCount := 9999
+ else if Loop = 0 then MediaCount := 1
+ else MediaCount := Loop;
+ end;
+except
+ end;
+{$ENDIF}
+end;
+
+procedure TForm1.ViewimageClick(Sender: TObject);
+var
+ AForm: TImageForm;
+begin
+AForm := TImageForm.Create(Self);
+with AForm do
+ begin
+ ImageFormBitmap := FoundObject.Bitmap;
+ Caption := '';
+ Show;
+ end;
+end;
+
+procedure TForm1.CopyImageToClipboardClick(Sender: TObject);
+begin
+Clipboard.Assign(FoundObject.Bitmap);
+end;
+
+procedure TForm1.ObjectClick(Sender, Obj: TObject; const OnClick: String);
+var
+ S: string;
+begin
+if OnClick = 'display' then
+ begin
+ if Obj is TFormControlObj then
+ with TFormControlObj(Obj) do
+ begin
+ if TheControl is TCheckBox then
+ with TCheckBox(TheControl) do
+ begin
+ S := Value + ' is ';
+ if Checked then S := S + 'checked'
+ else S := S + 'unchecked';
+ MessageDlg(S, mtCustom, [mbOK], 0);
+ end
+ else if TheControl is TRadioButton then
+ with TRadioButton(TheControl) do
+ begin
+ S := Value + ' is checked';
+ MessageDlg(S, mtCustom, [mbOK], 0);
+ end;
+ end;
+ end
+else if OnClick <> '' then
+ MessageDlg(OnClick, mtCustom, [mbOK], 0);
+end;
+
+
+procedure TForm1.ViewerInclude(Sender: TObject; const Command: String;
+ Params: TStrings; var S: string);
+{OnInclude handler}
+var
+ Filename: string;
+ I: integer;
+ MS: TMemoryStream;
+begin
+if CompareText(Command, 'Date') = 0 then
+ S := DateToStr(Date) { }
+else if CompareText(Command, 'Time') = 0 then
+ S := TimeToStr(Time) { }
+else if CompareText(Command, 'Include') = 0 then
+ begin {an include file }
+ if (Params.count >= 1) then
+ begin
+ I := Pos('file=', Lowercase(Params[0]));
+ if I > 0 then
+ begin
+ Filename := copy(Params[0], 6, Length(Params[0])-5);
+ MS := TMemoryStream.Create;
+ try
+ try
+ MS.LoadFromFile(Filename);
+ SetString(S, PChar(MS.Memory), MS.Size);
+ finally
+ MS.Free;
+ end;
+ except
+ end;
+ end;
+ end;
+ end;
+Params.Free;
+end;
+
+procedure TForm1.FormDestroy(Sender: TObject);
+begin
+HintWindow.Free;
+end;
+
+procedure TForm1.RightClick(Sender: TObject; Parameters: TRightClickParameters);
+var
+ Pt: TPoint;
+ S, Dest: string;
+ I: integer;
+ HintWindow: THintWindow;
+ ARect: TRect;
+begin
+with Parameters do
+ begin
+ FoundObject := Image;
+ ViewImage.Enabled := (FoundObject <> Nil) and (FoundObject.Bitmap <> Nil);
+ CopyImageToClipboard.Enabled := (FoundObject <> Nil) and (FoundObject.Bitmap <> Nil);
+ if URL <> '' then
+ begin
+ S := URL;
+ I := Pos('#', S);
+ if I >= 1 then
+ begin
+ Dest := System.Copy(S, I, 255); {local destination}
+ S := System.Copy(S, 1, I-1); {the file name}
+ end
+ else
+ Dest := ''; {no local destination}
+ if S = '' then S := Viewer.CurrentFile
+ else S := Viewer.HTMLExpandFileName(S);
+ NewWindowFile := S+Dest;
+ OpenInNewWindow.Enabled := FileExists(S);
+ end
+ else OpenInNewWindow.Enabled := False;
+
+ GetCursorPos(Pt);
+ if Length(CLickWord) > 0 then
+ begin
+ HintWindow := THintWindow.Create(Self);
+ try
+ ARect := Rect(0,0,0,0);
+ DrawTextW(HintWindow.Canvas.Handle, @ClickWord[1], Length(ClickWord), ARect, DT_CALCRECT);
+ with ARect do
+ HintWindow.ActivateHint(Rect(Pt.X+20, Pt.Y-(Bottom-Top)-15, Pt.x+30+Right, Pt.Y-15), ClickWord);
+ PopupMenu.Popup(Pt.X, Pt.Y);
+ finally
+ HintWindow.Free;
+ end;
+ end
+ else PopupMenu.Popup(Pt.X, Pt.Y);
+ end;
+end;
+
+procedure TForm1.OpenInNewWindowClick(Sender: TObject);
+var
+ PC: array[0..255] of char;
+{$IFDEF LCL}
+ PC2: array[0..255] of char;
+{$ENDIF}
+begin
+{$IFNDEF LCL}
+ WinExec(StrPCopy(PC, ParamStr(0)+' "'+NewWindowFile+'"'), sw_Show);
+{$ELSE}
+ {$IFDEF MSWINDOWS}
+ ShellExecute(Handle, nil, StrPCopy(PC, ParamStr(0)),
+ StrPCopy(PC2, NewWindowFile), nil, SW_SHOWNORMAL);
+ {$ELSE}
+ {$IFDEF LCLCarbon}
+ Shell('open -n "' +
+ ExtractFileDir(ExtractFileDir(ExtractFileDir(ParamStr(0)))) +
+ '" --args "' + NewWindowFile + '"');
+ {$ELSE}
+ Shell('"' + ParamStr(0) + '" "' + NewWindowFile + '"');
+ {$ENDIF}
+ {$ENDIF}
+{$ENDIF}
+end;
+
+procedure TForm1.MetaTimerTimer(Sender: TObject);
+begin
+MetaTimer.Enabled := False;
+if Viewer.CurrentFile = PresentFile then {don't load if current file has changed}
+ begin
+ Viewer.LoadFromFile(NextFile);
+ Caption := Viewer.DocumentTitle;
+ end;
+end;
+
+procedure TForm1.MetaRefreshEvent(Sender: TObject; Delay: Integer;
+ const URL: String);
+begin
+NextFile := Viewer.HTMLExpandFilename(URL);
+if FileExists(NextFile) then
+ begin
+ PresentFile := Viewer.CurrentFile;
+ MetaTimer.Interval := Delay*1000;
+ MetaTimer.Enabled := True;
+ end;
+end;
+
+procedure TForm1.PrintpreviewClick(Sender: TObject);
+{$IFNDEF LCL}
+var
+ pf: TPreviewForm;
+ Abort: boolean;
+begin
+pf := TPreviewForm.CreateIt(Self, Viewer, Abort);
+try
+ if not Abort then
+ pf.ShowModal;
+finally
+ pf.Free;
+ end;
+{$ELSE}
+begin
+ MessageDlg('Not yet supported with LCL.',
+ mtError, [mbOK], 0);
+{$ENDIF}
+end;
+
+procedure TForm1.ViewerMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
+var
+ TitleStr: string;
+begin
+if not Timer1.Enabled and Assigned(ActiveControl) and ActiveControl.Focused then {9.25}
+ begin
+ TitleStr := Viewer.TitleAttr;
+ if TitleStr = '' then
+ OldTitle := ''
+ else if TitleStr <> OldTitle then
+ begin
+ TimerCount := 0;
+ Timer1.Enabled := True;
+ OldTitle := TitleStr;
+ end;
+ end;
+end;
+
+procedure TForm1.CloseAll;
+begin
+Timer1.Enabled := False;
+HintWindow.ReleaseHandle;
+HintVisible := False;
+end;
+
+procedure TForm1.Timer1Timer(Sender: TObject);
+const
+ StartCount = 2; {timer counts before hint window opens}
+ EndCount = 20; {after this many timer counts, hint window closes}
+var
+ Pt, Pt1: TPoint;
+ ARect: TRect;
+ TitleStr: string;
+
+begin
+Inc(TimerCount);
+GetCursorPos(Pt);
+Pt1 := Viewer.ScreenToClient(Pt);
+TitleStr := Viewer.TitleAttr;
+if (TitleStr = '') or not PtInRect(Viewer.ClientRect, Pt1)then
+ begin
+ OldTitle := '';
+ CloseAll;
+ Exit;
+ end;
+if TitleStr <> OldTitle then
+ begin
+ TimerCount := 0;
+ OldTitle := TitleStr;
+ HintWindow.ReleaseHandle;
+ HintVisible := False;
+ Exit;
+ end;
+
+if TimerCount > EndCount then
+ CloseAll
+else if (TimerCount >= StartCount) and not HintVisible then
+ begin
+ {$ifdef ver90} {Delphi 2}
+ ARect := Rect(0,0,0,0);
+ DrawText(HintWindow.Canvas.Handle, PChar(TitleStr), Length(TitleStr), ARect, DT_CALCRECT);
+ {$else}
+ ARect := HintWindow.CalcHintRect(300, TitleStr, Nil);
+ {$endif}
+ with ARect do
+ HintWindow.ActivateHint(Rect(Pt.X, Pt.Y+18, Pt.X+Right, Pt.Y+18+Bottom), TitleStr);
+ HintVisible := True;
+ end;
+end;
+
+procedure TForm1.ViewerProgress(Sender: TObject; Stage: TProgressStage;
+ PercentDone: Integer);
+begin
+ProgressBar.Position := PercentDone;
+case Stage of
+ psStarting:
+ ProgressBar.Visible := True;
+ psRunning:;
+ psEnding:
+ ProgressBar.Visible := False;
+ end;
+ProgressBar.Update;
+end;
+
+{HTML for print header and footer}
+const
+ HFText: string = ''+
+ ''+
+ ''+
+ ''+
+ '#left | #right | '+
+ '
'+
+ '
';
+
+function ReplaceStr(Const S, FromStr, ToStr: string): string;
+{replace FromStr with ToStr in string S.
+ for Delphi 6, 7, AnsiReplaceStr may be used instead.}
+var
+ I: integer;
+begin
+I := Pos(FromStr, S);
+if I > 0 then
+ begin
+ Result := S;
+ Delete(Result, I, Length(FromStr));
+ Insert(ToStr, Result, I);
+ end;
+end;
+
+procedure TForm1.ViewerPrintHTMLHeader(Sender: TObject;
+ HFViewer: THTMLViewer; NumPage: Integer; LastPage: boolean; var XL, XR: integer; var StopPrinting: Boolean);
+var
+ S: string;
+begin
+S := ReplaceStr(HFText, '#left', Viewer.DocumentTitle);
+S := ReplaceStr(S, '#right', Viewer.CurrentFile);
+HFViewer.LoadFromString(S);
+end;
+
+procedure TForm1.ViewerPrintHTMLFooter(Sender: TObject;
+ HFViewer: THTMLViewer; NumPage: Integer; LastPage: boolean; var XL, XR: integer; var StopPrinting: Boolean);
+var
+ S: string;
+begin
+S := ReplaceStr(HFText, '#left', DateToStr(Date));
+S := ReplaceStr(S, '#right', 'Page '+IntToStr(NumPage));
+HFViewer.LoadFromString(S);
+end;
+
+initialization
+{$IFDEF LCL}
+{$I mainform.lrs} {Include form's resource file}
+{$ENDIF}
+
+end.
diff --git a/applications/fpbrowser/pageloader.pas b/applications/fpbrowser/pageloader.pas
new file mode 100644
index 000000000..15c445fc9
--- /dev/null
+++ b/applications/fpbrowser/pageloader.pas
@@ -0,0 +1,70 @@
+unit pageloader;
+
+{$mode delphi}
+
+interface
+
+uses
+ Classes, SysUtils;
+
+type
+
+ { TPageLoader }
+
+ TPageLoader = class
+ public
+ Contents: string;
+ ContentsList: TStringList;
+ constructor Create;
+ procedure LoadFromURL(AURL: string);
+ end;
+
+var
+ MyPageLoader: TPageLoader;
+
+implementation
+
+uses httpsend;
+
+{ TPageLoader }
+
+constructor TPageLoader.Create;
+begin
+ ContentsList := TStringList.Create;
+end;
+
+procedure TPageLoader.LoadFromURL(AURL: string);
+var
+ Client: THttpSend;
+begin
+ Client := THttpSend.Create;
+
+// if checkGZip.Checked then
+ begin
+ Client.Headers.Add('Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8');
+ Client.Headers.Add('Accept-Language: en-gb,en;q=0.5');
+// Client.Headers.Add('Accept-Encoding: gzip,deflate');
+ Client.Headers.Add('Accept-Charset: utf-8;q=0.7,*;q=0.7'); // ISO-8859-1,
+ end;
+
+// Client.UserAgent := AUserAgent;
+ Client.HttpMethod('GET', AURL);
+ Client.Document.Position := 0;
+
+ ContentsList.LoadFromStream(Client.Document);
+
+ Contents := ContentsList.Text;
+
+ Client.Free;
+end;
+
+initialization
+
+ MyPageLoader := TPageLoader.Create;
+
+finalization
+
+ MyPageLoader.Free;
+
+end.
+
diff --git a/applications/fpbrowser/previewform.dfm b/applications/fpbrowser/previewform.dfm
new file mode 100644
index 000000000..47fdc7769
--- /dev/null
+++ b/applications/fpbrowser/previewform.dfm
@@ -0,0 +1,674 @@
+object PreviewForm: TPreviewForm
+ Left = 361
+ Top = 158
+ Width = 742
+ Height = 545
+ Caption = 'Preview Form'
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ Icon.Data = {
+ 0000010001002020100000000000E80200001600000028000000200000004000
+ 0000010004000000000080020000000000000000000000000000000000000000
+ 0000000080000080000000808000800000008000800080800000C0C0C0008080
+ 80000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000FFFFFFFFFFFFFF000000000000000000FCCCCCCCCCCCCF00000000000000
+ 0000FFFFFFFFFFFFFF000000000000000000FFFFFFFFFFFFFF00000000000000
+ 0000FFFFFFFFFFFFFF000000000000000000FCCCCCCCCCCCCF00000000000000
+ 0000FFFFFFFFFFFFFF000000000000000000FFFFFFFFFFFFF000000000000000
+ 0000FFFFFFFFFFFF00000000000000000000FCCCCCCCCCC00F00000000000000
+ 0000FFFFF0000F00FF000000000000000000FFFF0777700FFF00000000000000
+ 0000FFF07777770FFF000000000000000000FC0777777770CF00000000000000
+ 0000FF0444444440FF000000000000000000FF0444444440FF00000000000000
+ 0000FF0444444440FF000000000000000000FC0777777770CF00000000000000
+ 0000FFF07777770FFF000000000000000000FFFF077770FFFF00000000000000
+ 0000FFFFF0000FFFFF0000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000000000FFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0001FFFE0001FFFE0001F7FE00
+ 01E7FE0001CFFE00019FFE00013FFE00007FFE0000FFFE0001FFFE0001FFFE00
+ 01FFFE0001FFFE0001FFFE0001FFFE0001FFFE0001FFFE0001FFFE0001FFFE00
+ 01FFFE0001FFFE0001FFFE0001FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF}
+ OldCreateOrder = True
+ WindowState = wsMaximized
+ OnClose = FormClose
+ OnShow = FormShow
+ PixelsPerInch = 96
+ TextHeight = 13
+ object ToolBarPanel: TPanel
+ Left = 0
+ Top = 0
+ Width = 734
+ Height = 35
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 0
+ object GridBut: TSpeedButton
+ Left = 391
+ Top = 4
+ Width = 25
+ Height = 25
+ Hint = 'Show/Hide Grid'
+ AllowAllUp = True
+ GroupIndex = 1
+ Glyph.Data = {
+ F6000000424DF600000000000000760000002800000010000000100000000100
+ 0400000000008000000000000000000000001000000010000000000000000000
+ BF0000BF000000BFBF00BF000000BF00BF00BFBF0000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00777777777777
+ 7777777877877877877777787787787787777880880880880887777877877877
+ 8777777877877877877778808808808808877778778778778777777877877877
+ 8777788088088088088777787787787787777778778778778777788088088088
+ 0887777877877877877777787787787787777777777777777777}
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = GridButClick
+ end
+ object ZoomCursorBut: TSpeedButton
+ Left = 532
+ Top = 4
+ Width = 25
+ Height = 25
+ Hint = 'Selects the Zoom Tool to zoom in or out'
+ GroupIndex = 2
+ Down = True
+ Glyph.Data = {
+ 76010000424D7601000000000000760000002800000020000000100000000100
+ 0400000000000001000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
+ 33033333333333333F8F3333333333333000333333333333F888333333333333
+ 000333333333333F888333333333333000333333333333F88833333333333300
+ 033333333FFF3F888333333800083B803333333F8883F88833333308888800B3
+ 33333388333888833333308F7F7F8033333338F333F338F3333388F7F9F7F883
+ 3333383338F3383F3333087F797F780333338F33F8FFF38F333308F99999F803
+ 33338F388888338F3333087F797F7803333383F338F33383333388F7F9F7F883
+ 333338F3383338F33333308F7F7F80333333383FF333F8333333330888880333
+ 333333883FF88333333333380008333333333333888333333333}
+ NumGlyphs = 2
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = ZoomCursorButClick
+ end
+ object HandCursorBut: TSpeedButton
+ Left = 558
+ Top = 4
+ Width = 25
+ Height = 25
+ Hint = 'Selects the Hand Tool to pan across the Page'
+ GroupIndex = 2
+ Glyph.Data = {
+ F6000000424DF600000000000000760000002800000010000000100000000100
+ 0400000000008000000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333300000003
+ 33333330FFFFFFF03333330FFFFFFFFF0333330FFFFFFF0FF033330FFFFFFF00
+ FF03330FFFFFFF030F03330F0F0F0F033003330F0F0F0F033333330F0F0F0F03
+ 3333330F0F0F0F033333330F0F0F0F03333333300F0F0F03333333330F0F0F03
+ 33333333000F0F0333333333330F003333333333330003333333}
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = HandCursorButClick
+ end
+ object OnePageBut: TSpeedButton
+ Left = 595
+ Top = 4
+ Width = 25
+ Height = 25
+ Hint = 'Display One page at a time'
+ GroupIndex = 3
+ Down = True
+ Caption = '&1'
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = ScrollBox1Resize
+ OnMouseUp = OnePageButMouseUp
+ end
+ object TwoPageBut: TSpeedButton
+ Left = 621
+ Top = 4
+ Width = 25
+ Height = 25
+ Hint = 'Display Two pages side by side'
+ GroupIndex = 3
+ Caption = '&2'
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = TwoPageButClick
+ end
+ object FitPageBut: TSpeedButton
+ Left = 340
+ Top = 4
+ Width = 25
+ Height = 25
+ Hint = 'Fit to Page'
+ AllowAllUp = True
+ GroupIndex = 4
+ Glyph.Data = {
+ F6000000424DF600000000000000760000002800000010000000100000000100
+ 0400000000008000000000000000000000001000000010000000000000000000
+ 8000008000000080800080000000800080008080000080808000C0C0C0000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00FF0000000000
+ 00FFFF0FFFFFFFFFF0FFFF0FFFFFFFFFF0FFFF0F00000000F0FFFF0FFFFFFFFF
+ F0FFFF0FFFFFFFFFF0FFFF0F00000000F0FFFF0FFFFFFFFFF0FFFF0FFFFFFFFF
+ F0FFFF0F00000000F0FFFF0FFFFFFFFFF0FFFF0FFFFFFFFFF0FFFF0F00000000
+ F0FFFF0FFFFFFFFFF0FFFF0FFFFFFFFFF0FFFF000000000000FF}
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = FitPageButClick
+ end
+ object FitWidthBut: TSpeedButton
+ Left = 365
+ Top = 4
+ Width = 25
+ Height = 25
+ Hint = 'Fit to Width'
+ AllowAllUp = True
+ GroupIndex = 4
+ Glyph.Data = {
+ F6000000424DF600000000000000760000002800000010000000100000000100
+ 0400000000008000000000000000000000001000000010000000000000000000
+ 8000008000000080800080000000800080008080000080808000C0C0C0000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFF0FF0000000000FF00FFFFFFFFFFFFFF00FFFFFFFFFFF
+ FFF00FFFFFFFFFFFFFF00FF0000000000FF00FFFFFFFFFFFFFF00FFFFFFFFFFF
+ FFF00FFFFFFFFFFFFFF00FF0000000000FF00FFFFFFFFFFFFFF00FFFFFFFFFFF
+ FFF00000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF}
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = FitWidthButClick
+ end
+ object Bevel1: TBevel
+ Left = 0
+ Top = 33
+ Width = 734
+ Height = 2
+ Align = alBottom
+ Shape = bsBottomLine
+ end
+ object Bevel2: TBevel
+ Left = 220
+ Top = 2
+ Width = 2
+ Height = 28
+ end
+ object Bevel3: TBevel
+ Left = 332
+ Top = 2
+ Width = 2
+ Height = 28
+ end
+ object Bevel4: TBevel
+ Left = 520
+ Top = 2
+ Width = 2
+ Height = 28
+ end
+ object Bevel5: TBevel
+ Left = 588
+ Top = 2
+ Width = 2
+ Height = 28
+ end
+ object Bevel6: TBevel
+ Left = 652
+ Top = 2
+ Width = 2
+ Height = 28
+ end
+ object Bevel7: TBevel
+ Left = 423
+ Top = 2
+ Width = 2
+ Height = 28
+ end
+ object PrintBut: TBitBtn
+ Left = 5
+ Top = 4
+ Width = 76
+ Height = 25
+ Hint = 'Print the Current Document'
+ Caption = '&Print...'
+ TabOrder = 0
+ OnClick = PrintButClick
+ Glyph.Data = {
+ F6000000424DF600000000000000760000002800000010000000100000000100
+ 0400000000008000000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00222222222222
+ 22222200000000000222207777777770702200000000000007020777777BBB77
+ 0002077777788877070200000000000007700777777777707070200000000007
+ 0700220FFFFFFFF070702220F00000F000022220FFFFFFFF022222220F00000F
+ 022222220FFFFFFFF02222222000000000222222222222222222}
+ Spacing = 8
+ end
+ object NextPageBut: TBitBtn
+ Left = 148
+ Top = 4
+ Width = 66
+ Height = 25
+ Hint = 'Advance to Next Page in Document'
+ Caption = '&Next'
+ TabOrder = 1
+ OnClick = NextPageButClick
+ Glyph.Data = {
+ 66010000424D6601000000000000760000002800000014000000140000000100
+ 040000000000F000000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
+ 3333333300003333333333333333333300003333330033333333333300003333
+ 330E03333333333300003333330EE0333333333300003333330EEE0333333333
+ 00003333330EEEE03333333300003333330EEEEE0333333300003333330EEEEE
+ E033333300003333330EEEEEEE03333300003333330EEEEEEE03333300003333
+ 330EEEEEE033333300003333330EEEEE0333333300003333330EEEE033333333
+ 00003333330EEE033333333300003333330EE0333333333300003333330E0333
+ 3333333300003333330033333333333300003333333333333333333300003333
+ 33333333333333330000}
+ Layout = blGlyphRight
+ Margin = 4
+ Spacing = 2
+ end
+ object PrevPageBut: TBitBtn
+ Left = 82
+ Top = 4
+ Width = 65
+ Height = 25
+ Hint = 'Move to Previous Page in Document'
+ Caption = 'Pre&v'
+ Enabled = False
+ TabOrder = 2
+ OnClick = PrevPageButClick
+ Glyph.Data = {
+ 66010000424D6601000000000000760000002800000014000000140000000100
+ 040000000000F000000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
+ 3333333300003333333333333333333300003333333333300333333300003333
+ 3333330E0333333300003333333330EE033333330000333333330EEE03333333
+ 000033333330EEEE0333333300003333330EEEEE033333330000333330EEEEEE
+ 03333333000033330EEEEEEE03333333000033330EEEEEEE0333333300003333
+ 30EEEEEE0333333300003333330EEEEE03333333000033333330EEEE03333333
+ 0000333333330EEE0333333300003333333330EE03333333000033333333330E
+ 0333333300003333333333300333333300003333333333333333333300003333
+ 33333333333333330000}
+ Margin = 6
+ Spacing = 2
+ end
+ object CloseBut: TBitBtn
+ Left = 660
+ Top = 4
+ Width = 61
+ Height = 25
+ Hint = 'Close the Print Preview window'
+ Cancel = True
+ Caption = '&Close'
+ TabOrder = 3
+ OnClick = CloseButClick
+ Glyph.Data = {
+ F6010000424DF601000000000000760000002800000030000000100000000100
+ 0400000000008001000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00330000000000
+ 0333330000000000033333000000000003333306666666660333330FFFFFFFFF
+ 033333077777777703333306666666660333330FFFFFFFFF0333330777777777
+ 03333306666666660333330FFFFFFFFF03333307777777770333330666666666
+ 0333330FFFFFFFFF033333077777777703333306666666660333330FFFFFFFFF
+ 033333077777777703333306666666660333330FFFFFFFFF0333330777777777
+ 03333306666666060333330FFFFFFF0F03333307777777870333330666666666
+ 0333330FFFFFFFFF033333077777777703333306666666660333330FFFFFFFFF
+ 0333330777777777033333066FFFFF660333330FF00000FF0333330778888877
+ 033333066FFFFF660333330FF00000FF0333330778888877033333066FFFFF66
+ 0333330FF00000FF033333077888887703333306666666660333330FFFFFFFFF
+ 033333077777777703333306666666660333330FFFFFFFFF0333330777777777
+ 0333330000000000033333000000000003333300000000000333}
+ NumGlyphs = 3
+ end
+ object ZoomBox: TComboBox
+ Left = 228
+ Top = 6
+ Width = 97
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 13
+ TabOrder = 4
+ OnChange = ZoomBoxChange
+ Items.Strings = (
+ 'Fit To Page'
+ 'Fit To Width'
+ 'Custom'
+ '25%'
+ '50%'
+ '75%'
+ '100%'
+ '125%'
+ '150%'
+ '200%'
+ '300%'
+ '400%')
+ end
+ object UnitsBox: TComboBox
+ Left = 431
+ Top = 6
+ Width = 81
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 13
+ TabOrder = 5
+ OnChange = UnitsBoxChange
+ Items.Strings = (
+ 'Inches'
+ 'Centimeters')
+ end
+ end
+ object StatBarPanel: TPanel
+ Left = 0
+ Top = 484
+ Width = 734
+ Height = 27
+ Align = alBottom
+ BevelOuter = bvNone
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clBlack
+ Font.Height = -11
+ Font.Name = 'Arial'
+ Font.Style = []
+ ParentFont = False
+ TabOrder = 1
+ object CurPageLabel: TPanel
+ Left = 133
+ Top = 0
+ Width = 101
+ Height = 27
+ Hint = 'Displays the Current Page of the Document'
+ Align = alLeft
+ BevelOuter = bvLowered
+ Caption = 'CurPageLabel'
+ TabOrder = 0
+ end
+ object ZoomLabel: TPanel
+ Left = 234
+ Top = 0
+ Width = 88
+ Height = 27
+ Hint = 'Displays the Current Zoom Level (100% = normal)'
+ Align = alLeft
+ BevelOuter = bvLowered
+ Caption = 'ZoomLabel'
+ TabOrder = 1
+ end
+ object Panel1: TPanel
+ Left = 322
+ Top = 0
+ Width = 412
+ Height = 27
+ Hint = 'Displays Help for the object beneath the mouse'
+ Align = alClient
+ BevelOuter = bvLowered
+ TabOrder = 2
+ object HintLabel: TLabel
+ Left = 8
+ Top = 5
+ Width = 44
+ Height = 14
+ Hint = 'Displays Help for the object beneath the mouse'
+ Caption = 'HintLabel'
+ end
+ end
+ object MoveButPanel: TPanel
+ Left = 0
+ Top = 0
+ Width = 133
+ Height = 27
+ Align = alLeft
+ BevelOuter = bvNone
+ Caption = 'MoveButPanel'
+ TabOrder = 3
+ object FirstPageSpeed: TSpeedButton
+ Left = 1
+ Top = 2
+ Width = 25
+ Height = 25
+ Hint = 'Go to First Page in Document'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clBlack
+ Font.Height = -13
+ Font.Name = 'Times New Roman'
+ Font.Style = []
+ Glyph.Data = {
+ F6010000424DF601000000000000760000002800000030000000100000000100
+ 0400000000008001000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00330000333330
+ 033333000033333003333388883333388333330EE033330E0333330FF033330F
+ 03333387783333878333330EE03330EE0333330FF03330FF0333338778333877
+ 8333330EE0330EEE0333330FF0330FFF03333387783387778333330EE030EEEE
+ 0333330FF030FFFF03333387783877778333330EE00EEEEE0333330FF00FFFFF
+ 03333387788777778333330EE0EEEEEE0333330FF0FFFFFF0333338778777777
+ 8333330EEEEEEEEE0333330FFFFFFFFF03333387777777778333330EEEEEEEEE
+ 0333330FFFFFFFFF03333387777777778333330EE0EEEEEE0333330FF0FFFFFF
+ 03333387787777778333330EE00EEEEE0333330FF00FFFFF0333338778877777
+ 8333330EE030EEEE0333330FF030FFFF03333387783877778333330EE0330EEE
+ 0333330FF0330FFF03333387783387778333330EE03330EE0333330FF03330FF
+ 03333387783338778333330EE033330E0333330FF033330F0333338778333387
+ 8333330000333330033333000033333003333388883333388333}
+ NumGlyphs = 3
+ ParentFont = False
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = FirstPageSpeedClick
+ end
+ object PrevPageSpeed: TSpeedButton
+ Left = 26
+ Top = 2
+ Width = 25
+ Height = 25
+ Hint = 'Move to Previous Page in Document'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clBlack
+ Font.Height = -13
+ Font.Name = 'Times New Roman'
+ Font.Style = []
+ Glyph.Data = {
+ F6010000424DF601000000000000760000002800000030000000100000000100
+ 0400000000008001000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333300
+ 3333333333333300333333333333338833333333333330E033333333333330F0
+ 33333333333338783333333333330EE03333333333330FF03333333333338778
+ 333333333330EEE0333333333330FFF0333333333338777833333333330EEEE0
+ 33333333330FFFF033333333338777783333333330EEEEE03333333330FFFFF0
+ 3333333338777778333333330EEEEEE0333333330FFFFFF03333333387777778
+ 33333330EEEEEEE033333330FFFFFFF0333333387777777833333330EEEEEEE0
+ 33333330FFFFFFF03333333877777778333333330EEEEEE0333333330FFFFFF0
+ 33333333877777783333333330EEEEE03333333330FFFFF03333333338777778
+ 33333333330EEEE033333333330FFFF03333333333877778333333333330EEE0
+ 333333333330FFF033333333333877783333333333330EE03333333333330FF0
+ 333333333333877833333333333330E033333333333330F03333333333333878
+ 3333333333333300333333333333330033333333333333883333}
+ NumGlyphs = 3
+ ParentFont = False
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = PrevPageButClick
+ end
+ object NextPageSpeed: TSpeedButton
+ Left = 51
+ Top = 2
+ Width = 25
+ Height = 25
+ Hint = 'Advance to Next Page in Document'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clBlack
+ Font.Height = -13
+ Font.Name = 'Times New Roman'
+ Font.Style = []
+ Glyph.Data = {
+ F6010000424DF601000000000000760000002800000030000000100000000100
+ 0400000000008001000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333300333333
+ 33333333003333333333333388333333333333330E033333333333330F033333
+ 3333333387833333333333330EE03333333333330FF033333333333387783333
+ 333333330EEE0333333333330FFF03333333333387778333333333330EEEE033
+ 333333330FFFF0333333333387777833333333330EEEEE03333333330FFFFF03
+ 3333333387777783333333330EEEEEE0333333330FFFFFF03333333387777778
+ 333333330EEEEEEE033333330FFFFFFF0333333387777777833333330EEEEEEE
+ 033333330FFFFFFF0333333387777777833333330EEEEEE0333333330FFFFFF0
+ 3333333387777778333333330EEEEE03333333330FFFFF033333333387777783
+ 333333330EEEE033333333330FFFF0333333333387777833333333330EEE0333
+ 333333330FFF03333333333387778333333333330EE03333333333330FF03333
+ 3333333387783333333333330E033333333333330F0333333333333387833333
+ 3333333300333333333333330033333333333333883333333333}
+ NumGlyphs = 3
+ ParentFont = False
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = NextPageButClick
+ end
+ object LastPageSpeed: TSpeedButton
+ Left = 76
+ Top = 2
+ Width = 25
+ Height = 25
+ Hint = 'Go to Last Page in Document'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clBlack
+ Font.Height = -13
+ Font.Name = 'Times New Roman'
+ Font.Style = []
+ Glyph.Data = {
+ F6010000424DF601000000000000760000002800000030000000100000000100
+ 0400000000008001000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333003333300
+ 0033333003333300003333388333338888333330E033330EE0333330F033330F
+ F03333387833338778333330EE03330EE0333330FF03330FF033333877833387
+ 78333330EEE0330EE0333330FFF0330FF03333387778338778333330EEEE030E
+ E0333330FFFF030FF03333387777838778333330EEEEE00EE0333330FFFFF00F
+ F03333387777788778333330EEEEEE0EE0333330FFFFFF0FF033333877777787
+ 78333330EEEEEEEEE0333330FFFFFFFFF03333387777777778333330EEEEEEEE
+ E0333330FFFFFFFFF03333387777777778333330EEEEEE0EE0333330FFFFFF0F
+ F03333387777778778333330EEEEE00EE0333330FFFFF00FF033333877777887
+ 78333330EEEE030EE0333330FFFF030FF03333387777838778333330EEE0330E
+ E0333330FFF0330FF03333387778338778333330EE03330EE0333330FF03330F
+ F03333387783338778333330E033330EE0333330F033330FF033333878333387
+ 7833333003333300003333300333330000333338833333888833}
+ NumGlyphs = 3
+ ParentFont = False
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = LastPageSpeedClick
+ end
+ object PageNumSpeed: TSpeedButton
+ Left = 101
+ Top = 2
+ Width = 25
+ Height = 25
+ Hint = 'Go to Page by Page Number'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clBlack
+ Font.Height = -13
+ Font.Name = 'Times New Roman'
+ Font.Style = []
+ Glyph.Data = {
+ 76010000424D7601000000000000760000002800000020000000100000000100
+ 0400000000000001000000000000000000001000000010000000000000000000
+ 800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00300000000000
+ 003337777777777777F330FFFFFFFFFFF03337F33F333F3337F330FF0FFF0FFF
+ F03337F37F337F3337F330FF0FFF0FFFF03337F37FFF7FFF37F330F00000000F
+ F03337F77777777337F330FFF0FFF0FFF03337F337F337F337F330FFF0FFF0FF
+ F03337F337FFF7FFF7F330FF00000000F03337F37777777737F330FFFF0FFF0F
+ F03337F3337F337F37F330FFFF0FFF0FF03337F33373337337F330FFFFFFFFFF
+ F03337F33333333FF7F330FFFFFFFF00003337F33333337777F330FFFFFFFF0F
+ F03337FFFFFFFF7F373330999999990F033337777777777F733330FFFFFFFF00
+ 333337FFFFFFFF77333330000000000333333777777777733333}
+ NumGlyphs = 2
+ ParentFont = False
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = PageNumSpeedClick
+ end
+ end
+ end
+ object ScrollBox1: TScrollBox
+ Left = 0
+ Top = 35
+ Width = 734
+ Height = 449
+ HorzScrollBar.Tracking = True
+ VertScrollBar.Tracking = True
+ Align = alClient
+ BorderStyle = bsNone
+ Color = clBtnFace
+ ParentColor = False
+ TabOrder = 2
+ OnResize = ScrollBox1Resize
+ object ContainPanel: TPanel
+ Left = 0
+ Top = 0
+ Width = 489
+ Height = 329
+ BevelOuter = bvNone
+ Color = clBtnShadow
+ TabOrder = 0
+ object PagePanel: TPanel
+ Left = 44
+ Top = 32
+ Width = 209
+ Height = 265
+ BevelOuter = bvNone
+ Color = clWindow
+ TabOrder = 0
+ object PB1: TPaintBox
+ Left = 0
+ Top = 0
+ Width = 209
+ Height = 265
+ Hint =
+ 'Page View. With Zoom Tool, left or right click to zoom in/out. ' +
+ ' Click && drag with Hand Tool to pan.'
+ Align = alClient
+ OnMouseDown = PB1MouseDown
+ OnMouseMove = PB1MouseMove
+ OnMouseUp = PB1MouseUp
+ OnPaint = PBPaint
+ end
+ end
+ object PagePanel2: TPanel
+ Left = 260
+ Top = 32
+ Width = 209
+ Height = 265
+ BevelOuter = bvNone
+ Color = clWindow
+ TabOrder = 1
+ Visible = False
+ object PB2: TPaintBox
+ Left = 0
+ Top = 0
+ Width = 209
+ Height = 265
+ Hint =
+ 'Page View. With Zoom Tool, left or right click to zoom in/out. ' +
+ ' Click && drag with Hand Tool to pan.'
+ Align = alClient
+ OnPaint = PBPaint
+ end
+ end
+ end
+ end
+ object PrintDialog1: TPrintDialog
+ FromPage = 1
+ MinPage = 1
+ Options = [poPrintToFile, poPageNums]
+ Left = 538
+ Top = 90
+ end
+end
diff --git a/applications/fpbrowser/previewform.lfm b/applications/fpbrowser/previewform.lfm
new file mode 100644
index 000000000..9334657da
--- /dev/null
+++ b/applications/fpbrowser/previewform.lfm
@@ -0,0 +1,670 @@
+object PreviewForm: TPreviewForm
+ Left = 361
+ Top = 158
+ Width = 734
+ Height = 511
+ Caption = 'Preview Form'
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ Icon.Data = {
+ 0000010001002020100000000000E80200001600000028000000200000004000
+ 0000010004000000000080020000000000000000000000000000000000000000
+ 0000000080000080000000808000800000008000800080800000C0C0C0008080
+ 80000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000FFFFFFFFFFFFFF000000000000000000FCCCCCCCCCCCCF00000000000000
+ 0000FFFFFFFFFFFFFF000000000000000000FFFFFFFFFFFFFF00000000000000
+ 0000FFFFFFFFFFFFFF000000000000000000FCCCCCCCCCCCCF00000000000000
+ 0000FFFFFFFFFFFFFF000000000000000000FFFFFFFFFFFFF000000000000000
+ 0000FFFFFFFFFFFF00000000000000000000FCCCCCCCCCC00F00000000000000
+ 0000FFFFF0000F00FF000000000000000000FFFF0777700FFF00000000000000
+ 0000FFF07777770FFF000000000000000000FC0777777770CF00000000000000
+ 0000FF0444444440FF000000000000000000FF0444444440FF00000000000000
+ 0000FF0444444440FF000000000000000000FC0777777770CF00000000000000
+ 0000FFF07777770FFF000000000000000000FFFF077770FFFF00000000000000
+ 0000FFFFF0000FFFFF0000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000000000FFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0001FFFE0001FFFE0001F7FE00
+ 01E7FE0001CFFE00019FFE00013FFE00007FFE0000FFFE0001FFFE0001FFFE00
+ 01FFFE0001FFFE0001FFFE0001FFFE0001FFFE0001FFFE0001FFFE0001FFFE00
+ 01FFFE0001FFFE0001FFFE0001FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF}
+ WindowState = wsMaximized
+ OnClose = FormClose
+ OnShow = FormShow
+ PixelsPerInch = 96
+ object ToolBarPanel: TPanel
+ Left = 0
+ Top = 0
+ Width = 734
+ Height = 35
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 0
+ object GridBut: TSpeedButton
+ Left = 391
+ Top = 4
+ Width = 25
+ Height = 25
+ Hint = 'Show/Hide Grid'
+ AllowAllUp = True
+ GroupIndex = 1
+ Glyph.Data = {
+ F6000000424DF600000000000000760000002800000010000000100000000100
+ 0400000000008000000000000000000000001000000010000000000000000000
+ BF0000BF000000BFBF00BF000000BF00BF00BFBF0000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00777777777777
+ 7777777877877877877777787787787787777880880880880887777877877877
+ 8777777877877877877778808808808808877778778778778777777877877877
+ 8777788088088088088777787787787787777778778778778777788088088088
+ 0887777877877877877777787787787787777777777777777777}
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = GridButClick
+ end
+ object ZoomCursorBut: TSpeedButton
+ Left = 532
+ Top = 4
+ Width = 25
+ Height = 25
+ Hint = 'Selects the Zoom Tool to zoom in or out'
+ GroupIndex = 2
+ Down = True
+ Glyph.Data = {
+ 76010000424D7601000000000000760000002800000020000000100000000100
+ 0400000000000001000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
+ 33033333333333333F8F3333333333333000333333333333F888333333333333
+ 000333333333333F888333333333333000333333333333F88833333333333300
+ 033333333FFF3F888333333800083B803333333F8883F88833333308888800B3
+ 33333388333888833333308F7F7F8033333338F333F338F3333388F7F9F7F883
+ 3333383338F3383F3333087F797F780333338F33F8FFF38F333308F99999F803
+ 33338F388888338F3333087F797F7803333383F338F33383333388F7F9F7F883
+ 333338F3383338F33333308F7F7F80333333383FF333F8333333330888880333
+ 333333883FF88333333333380008333333333333888333333333}
+ NumGlyphs = 2
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = ZoomCursorButClick
+ end
+ object HandCursorBut: TSpeedButton
+ Left = 558
+ Top = 4
+ Width = 25
+ Height = 25
+ Hint = 'Selects the Hand Tool to pan across the Page'
+ GroupIndex = 2
+ Glyph.Data = {
+ F6000000424DF600000000000000760000002800000010000000100000000100
+ 0400000000008000000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333300000003
+ 33333330FFFFFFF03333330FFFFFFFFF0333330FFFFFFF0FF033330FFFFFFF00
+ FF03330FFFFFFF030F03330F0F0F0F033003330F0F0F0F033333330F0F0F0F03
+ 3333330F0F0F0F033333330F0F0F0F03333333300F0F0F03333333330F0F0F03
+ 33333333000F0F0333333333330F003333333333330003333333}
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = HandCursorButClick
+ end
+ object OnePageBut: TSpeedButton
+ Left = 595
+ Top = 4
+ Width = 25
+ Height = 25
+ Hint = 'Display One page at a time'
+ GroupIndex = 3
+ Down = True
+ Caption = '&1'
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = ScrollBox1Resize
+ OnMouseUp = OnePageButMouseUp
+ end
+ object TwoPageBut: TSpeedButton
+ Left = 621
+ Top = 4
+ Width = 25
+ Height = 25
+ Hint = 'Display Two pages side by side'
+ GroupIndex = 3
+ Caption = '&2'
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = TwoPageButClick
+ end
+ object FitPageBut: TSpeedButton
+ Left = 340
+ Top = 4
+ Width = 25
+ Height = 25
+ Hint = 'Fit to Page'
+ AllowAllUp = True
+ GroupIndex = 4
+ Glyph.Data = {
+ F6000000424DF600000000000000760000002800000010000000100000000100
+ 0400000000008000000000000000000000001000000010000000000000000000
+ 8000008000000080800080000000800080008080000080808000C0C0C0000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00FF0000000000
+ 00FFFF0FFFFFFFFFF0FFFF0FFFFFFFFFF0FFFF0F00000000F0FFFF0FFFFFFFFF
+ F0FFFF0FFFFFFFFFF0FFFF0F00000000F0FFFF0FFFFFFFFFF0FFFF0FFFFFFFFF
+ F0FFFF0F00000000F0FFFF0FFFFFFFFFF0FFFF0FFFFFFFFFF0FFFF0F00000000
+ F0FFFF0FFFFFFFFFF0FFFF0FFFFFFFFFF0FFFF000000000000FF}
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = FitPageButClick
+ end
+ object FitWidthBut: TSpeedButton
+ Left = 365
+ Top = 4
+ Width = 25
+ Height = 25
+ Hint = 'Fit to Width'
+ AllowAllUp = True
+ GroupIndex = 4
+ Glyph.Data = {
+ F6000000424DF600000000000000760000002800000010000000100000000100
+ 0400000000008000000000000000000000001000000010000000000000000000
+ 8000008000000080800080000000800080008080000080808000C0C0C0000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00FFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFF0FF0000000000FF00FFFFFFFFFFFFFF00FFFFFFFFFFF
+ FFF00FFFFFFFFFFFFFF00FF0000000000FF00FFFFFFFFFFFFFF00FFFFFFFFFFF
+ FFF00FFFFFFFFFFFFFF00FF0000000000FF00FFFFFFFFFFFFFF00FFFFFFFFFFF
+ FFF00000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF}
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = FitWidthButClick
+ end
+ object Bevel1: TBevel
+ Left = 0
+ Top = 33
+ Width = 734
+ Height = 2
+ Align = alBottom
+ Shape = bsBottomLine
+ end
+ object Bevel2: TBevel
+ Left = 220
+ Top = 2
+ Width = 2
+ Height = 28
+ end
+ object Bevel3: TBevel
+ Left = 332
+ Top = 2
+ Width = 2
+ Height = 28
+ end
+ object Bevel4: TBevel
+ Left = 520
+ Top = 2
+ Width = 2
+ Height = 28
+ end
+ object Bevel5: TBevel
+ Left = 588
+ Top = 2
+ Width = 2
+ Height = 28
+ end
+ object Bevel6: TBevel
+ Left = 652
+ Top = 2
+ Width = 2
+ Height = 28
+ end
+ object Bevel7: TBevel
+ Left = 423
+ Top = 2
+ Width = 2
+ Height = 28
+ end
+ object PrintBut: TBitBtn
+ Left = 5
+ Top = 4
+ Width = 76
+ Height = 25
+ Hint = 'Print the Current Document'
+ Caption = '&Print...'
+ TabOrder = 0
+ OnClick = PrintButClick
+ Glyph.Data = {
+ F6000000424DF600000000000000760000002800000010000000100000000100
+ 0400000000008000000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00222222222222
+ 22222200000000000222207777777770702200000000000007020777777BBB77
+ 0002077777788877070200000000000007700777777777707070200000000007
+ 0700220FFFFFFFF070702220F00000F000022220FFFFFFFF022222220F00000F
+ 022222220FFFFFFFF02222222000000000222222222222222222}
+ Spacing = 8
+ end
+ object NextPageBut: TBitBtn
+ Left = 148
+ Top = 4
+ Width = 66
+ Height = 25
+ Hint = 'Advance to Next Page in Document'
+ Caption = '&Next'
+ TabOrder = 1
+ OnClick = NextPageButClick
+ Glyph.Data = {
+ 66010000424D6601000000000000760000002800000014000000140000000100
+ 040000000000F000000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
+ 3333333300003333333333333333333300003333330033333333333300003333
+ 330E03333333333300003333330EE0333333333300003333330EEE0333333333
+ 00003333330EEEE03333333300003333330EEEEE0333333300003333330EEEEE
+ E033333300003333330EEEEEEE03333300003333330EEEEEEE03333300003333
+ 330EEEEEE033333300003333330EEEEE0333333300003333330EEEE033333333
+ 00003333330EEE033333333300003333330EE0333333333300003333330E0333
+ 3333333300003333330033333333333300003333333333333333333300003333
+ 33333333333333330000}
+ Layout = blGlyphRight
+ Margin = 4
+ Spacing = 2
+ end
+ object PrevPageBut: TBitBtn
+ Left = 82
+ Top = 4
+ Width = 65
+ Height = 25
+ Hint = 'Move to Previous Page in Document'
+ Caption = 'Pre&v'
+ Enabled = False
+ TabOrder = 2
+ OnClick = PrevPageButClick
+ Glyph.Data = {
+ 66010000424D6601000000000000760000002800000014000000140000000100
+ 040000000000F000000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
+ 3333333300003333333333333333333300003333333333300333333300003333
+ 3333330E0333333300003333333330EE033333330000333333330EEE03333333
+ 000033333330EEEE0333333300003333330EEEEE033333330000333330EEEEEE
+ 03333333000033330EEEEEEE03333333000033330EEEEEEE0333333300003333
+ 30EEEEEE0333333300003333330EEEEE03333333000033333330EEEE03333333
+ 0000333333330EEE0333333300003333333330EE03333333000033333333330E
+ 0333333300003333333333300333333300003333333333333333333300003333
+ 33333333333333330000}
+ Margin = 6
+ Spacing = 2
+ end
+ object CloseBut: TBitBtn
+ Left = 660
+ Top = 4
+ Width = 61
+ Height = 25
+ Hint = 'Close the Print Preview window'
+ Cancel = True
+ Caption = '&Close'
+ TabOrder = 3
+ OnClick = CloseButClick
+ Glyph.Data = {
+ F6010000424DF601000000000000760000002800000030000000100000000100
+ 0400000000008001000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00330000000000
+ 0333330000000000033333000000000003333306666666660333330FFFFFFFFF
+ 033333077777777703333306666666660333330FFFFFFFFF0333330777777777
+ 03333306666666660333330FFFFFFFFF03333307777777770333330666666666
+ 0333330FFFFFFFFF033333077777777703333306666666660333330FFFFFFFFF
+ 033333077777777703333306666666660333330FFFFFFFFF0333330777777777
+ 03333306666666060333330FFFFFFF0F03333307777777870333330666666666
+ 0333330FFFFFFFFF033333077777777703333306666666660333330FFFFFFFFF
+ 0333330777777777033333066FFFFF660333330FF00000FF0333330778888877
+ 033333066FFFFF660333330FF00000FF0333330778888877033333066FFFFF66
+ 0333330FF00000FF033333077888887703333306666666660333330FFFFFFFFF
+ 033333077777777703333306666666660333330FFFFFFFFF0333330777777777
+ 0333330000000000033333000000000003333300000000000333}
+ NumGlyphs = 3
+ end
+ object ZoomBox: TComboBox
+ Left = 228
+ Top = 6
+ Width = 97
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 13
+ TabOrder = 4
+ OnChange = ZoomBoxChange
+ Items.Strings = (
+ 'Fit To Page'
+ 'Fit To Width'
+ 'Custom'
+ '25%'
+ '50%'
+ '75%'
+ '100%'
+ '125%'
+ '150%'
+ '200%'
+ '300%'
+ '400%')
+ end
+ object UnitsBox: TComboBox
+ Left = 431
+ Top = 6
+ Width = 81
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 13
+ TabOrder = 5
+ OnChange = UnitsBoxChange
+ Items.Strings = (
+ 'Inches'
+ 'Centimeters')
+ end
+ end
+ object StatBarPanel: TPanel
+ Left = 0
+ Top = 484
+ Width = 734
+ Height = 27
+ Align = alBottom
+ BevelOuter = bvNone
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clBlack
+ Font.Height = -11
+ Font.Name = 'Arial'
+ Font.Style = []
+ ParentFont = False
+ TabOrder = 1
+ object CurPageLabel: TPanel
+ Left = 133
+ Top = 0
+ Width = 101
+ Height = 27
+ Hint = 'Displays the Current Page of the Document'
+ Align = alLeft
+ BevelOuter = bvLowered
+ Caption = 'CurPageLabel'
+ TabOrder = 0
+ end
+ object ZoomLabel: TPanel
+ Left = 234
+ Top = 0
+ Width = 88
+ Height = 27
+ Hint = 'Displays the Current Zoom Level (100% = normal)'
+ Align = alLeft
+ BevelOuter = bvLowered
+ Caption = 'ZoomLabel'
+ TabOrder = 1
+ end
+ object Panel1: TPanel
+ Left = 322
+ Top = 0
+ Width = 412
+ Height = 27
+ Hint = 'Displays Help for the object beneath the mouse'
+ Align = alClient
+ BevelOuter = bvLowered
+ TabOrder = 2
+ object HintLabel: TLabel
+ Left = 8
+ Top = 5
+ Width = 44
+ Height = 14
+ Hint = 'Displays Help for the object beneath the mouse'
+ Caption = 'HintLabel'
+ end
+ end
+ object MoveButPanel: TPanel
+ Left = 0
+ Top = 0
+ Width = 133
+ Height = 27
+ Align = alLeft
+ BevelOuter = bvNone
+ Caption = 'MoveButPanel'
+ TabOrder = 3
+ object FirstPageSpeed: TSpeedButton
+ Left = 1
+ Top = 2
+ Width = 25
+ Height = 25
+ Hint = 'Go to First Page in Document'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clBlack
+ Font.Height = -13
+ Font.Name = 'Times New Roman'
+ Font.Style = []
+ Glyph.Data = {
+ F6010000424DF601000000000000760000002800000030000000100000000100
+ 0400000000008001000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00330000333330
+ 033333000033333003333388883333388333330EE033330E0333330FF033330F
+ 03333387783333878333330EE03330EE0333330FF03330FF0333338778333877
+ 8333330EE0330EEE0333330FF0330FFF03333387783387778333330EE030EEEE
+ 0333330FF030FFFF03333387783877778333330EE00EEEEE0333330FF00FFFFF
+ 03333387788777778333330EE0EEEEEE0333330FF0FFFFFF0333338778777777
+ 8333330EEEEEEEEE0333330FFFFFFFFF03333387777777778333330EEEEEEEEE
+ 0333330FFFFFFFFF03333387777777778333330EE0EEEEEE0333330FF0FFFFFF
+ 03333387787777778333330EE00EEEEE0333330FF00FFFFF0333338778877777
+ 8333330EE030EEEE0333330FF030FFFF03333387783877778333330EE0330EEE
+ 0333330FF0330FFF03333387783387778333330EE03330EE0333330FF03330FF
+ 03333387783338778333330EE033330E0333330FF033330F0333338778333387
+ 8333330000333330033333000033333003333388883333388333}
+ NumGlyphs = 3
+ ParentFont = False
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = FirstPageSpeedClick
+ end
+ object PrevPageSpeed: TSpeedButton
+ Left = 26
+ Top = 2
+ Width = 25
+ Height = 25
+ Hint = 'Move to Previous Page in Document'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clBlack
+ Font.Height = -13
+ Font.Name = 'Times New Roman'
+ Font.Style = []
+ Glyph.Data = {
+ F6010000424DF601000000000000760000002800000030000000100000000100
+ 0400000000008001000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333300
+ 3333333333333300333333333333338833333333333330E033333333333330F0
+ 33333333333338783333333333330EE03333333333330FF03333333333338778
+ 333333333330EEE0333333333330FFF0333333333338777833333333330EEEE0
+ 33333333330FFFF033333333338777783333333330EEEEE03333333330FFFFF0
+ 3333333338777778333333330EEEEEE0333333330FFFFFF03333333387777778
+ 33333330EEEEEEE033333330FFFFFFF0333333387777777833333330EEEEEEE0
+ 33333330FFFFFFF03333333877777778333333330EEEEEE0333333330FFFFFF0
+ 33333333877777783333333330EEEEE03333333330FFFFF03333333338777778
+ 33333333330EEEE033333333330FFFF03333333333877778333333333330EEE0
+ 333333333330FFF033333333333877783333333333330EE03333333333330FF0
+ 333333333333877833333333333330E033333333333330F03333333333333878
+ 3333333333333300333333333333330033333333333333883333}
+ NumGlyphs = 3
+ ParentFont = False
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = PrevPageButClick
+ end
+ object NextPageSpeed: TSpeedButton
+ Left = 51
+ Top = 2
+ Width = 25
+ Height = 25
+ Hint = 'Advance to Next Page in Document'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clBlack
+ Font.Height = -13
+ Font.Name = 'Times New Roman'
+ Font.Style = []
+ Glyph.Data = {
+ F6010000424DF601000000000000760000002800000030000000100000000100
+ 0400000000008001000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333300333333
+ 33333333003333333333333388333333333333330E033333333333330F033333
+ 3333333387833333333333330EE03333333333330FF033333333333387783333
+ 333333330EEE0333333333330FFF03333333333387778333333333330EEEE033
+ 333333330FFFF0333333333387777833333333330EEEEE03333333330FFFFF03
+ 3333333387777783333333330EEEEEE0333333330FFFFFF03333333387777778
+ 333333330EEEEEEE033333330FFFFFFF0333333387777777833333330EEEEEEE
+ 033333330FFFFFFF0333333387777777833333330EEEEEE0333333330FFFFFF0
+ 3333333387777778333333330EEEEE03333333330FFFFF033333333387777783
+ 333333330EEEE033333333330FFFF0333333333387777833333333330EEE0333
+ 333333330FFF03333333333387778333333333330EE03333333333330FF03333
+ 3333333387783333333333330E033333333333330F0333333333333387833333
+ 3333333300333333333333330033333333333333883333333333}
+ NumGlyphs = 3
+ ParentFont = False
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = NextPageButClick
+ end
+ object LastPageSpeed: TSpeedButton
+ Left = 76
+ Top = 2
+ Width = 25
+ Height = 25
+ Hint = 'Go to Last Page in Document'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clBlack
+ Font.Height = -13
+ Font.Name = 'Times New Roman'
+ Font.Style = []
+ Glyph.Data = {
+ F6010000424DF601000000000000760000002800000030000000100000000100
+ 0400000000008001000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333003333300
+ 0033333003333300003333388333338888333330E033330EE0333330F033330F
+ F03333387833338778333330EE03330EE0333330FF03330FF033333877833387
+ 78333330EEE0330EE0333330FFF0330FF03333387778338778333330EEEE030E
+ E0333330FFFF030FF03333387777838778333330EEEEE00EE0333330FFFFF00F
+ F03333387777788778333330EEEEEE0EE0333330FFFFFF0FF033333877777787
+ 78333330EEEEEEEEE0333330FFFFFFFFF03333387777777778333330EEEEEEEE
+ E0333330FFFFFFFFF03333387777777778333330EEEEEE0EE0333330FFFFFF0F
+ F03333387777778778333330EEEEE00EE0333330FFFFF00FF033333877777887
+ 78333330EEEE030EE0333330FFFF030FF03333387777838778333330EEE0330E
+ E0333330FFF0330FF03333387778338778333330EE03330EE0333330FF03330F
+ F03333387783338778333330E033330EE0333330F033330FF033333878333387
+ 7833333003333300003333300333330000333338833333888833}
+ NumGlyphs = 3
+ ParentFont = False
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = LastPageSpeedClick
+ end
+ object PageNumSpeed: TSpeedButton
+ Left = 101
+ Top = 2
+ Width = 25
+ Height = 25
+ Hint = 'Go to Page by Page Number'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clBlack
+ Font.Height = -13
+ Font.Name = 'Times New Roman'
+ Font.Style = []
+ Glyph.Data = {
+ 76010000424D7601000000000000760000002800000020000000100000000100
+ 0400000000000001000000000000000000001000000010000000000000000000
+ 800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00300000000000
+ 003337777777777777F330FFFFFFFFFFF03337F33F333F3337F330FF0FFF0FFF
+ F03337F37F337F3337F330FF0FFF0FFFF03337F37FFF7FFF37F330F00000000F
+ F03337F77777777337F330FFF0FFF0FFF03337F337F337F337F330FFF0FFF0FF
+ F03337F337FFF7FFF7F330FF00000000F03337F37777777737F330FFFF0FFF0F
+ F03337F3337F337F37F330FFFF0FFF0FF03337F33373337337F330FFFFFFFFFF
+ F03337F33333333FF7F330FFFFFFFF00003337F33333337777F330FFFFFFFF0F
+ F03337FFFFFFFF7F373330999999990F033337777777777F733330FFFFFFFF00
+ 333337FFFFFFFF77333330000000000333333777777777733333}
+ NumGlyphs = 2
+ ParentFont = False
+ ParentShowHint = False
+ ShowHint = True
+ OnClick = PageNumSpeedClick
+ end
+ end
+ end
+ object ScrollBox1: TScrollBox
+ Left = 0
+ Top = 35
+ Width = 734
+ Height = 449
+ Align = alClient
+ BorderStyle = bsNone
+ Color = clBtnFace
+ ParentColor = False
+ TabOrder = 2
+ OnResize = ScrollBox1Resize
+ object ContainPanel: TPanel
+ Left = 0
+ Top = 0
+ Width = 489
+ Height = 329
+ BevelOuter = bvNone
+ Color = clBtnShadow
+ TabOrder = 0
+ object PagePanel: TPanel
+ Left = 44
+ Top = 32
+ Width = 209
+ Height = 265
+ BevelOuter = bvNone
+ Color = clWindow
+ TabOrder = 0
+ object PB1: TPaintBox
+ Left = 0
+ Top = 0
+ Width = 209
+ Height = 265
+ Hint =
+ 'Page View. With Zoom Tool, left or right click to zoom in/out. ' +
+ ' Click && drag with Hand Tool to pan.'
+ Align = alClient
+ OnMouseDown = PB1MouseDown
+ OnMouseMove = PB1MouseMove
+ OnMouseUp = PB1MouseUp
+ OnPaint = PBPaint
+ end
+ end
+ object PagePanel2: TPanel
+ Left = 260
+ Top = 32
+ Width = 209
+ Height = 265
+ BevelOuter = bvNone
+ Color = clWindow
+ TabOrder = 1
+ Visible = False
+ object PB2: TPaintBox
+ Left = 0
+ Top = 0
+ Width = 209
+ Height = 265
+ Hint =
+ 'Page View. With Zoom Tool, left or right click to zoom in/out. ' +
+ ' Click && drag with Hand Tool to pan.'
+ Align = alClient
+ OnPaint = PBPaint
+ end
+ end
+ end
+ end
+ object PrintDialog1: TPrintDialog
+ FromPage = 1
+ MinPage = 1
+ Options = [poPrintToFile, poPageNums]
+ Left = 538
+ Top = 90
+ end
+end
diff --git a/applications/fpbrowser/previewform.lrs b/applications/fpbrowser/previewform.lrs
new file mode 100644
index 000000000..ceea301e8
--- /dev/null
+++ b/applications/fpbrowser/previewform.lrs
@@ -0,0 +1,321 @@
+LazarusResources.Add('TPreviewForm','FORMDATA',[
+ 'TPF0'#12'TPreviewForm'#11'PreviewForm'#4'Left'#3'i'#1#3'Top'#3#158#0#5'Width'
+ +#3#222#2#6'Height'#3#255#1#7'Caption'#6#12'Preview Form'#5'Color'#7#9'clBtnF'
+ +'ace'#12'Font.Charset'#7#15'DEFAULT_CHARSET'#10'Font.Color'#7#12'clWindowTex'
+ +'t'#11'Font.Height'#2#245#9'Font.Name'#6#6'Tahoma'#10'Font.Style'#11#0#9'Ico'
+ +'n.Data'#10#254#2#0#0#0#0#1#0#1#0' '#16#0#0#0#0#0#232#2#0#0#22#0#0#0'('#0#0
+ +#0' '#0#0#0'@'#0#0#0#1#0#4#0#0#0#0#0#128#2#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+ +#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0#0#0#128#0#128#0#128#128#0#0
+ +#192#192#192#0#128#128#128#0#0#0#255#0#0#255#0#0#0#255#255#0#255#0#0#0#255#0
+ +#255#0#255#255#0#0#255#255#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+ +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+ +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+ +#0#0#255#255#255#255#255#255#255#0#0#0#0#0#0#0#0#0#252#204#204#204#204#204
+ +#207#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#0#0#0#0#0#0#0#0#0#255#255
+ +#255#255#255#255#255#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#0#0#0#0#0
+ +#0#0#0#0#252#204#204#204#204#204#207#0#0#0#0#0#0#0#0#0#255#255#255#255#255
+ +#255#255#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#240#0#0#0#0#0#0#0#0#0#255
+ +#255#255#255#255#255#0#0#0#0#0#0#0#0#0#0#252#204#204#204#204#192#15#0#0#0#0#0
+ +#0#0#0#0#255#255#240#0#15#0#255#0#0#0#0#0#0#0#0#0#255#255#7'wp'#15#255#0#0#0
+ +#0#0#0#0#0#0#255#240'www'#15#255#0#0#0#0#0#0#0#0#0#252#7'wwwp'#207#0#0#0#0#0
+ +#0#0#0#0#255#4'DDD@'#255#0#0#0#0#0#0#0#0#0#255#4'DDD@'#255#0#0#0#0#0#0#0#0#0
+ +#255#4'DDD@'#255#0#0#0#0#0#0#0#0#0#252#7'wwwp'#207#0#0#0#0#0#0#0#0#0#255#240
+ +'www'#15#255#0#0#0#0#0#0#0#0#0#255#255#7'wp'#255#255#0#0#0#0#0#0#0#0#0#255
+ +#255#240#0#15#255#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+ +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+ +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#255#255
+ +#255#255#255#255#255#255#255#255#255#255#255#254#0#1#255#254#0#1#255#254#0#1
+ +#247#254#0#1#231#254#0#1#207#254#0#1#159#254#0#1'?'#254#0#0#127#254#0#0#255
+ +#254#0#1#255#254#0#1#255#254#0#1#255#254#0#1#255#254#0#1#255#254#0#1#255#254
+ +#0#1#255#254#0#1#255#254#0#1#255#254#0#1#255#254#0#1#255#254#0#1#255#254#0#1
+ +#255#254#0#1#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+ +#255#11'WindowState'#7#11'wsMaximized'#7'OnClose'#7#9'FormClose'#6'OnShow'#7
+ +#8'FormShow'#13'PixelsPerInch'#2'`'#0#6'TPanel'#12'ToolBarPanel'#4'Left'#2#0
+ +#3'Top'#2#0#5'Width'#3#222#2#6'Height'#2'#'#5'Align'#7#5'alTop'#10'BevelOute'
+ +'r'#7#6'bvNone'#8'TabOrder'#2#0#0#12'TSpeedButton'#7'GridBut'#4'Left'#3#135#1
+ +#3'Top'#2#4#5'Width'#2#25#6'Height'#2#25#4'Hint'#6#14'Show/Hide Grid'#10'All'
+ +'owAllUp'#9#10'GroupIndex'#2#1#10'Glyph.Data'#10#250#0#0#0#246#0#0#0'BM'#246
+ +#0#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0#4#0#0#0#0#0#128#0#0#0
+ +#0#0#0#0#0#0#0#0#16#0#0#0#16#0#0#0#0#0#0#0#0#0#191#0#0#191#0#0#0#191#191#0
+ +#191#0#0#0#191#0#191#0#191#191#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+ +#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0'wwwwwww'
+ +'wwxw'#135'xw'#135'wwxw'#135'xw'#135'wx'#128#136#8#128#136#8#135'wxw'#135'xw'
+ +#135'wwxw'#135'xw'#135'wx'#128#136#8#128#136#8#135'wxw'#135'xw'#135'wwxw'#135
+ +'xw'#135'wx'#128#136#8#128#136#8#135'wxw'#135'xw'#135'wwxw'#135'xw'#135'wx'
+ +#128#136#8#128#136#8#135'wxw'#135'xw'#135'wwxw'#135'xw'#135'wwwwwwwww'#14'Pa'
+ +'rentShowHint'#8#8'ShowHint'#9#7'OnClick'#7#12'GridButClick'#0#0#12'TSpeedBu'
+ +'tton'#13'ZoomCursorBut'#4'Left'#3#20#2#3'Top'#2#4#5'Width'#2#25#6'Height'#2
+ +#25#4'Hint'#6'''Selects the Zoom Tool to zoom in or out'#10'GroupIndex'#2#2#4
+ +'Down'#9#10'Glyph.Data'#10'z'#1#0#0'v'#1#0#0'BMv'#1#0#0#0#0#0#0'v'#0#0#0'('#0
+ +#0#0' '#0#0#0#16#0#0#0#1#0#4#0#0#0#0#0#0#1#0#0#0#0#0#0#0#0#0#0#16#0#0#0#16#0
+ +#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0#0#0#128#0#128#0#128#128#0
+ +#0#192#192#192#0#128#128#128#0#0#0#255#0#0#255#0#0#0#255#255#0#255#0#0#0#255
+ +#0#255#0#255#255#0#0#255#255#255#0'3333333'#3'333333?'#143'3333330'#0'333333'
+ +#248#136'333333'#0#3'33333?'#136#131'333330'#0'333333'#248#136'333333'#0#3'3'
+ +'33?'#255'?'#136#131'338'#0#8';'#128'333?'#136#131#248#136'333'#8#136#136#0
+ +#179'333'#136'38'#136#131'330'#143#127#127#128'3338'#243'3'#243'8'#243'33'
+ +#136#247#249#247#248#131'33838'#243'8?33'#8#127'y'#127'x'#3'33'#143'3'#248
+ +#255#243#143'33'#8#249#153#153#248#3'33'#143'8'#136#136'3'#143'33'#8#127'y'
+ +#127'x'#3'33'#131#243'8'#243'3'#131'33'#136#247#249#247#248#131'338'#243'838'
+ +#243'330'#143#127#127#128'3338?'#243'3'#248'3333'#8#136#136#3'3333'#136'?'
+ +#248#131'33338'#0#8'333333'#136#131'3333'#9'NumGlyphs'#2#2#14'ParentShowHint'
+ +#8#8'ShowHint'#9#7'OnClick'#7#18'ZoomCursorButClick'#0#0#12'TSpeedButton'#13
+ +'HandCursorBut'#4'Left'#3'.'#2#3'Top'#2#4#5'Width'#2#25#6'Height'#2#25#4'Hin'
+ +'t'#6',Selects the Hand Tool to pan across the Page'#10'GroupIndex'#2#2#10'G'
+ +'lyph.Data'#10#250#0#0#0#246#0#0#0'BM'#246#0#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#16
+ ,#0#0#0#16#0#0#0#1#0#4#0#0#0#0#0#128#0#0#0#0#0#0#0#0#0#0#0#16#0#0#0#16#0#0#0#0
+ +#0#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0#0#0#128#0#128#0#128#128#0#0#192
+ +#192#192#0#128#128#128#0#0#0#255#0#0#255#0#0#0#255#255#0#255#0#0#0#255#0#255
+ +#0#255#255#0#0#255#255#255#0'33'#0#0#0#3'3330'#255#255#255#240'333'#15#255
+ +#255#255#255#3'33'#15#255#255#255#15#240'33'#15#255#255#255#0#255#3'3'#15#255
+ +#255#255#3#15#3'3'#15#15#15#15#3'0'#3'3'#15#15#15#15#3'333'#15#15#15#15#3'33'
+ +'3'#15#15#15#15#3'333'#15#15#15#15#3'3330'#15#15#15#3'3333'#15#15#15#3'3333'
+ +#0#15#15#3'33333'#15#0'333333'#0#3'333'#14'ParentShowHint'#8#8'ShowHint'#9#7
+ +'OnClick'#7#18'HandCursorButClick'#0#0#12'TSpeedButton'#10'OnePageBut'#4'Lef'
+ +'t'#3'S'#2#3'Top'#2#4#5'Width'#2#25#6'Height'#2#25#4'Hint'#6#26'Display One '
+ +'page at a time'#10'GroupIndex'#2#3#4'Down'#9#7'Caption'#6#2'&1'#14'ParentSh'
+ +'owHint'#8#8'ShowHint'#9#7'OnClick'#7#16'ScrollBox1Resize'#9'OnMouseUp'#7#17
+ +'OnePageButMouseUp'#0#0#12'TSpeedButton'#10'TwoPageBut'#4'Left'#3'm'#2#3'Top'
+ +#2#4#5'Width'#2#25#6'Height'#2#25#4'Hint'#6#30'Display Two pages side by sid'
+ +'e'#10'GroupIndex'#2#3#7'Caption'#6#2'&2'#14'ParentShowHint'#8#8'ShowHint'#9
+ +#7'OnClick'#7#15'TwoPageButClick'#0#0#12'TSpeedButton'#10'FitPageBut'#4'Left'
+ +#3'T'#1#3'Top'#2#4#5'Width'#2#25#6'Height'#2#25#4'Hint'#6#11'Fit to Page'#10
+ +'AllowAllUp'#9#10'GroupIndex'#2#4#10'Glyph.Data'#10#250#0#0#0#246#0#0#0'BM'
+ +#246#0#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0#4#0#0#0#0#0#128#0
+ +#0#0#0#0#0#0#0#0#0#0#16#0#0#0#16#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+ +#0#128#0#0#0#128#0#128#0#128#128#0#0#128#128#128#0#192#192#192#0#0#0#255#0#0
+ +#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#255#0#0
+ +#0#0#0#0#255#255#15#255#255#255#255#240#255#255#15#255#255#255#255#240#255
+ +#255#15#0#0#0#0#240#255#255#15#255#255#255#255#240#255#255#15#255#255#255#255
+ +#240#255#255#15#0#0#0#0#240#255#255#15#255#255#255#255#240#255#255#15#255#255
+ +#255#255#240#255#255#15#0#0#0#0#240#255#255#15#255#255#255#255#240#255#255#15
+ +#255#255#255#255#240#255#255#15#0#0#0#0#240#255#255#15#255#255#255#255#240
+ +#255#255#15#255#255#255#255#240#255#255#0#0#0#0#0#0#255#14'ParentShowHint'#8
+ +#8'ShowHint'#9#7'OnClick'#7#15'FitPageButClick'#0#0#12'TSpeedButton'#11'FitW'
+ +'idthBut'#4'Left'#3'm'#1#3'Top'#2#4#5'Width'#2#25#6'Height'#2#25#4'Hint'#6#12
+ +'Fit to Width'#10'AllowAllUp'#9#10'GroupIndex'#2#4#10'Glyph.Data'#10#250#0#0
+ +#0#246#0#0#0'BM'#246#0#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0#4
+ +#0#0#0#0#0#128#0#0#0#0#0#0#0#0#0#0#0#16#0#0#0#16#0#0#0#0#0#0#0#0#0#128#0#0
+ +#128#0#0#0#128#128#0#128#0#0#0#128#0#128#0#128#128#0#0#128#128#128#0#192#192
+ +#192#0#0#0#255#0#0#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255
+ +#255#255#0#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#15
+ +#240#0#0#0#0#15#240#15#255#255#255#255#255#255#240#15#255#255#255#255#255#255
+ +#240#15#255#255#255#255#255#255#240#15#240#0#0#0#0#15#240#15#255#255#255#255
+ +#255#255#240#15#255#255#255#255#255#255#240#15#255#255#255#255#255#255#240#15
+ +#240#0#0#0#0#15#240#15#255#255#255#255#255#255#240#15#255#255#255#255#255#255
+ +#240#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#255#255#255#255#255#255#255
+ +#255#255#14'ParentShowHint'#8#8'ShowHint'#9#7'OnClick'#7#16'FitWidthButClick'
+ +#0#0#6'TBevel'#6'Bevel1'#4'Left'#2#0#3'Top'#2'!'#5'Width'#3#222#2#6'Height'#2
+ +#2#5'Align'#7#8'alBottom'#5'Shape'#7#12'bsBottomLine'#0#0#6'TBevel'#6'Bevel2'
+ +#4'Left'#3#220#0#3'Top'#2#2#5'Width'#2#2#6'Height'#2#28#0#0#6'TBevel'#6'Beve'
+ +'l3'#4'Left'#3'L'#1#3'Top'#2#2#5'Width'#2#2#6'Height'#2#28#0#0#6'TBevel'#6'B'
+ +'evel4'#4'Left'#3#8#2#3'Top'#2#2#5'Width'#2#2#6'Height'#2#28#0#0#6'TBevel'#6
+ +'Bevel5'#4'Left'#3'L'#2#3'Top'#2#2#5'Width'#2#2#6'Height'#2#28#0#0#6'TBevel'
+ +#6'Bevel6'#4'Left'#3#140#2#3'Top'#2#2#5'Width'#2#2#6'Height'#2#28#0#0#6'TBev'
+ +'el'#6'Bevel7'#4'Left'#3#167#1#3'Top'#2#2#5'Width'#2#2#6'Height'#2#28#0#0#7
+ +'TBitBtn'#8'PrintBut'#4'Left'#2#5#3'Top'#2#4#5'Width'#2'L'#6'Height'#2#25#4
+ +'Hint'#6#26'Print the Current Document'#7'Caption'#6#9'&Print...'#8'TabOrder'
+ +#2#0#7'OnClick'#7#13'PrintButClick'#10'Glyph.Data'#10#250#0#0#0#246#0#0#0'BM'
+ +#246#0#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0#4#0#0#0#0#0#128#0
+ +#0#0#0#0#0#0#0#0#0#0#16#0#0#0#16#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128
+ +#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+ +#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0'"""""""'
+ +'""'#0#0#0#0#0#2'" wwwwpp"'#0#0#0#0#0#0#7#2#7'ww{'#187'w'#0#2#7'wwx'#136'w'#7
+ +#2#0#0#0#0#0#0#7'p'#7'wwwwppp '#0#0#0#0#7#7#0'"'#15#255#255#255#240'pp" '#240
+ +#0#0#240#0#2'" '#255#255#255#255#2'"""'#15#0#0#15#2'"""'#15#255#255#255#240
+ +'""" '#0#0#0#0'"""""""""'#7'Spacing'#2#8#0#0#7'TBitBtn'#11'NextPageBut'#4'Le'
+ +'ft'#3#148#0#3'Top'#2#4#5'Width'#2'B'#6'Height'#2#25#4'Hint'#6' Advance to N'
+ +'ext Page in Document'#7'Caption'#6#5'&Next'#8'TabOrder'#2#1#7'OnClick'#7#16
+ +'NextPageButClick'#10'Glyph.Data'#10'j'#1#0#0'f'#1#0#0'BMf'#1#0#0#0#0#0#0'v'
+ ,#0#0#0'('#0#0#0#20#0#0#0#20#0#0#0#1#0#4#0#0#0#0#0#240#0#0#0#0#0#0#0#0#0#0#0
+ +#16#0#0#0#16#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0#0#0#128#0
+ +#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0#255#0#0#0#255#255
+ +#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0'3333333333'#0#0'333333333'
+ +'3'#0#0'333'#0'333333'#0#0'333'#14#3'33333'#0#0'333'#14#224'33333'#0#0'333'
+ +#14#238#3'3333'#0#0'333'#14#238#224'3333'#0#0'333'#14#238#238#3'333'#0#0'333'
+ +#14#238#238#224'333'#0#0'333'#14#238#238#238#3'33'#0#0'333'#14#238#238#238#3
+ +'33'#0#0'333'#14#238#238#224'333'#0#0'333'#14#238#238#3'333'#0#0'333'#14#238
+ +#224'3333'#0#0'333'#14#238#3'3333'#0#0'333'#14#224'33333'#0#0'333'#14#3'3333'
+ +'3'#0#0'333'#0'333333'#0#0'3333333333'#0#0'3333333333'#0#0#6'Layout'#7#12'bl'
+ +'GlyphRight'#6'Margin'#2#4#7'Spacing'#2#2#0#0#7'TBitBtn'#11'PrevPageBut'#4'L'
+ +'eft'#2'R'#3'Top'#2#4#5'Width'#2'A'#6'Height'#2#25#4'Hint'#6'!Move to Previo'
+ +'us Page in Document'#7'Caption'#6#5'Pre&v'#7'Enabled'#8#8'TabOrder'#2#2#7'O'
+ +'nClick'#7#16'PrevPageButClick'#10'Glyph.Data'#10'j'#1#0#0'f'#1#0#0'BMf'#1#0
+ +#0#0#0#0#0'v'#0#0#0'('#0#0#0#20#0#0#0#20#0#0#0#1#0#4#0#0#0#0#0#240#0#0#0#0#0
+ +#0#0#0#0#0#0#16#0#0#0#16#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0
+ +#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0#255#0#0
+ +#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0'3333333333'#0#0
+ +'3333333333'#0#0'333330'#3'333'#0#0'33333'#14#3'333'#0#0'33330'#238#3'333'#0
+ +#0'3333'#14#238#3'333'#0#0'3330'#238#238#3'333'#0#0'333'#14#238#238#3'333'#0
+ +#0'330'#238#238#238#3'333'#0#0'33'#14#238#238#238#3'333'#0#0'33'#14#238#238
+ +#238#3'333'#0#0'330'#238#238#238#3'333'#0#0'333'#14#238#238#3'333'#0#0'3330'
+ +#238#238#3'333'#0#0'3333'#14#238#3'333'#0#0'33330'#238#3'333'#0#0'33333'#14#3
+ +'333'#0#0'333330'#3'333'#0#0'3333333333'#0#0'3333333333'#0#0#6'Margin'#2#6#7
+ +'Spacing'#2#2#0#0#7'TBitBtn'#8'CloseBut'#4'Left'#3#148#2#3'Top'#2#4#5'Width'
+ +#2'='#6'Height'#2#25#4'Hint'#6#30'Close the Print Preview window'#6'Cancel'#9
+ +#7'Caption'#6#6'&Close'#8'TabOrder'#2#3#7'OnClick'#7#13'CloseButClick'#10'Gl'
+ +'yph.Data'#10#250#1#0#0#246#1#0#0'BM'#246#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0'0'
+ +#0#0#0#16#0#0#0#1#0#4#0#0#0#0#0#128#1#0#0#0#0#0#0#0#0#0#0#16#0#0#0#16#0#0#0#0
+ +#0#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0#0#0#128#0#128#0#128#128#0#0#192
+ +#192#192#0#128#128#128#0#0#0#255#0#0#255#0#0#0#255#255#0#255#0#0#0#255#0#255
+ +#0#255#255#0#0#255#255#255#0'3'#0#0#0#0#0#3'33'#0#0#0#0#0#3'33'#0#0#0#0#0#3
+ +'33'#6'ffff'#3'33'#15#255#255#255#255#3'33'#7'wwww'#3'33'#6'ffff'#3'33'#15
+ +#255#255#255#255#3'33'#7'wwww'#3'33'#6'ffff'#3'33'#15#255#255#255#255#3'33'#7
+ +'wwww'#3'33'#6'ffff'#3'33'#15#255#255#255#255#3'33'#7'wwww'#3'33'#6'ffff'#3
+ +'33'#15#255#255#255#255#3'33'#7'wwww'#3'33'#6'ffff'#3'33'#15#255#255#255#255
+ +#3'33'#7'wwww'#3'33'#6'fff'#6#3'33'#15#255#255#255#15#3'33'#7'www'#135#3'33'
+ +#6'ffff'#3'33'#15#255#255#255#255#3'33'#7'wwww'#3'33'#6'ffff'#3'33'#15#255
+ +#255#255#255#3'33'#7'wwww'#3'33'#6'o'#255#255'f'#3'33'#15#240#0#0#255#3'33'#7
+ +'x'#136#136'w'#3'33'#6'o'#255#255'f'#3'33'#15#240#0#0#255#3'33'#7'x'#136#136
+ +'w'#3'33'#6'o'#255#255'f'#3'33'#15#240#0#0#255#3'33'#7'x'#136#136'w'#3'33'#6
+ +'ffff'#3'33'#15#255#255#255#255#3'33'#7'wwww'#3'33'#6'ffff'#3'33'#15#255#255
+ +#255#255#3'33'#7'wwww'#3'33'#0#0#0#0#0#3'33'#0#0#0#0#0#3'33'#0#0#0#0#0#3'3'#9
+ +'NumGlyphs'#2#3#0#0#9'TComboBox'#7'ZoomBox'#4'Left'#3#228#0#3'Top'#2#6#5'Wid'
+ +'th'#2'a'#6'Height'#2#21#5'Style'#7#14'csDropDownList'#10'ItemHeight'#2#13#8
+ +'TabOrder'#2#4#8'OnChange'#7#13'ZoomBoxChange'#13'Items.Strings'#1#6#11'Fit '
+ +'To Page'#6#12'Fit To Width'#6#6'Custom'#6#3'25%'#6#3'50%'#6#3'75%'#6#4'100%'
+ +#6#4'125%'#6#4'150%'#6#4'200%'#6#4'300%'#6#4'400%'#0#0#0#9'TComboBox'#8'Unit'
+ +'sBox'#4'Left'#3#175#1#3'Top'#2#6#5'Width'#2'Q'#6'Height'#2#21#5'Style'#7#14
+ +'csDropDownList'#10'ItemHeight'#2#13#8'TabOrder'#2#5#8'OnChange'#7#14'UnitsB'
+ +'oxChange'#13'Items.Strings'#1#6#6'Inches'#6#11'Centimeters'#0#0#0#0#6'TPane'
+ +'l'#12'StatBarPanel'#4'Left'#2#0#3'Top'#3#228#1#5'Width'#3#222#2#6'Height'#2
+ +#27#5'Align'#7#8'alBottom'#10'BevelOuter'#7#6'bvNone'#12'Font.Charset'#7#15
+ +'DEFAULT_CHARSET'#10'Font.Color'#7#7'clBlack'#11'Font.Height'#2#245#9'Font.N'
+ +'ame'#6#5'Arial'#10'Font.Style'#11#0#10'ParentFont'#8#8'TabOrder'#2#1#0#6'TP'
+ +'anel'#12'CurPageLabel'#4'Left'#3#133#0#3'Top'#2#0#5'Width'#2'e'#6'Height'#2
+ +#27#4'Hint'#6')Displays the Current Page of the Document'#5'Align'#7#6'alLef'
+ +'t'#10'BevelOuter'#7#9'bvLowered'#7'Caption'#6#12'CurPageLabel'#8'TabOrder'#2
+ +#0#0#0#6'TPanel'#9'ZoomLabel'#4'Left'#3#234#0#3'Top'#2#0#5'Width'#2'X'#6'Hei'
+ +'ght'#2#27#4'Hint'#6'/Displays the Current Zoom Level (100% = normal)'#5'Ali'
+ +'gn'#7#6'alLeft'#10'BevelOuter'#7#9'bvLowered'#7'Caption'#6#9'ZoomLabel'#8'T'
+ +'abOrder'#2#1#0#0#6'TPanel'#6'Panel1'#4'Left'#3'B'#1#3'Top'#2#0#5'Width'#3
+ +#156#1#6'Height'#2#27#4'Hint'#6'.Displays Help for the object beneath the mo'
+ +'use'#5'Align'#7#8'alClient'#10'BevelOuter'#7#9'bvLowered'#8'TabOrder'#2#2#0
+ ,#6'TLabel'#9'HintLabel'#4'Left'#2#8#3'Top'#2#5#5'Width'#2','#6'Height'#2#14#4
+ +'Hint'#6'.Displays Help for the object beneath the mouse'#7'Caption'#6#9'Hin'
+ +'tLabel'#0#0#0#6'TPanel'#12'MoveButPanel'#4'Left'#2#0#3'Top'#2#0#5'Width'#3
+ +#133#0#6'Height'#2#27#5'Align'#7#6'alLeft'#10'BevelOuter'#7#6'bvNone'#7'Capt'
+ +'ion'#6#12'MoveButPanel'#8'TabOrder'#2#3#0#12'TSpeedButton'#14'FirstPageSpee'
+ +'d'#4'Left'#2#1#3'Top'#2#2#5'Width'#2#25#6'Height'#2#25#4'Hint'#6#28'Go to F'
+ +'irst Page in Document'#12'Font.Charset'#7#15'DEFAULT_CHARSET'#10'Font.Color'
+ +#7#7'clBlack'#11'Font.Height'#2#243#9'Font.Name'#6#15'Times New Roman'#10'Fo'
+ +'nt.Style'#11#0#10'Glyph.Data'#10#250#1#0#0#246#1#0#0'BM'#246#1#0#0#0#0#0#0
+ +'v'#0#0#0'('#0#0#0'0'#0#0#0#16#0#0#0#1#0#4#0#0#0#0#0#128#1#0#0#0#0#0#0#0#0#0
+ +#0#16#0#0#0#16#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0#0#0#128#0
+ +#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0#255#0#0#0#255#255
+ +#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0'3'#0#0'330'#3'33'#0#0'330'
+ +#3'33'#136#136'338'#131'33'#14#224'33'#14#3'33'#15#240'33'#15#3'33'#135'x33'
+ +#135#131'33'#14#224'30'#238#3'33'#15#240'30'#255#3'33'#135'x38w'#131'33'#14
+ +#224'3'#14#238#3'33'#15#240'3'#15#255#3'33'#135'x3'#135'w'#131'33'#14#224'0'
+ +#238#238#3'33'#15#240'0'#255#255#3'33'#135'x8ww'#131'33'#14#224#14#238#238#3
+ +'33'#15#240#15#255#255#3'33'#135'x'#135'ww'#131'33'#14#224#238#238#238#3'33'
+ +#15#240#255#255#255#3'33'#135'xwww'#131'33'#14#238#238#238#238#3'33'#15#255
+ +#255#255#255#3'33'#135'wwww'#131'33'#14#238#238#238#238#3'33'#15#255#255#255
+ +#255#3'33'#135'wwww'#131'33'#14#224#238#238#238#3'33'#15#240#255#255#255#3'3'
+ +'3'#135'xwww'#131'33'#14#224#14#238#238#3'33'#15#240#15#255#255#3'33'#135'x'
+ +#135'ww'#131'33'#14#224'0'#238#238#3'33'#15#240'0'#255#255#3'33'#135'x8ww'
+ +#131'33'#14#224'3'#14#238#3'33'#15#240'3'#15#255#3'33'#135'x3'#135'w'#131'33'
+ +#14#224'30'#238#3'33'#15#240'30'#255#3'33'#135'x38w'#131'33'#14#224'33'#14#3
+ +'33'#15#240'33'#15#3'33'#135'x33'#135#131'33'#0#0'330'#3'33'#0#0'330'#3'33'
+ +#136#136'338'#131'3'#9'NumGlyphs'#2#3#10'ParentFont'#8#14'ParentShowHint'#8#8
+ +'ShowHint'#9#7'OnClick'#7#19'FirstPageSpeedClick'#0#0#12'TSpeedButton'#13'Pr'
+ +'evPageSpeed'#4'Left'#2#26#3'Top'#2#2#5'Width'#2#25#6'Height'#2#25#4'Hint'#6
+ +'!Move to Previous Page in Document'#12'Font.Charset'#7#15'DEFAULT_CHARSET'
+ +#10'Font.Color'#7#7'clBlack'#11'Font.Height'#2#243#9'Font.Name'#6#15'Times N'
+ +'ew Roman'#10'Font.Style'#11#0#10'Glyph.Data'#10#250#1#0#0#246#1#0#0'BM'#246
+ +#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0'0'#0#0#0#16#0#0#0#1#0#4#0#0#0#0#0#128#1#0#0
+ +#0#0#0#0#0#0#0#0#16#0#0#0#16#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128#0
+ +#128#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0
+ +#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0'33333'#0
+ +'3333333'#0'3333333'#136'3333330'#224'3333330'#240'3333338x333333'#14#224'33'
+ +'3333'#15#240'333333'#135'x333330'#238#224'333330'#255#240'333338wx33333'#14
+ +#238#224'33333'#15#255#240'33333'#135'wx33330'#238#238#224'33330'#255#255#240
+ +'33338wwx3333'#14#238#238#224'3333'#15#255#255#240'3333'#135'wwx3330'#238#238
+ +#238#224'3330'#255#255#255#240'3338wwwx3330'#238#238#238#224'3330'#255#255
+ +#255#240'3338wwwx3333'#14#238#238#224'3333'#15#255#255#240'3333'#135'wwx3333'
+ +'0'#238#238#224'33330'#255#255#240'33338wwx33333'#14#238#224'33333'#15#255
+ +#240'33333'#135'wx333330'#238#224'333330'#255#240'333338wx333333'#14#224'333'
+ +'333'#15#240'333333'#135'x3333330'#224'3333330'#240'3333338x3333333'#0'33333'
+ +'33'#0'3333333'#136'33'#9'NumGlyphs'#2#3#10'ParentFont'#8#14'ParentShowHint'
+ +#8#8'ShowHint'#9#7'OnClick'#7#16'PrevPageButClick'#0#0#12'TSpeedButton'#13'N'
+ +'extPageSpeed'#4'Left'#2'3'#3'Top'#2#2#5'Width'#2#25#6'Height'#2#25#4'Hint'#6
+ +' Advance to Next Page in Document'#12'Font.Charset'#7#15'DEFAULT_CHARSET'#10
+ +'Font.Color'#7#7'clBlack'#11'Font.Height'#2#243#9'Font.Name'#6#15'Times New '
+ +'Roman'#10'Font.Style'#11#0#10'Glyph.Data'#10#250#1#0#0#246#1#0#0'BM'#246#1#0
+ +#0#0#0#0#0'v'#0#0#0'('#0#0#0'0'#0#0#0#16#0#0#0#1#0#4#0#0#0#0#0#128#1#0#0#0#0
+ +#0#0#0#0#0#0#16#0#0#0#16#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0
+ +#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0#255#0#0
+ +#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0'33'#0'3333333'#0
+ +'3333333'#136'3333333'#14#3'333333'#15#3'333333'#135#131'333333'#14#224'3333'
+ +'33'#15#240'333333'#135'x333333'#14#238#3'33333'#15#255#3'33333'#135'w'#131
+ +'33333'#14#238#224'33333'#15#255#240'33333'#135'wx33333'#14#238#238#3'3333'
+ +#15#255#255#3'3333'#135'ww'#131'3333'#14#238#238#224'3333'#15#255#255#240'33'
+ +'33'#135'wwx3333'#14#238#238#238#3'333'#15#255#255#255#3'333'#135'www'#131'3'
+ +'33'#14#238#238#238#3'333'#15#255#255#255#3'333'#135'www'#131'333'#14#238#238
+ +#224'3333'#15#255#255#240'3333'#135'wwx3333'#14#238#238#3'3333'#15#255#255#3
+ +'3333'#135'ww'#131'3333'#14#238#224'33333'#15#255#240'33333'#135'wx33333'#14
+ +#238#3'33333'#15#255#3'33333'#135'w'#131'33333'#14#224'333333'#15#240'333333'
+ ,#135'x333333'#14#3'333333'#15#3'333333'#135#131'333333'#0'3333333'#0'3333333'
+ +#136'33333'#9'NumGlyphs'#2#3#10'ParentFont'#8#14'ParentShowHint'#8#8'ShowHin'
+ +'t'#9#7'OnClick'#7#16'NextPageButClick'#0#0#12'TSpeedButton'#13'LastPageSpee'
+ +'d'#4'Left'#2'L'#3'Top'#2#2#5'Width'#2#25#6'Height'#2#25#4'Hint'#6#27'Go to '
+ +'Last Page in Document'#12'Font.Charset'#7#15'DEFAULT_CHARSET'#10'Font.Color'
+ +#7#7'clBlack'#11'Font.Height'#2#243#9'Font.Name'#6#15'Times New Roman'#10'Fo'
+ +'nt.Style'#11#0#10'Glyph.Data'#10#250#1#0#0#246#1#0#0'BM'#246#1#0#0#0#0#0#0
+ +'v'#0#0#0'('#0#0#0'0'#0#0#0#16#0#0#0#1#0#4#0#0#0#0#0#128#1#0#0#0#0#0#0#0#0#0
+ +#0#16#0#0#0#16#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0#0#0#128#0
+ +#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0#255#0#0#0#255#255
+ +#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0'30'#3'33'#0#0'330'#3'33'#0
+ +#0'338'#131'33'#136#136'330'#224'33'#14#224'330'#240'33'#15#240'338x33'#135
+ +'x330'#238#3'3'#14#224'330'#255#3'3'#15#240'338w'#131'3'#135'x330'#238#224'3'
+ +#14#224'330'#255#240'3'#15#240'338wx3'#135'x330'#238#238#3#14#224'330'#255
+ +#255#3#15#240'338ww'#131#135'x330'#238#238#224#14#224'330'#255#255#240#15#240
+ +'338wwx'#135'x330'#238#238#238#14#224'330'#255#255#255#15#240'338www'#135'x3'
+ +'30'#238#238#238#238#224'330'#255#255#255#255#240'338wwwwx330'#238#238#238
+ +#238#224'330'#255#255#255#255#240'338wwwwx330'#238#238#238#14#224'330'#255
+ +#255#255#15#240'338www'#135'x330'#238#238#224#14#224'330'#255#255#240#15#240
+ +'338wwx'#135'x330'#238#238#3#14#224'330'#255#255#3#15#240'338ww'#131#135'x33'
+ +'0'#238#224'3'#14#224'330'#255#240'3'#15#240'338wx3'#135'x330'#238#3'3'#14
+ +#224'330'#255#3'3'#15#240'338w'#131'3'#135'x330'#224'33'#14#224'330'#240'33'
+ +#15#240'338x33'#135'x330'#3'33'#0#0'330'#3'33'#0#0'338'#131'33'#136#136'3'#9
+ +'NumGlyphs'#2#3#10'ParentFont'#8#14'ParentShowHint'#8#8'ShowHint'#9#7'OnClic'
+ +'k'#7#18'LastPageSpeedClick'#0#0#12'TSpeedButton'#12'PageNumSpeed'#4'Left'#2
+ +'e'#3'Top'#2#2#5'Width'#2#25#6'Height'#2#25#4'Hint'#6#25'Go to Page by Page '
+ +'Number'#12'Font.Charset'#7#15'DEFAULT_CHARSET'#10'Font.Color'#7#7'clBlack'
+ +#11'Font.Height'#2#243#9'Font.Name'#6#15'Times New Roman'#10'Font.Style'#11#0
+ +#10'Glyph.Data'#10'z'#1#0#0'v'#1#0#0'BMv'#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0' '
+ +#0#0#0#16#0#0#0#1#0#4#0#0#0#0#0#0#1#0#0#0#0#0#0#0#0#0#0#16#0#0#0#16#0#0#0#0#0
+ +#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0#0#0#128#0#128#0#128#128#0#0#127
+ +#127#127#0#191#191#191#0#0#0#255#0#0#255#0#0#0#255#255#0#255#0#0#0#255#0#255
+ +#0#255#255#0#0#255#255#255#0'0'#0#0#0#0#0#0'37wwwwww'#243'0'#255#255#255#255
+ +#255#240'37'#243'?3?37'#243'0'#255#15#255#15#255#240'37'#243#127'3'#127'37'
+ +#243'0'#255#15#255#15#255#240'37'#243#127#255#127#255'7'#243'0'#240#0#0#0#15
+ +#240'37'#247'wwws7'#243'0'#255#240#255#240#255#240'37'#243'7'#243'7'#243'7'
+ +#243'0'#255#240#255#240#255#240'37'#243'7'#255#247#255#247#243'0'#255#0#0#0#0
+ +#240'37'#243'wwww7'#243'0'#255#255#15#255#15#240'37'#243'3'#127'3'#127'7'#243
+ +'0'#255#255#15#255#15#240'37'#243'3s3s7'#243'0'#255#255#255#255#255#240'37'
+ +#243'333?'#247#243'0'#255#255#255#255#0#0'37'#243'333ww'#243'0'#255#255#255
+ +#255#15#240'37'#255#255#255#255#127'730'#153#153#153#153#15#3'37wwww'#127's3'
+ +'0'#255#255#255#255#0'337'#255#255#255#255'w330'#0#0#0#0#3'337wwwws33'#9'Num'
+ +'Glyphs'#2#2#10'ParentFont'#8#14'ParentShowHint'#8#8'ShowHint'#9#7'OnClick'#7
+ +#17'PageNumSpeedClick'#0#0#0#0#10'TScrollBox'#10'ScrollBox1'#4'Left'#2#0#3'T'
+ +'op'#2'#'#5'Width'#3#222#2#6'Height'#3#193#1#5'Align'#7#8'alClient'#11'Borde'
+ +'rStyle'#7#6'bsNone'#5'Color'#7#9'clBtnFace'#11'ParentColor'#8#8'TabOrder'#2
+ +#2#8'OnResize'#7#16'ScrollBox1Resize'#0#6'TPanel'#12'ContainPanel'#4'Left'#2
+ +#0#3'Top'#2#0#5'Width'#3#233#1#6'Height'#3'I'#1#10'BevelOuter'#7#6'bvNone'#5
+ +'Color'#7#11'clBtnShadow'#8'TabOrder'#2#0#0#6'TPanel'#9'PagePanel'#4'Left'#2
+ +','#3'Top'#2' '#5'Width'#3#209#0#6'Height'#3#9#1#10'BevelOuter'#7#6'bvNone'#5
+ +'Color'#7#8'clWindow'#8'TabOrder'#2#0#0#9'TPaintBox'#3'PB1'#4'Left'#2#0#3'To'
+ +'p'#2#0#5'Width'#3#209#0#6'Height'#3#9#1#4'Hint'#6'ePage View. With Zoom To'
+ +'ol, left or right click to zoom in/out. Click && drag with Hand Tool to pa'
+ +'n.'#5'Align'#7#8'alClient'#11'OnMouseDown'#7#12'PB1MouseDown'#11'OnMouseMov'
+ +'e'#7#12'PB1MouseMove'#9'OnMouseUp'#7#10'PB1MouseUp'#7'OnPaint'#7#7'PBPaint'
+ +#0#0#0#6'TPanel'#10'PagePanel2'#4'Left'#3#4#1#3'Top'#2' '#5'Width'#3#209#0#6
+ +'Height'#3#9#1#10'BevelOuter'#7#6'bvNone'#5'Color'#7#8'clWindow'#8'TabOrder'
+ +#2#1#7'Visible'#8#0#9'TPaintBox'#3'PB2'#4'Left'#2#0#3'Top'#2#0#5'Width'#3#209
+ +#0#6'Height'#3#9#1#4'Hint'#6'ePage View. With Zoom Tool, left or right clic'
+ +'k to zoom in/out. Click && drag with Hand Tool to pan.'#5'Align'#7#8'alCli'
+ +'ent'#7'OnPaint'#7#7'PBPaint'#0#0#0#0#0#12'TPrintDialog'#12'PrintDialog1'#8
+ +'FromPage'#2#1#7'MinPage'#2#1#7'Options'#11#13'poPrintToFile'#10'poPageNums'
+ +#0#4'Left'#3#26#2#3'Top'#2'Z'#0#0#0
+]);
diff --git a/applications/fpbrowser/previewform.pas b/applications/fpbrowser/previewform.pas
new file mode 100644
index 000000000..1f6517796
--- /dev/null
+++ b/applications/fpbrowser/previewform.pas
@@ -0,0 +1,542 @@
+{*************************************************************}
+{* *}
+{* Thanks to Chris Wallace for most of the ideas and *}
+{* code associated with Print Preview and the Preview Form *}
+{* *}
+{*************************************************************}
+
+{$ifDef ver150} {Delphi 7}
+{$Define Delphi7_Plus}
+{$endif}
+{$ifDef ver170} {Delphi 2005}
+{$Define Delphi7_Plus}
+{$endif}
+{$ifDef ver180} {Delphi 2006}
+{$Define Delphi7_Plus} {9.4}
+{$endif}
+
+unit PreviewForm;
+
+interface
+
+uses
+ {$IFNDEF LCL} Windows, Messages, {$ELSE} LclIntf, LMessages, LclType, LResources, {$ENDIF}
+ SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, ExtCtrls, Buttons, MetaFilePrinter, HTMLView, PrintStatusForm;
+
+const
+ crZoom = 40;
+ crHandDrag = 41;
+ ZOOMFACTOR = 1.5;
+
+type
+ TPreviewForm = class(TForm)
+ ToolBarPanel: TPanel;
+ GridBut: TSpeedButton;
+ ZoomCursorBut: TSpeedButton;
+ HandCursorBut: TSpeedButton;
+ OnePageBut: TSpeedButton;
+ TwoPageBut: TSpeedButton;
+ PrintBut: TBitBtn;
+ NextPageBut: TBitBtn;
+ PrevPageBut: TBitBtn;
+ CloseBut: TBitBtn;
+ ZoomBox: TComboBox;
+ StatBarPanel: TPanel;
+ CurPageLabel: TPanel;
+ ZoomLabel: TPanel;
+ Panel1: TPanel;
+ HintLabel: TLabel;
+ MoveButPanel: TPanel;
+ FirstPageSpeed: TSpeedButton;
+ PrevPageSpeed: TSpeedButton;
+ NextPageSpeed: TSpeedButton;
+ LastPageSpeed: TSpeedButton;
+ PageNumSpeed: TSpeedButton;
+ ScrollBox1: TScrollBox;
+ ContainPanel: TPanel;
+ PagePanel: TPanel;
+ PB1: TPaintBox;
+ PagePanel2: TPanel;
+ PB2: TPaintBox;
+ PrintDialog1: TPrintDialog;
+ FitPageBut: TSpeedButton;
+ FitWidthBut: TSpeedButton;
+ Bevel1: TBevel;
+ Bevel2: TBevel;
+ Bevel3: TBevel;
+ Bevel4: TBevel;
+ Bevel5: TBevel;
+ Bevel6: TBevel;
+ UnitsBox: TComboBox;
+ Bevel7: TBevel;
+ procedure CloseButClick(Sender: TObject);
+ procedure FormClose(Sender: TObject; var Action: TCloseAction);
+ procedure ScrollBox1Resize(Sender: TObject);
+ procedure PBPaint(Sender: TObject);
+ procedure GridButClick(Sender: TObject);
+ procedure FormShow(Sender: TObject);
+ procedure ZoomBoxChange(Sender: TObject);
+ procedure TwoPageButClick(Sender: TObject);
+ procedure NextPageButClick(Sender: TObject);
+ procedure PrevPageButClick(Sender: TObject);
+ procedure FirstPageSpeedClick(Sender: TObject);
+ procedure LastPageSpeedClick(Sender: TObject);
+ procedure ZoomCursorButClick(Sender: TObject);
+ procedure HandCursorButClick(Sender: TObject);
+ procedure PB1MouseDown(Sender: TObject; Button: TMouseButton;
+ Shift: TShiftState; X, Y: Integer);
+ procedure PB1MouseMove(Sender: TObject; Shift: TShiftState; X,
+ Y: Integer);
+ procedure PB1MouseUp(Sender: TObject; Button: TMouseButton;
+ Shift: TShiftState; X, Y: Integer);
+ procedure PrintButClick(Sender: TObject);
+ procedure PageNumSpeedClick(Sender: TObject);
+ procedure OnePageButMouseUp(Sender: TObject; Button: TMouseButton;
+ Shift: TShiftState; X, Y: Integer);
+ procedure FitPageButClick(Sender: TObject);
+ procedure FitWidthButClick(Sender: TObject);
+ procedure UnitsBoxChange(Sender: TObject);
+ private
+ Viewer: ThtmlViewer;
+ protected
+ FCurPage : integer;
+ OldHint : TNotifyEvent;
+ DownX, DownY : integer;
+ Moving : boolean;
+ MFPrinter : TMetaFilePrinter;
+ procedure DrawMetaFile(PB: TPaintBox; mf: TMetaFile);
+ procedure OnHint(Sender: TObject);
+ procedure SetCurPage(Val: integer);
+ procedure CheckEnable;
+ property CurPage: integer read FCurPage write SetCurPage;
+ public
+ Zoom : double;
+ constructor CreateIt(AOwner: TComponent; AViewer: ThtmlViewer; var Abort: boolean);
+ destructor Destroy; override;
+ end;
+
+
+implementation
+
+uses
+ Gopage;
+
+{$IFNDEF LCL}
+{$R *.DFM}
+{$ENDIF}
+{$R GRID.RES}
+
+constructor TPreviewForm.CreateIt(AOwner: TComponent; AViewer: ThtmlViewer;
+ var Abort: boolean);
+var
+ StatusForm: TPrnStatusForm;
+begin
+inherited Create(AOwner);
+ ZoomBox.ItemIndex := 0;
+ UnitsBox.ItemIndex := 0;
+ Screen.Cursors[crZoom] := LoadCursor(hInstance, 'ZOOM_CURSOR');
+ Screen.Cursors[crHandDrag] := LoadCursor(hInstance, 'HAND_CURSOR');
+ ZoomCursorButClick(nil);
+Viewer := AViewer;
+MFPrinter := TMetaFilePrinter.Create(Self);
+StatusForm := TPrnStatusForm.Create(Self);
+try
+ StatusForm.DoPreview(Viewer, MFPrinter, Abort);
+finally
+ StatusForm.Free;
+ end;
+end;
+
+destructor TPreviewForm.Destroy;
+begin
+inherited;
+end;
+
+procedure TPreviewForm.CloseButClick(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TPreviewForm.FormClose(Sender: TObject;
+ var Action: TCloseAction);
+begin
+ Action := caFree;
+ Application.OnHint := OldHint;
+ MFPrinter.Free;
+end;
+
+procedure TPreviewForm.ScrollBox1Resize(Sender: TObject);
+const
+ BORD = 20;
+var
+ z : double;
+ tmp : integer;
+ TotWid : integer;
+begin
+ case ZoomBox.ItemIndex of
+ 0 : FitPageBut.Down := True;
+ 1 : FitWidthBut.Down := True;
+ else
+ begin
+ FitPageBut.Down := False;
+ FitWidthBut.Down := False;
+ end;
+ end;
+
+ if ZoomBox.ItemIndex = -1 then
+ ZoomBox.ItemIndex := 0;
+
+ Case ZoomBox.ItemIndex of
+ 0: z := ((ScrollBox1.ClientHeight - BORD) / PixelsPerInch) /
+ (MFPrinter.PaperHeight / MFPrinter.PixelsPerInchY);
+ 1: z := ((ScrollBox1.ClientWidth - BORD) / PixelsPerInch) /
+ (MFPrinter.PaperWidth / MFPrinter.PixelsPerInchX);
+ 2: z := Zoom;
+ 3: z := 0.25;
+ 4: z := 0.50;
+ 5: z := 0.75;
+ 6: z := 1.00;
+ 7: z := 1.25;
+ 8: z := 1.50;
+ 9: z := 2.00;
+ 10: z := 3.00;
+ 11: z := 4.00;
+ else
+ z := 1;
+ end;
+
+ if ZoomBox.ItemIndex<>0 then OnePageBut.Down := True;
+
+ PagePanel.Height := TRUNC(PixelsPerInch * z * MFPrinter.PaperHeight / MFPrinter.PixelsPerInchY);
+ PagePanel.Width := TRUNC(PixelsPerInch * z * MFPrinter.PaperWidth / MFPrinter.PixelsPerInchX);
+
+ PagePanel2.Visible := TwoPageBut.Down;
+ if TwoPageBut.Down then
+ begin
+ PagePanel2.Width := PagePanel.Width;
+ PagePanel2.Height := PagePanel.Height;
+ end;
+
+ TotWid := PagePanel.Width + BORD;
+ if TwoPageBut.Down then
+ TotWid := TotWid + PagePanel2.Width + BORD;
+
+ // Resize the Contain Panel
+ tmp := PagePanel.Height + BORD;
+ if tmp < ScrollBox1.ClientHeight then
+ tmp := ScrollBox1.ClientHeight-1;
+ ContainPanel.Height := tmp;
+
+ tmp := TotWid;
+ if tmp < ScrollBox1.ClientWidth then
+ tmp := ScrollBox1.ClientWidth-1;
+ ContainPanel.Width := tmp;
+
+ // Center the Page Panel
+ if PagePanel.Height + BORD < ContainPanel.Height then
+ PagePanel.Top := ContainPanel.Height div 2 - PagePanel.Height div 2
+ else
+ PagePanel.Top := BORD div 2;
+ PagePanel2.Top := PagePanel.Top;
+
+ if TotWid < ContainPanel.Width then
+ PagePanel.Left := ContainPanel.Width div 2 - (TotWid - BORD) div 2
+ else
+ PagePanel.Left := BORD div 2;
+ PagePanel2.Left := PagePanel.Left + PagePanel.Width + BORD;
+
+ {Make sure the scroll bars are hidden if not needed}
+ if (PagePanel.Width +BORD <= ScrollBox1.Width) and
+ (PagePanel.Height +BORD <= ScrollBox1.Height) then
+ begin
+ ScrollBox1.HorzScrollBar.Visible := False;
+ ScrollBox1.VertScrollBar.Visible := False;
+ end
+ else
+ begin
+ ScrollBox1.HorzScrollBar.Visible := True;
+ ScrollBox1.VertScrollBar.Visible := True;
+ end;
+
+ // Set the Zoom Variable
+ Zoom := z;
+ ZoomLabel.Caption := Format('%1.0n', [z * 100]) + '%';
+end;
+
+procedure TPreviewForm.DrawMetaFile(PB: TPaintBox; mf: TMetaFile);
+begin
+ PB.Canvas.Draw(0, 0, mf);
+end;
+
+procedure TPreviewForm.PBPaint(Sender: TObject);
+var
+ PB : TPaintBox;
+ x1, y1 : integer;
+ x, y : integer;
+ Factor : double;
+ Draw : boolean;
+ Page : integer;
+begin
+ PB := Sender as TPaintBox;
+
+ if PB = PB1 then
+ begin
+ Draw := CurPage < MFPrinter.LastAvailablePage;
+ Page := CurPage;
+ end
+ else
+ begin
+ // PB2
+ Draw := TwoPageBut.Down and (CurPage+1 < MFPrinter.LastAvailablePage);
+ Page := CurPage + 1;
+ end;
+
+ SetMapMode(PB.Canvas.Handle, MM_ANISOTROPIC);
+ SetWindowExtEx(PB.Canvas.Handle, MFPrinter.PaperWidth, MFPrinter.PaperHeight, nil);
+ SetViewportExtEx(PB.Canvas.Handle, PB.Width, PB.Height, nil);
+ SetWindowOrgEx(PB.Canvas.Handle, -MFPrinter.OffsetX, -MFPrinter.OffsetY, nil);
+ if Draw then
+ DrawMetaFile(PB, MFPrinter.MetaFiles[Page]);
+
+ if GridBut.Down then
+ begin
+ SetWindowOrgEx(PB.Canvas.Handle, 0, 0, nil);
+ PB.Canvas.Pen.Color := clLtGray;
+ if UnitsBox.ItemIndex = 0 then
+ Factor := 1.0
+ else Factor := 2.54;
+
+ for x := 1 to Round(MFPrinter.PaperWidth / MFPrinter.PixelsPerInchX * Factor) do
+ begin
+ x1 := Round(MFPrinter.PixelsPerInchX * x / Factor);
+ PB.Canvas.MoveTo(x1, 0);
+ PB.Canvas.LineTo(x1, MFPrinter.PaperHeight);
+ end;
+
+ for y := 1 to Round(MFPrinter.PaperHeight / MFPrinter.PixelsPerInchY * Factor) do
+ begin
+ y1 := Round(MFPrinter.PixelsPerInchY * y / Factor);
+ PB.Canvas.MoveTo(0, y1);
+ PB.Canvas.LineTo(MFPrinter.PaperWidth, y1);
+ end;
+ end;
+end;
+
+procedure TPreviewForm.GridButClick(Sender: TObject);
+begin
+ PB1.Invalidate;
+ PB2.Invalidate;
+end;
+
+procedure TPreviewForm.OnHint(Sender: TObject);
+begin
+ HintLabel.Caption := Application.Hint;
+end;
+
+
+procedure TPreviewForm.FormShow(Sender: TObject);
+begin
+ CurPage := 0;
+ OldHint := Application.OnHint;
+ Application.OnHint := OnHint;
+ CheckEnable;
+ {$ifdef delphi7_plus}
+ PagePanel.ParentBackground := False;
+ PagePanel2.ParentBackground := False;
+ {$endif}
+ ScrollBox1Resize(Nil); {make sure it gets sized}
+end;
+
+procedure TPreviewForm.SetCurPage(Val: integer);
+var
+ tmp : integer;
+begin
+ FCurPage := Val;
+ tmp := 0;
+ if MFPrinter <> nil then
+ tmp := MFPrinter.LastAvailablePage;
+ CurPageLabel.Caption := Format('Page %d of %d', [Val+1, tmp]);
+ PB1.Invalidate;
+ PB2.Invalidate;
+end;
+
+procedure TPreviewForm.ZoomBoxChange(Sender: TObject);
+begin
+ ScrollBox1Resize(nil);
+ ScrollBox1Resize(nil);
+end;
+
+procedure TPreviewForm.TwoPageButClick(Sender: TObject);
+begin
+ ZoomBox.ItemIndex := 0;
+ ScrollBox1Resize(nil);
+end;
+
+procedure TPreviewForm.NextPageButClick(Sender: TObject);
+begin
+ CurPage := CurPage + 1;
+ CheckEnable;
+end;
+
+procedure TPreviewForm.PrevPageButClick(Sender: TObject);
+begin
+ CurPage := CurPage - 1;
+ CheckEnable;
+end;
+
+procedure TPreviewForm.CheckEnable;
+begin
+ NextPageBut.Enabled := CurPage+1 < MFPrinter.LastAvailablePage;
+ PrevPageBut.Enabled := CurPage > 0;
+
+ NextPageSpeed.Enabled := NextPageBut.Enabled;
+ PrevPageSpeed.Enabled := PrevPageBut.Enabled;
+
+ FirstPageSpeed.Enabled := PrevPageBut.Enabled;
+ LastPageSPeed.Enabled := NextPageBut.Enabled;
+
+ PageNumSpeed.Enabled := MFPrinter.LastAvailablePage > 1;
+end;
+
+
+procedure TPreviewForm.FirstPageSpeedClick(Sender: TObject);
+begin
+ CurPage := 0;
+ CheckEnable;
+end;
+
+procedure TPreviewForm.LastPageSpeedClick(Sender: TObject);
+begin
+ CurPage := MFPrinter.LastAvailablePage-1;
+ CheckEnable;
+end;
+
+procedure TPreviewForm.ZoomCursorButClick(Sender: TObject);
+begin
+ PB1.Cursor := crZoom;
+ PB2.Cursor := crZoom;
+end;
+
+procedure TPreviewForm.HandCursorButClick(Sender: TObject);
+begin
+ PB1.Cursor := crHandDrag;
+ PB2.Cursor := crHandDrag;
+end;
+
+procedure TPreviewForm.PB1MouseDown(Sender: TObject; Button: TMouseButton;
+ Shift: TShiftState; X, Y: Integer);
+var
+ sx, sy : single;
+ nx, ny : integer;
+begin
+ if ZoomCursorBut.Down then
+ begin
+ sx := X / PagePanel.Width;
+ sy := Y / PagePanel.Height;
+
+ if (ssLeft in Shift) and (Zoom < 20.0) then Zoom := Zoom * ZOOMFACTOR;
+ if (ssRight in Shift) and (Zoom > 0.1) then Zoom := Zoom / ZOOMFACTOR;
+ ZoomBox.ItemIndex := 2;
+ ScrollBox1Resize(nil);
+
+ nx := TRUNC(sx * PagePanel.Width);
+ ny := TRUNC(sy * PagePanel.Height);
+ ScrollBox1.HorzScrollBar.Position := nx - ScrollBox1.Width div 2;
+ ScrollBox1.VertScrollBar.Position := ny - ScrollBox1.Height div 2;
+ end;
+
+ if HandCursorBut.Down then
+ begin
+ DownX := X;
+ DownY := Y;
+ Moving := True;
+ end;
+end;
+
+procedure TPreviewForm.PB1MouseMove(Sender: TObject; Shift: TShiftState; X,
+ Y: Integer);
+begin
+ if Moving then
+ begin
+ ScrollBox1.HorzScrollBar.Position := ScrollBox1.HorzScrollBar.Position + (DownX - X);
+ ScrollBox1.VertScrollBar.Position := ScrollBox1.VertScrollBar.Position + (DownY - Y);
+ end;
+end;
+
+procedure TPreviewForm.PB1MouseUp(Sender: TObject; Button: TMouseButton;
+ Shift: TShiftState; X, Y: Integer);
+begin
+ Moving := False;
+end;
+
+procedure TPreviewForm.PrintButClick(Sender: TObject);
+var
+ StatusForm: TPrnStatusForm;
+ Dummy: boolean;
+begin
+with PrintDialog1 do
+ begin
+ MaxPage := 9999;
+ ToPage := 1;
+ Options := [poPageNums];
+ StatusForm := TPrnStatusForm.Create(Self);
+ if Execute then
+ if PrintRange = prAllPages then
+ StatusForm.DoPrint(Viewer, FromPage, 9999, Dummy)
+ else
+ StatusForm.DoPrint(Viewer, FromPage, ToPage, Dummy);
+ StatusForm.Free;
+ end;
+end;
+
+procedure TPreviewForm.PageNumSpeedClick(Sender: TObject);
+var
+ gp : TGoPageForm;
+begin
+ gp := TGoPageForm.Create(Self);
+ gp.PageNum.MaxValue := MFPrinter.LastAvailablePage;
+ gp.PageNum.Value := CurPage + 1;
+
+ if gp.ShowModal = mrOK then
+ begin
+ CurPage := gp.PageNum.Value - 1;
+ CheckEnable;
+ end;
+ gp.Free;
+end;
+
+procedure TPreviewForm.OnePageButMouseUp(Sender: TObject;
+ Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+begin
+ ZoomBox.ItemIndex := 0;
+ ScrollBox1Resize(nil);
+end;
+
+procedure TPreviewForm.FitPageButClick(Sender: TObject);
+begin
+ ZoomBox.ItemIndex := 0;
+ ZoomBoxChange(nil);
+end;
+
+procedure TPreviewForm.FitWidthButClick(Sender: TObject);
+begin
+ ZoomBox.ItemIndex := 1;
+ ZoomBoxChange(nil);
+end;
+
+procedure TPreviewForm.UnitsBoxChange(Sender: TObject);
+begin
+if GridBut.down then
+ begin
+ PB1.Invalidate;
+ PB2.Invalidate;
+ end;
+end;
+
+initialization
+{$IFDEF LCL}
+{$I PreviewForm.lrs} {Include form's resource file}
+{$ENDIF}
+
+end.
diff --git a/applications/fpbrowser/printstatusform.dfm b/applications/fpbrowser/printstatusform.dfm
new file mode 100644
index 000000000..8f60d7241
--- /dev/null
+++ b/applications/fpbrowser/printstatusform.dfm
@@ -0,0 +1,60 @@
+object PrnStatusForm: TPrnStatusForm
+ Left = 731
+ Top = 443
+ AutoScroll = False
+ Caption = 'PrnStatusForm'
+ ClientHeight = 96
+ ClientWidth = 247
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = True
+ PixelsPerInch = 96
+ TextHeight = 13
+ object StatusLabel: TLabel
+ Left = 13
+ Top = 24
+ Width = 222
+ Height = 13
+ Alignment = taCenter
+ AutoSize = False
+ Caption = 'Status'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ ParentFont = False
+ end
+ object CancelButton: TBitBtn
+ Left = 88
+ Top = 56
+ Width = 75
+ Height = 25
+ Cancel = True
+ Caption = 'Cancel'
+ TabOrder = 0
+ OnClick = CancelButtonClick
+ Glyph.Data = {
+ DE010000424DDE01000000000000760000002800000024000000120000000100
+ 0400000000006801000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
+ 333333333333333333333333000033338833333333333333333F333333333333
+ 0000333911833333983333333388F333333F3333000033391118333911833333
+ 38F38F333F88F33300003339111183911118333338F338F3F8338F3300003333
+ 911118111118333338F3338F833338F3000033333911111111833333338F3338
+ 3333F8330000333333911111183333333338F333333F83330000333333311111
+ 8333333333338F3333383333000033333339111183333333333338F333833333
+ 00003333339111118333333333333833338F3333000033333911181118333333
+ 33338333338F333300003333911183911183333333383338F338F33300003333
+ 9118333911183333338F33838F338F33000033333913333391113333338FF833
+ 38F338F300003333333333333919333333388333338FFF830000333333333333
+ 3333333333333333333888330000333333333333333333333333333333333333
+ 0000}
+ NumGlyphs = 2
+ end
+end
diff --git a/applications/fpbrowser/printstatusform.lfm b/applications/fpbrowser/printstatusform.lfm
new file mode 100644
index 000000000..600ed6c16
--- /dev/null
+++ b/applications/fpbrowser/printstatusform.lfm
@@ -0,0 +1,60 @@
+object PrnStatusForm: TPrnStatusForm
+ Left = 731
+ Top = 443
+ AutoScroll = False
+ Caption = 'PrnStatusForm'
+ ClientHeight = 96
+ Height = 96
+ ClientWidth = 247
+ Width = 247
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Arial'
+ Font.Style = []
+ PixelsPerInch = 96
+ object StatusLabel: TLabel
+ Left = 13
+ Top = 24
+ Width = 222
+ Height = 13
+ Alignment = taCenter
+ AutoSize = False
+ Caption = 'Status'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ ParentFont = False
+ end
+ object CancelButton: TBitBtn
+ Left = 88
+ Top = 56
+ Width = 75
+ Height = 25
+ Cancel = True
+ Caption = 'Cancel'
+ TabOrder = 0
+ OnClick = CancelButtonClick
+ Glyph.Data = {
+ DE010000424DDE01000000000000760000002800000024000000120000000100
+ 0400000000006801000000000000000000001000000010000000000000000000
+ 80000080000000808000800000008000800080800000C0C0C000808080000000
+ FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
+ 333333333333333333333333000033338833333333333333333F333333333333
+ 0000333911833333983333333388F333333F3333000033391118333911833333
+ 38F38F333F88F33300003339111183911118333338F338F3F8338F3300003333
+ 911118111118333338F3338F833338F3000033333911111111833333338F3338
+ 3333F8330000333333911111183333333338F333333F83330000333333311111
+ 8333333333338F3333383333000033333339111183333333333338F333833333
+ 00003333339111118333333333333833338F3333000033333911181118333333
+ 33338333338F333300003333911183911183333333383338F338F33300003333
+ 9118333911183333338F33838F338F33000033333913333391113333338FF833
+ 38F338F300003333333333333919333333388333338FFF830000333333333333
+ 3333333333333333333888330000333333333333333333333333333333333333
+ 0000}
+ NumGlyphs = 2
+ end
+end
diff --git a/applications/fpbrowser/printstatusform.lrs b/applications/fpbrowser/printstatusform.lrs
new file mode 100644
index 000000000..aff192ae3
--- /dev/null
+++ b/applications/fpbrowser/printstatusform.lrs
@@ -0,0 +1,29 @@
+LazarusResources.Add('TPrnStatusForm','FORMDATA',[
+ 'TPF0'#14'TPrnStatusForm'#13'PrnStatusForm'#4'Left'#3#219#2#3'Top'#3#187#1#10
+ +'AutoScroll'#8#7'Caption'#6#13'PrnStatusForm'#12'ClientHeight'#2'`'#6'Height'
+ +#2'`'#11'ClientWidth'#3#247#0#5'Width'#3#247#0#5'Color'#7#9'clBtnFace'#12'Fo'
+ +'nt.Charset'#7#15'DEFAULT_CHARSET'#10'Font.Color'#7#12'clWindowText'#11'Font'
+ +'.Height'#2#245#9'Font.Name'#6#5'Arial'#10'Font.Style'#11#0#13'PixelsPerInch'
+ +#2'`'#0#6'TLabel'#11'StatusLabel'#4'Left'#2#13#3'Top'#2#24#5'Width'#3#222#0#6
+ +'Height'#2#13#9'Alignment'#7#8'taCenter'#8'AutoSize'#8#7'Caption'#6#6'Status'
+ +#12'Font.Charset'#7#15'DEFAULT_CHARSET'#10'Font.Color'#7#12'clWindowText'#11
+ +'Font.Height'#2#245#9'Font.Name'#6#6'Tahoma'#10'Font.Style'#11#0#10'ParentFo'
+ +'nt'#8#0#0#7'TBitBtn'#12'CancelButton'#4'Left'#2'X'#3'Top'#2'8'#5'Width'#2'K'
+ +#6'Height'#2#25#6'Cancel'#9#7'Caption'#6#6'Cancel'#8'TabOrder'#2#0#7'OnClick'
+ +#7#17'CancelButtonClick'#10'Glyph.Data'#10#226#1#0#0#222#1#0#0'BM'#222#1#0#0
+ +#0#0#0#0'v'#0#0#0'('#0#0#0'$'#0#0#0#18#0#0#0#1#0#4#0#0#0#0#0'h'#1#0#0#0#0#0#0
+ +#0#0#0#0#16#0#0#0#16#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0#0#0
+ +#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#255#0#0#255#0#0#0
+ +#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0'33333333333333333'
+ +'3'#0#0'33'#136'33333333?333333'#0#0'39'#17#131'33'#152'3333'#136#243'33?33'
+ +#0#0'39'#17#24'39'#17#131'338'#243#143'3?'#136#243'3'#0#0'39'#17#17#131#145
+ +#17#24'338'#243'8'#243#248'3'#143'3'#0#0'33'#145#17#24#17#17#24'338'#243'3'
+ +#143#131'38'#243#0#0'339'#17#17#17#17#131'333'#143'3833'#248'3'#0#0'333'#145
+ +#17#17#24'33338'#243'33?'#131'3'#0#0'3331'#17#17#131'33333'#143'33833'#0#0'3'
+ +'339'#17#17#131'333338'#243'3'#131'33'#0#0'333'#145#17#17#131'33333833'#143
+ +'33'#0#0'339'#17#24#17#24'33333'#131'33'#143'33'#0#0'33'#145#17#131#145#17
+ +#131'333838'#243'8'#243'3'#0#0'33'#145#24'39'#17#24'333'#143'3'#131#143'3'
+ +#143'3'#0#0'339'#19'33'#145#17'333'#143#248'38'#243'8'#243#0#0'3333339'#25'3'
+ +'338'#131'33'#143#255#131#0#0'3333333333333338'#136'3'#0#0'33333333333333333'
+ +'3'#0#0#9'NumGlyphs'#2#2#0#0#0
+]);
diff --git a/applications/fpbrowser/printstatusform.pas b/applications/fpbrowser/printstatusform.pas
new file mode 100644
index 000000000..bdd77a0af
--- /dev/null
+++ b/applications/fpbrowser/printstatusform.pas
@@ -0,0 +1,101 @@
+unit PrintStatusForm;
+
+interface
+
+uses
+ {$IFNDEF LCL} Windows, Messages, {$ELSE} LclIntf, LMessages, LclType, LResources, {$ENDIF}
+ SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, Buttons, HTMLView {$IFNDEF LCL}, MetaFilePrinter {$ENDIF};
+
+type
+ TPrnStatusForm = class(TForm)
+ StatusLabel: TLabel;
+ CancelButton: TBitBtn;
+ procedure CancelButtonClick(Sender: TObject);
+ private
+ { Private declarations }
+ Viewer: ThtmlViewer;
+ Canceled: boolean;
+{$IFNDEF LCL}
+ MFPrinter: TMetaFilePrinter;
+{$ENDIF}
+ FromPage, ToPage: integer;
+ procedure PageEvent(Sender: TObject; PageNum: integer; var Stop: boolean);
+ public
+ { Public declarations }
+{$IFNDEF LCL}
+ procedure DoPreview(AViewer: ThtmlViewer; AMFPrinter: TMetaFilePrinter;
+ var Abort: boolean);
+{$ENDIF}
+ procedure DoPrint(AViewer: ThtmlViewer; FromPg, ToPg: integer;
+ var Abort: boolean);
+ end;
+
+var
+ PrnStatusForm: TPrnStatusForm;
+
+implementation
+
+{$IFNDEF LCL}
+{$R *.DFM}
+{$ENDIF}
+
+
+{$IFNDEF LCL}
+procedure TPrnStatusForm.DoPreview(AViewer: ThtmlViewer; AMFPrinter: TMetaFilePrinter;
+ var Abort: boolean);
+begin
+Viewer := AViewer;
+MFPrinter := AMFPrinter;
+Viewer.OnPageEvent := PageEvent;
+try
+ Show;
+ Viewer.PrintPreview(MFPrinter);
+ Hide;
+ Abort := Canceled;
+finally
+ Viewer.OnPageEvent := Nil;
+ end;
+end;
+{$ENDIF}
+
+procedure TPrnStatusForm.DoPrint(AViewer: ThtmlViewer; FromPg, ToPg: integer;
+ var Abort: boolean);
+begin
+Viewer := AViewer;
+FromPage := FromPg;
+ToPage := ToPg;
+Viewer.OnPageEvent := PageEvent;
+try
+ Show;
+ Viewer.Print(FromPage, ToPage);
+ Hide;
+ Abort := Canceled;
+finally
+ Viewer.OnPageEvent := Nil;
+ end;
+end;
+
+procedure TPrnStatusForm.PageEvent(Sender: TObject; PageNum: integer; var Stop: boolean);
+begin
+if Canceled then
+ Stop := True
+else
+ if PageNum = 0 then
+ StatusLabel.Caption := 'Formating'
+ else
+ StatusLabel.Caption := 'Page Number '+ IntToStr(PageNum);
+Update;
+end;
+
+procedure TPrnStatusForm.CancelButtonClick(Sender: TObject);
+begin
+Canceled := True;
+end;
+
+initialization
+{$IFDEF LCL}
+{$I PrintStatusForm.lrs} {Include form's resource file}
+{$ENDIF}
+
+end.
diff --git a/applications/fpbrowser/submit.dfm b/applications/fpbrowser/submit.dfm
new file mode 100644
index 000000000..5eeba292e
--- /dev/null
+++ b/applications/fpbrowser/submit.dfm
@@ -0,0 +1,73 @@
+object SubmitForm: TSubmitForm
+ Left = 200
+ Top = 99
+ BorderIcons = [biSystemMenu]
+ BorderStyle = bsDialog
+ Caption = 'Submit Results'
+ ClientHeight = 273
+ ClientWidth = 427
+ Font.Color = clWindowText
+ Font.Height = -13
+ Font.Name = 'System'
+ Font.Style = []
+ PixelsPerInch = 96
+ TextHeight = 16
+ object Label1: TLabel
+ Left = 16
+ Top = 19
+ Width = 43
+ Height = 16
+ Caption = 'Action:'
+ end
+ object Label2: TLabel
+ Left = 9
+ Top = 43
+ Width = 52
+ Height = 16
+ Caption = 'Method:'
+ end
+ object Label3: TLabel
+ Left = 18
+ Top = 71
+ Width = 50
+ Height = 16
+ Caption = 'Results'
+ end
+ object ActionText: TEdit
+ Left = 67
+ Top = 14
+ Width = 342
+ Height = 24
+ TabStop = False
+ ReadOnly = True
+ TabOrder = 0
+ end
+ object MethodText: TEdit
+ Left = 68
+ Top = 41
+ Width = 342
+ Height = 24
+ TabStop = False
+ ReadOnly = True
+ TabOrder = 1
+ end
+ object ResultBox: TListBox
+ Left = 17
+ Top = 90
+ Width = 392
+ Height = 145
+ TabStop = False
+ ItemHeight = 16
+ TabOrder = 2
+ end
+ object Button1: TButton
+ Left = 172
+ Top = 242
+ Width = 73
+ Height = 28
+ Caption = '&Close'
+ Default = True
+ TabOrder = 3
+ OnClick = Button1Click
+ end
+end
diff --git a/applications/fpbrowser/submit.lfm b/applications/fpbrowser/submit.lfm
new file mode 100644
index 000000000..cdd58f16c
--- /dev/null
+++ b/applications/fpbrowser/submit.lfm
@@ -0,0 +1,74 @@
+object SubmitForm: TSubmitForm
+ Left = 200
+ Top = 99
+ BorderIcons = [biSystemMenu]
+ BorderStyle = bsDialog
+ Caption = 'Submit Results'
+ ClientHeight = 273
+ Height = 273
+ ClientWidth = 427
+ Width = 427
+ Font.Color = clWindowText
+ Font.Height = -13
+ Font.Name = 'Arial'
+ Font.Style = []
+ PixelsPerInch = 96
+ object Label1: TLabel
+ Left = 16
+ Top = 19
+ Width = 43
+ Height = 16
+ Caption = 'Action:'
+ end
+ object Label2: TLabel
+ Left = 9
+ Top = 43
+ Width = 52
+ Height = 16
+ Caption = 'Method:'
+ end
+ object Label3: TLabel
+ Left = 18
+ Top = 71
+ Width = 50
+ Height = 16
+ Caption = 'Results'
+ end
+ object ActionText: TEdit
+ Left = 67
+ Top = 14
+ Width = 342
+ Height = 24
+ TabStop = False
+ ReadOnly = True
+ TabOrder = 0
+ end
+ object MethodText: TEdit
+ Left = 68
+ Top = 41
+ Width = 342
+ Height = 24
+ TabStop = False
+ ReadOnly = True
+ TabOrder = 1
+ end
+ object ResultBox: TListBox
+ Left = 17
+ Top = 90
+ Width = 392
+ Height = 145
+ TabStop = False
+ ItemHeight = 16
+ TabOrder = 2
+ end
+ object Button1: TButton
+ Left = 172
+ Top = 242
+ Width = 73
+ Height = 28
+ Caption = '&Close'
+ Default = True
+ TabOrder = 3
+ OnClick = Button1Click
+ end
+end
diff --git a/applications/fpbrowser/submit.lrs b/applications/fpbrowser/submit.lrs
new file mode 100644
index 000000000..9de83699c
--- /dev/null
+++ b/applications/fpbrowser/submit.lrs
@@ -0,0 +1,19 @@
+LazarusResources.Add('TSubmitForm','FORMDATA',[
+ 'TPF0'#11'TSubmitForm'#10'SubmitForm'#4'Left'#3#200#0#3'Top'#2'c'#11'BorderIc'
+ +'ons'#11#12'biSystemMenu'#0#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#14'Su'
+ +'bmit Results'#12'ClientHeight'#3#17#1#6'Height'#3#17#1#11'ClientWidth'#3#171
+ +#1#5'Width'#3#171#1#10'Font.Color'#7#12'clWindowText'#11'Font.Height'#2#243#9
+ +'Font.Name'#6#5'Arial'#10'Font.Style'#11#0#13'PixelsPerInch'#2'`'#0#6'TLabel'
+ +#6'Label1'#4'Left'#2#16#3'Top'#2#19#5'Width'#2'+'#6'Height'#2#16#7'Caption'#6
+ +#7'Action:'#0#0#6'TLabel'#6'Label2'#4'Left'#2#9#3'Top'#2'+'#5'Width'#2'4'#6
+ +'Height'#2#16#7'Caption'#6#7'Method:'#0#0#6'TLabel'#6'Label3'#4'Left'#2#18#3
+ +'Top'#2'G'#5'Width'#2'2'#6'Height'#2#16#7'Caption'#6#7'Results'#0#0#5'TEdit'
+ +#10'ActionText'#4'Left'#2'C'#3'Top'#2#14#5'Width'#3'V'#1#6'Height'#2#24#7'Ta'
+ +'bStop'#8#8'ReadOnly'#9#8'TabOrder'#2#0#0#0#5'TEdit'#10'MethodText'#4'Left'#2
+ +'D'#3'Top'#2')'#5'Width'#3'V'#1#6'Height'#2#24#7'TabStop'#8#8'ReadOnly'#9#8
+ +'TabOrder'#2#1#0#0#8'TListBox'#9'ResultBox'#4'Left'#2#17#3'Top'#2'Z'#5'Width'
+ +#3#136#1#6'Height'#3#145#0#7'TabStop'#8#10'ItemHeight'#2#16#8'TabOrder'#2#2#0
+ +#0#7'TButton'#7'Button1'#4'Left'#3#172#0#3'Top'#3#242#0#5'Width'#2'I'#6'Heig'
+ +'ht'#2#28#7'Caption'#6#6'&Close'#7'Default'#9#8'TabOrder'#2#3#7'OnClick'#7#12
+ +'Button1Click'#0#0#0
+]);
diff --git a/applications/fpbrowser/submit.pas b/applications/fpbrowser/submit.pas
new file mode 100644
index 000000000..f4b4b4269
--- /dev/null
+++ b/applications/fpbrowser/submit.pas
@@ -0,0 +1,45 @@
+unit Submit;
+
+interface
+
+uses
+ {$IFNDEF LCL} Windows, Messages, {$ELSE} LclIntf, LMessages, LclType, LResources, {$ENDIF}
+ SysUtils, Classes, Graphics, Controls,
+ Forms, Dialogs, StdCtrls;
+
+type
+ TSubmitForm = class(TForm)
+ ActionText: TEdit;
+ MethodText: TEdit;
+ Label1: TLabel;
+ Label2: TLabel;
+ ResultBox: TListBox;
+ Label3: TLabel;
+ Button1: TButton;
+ procedure Button1Click(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ SubmitForm: TSubmitForm;
+
+implementation
+
+{$IFNDEF LCL}
+{$R *.DFM}
+{$ENDIF}
+
+procedure TSubmitForm.Button1Click(Sender: TObject);
+begin
+Close;
+end;
+
+initialization
+{$IFDEF LCL}
+{$I SUBMIT.lrs} {Include form's resource file}
+{$ENDIF}
+
+end.