diff --git a/components/jvcllaz/examples/JvHTControls/JvHTCtrlsDemo.lpi b/components/jvcllaz/examples/JvHTControls/JvHTCtrlsDemo.lpi
new file mode 100644
index 000000000..20c48c42b
--- /dev/null
+++ b/components/jvcllaz/examples/JvHTControls/JvHTCtrlsDemo.lpi
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/jvcllaz/examples/JvHTControls/JvHTCtrlsDemo.lpr b/components/jvcllaz/examples/JvHTControls/JvHTCtrlsDemo.lpr
new file mode 100644
index 000000000..2cfa529d2
--- /dev/null
+++ b/components/jvcllaz/examples/JvHTControls/JvHTCtrlsDemo.lpr
@@ -0,0 +1,21 @@
+program JvHTCtrlsDemo;
+
+{$mode objfpc}{$H+}
+
+uses
+ {$IFDEF UNIX}{$IFDEF UseCThreads}
+ cthreads,
+ {$ENDIF}{$ENDIF}
+ Interfaces, // this includes the LCL widgetset
+ Forms, memdslaz, Unit1
+ { you can add units after this };
+
+{$R *.res}
+
+begin
+ RequireDerivedFormResource:=True;
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
+
diff --git a/components/jvcllaz/examples/JvHTControls/unit1.lfm b/components/jvcllaz/examples/JvHTControls/unit1.lfm
new file mode 100644
index 000000000..15653da20
--- /dev/null
+++ b/components/jvcllaz/examples/JvHTControls/unit1.lfm
@@ -0,0 +1,269 @@
+object Form1: TForm1
+ Left = 256
+ Height = 468
+ Top = 122
+ Width = 582
+ Caption = 'JvHTControls'
+ ClientHeight = 468
+ ClientWidth = 582
+ OnCreate = FormCreate
+ OnShow = FormShow
+ LCLVersion = '1.7'
+ object PageControl1: TPageControl
+ Left = 0
+ Height = 422
+ Top = 0
+ Width = 582
+ ActivePage = TabSheet1
+ Align = alClient
+ TabIndex = 0
+ TabOrder = 0
+ object TabSheet1: TTabSheet
+ Caption = 'TJvHTLabel'
+ ClientHeight = 394
+ ClientWidth = 574
+ object JvHTLabel1: TJvHTLabel
+ Left = 8
+ Height = 106
+ Hint = 'HTLabel with:
'#13#10'bold
'#13#10'italic
'#13#10'underline
'#13#10'strikeout
'#13#10'color
'#13#10'Links and custom links'
+ Top = 8
+ Width = 120
+ Caption = 'HTLabel with:
'#13#10'bold
'#13#10'italic
'#13#10'underline
'#13#10'strikeout
'#13#10'color
'#13#10'Links and custom links'
+ ParentColor = False
+ ParentShowHint = False
+ ShowHint = True
+ OnHyperLinkClick = JvHTLabel1HyperLinkClick
+ end
+ object Memo1: TMemo
+ Left = 0
+ Height = 122
+ Hint = 'HTML
'#13#10'Enter HTML content'
+ Top = 272
+ Width = 574
+ Align = alBottom
+ Lines.Strings = (
+ 'HTLabel with:
'
+ 'bold
'
+ 'italic
'
+ 'underline
'
+ 'strikeout
'
+ 'color
'
+ 'Links and custom links'
+ )
+ OnChange = Memo1Change
+ ParentFont = False
+ ParentShowHint = False
+ ScrollBars = ssAutoBoth
+ ShowHint = True
+ TabOrder = 0
+ WordWrap = False
+ end
+ object Splitter1: TSplitter
+ Cursor = crVSplit
+ Left = 0
+ Height = 5
+ Top = 267
+ Width = 574
+ Align = alBottom
+ ResizeAnchor = akBottom
+ end
+ end
+ object TabSheet2: TTabSheet
+ Caption = 'TJvHTListBox'
+ ClientHeight = 394
+ ClientWidth = 574
+ object JvHTListBox1: TJvHTListBox
+ Left = 0
+ Height = 394
+ Hint = 'TJvHTListBox
'#13#10'ListBox with HT items'
+ Top = 0
+ Width = 152
+ HideSel = False
+ OnHyperLinkClick = JvHTListBox1HyperLinkClick
+ Align = alLeft
+ ColorHighlight = clHighlight
+ ColorHighlightText = clHighlightText
+ ColorDisabledText = clGrayText
+ Items.Strings = (
+ 'Lazarus
Home page or Forum'
+ 'Free Pascal
Home page'
+ 'Other...
Other stuff d-oh!...'
+ 'Lazarus
Home page or Forum'
+ 'Free Pascal
Home page'
+ 'Other...
Other stuff d-oh!...'
+ 'Lazarus
Home page or Forum'
+ 'Free Pascal
Home page'
+ 'Other...
Other stuff d-oh!...'
+ 'Lazarus
Home page or Forum'
+ 'Free Pascal
Home page'
+ 'Other...
Other stuff d-oh!...'
+ )
+ ParentShowHint = False
+ ShowHint = True
+ TabOrder = 0
+ end
+ object Splitter2: TSplitter
+ Left = 152
+ Height = 394
+ Top = 0
+ Width = 5
+ end
+ object Memo2: TMemo
+ Left = 160
+ Height = 90
+ Hint = 'New item content
Enter new item contnent'
+ Top = 8
+ Width = 406
+ Anchors = [akTop, akLeft, akRight]
+ Lines.Strings = (
+ 'new item...'
+ )
+ ParentShowHint = False
+ ShowHint = True
+ TabOrder = 2
+ end
+ object Button1: TButton
+ Left = 160
+ Height = 25
+ Hint = 'Add item
'#13#10'Add item to ListBox and ComboBox'
+ Top = 112
+ Width = 75
+ AutoSize = True
+ Caption = 'Add item'
+ OnClick = Button1Click
+ ParentShowHint = False
+ ShowHint = True
+ TabOrder = 3
+ end
+ object JvHTComboBox1: TJvHTComboBox
+ Left = 160
+ Height = 24
+ Hint = 'TJvHTComboBox
'#13#10'ComboBox with HT items'
+ Top = 160
+ Width = 152
+ HideSel = False
+ ColorHighlight = clHighlight
+ ColorHighlightText = clHighlightText
+ ColorDisabledText = clGrayText
+ Items.Strings = (
+ 'Lazarus
Home page or Forum'
+ 'Free Pascal
Home page'
+ 'Other...
Other stuff d-oh!...'
+ 'Lazarus
Home page or Forum'
+ 'Free Pascal
Home page'
+ 'Other...
Other stuff d-oh!...'
+ 'Lazarus
Home page or Forum'
+ 'Free Pascal
Home page'
+ 'Other...
Other stuff d-oh!...'
+ 'Lazarus
Home page or Forum'
+ 'Free Pascal
Home page'
+ 'Other...
Other stuff d-oh!...'
+ )
+ ParentShowHint = False
+ ShowHint = True
+ TabOrder = 4
+ Text = 'JvHTComboBox1'
+ end
+ object Button2: TButton
+ Left = 264
+ Height = 25
+ Top = 112
+ Width = 53
+ AutoSize = True
+ Caption = 'Clear'
+ OnClick = Button2Click
+ TabOrder = 5
+ end
+ end
+ object TabSheet3: TTabSheet
+ Caption = 'TJvDBHTLabel'
+ ClientHeight = 394
+ ClientWidth = 574
+ object JvDBHTLabel1: TJvDBHTLabel
+ Left = 8
+ Height = 76
+ Top = 8
+ Width = 82
+ DataSource = DataSource1
+ Mask = 'Numeric field:
Field 1:
Field 2:
And some link:
# - '
+ ParentColor = False
+ OnHyperLinkClick = JvDBHTLabel1HyperLinkClick
+ end
+ object DBGrid1: TDBGrid
+ Left = 0
+ Height = 130
+ Top = 264
+ Width = 574
+ Align = alBottom
+ Color = clWindow
+ Columns = <>
+ DataSource = DataSource1
+ TabOrder = 0
+ end
+ object Splitter3: TSplitter
+ Cursor = crVSplit
+ Left = 0
+ Height = 5
+ Top = 259
+ Width = 574
+ Align = alBottom
+ ResizeAnchor = akBottom
+ end
+ object Memo3: TMemo
+ Left = 0
+ Height = 99
+ Top = 160
+ Width = 574
+ Align = alBottom
+ Lines.Strings = (
+ 'Numeric field:
Field 1:
Field 2:
And some link:
# - '
+ )
+ OnChange = Memo3Change
+ TabOrder = 2
+ end
+ end
+ end
+ object ButtonPanel1: TButtonPanel
+ Left = 6
+ Height = 34
+ Top = 428
+ Width = 570
+ OKButton.Name = 'OKButton'
+ OKButton.DefaultCaption = True
+ HelpButton.Name = 'HelpButton'
+ HelpButton.DefaultCaption = True
+ CloseButton.Name = 'CloseButton'
+ CloseButton.Hint = 'Exit
'#13#10'Exit application'
+ CloseButton.DefaultCaption = True
+ CloseButton.ShowHint = True
+ CancelButton.Name = 'CancelButton'
+ CancelButton.DefaultCaption = True
+ TabOrder = 1
+ ShowButtons = [pbClose]
+ end
+ object MemDataset1: TMemDataset
+ Active = True
+ FieldDefs = <
+ item
+ Name = 'Num'
+ DataType = ftInteger
+ end
+ item
+ Name = 'Fld1'
+ DataType = ftString
+ Size = 20
+ end
+ item
+ Name = 'Fld2'
+ DataType = ftString
+ Size = 20
+ end>
+ left = 384
+ top = 112
+ end
+ object DataSource1: TDataSource
+ DataSet = MemDataset1
+ left = 464
+ top = 112
+ end
+end
diff --git a/components/jvcllaz/examples/JvHTControls/unit1.pas b/components/jvcllaz/examples/JvHTControls/unit1.pas
new file mode 100644
index 000000000..f77180e38
--- /dev/null
+++ b/components/jvcllaz/examples/JvHTControls/unit1.pas
@@ -0,0 +1,114 @@
+unit Unit1;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
+ StdCtrls, ButtonPanel, ExtCtrls, DBGrids, JvHtControls, JvHint, JvDBHTLabel,
+ memds, db;
+
+type
+
+ { TForm1 }
+
+ TForm1 = class(TForm)
+ Button1: TButton;
+ Button2: TButton;
+ ButtonPanel1: TButtonPanel;
+ DataSource1: TDataSource;
+ DBGrid1: TDBGrid;
+ JvDBHTLabel1: TJvDBHTLabel;
+ JvHTComboBox1: TJvHTComboBox;
+ JvHTLabel1: TJvHTLabel;
+ JvHTListBox1: TJvHTListBox;
+ MemDataset1: TMemDataset;
+ Memo1: TMemo;
+ Memo2: TMemo;
+ Memo3: TMemo;
+ PageControl1: TPageControl;
+ Splitter1: TSplitter;
+ Splitter2: TSplitter;
+ Splitter3: TSplitter;
+ TabSheet1: TTabSheet;
+ TabSheet2: TTabSheet;
+ TabSheet3: TTabSheet;
+ procedure Button1Click(Sender: TObject);
+ procedure Button2Click(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure FormShow(Sender: TObject);
+ procedure JvDBHTLabel1HyperLinkClick(Sender: TObject; LinkName: string);
+ procedure JvHTLabel1HyperLinkClick(Sender: TObject; LinkName: string);
+ procedure JvHTListBox1HyperLinkClick(Sender: TObject; LinkName: string);
+ procedure Memo1Change(Sender: TObject);
+ procedure Memo3Change(Sender: TObject);
+ private
+
+ public
+
+ end;
+
+var
+ Form1: TForm1;
+
+implementation
+
+{$R *.lfm}
+
+{ TForm1 }
+
+procedure TForm1.Memo1Change(Sender: TObject);
+begin
+ JvHTLabel1.Caption := Memo1.Text;
+ JvHTLabel1.Hint := Memo1.Text;
+end;
+
+procedure TForm1.Memo3Change(Sender: TObject);
+begin
+ JvDBHTLabel1.Mask := Memo3.Text;
+end;
+
+procedure TForm1.FormCreate(Sender: TObject);
+begin
+ RegisterHtHints;
+end;
+
+procedure TForm1.FormShow(Sender: TObject);
+begin
+ MemDataset1.AppendRecord([1, 'asdfxc', 'wertfx']);
+ MemDataset1.AppendRecord([2, 'brdrgrsdgx', 'sdfwetrcx']);
+ MemDataset1.AppendRecord([3, 'bhtesdxcv', 'wytsfsv']);
+ MemDataset1.AppendRecord([4, 'sdgrdthc', 'klvbsdfwe85']);
+ MemDataset1.AppendRecord([5, 'trcbxg', 'her4fekg']);
+end;
+
+procedure TForm1.JvDBHTLabel1HyperLinkClick(Sender: TObject; LinkName: string);
+begin
+ MessageDlg('TJvDBHTLabel', 'Hyperlink: ' + LinkName, mtInformation, [mbOK], 0);
+end;
+
+procedure TForm1.Button1Click(Sender: TObject);
+begin
+ JvHTListBox1.Items.Add(Memo2.Text);
+ JvHTComboBox1.Items.Add(Memo2.Text);
+end;
+
+procedure TForm1.Button2Click(Sender: TObject);
+begin
+ JvHTComboBox1.Items.Clear;
+ JvHTListBox1.Items.Clear;
+end;
+
+procedure TForm1.JvHTLabel1HyperLinkClick(Sender: TObject; LinkName: string);
+begin
+ MessageDlg('TJvHTLabel', 'Hyperlink: ' + LinkName, mtInformation, [mbOK], 0);
+end;
+
+procedure TForm1.JvHTListBox1HyperLinkClick(Sender: TObject; LinkName: string);
+begin
+ MessageDlg('JvHTListBox', 'Hyperlink: ' + LinkName, mtInformation, [mbOK], 0);
+end;
+
+end.
+
diff --git a/components/jvcllaz/examples/JvValidators/JvValidatorsDemo.lpi b/components/jvcllaz/examples/JvValidators/JvValidatorsDemo.lpi
new file mode 100644
index 000000000..6e10011e9
--- /dev/null
+++ b/components/jvcllaz/examples/JvValidators/JvValidatorsDemo.lpi
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/jvcllaz/examples/JvValidators/JvValidatorsDemo.lpr b/components/jvcllaz/examples/JvValidators/JvValidatorsDemo.lpr
new file mode 100644
index 000000000..711f85e15
--- /dev/null
+++ b/components/jvcllaz/examples/JvValidators/JvValidatorsDemo.lpr
@@ -0,0 +1,15 @@
+program JvValidatorsDemo;
+
+{$MODE Delphi}
+
+uses
+ Forms, Interfaces,
+ MainFrm in 'MainFrm.pas' {frmMain};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TfrmMain, frmMain);
+ Application.Run;
+end.
diff --git a/components/jvcllaz/examples/JvValidators/MainFrm.lfm b/components/jvcllaz/examples/JvValidators/MainFrm.lfm
new file mode 100644
index 000000000..b76682261
--- /dev/null
+++ b/components/jvcllaz/examples/JvValidators/MainFrm.lfm
@@ -0,0 +1,208 @@
+object frmMain: TfrmMain
+ Left = 306
+ Height = 274
+ Top = 126
+ Width = 619
+ Caption = 'JvValidators demo'
+ ClientHeight = 274
+ ClientWidth = 619
+ Color = clBtnFace
+ Constraints.MinHeight = 270
+ Constraints.MinWidth = 560
+ DefaultMonitor = dmDesktop
+ Font.Color = clWindowText
+ OnCreate = FormCreate
+ Position = poScreenCenter
+ LCLVersion = '1.7'
+ object Label1: TLabel
+ Left = 16
+ Height = 15
+ Top = 16
+ Width = 167
+ Caption = 'This edit must have a(ny) value:'
+ FocusControl = edRequired
+ ParentColor = False
+ end
+ object Label2: TLabel
+ Left = 16
+ Height = 15
+ Top = 64
+ Width = 233
+ Caption = 'This edit must have more than 9 characters:'
+ FocusControl = edRequired10Chars
+ ParentColor = False
+ end
+ object Label3: TLabel
+ Left = 16
+ Height = 15
+ Top = 112
+ Width = 228
+ Caption = 'This edit must match the reg. expr."A.B.C.":'
+ FocusControl = edRegExpr
+ ParentColor = False
+ end
+ object Label4: TLabel
+ Left = 16
+ Height = 15
+ Top = 160
+ Width = 201
+ Caption = 'The value must be between 0 and 100:'
+ FocusControl = edRange0to100
+ ParentColor = False
+ end
+ object Label5: TLabel
+ Left = 280
+ Height = 15
+ Top = 16
+ Width = 35
+ Caption = 'Result:'
+ ParentColor = False
+ end
+ object edRequired: TEdit
+ Left = 16
+ Height = 23
+ Top = 32
+ Width = 240
+ TabOrder = 0
+ end
+ object edRequired10Chars: TEdit
+ Left = 16
+ Height = 23
+ Top = 80
+ Width = 240
+ TabOrder = 1
+ end
+ object edRegExpr: TEdit
+ Left = 16
+ Height = 23
+ Top = 128
+ Width = 240
+ TabOrder = 2
+ end
+ object edRange0to100: TEdit
+ Left = 16
+ Height = 23
+ Top = 176
+ Width = 227
+ TabOrder = 3
+ Text = '-1'
+ end
+ object udRange0to100: TUpDown
+ Left = 243
+ Height = 23
+ Top = 176
+ Width = 15
+ Associate = edRange0to100
+ Max = 200
+ Min = -100
+ Position = -1
+ TabOrder = 4
+ Wrap = False
+ end
+ object btnCheck: TButton
+ Left = 336
+ Height = 25
+ Top = 224
+ Width = 137
+ Anchors = [akLeft, akBottom]
+ AutoSize = True
+ Caption = 'Use OnValidateFailed'
+ OnClick = btnCheckClick
+ TabOrder = 7
+ end
+ object btnProviderCheck: TButton
+ Left = 16
+ Height = 25
+ Top = 224
+ Width = 130
+ Anchors = [akLeft, akBottom]
+ AutoSize = True
+ Caption = 'Use JvErrorIndicator'
+ OnClick = btnProviderCheckClick
+ TabOrder = 5
+ end
+ object reResults: TMemo
+ Cursor = crArrow
+ Left = 280
+ Height = 167
+ Top = 32
+ Width = 326
+ Anchors = [akTop, akLeft, akRight, akBottom]
+ Lines.Strings = (
+ 'This is a demo for the JvValidators component as well as the JvErrorProvider and, to some extent, the JvValidationSummary component.'
+ ''
+ 'By creating and setting up different validators (at run-time in this demo but you can do it at design-time as well), the edit boxes can be checked for validity by a single call to the Validate method. When one of the validators finds that a control doesn''t match the validation criteria, that error can be handled in different ways depending on your needs.'
+ ''
+ 'One option is to just check the boolean return value from Validate and display a standard message box telling the user that a value didn''t match.'
+ ''
+ 'You can also handle the OnValidateFailed event of all validators at once (the TJvValidators event) or for each validator separately (the TJvBaseValidator event). Yet another option is to assign a TJvValidationSummary component to the ValidationSummary property of tJvValidators and handle it''s OnChange event.'
+ ''
+ 'Finally, you can combine the work of the validators with the use of a TJvErrorIndicator.'
+ ''
+ 'For more info on TJvErrorIndicator, see the demo for that component (also included).'
+ ''
+ 'By clicking any of the buttons below, you can see how the different methods described work in real-time.'
+ ''
+ ''
+ )
+ OnEnter = reResultsEnter
+ ParentColor = True
+ ReadOnly = True
+ ScrollBars = ssBoth
+ TabOrder = 8
+ TabStop = False
+ WordWrap = False
+ end
+ object btnValSum: TButton
+ Left = 160
+ Height = 25
+ Top = 224
+ Width = 162
+ Anchors = [akLeft, akBottom]
+ AutoSize = True
+ Caption = 'Use JvValidationSummary'
+ OnClick = btnValSumClick
+ TabOrder = 6
+ end
+ object JvValidators1: TJvValidators
+ OnValidateFailed = JvValidators1ValidateFailed
+ left = 258
+ top = 104
+ object JvRequiredFieldValidator1: TJvRequiredFieldValidator
+ ControlToValidate = edRequired
+ PropertyToValidate = 'Text'
+ ErrorMessage = 'Value in edRequired cannot be empty'
+ AllowBlank = False
+ end
+ object JvCustomValidator1: TJvCustomValidator
+ ControlToValidate = edRequired10Chars
+ PropertyToValidate = 'Text'
+ ErrorMessage = 'Value in "edRequired10Chars" requires at least 10 characters'
+ OnValidate = JvCustomValidator1Validate
+ end
+ object JvRegularExpressionValidator1: TJvRegularExpressionValidator
+ ControlToValidate = edRegExpr
+ PropertyToValidate = 'Text'
+ ErrorMessage = 'Value in "edRegExpr" does not match "A.B.C."'
+ ValidationExpression = '^A.B.C.*'
+ end
+ object JvRangeValidator1: TJvRangeValidator
+ ControlToValidate = udRange0to100
+ PropertyToValidate = 'Position'
+ ErrorMessage = 'Value in "udRange0to100" must be between 0 and 100'
+ MinimumValue = 0
+ MaximumValue = 100
+ end
+ end
+ object JvErrorIndicator1: TJvErrorIndicator
+ ImageIndex = 0
+ DefaultUseAnchors = False
+ left = 296
+ top = 104
+ end
+ object JvValidationSummary1: TJvValidationSummary
+ OnChange = JvValidationSummary1Change
+ left = 328
+ top = 104
+ end
+end
diff --git a/components/jvcllaz/examples/JvValidators/MainFrm.pas b/components/jvcllaz/examples/JvValidators/MainFrm.pas
new file mode 100644
index 000000000..ecc123e4a
--- /dev/null
+++ b/components/jvcllaz/examples/JvValidators/MainFrm.pas
@@ -0,0 +1,174 @@
+{******************************************************************
+
+ JEDI-VCL Demo
+
+ Copyright (C) 2002 Project JEDI
+
+ Original author:
+
+ Contributor(s):
+
+ You may retrieve the latest version of this file at the JEDI-JVCL
+ home page, located at http://jvcl.delphi-jedi.org
+
+ The contents of this file are used with permission, subject to
+ the Mozilla Public License Version 1.1 (the "License"); you may
+ not use this file except in compliance with the License. You may
+ obtain a copy of the License at
+ http://www.mozilla.org/MPL/MPL-1_1Final.html
+
+ Software distributed under the License is distributed on an
+ "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ implied. See the License for the specific language governing
+ rights and limitations under the License.
+
+******************************************************************}
+
+unit MainFrm;
+
+{.$I jvcl.inc}
+
+interface
+
+uses
+ SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, ComCtrls, JvValidators, JvErrorIndicator;
+
+type
+
+ { TfrmMain }
+
+ TfrmMain = class(TForm)
+ Label1: TLabel;
+ edRequired: TEdit;
+ Label2: TLabel;
+ edRequired10Chars: TEdit;
+ Label3: TLabel;
+ edRegExpr: TEdit;
+ Label4: TLabel;
+ edRange0to100: TEdit;
+ udRange0to100: TUpDown;
+ btnCheck: TButton;
+ Label5: TLabel;
+ btnProviderCheck: TButton;
+ reResults: TMemo;
+ btnValSum: TButton;
+ JvValidators1: TJvValidators;
+ JvErrorIndicator1: TJvErrorIndicator;
+ JvValidationSummary1: TJvValidationSummary;
+ JvRequiredFieldValidator1: TJvRequiredFieldValidator;
+ JvCustomValidator1: TJvCustomValidator;
+ JvRegularExpressionValidator1: TJvRegularExpressionValidator;
+ JvRangeValidator1: TJvRangeValidator;
+ procedure FormCreate(Sender: TObject);
+ procedure btnCheckClick(Sender: TObject);
+ procedure btnProviderCheckClick(Sender: TObject);
+ procedure btnValSumClick(Sender: TObject);
+ procedure reResultsEnter(Sender: TObject);
+ procedure JvCustomValidator1Validate(Sender: TObject;
+ ValueToValidate: Variant; var Valid: Boolean);
+ procedure JvValidators1ValidateFailed(Sender: TObject;
+ BaseValidator: TJvBaseValidator; var Continue: Boolean);
+ procedure JvValidationSummary1Change(Sender: TObject);
+ private
+ { Private declarations }
+ procedure ProviderErrorValidateFailed(Sender: TObject;
+ BaseValidator: TJvBaseValidator; var Continue: Boolean);
+ public
+ { Public declarations }
+ end;
+
+var
+ frmMain: TfrmMain;
+
+implementation
+
+uses
+ Variants;
+
+{$R *.lfm}
+
+procedure TfrmMain.FormCreate(Sender: TObject);
+begin
+ reResults.WordWrap := true;
+ JvValidators1.ErrorIndicator := JvErrorIndicator1;
+ JvValidators1.ValidationSummary := JvValidationSummary1;
+end;
+
+procedure TfrmMain.btnCheckClick(Sender: TObject);
+begin
+ reResults.Lines.Clear;
+ reResults.WordWrap := false;
+ JvErrorIndicator1.ClearErrors;
+ JvValidators1.ValidationSummary := nil;
+ JvValidators1.ErrorIndicator := nil;
+ JvValidators1.OnValidateFailed := JvValidators1ValidateFailed;
+ JvValidators1.Validate;
+end;
+
+procedure TfrmMain.btnProviderCheckClick(Sender: TObject);
+begin
+ reResults.Lines.Clear;
+ reResults.WordWrap := false;
+ // calling BeginUpdate/EndUpdate delays the error reporting until all controls have been validated
+ JvErrorIndicator1.BeginUpdate;
+ try
+ JvErrorIndicator1.ClearErrors;
+ JvValidators1.ValidationSummary := nil;
+ // custom error messages for this type of check
+ JvValidators1.OnValidateFailed := ProviderErrorValidateFailed;
+ JvValidators1.Validate;
+ finally
+ JvErrorIndicator1.EndUpdate;
+ end;
+end;
+
+procedure TfrmMain.btnValSumClick(Sender: TObject);
+begin
+ reResults.Lines.Clear;
+ reResults.WordWrap := false;
+ JvErrorIndicator1.ClearErrors;
+ JvValidators1.OnValidateFailed := nil;
+ JvValidators1.ErrorIndicator := nil;
+ // Setting the ValidationSummary for TJvValidators will delay
+ // triggering the OnChange event until after Validate has completed
+ JvValidationSummary1.Summaries.Clear;
+ JvValidators1.ValidationSummary := JvValidationSummary1;
+ JvValidators1.Validate;
+end;
+
+procedure TfrmMain.reResultsEnter(Sender: TObject);
+begin
+ SelectNext(reResults,true,true);
+end;
+
+procedure TfrmMain.JvCustomValidator1Validate(Sender: TObject;
+ ValueToValidate: Variant; var Valid: Boolean);
+begin
+ // custom validation
+ Valid := not VarIsNull(ValueToValidate) and (Length(string(ValueToValidate)) >= 10);
+end;
+
+procedure TfrmMain.JvValidators1ValidateFailed(Sender: TObject;
+ BaseValidator: TJvBaseValidator; var Continue: Boolean);
+begin
+ // using the OnValidateFailed event
+ reResults.Lines.Add(Format('FAILED: %s',[BaseValidator.ErrorMessage]));
+end;
+
+procedure TfrmMain.ProviderErrorValidateFailed(Sender: TObject;
+ BaseValidator: TJvBaseValidator; var Continue: Boolean);
+begin
+ JvErrorIndicator1.Error[BaseValidator.ControlToValidate] := BaseValidator.ErrorMessage;
+ reResults.Lines.Add(Format('PROVIDER: %s',[BaseValidator.ErrorMessage]));
+end;
+procedure TfrmMain.JvValidationSummary1Change(Sender: TObject);
+var i:integer;
+begin
+ // update all at once
+ reResults.Lines.Text := TJvValidationSummary(Sender).Summaries.Text;
+ for i := 0 to reResults.Lines.Count - 1 do
+ reResults.Lines[i] := 'SUMMARY: ' + reResults.Lines[i];
+end;
+
+end.
diff --git a/components/jvcllaz/packages/JvXPBarLaz.lpk b/components/jvcllaz/packages/JvXPBarLaz.lpk
index ea3893301..4fd2288e2 100644
--- a/components/jvcllaz/packages/JvXPBarLaz.lpk
+++ b/components/jvcllaz/packages/JvXPBarLaz.lpk
@@ -1,23 +1,24 @@
-
+
-
+
+
+
-
+
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
@@ -42,7 +43,6 @@
-
@@ -56,7 +56,7 @@
-
+
diff --git a/components/jvcllaz/packages/jvhtcontrolslaz.lpk b/components/jvcllaz/packages/jvhtcontrolslaz.lpk
new file mode 100644
index 000000000..e6d131c3a
--- /dev/null
+++ b/components/jvcllaz/packages/jvhtcontrolslaz.lpk
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ExternHelp Items="Count"/>
+
+
+
diff --git a/components/jvcllaz/packages/jvhtcontrolsreg.pas b/components/jvcllaz/packages/jvhtcontrolsreg.pas
new file mode 100644
index 000000000..ef1e76543
--- /dev/null
+++ b/components/jvcllaz/packages/jvhtcontrolsreg.pas
@@ -0,0 +1,24 @@
+unit jvhtcontrolsreg;
+
+{$mode objfpc}{$H+}
+
+interface
+
+procedure Register;
+
+implementation
+
+{$R ../resource/JvHTControlsReg.res}
+
+uses
+ Classes, JvHtControls, JvDBHTLabel, JvHint, JvHTHintForm, PropEdits, Controls;
+
+procedure Register;
+begin
+ RegisterComponents('JvHTControls', [TJvHTLabel, TJvHTComboBox, TJvHTListBox,
+ TJvDBHTLabel, TJvHint]);
+ RegisterPropertyEditor(TypeInfo(TCaption), TJvHTLabel, 'Caption', TJvHintProperty);
+end;
+
+end.
+
diff --git a/components/jvcllaz/packages/jvvalidatorlaz.lpk b/components/jvcllaz/packages/jvvalidatorlaz.lpk
new file mode 100644
index 000000000..862d71841
--- /dev/null
+++ b/components/jvcllaz/packages/jvvalidatorlaz.lpk
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ExternHelp Items="Count"/>
+
+
+
diff --git a/components/jvcllaz/packages/jvvalidatorreg.pp b/components/jvcllaz/packages/jvvalidatorreg.pp
new file mode 100644
index 000000000..f00915d3e
--- /dev/null
+++ b/components/jvcllaz/packages/jvvalidatorreg.pp
@@ -0,0 +1,36 @@
+unit JvValidatorReg;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes, LResources, SysUtils, ComponentEditors, PropEdits, ImageListEditor,
+ GraphPropEdits;
+
+procedure Register;
+
+implementation
+
+{$R ..\resource\JvValidatorsReg.res}
+
+uses JvValidators, JvErrorIndicator, JvValidatorsEditorForm;
+
+procedure Register;
+begin
+ RegisterComponents('JvValidators', [TJvValidators, TJvValidationSummary, TJvErrorIndicator]);
+ RegisterNoIcon([TJvRequiredFieldValidator, TJvCompareValidator,
+ TJvRangeValidator, TJvRegularExpressionValidator, TJvCustomValidator, TJvControlsCompareValidator]);
+
+ RegisterComponentEditor(TJvValidators, TJvValidatorEditor);
+ RegisterPropertyEditor(TypeInfo(Integer), TJvErrorIndicator, 'ImageIndex', TImageIndexPropertyEditor);
+// RegisterPropertyEditor(TypeInfo(string), TJvCustomFormatEdit, 'Characters', TJvCharStringProperty);
+ RegisterPropertyEditor(TypeInfo(string), TJvBaseValidator, 'PropertyToValidate', TJvPropertyValidateProperty);
+ RegisterPropertyEditor(TypeInfo(string), TJvBaseValidator, 'CompareToProperty', TJvPropertyToCompareProperty); end;
+
+(*
+initialization
+ {$I JvXPBarLaz.lrs}
+*)
+
+end.
diff --git a/components/jvcllaz/run/JvDBHTLabel.pas b/components/jvcllaz/run/JvDBHTLabel.pas
new file mode 100644
index 000000000..8efca7cb8
--- /dev/null
+++ b/components/jvcllaz/run/JvDBHTLabel.pas
@@ -0,0 +1,268 @@
+{-----------------------------------------------------------------------------
+The contents of this file are subject to the Mozilla Public License
+Version 1.1 (the "License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+http://www.mozilla.org/MPL/MPL-1.1.html
+
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for
+the specific language governing rights and limitations under the License.
+
+The Original Code is: JvDBHTLabel.PAS, released on 2004-02-01.
+
+The Initial Developers of the Original Code are: Maciej Kaczkowski
+Copyright (c) 2003 Maciej Kaczkowski
+All Rights Reserved.
+
+Contributor(s):
+
+You may retrieve the latest version of this file at the Project JEDI's
+JVCL home page, located at http://jvcl.delphi-jedi.org
+
+Known Issues:
+- To display data from a datasource, use the tag in Mask.
+- You can have more than one FIELD tag in a label, i.e:
+ Name:, Company:
+- The fieldname *must* be double-quoted!
+-----------------------------------------------------------------------------}
+// $Id$
+
+unit JvDBHTLabel;
+
+{$mode objfpc}{$H+}
+
+//{.$I jvcl.inc}
+
+interface
+
+uses
+ Classes, LMessages, DB, DBCtrls, Controls, JvHtControls;
+
+type
+ TJvDBHTLabel = class(TJvCustomHTLabel)
+ private
+ FDataLink: TFieldDataLink;
+ FMask: string;
+ function GetDataSource: TDataSource;
+ procedure SetDataSource(const Value: TDataSource);
+ procedure DataChange(Sender: TObject);
+ procedure SetMask(const Value: string);
+ procedure CMGetDataLink(var Message: TLMessage); message CM_GETDATALINK;
+ protected
+ function GetLabelText: string; override;
+ procedure Loaded; override;
+ procedure Notification(AComponent: TComponent;
+ Operation: TOperation); override;
+ //procedure SetAutoSize(Value: Boolean); override;
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure UpdateCaption;
+ published
+ property DataSource: TDataSource read GetDataSource write SetDataSource;
+ property Mask: string read FMask write SetMask;
+
+ property Align;
+ property AutoSize;
+ property Constraints;
+ property Color;
+ property Layout;
+ property DragCursor;
+ property BiDiMode;
+ property DragKind;
+ property ParentBiDiMode;
+ property OnEndDock;
+ property OnStartDock;
+ property DragMode;
+ property Enabled;
+ property FocusControl;
+ property Font;
+ property ParentColor;
+ property ParentFont;
+ property ParentShowHint;
+ property PopupMenu;
+ property ShowHint;
+ property Transparent;
+ property Visible;
+ property OnClick;
+ property OnDblClick;
+ property OnDragDrop;
+ property OnDragOver;
+ property OnEndDrag;
+ property OnMouseDown;
+ property OnMouseMove;
+ property OnMouseUp;
+ property OnStartDrag;
+ property OnHyperLinkClick;
+ end;
+
+implementation
+
+uses
+ SysUtils{, dbconst};
+
+function ReplaceFieldNameTag(Str: string; DataSet: TDataSet): string;
+var
+ F: TField;
+const
+ FieldName = 'FIELD'; // non-standard html
+// FieldStr = '<' + FieldName + '=';
+ FieldLabelName = 'FIELDLABEL';
+// FieldLabelStr = '<' + FieldLabelName + '=';
+
+ function ExtractPropertyValue(Tag, PropName: string): string;
+ begin
+ Result := '';
+ PropName := UpperCase(PropName);
+ if Pos(PropName, UpperCase(Tag)) > 0 then
+ begin
+ Result := Copy(Tag, Pos(PropName, UpperCase(Tag))+Length(PropName), Length(Tag));
+ Result := Copy(Result, Pos('"', Result)+1, Length(Result));
+ Result := Copy(Result, 1, Pos('"', Result)-1);
+ end;
+ end;
+
+ function ExtractProperty(AStr: string; const PropName: string): string;
+ var
+ J: Integer;
+ I: Integer;
+ A, FieldName, Text: string;
+ PropStr: string;
+ begin
+ Result := '';
+ PropStr := '<'+PropName+'=';
+ I := Pos(PropStr, UpperCase(AStr));
+ while I > 0 do
+ begin
+ Result := Result + Copy(AStr, 1, I - 1);
+ A := Copy(AStr, I, Length(AStr));
+ J := Pos('>', A);
+ if J > 0 then
+ Delete(AStr, 1, I + J - 1)
+ else
+ AStr := '';
+ FieldName := ExtractPropertyValue(A, PropStr);
+ if Assigned(DataSet) and DataSet.Active then
+ begin
+ F := DataSet.FindField(FieldName);
+ if F <> nil then
+ begin
+ if PropName = FieldLabelName then
+ Text := F.DisplayLabel
+ else
+ Text := F.DisplayText;
+ end
+ else
+ Text := Format('(%s)', [FieldName]);
+ end
+ else
+ Text := Format('(%s)', [FieldName]);
+ Result := Result + Text;
+ I := Pos(PropStr, UpperCase(AStr));
+ end;
+ Result := Result + AStr;
+ end;
+
+begin
+ Result := ExtractProperty(Str, FieldLabelName);
+ Result := ExtractProperty(Result, FieldName);
+end;
+
+//=== { TJvDBHTLabel } =======================================================
+
+procedure TJvDBHTLabel.CMGetDataLink(var Message: TLMessage);
+begin
+ Message.Result := PtrInt(FDataLink);
+end;
+
+constructor TJvDBHTLabel.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ FDataLink := TFieldDataLink.Create;
+ with FDataLink do
+ begin
+ Control := Self;
+ OnDataChange := @DataChange;
+ OnEditingChange := @DataChange;
+ OnUpdateData := @DataChange;
+ OnActiveChange := @DataChange;
+ end;
+end;
+
+destructor TJvDBHTLabel.Destroy;
+begin
+ FreeAndNil(FDataLink);
+ inherited Destroy;
+end;
+
+procedure TJvDBHTLabel.UpdateCaption;
+begin
+ if Assigned(FDataLink) and Assigned(FDataLink.DataSet) then
+ Caption := ReplaceFieldNameTag(FMask, FDataLink.DataSet)
+ else
+ Caption := ReplaceFieldNameTag(Mask, nil);
+end;
+
+function TJvDBHTLabel.GetDataSource: TDataSource;
+begin
+ Result := FDataLink.DataSource;
+end;
+
+function TJvDBHTLabel.GetLabelText: string;
+begin
+ if csPaintCopy in ControlState then
+ begin
+ if (Assigned(FDataLink) and Assigned(FDataLink.DataSet)) then
+ Result := ReplaceFieldNameTag(FMask, FDataLink.DataSet)
+ else
+ Result := ReplaceFieldNameTag(Mask, nil);
+ end
+ else
+ Result := Caption;
+end;
+
+procedure TJvDBHTLabel.Loaded;
+begin
+ inherited;
+ if (csDesigning in ComponentState) then DataChange(Self);
+end;
+
+procedure TJvDBHTLabel.Notification(AComponent: TComponent; Operation: TOperation);
+begin
+ inherited;
+ if (Operation = opRemove) and (FDataLink <> nil) and
+ (AComponent = DataSource) then
+ DataSource := nil;
+end;
+
+//procedure TJvDBHTLabel.SetAutoSize(Value: Boolean);
+//begin
+// if AutoSize <> Value then
+// begin
+// if Value and FDataLink.DataSourceFixed then DatabaseError('SDataSourceFixed');
+// inherited;
+// end;
+//end;
+
+procedure TJvDBHTLabel.SetDataSource(const Value: TDataSource);
+begin
+ FDataLink.DataSource := Value;
+ UpdateCaption;
+end;
+
+procedure TJvDBHTLabel.DataChange(Sender: TObject);
+begin
+ UpdateCaption;
+end;
+
+procedure TJvDBHTLabel.SetMask(const Value: string);
+begin
+ if FMask <> Value then
+ begin
+ FMask := Value;
+ UpdateCaption;
+ end;
+end;
+
+end.
+
diff --git a/components/jvcllaz/run/JvErrorIndicator.pas b/components/jvcllaz/run/JvErrorIndicator.pas
new file mode 100644
index 000000000..57591260e
--- /dev/null
+++ b/components/jvcllaz/run/JvErrorIndicator.pas
@@ -0,0 +1,878 @@
+{-----------------------------------------------------------------------------
+The contents of this file are subject to the Mozilla Public License
+Version 1.1 (the "License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+http://www.mozilla.org/MPL/MPL-1.1.html
+
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for
+the specific language governing rights and limitations under the License.
+
+The Original Code is: JvErrorIndicator.pas, released on 2002-11-16.
+
+The Initial Developer of the Original Code is Peter Thörnqvist .
+Portions created by Peter Thörnqvist are Copyright (C) 2002 Peter Thörnqvist .
+All Rights Reserved.
+
+Contributor(s):
+
+You may retrieve the latest version of this file at the Project JEDI's JVCL home page,
+located at http://jvcl.delphi-jedi.org
+
+Known Issues:
+* Setting AutoScroll to True for a form and displaying error icons beyond the form's right
+edge can make the form's scrollbars "jump up and down"
+* Resizing components while displaying error images, doesn't move the error image smoothly
+(this is caused by the image being moved only when the BlinkThread triggers)
+
+Description:
+ A component patterned on the ErrorProvider in .NET:
+ "Provides a user interface for indicating that a control
+ on a form has an error associated with it."
+ To set the error, use the Error property: an empty error string, removes the error image
+
+-----------------------------------------------------------------------------}
+// $Id$
+
+unit JvErrorIndicator;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes, Graphics, Controls, ImgList;
+
+type
+ IJvErrorIndicatorClient = interface;
+
+ // IJvErrorIndicator is implemented by the TJvErrorIndicator
+ IJvErrorIndicator = interface
+ ['{5BCB5404-9C17-4CC6-96EC-46567CA19A12}']
+ procedure BeginUpdate;
+ procedure EndUpdate;
+ procedure SetError(AControl: TControl; const AErrorMessage: WideString);
+ procedure SetClientError(const AClient: IJvErrorIndicatorClient);
+ end;
+
+ // IJvErrorIndicatorClient should be implemented by controls that wants to be able
+ // to update the error indicator through it's own properties
+ IJvErrorIndicatorClient = interface
+ ['{9871F250-631E-4119-B073-71B28711C9B8}']
+ procedure SetErrorIndicator(const Value: IJvErrorIndicator);
+ function GetErrorIndicator: IJvErrorIndicator;
+ function GetControl: TControl;
+ procedure SetErrorMessage(const Value: WideString);
+ function GetErrorMessage: WideString;
+
+ property ErrorIndicator: IJvErrorIndicator read GetErrorIndicator write SetErrorIndicator;
+ property ErrorMessage: WideString read GetErrorMessage write SetErrorMessage;
+ end;
+
+ TJvErrorBlinkStyle = (ebsAlwaysBlink, ebsBlinkIfDifferentError, ebsNeverBlink);
+ TJvErrorImageAlignment = (eiaBottomLeft, eiaBottomRight, eiaMiddleLeft, eiaMiddleRight,
+ eiaTopLeft, eiaTopRight);
+
+ { TJvErrorControl }
+
+ TJvErrorControl = class(TGraphicControl)
+ private
+ FImageList: TCustomImageList;
+ FImageIndex: Integer;
+ FImagePadding: Integer;
+ FControl: TControl;
+ FImageAlignment: TJvErrorImageAlignment;
+ FBlinkCount: Integer;
+ FUseAnchors: Boolean;
+ procedure SetError(const Value: string);
+ function GetError: string;
+ procedure SetImageIndex(const Value: Integer);
+ procedure SetImageList(const Value: TCustomImageList);
+ procedure SetControl(const Value: TControl);
+ procedure SetUseAnchors(AValue: Boolean);
+ protected
+ procedure Paint; override;
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+ procedure UpdateAnchors;
+ public
+ function CalcBoundsRect: TRect;
+ property Images: TCustomImageList read FImageList write SetImageList;
+ property ImageIndex: Integer read FImageIndex write SetImageIndex;
+ property Control: TControl read FControl write SetControl;
+ property Error: string read GetError write SetError;
+ property BlinkCount: Integer read FBlinkCount write FBlinkCount;
+ property ImageAlignment: TJvErrorImageAlignment read FImageAlignment write FImageAlignment;
+ property ImagePadding: Integer read FImagePadding write FImagePadding;
+ property UseAnchors: Boolean read FUseAnchors write SetUseAnchors;
+
+ procedure DrawImage(Erase: Boolean);
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ property ShowHint default True;
+ property Width default 16;
+ property Height default 16;
+ end;
+
+ { TJvErrorIndicator }
+
+ TJvErrorIndicator = class(TComponent, IUnknown, IJvErrorIndicator)
+ private
+ FDefaultUseAnchors: Boolean;
+ FUpdateCount: Integer;
+ FControls: TList;
+ FBlinkRate: Integer;
+ FImageList: TCustomImageList;
+ FBlinkThread: TThread;
+ FBlinkStyle: TJvErrorBlinkStyle;
+ FChangeLink: TChangeLink;
+ FImageIndex: Integer;
+ FDefaultImage: TImageList;
+ function GetError(AControl: TControl): string;
+ function GetImageAlignment(AControl: TControl): TJvErrorImageAlignment;
+ function GetImagePadding(AControl: TControl): Integer;
+ function GetUseAnchors(AControl: TControl): Boolean;
+ procedure SetBlinkRate(const Value: Integer);
+ procedure SetBlinkStyle(const Value: TJvErrorBlinkStyle);
+ procedure SetError(AControl: TControl; const Value: string);
+ procedure SetImageList(const Value: TCustomImageList);
+ procedure SetImageAlignment(AControl: TControl; const Value: TJvErrorImageAlignment);
+ procedure SetImagePadding(AControl: TControl; const Value: Integer);
+ procedure SetImageIndex(const Value: Integer);
+ procedure DoChangeLinkChange(Sender: TObject);
+ procedure DoBlink(Sender: TObject; Erase: Boolean);
+ procedure SetUseAnchors(AControl: TControl; AValue: Boolean);
+ procedure StopThread;
+ procedure StartThread;
+ function GetControl(Index: Integer): TJvErrorControl;
+ function GetCount: Integer;
+ protected
+ { IJvErrorIndicator }
+ procedure IJvErrorIndicator.SetError = IndicatorSetError;
+ procedure IndicatorSetError(AControl: TControl; const ErrorMessage: WideString);
+ procedure SetClientError(const AClient: IJvErrorIndicatorClient);
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+ function IndexOf(AControl: TControl): Integer;
+ function Add(AControl: TControl): Integer;
+ procedure UpdateControls;
+ procedure Delete(Index: Integer);
+ property Controls[Index: Integer]: TJvErrorControl read GetControl;
+ property Count: Integer read GetCount;
+ public
+ constructor Create(AComponent: TComponent); override;
+ destructor Destroy; override;
+
+ // Call ClearErrors to remove all error images with one call
+ // After a call to ClearErrors, the internal error image list is emptied
+ // Calling ClearErrors is the same as setting Error[nil] := '' but is slightly faster
+ procedure ClearErrors;
+ // The BeginUpdate method suspends the blinking thread until the EndUpdate method is called.
+ procedure BeginUpdate;
+ // EndUpdate re-enables the blinking thread that was turned off with the BeginUpdate method.
+ procedure EndUpdate;
+ // Gets or sets the error message associated with a control
+ // Setting the error message to an empty string removes the error image
+ // (this is the only way to remove an error image for a single control)
+ // Use Error[nil] := 'SomeValue'; to assign the error message 'SomeValue' to all controls
+ // Using Error[nil] := ''; is equivalent to calling ClearErrors but ClearErrors is faster
+ property Error[AControl: TControl]: string read GetError write SetError;
+ // Gets or sets a value indicating where the error image should be placed in relation to the control.
+ // The location can be further modified by assigning a non-zero value to ImagePadding
+ // Possible values:
+ // eiaBottomLeft - display the error image on the controls left side aligned to the bottom edge of the control
+ // eiaBottomRight - display the error image on the controls right side aligned to the bottom edge of the control
+ // eiaMiddleLeft - display the error image on the controls left side aligned to the middle of the control
+ // eiaMiddleRight - display the error image on the controls right side aligned to the middle of the control
+ // eiaTopLeft - display the error image on the controlsleft side aligned to the top edge of the control
+ // eiaTopRight - display the error image on the controls right side aligned to the top edge of the control
+ // Use AControl = nil to set the same Alignment for all controls
+ property ImageAlignment[AControl: TControl]: TJvErrorImageAlignment read GetImageAlignment write SetImageAlignment;
+ // Gets or sets the amount of extra space to leave between the specified control and the error image.
+ // Use AControl = nil to set the same padding for all controls.
+ property ImagePadding[AControl: TControl]: Integer read GetImagePadding write SetImagePadding;
+ //
+ property UseAnchors[AControl: TControl]: Boolean read GetUseAnchors write SetUseAnchors;
+ published
+ // The rate at which the error image should flash. The rate is expressed in milliseconds. The default is 250 milliseconds.
+ // A value of zero sets BlinkStyle to ebsNeverBlink.
+ property BlinkRate: Integer read FBlinkRate write SetBlinkRate default 250;
+ // The error Image flashes in the manner specified by the assigned BlinkStyle when an error occurs.
+ // Possible values:
+ // ebsBlinkIfDifferentError - blink if the new error message differs from the previous
+ // ebsAlwaysBlink - always blink when the error message changes, even if it's the same message
+ // ebsNeverBlink - never bink, just display the error image and the description
+ // Setting the BlinkRate to zero sets the BlinkStyle to ebsNeverBlink.
+ // The default is ebsBlinkIfDifferentError
+ property BlinkStyle: TJvErrorBlinkStyle read FBlinkStyle write SetBlinkStyle default ebsBlinkIfDifferentError;
+ // Gets or sets the ImageList where to retrieve an image to display next to a control when an error description
+ // string has been set for the control.
+ // This property is used in conjunction with ImageIndex to select the image to display
+ // If either is nil, invalid or out of range, no error image is displayed
+ property Images: TCustomImageList read FImageList write SetImageList;
+ // Gets or sets the ImageIndex in ImageList to use when displaying an image next to a control
+ property ImageIndex: Integer read FImageIndex write SetImageIndex;
+ property DefaultUseAnchors: Boolean read FDefaultUseAnchors write FDefaultUseAnchors;
+ end;
+
+implementation
+
+uses
+ //CommCtrl,
+ LCLProc,
+ SysUtils,
+ JvResources, JvJVCLUtils;
+
+{$R ..\resource\JvErrorIndicator.res}
+
+const
+ cDefBlinkCount = 5;
+
+type
+ TJvBlinkThreadEvent = procedure(Sender: TObject; Erase: Boolean) of object;
+
+ TJvBlinkThread = class(TThread)
+ private
+ FBlinkRate: Integer;
+ FErase: Boolean;
+ FOnBlink: TJvBlinkThreadEvent;
+ procedure Blink;
+ protected
+ procedure Execute; override;
+ public
+ constructor Create(BlinkRate: Integer; AOnBlink: TJvBlinkThreadEvent);
+ end;
+
+//=== { TJvErrorIndicator } ==================================================
+
+constructor TJvErrorIndicator.Create(AComponent: TComponent);
+
+begin
+ inherited Create(AComponent);
+ FDefaultImage := TImageList.CreateSize(16, 16);
+ FDefaultImage.AddResourceName(HINSTANCE, 'XJVERRORINDICATORICON');
+ //ImageList_AddIcon(FDefaultImage.Handle,
+ // LoadImage(HInstance, PChar('XJVERRORINDICATORICON'), IMAGE_ICON, 16, 16, 0));
+ FBlinkStyle := ebsBlinkIfDifferentError;
+ FBlinkRate := 250;
+ FControls := TList.Create;
+ FChangeLink := TChangeLink.Create;
+ FChangeLink.OnChange := @DoChangeLinkChange;
+end;
+
+destructor TJvErrorIndicator.Destroy;
+begin
+ StopThread;
+ ClearErrors;
+ FControls.Free;
+ FChangeLink.Free;
+ FDefaultImage.Free;
+ inherited Destroy;
+end;
+
+function TJvErrorIndicator.Add(AControl: TControl): Integer;
+var
+ Ci: TJvErrorControl;
+begin
+ Result := IndexOf(AControl);
+ if (Result < 0) and (AControl <> nil) then
+ begin
+ Ci := TJvErrorControl.Create(Self);
+ Ci.Control := AControl;
+ Ci.UseAnchors := DefaultUseAnchors;
+ // Ci.Name := Ci.Control.Name + '_ErrorControl';
+ Result := FControls.Add(Ci);
+ end;
+end;
+
+procedure TJvErrorIndicator.Delete(Index: Integer);
+begin
+ Controls[Index].Free; // removes itself from FControls[]
+end;
+
+function TJvErrorIndicator.GetError(AControl: TControl): string;
+var
+ I: Integer;
+begin
+ I := IndexOf(AControl);
+ if I > -1 then
+ Result := Controls[I].Error
+ else
+ raise Exception.Create(RsEControlNotFoundInGetError);
+end;
+
+function TJvErrorIndicator.GetImageAlignment(AControl: TControl): TJvErrorImageAlignment;
+var
+ I: Integer;
+begin
+ I := IndexOf(AControl);
+ if I > -1 then
+ Result := Controls[I].ImageAlignment
+ else
+ raise Exception.Create(RsEControlNotFoundInGetImageAlignment);
+end;
+
+function TJvErrorIndicator.GetImagePadding(AControl: TControl): Integer;
+var
+ I: Integer;
+begin
+ I := IndexOf(AControl);
+ if I > -1 then
+ Result := Controls[I].ImagePadding
+ else
+ raise Exception.Create(RsEControlNotFoundInGetImagePadding);
+end;
+
+function TJvErrorIndicator.GetUseAnchors(AControl: TControl): Boolean;
+var
+ I: Integer;
+begin
+ I := IndexOf(AControl);
+ if I > -1 then
+ Result := Controls[I].UseAnchors
+ else
+ raise Exception.Create(RsEControlNotFoundInGetUseAnhors);
+end;
+
+function TJvErrorIndicator.IndexOf(AControl: TControl): Integer;
+begin
+ if AControl <> nil then
+ for Result := 0 to Count - 1 do
+ if Controls[Result].Control = AControl then
+ Exit;
+ Result := -1;
+end;
+
+procedure TJvErrorIndicator.Notification(AComponent: TComponent;
+ Operation: TOperation);
+var
+ I: Integer;
+begin
+ inherited Notification(AComponent, Operation);
+ if Operation = opRemove then
+ begin
+ if AComponent is TControl then
+ I := IndexOf(TControl(AComponent))
+ else
+ I := -1;
+ if I > -1 then
+ Delete(I);
+ if AComponent = Images then
+ Images := nil;
+ end;
+end;
+
+procedure TJvErrorIndicator.SetBlinkRate(const Value: Integer);
+begin
+ if FBlinkRate <> Value then
+ begin
+ StopThread;
+ FBlinkRate := Value;
+ if FBlinkRate <= 0 then
+ begin
+ FBlinkRate := 0;
+ FBlinkStyle := ebsNeverBlink;
+ end;
+ UpdateControls;
+ end;
+end;
+
+procedure TJvErrorIndicator.SetBlinkStyle(const Value: TJvErrorBlinkStyle);
+begin
+ if FBlinkStyle <> Value then
+ begin
+ StopThread;
+ FBlinkStyle := Value;
+ UpdateControls;
+ end;
+end;
+
+procedure TJvErrorIndicator.SetError(AControl: TControl;
+ const Value: string);
+var
+ I: Integer;
+ Ei: TJvErrorControl;
+begin
+ StopThread;
+ if AControl = nil then
+ begin
+ if Value = '' then
+ ClearErrors
+ else
+ for I := 0 to Count - 1 do
+ begin
+ Ei := Controls[I];
+ if ((Ei.Error <> Value) and (BlinkStyle = ebsBlinkIfDifferentError)) or (BlinkStyle = ebsAlwaysBlink) then
+ Ei.BlinkCount := cDefBlinkCount
+ else
+ if BlinkStyle = ebsNeverBlink then
+ Ei.BlinkCount := 0;
+ Ei.Error := Value;
+ end;
+ end
+ else
+ begin
+ I := Add(AControl);
+ if I > -1 then
+ begin
+ if Value = '' then
+ Delete(I)
+ else
+ begin
+ Ei := Controls[I];
+ if ((Ei.Error <> Value) and (BlinkStyle = ebsBlinkIfDifferentError)) or
+ (BlinkStyle = ebsAlwaysBlink) then
+ begin
+ Ei.Error := Value;
+ Ei.BlinkCount := cDefBlinkCount;
+ Ei.Visible := (csDesigning in ComponentState);
+ if (FUpdateCount = 0) and (FBlinkThread = nil) then
+ StartThread;
+ end
+ else
+ if BlinkStyle = ebsNeverBlink then
+ begin
+ Ei.BlinkCount := 0;
+ Ei.Error := Value;
+ Ei.Visible := (Value <> '');
+ end;
+ end;
+ UpdateControls;
+ end
+ else
+ raise Exception.Create(RsEUnableToAddControlInSetError);
+ end;
+end;
+
+procedure TJvErrorIndicator.SetImageAlignment(AControl: TControl;
+ const Value: TJvErrorImageAlignment);
+var
+ I: Integer;
+begin
+ if AControl = nil then
+ for I := 0 to Count - 1 do
+ Controls[I].ImageAlignment := Value
+ else
+ begin
+ I := Add(AControl);
+ if I > -1 then
+ Controls[I].ImageAlignment := Value
+ else
+ raise Exception.Create(RsEUnableToAddControlInSetImageAlignme);
+ end;
+end;
+
+procedure TJvErrorIndicator.SetImagePadding(AControl: TControl;
+ const Value: Integer);
+var
+ I: Integer;
+begin
+ if AControl = nil then
+ for I := 0 to Count - 1 do
+ Controls[I].ImagePadding := Value
+ else
+ begin
+ I := Add(AControl);
+ if I > -1 then
+ Controls[I].ImagePadding := Value
+ else
+ raise Exception.Create(RsEUnableToAddControlInSetImagePadding);
+ end;
+end;
+
+procedure TJvErrorIndicator.UpdateControls;
+var
+ I, J: Integer;
+ IL: TCustomImageList;
+begin
+ if Images <> nil then
+ begin
+ IL := Images;
+ J := ImageIndex;
+ end
+ else
+ begin
+ IL := FDefaultImage;
+ J := 0;
+ end;
+ for I := 0 to Count - 1 do
+ begin
+ Controls[I].Images := IL;
+ Controls[I].ImageIndex := J;
+ end;
+end;
+
+procedure TJvErrorIndicator.SetImageList(const Value: TCustomImageList);
+begin
+ if FImageList <> Value then
+ begin
+ StopThread;
+ ReplaceImageListReference(Self, Value, FImageList, FChangeLink);
+ UpdateControls;
+ end;
+end;
+
+procedure TJvErrorIndicator.SetImageIndex(const Value: Integer);
+begin
+ if FImageIndex <> Value then
+ begin
+ StopThread;
+ FImageIndex := Value;
+ UpdateControls;
+ end;
+end;
+
+procedure TJvErrorIndicator.DoChangeLinkChange(Sender: TObject);
+begin
+ UpdateControls;
+end;
+
+procedure TJvErrorIndicator.ClearErrors;
+var
+ I: Integer;
+begin
+ StopThread;
+ for I := Count - 1 downto 0 do
+ Controls[I].Free;
+ FControls.Clear;
+end;
+
+procedure TJvErrorIndicator.BeginUpdate;
+{var
+ I: Integer;}
+begin
+ Inc(FUpdateCount);
+ StopThread;
+ // ahuser: The following code produces flicker
+ {for I := 0 to Count - 1 do
+ Controls[I].Visible := False;}
+end;
+
+procedure TJvErrorIndicator.EndUpdate;
+begin
+ if FUpdateCount > 0 then
+ begin
+ Dec(FUpdateCount);
+ if FUpdateCount = 0 then
+ begin
+ UpdateControls;
+ StartThread;
+ end;
+ end;
+end;
+
+procedure TJvErrorIndicator.StartThread;
+begin
+ if BlinkStyle <> ebsNeverBlink then
+ FBlinkThread := TJvBlinkThread.Create(BlinkRate, @DoBlink);
+end;
+
+procedure TJvErrorIndicator.StopThread;
+begin
+ if FBlinkThread <> nil then
+ try
+ FBlinkThread.Terminate;
+ FBlinkThread.WaitFor;
+ finally
+ FreeAndNil(FBlinkThread);
+ end;
+end;
+
+procedure TJvErrorIndicator.DoBlink(Sender: TObject; Erase: Boolean);
+var
+ I: Integer;
+begin
+ for I := 0 to Count - 1 do
+ Controls[I].DrawImage(Erase);
+end;
+
+procedure TJvErrorIndicator.SetUseAnchors(AControl: TControl; AValue: Boolean);
+var
+ I: Integer;
+begin
+ if AControl = nil then
+ for I := 0 to Count - 1 do
+ Controls[I].UseAnchors := AValue
+ else
+ begin
+ I := Add(AControl);
+ if I > -1 then
+ Controls[I].UseAnchors := AValue
+ else
+ raise Exception.Create(RsEUnableToAddControlInSetImagePadding);
+ end;
+end;
+
+function TJvErrorIndicator.GetControl(Index: Integer): TJvErrorControl;
+begin
+ Result := TJvErrorControl(FControls[Index]);
+end;
+
+function TJvErrorIndicator.GetCount: Integer;
+begin
+ Result := FControls.Count;
+end;
+
+procedure TJvErrorIndicator.SetClientError(const AClient: IJvErrorIndicatorClient);
+begin
+ if AClient <> nil then
+ SetError(AClient.GetControl, UTF8Encode(AClient.ErrorMessage));
+end;
+
+procedure TJvErrorIndicator.IndicatorSetError(AControl: TControl;
+ const ErrorMessage: WideString);
+begin
+ SetError(AControl, UTF8Encode(ErrorMessage));
+end;
+
+//=== { TJvErrorControl } ====================================================
+
+constructor TJvErrorControl.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ FImageAlignment := eiaMiddleRight;
+ ShowHint := True;
+ Visible := False;
+ Width := 16;
+ Height := 16;
+end;
+
+destructor TJvErrorControl.Destroy;
+begin
+ TJvErrorIndicator(Owner).FControls.Extract(Self);
+ Control := nil;
+ inherited Destroy;
+end;
+
+procedure TJvErrorControl.DrawImage(Erase: Boolean);
+begin
+ if not Assigned(Control) or not Assigned(Control.Parent) or not Assigned(Images) then
+ Exit;
+ Visible := (Error <> '') and (not Erase or (BlinkCount < 2));
+ if not Visible and (BlinkCount > 1) then
+ Dec(FBlinkCount);
+ if Visible then
+ if UseAnchors then
+ UpdateAnchors
+ else
+ BoundsRect := CalcBoundsRect;
+end;
+
+function TJvErrorControl.CalcBoundsRect: TRect;
+begin
+ if (Control = nil) or (Images = nil) then
+ Result := Rect(0, 0, 0, 0)
+ else
+ begin
+ case ImageAlignment of
+ eiaBottomLeft:
+ begin
+ // must qualify Result fully since Delphi confuses the TRect with the controls Top/Left properties
+ Result.Right := Control.Left - 1;
+ Result.Left := Result.Right - Images.Width;
+ Result.Bottom := Control.Top + Control.Height;
+ Result.Top := Result.Bottom - Images.Height;
+ OffsetRect(Result, -ImagePadding, 0);
+ end;
+ eiaBottomRight:
+ begin
+ Result.Left := Control.Left + Control.Width + 1;
+ Result.Right := Result.Left + Images.Width;
+ Result.Bottom := Control.Top + Control.Height;
+ Result.Top := Result.Bottom - Images.Height;
+ OffsetRect(Result, ImagePadding, 0);
+ end;
+ eiaMiddleLeft:
+ begin
+ Result.Right := Control.Left - 1;
+ Result.Left := Result.Right - Images.Width;
+ Result.Top := Control.Top + (Control.Height - Images.Height) div 2;
+ Result.Bottom := Result.Top + Images.Height;
+ OffsetRect(Result, -ImagePadding, 0);
+ end;
+ eiaMiddleRight:
+ begin
+ Result.Left := Control.Left + Control.Width + 1;
+ Result.Right := Result.Left + Images.Width;
+ Result.Top := Control.Top + (Control.Height - Images.Height) div 2;
+ Result.Bottom := Result.Top + Images.Height;
+ OffsetRect(Result, ImagePadding, 0);
+ end;
+ eiaTopLeft:
+ begin
+ Result.Right := Control.Left - 1;
+ Result.Left := Result.Right - Images.Width;
+ Result.Top := Control.Top;
+ Result.Bottom := Result.Top + Control.Height;
+ OffsetRect(Result, -ImagePadding, 0);
+ end;
+ eiaTopRight:
+ begin
+ Result.Left := Control.Left + Control.Width + 1;
+ Result.Right := Result.Left + Images.Width;
+ Result.Top := Control.Top;
+ Result.Bottom := Result.Top + Images.Height;
+ OffsetRect(Result, ImagePadding, 0);
+ end;
+ end;
+ end;
+end;
+
+procedure TJvErrorControl.Paint;
+begin
+ // inherited Paint;
+ if (Images <> nil) and Visible then
+ Images.Draw(Canvas, 0, 0, ImageIndex, dsTransparent, itImage);
+end;
+
+procedure TJvErrorControl.SetError(const Value: string);
+begin
+ Hint := Value;
+end;
+
+function TJvErrorControl.GetError: string;
+begin
+ Result := Hint;
+end;
+
+procedure TJvErrorControl.SetImageIndex(const Value: Integer);
+begin
+ if FImageIndex <> Value then
+ begin
+ FImageIndex := Value;
+ Invalidate;
+ end;
+end;
+
+procedure TJvErrorControl.SetImageList(const Value: TCustomImageList);
+begin
+ if ReplaceComponentReference(Self, Value, TComponent(FImageList)) then
+ begin
+ if FImageList <> nil then
+ if UseAnchors then
+ UpdateAnchors
+ else
+ BoundsRect := CalcBoundsRect
+ else
+ SetBounds(Left, Top, 16, 16);
+ // Invalidate;
+ end;
+end;
+
+procedure TJvErrorControl.SetControl(const Value: TControl);
+begin
+ if FControl <> Value then
+ begin
+ ReplaceComponentReference(Self, Value, TComponent(FControl));
+ if FControl <> nil then
+ Parent := FControl.Parent
+ else
+ Parent := nil;
+ end;
+end;
+
+procedure TJvErrorControl.SetUseAnchors(AValue: Boolean);
+begin
+ if FUseAnchors = AValue then Exit;
+ FUseAnchors := AValue;
+end;
+
+procedure TJvErrorControl.Notification(AComponent: TComponent;
+ Operation: TOperation);
+begin
+ inherited Notification(AComponent, Operation);
+ if (Operation = opRemove) then
+ if (AComponent = Control) then
+ Control := nil
+ else if (AComponent = FImageList) then
+ FImageList := nil
+end;
+
+procedure TJvErrorControl.UpdateAnchors;
+begin
+ if (Control = nil) or (Images = nil) then
+ begin
+ SetBounds(0, 0, 0, 0);
+ Exit;
+ end
+ else
+ begin
+ AnchorSide[akLeft].Control := nil;
+ AnchorSide[akTop].Control := nil;
+ AnchorSide[akBottom].Control := nil;
+ AnchorSide[akRight].Control := nil;
+ SetBounds(0, 0, Images.Width, Images.Height);
+ case ImageAlignment of
+ eiaBottomLeft:
+ begin
+ AnchorSideLeft.Control := Control;
+ AnchorSideLeft.Side := asrLeft;
+ AnchorSideTop.Control := Control;
+ AnchorSideTop.Side := asrBottom;
+ end;
+ eiaBottomRight:
+ begin
+ AnchorSideRight.Control := Control;
+ AnchorSideRight.Side := asrRight;
+ AnchorSideTop.Control := Control;
+ AnchorSideTop.Side := asrBottom;
+ end;
+ eiaMiddleLeft:
+ begin
+ AnchorVerticalCenterTo(Control);
+ AnchorSideRight.Control := Control;
+ AnchorSideRight.Side := asrLeft;
+ end;
+ eiaMiddleRight:
+ begin
+ AnchorVerticalCenterTo(Control);
+ AnchorSideLeft.Control := Control;
+ AnchorSideLeft.Side := asrRight;
+ end;
+ eiaTopLeft:
+ begin
+ AnchorSideLeft.Control := Control;
+ AnchorSideLeft.Side := asrLeft;
+ AnchorSideBottom.Control := Control;
+ AnchorSideBottom.Side := asrTop;
+ end;
+ eiaTopRight:
+ begin
+ AnchorSideRight.Control := Control;
+ AnchorSideRight.Side := asrRight;
+ AnchorSideBottom.Control := Control;
+ AnchorSideBottom.Side := asrTop;
+ end;
+ end;
+ end;
+end;
+
+//=== { TJvBlinkThread } =====================================================
+
+constructor TJvBlinkThread.Create(BlinkRate: Integer; AOnBlink: TJvBlinkThreadEvent);
+begin
+ inherited Create(False);
+ FBlinkRate := BlinkRate;
+ FErase := False;
+ FOnBlink := AOnBlink;
+end;
+
+procedure TJvBlinkThread.Blink;
+begin
+ if Assigned(FOnBlink) then
+ FOnBlink(Self, FErase);
+end;
+
+procedure TJvBlinkThread.Execute;
+begin
+ //NameThread(ThreadName);
+ FErase := False;
+ while not Terminated and not Suspended do
+ begin
+ Sleep(FBlinkRate);
+ Synchronize(@Blink);
+ if FBlinkRate = 0 then
+ Exit;
+ FErase := not FErase;
+ end;
+end;
+
+end.
diff --git a/components/jvcllaz/run/JvExControls.pas b/components/jvcllaz/run/JvExControls.pas
index 666f56215..765b0b5c6 100644
--- a/components/jvcllaz/run/JvExControls.pas
+++ b/components/jvcllaz/run/JvExControls.pas
@@ -52,6 +52,13 @@ type
dcNative); // if dcNative is in the set the native allowed keys are used and GetDlgCode is ignored
TDlgCodes = set of TDlgCode;
+ {$IFDEF WINDOWS}
+ TSmallPoint = Types.TSmallPoint;
+ {$ENDIF}
+ {$IFDEF LINUX}
+ TSmallPoint = Classes.TSmallPoint;
+ {$ENDIF}
+
(******************** NOT CONVERTED
const
dcWantMessage = dcWantAllKeys;
@@ -134,7 +141,8 @@ procedure HandleDotNetHighlighting(Control: TWinControl; const Msg: TLMessage;
MouseOver: Boolean; Color: TColor);
function CreateWMMessage(Msg: Integer; WParam: PtrInt; LParam: PtrInt): TLMessage; overload; {$IFDEF SUPPORTS_INLINE} inline {$ENDIF}
function CreateWMMessage(Msg: Integer; WParam: PtrInt; LParam: TControl): TLMessage; overload; {$IFDEF SUPPORTS_INLINE} inline {$ENDIF}
-function SmallPointToLong(const Pt: TSmallPoint): Longint; {$IFDEF SUPPORTS_INLINE} inline {$ENDIF}
+//function SmallPointToLong(const Pt: Classes.TSmallPoint): Longint; {$IFDEF SUPPORTS_INLINE} inline {$ENDIF}
+function SmallPointToLong(const Pt: TSmallPoint): LongInt; {$IFDEF SUPPORTS_INLINE} inline {$ENDIF}
function ShiftStateToKeyData(Shift: TShiftState): Longint;
//******************** NOT CONVERTED
@@ -370,7 +378,8 @@ begin
Self.Msg.Result := 0;
end;
-function SmallPointToLong(const Pt: TSmallPoint): Longint;
+function SmallPointToLong(const Pt: TSmallPoint): LongInt;
+//function SmallPointToLong(const Pt: Classes.TSmallPoint): Longint;
begin
Result := Longint(Pt);
end;
diff --git a/components/jvcllaz/run/JvHint.pas b/components/jvcllaz/run/JvHint.pas
new file mode 100644
index 000000000..fea7a0636
--- /dev/null
+++ b/components/jvcllaz/run/JvHint.pas
@@ -0,0 +1,264 @@
+{-----------------------------------------------------------------------------
+The contents of this file are subject to the Mozilla Public License
+Version 1.1 (the "License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+http://www.mozilla.org/MPL/MPL-1.1.html
+
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for
+the specific language governing rights and limitations under the License.
+
+The Original Code is: JvHint.PAS, released on 2002-07-04.
+
+The Initial Developers of the Original Code are: Andrei Prygounkov
+Copyright (c) 1999, 2002 Andrei Prygounkov
+All Rights Reserved.
+
+Contributor(s):
+
+You may retrieve the latest version of this file at the Project JEDI's JVCL home page,
+located at http://jvcl.delphi-jedi.org
+
+component : TJvHint
+description : Custom activated hint
+
+Known Issues:
+-----------------------------------------------------------------------------}
+// $Id$
+
+unit JvHint;
+
+{$mode objfpc}{$H+}
+
+//{.$I jvcl.inc}
+
+interface
+
+uses
+ SysUtils, Classes,
+ Controls, Forms, ExtCtrls,
+ JvHtControls, JvTypes;
+
+type
+ TJvHintWindow = class(THintWindow)
+ public
+ property Caption;
+ end;
+ TJvHintWindowClass = class of TJvHintWindow;
+
+ TJvHintState = (tmBeginShow, tmShowing, tmStopped);
+
+ TJvHint = class(TComponent)
+ private
+ FAutoHide: Boolean;
+ protected
+ // (rom) definitely needs cleanup here bad structuring
+ R: TRect;
+ Area: TRect;
+ State: TJvHintState;
+ Txt: THintString;
+ HintWindow: TJvHintWindow;
+ TimerHint: TTimer;
+ FDelay: Integer;
+ procedure TimerHintTimer(Sender: TObject);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure ActivateHint(AArea: TRect; ATxt: THintString);
+ procedure ActivateHintAt(AArea: TRect; ATxt: THintString; ScreenPos: TPoint);
+ procedure CancelHint;
+ published
+ property AutoHide: Boolean read FAutoHide write FAutoHide default True;
+ end;
+
+ TJvHTHintWindow = class(THintWindow)
+ private
+ HtLabel: TJvHTLabel;
+ protected
+ public
+ constructor Create(AOwner: TComponent); override;
+ function CalcHintRect({%H-}MaxWidth: Integer;
+ const AHint: THintString; AData: Pointer): TRect; override;
+ procedure Paint; override;
+ end;
+
+procedure RegisterHtHints;
+
+implementation
+
+uses
+ Math, LCLIntf, LCLType,
+ JvResources;
+
+//=== { TJvHint } ============================================================
+
+constructor TJvHint.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ TimerHint := TTimer.Create(Self);
+ TimerHint.Enabled := False;
+ TimerHint.Interval := 50;
+ TimerHint.OnTimer := @TimerHintTimer;
+ HintWindow := TJvHintWindowClass.Create(Self);
+ ShowWindow(HintWindow.Handle, SW_HIDE);
+ FAutoHide := True;
+end;
+
+destructor TJvHint.Destroy;
+begin
+ TimerHint.Free;
+ HintWindow.Free;
+ inherited Destroy;
+end;
+
+procedure TJvHint.ActivateHint(AArea: TRect; ATxt: THintString);
+var
+ P: TPoint = (X:0; y:0); // silence the compiler...
+begin
+ GetCursorPos(P);
+ Inc(P.Y, 20);
+ ActivateHintAt(AArea, ATxt, P);
+end;
+
+procedure TJvHint.ActivateHintAt(AArea: TRect; ATxt: THintString; ScreenPos: TPoint);
+var
+ P: TPoint = (X: 0; Y: 0); // silence the compiler
+begin
+ Area := AArea;
+ if ATxt = '' then
+ begin
+ CancelHint;
+ Exit;
+ end
+ else
+ Txt := ATxt;
+ GetCursorPos(P);
+ if not PtInRect(Area, P) then
+ begin
+ if IsWindowVisible(HintWindow.Handle) then
+ ShowWindow(HintWindow.Handle, SW_HIDE);
+ Exit;
+ end;
+ if HintWindow.Caption <> Txt then
+ begin
+ R := HintWindow.CalcHintRect(Screen.Width, Txt, nil);
+ R.Top := ScreenPos.Y;
+ R.Left := ScreenPos.X;
+ Inc(R.Bottom, R.Top);
+ Inc(R.Right, R.Left);
+ State := tmBeginShow;
+ TimerHint.Enabled := True;
+ end;
+end;
+
+procedure TJvHint.TimerHintTimer(Sender: TObject);
+var
+ P: TPoint = (X: 0; Y: 0); // silence the compiler
+ bPoint, bDelay: Boolean;
+ Delay: Integer;
+ HintPause: Integer;
+begin
+ HintWindow.Color := Application.HintColor;
+ Delay := FDelay * Integer(TimerHint.Interval);
+ case State of
+ tmBeginShow:
+ begin
+ GetCursorPos(P);
+ bPoint := not PtInRect(Area, P);
+ if bPoint then
+ begin
+ State := tmStopped;
+ Exit;
+ end;
+ if IsWindowVisible(HintWindow.Handle) then
+ HintPause := Application.HintShortPause
+ else
+ HintPause := Application.HintPause;
+ if Delay >= HintPause then
+ begin
+ HintWindow.ActivateHint(R, Txt);
+ FDelay := 0;
+ State := tmShowing;
+ end
+ else
+ Inc(FDelay);
+ end;
+ tmShowing:
+ begin
+ GetCursorPos(P);
+ bDelay := FAutoHide and (Delay > Application.HintHidePause);
+ bPoint := not PtInRect(Area, P);
+ if bPoint or bDelay then
+ begin
+ if IsWindowVisible(HintWindow.Handle) then
+ ShowWindow(HintWindow.Handle, SW_HIDE);
+ FDelay := 0;
+ if bPoint then
+ HintWindow.Caption := RsHintCaption;
+ State := tmStopped;
+ end
+ else
+ Inc(FDelay);
+ end;
+ tmStopped:
+ begin
+ FDelay := 0;
+ GetCursorPos(P);
+ bPoint := not PtInRect(Area, P);
+ if IsWindowVisible(HintWindow.Handle) then
+ ShowWindow(HintWindow.Handle, SW_HIDE);
+ if bPoint then
+ begin
+ HintWindow.Caption := RsHintCaption;
+ TimerHint.Enabled := False;
+ end;
+ end;
+ end;
+end;
+
+procedure TJvHint.CancelHint;
+begin
+ if IsWindowVisible(HintWindow.Handle) then
+ ShowWindow(HintWindow.Handle, SW_HIDE);
+ HintWindow.Caption := '';
+end;
+
+//=== { TJvHTHintWindow } ====================================================
+
+constructor TJvHTHintWindow.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ HtLabel := TJvHTLabel.Create(Self);
+ HtLabel.Parent := Self;
+ HtLabel.SetBounds(2, 2, 0, 0);
+end;
+
+procedure TJvHTHintWindow.Paint;
+begin
+end;
+
+function TJvHTHintWindow.CalcHintRect(MaxWidth: Integer;
+ const AHint: THintString; AData: Pointer): TRect;
+begin
+ HtLabel.Caption := AHint;
+ Result := Bounds(0, 0, HtLabel.Width + 6, HtLabel.Height + 2);
+ if Application.HintHidePause > 0 then
+ Application.HintHidePause :=
+ Max(2500, // default
+ Length(ItemHtPlain(AHint)) *
+ (1000 div 20)); // 20 symbols per second
+end;
+
+procedure RegisterHtHints;
+begin
+ if Application.ShowHint then
+ begin
+ Application.ShowHint := False;
+ HintWindowClass := TJvHTHintWindow;
+ Application.ShowHint := True;
+ end
+ else
+ HintWindowClass := TJvHTHintWindow;
+end;
+
+end.
diff --git a/components/jvcllaz/run/JvHtControls.pas b/components/jvcllaz/run/JvHtControls.pas
new file mode 100644
index 000000000..d92172319
--- /dev/null
+++ b/components/jvcllaz/run/JvHtControls.pas
@@ -0,0 +1,1061 @@
+{-----------------------------------------------------------------------------
+The contents of this file are subject to the Mozilla Public License
+Version 1.1 (the "License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+http://www.mozilla.org/MPL/MPL-1.1.html
+
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for
+the specific language governing rights and limitations under the License.
+
+The Original Code is: JvHTControls.PAS, released on 2002-07-04.
+
+The Initial Developers of the Original Code are: Andrei Prygounkov
+CopyRight (c) 1999, 2002 Andrei Prygounkov
+All Rights Reserved.
+
+Contributor(s):
+ Maciej Kaczkowski
+ Timo Tegtmeier
+ Andreas Hausladen
+
+You may retrieve the latest version of this file at the Project JEDI's JVCL home page,
+located at http://jvcl.delphi-jedi.org
+
+Description:
+ HT Controls
+
+Known Issues:
+Maciej Kaczkowski:
+ [X] alignment not work correctly on JvHTButtonGlyph
+ [X] not tested on BCB & Kylix
+ [X] hyperlink work only whet alignment is left
+
+Some information about coding:
+ [?] If you want use few times function you must use before next function
+
+Changes:
+========
+Peter Thornqvist:
+ 2004-01-279
+ + Moved implementations to TJvCustomXXX classed
+ + Now the registered controls only publish properties and events
+André Snepvangers:
+ 2004-01-06
+ VisualCLX compatible version
+Maciej Kaczkowski:
+ 2003-09-16
+ [+]
- new line
+ [+]
- horizontal line
+ [+] and - StrikeOut
+ [+] Multiline for JvHTListBox, JvHTComboBox, TJvHTButton
+ [+] You can change Height of JvHTComboBox
+ [+] Tags: & " ® © ™ < >
+ [+]
+ [*] was changed to ex.:
+
+ [*] procedure ItemHTDrawEx - rewrited
+ [*] function ItemHTPlain - optimized
+
+ 2003-09-23
+ [*] fixed problem with
- just use
+ [-] fixed problem with inserting htcombobox on form
+ [-] variable height is not work in design time, to use this put in code ex.:
+ htcombobox1.SetHeight(40)
+ to read height
+ Value := htcombobox1.GetItemHeight;
+ [-] Removed (var PlainItem: string) from header ItemHTDrawEx;
+ [-] Alignment from TJvHTLabel was removed
+ [+] SelectedColor, SelectedTextColor from JvMultilineListBox was moved to
+ JvHTListBox and JvHTComboBox as ColorHighlight and ColorHighlightText
+
+ 2003-09-27
+ [-] fixed problem transparent color on JvHTlabel
+ [-] fixed problem with layout on JvHTlabel
+ [*] when TJvHTlabel is not enabled has pseudo 3D color
+ [+] ColorDisabledText (JvHTcombobox, JvHTlistbox) was moved from
+ jvmultilinelistbox
+ [-] fixed vertical scroll on JvHTlistbox
+ [-] minor bugs fixed
+
+ 2003-10-04
+ [-] JVCL 3.0 compatibility
+
+ 2003-10-09
+ [-] Removed +1 pixel from each line (place for
) to save compatibility
+ with other labels
+ [*] reorganized function
+ [+] Added tag € (non-standard but useful)
+ [+] Added for hyper link where %s is linkname
+ but work only when alignment is left
+ [+] Added to TJvHTLabel: OnHyperLinkClick(Sender; LinkText)
+ [+] Added where %d is indention from left
+
+ 2003-10-11
+ [*] fixed with alignment but work only when autosize=True
+ [*] fixed probem with autosize when alignment not left
+ [+] Added to JvHTListBox but the same problem with hyperlinks
+ when alignement is not left (need to rebuild the ItemHTDrawEx draw
+ function)
+-----------------------------------------------------------------------------}
+// $Id$
+
+unit JvHtControls;
+
+{$mode objfpc}{$H+}
+
+//{.$I jvcl.inc}
+
+interface
+
+uses
+ SysUtils, Classes,
+ {LMessages,} Graphics, {Contnrs,} Controls, StdCtrls, Dialogs,
+ JvJVCLUtils, {JvDataSourceIntf,} Types, LCLType{, JvExStdCtrls};
+
+const
+ DefaultSuperSubScriptRatio: Double = 2/3;
+
+type
+(*
+ TJvCustomListBoxDataConnector = class(TJvFieldDataConnector)
+ private
+ FListBox: TCustomListBox;
+ FMap: TList;
+ FRecNoMap: TBucketList;
+ protected
+ procedure Populate; virtual;
+ procedure ActiveChanged; override;
+ procedure RecordChanged; override;
+ property ListBox: TCustomListBox read FListBox;
+ public
+ constructor Create(AListBox: TCustomListBox);
+ destructor Destroy; override;
+
+ procedure GotoCurrent;
+ end;
+*)
+
+ TJvHyperLinkClickEvent = procedure(Sender: TObject; LinkName: string) of object;
+
+ { TJvCustomHTListBox }
+
+ TJvCustomHTListBox = class(TCustomListBox{TJvExCustomListBox})
+ private
+ //FDataConnector: TJvCustomListBoxDataConnector;
+ FOnHyperLinkClick: TJvHyperLinkClickEvent;
+ FHideSel: Boolean;
+ FColorHighlight: TColor;
+ FColorHighlightText: TColor;
+ FColorDisabledText: TColor;
+ //FDataConnector: TJvCustomListBoxDataConnector;
+ FSuperSubScriptRatio: Double;
+ //procedure SetDataConnector(AValue: TJvCustomListBoxDataConnector);
+ procedure SetHideSel(Value: Boolean);
+ function GetPlainItems(Index: Integer): string;
+ //procedure SetDataConnector(const Value: TJvCustomListBoxDataConnector);
+ function ISuperSuperSubScriptRatioStored: Boolean;
+ procedure SetSuperSubScriptRation(const Value: Double);
+ protected
+ //function CreateDataConnector: TJvCustomListBoxDataConnector; virtual;
+ procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
+ procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
+ procedure FontChanged(Sender: TObject); override;
+ //procedure Loaded; override;
+ procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); override;
+ public
+ constructor Create(AOwner: TComponent); override;
+ //destructor Destroy; override;
+ procedure MeasureItem(Index: Integer; var AHeight: Integer); override;
+ property PlainItems[Index: Integer]: string read GetPlainItems;
+ protected
+ //procedure CMChanged(var Message: TLMessage); message CM_CHANGED;
+ property HideSel: Boolean read FHideSel write SetHideSel;
+ property SuperSubScriptRatio: Double read FSuperSubScriptRatio write SetSuperSubScriptRation stored ISuperSuperSubScriptRatioStored;
+
+ property ColorHighlight: TColor read FColorHighlight write FColorHighlight;
+ property ColorHighlightText: TColor read FColorHighlightText write FColorHighlightText;
+ property ColorDisabledText: TColor read FColorDisabledText write FColorDisabledText;
+ property OnHyperLinkClick: TJvHyperLinkClickEvent read FOnHyperLinkClick write FOnHyperLinkClick;
+
+ //property DataConnector: TJvCustomListBoxDataConnector read FDataConnector write SetDataConnector;
+ end;
+
+ TJvHTListBox = class(TJvCustomHTListBox)
+ published
+ property HideSel;
+ property OnHyperLinkClick;
+
+ property Align;
+ property BorderStyle;
+ property Color;
+ property ColorHighlight;
+ property ColorHighlightText;
+ property ColorDisabledText;
+ property Columns;
+ property DragCursor;
+ property AutoSize;
+ property BiDiMode;
+ property DragKind;
+ property ParentBiDiMode;
+ property OnEndDock;
+ property OnStartDock;
+ property DragMode;
+ property Enabled;
+ property ExtendedSelect;
+ property Font;
+ //property IntegralHeight;
+ //property ItemHeight;
+ property Items;
+ property MultiSelect;
+ property ParentColor;
+ property ParentFont;
+ property ParentShowHint;
+ property PopupMenu;
+ property ShowHint;
+ property Sorted;
+ property SuperSubScriptRatio;
+ //property Style;
+ property TabOrder;
+ property TabStop;
+ property Visible;
+ property OnClick;
+ property OnDblClick;
+ property OnDragDrop;
+ property OnDragOver;
+ //property OnDrawItem;
+ property OnEndDrag;
+ property OnEnter;
+ property OnExit;
+ property OnKeyDown;
+ property OnKeyPress;
+ property OnKeyUp;
+ //property OnMeasureItem;
+ property OnMouseDown;
+ property OnMouseMove;
+ property OnMouseUp;
+ property OnStartDrag;
+ property Anchors;
+ property Constraints;
+
+ //property DataConnector;
+ end;
+
+ { TJvCustomHTComboBox }
+
+ TJvCustomHTComboBox = class(TCustomComboBox{TJvExCustomComboBox})
+ private
+ FHideSel: Boolean;
+ //FDropWidth: Integer;
+ FColorHighlight: TColor;
+ FColorHighlightText: TColor;
+ FColorDisabledText: TColor;
+ FSuperSubScriptRatio: Double;
+ procedure SetHideSel(Value: Boolean);
+ function GetPlainItems(Index: Integer): string;
+ //procedure SetDropWidth(ADropWidth: Integer);
+ function ISuperSuperSubScriptRatioStored: Boolean;
+ procedure SetSuperSubScriptRation(const Value: Double);
+ protected
+ procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); override;
+ procedure MeasureItem(Index: Integer; var TheHeight: Integer); override;
+ public
+ constructor Create(AOwner: TComponent); override;
+ property PlainItems[Index: Integer]: string read GetPlainItems;
+ //procedure SetHeight(Value: Integer);
+ //function GetHeight: Integer;
+ protected
+ property HideSel: Boolean read FHideSel write SetHideSel;
+ //property DropWidth: Integer read FDropWidth write SetDropWidth;
+ property ColorHighlight: TColor read FColorHighlight write FColorHighlight;
+ property ColorHighlightText: TColor read FColorHighlightText write FColorHighlightText;
+ property ColorDisabledText: TColor read FColorDisabledText write FColorDisabledText;
+ property SuperSubScriptRatio: Double read FSuperSubScriptRatio write SetSuperSubScriptRation stored ISuperSuperSubScriptRatioStored;
+ end;
+
+ TJvHTComboBox = class(TJvCustomHTComboBox)
+ published
+ property Anchors;
+ property HideSel;
+ //property DropWidth;
+ property ColorHighlight;
+ property ColorHighlightText;
+ property ColorDisabledText;
+ property Color;
+ // property Style;
+ property AutoSize;
+ property DragCursor;
+ property BiDiMode;
+ property DragKind;
+ property ParentBiDiMode;
+ property OnEndDock;
+ property OnStartDock;
+ property DragMode;
+ property DropDownCount;
+ property Enabled;
+ property Font;
+ // property ItemHeight;
+ property Items;
+ property MaxLength;
+ property ParentColor;
+ property ParentFont;
+ property ParentShowHint;
+ property PopupMenu;
+ property ShowHint;
+ property Sorted;
+ property SuperSubScriptRatio;
+ property TabOrder;
+ property TabStop;
+ property Text;
+ property Visible;
+ property OnChange;
+ property OnClick;
+ property OnDblClick;
+ property OnDragDrop;
+ property OnDragOver;
+ // property OnDrawItem;
+ property OnDropDown;
+ property OnEndDrag;
+ property OnEnter;
+ property OnExit;
+ property OnKeyDown;
+ property OnKeyPress;
+ property OnKeyUp;
+ // property OnMeasureItem;
+ property OnStartDrag;
+ property Constraints;
+ end;
+
+ TJvHTLabelMouseButtons = set of TMouseButton;
+
+ { TJvCustomHTLabel }
+
+ TJvCustomHTLabel = class(TCustomLabel{TJvExCustomLabel})
+ private
+ FHyperlinkHovered: Boolean;
+ FOnHyperLinkClick: TJvHyperLinkClickEvent;
+ FMouseX, FMouseY: Integer;
+ FHyperLinkMouseButtons: TJvHTLabelMouseButtons;
+ FSuperSubScriptRatio: Double;
+ function ISuperSuperSubScriptRatioStored: Boolean;
+ procedure SetSuperSubScriptRation(const Value: Double);
+ protected
+ procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
+ procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
+ procedure MouseLeave; override;
+ procedure FontChanged(Sender: TObject); override;
+ procedure PrepareCanvas;
+ function ComputeLayoutRect: TRect;
+ procedure SetAutoSize(Value: Boolean); override;
+ procedure Loaded; override;
+
+ property HyperLinkMouseButtons: TJvHTLabelMouseButtons read FHyperLinkMouseButtons write FHyperLinkMouseButtons default [mbLeft];
+ property OnHyperLinkClick: TJvHyperLinkClickEvent read FOnHyperLinkClick write FOnHyperLinkClick;
+ property SuperSubScriptRatio: Double read FSuperSubScriptRatio write SetSuperSubScriptRation stored ISuperSuperSubScriptRatioStored;
+ public
+ constructor Create(AOwner: TComponent); override;
+ procedure Paint; override;
+ procedure AdjustSize; override;
+ end;
+
+ TJvHTLabel = class(TJvCustomHTLabel)
+ private
+ procedure IgnoreWordWrap(Reader: TReader);
+ protected
+ procedure DefineProperties(Filer: TFiler); override; // ignore former published WordWrap
+ published
+ property Align;
+ property Anchors;
+ property AutoSize;
+ property Caption;
+ property Color;
+ property DragCursor;
+ property BiDiMode;
+ property DragKind;
+ property ParentBiDiMode;
+ property OnEndDock;
+ property OnStartDock;
+ property DragMode;
+ property Enabled;
+ property FocusControl;
+ property Font;
+ property ParentColor;
+ property ParentFont;
+ property ParentShowHint;
+ property PopupMenu;
+ // property ShowAccelChar; not supported
+ property ShowHint;
+ property SuperSubScriptRatio;
+ property Transparent;
+ property Visible;
+ // property WordWrap; not supported
+ property OnClick;
+ property OnDblClick;
+ property OnDragDrop;
+ property OnDragOver;
+ property OnEndDrag;
+ property OnMouseDown;
+ property OnMouseMove;
+ property OnMouseUp;
+ property OnStartDrag;
+ property Layout;
+ property Constraints;
+ property HyperLinkMouseButtons;
+ property OnHyperLinkClick;
+ end;
+
+procedure ItemHTDrawEx(Canvas: TCanvas; Rect: TRect;
+ const State: LCLType.TOwnerDrawState; const Text: string; out Width: Integer;
+ CalcType: TJvHTMLCalcType; MouseX, MouseY: Integer; out MouseOnLink: Boolean;
+ var LinkName: string; SuperSubScriptRatio: Double; Scale: Integer = 100);
+ { example for Text parameter : 'Item 1 bold italic ITALIC
red green blue ' }
+procedure ItemHTDraw(Canvas: TCanvas; Rect: TRect; const State: TOwnerDrawState;
+ const Text: string; SuperSubScriptRatio: Double; Scale: Integer = 100);
+procedure ItemHTDrawHL(Canvas: TCanvas; Rect: TRect; const State: TOwnerDrawState;
+ const Text: string; MouseX, MouseY: Integer; SuperSubScriptRatio: Double;
+ Scale: Integer = 100);
+function ItemHTPlain(const Text: string): string;
+function ItemHTExtent(Canvas: TCanvas; Rect: TRect; const State: TOwnerDrawState;
+ const Text: string; SuperSubScriptRatio: Double; Scale: Integer = 100): TSize;
+function ItemHTWidth(Canvas: TCanvas; Rect: TRect;
+ const State: TOwnerDrawState; const Text: string; SuperSubScriptRatio: Double; Scale: Integer = 100): Integer;
+function ItemHTHeight(Canvas: TCanvas; const Text: string; SuperSubScriptRatio: Double; Scale: Integer = 100): Integer;
+function PrepareText(const A: string): string; deprecated;
+
+implementation
+
+uses
+ LCLProc, LCLIntf, Forms;
+
+const
+ cMAILTO = 'MAILTO:';
+ cURLTYPE = '://';
+
+procedure ExecuteHyperlink(Sender: TObject; HyperLinkClick: TJvHyperLinkClickEvent; const LinkName: string);
+begin
+ if (Pos(cURLTYPE, LinkName) > 0) or // ftp:// http://
+ (Pos(cMAILTO, UpperCase(LinkName)) > 0) then // mailto:name@server.com
+ //ShellExecute(0, 'open', PChar(LinkName), nil, nil, SW_NORMAL);
+ OpenURL(LinkName);
+ if Assigned(HyperLinkClick) then
+ HyperLinkClick(Sender, LinkName);
+end;
+
+function PrepareText(const A: string): string;
+begin
+ Result := HTMLPrepareText(A);
+end;
+
+// wp: Made Width and MouseOnLink out parameters (instead of var) to silence
+// the compiler
+procedure ItemHTDrawEx(Canvas: TCanvas; Rect: TRect;
+ const State: LCLType.TOwnerDrawState; const Text: string; out Width: Integer;
+ CalcType: TJvHTMLCalcType; MouseX, MouseY: Integer; out MouseOnLink: Boolean;
+ var LinkName: string; SuperSubScriptRatio: Double; Scale: Integer = 100);
+begin
+ HTMLDrawTextEx(Canvas, Rect, State, Text, Width, CalcType, MouseX, MouseY, MouseOnLink, LinkName, SuperSubScriptRatio, Scale);
+end;
+
+// wp: made this a procedure because the result in the original function was not
+// set
+procedure ItemHTDraw(Canvas: TCanvas; Rect: TRect; const State: LCLType.TOwnerDrawState;
+ const Text: string; SuperSubScriptRatio: Double; Scale: Integer = 100);
+begin
+ HTMLDrawText(Canvas, Rect, State, Text, SuperSubScriptRatio, Scale);
+end;
+
+// wp: made this a procedure because the result in the original function was not
+// set
+procedure ItemHTDrawHL(Canvas: TCanvas; Rect: TRect; const State: LCLType.TOwnerDrawState;
+ const Text: string; MouseX, MouseY: Integer; SuperSubScriptRatio: Double;
+ Scale: Integer = 100);
+begin
+ HTMLDrawTextHL(Canvas, Rect, State, Text, MouseX, MouseY, SuperSubScriptRatio, Scale);
+end;
+
+function ItemHTPlain(const Text: string): string;
+begin
+ Result := HTMLPlainText(Text);
+end;
+
+function ItemHTExtent(Canvas: TCanvas; Rect: TRect; const State: LCLType.TOwnerDrawState;
+ const Text: string; SuperSubScriptRatio: Double; Scale: Integer = 100): TSize;
+begin
+ Result := HTMLTextExtent(Canvas, Rect, State, Text, SuperSubScriptRatio, Scale);
+end;
+
+function ItemHTWidth(Canvas: TCanvas; Rect: TRect;
+ const State: LCLType.TOwnerDrawState; const Text: string; SuperSubScriptRatio: Double; Scale: Integer = 100): Integer;
+begin
+ Result := HTMLTextWidth(Canvas, Rect, State, Text, SuperSubScriptRatio, Scale);
+end;
+
+function ItemHTHeight(Canvas: TCanvas; const Text: string; SuperSubScriptRatio: Double; Scale: Integer = 100): Integer;
+begin
+ Result := HTMLTextHeight(Canvas, Text, SuperSubScriptRatio, Scale);
+end;
+
+function IsHyperLinkPaint(Canvas: TCanvas; Rect: TRect; const State: LCLType.TOwnerDrawState;
+ const Text: string; MouseX, MouseY: Integer; var HyperLink: string): Boolean;
+var
+ W: Integer;
+begin
+ ItemHTDrawEx(Canvas, Rect, State, Text, W, htmlShow, MouseX, MouseY, Result, HyperLink, DefaultSuperSubScriptRatio);
+end;
+
+function IsHyperLink(Canvas: TCanvas; Rect: TRect; const Text: string;
+ MouseX, MouseY: Integer; var HyperLink: string): Boolean;
+var
+ W: Integer;
+begin
+ ItemHTDrawEx(Canvas, Rect, [], Text, W, htmlHyperLink, MouseX, MouseY, Result, HyperLink, DefaultSuperSubScriptRatio);
+end;
+
+//=== { TJvCustomListBoxDataConnector } ======================================
+
+(*
+constructor TJvCustomListBoxDataConnector.Create(AListBox: TCustomListBox);
+begin
+ inherited Create;
+ FListBox := AListBox;
+ FRecNoMap := TBucketList.Create;
+ FMap := TList.Create;
+end;
+
+destructor TJvCustomListBoxDataConnector.Destroy;
+begin
+ FMap.Free;
+ FRecNoMap.Free;
+ inherited Destroy;
+end;
+
+procedure TJvCustomListBoxDataConnector.GotoCurrent;
+begin
+ if Field.IsValid and (FListBox.ItemIndex <> -1) then
+ DataSource.RecNo := Integer(FMap[FListBox.ItemIndex]);
+end;
+
+procedure TJvCustomListBoxDataConnector.ActiveChanged;
+begin
+ Populate;
+ inherited ActiveChanged;
+end;
+
+procedure TJvCustomListBoxDataConnector.Populate;
+var
+ Index: Integer;
+begin
+ FMap.Clear;
+ FRecNoMap.Clear;
+ FListBox.Items.BeginUpdate;
+ try
+ FListBox.Items.Clear;
+ if Field.IsValid then
+ begin
+ DataSource.BeginUpdate;
+ try
+ DataSource.First;
+ while not DataSource.Eof do
+ begin
+ Index := FListBox.Items.Add(Field.AsString);
+ FMap.Add(TObject(DataSource.RecNo));
+ FRecNoMap.Add(TObject(DataSource.RecNo), TObject(Index));
+ DataSource.Next;
+ end;
+ finally
+ DataSource.EndUpdate;
+ end;
+ if FRecNoMap.Find(TObject(DataSource.RecNo), Pointer(Index)) then
+ FListBox.ItemIndex := Index;
+ end;
+ finally
+ FListBox.Items.EndUpdate;
+ end;
+end;
+
+procedure TJvCustomListBoxDataConnector.RecordChanged;
+var
+ Index: Integer;
+begin
+ if Field.IsValid then
+ begin
+ if FListBox.Items.Count <> DataSource.RecordCount then
+ Populate
+ else
+ if FRecNoMap.Find(TObject(DataSource.RecNo), Pointer(Index)) then
+ begin
+ FListBox.Items[Index] := Field.AsString;
+ FListBox.ItemIndex := Index;
+ end;
+ end;
+end;
+*)
+
+//=== { TJvCustomHTListBox } =================================================
+
+constructor TJvCustomHTListBox.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ //FDataConnector := CreateDataConnector;
+ Style := lbOwnerDrawVariable;
+ FColorHighlight := clHighlight;
+ FColorHighlightText := clHighlightText;
+ FColorDisabledText := clGrayText;
+ FSuperSubScriptRatio := DefaultSuperSubScriptRatio;
+end;
+
+//destructor TJvCustomHTListBox.Destroy;
+//begin
+// FDataConnector.Free;
+// inherited Destroy;
+//end;
+
+//procedure TJvCustomHTListBox.Loaded;
+//begin
+// inherited Loaded;
+// DataConnector.Reset;
+//end;
+
+//procedure TJvCustomHTListBox.CMChanged(var Message: TLMessage);
+//begin
+// inherited;
+// DataConnector.GotoCurrent;
+//end;
+
+procedure TJvCustomHTListBox.DrawItem(Index: Integer; Rect: TRect;
+ State: TOwnerDrawState);
+begin
+ if LCLType.odSelected in State then
+ begin
+ Canvas.Brush.Color := ColorHighlight;
+ Canvas.Font.Color := ColorHighlightText;
+ end;
+ if not Enabled then
+ Canvas.Font.Color := ColorDisabledText;
+
+ Canvas.FillRect(Rect);
+ Inc(Rect.Left, 2);
+ ItemHTDraw(Canvas, Rect, State, Items[Index], SuperSubScriptRatio);
+end;
+
+procedure TJvCustomHTListBox.MeasureItem(Index: Integer; var AHeight: Integer);
+begin
+ AHeight := ItemHTHeight(Canvas, Items[Index], SuperSubScriptRatio);
+end;
+
+//function TJvCustomHTListBox.CreateDataConnector: TJvCustomListBoxDataConnector;
+//begin
+// Result := TJvCustomListBoxDataConnector.Create(Self);
+//end;
+
+procedure TJvCustomHTListBox.FontChanged(Sender: TObject);
+begin
+ inherited FontChanged(Sender);
+ if not Assigned(Canvas) then
+ Exit; // VisualCLX needs this
+ Canvas.Font := Font;
+ ItemHeight := CanvasMaxTextHeight(Canvas);
+end;
+
+//procedure TJvCustomHTListBox.SetDataConnector(const Value: TJvCustomListBoxDataConnector);
+//begin
+// if Value <> FDataConnector then
+// FDataConnector.Assign(Value);
+//end;
+
+procedure TJvCustomHTListBox.SetHideSel(Value: Boolean);
+begin
+ FHideSel := Value;
+ Invalidate;
+end;
+
+procedure TJvCustomHTListBox.SetSuperSubScriptRation(const Value: Double);
+begin
+ if FSuperSubScriptRatio <> Value then
+ begin
+ FSuperSubScriptRatio := Value;
+ Invalidate;
+ end;
+end;
+
+function TJvCustomHTListBox.GetPlainItems(Index: Integer): string;
+begin
+ Result := ItemHTPlain(Items[Index]);
+end;
+
+function TJvCustomHTListBox.ISuperSuperSubScriptRatioStored: Boolean;
+begin
+ Result := FSuperSubScriptRatio <> DefaultSuperSubScriptRatio;
+end;
+
+procedure TJvCustomHTListBox.MouseMove(Shift: TShiftState; X, Y: Integer);
+var
+ R: TRect;
+ LinkName: string;
+ State: TOwnerDrawState;
+ I: Integer;
+begin
+ inherited MouseMove(Shift,X,Y);
+ I := Self.ItemAtPos(Point(X, Y), True);
+ if I = -1 then
+ Exit;
+ R := Self.ItemRect(I);
+ State := [];
+ if Self.Selected[I] then
+ begin
+ State := [odSelected];
+ Canvas.Font.Color := FColorHighlightText;
+ Canvas.Brush.Color := FColorHighlight;
+ end
+ else
+ begin
+ Canvas.Font.Color := Font.Color;
+ Canvas.Brush.Color := Color;
+ end;
+ Inc(R.Left, 2);
+ if IsHyperLinkPaint(Canvas, R, State, Items[I], X, Y, LinkName) then
+ Cursor := crHandPoint
+ else
+ Cursor := crDefault;
+end;
+
+procedure TJvCustomHTListBox.MouseUp(Button: TMouseButton; Shift: TShiftState;
+ X, Y: Integer);
+var
+ R: TRect;
+ LinkName: string;
+ State: TOwnerDrawState;
+ I: Integer;
+begin
+ inherited MouseUp(Button,Shift, X, Y);
+ I := Self.ItemAtPos(Point(X, Y), True);
+ if I <> -1 then
+ begin
+ R := Self.ItemRect(I);
+ State := [];
+ if Self.Selected[I] then
+ begin
+ State := [odSelected];
+ Canvas.Font.Color := ColorHighlightText
+ end
+ else
+ Canvas.Font.Color := Font.Color;
+ Inc(R.Left, 2);
+ if IsHyperLinkPaint(Canvas, R, State, Items[I], X, Y, LinkName) then
+ ExecuteHyperlink(Self, FOnHyperLinkClick, LinkName);
+ end;
+end;
+
+//=== { TJvCustomHTComboBox } ================================================
+
+constructor TJvCustomHTComboBox.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ Style := csOwnerDrawVariable;
+ FColorHighlight := clHighlight;
+ FColorHighlightText := clHighlightText;
+ FColorDisabledText := clGrayText;
+ FSuperSubScriptRatio := DefaultSuperSubScriptRatio;
+end;
+
+procedure TJvCustomHTComboBox.DrawItem(Index: Integer; Rect: TRect;
+ State: TOwnerDrawState);
+begin
+ if odSelected in State then
+ begin
+ Canvas.Brush.Color := ColorHighlight;
+ Canvas.Font.Color := ColorHighlightText;
+ end;
+ if not Enabled then
+ Canvas.Font.Color := ColorDisabledText;
+
+ Canvas.FillRect(Rect);
+ Inc(Rect.Left, 2);
+ ItemHTDraw(Canvas, Rect, State, Items[Index], SuperSubScriptRatio);
+end;
+
+procedure TJvCustomHTComboBox.MeasureItem(Index: Integer; var TheHeight: Integer
+ );
+begin
+ if Index = -1 then
+ inherited
+ else
+ TheHeight := ItemHTHeight(Canvas, Items[Index], SuperSubScriptRatio);
+end;
+
+(*
+function TJvCustomHTComboBox.GetHeight: Integer;
+begin
+ Result := SendMessage(Self.Handle, CB_GETITEMHEIGHT, -1, 0);
+end;
+
+procedure TJvCustomHTComboBox.SetHeight(Value: Integer);
+begin
+ SendMessage(Self.Handle, CB_SETITEMHEIGHT, -1, Value);
+end;
+*)
+
+procedure TJvCustomHTComboBox.SetHideSel(Value: Boolean);
+begin
+ FHideSel := Value;
+ Invalidate;
+end;
+
+procedure TJvCustomHTComboBox.SetSuperSubScriptRation(const Value: Double);
+begin
+ if FSuperSubScriptRatio <> Value then
+ begin
+ FSuperSubScriptRatio := Value;
+ Invalidate;
+ end;
+end;
+
+function TJvCustomHTComboBox.GetPlainItems(Index: Integer): string;
+begin
+ Result := ItemHTPlain(Items[Index]);
+end;
+
+function TJvCustomHTComboBox.ISuperSuperSubScriptRatioStored: Boolean;
+begin
+ Result := FSuperSubScriptRatio <> DefaultSuperSubScriptRatio;
+end;
+
+{procedure TJvCustomHTComboBox.CreateWnd;
+var
+ Tmp: Integer;
+begin
+ inherited CreateWnd;
+ if DropWidth = 0 then
+ DropWidth := Width
+ else
+ begin
+ Tmp := DropWidth;
+ DropWidth := 0;
+ DropWidth := Tmp;
+ end;
+end;
+
+procedure TJvCustomHTComboBox.SetDropWidth(ADropWidth: Integer);
+begin
+ if FDropWidth <> ADropWidth then
+ begin
+ FDropWidth := ADropWidth;
+ Perform(CB_SETDROPPEDWIDTH, FDropWidth, 0);
+ end;
+end;}
+
+//=== { TJvCustomHTLabel } ===================================================
+
+constructor TJvCustomHTLabel.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ FHyperLinkMouseButtons := [mbLeft];
+ FSuperSubScriptRatio := DefaultSuperSubScriptRatio;
+end;
+
+procedure TJvCustomHTLabel.FontChanged(Sender: TObject);
+begin
+ inherited;
+ AdjustSize;
+end;
+
+function TJvCustomHTLabel.ISuperSuperSubScriptRatioStored: Boolean;
+begin
+ Result := FSuperSubScriptRatio <> DefaultSuperSubScriptRatio;
+end;
+
+procedure TJvCustomHTLabel.Loaded;
+begin
+ inherited Loaded;
+ AdjustSize;
+end;
+
+procedure TJvCustomHTLabel.AdjustSize;
+var
+ DC: HDC;
+ X: Integer;
+ Rect: TRect;
+ MaxWidth: Integer;
+begin
+ if not (csReading in ComponentState) and AutoSize then
+ begin
+ Rect := ClientRect;
+ DC := GetDC(0{HWND_DESKTOP});
+ try
+ Canvas.Handle := DC;
+ Canvas.Font.Assign(Font);
+ Rect.Bottom := ItemHTHeight(Canvas, Caption, SuperSubScriptRatio);
+ MaxWidth := ItemHTWidth(Canvas, Bounds(0, 0, 0, 0), [], Caption, SuperSubScriptRatio);
+ finally
+ Canvas.Handle := 0;
+ ReleaseDC(0{HWND_DESKTOP}, DC);
+ end;
+ Rect.Right := Rect.Left + MaxWidth;
+ X := Left;
+ if Alignment = taRightJustify then
+ Inc(X, Width - Rect.Right);
+ SetBounds(X, Top, Rect.Right, Rect.Bottom);
+ //Width := Rect.Right - X;
+ //Height := Rect.Bottom - Top;
+ end;
+end;
+
+procedure TJvCustomHTLabel.PrepareCanvas;
+begin
+ Canvas.Lock;
+ try
+ Canvas.Font := Font;
+ Canvas.Brush.Color := Color;
+ finally
+ Canvas.Unlock;
+ end;
+end;
+
+function TJvCustomHTLabel.ComputeLayoutRect: TRect;
+begin
+ Result := ClientRect;
+ case Layout of
+ tlTop:
+ ;
+ tlBottom:
+ Result.Top := Result.Bottom - ItemHTHeight(Canvas, Caption, SuperSubScriptRatio);
+ tlCenter:
+ Result.Top := (Result.Bottom - Result.Top - ItemHTHeight(Canvas, Caption, SuperSubScriptRatio)) div 2;
+ end;
+end;
+
+procedure TJvCustomHTLabel.SetAutoSize(Value: Boolean);
+begin
+ if AutoSize <> Value then
+ begin
+ inherited SetAutoSize(Value);
+ AdjustSize;
+ end;
+end;
+
+procedure TJvCustomHTLabel.SetSuperSubScriptRation(const Value: Double);
+begin
+ if FSuperSubScriptRatio <> Value then
+ begin
+ FSuperSubScriptRatio := Value;
+ Invalidate;
+ end;
+end;
+
+procedure TJvCustomHTLabel.Paint;
+var
+ Rect: TRect;
+ PaintText: String;
+begin
+ PaintText := GetLabelText;
+ PrepareCanvas;
+ if Transparent then
+ Canvas.Brush.Style := bsClear
+ else
+ begin
+ Canvas.Brush.Style := bsSolid;
+ Canvas.FillRect(ClientRect);
+ end;
+ Rect := ComputeLayoutRect;
+ Canvas.Font.Style := []; // only font name and font size is important
+ if not Enabled then
+ begin
+ OffsetRect(Rect, 1, 1);
+ Canvas.Font.Color := clBtnHighlight;
+ ItemHTDrawHL(Canvas, Rect, [odDisabled], PaintText, FMouseX, FMouseY, SuperSubScriptRatio);
+ OffsetRect(Rect, -1, -1);
+ Canvas.Font.Color := clBtnShadow;
+ ItemHTDrawHL(Canvas, Rect, [odDisabled], PaintText, FMouseX, FMouseY, SuperSubScriptRatio);
+ end
+ else
+ ItemHTDrawHL(Canvas, Rect, [], PaintText, FMouseX, FMouseY, SuperSubScriptRatio);
+end;
+
+procedure TJvCustomHTLabel.MouseMove(Shift: TShiftState; X, Y: Integer);
+var
+ R: TRect;
+ LinkName: string;
+ LastHovered: Boolean;
+begin
+ FMouseX := X;
+ FMouseY := Y;
+ inherited MouseMove(Shift, X, Y);
+
+ LastHovered := FHyperlinkHovered;
+ Canvas.Lock;
+ try
+ PrepareCanvas;
+ R := ComputeLayoutRect;
+ FHyperlinkHovered := IsHyperLink(Canvas, R, Caption, X, Y, LinkName);
+ finally
+ Canvas.Unlock;
+ end;
+
+ if FHyperlinkHovered then
+ Cursor := crHandPoint
+ else
+ Cursor := crDefault;
+
+ if FHyperlinkHovered <> LastHovered then
+ begin
+ if Transparent then
+ Invalidate
+ else
+ Paint;
+ end;
+end;
+
+procedure TJvCustomHTLabel.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+var
+ R: TRect;
+ LinkName: string;
+begin
+ FMouseX := X;
+ FMouseY := Y;
+ inherited MouseUp(Button, Shift, X, Y);
+ if Button in FHyperLinkMouseButtons then
+ begin
+ R := ClientRect;
+ case Layout of
+ tlTop:
+ ;
+ tlBottom:
+ R.Top := R.Bottom - ItemHTHeight(Canvas, Caption, SuperSubScriptRatio);
+ tlCenter:
+ R.Top := (R.Bottom - R.Top - ItemHTHeight(Canvas, Caption, SuperSubScriptRatio)) div 2;
+ end;
+ if IsHyperLink(Canvas, R, Caption, X, Y, LinkName) then
+ ExecuteHyperlink(Self, FOnHyperLinkClick, LinkName);
+ end;
+end;
+
+procedure TJvCustomHTLabel.MouseLeave;
+begin
+ FMouseX := 0;
+ FMouseY := 0;
+ inherited MouseLeave;
+ if FHyperlinkHovered then
+ begin
+ FHyperlinkHovered := False;
+ if Transparent then
+ Invalidate
+ else
+ Paint;
+ end;
+end;
+
+{ TJvHTLabel }
+
+procedure TJvHTLabel.DefineProperties(Filer: TFiler);
+begin
+ inherited DefineProperties(Filer);
+ Filer.DefineProperty('WordWrap', @IgnoreWordWrap, nil, False);
+end;
+
+procedure TJvHTLabel.IgnoreWordWrap(Reader: TReader);
+begin
+ Reader.ReadBoolean;
+end;
+
+
+end.
diff --git a/components/jvcllaz/run/JvJVCLUtils.pas b/components/jvcllaz/run/JvJVCLUtils.pas
index 828bbc95e..29140c1e9 100644
--- a/components/jvcllaz/run/JvJVCLUtils.pas
+++ b/components/jvcllaz/run/JvJVCLUtils.pas
@@ -32,7 +32,7 @@ unit JvJVCLUtils;
interface
uses
- Classes, Graphics, JvTypes;
+ Classes, Graphics, JvTypes, ImgList, LCLType, Types;
(******************** NOT CONVERTED
// Transform an icon to a bitmap
@@ -670,9 +670,11 @@ procedure UpdateTrackFont(TrackFont, Font: TFont; TrackOptions: TJvTrackFontOpti
// used for checkboxes and radiobuttons.
// Originally from Mike Lischke
function GetDefaultCheckBoxSize: TSize;
+********************)
function CanvasMaxTextHeight(Canvas: TCanvas): Integer;
+(*******************
{$IFDEF MSWINDOWS}
// AllocateHWndEx works like Classes.AllocateHWnd but does not use any virtual memory pages
function AllocateHWndEx(Method: TWndMethod; const AClassName: string = ''): THandle;
@@ -703,21 +705,35 @@ function StripAllFromResult(const Value: TModalResult): TModalResult;
function SelectColorByLuminance(AColor, DarkColor, BrightColor: TColor): TColor;
// (peter3) implementation moved from JvHTControls.
+************)
+
type
- TJvHTMLCalcType = (htmlShow, htmlCalcWidth, htmlCalcHeight);
+ TJvHTMLCalcType = (htmlShow, htmlCalcWidth, htmlCalcHeight, htmlHyperLink);
procedure HTMLDrawTextEx(Canvas: TCanvas; Rect: TRect;
- const State: TOwnerDrawState; const Text: string; var Width: Integer;
- CalcType: TJvHTMLCalcType; MouseX, MouseY: Integer; var MouseOnLink: Boolean;
- var LinkName: string; Scale: Integer = 100);
-function HTMLDrawText(Canvas: TCanvas; Rect: TRect;
- const State: TOwnerDrawState; const Text: string; Scale: Integer = 100): string;
-function HTMLTextWidth(Canvas: TCanvas; Rect: TRect;
- const State: TOwnerDrawState; const Text: string; Scale: Integer = 100): Integer;
+ const State: TOwnerDrawState; const Text: string; out Width: Integer;
+ CalcType: TJvHTMLCalcType; MouseX, MouseY: Integer; out MouseOnLink: Boolean;
+ var LinkName: string; SuperSubScriptRatio: Double; Scale: Integer = 100); overload;
+procedure HTMLDrawTextEx2(Canvas: TCanvas; Rect: TRect;
+ const State: TOwnerDrawState; const Text: string; out Width, Height: Integer;
+ CalcType: TJvHTMLCalcType; MouseX, MouseY: Integer; out MouseOnLink: Boolean;
+ var LinkName: string; SuperSubScriptRatio: Double; Scale: Integer = 100); overload;
+procedure HTMLDrawText(Canvas: TCanvas; Rect: TRect;
+ const State: TOwnerDrawState; const Text: string; SuperSubScriptRatio: Double;
+ Scale: Integer = 100);
+procedure HTMLDrawTextHL(Canvas: TCanvas; Rect: TRect;
+ const State: TOwnerDrawState; const Text: string; MouseX, MouseY: Integer;
+ SuperSubScriptRatio: Double; Scale: Integer = 100);
function HTMLPlainText(const Text: string): string;
-function HTMLTextHeight(Canvas: TCanvas; const Text: string; Scale: Integer = 100): Integer;
+function HTMLTextExtent(Canvas: TCanvas; Rect: TRect;
+ const State: TOwnerDrawState; const Text: string; SuperSubScriptRatio: Double; Scale: Integer = 100): TSize;
+function HTMLTextWidth(Canvas: TCanvas; Rect: TRect;
+ const State: TOwnerDrawState; const Text: string; SuperSubScriptRatio: Double; Scale: Integer = 100): Integer;
+function HTMLTextHeight(Canvas: TCanvas; const Text: string; SuperSubScriptRatio: Double; Scale: Integer = 100): Integer;
function HTMLPrepareText(const Text: string): string;
+(*************
+
// This type is used to allow an easy migration from a TBitmap property to a
// TPicture property. It is, for instance, used in TJvXPButton so that users
// migrating to the JVCL can still open their applications and benefit
@@ -809,10 +825,15 @@ function GetGraphicObject(AStream: TStream): TGraphic; overload;
function GetGraphicObject(AStream: TStream; ASender: TObject; AOnProc: TJvGetGraphicClassEvent): TGraphic; overload;
********************)
+function ReplaceComponentReference(This, NewReference: TComponent; var VarReference: TComponent): Boolean;
+function ReplaceImageListReference(This: TComponent; NewReference: TCustomImageList;
+ var VarReference: TCustomImageList; ChangeLink: TChangeLink): Boolean;
+
implementation
-(********************
uses
+ sysutils, LCLIntf, math;
+ (********************
SysConst,
Consts,
{$IFDEF MSWINDOWS}
@@ -6398,15 +6419,18 @@ begin
end;
end;
+*****************)
+
function CanvasMaxTextHeight(Canvas: TCanvas): Integer;
var
tt: TTextMetric;
begin
// (ahuser) Qt returns different values for TextHeight('Ay') and TextHeigth(#1..#255)
- GetTextMetrics(Canvas.Handle, tt);
+ GetTextMetrics(Canvas.Handle, tt{%H-});
Result := tt.tmHeight;
end;
+(****************
{$IFDEF MSWINDOWS}
//=== AllocateHWndEx =========================================================
@@ -6977,6 +7001,7 @@ begin
else
Result := BrightColor;
end;
+***********)
const
cBR = '
';
@@ -6996,28 +7021,26 @@ const
// moved from JvHTControls and renamed
function HTMLPrepareText(const Text: string): string;
type
- THtmlCode = packed record
- Html: string[10];
- Text: Char;
+ THtmlCode = record
+ Html: string;
+ Text: UTF8String;
end;
const
- Conversions: array [0..6] of THtmlCode =
- (
- (Html: '&'; Text: '&'),
- (Html: '"'; Text: '"'),
- (Html: '®'; Text: '®'),
- (Html: '©'; Text: '©'),
- (Html: '™'; Text: '™'),
- (Html: '€'; Text: '€'),
- (Html: ' '; Text: ' ')
- );
+ Conversions: array [0..6] of THtmlCode = (
+ (Html: '&'; Text: '&'),
+ (Html: '"'; Text: '"'),
+ (Html: '®'; Text: #$C2#$AE),
+ (Html: '©'; Text: #$C2#$A9),
+ (Html: '™'; Text: #$E2#$84#$A2),
+ (Html: '€'; Text: #$E2#$82#$AC),
+ (Html: ' '; Text: ' ')
+ );
var
I: Integer;
begin
Result := Text;
for I := Low(Conversions) to High(Conversions) do
- with Conversions[I] do
- Result := StringReplace(Result, Html, Text, [rfReplaceAll, rfIgnoreCase]);
+ Result := StringReplace(Result, Conversions[I].Html, Utf8ToAnsi(Conversions[I].Text), [rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result, sLineBreak, '', [rfReplaceAll, rfIgnoreCase]); // only
can be new line
Result := StringReplace(Result, cBR, sLineBreak, [rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result, cHR, cHR + sLineBreak, [rfReplaceAll, rfIgnoreCase]); // fixed
@@ -7027,9 +7050,9 @@ function HTMLBeforeTag(var Str: string; DeleteToTag: Boolean = False): string;
begin
if Pos(cTagBegin, Str) > 0 then
begin
- Result := Copy(Str, 1, Pos(cTagBegin, Str)-1);
+ Result := Copy(Str, 1, Pos(cTagBegin, Str) - 1);
if DeleteToTag then
- Delete(Str, 1, Pos(cTagBegin, Str)-1);
+ Delete(Str, 1, Pos(cTagBegin, Str) - 1);
end
else
begin
@@ -7056,10 +7079,30 @@ begin
Delete(Result, 1, Pos(cTagEnd, Result));
end;
+// wp: Made Width and MouseOnLink out parameters (were "var" in the original)
+// to silence the compiler
procedure HTMLDrawTextEx(Canvas: TCanvas; Rect: TRect;
- const State: TOwnerDrawState; const Text: string; var Width: Integer;
- CalcType: TJvHTMLCalcType; MouseX, MouseY: Integer; var MouseOnLink: Boolean;
- var LinkName: string; Scale: Integer = 100);
+ const State: TOwnerDrawState; const Text: string; out Width: Integer;
+ CalcType: TJvHTMLCalcType; MouseX, MouseY: Integer; out MouseOnLink: Boolean;
+ var LinkName: string; SuperSubScriptRatio: Double; Scale: Integer);
+var
+ H: Integer;
+begin
+ HTMLDrawTextEx2(Canvas, Rect, State, Text, Width, H, CalcType, MouseX, MouseY, MouseOnLink,
+ LinkName, SuperSubScriptRatio, Scale);
+ if CalcType = htmlCalcHeight then
+ Width := H;
+end;
+
+type
+ TScriptPosition = (spNormal, spSuperscript, spSubscript);
+
+// wp: Make Width, Height and MouseOnLink "out" parameters
+// (they were "var" in the original) to silence the compiler
+procedure HTMLDrawTextEx2(Canvas: TCanvas; Rect: TRect;
+ const State: TOwnerDrawState; const Text: string; out Width, Height: Integer;
+ CalcType: TJvHTMLCalcType; MouseX, MouseY: Integer; out MouseOnLink: Boolean;
+ var LinkName: string; SuperSubScriptRatio: Double; Scale: Integer);
const
DefaultLeft = 0; // (ahuser) was 2
var
@@ -7082,6 +7125,7 @@ var
RemFontColor,
RemBrushColor: TColor;
RemFontSize: Integer;
+ ScriptPosition: TScriptPosition;
function ExtractPropertyValue(const Tag: string; PropName: string): string;
var
@@ -7129,9 +7173,9 @@ var
begin
case Alignment of
taRightJustify:
- Result := (Rect.Right {- Rect.Left}) - HTMLTextWidth(Canvas, Rect, State, Str, Scale);
+ Result := (Rect.Right - Rect.Left) - HTMLTextWidth(Canvas, Rect, State, Str, Scale);
taCenter:
- Result := (Rect.Right {- Rect.Left} - HTMLTextWidth(Canvas, Rect, State, Str)) div 2;
+ Result := DefaultLeft + ((Rect.Right - Rect.Left) - HTMLTextWidth(Canvas, Rect, State, Str, SuperSubScriptRatio)) div 2;
else
Result := DefaultLeft;
end;
@@ -7143,29 +7187,42 @@ var
var
Width, Height: Integer;
R: TRect;
+ OriginalFontSize: Integer;
begin
R := Rect;
Inc(R.Left, CurLeft);
if Assigned(Canvas) then
begin
- Width := Canvas.TextWidth(M);
- Height := CanvasMaxTextHeight(Canvas);
- if IsLink and not MouseOnLink then
- if (MouseY >= R.Top) and (MouseY <= R.Top + Height) and
- (MouseX >= R.Left) and (MouseX <= R.Left + Width) and
- ((MouseY > 0) or (MouseX > 0)) then
+ OriginalFontSize := Canvas.Font.Size;
+ try
+ if ScriptPosition <> spNormal then
+ Canvas.Font.Size := Round(Canvas.Font.Size * SuperSubScriptRatio);
+
+ Width := Canvas.TextWidth(M);
+ Height := CanvasMaxTextHeight(Canvas);
+
+ if ScriptPosition = spSubscript then
+ R.Top := R.Bottom - Height - 1;
+
+ if IsLink and not MouseOnLink then
+ if (MouseY >= R.Top) and (MouseY <= R.Top + Height) and
+ (MouseX >= R.Left) and (MouseX <= R.Left + Width) and
+ ((MouseY > 0) or (MouseX > 0)) then
+ begin
+ MouseOnLink := True;
+ Canvas.Font.Color := clRed; // hover link
+ LinkName := TempLink;
+ end;
+ if CalcType = htmlShow then
begin
- MouseOnLink := True;
- Canvas.Font.Color := clRed; // hover link
- LinkName := TempLink;
+ if Trans then
+ Canvas.Brush.Style := bsClear; // for transparent
+ Canvas.TextOut(R.Left, R.Top, M);
end;
- if CalcType = htmlShow then
- begin
- if Trans then
- Canvas.Brush.Style := bsClear; // for transparent
- Canvas.TextOut(R.Left, R.Top, M);
+ CurLeft := CurLeft + Width;
+ finally
+ Canvas.Font.Size := OriginalFontSize;
end;
- CurLeft := CurLeft + Width;
end;
end;
@@ -7197,20 +7254,21 @@ begin
OldFontColor := Canvas.Font.Color;
OldBrushColor := Canvas.Brush.Color;
OldBrushStyle := Canvas.Brush.Style;
- OldAlignment := Alignment;
+ // OldAlignment := Alignment;
RemFontColor := Canvas.Font.Color;
RemBrushColor := Canvas.Brush.Color;
RemFontSize := Canvas.Font.size;
end;
+ vStr := TStringList.Create;
try
Alignment := taLeftJustify;
IsLink := False;
MouseOnLink := False;
vText := Text;
- vStr := TStringList.Create;
- vStr.Text := HTMLPrepareText(vText);
+ vStr.Text := vText;
LinkName := '';
TempLink := '';
+ ScriptPosition := spNormal;
Selected := (odSelected in State) or (odDisabled in State);
Trans := (Canvas.Brush.Style = bsClear) and not selected;
@@ -7221,16 +7279,17 @@ begin
vM := '';
for vCount := 0 to vStr.Count - 1 do
begin
- vText := vStr[vCount];
+ vText := HTMLPrepareText(vStr[vCount]);
CurLeft := CalcPos(vText);
- while Length(vText) > 0 do
+ while vText <> '' do
begin
vM := HTMLBeforeTag(vText, True);
vM := StringReplace(vM, '<', cLT, [rfReplaceAll, rfIgnoreCase]); // <--+ this must be here
vM := StringReplace(vM, '>', cGT, [rfReplaceAll, rfIgnoreCase]); // <--/
if GetChar(vText, 1) = cTagBegin then
begin
- Draw(vM);
+ if vM <> '' then
+ Draw(vM);
if Pos(cTagEnd, vText) = 0 then
Insert(cTagEnd, vText, 2);
if GetChar(vText, 2) = '/' then
@@ -7248,14 +7307,17 @@ begin
'U':
Style(fsUnderline, False);
'S':
- Style(fsStrikeOut, False);
+ begin
+ ScriptPosition := spNormal;
+ Style(fsStrikeOut, False);
+ end;
'F':
begin
if not Selected then // restore old colors
begin
- Canvas.Font.Color := RemFontColor;
+ Canvas.Font.Color := RemFontColor;
Canvas.Brush.Color := RemBrushColor;
- Canvas.Font.Size := RemFontSize;
+ Canvas.Font.Size := RemFontSize;
Trans := True;
end;
end;
@@ -7268,7 +7330,7 @@ begin
begin
if GetChar(vText, 3, True) = 'L' then // ALIGN
begin
- TagPrp := UpperCase(Copy(vText, 2, Pos(cTagEnd, vText)-2));
+ TagPrp := UpperCase(Copy(vText, 2, Pos(cTagEnd, vText) - 2));
if Pos(cCENTER, TagPrp) > 0 then
Alignment := taCenter
else
@@ -7277,12 +7339,12 @@ begin
else
Alignment := taLeftJustify;
CurLeft := DefaultLeft;
- if CalcType = htmlShow then
+ if CalcType in [htmlShow, htmlHyperLink] then
CurLeft := CalcPos(vText);
end
else
begin // A HREF
- TagPrp := Copy(vText, 2, Pos(cTagEnd, vText)-2);
+ TagPrp := Copy(vText, 2, Pos(cTagEnd, vText) - 2);
if Pos(cHREF, UpperCase(TagPrp)) > 0 then
begin
IsLink := True;
@@ -7298,7 +7360,7 @@ begin
'I':
if GetChar(vText, 3, True) = 'N' then //IND="%d"
begin
- TagPrp := Copy(vText, 2, Pos(cTagEnd, vText)-2);
+ TagPrp := Copy(vText, 2, Pos(cTagEnd, vText) - 2);
CurLeft := StrToInt(ExtractPropertyValue(TagPrp, cIND)); // ex IND="10"
if odReserved1 in State then
CurLeft := Round((CurLeft * Scale) div 100);
@@ -7308,7 +7370,21 @@ begin
'U':
Style(fsUnderline, True);
'S':
- Style(fsStrikeOut, True);
+ begin
+ if GetChar(vText, 4, True) = 'P' then
+ begin
+ ScriptPosition := spSuperscript;
+ end
+ else if GetChar(vText, 4, True) = 'B' then
+ begin
+ ScriptPosition := spSubscript;
+ end
+ else
+ begin
+ ScriptPosition := spNormal;
+ Style(fsStrikeOut, True);
+ end;
+ end;
'H':
if (GetChar(vText, 3, True) = 'R') and Assigned(Canvas) then // HR
begin
@@ -7316,23 +7392,23 @@ begin
Canvas.Pen.Color := Canvas.Font.Color;
OldWidth := Canvas.Pen.Width;
TagPrp := UpperCase(Copy(vText, 2, Pos(cTagEnd, vText)-2));
- Canvas.Pen.Width := StrToIntDef(ExtractPropertyValue(TagPrp, 'SIZE'),1); // ex HR="10"
+ Canvas.Pen.Width := StrToIntDef(ExtractPropertyValue(TagPrp, 'SIZE'), 1); // ex HR="10"
if odReserved1 in State then
Canvas.Pen.Width := Round((Canvas.Pen.Width * Scale) div 100);
if CalcType = htmlShow then
begin
- Canvas.MoveTo(Rect.Left ,Rect.Top + CanvasMaxTextHeight(Canvas));
- Canvas.LineTo(Rect.Right,Rect.Top + CanvasMaxTextHeight(Canvas));
+ Canvas.MoveTo(Rect.Left, Rect.Top + CanvasMaxTextHeight(Canvas));
+ Canvas.LineTo(Rect.Right, Rect.Top + CanvasMaxTextHeight(Canvas));
end;
Rect.Top := Rect.Top + 1 + Canvas.Pen.Width;
Canvas.Pen.Width := OldWidth;
NewLine(HTMLDeleteTag(vText) <> '');
end;
'F':
- if (Pos(cTagEnd, vText) > 0) and (not Selected) and Assigned(Canvas) {and (CalcType = htmlShow)} then // F from FONT
+ if (Pos(cTagEnd, vText) > 0) and (not Selected) and Assigned(Canvas) {and (CalcType in [htmlShow, htmlHyperLink])} then // F from FONT
begin
- TagPrp := UpperCase(Copy(vText, 2, Pos(cTagEnd, vText)-2));
- RemFontColor := Canvas.Font.Color;
+ TagPrp := UpperCase(Copy(vText, 2, Pos(cTagEnd, vText) - 2));
+ RemFontColor := Canvas.Font.Color;
RemBrushColor := Canvas.Brush.Color;
if Pos(cCOLOR, TagPrp) > 0 then
@@ -7358,7 +7434,7 @@ begin
if Pos('SIZE', TagPrp) > 0 then
begin
Prp := ExtractPropertyValue(TagPrp, 'SIZE');
- Canvas.Font.Size := StrToIntDef(Prp,2) * Canvas.Font.Size div 2;
+ Canvas.Font.Size := StrToIntDef(Prp,2){ * Canvas.Font.Size div 2};
end;
end;
end;
@@ -7367,7 +7443,8 @@ begin
vM := '';
end;
end;
- Draw(vM);
+ if vM <> '' then
+ Draw(vM);
NewLine;
vM := '';
end;
@@ -7385,20 +7462,33 @@ begin
FreeAndNil(vStr);
FreeAndNil(OldFont);
end;
- if CalcType = htmlCalcHeight then
- Width := Rect.Top + CanvasMaxTextHeight(Canvas)
- else
- Width := Max(Width, CurLeft - DefaultLeft);
+ Width := Max(Width, CurLeft - DefaultLeft);
+ Height := Rect.Top + CanvasMaxTextHeight(Canvas);
end;
-function HTMLDrawText(Canvas: TCanvas; Rect: TRect;
- const State: TOwnerDrawState; const Text: string; Scale: Integer = 100): string;
+// wp: I made this a procedure - it was a function in the original with the
+// result being unassigned.
+procedure HTMLDrawText(Canvas: TCanvas; Rect: TRect;
+ const State: TOwnerDrawState; const Text: string; SuperSubScriptRatio: Double; Scale: Integer);
var
W: Integer;
S: Boolean;
St: string;
begin
- HTMLDrawTextEx(Canvas, Rect, State, Text, W, htmlShow, 0, 0, S, St, Scale);
+ HTMLDrawTextEx(Canvas, Rect, State, Text, W, htmlShow, 0, 0, S, St, SuperSubScriptRatio, Scale);
+end;
+
+// wp: I made this a procedure - it was a function in the original with the
+// result being unassigned.
+procedure HTMLDrawTextHL(Canvas: TCanvas; Rect: TRect;
+ const State: TOwnerDrawState; const Text: string; MouseX, MouseY: Integer;
+ SuperSubScriptRatio: Double; Scale: Integer);
+var
+ W: Integer;
+ S: Boolean;
+ St: string;
+begin
+ HTMLDrawTextEx(Canvas, Rect, State, Text, W, htmlShow, MouseX, MouseY, S, St, SuperSubScriptRatio, Scale);
end;
function HTMLPlainText(const Text: string): string;
@@ -7418,28 +7508,41 @@ begin
Result := Result + S;
end;
-function HTMLTextWidth(Canvas: TCanvas; Rect: TRect;
- const State: TOwnerDrawState; const Text: string; Scale: Integer = 100): Integer;
+function HTMLTextExtent(Canvas: TCanvas; Rect: TRect;
+ const State: TOwnerDrawState; const Text: string; SuperSubScriptRatio: Double; Scale: Integer = 100): TSize;
var
S: Boolean;
St: string;
begin
- HTMLDrawTextEx(Canvas, Rect, State, Text, Result, htmlCalcWidth, 0, 0, S, St);
+ HTMLDrawTextEx2(Canvas, Rect, State, Text, Result.cx, Result.cy, htmlCalcWidth, 0, 0, S, St, SuperSubScriptRatio, Scale);
+ if Result.cy = 0 then
+ Result.cy := CanvasMaxTextHeight(Canvas);
+ Inc(Result.cy);
end;
-function HTMLTextHeight(Canvas: TCanvas; const Text: string; Scale: Integer = 100): Integer;
+function HTMLTextWidth(Canvas: TCanvas; Rect: TRect;
+ const State: TOwnerDrawState; const Text: string; SuperSubScriptRatio: Double; Scale: Integer = 100): Integer;
+var
+ S: Boolean;
+ St: string;
+begin
+ HTMLDrawTextEx(Canvas, Rect, State, Text, Result, htmlCalcWidth, 0, 0, S, St, SuperSubScriptRatio, Scale);
+end;
+
+function HTMLTextHeight(Canvas: TCanvas; const Text: string; SuperSubScriptRatio: Double; Scale: Integer = 100): Integer;
var
S: Boolean;
St: string;
R: TRect;
begin
R := Rect(0, 0, 0, 0);
- HTMLDrawTextEx(Canvas, R, [], Text, Result, htmlCalcHeight, 0, 0, S, St, Scale);
+ HTMLDrawTextEx(Canvas, R, [], Text, Result, htmlCalcHeight, 0, 0, S, St, SuperSubScriptRatio, Scale);
if Result = 0 then
Result := CanvasMaxTextHeight(Canvas);
Inc(Result);
end;
+(*************
{ TJvPicture }
procedure TJvPicture.ReadBitmapData(Stream: TStream);
var
@@ -7682,6 +7785,43 @@ begin
Result := nil;
end;
+******************)
+
+function ReplaceComponentReference(This, NewReference: TComponent; var VarReference: TComponent): Boolean;
+begin
+ Result := (VarReference <> NewReference) and Assigned(This);
+ if Result then
+ begin
+ if Assigned(VarReference) then
+ VarReference.RemoveFreeNotification(This);
+ VarReference := NewReference;
+ if Assigned(VarReference) then
+ VarReference.FreeNotification(This);
+ end;
+end;
+
+function ReplaceImageListReference(This: TComponent; NewReference: TCustomImageList;
+ var VarReference: TCustomImageList; ChangeLink: TChangeLink): Boolean;
+begin
+ Result := (VarReference <> NewReference) and Assigned(This);
+ if Result then
+ begin
+ if Assigned(VarReference) then
+ begin
+ VarReference.RemoveFreeNotification(This);
+ VarReference.UnRegisterChanges(ChangeLink);
+ end;
+ VarReference := NewReference;
+ if Assigned(VarReference) then
+ begin
+ VarReference.RegisterChanges(ChangeLink);
+ VarReference.FreeNotification(This);
+ end;
+ end;
+end;
+
+(************
+
initialization
InitScreenCursors;
diff --git a/components/jvcllaz/run/JvResources.pas b/components/jvcllaz/run/JvResources.pas
new file mode 100644
index 000000000..8bac44252
--- /dev/null
+++ b/components/jvcllaz/run/JvResources.pas
@@ -0,0 +1,2366 @@
+{-----------------------------------------------------------------------------
+The contents of this file are subject to the Mozilla Public License
+Version 1.1 (the "License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+http://www.mozilla.org/MPL/MPL-1.1.html
+
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for
+the specific language governing rights and limitations under the License.
+
+The Original Code is: JvResources.PAS, released on 2003-12-10.
+
+The Initial Developer of the Original Code is: Robert Marquardt (robert_marquardt att gmx dott de)
+Copyright (c) 2003 Robert Marquardt
+All Rights Reserved.
+
+Contributor(s):
+
+You may retrieve the latest version of this file at the Project JEDI's JVCL home page,
+located at http://jvcl.delphi-jedi.org
+
+Description:
+ unit to centralize all resourcestrings of the JVCL for easier translation
+
+Known Issues:
+-----------------------------------------------------------------------------}
+// $Id$
+
+unit JvResources;
+
+//{.$I jvcl.inc}
+
+interface
+
+//=== used in several files ==================================================
+resourcestring
+ RsButtonOKCaption = '&OK';
+ RsButtonCancelCaption = 'Cancel';
+ RsBackButtonCaption = '< &Back';
+ RsPrevButtonCaption = '< &Prev';
+ RsNextButtonCaption = '&Next >';
+ RsDateDlgCaption = 'Select a Date';
+ RsDetailsLeftCaption = '<< &Details';
+ RsDetailsRightCaption = '&Details >>';
+
+ RsUndoItem = '&Undo';
+ RsCutItem = 'Cu&t';
+ RsCopyItem = '&Copy';
+ RsPasteItem = '&Paste';
+ RsDeleteItem = '&Delete';
+ RsSelectAllItem = 'Select &All';
+ {
+ SWEDISH:
+ RsUndoItem = '&Ã…ngra';
+ RsCutItem = '&Klipp ut';
+ RsCopyItem = 'K&opiera';
+ RsPasteItem = 'Kl&istra in';
+ RsDeleteItem = '&Ta bort';
+ RsSelectAllItem = '&Markera allt';
+
+ GERMAN:
+ RsUndoItem = '&Rückgängig';
+ RsCutItem = '&Ausschneiden';
+ RsCopyItem = '&Kopieren';
+ RsPasteItem = 'E&infügen';
+ RsDeleteItem = '&Löschen';
+ RsSelectAllItem = 'Alles &markieren';
+
+ DUTCH:
+ RsUndoItem = '&Ongedaan maken';
+ RsCutItem = 'K&nippen';
+ RsCopyItem = '&Kopiëren';
+ RsPasteItem = '&Plakken';
+ RsDeleteItem = '&Wissen';
+ RsSelectAllItem = '&Alles selecteren';
+ }
+
+ RsEmptyItem = '';
+ RsNoName = '(unnamed)';
+
+ RsDatabaseName = 'Database name: %s';
+ RsDataItemRenderHasNoText = '(item does not support the IJvDataItemText interface)';
+ RsError = 'Error';
+ RsFalse = 'False';
+ RsTrue = 'True';
+
+ RsEErrorSetupDll = 'SetupApi.dll not found';
+ RsEInternalError = 'internal error';
+ RsEUnterminatedStringNears = 'unterminated string near %s';
+ RsEStackOverflow = 'stack overflow';
+ RsEStackUnderflow = 'stack underflow';
+ RsEReturnStackUnderflow = 'return stack underflow';
+ RsENotImplemented = 'not implemented';
+ RsEDelSubTreeNotImplemented = 'DeleteSubTreeInt has not been implemented yet';
+ { Polaris patch }
+ RsEDateOutOfRange = '%0:s - Enter a date between "%1:s" and "%2:s"';
+ RsEDateOutOfMin = '%0:s - Enter a date after "%1:s"';
+ RsEDateOutOfMax = '%0:s - Enter a date before "%1:s"';
+ RsEID3NoController = 'No controller specified';
+ RsEReturnStackOverflow = 'return stack overflow';
+ RsESorryForOneDimensionalArraysOnly = 'Sorry, for one-dimensional arrays only';
+ RsELocalDatabase = 'Cannot perform this operation on a local database';
+
+ RsEInterfaceNotSupported = '%0:s does not support the %1:s interface';
+ RsECircularReference = 'Circular reference not allowed';
+
+ RsESourceBitmapTooSmall = 'Source bitmap too small';
+
+//=== JvAni.pas ==============================================================
+resourcestring
+ RsAniExtension = 'ani';
+ RsAniFilterName = 'ANI Image';
+ RsAniCurFilter = 'Animated Cursors (*.ani)|*.ani|Any files (*.*)|*.*';
+
+ RsEInvalidAnimatedIconImage = 'Invalid animated icon image';
+
+//=== JvAppDBStorage.pas =====================================================
+resourcestring
+ RsENotSupported = 'Method not supported';
+ RsEBufTooSmallFmt = 'Buffer too small (%d bytes required)';
+
+//=== JvAppIniStorage.pas ====================================================
+resourcestring
+ RsEReadValueFailed = 'TJvAppIniFileStorage.ReadValue: Section undefined';
+ RsEWriteValueFailed = 'TJvAppIniFileStorage.WriteValue: Section undefined';
+
+//=== JvAppRegistryStorage.pas ===============================================
+resourcestring
+ RsRootValueReplaceFmt =
+ 'The Default Root Value "%0:s" has been replaced with "%1:s".' + sLineBreak +
+ 'Please change the value in the FileVersionInfo Project Properties.';
+
+ RsEUnableToCreateKey = 'Unable to create key ''%s''';
+ RsEEnumeratingRegistry = 'Error enumerating registry';
+
+//=== JvAppStorage.pas =======================================================
+resourcestring
+ RsEInvalidType = 'Invalid type';
+ RsEUnknownBaseType = 'Unknown base type for given set';
+ RsEInvalidPath = 'Invalid path';
+ RsENotAUniqueRootPath = '''%s'' is not a unique root path';
+ RsECircularReferenceOfStorages = 'Circular reference of storages';
+ RsJvAppStorageSynchronizeTimeout = '%s: Mutex Timeout';
+ RsJvAppStorageSynchronizeProcedureName = 'TJvCustomAppStorage.Synchronize:';
+
+//=== JvAppStorageSelectList.pas =============================================
+resourcestring
+ RsLoadSettings = 'Load Settings';
+ RsSaveSettings = 'Save Settings';
+ RsDeleteSettings = 'Delete Settings';
+ RsLoadCaption = '&Load';
+ RsSaveCaption = '&Save';
+ RsDeleteCaption = '&Delete';
+
+ RsEDynControlEngineNotDefined = 'TJvAppStorageSelectList.CreateDialog: DynControlEngine not defined!';
+ RsEDynAppStorageNotDefined = 'TJvAppStorageSelectList.GetSelectListPath: No AppStorage assigned';
+
+//=== JvAppXMLStorage.pas ====================================================
+resourcestring
+ RsENodeCannotBeEmpty = 'The node must be given a name';
+ RsEPathDoesntExists = 'Path ''%s'' does not exists';
+ RsENotABooleanValue = '''%s'' is not a valid boolean value';
+ RsENodeNameCannotContainSpaces =
+ 'XML Node names cannot contain white space and the WhiteSpaceReplacement property is empty. Please set the WhiteSpaceReplacementProperty to a non empty value.';
+ RsEWhiteSpaceReplacementCannotContainSpaces =
+ 'The WhiteSpaceReplacement property cannot contain any white spaces.';
+ RsENodeNameCannotInvalidChars =
+ 'XML Node names cannot contain invalid chars ("%s") and the InvalidCharReplacement property is empty. Please set the InvalidCharReplacement to a non empty value.';
+ RsENotAllowedCharacterForProperty = '"%0:s" is not an allowed character for the %1:s property.';
+
+//=== JvAVICapture.pas =======================================================
+resourcestring
+ RsNotConnected = 'Not connected';
+ RsErrorMessagePrefix = 'Error #';
+
+ RsEInvalidDriverIndex =
+ '%0:d is an invalid driver index. The maximum value is %1:d' + sLineBreak +
+ 'This may also happen if the device could not be initialized properly.';
+
+//=== JvBackgrounds.pas ======================================================
+resourcestring
+ SChainError =
+ 'Message from %0:s.%1:s:' + sLineBreak + sLineBreak +
+ 'Oops... Messing up %2:s''s window procedure chain.%3:s';
+ SWorkaround = sLineBreak + sLineBreak +
+ 'To avoid this, $DEFINE the NO_DESIGNHOOK conditional compilation symbol and rebuild.';
+
+//=== JvBalloonHint.pas ======================================================
+resourcestring
+ RsEParentRequired = 'Control ''%s'' has no parent window';
+ RsEParentGivenNotAParent = 'Parent given is not a parent of ''%s''';
+
+//=== JvBaseEdits.pas ========================================================
+resourcestring
+ RsEOutOfRangeXFloat = 'Value must be between %.*f and %.*f';
+
+//=== JvBDECheckPasswordForm.pas+JvBaseDBPasswordDialog ======================
+resourcestring
+ RsChangePassword = 'Change password';
+ RsOldPasswordLabel = '&Old password:';
+ RsNewPasswordLabel = '&New password:';
+ RsConfirmPasswordLabel = '&Confirm password:';
+ RsPasswordChanged = 'Password has been changed';
+ RsPasswordNotChanged = 'Password has not been changed';
+ RsPasswordsMismatch = 'The new and confirmed passwords do not match';
+
+//=== JvBaseDBPasswordDialog.pas ============================================
+resourcestring
+ RsOldPasswordsMismatch = 'The current and old passwords do not match';
+ RsChangeButtonCaption = 'Change';
+ RsPasswordLengthToShort = 'Password length must be greater or equal %d';
+ RsPasswordNotAllowedCharacters = 'Password contains not allowed characters';
+
+//=== JvDBLogonDialogDoa.pas + JvDBLogonDialogOdac.pas ======================
+resourcestring
+ RsDoYouWantToChangePassword = 'Do you want to change the password?';
+
+//=== JvBaseDBLogonDialog.pas ===============================================
+resourcestring
+ RsLogonToDatabase = 'Logon to Database';
+ RsBtnConnect = 'Connect';
+ RsBtnAdditional = 'Additional';
+ RsBtnHintAddDefinitionToList = 'Add Definition to List';
+ RsBtnHintSelectDefinitionFromList = 'Select Definition from List';
+ RsBtnHintDeleteDefinitionFromList = 'Delete Definition from List';
+ RsPageByUser = 'By User';
+ RsPageByDatabase = 'By Database';
+ RsPageByGroup = 'By Group';
+ RsPageDefaultList = 'Default List';
+ RsUsername = '&Username';
+ RsPassword = '&Password';
+ RsDatabase = '&Database';
+ RsAlias= 'Al&ias';
+ RsShortcut = '&Shortcut';
+ RsConnectGroup = '&Connect Group';
+ RsConnectAs = 'Connect-&As';
+
+ RsImportConnectionList = 'Import Connection List';
+ RsExportConnectionList = 'Export Connection List';
+ RsConnectionListImportOverwrite = 'Overwrite';
+ RsConnectionListImportAppend = 'Append';
+ RsConnectionListImportAppendOverwriteExistingEntries = 'Append/Overwrite existing entries?';
+ RsNoConnectionEntriesFound = 'No Connection Entries found!';
+ RsConnectionListExportImportFilter = 'XML-Files (*.xml)|*.xml|INI-Files (*.ini)|*.ini|All Files (*.*)|*.*';
+ RsConnectionListItemName = 'Connection';
+ RsGroupNameUndefined = 'Undefined';
+ RsCheckboxSavePasswords = '&Save Passwords';
+ RsCheckBoxGroupByUser = 'Group By User';
+ RsCheckBoxGroupByDatabase = 'Group By Database';
+
+//=== JvDBLogonDialogOdac.pas ===============================================
+resourcestring
+ RsOracleHome = 'Oracle Home';
+ RsUseNetOptionForDirectConnect = 'Use Net-Option for direct connect';
+ RsNetOptionCheckBoxHint =
+ 'If this option is activated the connecting passed sql*net'#13#10+
+ 'and tries to connect to the server direct via tcpip.'#13#10+
+ 'The database name must contain Server name, Oracle service name,'#13#10+
+ 'and port in the following format:'#13#10+
+ ' Host:Port:SID'#13#10+
+ ' Where'#13#10+
+ ' Host is the address of server;'#13#10+
+ ' Port is the number of port that server listens to;'#13#10+
+ ' SID is system identifier that specifies Global Database Name.';
+ RsNetOptionConnectionList = 'NET Option';
+
+//=== JvDBLogonDialogUnidac.pas ===============================================
+resourcestring
+ RsServer= 'Ser&ver';
+ RsPort= 'Port';
+ RsProvider='&Provider';
+ RsDirectConnect='&Direct Connect';
+
+//=== JvBDEExceptionForm.pas =================================================
+resourcestring
+ RsDBExceptCaption = 'Database Engine Error';
+ RsBDEErrorLabel = 'BDE Error';
+ RsServerErrorLabel = 'Server Error';
+ RsErrorMsgLabel = 'Error message';
+
+//=== JvBDEFilter.pas ========================================================
+resourcestring
+ RsECaptureFilter = 'Cannot perform this operation when controls are captured';
+ RsENotCaptureFilter = 'Cannot perform this operation when controls are not captured';
+
+//=== JvBDELoginDialog.pas ===================================================
+resourcestring
+ RsEInvalidUserName = 'Invalid user name or password';
+ RsLastLoginUserName = 'Last Login User'; // Also used by JvLoginForm
+ RsSelectDatabase = 'SelectDatabase'; { dialog never writes this value }
+ RsLastAliasName = 'LastAlias'; { used if SelectDatabase = True }
+
+//=== JvBDEMove.pas ==========================================================
+resourcestring
+ RsEInvalidReferenceDescriptor = 'Invalid reference descriptor';
+
+//=== JvBdeUtils.pas =========================================================
+resourcestring
+ RsRetryLogin = 'Do you wish to retry the connect to database?';
+
+ RsETableNotInExclusiveMode = 'Table must be opened in exclusive mode to add passwords';
+ RsETableNotOpen = 'Table must be opened to pack';
+ RsETableNotOpenExclusively = 'Table must be opened exclusively to pack';
+ RsENoParadoxDBaseTable = 'Table must be either of Paradox or dBASE type to pack';
+
+//=== JvBehaviorLabel.pas ====================================================
+resourcestring
+ RsENeedBehaviorLabel = 'Cannot call %s.Create with ALabel = nil';
+ RsENoOwnerLabelParent = 'OwnerLabel.Parent is nil in %s.Start';
+
+//=== JvBevel.pas ============================================================
+resourcestring
+ RsEGradientDeprecated = 'Gradient is no longer available, use a TJvGradient component instead';
+
+//=== JvBrowseFolder.pas =====================================================
+resourcestring
+ RsEShellNotCompatible = 'Shell not compatible with BrowseForFolder';
+
+//=== JvButtons.pas ==========================================================
+resourcestring
+ RsEOwnerMustBeForm = '%s owner must be a TForm';
+
+//=== JvCalc.pas =============================================================
+resourcestring
+ RsCalculatorCaption = 'Calculator';
+
+//=== JvCalendar.pas =========================================================
+resourcestring
+ RsEInvalidDateStr = 'Invalid date specification to TMonthCalStrings (%s)';
+ RsECannotAssign = 'Cannot assign %0:s to a %1:s';
+ RsEInvalidArgumentToSetDayStates = 'Invalid argument to SetDayStates';
+ RsEInvalidAppearance = 'TJvCustomMonthCalendar.CreateWithAppearance: cannot be created without valid Appearance';
+
+//=== JvCaptionButton.pas ====================================================
+resourcestring
+ RsEOwnerMustBeTCustomForm = 'TJvCaptionButton owner must be a TCustomForm';
+
+//=== JvCaret.pas ============================================================
+resourcestring
+ RsEInvalidCaretOwner = '%s: cannot be created without a valid Owner';
+
+//=== JvChangeNotify.pas =====================================================
+resourcestring
+ RsFileNameChange = 'Filename Change';
+ RsDirectoryNameChange = 'Directory Name Change';
+ RsAttributesChange = 'Attributes Change';
+ RsSizeChange = 'Size Change';
+ RsWriteChange = 'Write Change';
+ RsSecurityChange = 'Security Change';
+
+ RsEFmtCannotChangeName = 'Cannot change %s when active';
+ RsEFmtInvalidPath = 'Invalid or empty path (%s)';
+ RsEFmtMaxCountExceeded = 'Maximum of %d items exceeded';
+ RsEFmtInvalidPathAtIndex = 'Invalid or empty path ("%0:s") at index %1:d';
+ RsENotifyErrorFmt = '%0:s:' + sLineBreak + '%1:s';
+
+//=== JvChart.pas ============================================================
+resourcestring
+ RsChartDesigntimeLabel = ': JEDI JVCL Charting Component';
+ RsNoData = 'No data. (Data.ValueCount=0)';
+ RsGraphHeader = 'Graph Header';
+ RsCurrentHeaders = 'Current Header: %s';
+ RsXAxisHeaders = 'X Axis Header: %s';
+ RsGraphScale = 'Graph Scale';
+ RsYAxisScales = 'Y Axis Scale: %s';
+ RsNoValuesHere = 'No values here!';
+ RsNA = ' n/a ';
+
+ RsEDataIndexCannotBeNegative = 'Data: index cannot be negative';
+ RsEPenIndexInvalid = 'Data: pen index invalid/out of range.';
+ RsEDataIndexTooLargeProbablyAnInternal = 'Data: index too large. Probably an internal error';
+ RsEGetAverageValueIndexNegative = 'GetAverageValue: Index negative';
+ RsESetAverageValueIndexNegative = 'SetAverageValue: Index negative';
+ RsEChartOptionsPenCountPenCountOutOf = 'JvChart.Options.PenCount - PenCount out of range';
+ RsEChartOptionsXStartOffsetValueOutO = 'JvChart.Options.XStartOffset - value out of range';
+ RsEUnableToGetCanvas = 'Unable to get canvas';
+
+//=== JvCheckedMaskEdit.pas ==================================================
+resourcestring
+ RsEBeginUnsupportedNestedCall = 'TJvCustomCheckedMaskEdit.BeginInternalChange: Unsupported nested call!';
+ RsEEndUnsupportedNestedCall = 'TJvCustomCheckedMaskEdit.EndInternalChange: Unsupported nested call!';
+
+//=== JvClipboardViewer.pas ==================================================
+ RsClipboardUnknown = 'Cannot display. Data in Clipboard is in an unknown format.';
+ RsClipboardEmpty = 'Clipboard is empty';
+
+//=== JvClipbrd.pas ==========================================================
+resourcestring
+ RsENoRenderFormatEventGiven = 'No OnRenderFormat was given';
+
+//=== JvColorButton.pas ======================================================
+resourcestring
+ RsOtherCaption = '&Other...';
+
+//=== JvColorCombo.pas =======================================================
+resourcestring
+ RsCustomCaption = 'Custom...';
+ RsNewColorPrefix = 'Custom';
+
+//=== JvColorProvider.pas ====================================================
+resourcestring
+ RsDelphiConstantNames = 'Delphi constant names';
+ RsEnglishNames = 'English names';
+ RsCustomColors = 'Custom colors';
+ RsStandardColors = 'Standard colors';
+ RsSystemColors = 'System colors';
+ RsNoSettings = '(no settings)';
+
+ RsESpecifiedMappingError = 'Specified mapping does not belong to the current provider';
+ RsEAlreadyRegistered = '''%s'' is already registered';
+ RsENoICR = 'Component does not support IInterfaceComponentReference';
+ RsENoColProv = 'Component does not support IJvColorProvider';
+ RsEMappingCollectionExpected = 'Mapping collection expected';
+ RsEExpectedMappingName = 'Expected mapping name';
+ RsEExpectedNameMappings = 'Expected name mappings';
+ RsEInvalidNameMappingSpecification = 'Invalid name mapping specification';
+ RsEUnknownColor = 'Unknown color ''%s''';
+ RsEInvalidColor = 'Invalid color (%d)';
+ RsEItemNotForList = 'Item does not belong to this list';
+
+//=== JvCombobox.pas =========================================================
+resourcestring
+ RsCapSelAll = '&Select all';
+ RsCapDeselAll = '&Deselect all';
+ RsCapInvertAll = '&Invert all';
+ RsENoMoreLength = 'Too many items selected';
+
+//=== JvComputerInfoEx.pas ===================================================
+resourcestring
+ RsEReadOnlyProperty = 'This value is read-only and cannot be changed.';
+ RsFileTypeString = '%s file';
+ RsAttrArchiveShortString = 'A';
+ RsAttrCompressedShortString = 'C';
+ RsAttrDirectoryShortString = 'D';
+ RsAttrReadOnlyShortString = 'R';
+ RsAttrHiddenShortString = 'H';
+ RsAttrSystemShortString = 'S';
+
+//=== JvContextProvider.pas ==================================================
+resourcestring
+ RsContextItemEmptyCaption = '(no context assigned to this item)';
+ RsENoContextAssigned = 'No context has been assigned to this item';
+
+ RsENoContextItem = 'Specified item is not a context item';
+ RsENotSupportedIInterfaceComponentReference = 'Component does not support IInterfaceComponentReference';
+ RsENotSupportedIJvDataProvider = 'Component does not support IJvDataProvider';
+
+//=== JvCreateProcess.pas ====================================================
+resourcestring
+ RsIdle = 'Idle';
+ RsNormal = 'Normal';
+ RsHigh = 'High';
+ RsRealTime = 'RealTime';
+ RsBelowNormal = 'Below normal';
+ RsAboveNormal = 'Above normal';
+
+ RsEProcessIsRunning = 'Cannot perform this operation when process is running';
+ RsEProcessNotRunning = 'Process is not running';
+
+//=== JvCSVBaseControls.pas ==================================================
+resourcestring
+ RsReplaceExistingDatabase = 'Replace existing database?';
+ RsCVSDatabase = 'CSV Database';
+ RsFindText = 'Find Text:';
+ RsFirstHint = 'First';
+ RsPreviousHint = 'Previous';
+ RsFindHint = 'Find';
+ RsNextHint = 'Next';
+ RsLastHint = 'Last';
+ RsAddHint = 'Add';
+ RsDeleteHint = 'Delete';
+ RsPostHint = 'Post';
+ RsRefreshHint = 'Refresh';
+ RsENoFieldsDefined = 'No fields defined';
+
+//=== JvCsvData.pas ==========================================================
+resourcestring
+ RsErrorRowItem = '';
+ RsECsvErrFormat = '%0:s: %1:s';
+ RsECsvErrFormat2 = '%0:s: %1:s (%2:d)';
+ RsECsvInvalidSeparatorFmt = 'Invalid separator character (%s)';
+ RsEProblemReadingRow = 'Problem reading row %d';
+ RsENoRecord = 'No records';
+ RsENoFieldNamesMatch = 'No field names match in these datasets. CopyFromDataset failed.';
+ RsETimeTConvError = 'SetFieldData Error - TimeT-to-DateTime conversion error';
+ RsEFieldTypeNotHandled = 'SetFieldData Error - Field type not handled';
+ RsEUnableToLocateCSVFileInfo = 'Unable to locate CSV file information for field %s';
+ RsEPhysicalLocationOfCSVField = 'Physical location of CSV field %s unknown';
+ RsEInvalidFieldTypeCharacter = 'Invalid field type character: %s';
+ RsECsvNoRecord = 'No database record';
+ RsEUnexpectedError = 'Unexpected error parsing CSV Field Definitions';
+ RsEFieldDefinitionError = 'Field Definition Error. CsvFieldDef, FieldDefs, and file contents must match';
+ RsEInvalidCsvKeyDef = 'Invalid CsvKeyDef property. InternalInitFieldDefs failed';
+ RsEInternalErrorParsingCsvKeyDef = 'Internal Error parsing CsvKeyDef. InternalInitFieldDefs failed';
+ RsEContainsField = 'CsvKeyDef contains field ''%s'' which is not defined. InternalInitFieldDefs failed';
+ RsEInsertBlocked = 'InternalAddRecord cannot Add. Insert blocked';
+ RsEPostingHasBeenBlocked = 'Posting to this database has been blocked';
+ RsEKeyNotUnique = '%s - Key is not unique ';
+ RsECannotInsertNewRow = 'Cannot insert new row. Insert blocked';
+ RsECannotPost = 'Cannot post. Not in dsEdit or dsInsert mode';
+ RsESortFailedCommaSeparated = 'Sort failed. You must give a comma separated list of field names';
+ RsESortFailedFieldNames = 'Sort failed. Unable to parse field names. ';
+ RsESortFailedInvalidFieldNameInList = 'Sort failed. Invalid field name in list: %s';
+ RsEDataSetNotOpen = 'AppendRowString: DataSet is not open (active not set to true)';
+ RsEErrorProcessingFirstLine = 'Error processing first line of CSV file';
+ RsEFieldInFileButNotInDefinition = 'ProcessCsvHeaderRow: Field %s found in file, but not in field definitions';
+ RsECsvFieldLocationError = 'CSV field location error: %s';
+ RsEFieldNotFound = 'Field %s not found in the data file';
+ RsECsvStringTooLong = 'CSV string is too long: %s...';
+ RsECannotReadCsvFile = 'Can''t read CSV file %s';
+ RsEInternalLimit = 'JvCsvData - Internal Limit of MAXCOLUMNS (%d) reached. CSV Data has too many columns';
+ RsETableNameNotSet = 'TableName not specified';
+ RsEGetMode = 'Invalid option to GetMode';
+ RsENoTableName = 'TableName not specified';
+ RsETableNameRequired = 'LoadsFromFile = True, so a TableName is required';
+ RsEInternalCompare = 'InternalCompare. Nil value detected';
+ RsEInvalidTableName = 'TJvCustomCsvDataSet.GetFileName - TableName property is not set';
+
+//=== JvCsvParse.pas =========================================================
+resourcestring
+ RsEInvalidHexLiteral = 'HexStrToInt: Invalid hex literal';
+
+//=== JvCursor.pas ===========================================================
+resourcestring
+ RsCurExtension = 'cur';
+ RsCurDescription = 'Cursor files';
+ RsCursor = 'Cursor';
+
+ RsECursorLoadFromStream = 'LoadFromStream not supported';
+ RsECursorSaveToStream = 'SaveToStream not supported';
+
+//=== JvDataProvider.pas =====================================================
+resourcestring
+ RsEItemsMayNotBeMovedInTheMainTree = 'Items may not be moved in the main tree';
+ RsEInvalidIndex = 'Invalid index';
+ RsEItemCanNotBeDeleted = 'Item cannot be deleted';
+ RsEContextNameExpected = 'Context name expected';
+ RsEConsumerStackIsEmpty = 'Consumer stack is empty';
+ RsEContextStackIsEmpty = 'Context stack is empty';
+ RsEAContextWithThatNameAlreadyExists = 'A context with that name already exists';
+ RsECannotCreateAContextWithoutAContext = 'Cannot create a context without a context list owner';
+ RsEComponentDoesNotSupportTheIJvDataPr = 'Component does not support the IJvDataProvider interface';
+ RsEComponentDoesNotSupportTheIInterfac = 'Component does not support the IInterfaceComponentReference interface';
+ RsEYouMustSpecifyAProviderBeforeSettin = 'You must specify a provider before setting the context';
+ RsEProviderHasNoContextNameds = 'Provider has no context named "%s"';
+ RsEProviderDoesNotSupportContexts = 'Provider does not support contexts';
+ RsETheSpecifiedContextIsNotPartOfTheSa = 'The specified context is not part of the same provider';
+ RsEYouMustSpecifyAProviderBeforeSettin_ = 'You must specify a provider before setting the item';
+ RsEItemNotFoundInTheSelectedContext = 'Item not found in the selected context';
+ RsEViewListOutOfSync = 'ViewList out of sync';
+
+ RsEProviderIsNoIJvDataConsumer = 'Provider property of ''%s'' does not point to a IJvDataConsumer';
+ RsEComponentIsNotDataConsumer = 'Component ''%s'' is not a data consumer';
+ RsECannotAddNil = 'Cannot add a nil pointer';
+ RsEConsumerNoSupportIJvDataConsumerClientNotify =
+ 'Consumer does not support the ''IJvDataConsumerClientNotify'' interface';
+ RsENotifierNoSupprtIJvDataConsumer = 'Notifier does not support the ''IJvDataConsumer'' interface';
+
+ RsEExtensibleIntObjDuplicateClass = 'Implementation of that class already exists';
+ RsEExtensibleIntObjCollectionExpected = 'Expected collection';
+ RsEExtensibleIntObjClassNameExpected = 'Missing ClassName property';
+ RsEExtensibleIntObjInvalidClass = 'Invalid class type';
+ RsEDataProviderNeedsItemsImpl = 'Cannot create a data provider without an IJvDataItems implementation';
+
+//=== JvDatePickerEdit.pas ===================================================
+resourcestring
+ RsDefaultNoDateShortcut = 'Alt+Del';
+
+ RsEMustHaveADate = '%s must have a date!';
+
+//=== JvDateTimePicker.pas ===================================================
+resourcestring
+ RsNoneCaption = '(none)';
+
+//=== JvDBActions.pas, JvDynControlEngineDBTools.pas =========================
+resourcestring
+ RsDBPosDialogCaption = 'Change Current Record Position';
+ RsDBPosCurrentPosition = 'Current Position';
+ RsDBPosNewPosition = 'New Position';
+ RsDBPosMovementType = 'Movement Type';
+ RsDBPosAbsolute = 'Absolute';
+ RsDBPosBackward = 'Backward';
+ RsDBPosForward = 'Forward';
+ RsDBPosPercental = 'Percental';
+ RsSRWPostButtonCaption = '&Post';
+ RsSRWCancelButtonCaption = '&Cancel';
+ RsSRWCloseButtonCaption = 'C&lose';
+
+//=== JvDBActions.pas, =======================================================
+resourcestring
+ SModifyAllOkButton = 'Modify';
+ SModifyAllCaption = 'Modify All Records';
+ SModifyAllModifyField = 'Modify Field';
+ SModifyAllOnlyIfNull = 'Only If Null';
+ SModifyAllChangeTo = 'Change To';
+ SModifyAllClearFieldValues = 'Clear Field Values';
+ SShowSQLStatementCaption = 'Show Current SQL Statement';
+ SSQLStatementClipboardButton = '&Clipboard';
+ SSQLStatementWordWrapped = '&Word Wrapped';
+
+
+//=== JvDBControls.pas =======================================================
+resourcestring
+ RsInactiveData = 'Closed';
+ RsBrowseData = 'Browse';
+ RsEditData = 'Edit';
+ RsInsertData = 'Insert';
+ RsSetKeyData = 'Search';
+ RsCalcFieldsData = 'Calculate';
+
+//=== JvDBGrid.pas ===========================================================
+resourcestring
+ RsJvDBGridSelectTitle = 'Select columns';
+ //RsJvDBGridSelectOption = '[With the real field name]';
+ RsJvDBGridSelectWarning = 'At least one column must be visible!';
+ RsEJvDBGridControlPropertyNotAssigned = 'JvDBGrid.EditControls: property Control not assigned';
+
+//=== JvDBUltimGrid.pas ======================================================
+resourcestring
+ RsEJvDBGridBadFieldKind = 'Cannot sort a binary or special field';
+ RsEJvDBGridIndexPropertyMissing = 'Cannot sort. An index property is missing';
+ RsEJvDBGridIndexMissing = 'Cannot sort. The corresponding index is missing';
+ RsEJvDBGridUserSortNotAssigned = 'Cannot sort. OnUserSort is not assigned';
+
+//=== JvDBGridExport.pas =====================================================
+resourcestring
+ RsHTMLExportDocTitle = 'Grid to HTML Export';
+ RsExportWord = 'Exporting to MS Word...';
+ RsExportExcel = 'Exporting to MS Excel...';
+ RsExportHTML = 'Exporting to HTML...';
+ RsExportFile = 'Exporting to CSV/Text...';
+ RsExportClipboard = 'Exporting to Clipboard...';
+ RsEDataSetDataSourceIsUnassigned = 'Dataset or DataSource unassigned';
+ RsEGridIsUnassigned = 'No grid assigned';
+
+//=== JvDBLookup.pas =========================================================
+resourcestring
+ RsEInvalidFormatNotAllowed = 'Invalid format: % not allowed';
+ RsEInvalidFormatsNotAllowed = 'Invalid format: %s not allowed';
+
+//=== JvDBQueryParamsForm.pas ================================================
+resourcestring
+ // (p3) copied from bdeconst so we don't have to include the entire BDE for three strings...
+ RsDataTypes =
+ ';String;SmallInt;Integer;Word;Boolean;Float;Currency;BCD;Date;Time;DateTime;;;;Blob;Memo;Graphic;;;;;Cursor;';
+ RsParamEditor = '%0:s%1:s%2:s Parameters';
+
+ RsEInvalidParamFieldType = 'Must have a valid field type selected';
+
+//=== JvDBTreeView.pas =======================================================
+resourcestring
+ RsDeleteNode = 'Delete %s ?';
+ RsDeleteNode2 = 'Delete %s (with all children) ?';
+ RsMasterFieldError = '"MasterField" must be integer type';
+ RsDetailFieldError = '"DetailField" must be integer type';
+ RsItemFieldError = '"ItemField" must be string, date or integer type';
+ RsIconFieldError = '"IconField" must be integer type';
+ RsMasterFieldEmpty = '"MasterField" property must be filled';
+ RsDetailFieldEmpty = '"DetailField" property must be filled';
+ RsItemFieldEmpty = '"ItemField" property must be filled';
+
+ RsEMoveToModeError = 'Invalid move mode for JvDBTreeNode';
+ RsMasterDetailFieldError = '"MasterField" and "DetailField" must be of same type';
+ RsEDataSetNotActive = 'DataSet not active';
+ RsEErrorValueForDetailValue = 'error value for DetailValue';
+
+//=== JvDBUtils.pas ==========================================================
+resourcestring
+ RsConfirmSave = 'The data has changed. Save it?';
+
+//=== JvDdeCmd.pas ===========================================================
+resourcestring
+ RsEErrorCommandStart = 'Invalid command start format';
+ RsEErrorCommandFormat = 'Invalid command format: %s';
+
+//=== JvDesignImp.pas ========================================================
+resourcestring
+ RsEDesignCannotSelect = 'Cannot add a nil selection.';
+ RsEOldestFmt = '%0:s: Oldest ancestor of Container must be a form.';
+
+//=== JvDesignSurface.pas ====================================================
+resourcestring
+ RsEDesignNilFmt = '%0:s: %1:s is nil';
+
+//=== JvDesktopAlertForm.pas =================================================
+resourcestring
+ RsClose = 'Close';
+
+//=== JvDrawImage.pas ========================================================
+resourcestring
+ RsImageMustBeSquare = 'image must be square for Spirographs';
+ RsSumOfRadiTolarge = 'sum of radi too large';
+ RsBothRadiMustBeGr = 'both radi must be >%d';
+
+//=== JvDropDownForm.pas =====================================================
+resourcestring
+ RsETJvCustomDropDownFormCreateOwnerMus = 'TJvCustomDropDownForm.Create: Owner must be a TCustomEdit';
+
+//=== JvDSADialogs.pas =======================================================
+resourcestring
+ RsInTheCurrentQueue = 'in the current queue';
+
+ RsDSActkShowText = 'Do not show this dialog again';
+ RsDSActkAskText = 'Do not ask me again';
+ RsDSActkWarnText = 'Do not warn me again';
+
+ RsCntdownText = 'This dialog is closing in %s.';
+
+ RsCntdownMinText = 'minute';
+ RsCntdownMinsText = 'minutes';
+ RsCntdownSecText = 'second';
+ RsCntdownSecsText = 'seconds';
+
+ RsECannotEndCustomReadIfNotInCustomRea = 'Cannot end custom read if not in custom read mode';
+ RsECannotEndCustomWriteIfNotInCustomWr = 'Cannot end custom write if not in custom write mode';
+ RsECannotEndReadIfNotInReadMode = 'Cannot end read if not in read mode';
+ RsECannotEndWriteIfNotInWriteMode = 'Cannot end write if not in write mode';
+ RsEJvDSADialogPatchErrorJvDSADialogCom = 'JvDSADialog patch error: JvDSADialog component not found';
+
+ RsEDSARegKeyCreateError = 'Unable to create key %s';
+ RsEDSADuplicateID = 'DSA dialog with ID ''%d'' is already assigned to another dialog name';
+ RsEDSADuplicateName = 'DSA dialog named ''%s'' is already assigned to another dialog ID';
+ RsEDSADialogIDNotFound = 'DSA dialog %d does not exist';
+ RsEDSADuplicateCTK_ID = 'CheckMarkText ID %d already registered';
+ RsEDSADialogIDNotStored = 'DSA dialog %d has not been stored';
+ RsEDSAKeyNotFound = 'Key %s does not exist';
+ RsEDSAKeyNoAccessAs = 'Key %0:s cannot be accessed as %1:s';
+
+ RsECtrlHasNoCheckedProp = 'The specified control has no "Checked" property';
+ RsECtrlHasNoCaptionProp = 'The specified control has no "Caption" property';
+ RsEDialogIDChangeOnlyInDesign = 'The dialog ID can only be changed at design time';
+ RsEOnlyAllowedOnForms = 'TJvDSADialog is only allowed on forms';
+ RsEAlreadyDSADialog = 'The form already has a TJvDSADialog component';
+
+ RsEDSAAccessBool = 'Boolean';
+ RsEDSAAccessFloat = 'Float';
+ RsEDSAAccessInt64 = 'Int64';
+ RsEDSAAccessInt = 'Integer';
+ RsEDSAAccessString = 'string';
+
+//=== JvDualList.pas =========================================================
+resourcestring
+ RsDualListSrcCaption = '&Source';
+ RsDualListDestCaption = '&Destination';
+
+//=== JvDynControlEngine.pas =================================================
+resourcestring
+ RsEIntfCastError = 'component does not support interface';
+ RsEUnsupportedControlClass = 'TJvDynControlEngine.RegisterControl: Unsupported ControlClass "%s"';
+ RsENoRegisteredControlClass = 'TJvDynControlEngine.CreateControl: No Registered ControlClass "%s"';
+ RsENoFocusControl = 'TJvDynControlEngine.CreateLabelControlPanel: AFocusControl must be assigned';
+
+//=== JvDynControlEngineDB.pas ===============================================
+resourcestring
+ RsEUnassignedField = 'TJvDynControlEngineDB.GetFieldControlType: AField must be assigned';
+ RsEUnassignedMultiple = 'TJvDynControlEngineDB.CreateControlsFromDatasourceOnControl: ADataSource, ADataSource.Dataset and AControl must be assigned';
+ RsEUnassignedDataSet = 'TJvDynControlEngineDB.CreateControlsFromDatasourceOnControl: ADataSource.Dataset must be active';
+
+//=== JvEDIDBBuffering.pas ===================================================
+resourcestring
+ RsENoProfileDatasets = 'Not all profile datasets have been assigned.';
+
+//=== JvEditor.pas, JvUnicodeEditor.pas ======================================
+resourcestring
+ RsERedoNotYetImplemented = 'Redo not yet implemented';
+ RsEInvalidCompletionMode = 'Invalid JvEditor Completion Mode';
+
+//=== JvEmbeddedForms.pas ====================================================
+resourcestring
+ RsEFormLinkSingleInstanceOnly = 'You only need one form link per form.';
+ RsELinkCircularRef = 'Circular references not allowed.';
+
+//=== JvErrorIndicator.pas ===================================================
+resourcestring
+ RsEControlNotFoundInGetError = 'Control not found in GetError';
+ RsEControlNotFoundInGetImageAlignment = 'Control not found in GetImageAlignment';
+ RsEControlNotFoundInGetImagePadding = 'Control not found in GetImagePadding';
+ RsEControlNotFoundInGetUseAnhors = 'Control not found in GetUseAnhors';
+ RsEUnableToAddControlInSetError = 'Unable to add control in SetError';
+ RsEUnableToAddControlInSetImageAlignme = 'Unable to add control in SetImageAlignment';
+ RsEUnableToAddControlInSetImagePadding = 'Unable to add control in SetImagePadding';
+ RsEUnableToAddControlInSetSetUseAnhors = 'Unable to add control in SetImagePadding';
+
+//=== JvExceptionForm.pas ====================================================
+resourcestring
+ RsCodeError = '%0:s.' + sLineBreak + 'Error Code: %1:.8x (%1:d).';
+ RsModuleError = 'Exception in module %0:s.' + sLineBreak + '%1:s';
+
+//=== JvFindReplace.pas ======================================================
+resourcestring
+ RsNotFound = 'Search string ''%s'' not found';
+ RsXOccurencesReplaced = '%0:d occurence(s) of ''%1:s'' were replaced';
+ RsReplaceCaption = 'Replace';
+ RsFindCaption = 'Find';
+
+ RsENoEditAssigned = 'No edit control assigned!';
+
+//=== JvFooter.pas ===========================================================
+resourcestring
+ RsETJvFooterBtnCanOnlyBePlacedOnATJvFo = 'TJvFooterBtn can only be placed on a TJvFooter';
+
+//=== JvForth.pas ============================================================
+resourcestring
+ RsEInvalidNumbers = 'invalid number %s';
+ RsEUnrecognizedDataTypeInSetOperation = 'unrecognized data type in set operation';
+ RsEUnterminatedBlockNear = 'unterminated block near ';
+ RsEParserTimedOutAfterdSecondsYouMayHa = 'parser timed out after %d seconds; you may have circular includes';
+ RsEUnterminatedIncludeNears = 'unterminated include near %s';
+ RsEIllegalSpaceCharacterInTheIncludeFi = 'illegal space character in the include file: %s';
+ RsECanNotFindIncludeFiles = 'Can not find include file: %s';
+ RsEOnIncludeHandlerNotAssignedCanNotHa = 'OnInclude handler not assigned, can not handle include file: %s';
+ RsEMissingCommentTerminatorNears = 'missing "}" comment terminator near %s';
+ RsEMissingXmlMethodSpecifierNears = 'missing XML method specifier near %s';
+ RsEMissingDataSourceMethodSpecifierNea = 'missing data source method specifier near %s';
+ RsEMissingSystemMethodSpecifierNears = 'missing system method specifier near %s';
+ RsEMissingExternalVariableMethodSpecif = 'missing external variable method specifier near %s';
+ RsEMissingInternalVariableMethodSpecif = 'missing internal variable method specifier near %s';
+ RsEUndefinedWordsNears = 'undefined word "%0:s" near %1:s';
+ RsEScriptTimedOutAfterdSeconds = 'Script timed out after %d seconds';
+ RsECanNotAssignVariables = 'can not assign variable %s';
+ RsEVariablesNotDefined = 'Variable %s not defined';
+ RsEProceduresNotDefined = 'procedure %s not defined';
+ RsEVariablesNotDefined_ = 'variable %s not defined';
+ RsESystemsNotDefined = 'System %s not defined';
+ RsECanNotAssignSystems = 'can not assign System %s';
+ RsEUnrecognizedExternalVariableMethodss = 'unrecognized external variable method %0:s.%1:s';
+ RsEUnrecognizedInternalVariableMethodss = 'unrecognized internal variable method %0:s.%1:s';
+ RsEUnrecognizedSystemMethodss = 'unrecognized system method %0:s.%1:s';
+ RsEFilesDoesNotExist = 'File %s does not exist';
+ RsECanNotSaveToFiles = 'Can not save to file %s';
+ RsEXMLSelectionIsEmpty = 'XML selection is empty';
+ RsENoXMLSelectionSelected = 'no XML selection selected';
+ RsEXMLSelectionOutOfRange = 'XML selection out of range';
+ RsEInvalidXmlMethodSpecifiers = 'invalid XML method specifier %s';
+ RsEIncrementIndexExpectedIns = 'Increment Index: "[" expected in %s';
+ RsEIncrementIndexExpectedIns_ = 'Increment Index: "]" expected in %s';
+ RsEIncrementIndexExpectedIntegerBetwee = 'Increment Index: expected integer between "[..]" in %s';
+ RsEDSOIndexOutOfRanged = 'DSO index out of range %d';
+ RsEDSOUnknownKeys = 'DSO unknown key %s';
+
+//=== JvFullColorCtrls.pas ===================================================
+resourcestring
+ RsColorHintFmt1 = 'FullColor: %0:.8x' + sLineBreak +
+ 'ColorSpace: %1:s (%2:d)' + sLineBreak +
+ 'Name: %3:s' + sLineBreak +
+ 'Pretty name: %4:s';
+ RsColorHintFmt2 = 'FullColor: %0:.8x, ColorSpace: %1:s (%2:d)' + sLineBreak +
+ 'Axis %3:s = %4:d' + sLineBreak +
+ 'Axis %5:s = %6:d' + sLineBreak +
+ 'Axis %7:s = %8:d';
+
+ RsEDuplicateTrackBar = 'TrackBar already used by component "%s"';
+ RsEUnsupportedColorSpace = 'Unsupported color space "%d"';
+
+//=== JvFullColorDialogs.pas =================================================
+resourcestring
+ RsExpandedCaption = '<< &Hide';
+ RsCollapsedCaption = '&Panels >>';
+
+//=== JvFullColorSpaces.pas ==================================================
+resourcestring
+ RsENoTypeInfo = 'The class %s contains no run time type info' + sLineBreak +
+ '"Class in module" test cannot be executed';
+ RsEUnnamedAxis = 'Unnamed Color Axis';
+ RsEUnnamedSpace = 'Unnamed Color Space';
+ RsEUCS = 'UCS';
+ RsENoName = 'No Name';
+ RsECSNotFound = 'Color Space not found: %d';
+ RsEIllegalID = 'Color Space ID %d is illegal';
+ RsECSAlreadyExists = 'Color Space Already exists [ID: %0:d, Name: %1:s]';
+ RsEInconvertibleColor = 'TColor value $%.8X cannot be converted to TJvFullColor';
+
+ RsRGB_Red = 'Red';
+ RsRGB_Green = 'Green';
+ RsRGB_Blue = 'Blue';
+ RsRGB_FullName = 'True Color';
+ RsRGB_ShortName = 'RGB';
+
+ RsHLS_Hue = 'Hue';
+ RsHLS_Lightness = 'Lightness';
+ RsHLS_Saturation = 'Saturation';
+ RsHLS_FullName = 'Chromatic Vision';
+ RsHLS_ShortName = 'HLS';
+
+ RsCMY_Cyan = 'Cyan';
+ RsCMY_Magenta = 'Magenta';
+ RsCMY_Yellow = 'Yellow';
+ RsCMY_FullName = 'Substractive Vision';
+ RsCMY_ShortName = 'CMY';
+
+ RsYUV_Y = 'Y Value';
+ RsYUV_U = 'U Value';
+ RsYUV_V = 'V Value';
+ RsYUV_FullName = 'PC Video';
+ RsYUV_ShortName = 'YUV';
+
+ RsHSV_Hue = 'Hue';
+ RsHSV_Saturation = 'Saturation';
+ RsHSV_Value = 'Value';
+ RsHSV_FullName = 'Rotation Vision';
+ RsHSV_ShortName = 'HSV';
+
+ RsYIQ_Y = 'Y';
+ RsYIQ_I = 'I';
+ RsYIQ_Q = 'Q';
+ RsYIQ_FullName = 'NTSC US television standard';
+ RsYIQ_ShortName = 'YIQ';
+
+ RsYCC_Y = 'Y';
+ RsYCC_Cr = 'Cr';
+ RsYCC_Cb = 'Cb';
+ RsYCC_FullName = 'YCrCb';
+ RsYCC_ShortName = 'YCC';
+
+ RsXYZ_X = 'X';
+ RsXYZ_Y = 'Y';
+ RsXYZ_Z = 'Z';
+ RsXYZ_FullName = 'CIE XYZ';
+ RsXYZ_ShortName = 'XYZ';
+
+ RsLAB_L = 'L';
+ RsLAB_A = 'A';
+ RsLAB_B = 'B';
+ RsLAB_FullName = 'CIE LAB';
+ RsLAB_ShortName = 'LAB';
+
+ RsDEF_FullName = 'Delphi predefined colors';
+ RsDEF_ShortName = 'DEF';
+
+//=== Jvg3DColors.pas ========================================================
+resourcestring
+ RsEOnlyOneInstanceOfTJvg3DLocalColors = 'Cannot create more than one instance of TJvg3DLocalColors component';
+
+//=== JvGammaPanel.pas =======================================================
+resourcestring
+ RsRedFormat = 'R : %3D';
+ RsGreenFormat = 'G : %3D';
+ RsBlueFormat = 'B : %3D';
+
+ RsHint1 = 'Background Color';
+ RsHint2 = 'Foreground Color';
+ RsXCaption = 'X';
+ RsLabelHint = 'Exchange colors';
+
+ RsDefaultB = 'B : ---';
+ RsDefaultG = 'G : ---';
+ RsDefaultR = 'R : ---';
+
+//=== JvgAskListBox.pas ======================================================
+resourcestring
+ RsYes = 'yes';
+ RsNo = 'no';
+
+//=== JvgButton.pas ==========================================================
+resourcestring
+ RsEErrorDuringAccessGlyphsListOrGlyphP = 'Error during access GlyphsList or Glyph property';
+
+//=== JvgCaption.pas =========================================================
+resourcestring
+ RsEOnlyOneInstanceOfTJvgCaption = 'Cannot create more than one instance of TJvgCaption component';
+
+//=== JvgCheckVersionInfoForm.pas ============================================
+resourcestring
+ RsNoNewerVersionOfProgramAvailable = 'No newer version of program available';
+
+//=== JvGenetic.pas ==========================================================
+resourcestring
+ RsENoTest = 'TJvGenetic: OnTestMember must be assigned';
+
+//=== JvgExportComponents.pas ================================================
+resourcestring
+ RsEDataSetIsUnassigned = 'DataSet is unassigned';
+ RsESaveToFileNamePropertyIsEmpty = 'SaveToFileName property is empty';
+ RsEExcelNotAvailable = 'Excel not available';
+
+//=== JvgHelpPanel.pas =======================================================
+resourcestring
+ RsHelp = ' help ';
+ RsOpenContextMenuToLoadRTFTextControl = 'Open context menu to load RTF text. Control shows text at runtime only.';
+
+//=== JvgHint.pas ============================================================
+resourcestring
+ RsEOnlyOneInstanceOfTJvgHint = 'Cannot create more than one instance of TJvgHint component';
+
+//=== JvgHTTPVersionInfo.pas =================================================
+resourcestring
+ RsEUnknownURLPropertyVersionDataURLIs = 'Unknown URL: property VersionDataURL is empty';
+
+//=== JvGIF.pas ==============================================================
+resourcestring
+ RsGIFImage = 'CompuServe GIF Image';
+
+ RsEChangeGIFSize = 'Cannot change the Size of a GIF image';
+ RsENoGIFData = 'No GIF Data to write';
+ RsEUnrecognizedGIFExt = 'Unrecognized extension block: %.2x';
+ RsEWrongGIFColors = 'Wrong number of colors; must be a power of 2';
+ RsEBadGIFCodeSize = 'GIF code size not in range 2 to 9';
+ RsEGIFDecodeError = 'GIF encoded data is corrupt';
+ RsEGIFEncodeError = 'GIF image encoding error';
+ RsEGIFVersion = 'Unknown GIF version';
+
+//=== JvgLogics.pas ==========================================================
+resourcestring
+ RsEqualTo = 'equal to';
+ RsStartingWith = 'starting with';
+ RsEndsWith = 'ends with';
+ RsContains = 'contains';
+ RsIsContainedWithin = 'is contained within';
+ RsNotEmpty = 'not empty';
+ RsStep = 'Step ';
+ RsComments = 'Comments';
+
+//=== JvgMailSlots.pas =======================================================
+resourcestring
+ RsJvMailSlotServerErrorCreatingChan = 'Mailslot-Server: Error creating channel!';
+ RsJvMailSlotServerErrorGatheringInf = 'Mailslot-Server: Error gathering information!';
+ RsJvMailSlotServerErrorReadingMessa = 'Mailslot-Server: Error reading message!';
+
+//=== JvgProgress.pas ========================================================
+resourcestring
+ RsProgressCaption = 'Progress...[%d%%]';
+
+//=== JvgQPrintPreviewForm.pas ===============================================
+resourcestring
+ RsPageOfPages = 'Page %0:d of %1:d';
+
+//=== JvGradientHeaderPanel.pas ==============================================
+resourcestring
+ RsYourTextHereCaption = 'Put your text here ...';
+
+//=== JvgReport.pas ==========================================================
+resourcestring
+ RsOLELinkedObjectNotFound = 'OLE: Linked object not found.';
+ RsErrorText = 'Error';
+ RsErrorReadingComponent = 'Error reading component';
+
+//=== JvGridPreviewForm.pas ==================================================
+resourcestring
+ RsOfd = 'of %d';
+ RsPaged = 'Page %d';
+ RsNoPrinterIsInstalled = 'No Printer is installed';
+
+//=== JvGridPrinter.pas ======================================================
+resourcestring
+ RsPrintOptionsPageFooter = 'date|time|page';
+ RsPrintOptionsDateFormat = 'd-mmm-yyyy';
+ RsPrintOptionsTimeFormat = 'h:nn am/pm';
+
+//=== JvgSingleInstance.pas ==================================================
+resourcestring
+ RsOneInstanceOfThisProgramIsAlreadyRu =
+ 'One instance of this program is already running. A second instance launch is not allowed.';
+ RsSecondInstanceLaunchOfs = 'Second instance launch of %s';
+
+//=== JvgSmallFontsDefense.pas ===============================================
+resourcestring
+ RsTJvgSmallFontsDefenseCannotBeUsedWi = 'TJvgSmallFontsDefense cannot be used with large fonts.';
+
+//=== JvgUtils.pas ===========================================================
+resourcestring
+ RsERightBracketsNotFound = 'Right brackets not found';
+ RsERightBracketHavntALeftOnePosd = 'Right bracket does not have a left one. Pos: %d';
+ RsEDivideBy = 'Divide by 0';
+ RsEDuplicateSignsAtPos = 'Duplicate signs at Pos: %d';
+ RsEExpressionStringIsEmpty = 'Expression string is empty';
+ {$IFDEF glDEBUG}
+ RsEObjectMemoryLeak = 'object memory leak';
+ {$ENDIF glDEBUG}
+
+//=== JvgXMLSerializer.pas ===================================================
+resourcestring
+ { RUSSIAN
+ RsOpenXMLTagNotFound = 'Îòêðûâà þùèé òåã ÃÃ¥ Ãà éäåÃ: <%s>';
+ RsCloseXMLTagNotFound = 'Çà êðûâà þùèé òåã ÃÃ¥ Ãà éäåÃ: %s>';
+ RsUncknownProperty = 'Uncknown property: %s'
+ }
+ RsOpenXMLTagNotFound = 'Open tag not found: <%s>';
+ RsCloseXMLTagNotFound = 'Close tag not found: %s>';
+ RsUnknownProperty = 'Unknown property: %s';
+
+//=== JvHidControllerClass.pas ===============================================
+resourcestring
+ RsUnknownLocaleIDFmt = 'Unknown Locale ID $%.4x';
+ RsHIDP_STATUS_NULL = 'Device not plugged in';
+ RsHIDP_STATUS_INVALID_PREPARSED_DATA = 'Invalid preparsed data';
+ RsHIDP_STATUS_INVALID_REPORT_TYPE = 'Invalid report type';
+ RsHIDP_STATUS_INVALID_REPORT_LENGTH = 'Invalid report length';
+ RsHIDP_STATUS_USAGE_NOT_FOUND = 'Usage not found';
+ RsHIDP_STATUS_VALUE_OUT_OF_RANGE = 'Value out of range';
+ RsHIDP_STATUS_BAD_LOG_PHY_VALUES = 'Bad logical or physical values';
+ RsHIDP_STATUS_BUFFER_TOO_SMALL = 'Buffer too small';
+ RsHIDP_STATUS_INTERNAL_ERROR = 'Internal error';
+ RsHIDP_STATUS_I8042_TRANS_UNKNOWN = '8042 key translation impossible';
+ RsHIDP_STATUS_INCOMPATIBLE_REPORT_ID = 'Incompatible report ID';
+ RsHIDP_STATUS_NOT_VALUE_ARRAY = 'Not a value array';
+ RsHIDP_STATUS_IS_VALUE_ARRAY = 'Is a value array';
+ RsHIDP_STATUS_DATA_INDEX_NOT_FOUND = 'Data index not found';
+ RsHIDP_STATUS_DATA_INDEX_OUT_OF_RANGE = 'Data index out of range';
+ RsHIDP_STATUS_BUTTON_NOT_PRESSED = 'Button not pressed';
+ RsHIDP_STATUS_REPORT_DOES_NOT_EXIST = 'Report does not exist';
+ RsHIDP_STATUS_NOT_IMPLEMENTED = 'Not implemented';
+ RsUnknownHIDFmt = 'Unknown HID error %x';
+ RsHIDErrorPrefix = 'HID Error: ';
+
+ RsEDirectThreadCreationNotAllowed = 'Direct creation of a TJvDeviceReadThread object is not allowed';
+ RsEDirectHidDeviceCreationNotAllowed = 'Direct creation of a TJvHidDevice object is not allowed';
+ RsEDeviceCannotBeIdentified = 'Device cannot be identified';
+ RsEDeviceCannotBeOpened = 'Device cannot be opened';
+ RsEOnlyOneControllerPerProgram = 'Only one TJvHidDeviceController allowed per program';
+ RsEHIDBooleanError = 'HID Error: a boolean function failed';
+
+//=== JvHint.pas =============================================================
+resourcestring
+ RsHintCaption = 'Hint';
+
+//=== JvHLEditorPropertyForm.pas =============================================
+resourcestring
+ RsHLEdPropDlg_Caption = 'Editor Properties';
+ RsHLEdPropDlg_tsEditor = 'Editor';
+ RsHLEdPropDlg_tsColors = 'Colors';
+ RsHLEdPropDlg_lblEditorSpeedSettings = 'Editor SpeedSettings';
+ RsHLEdPropDlg_cbKeyboardLayoutDefault = 'Default keymapping';
+ RsHLEdPropDlg_gbEditor = 'Editor options:';
+ RsHLEdPropDlg_cbAutoIndent = '&Auto indent mode';
+ RsHLEdPropDlg_cbSmartTab = 'S&mart tab';
+ RsHLEdPropDlg_cbBackspaceUnindents = 'Backspace &unindents';
+ RsHLEdPropDlg_cbGroupUndo = '&Group undo';
+ RsHLEdPropDlg_cbCursorBeyondEOF = 'Cursor beyond &EOF';
+ RsHLEdPropDlg_cbCursorBeyondEOL = 'Cursor beyond end of &line';
+ RsHLEdPropDlg_cbUndoAfterSave = '&Undo after sa&ve';
+ RsHLEdPropDlg_cbKeepTrailingBlanks = '&Keep trailing blanks';
+ RsHLEdPropDlg_cbDoubleClickLine = '&Double click line';
+ RsHLEdPropDlg_cbSytaxHighlighting = 'Use &syntax highlight';
+ RsHLEdPropDlg_lblTabStops = '&Tab stops:';
+ RsHLEdPropDlg_lblColorSpeedSettingsFor = 'Color SpeedSettings for';
+ RsHLEdPropDlg_lblElement = '&Element:';
+ RsHLEdPropDlg_lblColor = '&Color:';
+ RsHLEdPropDlg_gbTextAttributes = 'Text attributes:';
+ RsHLEdPropDlg_gbUseDefaultsFor = 'Use defaults for:';
+ RsHLEdPropDlg_cbBold = '&Bold';
+ RsHLEdPropDlg_cbItalic = '&Italic';
+ RsHLEdPropDlg_cbUnderline = '&Underline';
+ RsHLEdPropDlg_cbDefForeground = '&Foreground';
+ RsHLEdPropDlg_cbDefBackground = '&Background';
+ RsHLEdPropDlg_OptionCantBeChanged = 'This option cannot be changed. Sorry.';
+
+ RsEHLEdPropDlg_RAHLEditorNotAssigned = 'JvHLEditor property is not assigned';
+ RsEHLEdPropDlg_RegAutoNotAssigned = 'RegAuto property is not assigned';
+ RsEHLEdPropDlg_GridCellNotFound = 'Grid cell not found';
+
+//=== JvHTTPGrabber.pas ======================================================
+resourcestring
+ RsAgent = 'TJvHTTPGrabber Delphi Component';
+
+//=== JvId3v1.pas ============================================================
+resourcestring
+ RsENotActive = 'Not active';
+
+//=== JvID3v2Base.pas ========================================================
+resourcestring
+ RsENameMsgFormat = '%0:s: %1:s';
+ RsEAllowedEncodingsIsEmpty = 'FAllowedEncodings is empty';
+ RsEAlreadyReadingWriting = 'Already reading or writing';
+ RsEAlreadyReadingWritingFrame = 'Already reading/writing frame';
+ RsEAlreadyUsingTempStream = 'Already using temp stream';
+ RsECannotCallCanRead = 'Cannot call CanRead while writing';
+ RsEControllerDoesNotSupportCompression = 'Controller does not support compression';
+ RsEControllerDoesNotSupportCRC = 'Controller does not support CRC';
+ RsEControllerDoesNotSupportEncryption = 'Controller does not support encryption';
+ RsEControllerDoesNotSupportFooter = 'Controller does not support footer';
+ RsECouldNotFindAllowableEncoding = 'Could not find allowable encoding';
+ RsECouldNotReadData = 'Could not read data from stream';
+ RsEErrorInFrame = 'Error in frame %0:s (%1:s), %2:s';
+ RsEFrameSizeDiffers = 'Frame size differs from actually amount of data written';
+ RsEFrameSizeTooBig = 'Frame size is too big';
+ RsELanguageNotOfLength3 = 'Language is not of length 3';
+ RsENoTempStream = 'No temp stream';
+ RsENotReadingFrame = 'Not reading frame';
+ RsENotUsingTempStream = 'Not using temp stream';
+ RsENotWriting = 'Not writing';
+ RsENotWritingFrame = 'Not writing frame';
+ RsETagTooBig = 'Tag is too big';
+ RsEValueTooBig = 'Cannot write value in v2.2; too big';
+ RsENotReading = 'Not reading';
+
+ RsEID3FrameNotFound = 'Frame not found';
+ RsEID3UnknownEncoding = 'Unknown encoding';
+ RsEID3UnknownVersion = 'Unknown version';
+ RsEID3DuplicateFrame = 'Frame is a duplicate of another frame in the tag';
+ RsEID3AlreadyContainsFrame = 'Tag already contains a ''%s'' frame';
+ RsEID3ControllerNotActive = 'Controller is not active';
+ RsEID3EncodingNotSupported = 'Encoding not supported in this version';
+ RsEID3VersionNotSupported = 'Version not supported';
+ RsEID3InvalidLanguageValue = '''%s'' is an invalid language value';
+ RsEID3InvalidPartInSetValue = '''%s'' is an invalid ''part in set'' value';
+ RsEID3InvalidTimeValue = '''%s'' is an invalid time value.' + sLineBreak + 'Value must be of format ''HHMM''';
+ RsEID3InvalidDateValue = '''%s'' is an invalid date value.' + sLineBreak + 'Value must be of format ''DDMM''';
+ RsEID3ValueTooBig = '''%d'' is an invalid value. Value is too big';
+ RsEID3StringTooLong = '''%s'' is an invalid value. String is too long';
+ RsEID3InvalidCharinList = 'Invalid char ''%0:s'' in string ''%1:s'' in list';
+ RsEID3InvalidFrameClass = 'Frame class ''%0:s'' cannot be used to represent frame ID ''%1:s''';
+ RsEID3FrameIDNotSupported = 'Frame ID ''%s'' not supported by this frame';
+ RsEID3FrameIDStrNotSupported = 'Frame ID string ''%s'' not supported by this frame';
+
+//=== JvId3v2Types.pas =======================================================
+resourcestring
+ RsEFrameIDSizeCanOnlyBe34 = 'Frame ID size can only be 3 or 4';
+
+//=== JvImageDlg.pas =========================================================
+resourcestring
+ RsImageTitle = 'Image Viewer';
+
+//=== JvImageList.pas ========================================================
+resourcestring
+ RsResource = 'Resource %s';
+ RsMappedResource = 'Mapped Resource %s';
+ RsBitmap = 'Bitmap %s';
+ RsEWrongImageListMode = 'Wrong image list mode. For this function the mode must be %s';
+
+//=== JvImageWindow.pas ======================================================
+resourcestring
+ RsEImagesNotAssigned = 'Images not Assigned!';
+
+//=== JvInspector.pas ========================================================
+resourcestring
+ RsJvInspItemValueException = 'Exception ';
+ RsJvInspItemUnInitialized = '(uninitialized)';
+ RsJvInspItemUnassigned = '(unassigned)';
+ RsJvInspItemNoValue = '(no value)';
+
+ RsStringListEditorCaption = 'String list editor';
+ RsXLinesCaption = ' lines';
+ RsOneLineCaption = '1 line';
+
+ RsEJvInspItemHasParent = 'Item already assigned to another parent';
+ RsEJvInspItemNotAChild = 'Specified Item is not a child of this item';
+ RsEJvInspItemColNotFound = 'Specified column does not belong to this compound item';
+ RsEJvInspItemItemIsNotCol = 'Specified item is not a column of this compound item';
+ RsEJvInspItemInvalidPropValue = 'Invalid property value %s';
+ RsEJvInspDataNoAccessAs = 'Data cannot be accessed as %s';
+ RsEJvInspDataNotInit = 'Data not initialized';
+ RsEJvInspDataNotAssigned = 'Data not assigned';
+ RsEJvInspDataNoValue = 'Data has no value';
+ RsEJvInspDataStrTooLong = 'String too long';
+ RsEJvInspRegNoCompare = 'Cannot compare %0:s to %1:s';
+ RsEJvInspNoGenReg = 'Unable to create generic item registration list';
+ RsEJvInspPaintNotActive = 'Painter is not the active painter of the specified inspector';
+ RsEJvInspPaintOnlyUsedOnce = 'Inspector painter can only be linked to one inspector';
+
+ RsEInspectorInternalError = 'Internal error: two data instances pointing to the same data are registered';
+ RsESpecifierBeforeSeparator = 'A specifier should be placed before and after a separator';
+ RsEDOrDDOnlyOnce = '''d'' or ''dd'' should appear only once';
+ RsEMOrMMOnlyOnce = '''m'' or ''mm'' should appear only once';
+ RsEYYOrYYYYOnlyOnce = '''yy'' or ''yyyy'' should appear only once';
+ RsEOnlyDOrDDAllowed = 'Only ''d'' or ''dd'' are allowed';
+ RsEOnlyMOrMMAllowed = 'Only ''m'' or ''mm'' are allowed';
+ RsEOnlyYYOrYYYYAllowed = 'Only ''yy'' or ''yyyy'' are allowed';
+ RsEOnlyTwoSeparators = 'Only two separators are allowed';
+ RsEOnlyDMYSAllowed = 'Only ''d'', ''m'', ''y'' and ''%s'' are allowed';
+ RsEDOrDDRequired = '''d'' or ''dd'' are required';
+ RsEMOrMMRequired = '''m'' or ''mm'' are required';
+ RsEYYOrYYYYRequired = '''yy'' or ''yyyy'' are required';
+ RsEInstanceAlreadyExists = 'Instance already exists with another name';
+ RsENameAlreadyExistsForInstance = 'Name already exists for another instance';
+ RsEInstanceNonexistent = 'Instance does not exist';
+ RsEMethodAlreadyExists = 'Method already exists with another name';
+ RsENameAlreadyExistsForMethod = 'Name already exists for another method';
+ RsENamedInstanceNonexistent = 'Instance named ''%s'' does not exist';
+ RsEMethodNonexistent = 'Method does not exist';
+ RsENamedMethodNonexistent = 'Method named ''%s'' does not exist';
+ RsENotSeparately = '%s cannot be created separately';
+ RsENoNewInstance = '%s does not allow a new instance to be created';
+
+ // (rom) converted assertions
+ RsEJvAssertSetTopIndex = 'TJvCustomInspector.SetTopIndex: unexpected MaxIdx <= -1';
+ RsEJvAssertInspectorPainter = 'TJvInspectorCustomCompoundItem.DivideRect: unexpected Inspector.Painter = nil';
+ RsEJvAssertDataParent = 'TJvInspectorSetMemberData.New: unexpected ADataParent = nil';
+ RsEJvAssertParent = 'TJvInspectorSetMemberData.New: unexpected AParent = nil';
+ RsEJvAssertPropInfo = 'TJvInspectorPropData.New: unexpected PropInfo = nil';
+ RsEJvAssertClassInfo = 'TJvInspectorPropData.New: unexpected ClassInfo = nil';
+ RsEJvAssertINIFile = 'TJvInspectorINIFileData.New: unexpected AINIFile = nil';
+
+//=== JvInspXVCL.pas =========================================================
+resourcestring
+ RsENoNodeSpecified = 'TJvInspectorxNodeData.New: No node specified';
+
+//=== JvInstallLabel.pas =====================================================
+resourcestring
+ RsEListOutOfBounds = 'List index out of bounds (%d)';
+
+//=== JvInterpreter.pas ======================================================
+resourcestring
+ RsNotImplemented = 'Function not yet implemented';
+ RsOleAutomationCall = 'Ole automation call';
+
+ RsESorryDynamicArraysSupportIsMadeForO = 'Sorry. Dynamic arrays support is made for one-dimensional arrays only';
+ RsEUnknownRecordType = 'Unknown RecordType';
+ RsERangeCheckError = 'Range check error';
+ RsArrayToArrayAssignment = 'Array to array assignment';
+
+//=== JvInterpreter_Quickrpt.pas =============================================
+resourcestring
+ RsENoQuickReportFound = 'TQuickRep component not found on the form';
+
+//=== JvInterpreter_System.pas ===============================================
+resourcestring
+ RsESizeMustBeEven = 'The size of bounds array must be even!';
+
+//=== JvInterpreterConst.pas =================================================
+resourcestring
+ RsEInterpreter0 = 'Ok';
+ RsEInterpreter1 = 'Unknown error';
+ RsEInterpreter2 = 'Internal interpreter error: %s';
+ RsEInterpreter3 = 'User break';
+ RsEInterpreter4 = 'Re-raising an exception only allowed in exception handler';
+ RsEInterpreter5 = 'Error in unit ''%0:s'' on line %1:d : %2:s';
+ RsEInterpreter6 = 'External error in unit ''%0:s'' on line %1:d : %2:s';
+ RsEInterpreter7 = 'Access denied to ''%s''';
+ RsEInterpreter8 = 'Expression is too complex - overflow';
+ RsEInterpreter31 = 'Record ''%s'' not defined';
+
+ RsEInterpreter52 = 'Stack overflow';
+ RsEInterpreter53 = 'Type mismatch';
+ RsEInterpreter55 = 'Function ''main'' undefined';
+ RsEInterpreter56 = 'Unit ''%s'' not found';
+ RsEInterpreter57 = 'Event ''%s'' not registered';
+ RsEInterpreter58 = 'DFM ''%s'' not found';
+
+ RsEInterpreter101 = 'Error in remark'; // (rom) in comment?
+ RsEInterpreter103 = '%0:s expected but %1:s found';
+ RsEInterpreter104 = 'Undeclared Identifier ''%s''';
+ RsEInterpreter105 = 'Type of expression must be boolean';
+ RsEInterpreter106 = 'Class type required';
+ RsEInterpreter107 = ' not allowed before else';
+ RsEInterpreter108 = 'Type of expression must be integer';
+ RsEInterpreter109 = 'Record, object or class type required';
+ RsEInterpreter110 = 'Missing operator or semicolon';
+ RsEInterpreter111 = 'Identifier redeclared: ''%s''';
+
+ RsEInterpreter171 = 'Array index out of bounds';
+ RsEInterpreter172 = 'Too many array bounds';
+ RsEInterpreter173 = 'Not enough array bounds';
+ RsEInterpreter174 = 'Invalid array dimension';
+ RsEInterpreter175 = 'Invalid array range';
+ RsEInterpreter176 = 'Array type required';
+
+ RsEInterpreter181 = 'Too many actual parameters';
+ RsEInterpreter182 = 'Not enough parameters';
+ RsEInterpreter183 = 'Incompatible types: ''%0:s'' and ''%1:s''';
+ RsEInterpreter184 = 'Error loading library ''%s''';
+ RsEInterpreter185 = 'Invalid type of argument in call to function ''%s''';
+ RsEInterpreter186 = 'Invalid type of result in call to function ''%s''';
+ RsEInterpreter187 = 'Can''t get proc address for function ''%s''';
+ RsEInterpreter188 = 'Invalid type of argument in call to function ''%s''';
+ RsEInterpreter189 = 'Invalid type of result in call to function ''%s''';
+ RsEInterpreter190 = 'Invalid calling convention for function ''%s''';
+
+ RsEInterpreter201 = 'Calling ''%0:s'' failed: ''%1:s''';
+
+ RsEInterpreter301 = 'Expression';
+ RsEInterpreter302 = 'Identifier';
+ RsEInterpreter303 = 'Declaration';
+ RsEInterpreter304 = 'End of File';
+ RsEInterpreter305 = 'Class Declaration';
+ RsEInterpreter306 = 'Integer Constant''';
+ RsEInterpreter307 = 'Integer Value';
+ RsEInterpreter308 = 'String Constant';
+ RsEInterpreter309 = 'Statement';
+
+ RsEInterpreter401 = 'Implementation of unit not found';
+ RsEInterpreter402 = 'Array and Record types are not allowed as procedure/function parameter';
+
+ RsEXOrX = ''' or ''';
+
+//=== JvInterpreterFm.pas ====================================================
+resourcestring
+ RsENoReportProc = 'Procedure "JvInterpreterRunReportPreview" not found';
+ RsENoReportProc2 = 'Procedure "JvInterpreterRunReportPreview2" not found';
+
+//=== JvJanTreeView.pas ======================================================
+resourcestring
+ RsSaveCurrentTree = 'Save Current Tree';
+ RsSearch = 'Search';
+ RsSearchFor = 'Search for:';
+ RsNoMoresFound = 'No more %s found';
+
+ RsEInvalidReduction = 'Invalid reduction';
+ RsEBadTokenState = 'Bad token state';
+ RsTreeViewFiles = 'TreeView Files';
+ RsNewNode = 'new node';
+ RsNew = 'new';
+ RsRecalculateErr = 'Error in: %s';
+
+//=== JvJoystick.pas =========================================================
+resourcestring
+ RsNoJoystickDriver = 'The joystick driver is not present.';
+ RsCannotCaptureJoystick = 'Cannot capture the joystick';
+ RsJoystickUnplugged = 'The specified joystick is not connected to the system.';
+ RsJoystickErrorParam = 'The specified joystick device identifier is invalid.';
+
+ RsEJoystickError = 'Unable to initialize joystick driver';
+
+//=== JvJVCLUtils.pas ========================================================
+resourcestring
+ RsENotForMdi = 'MDI forms are not allowed';
+ RsEPixelFormatNotImplemented = 'BitmapToMemoryStream: pixel format not implemented';
+ RsEBitCountNotImplemented = 'BitmapToMemoryStream: bit count not implemented';
+ RsECantGetShortCut = 'Target FileName for ShortCut %s not available';
+ RsEBadGraphicSignature = 'Bad Graphic Signature';
+ RsEChildControlMissing = 'Child control is nil';
+
+//=== JvLinkedControls.pas ===================================================
+resourcestring
+ RsEOwnerLinkError = 'Cannot link to owner control';
+
+//=== JvLinkLabel.pas ========================================================
+resourcestring
+ RsEUnableToLocateMode = 'Unable to locate specified node';
+ RsETagNotFound = 'TJvCustomLinkLabel.UpdateDynamicTag: Tag not found';
+
+//=== JvLinkLabelParser.pas ==================================================
+resourcestring
+ RsENoMoreElementsToReturn = 'TElementEnumerator.GetNextElement: No more elements to return';
+ RsEUnsupportedState = 'TDefaultParser.ParseNode: Unsupported state';
+
+//=== JvLinkLabelTextHandler.pas =============================================
+resourcestring
+ RsENoMoreWords = 'TWordEnumerator.GetNext: No more words to return';
+ RsEUnsupported = 'TTextHandler.EmptyBuffer: Unsupported TParentTextElement descendant encountered';
+
+//=== JvLinkLabelTools.pas ===================================================
+resourcestring
+ RsECannotBeInstantiated = 'This class cannot be instantiated';
+
+//=== JvLinkLabelTree.pas ====================================================
+resourcestring
+ RsETNodeGetNodeTypeUnknownClass = 'TNode.GetNodeType: Unknown class';
+ RsENoMoreNodesToReturn = 'No more nodes to return';
+ RsENoMoreRecordsToReturn = 'No more records to return';
+ RsEWordInfoIndexOutOfBounds = 'TStringNode.GetWordInfo: Index out of bounds';
+
+//=== JvListView.pas =========================================================
+resourcestring
+ RsETooManyColumns = 'TJvListView.GetColumnsOrder: too many columns';
+
+//=== JvLoginForm.pas ========================================================
+resourcestring
+ RsRegistrationCaption = 'Registration';
+ RsAppTitleLabel = 'Application "%s"';
+ RsHintLabel = 'Type your user name and password to enter the application';
+ RsUserNameLabel = '&User name:';
+ RsPasswordLabel = '&Password:';
+ RsUnlockCaption = 'Unlock application';
+ RsUnlockHint = 'Type your password to unlock the application';
+
+//=== JvMail.pas =============================================================
+resourcestring
+ RsAttachmentNotFound = 'Attached file "%s" not found';
+ RsRecipNotValid = 'Recipient %s has invalid address';
+ RsNoClientInstalled = 'There is no MAPI-enabled client on the machine';
+ RsNoUserLogged = 'There must be a user logged before call this function';
+
+//=== JvMemoryDataset.pas ====================================================
+resourcestring
+ RsEMemNoRecords = 'No data found';
+ // 'Registro ya existente.';
+ RsERecordDuplicate = 'Record already exists.';
+ // 'Registro no encontrado.';
+ RsERecordInexistent = 'Record not found.';
+ // 'No se pudo agregar el registro.';
+ RsEInsertError = 'Unable to append the record.';
+ // 'No se pudo modificar el registro.';
+ RsEUpdateError = 'Unable to modify the record.';
+ // 'No se pudo eliminar el registro.';
+ RsEDeleteError = 'Unable to erase the record.';
+
+//=== JvMouseGesture.pas =====================================================
+resourcestring
+ RsECannotHookTwice = 'JvMouseGesture Fatal: You cannot hook this event twice';
+
+//=== JvMRUList.pas ==========================================================
+resourcestring
+ RsEErrorMruCreating = 'Unable to create MRU';
+ RsEErrorMruUnicode = 'Windows NT required for Unicode in MRU';
+
+//=== JvMRUManager.pas =======================================================
+resourcestring
+ RsEDuplicatesNotAllowedInMRUList = 'Duplicates not allowed in MRU list';
+
+//=== JvMTComponents.pas =====================================================
+resourcestring
+ RsENoThreadManager = 'No ThreadManager specified';
+ RsEOperatorNotAvailable = 'Operation not available while thread is active';
+ RsECannotChangePropertySection = 'Cannot change property of active section';
+ RsECannotChangePropertyBuffer = 'Cannot change property of active buffer';
+
+//=== JvMTData.pas ===========================================================
+resourcestring
+ RsEMethodOnlyForMainThread = '%s method can only be used by the main VCL thread';
+
+//=== JvMTSync.pas ===========================================================
+resourcestring
+ RsESemaphoreFailure = 'Semaphore failure (%d)';
+ RsESemaphoreAbandoned = 'Semaphore was abandoned';
+ RsEThreadAbandoned = 'Thread was abandoned';
+
+//=== JvMTThreading.pas ======================================================
+resourcestring
+ RsECurThreadIsPartOfManager = 'Current MTThread is part of the MTManager';
+ RsECheckTerminateCalledByWrongThread = 'CheckTerminate can only be called by the same thread';
+ RsEThreadNotInitializedOrWaiting = 'Cannot run: thread is not Initializing or Waiting';
+ RsECannotChangeNameOfOtherActiveThread = 'Cannot change name of other active thread';
+ RsEReleaseOfUnusedTicket = 'Release of unused ticket';
+
+//=== JvMultiHttpGrabber.pas =================================================
+resourcestring
+ RsErrorConnection = 'Unable to connect';
+ RsMultiAgent = 'TJvMultiHTTPGrabber Delphi Component';
+
+//=== JvNavigationPane.pas ===================================================
+resourcestring
+ RsEUnsupportedButtonType = 'ButtonType not supported';
+
+//=== JvNTEventLog.pas =======================================================
+resourcestring
+ RsLogError = 'Error';
+ RsLogWarning = 'Warning';
+ RsLogInformation = 'Information';
+ RsLogSuccessAudit = 'Success Audit';
+ RsLogFailureAudit = 'Failure Audit';
+ RsLogUserSIDNotFound = 'User SID not found';
+
+//=== JvObjectPickerDialog.pas ===============================================
+resourcestring
+ RsEAttributeIndexOutOfBounds = '%d is not a valid attribute index';
+ RsESelectionIndexOutOfBounds = '%d is not a valid selection index';
+
+//=== JvOfficeColorButton.pas ================================================
+resourcestring
+ RsDragToFloating = 'Drag to floating';
+
+//=== JvOfficeColorForm.pas ==================================================
+resourcestring
+ RsColorWindow = 'Color Window';
+ // (rom) probably the same as RsDragToFloating
+ RsDragToFloat = 'Drag to float';
+
+//=== JvOfficeColorPanel.pas =================================================
+resourcestring
+ RsNoneColorCaption = 'No Color';
+ RsDefaultColorCaption = 'Automatic';
+ RsCustomColorCaption = 'Other Colors...';
+
+//=== JvOracleDataset.pas ====================================================
+resourcestring
+ RsODSOpenFetch = 'Open / Fetch : ';
+ RsODSCurrentRecord = 'Current Record : ';
+ RsODSRowsFetchedContinue = '%d rows fetched. Continue ? ';
+ RsODSContinueYes = '&Yes';
+ RsODSContinuePause = '&Pause';
+ RsODSContinueNo = '&No';
+ RsODSContinueClose = '&Close';
+ RsODSContinueAll = '&All';
+ RsODSGotoLastFetchRecords = 'Goto Last - Fetch Records';
+ RsODSFetchRecords = 'Fetch Records';
+ RsODSOpenQueryFetchRecords = 'Open Query - Fetch Records';
+ RsODSFetchRecordsCancel = 'Fetch Records - Cancel';
+ RsODSOpenQuery = 'Open Query';
+ RsODSOpenQueryCancel = 'Open Query - Cancel' ;
+ RsODSRefreshQueryFetchRecords = 'Refresh Query - Fetch Records';
+ RsODSRefreshQuery = 'Refresh Query';
+ RsODSRefreshQueryCancel = 'Refresh Query - Cancel';
+
+//=== JvPageSetup.pas ========================================================
+resourcestring
+ RsEInvalidValue = 'Value must be greater than zero';
+
+//=== JvPainterQBForm.pas ====================================================
+resourcestring
+ RsPainterQuickBackdrops = 'Painter Quick Backdrops';
+ RsEnterName = 'Enter Name:';
+ RsNoItemSelected = 'No item selected!';
+ RsErrorInPresets = 'Error in Presets';
+
+//=== JvParameterList.pas ====================================================
+resourcestring
+ RsErrParameterMustBeEntered = 'Parameter "%s" must be entered!';
+
+ RsHistorySelectPath = 'History';
+
+ RsDialogCaption = '';
+ RsCancelButton = '&Cancel';
+ RsHistoryLoadButton = '&Load';
+ RsHistorySaveButton = '&Save';
+ RsHistoryClearButton = 'Cl&ear';
+ RsHistoryLoadCaption = 'Load Parameter Settings';
+ RsHistorySaveCaption = 'Save Parameter Settings';
+ RsHistoryClearCaption = 'Manage Parameter Settings';
+
+ RsENoParametersDefined = 'TJvParameterList.ShowParameterDialog: No Parameters defined';
+ RsEAddObjectWrongObjectType = 'TJvParameterList.AddObject: Wrong object type';
+ RsEAddObjectSearchNameNotDefined = 'TJvParameterList.AddObject: SearchName not defined';
+ RsEAddObjectDuplicateSearchNamesNotAllowed = 'TJvParameterList.AddObject: Duplicate SearchNames ("%s") not allowed';
+ RsECreateWinControlsOnWinControlDuplicateBeforeAfterNotAllowed = 'TJvParameterList.CreateWinControlsOnWinControl: %s "%s" already used';
+
+//=== JvParameterListParameter.pas ===========================================
+resourcestring
+ // RsErrParameterMustBeEntered = 'Parameter %s must be entered!';
+ RsErrParameterIsNotAValidNumber = 'Parameter %0:s: %1:s is not a valid number value!';
+ RsErrParameterMustBeBetween = 'Parameter %0:s: %1:s must be between %2:s and %3:s!';
+ RsErrParameterFileDoesNotExist = 'Parameter %0:s: The file "%1:s" does not exist!';
+ RsErrParameterFileExistOverwrite = 'Parameter %0:s: The file "%1:s" exists! Overwrite?';
+ RsErrParameterDirectoryNotExist = 'Parameter %0:s: The directory "%1:s" does not exist!';
+
+//=== JvParameterListTools.pas ===============================================
+resourcestring
+ RsSelectCaption = 'Select...';
+
+//=== JvParserForm.pas =======================================================
+resourcestring
+ RsNewObject = 'New';
+
+//=== JvPatchForm.pas ========================================================
+resourcestring
+ RsJvPatcherEditorComparingFilesd = 'Jv - Patcher Editor: Comparing files %d%%';
+ RsJvPatcherEditorEndStep = 'Jv - Patcher Editor: end step ...';
+ RsErrJvPatcherEditorInvalidFilename = 'Invalid filename(s). Please specify valid filenames for both source and destination and try again.';
+
+//=== JvPcx.pas ==============================================================
+resourcestring
+ RsPcxExtension = 'pcx';
+ RsPcxFilterName = 'PCX Image';
+
+ RsEPcxUnknownFormat = 'PCX: Unknown format';
+ RsEPcxPaletteProblem = 'PCX: Unable to retrieve palette';
+ RsEPcxInvalid = 'PCX: Invalid PCX file';
+
+//=== JvPerfMon95.pas ========================================================
+resourcestring
+ RsWrongOS = 'TJvPerfMon95 component is intended for Win95/98 only';
+
+ RsECantOpenPerfKey = 'Performance registry key not found';
+ RsECantStart = 'Cannot start performance statistics (%s)';
+ RsECantStop = 'Cannot stop performance statistics (%s)';
+ RsEKeyNotExist = 'Specified key "%s" does not exist';
+
+//=== JvPickDate.pas =========================================================
+resourcestring
+ RsNextYearHint = 'Next Year|';
+ RsNextMonthHint = 'Next Month|';
+ RsPrevYearHint = 'Previous Year|';
+ RsPrevMonthHint = 'Previous Month|';
+
+//=== JvPlugin.pas ===========================================================
+resourcestring
+ RsEFmtResNotFound = 'Resource not found: %s';
+
+//=== JvPluginManager.pas ====================================================
+resourcestring
+ RsEErrEmptyExt = 'Extension may not be empty';
+ RsEPluginPackageNotFound = 'Plugin package not found: %s';
+ RsERegisterPluginNotFound = 'Plugin function %0:s not found in %1:s';
+ RsERegisterPluginFailed = 'Calling %0:s in %1:s failed';
+
+//=== JvPoweredBy.pas ========================================================
+resourcestring
+ RsURLPoweredByJCL = 'http://jcl.delphi-jedi.org/';
+ RsURLPoweredByJVCL = 'http://jvcl.delphi-jedi.org/';
+
+//=== JvProfilerForm.pas =====================================================
+resourcestring
+ RsTotalElapsedTimedms = '%0:s - total elapsed time: %1:d (ms)';
+ RsTextFormatsasctxtinfdocAllFiles = 'Text formats|*.asc;*.txt;*.inf;*.doc|All files|*.*';
+ RsDefCaption = 'Profiler 32 Report';
+ RsDefHeader = 'Profiler 32 run %0:s by "%1:s" (machine %2:s).';
+
+ RsEMaxNumberOfIDsExceededd = 'Max number of ID''s exceeded (%d)';
+ RsEMaxStackSizeExceededd = 'Max stack size exceeded (%d)';
+
+//=== JvProgramVersionCheck.pas ==============================================
+resourcestring
+ RsPVFailedUnableToConnectTo = 'Failed: Unable to connect to %s';
+ RsPVFailedUnableToGet = 'Failed: Unable to get %s';
+ RsPVDownloadFailed = 'Failed: %s';
+ RsPVDefaultVersioninfoFileName = 'versioninfo.ini';
+ RsPVTempFileNameExtension = '.temp';
+ RsPVSiceB = '%6f B';
+ RsPVSiceKB = '%6.2f KB';
+ RsPVSiceMB = '%6.2f MB';
+ RsPVSiceGB = '%6.2f GB';
+ RsPVCReleaseTypeAlpha = 'Alpha';
+ RsPVCReleaseTypeBeta = 'Beta';
+ RsPVCReleaseTypeProduction = 'Production';
+
+ RsPVCDownloading = 'Downloading ...';
+ RsPVCDialogCaption = '%s Upgrade Check';
+ RsPVCDialogExecuteButton = '&Execute';
+ RsPVCNewVersionAvailable = 'A new version (%0:s) of %1:s is available!';
+ RsPVCChooseWhichVersion = 'Which &version do you want to install?';
+ RsPVCChooseOperation = '&Choose Operation';
+ RsPVCOperationIgnore = 'I&gnore';
+ RsPVCOperationDownloadOnly = 'Download/Copy &Only';
+ RsPVCOperationDownloadInstall = 'Download/Copy and &Install';
+ RsPVCWhatNewInS = 'What''s new in %s';
+ RsPVCChangesBetween = 'Changes between %0:s and %1:s';
+ RsPVCFileDownloadNotSuccessful =
+ 'The file download was not successful!' + sLineBreak + 'Please try again manually.';
+ RsPVCDownloadSuccessfulInstallManually =
+ 'The file download was successful.' + sLineBreak + 'Install manually from: %s';
+ RsPVCErrorStartingSetup = 'Error starting the setup process.';
+ RsPVCDownloadSuccessfullInstallNow =
+ 'The file download was successful.' + sLineBreak +
+ 'Do you want to close and install?';
+ RsPVInfoButtonCaption = 'Info';
+ RSProgramVersionInfo_PropertyHint_ProgramReleaseDate = 'Date of Release ';
+ RSProgramVersionInfo_PropertyHint_ProgramSize = 'Size of the installer in bytes ';
+ RSProgramVersionInfo_PropertyHint_ProgramReleaseType = 'Release type of the version.'#13#10+
+ 'In the update dialog there are only the highest version numbers for each type visible.'#13#10+
+ 'The type must be higher then AllowedReleaseType property of the TJvProgramVersionCheck component';
+ RSProgramVersionInfo_PropertyHint_VersionDescription = 'This is a description field which could be shown in the update dialog via the version info button.';
+ RSProgramVersionInfo_PropertyHint_ProgramVersion = 'Program version in the format ... This property is compared with the fileversion properties of the current application.';
+ RSProgramVersionInfo_PropertyHint_ProgramLocationFileName = 'File name of the installer file ';
+ RSProgramVersionInfo_PropertyHint_ProgramLocationPath = 'Path where the installer of the version could be found. This could be a absolute path or a relative path to the location of the version list';
+ RSProgramVersionInfo_PropertyHint_LocalInstallerParams = 'List of parameters for the execution of the installer file';
+ RSProgramVersionInfo_PropertyHint_DownloadPassword = 'Flag to define whether a password is required for the download or not';
+ RSProgramVersionInfo_ObjectHint = 'Class to collect all information about a program version'#13#10+
+ 'This information will be stored in a file on the remote site';
+ RSProgramVersionHistory_PropertyHint_alpha = 'Auto calculated version number of the highest alpha version';
+ RSProgramVersionHistory_PropertyHint_beta = 'Auto calculated version number of the highest beta version';
+ RSProgramVersionHistory_PropertyHint_Production = 'Auto calculated version number of the highest production version';
+ RSProgramVersionHistory_ObjectHint = 'Class to define a list of program version information. This class is used '+
+ 'to detect which versions are available. The information will also be used '+
+ 'in the version info dialog';
+ RSProgramVersionHistory = 'Program Version History';
+
+//=== JvPropertyStore.pas ====================================================
+resourcestring
+ RsJvPropertyStoreMutexStorePropertiesProcedureName = 'TJvCustomPropertyStore.StoreProperties:';
+ RsJvPropertyStoreMutexLoadPropertiesProcedureName = 'TJvCustomPropertyStore.LoadProperties:';
+ RsJvPropertyStoreMutexLoadStorePropertiesProcedureName = 'TJvCustomPropertyStore.LoadStoreProperties:';
+ RsJvPropertyStoreEnterMutexTimeout = '%s: Mutex Timeout';
+
+//=== JvPropertyStoreEditor.pas ====================================================
+resourcestring
+ RSPropertyStoreEditorDialogButtonOk = '&Ok';
+ RSPropertyStoreEditorDialogButtonCancel = '&Cancel';
+ RSPropertyStoreEditorListButtonInsert = '&Insert';
+ RSPropertyStoreEditorListButtonCopy = '&Copy';
+ RSPropertyStoreEditorListButtonEdit = '&Edit';
+ RSPropertyStoreEditorListButtonDelete = '&Delete';
+ RSPropertyStoreEditorListButtonUp = '&Up';
+ RSPropertyStoreEditorListButtonDown = 'Do&wn';
+ RSPropertyStoreEditorListButtonSortUp = 'Sort &Asc';
+ RSPropertyStoreEditorListButtonSortDown = 'Sort Desc';
+ RSPropertyStoreEditorDialogCaptionEditProperties = 'Edit Properties';
+ RSPropertyStoreEditorDeleteEntry = 'Delete Entry?';
+
+//=== JvPrvwRender.pas =======================================================
+resourcestring
+ RsEAPrintPreviewComponentMustBeAssigne = 'A PrintPreview component must be assigned in CreatePreview!';
+ RsEARichEditComponentMustBeAssignedInC = 'A RichEdit component must be assigned in CreatePreview!';
+ RsECannotPerfromThisOperationWhilePrin = 'Cannot perfrom this operation while printing!';
+ RsEPrinterNotAssigned = 'Printer not assigned!';
+ RsENoPrintPreviewAssigned = 'No PrintPreview assigned!';
+
+//=== JvRas32.pas ============================================================
+resourcestring
+ RsRasDllName = 'RASAPI32.DLL';
+
+ RsERasError = 'RAS: Unable to find RasApi32.dll';
+
+//=== JvRegistryTreeview.pas =================================================
+resourcestring
+ RsDefaultCaption = '(Default)';
+ RsMyComputer = 'My Computer';
+ RsDefaultNoValue = '(value not set)';
+ RsUnknownCaption = '(Unknown)';
+
+//=== JvRichEdit.pas =========================================================
+resourcestring
+ RsRTFFilter = 'Rich Text Format (*.rtf)|*.rtf';
+ RsTextFilter = 'Plain text (*.txt)|*.txt';
+
+ RsEConversionError = 'Conversion error %.8x';
+ RsEConversionBusy = 'Cannot execute multiple conversions';
+ RsECouldNotInitConverter = 'Could not initialize converter';
+ RsEDiskFull = 'Out of space on output';
+ RsEDocTooLarge = 'Conversion document too large for target';
+ RsEInvalidDoc = 'Invalid document';
+ RsEInvalidFile = 'Invalid data in conversion file';
+ RsENoMemory = 'Out of memory';
+ RsEOpenConvErr = 'Error opening conversion file';
+ RsEOpenExceptErr = 'Error opening exception file';
+ RsEOpenInFileErr = 'Could not open input file';
+ RsEOpenOutFileErr = 'Could not open output file';
+ RsEReadErr = 'Error during read';
+ RsEUserCancel = 'Conversion cancelled by user';
+ RsEWriteErr = 'Error during write';
+ RsEWriteExceptErr = 'Error writing exception file';
+ RsEWrongFileType = 'Wrong file type for this converter';
+
+//=== JvSAL.pas ==============================================================
+resourcestring
+ RsEBooleanStackOverflow = 'Boolean stack overflow';
+ RsEBooleanStackUnderflow = 'Boolean stack underflow';
+ RsEProgramStopped = 'Program stopped';
+ RsEUnterminatedIncludeDirectiveNears = 'Unterminated include directive near %s';
+ RsEOngetUnitEventHandlerIsNotAssigned = 'OngetUnit event handler is not assigned';
+ RsECouldNotIncludeUnits = 'Could not include unit %s';
+ RsEUnterminatedCommentNears = 'Unterminated comment near %s';
+ RsEUnterminatedProcedureNears = 'Unterminated procedure near %s';
+ RsEVariablesAllreadyDefineds = 'Variable %0:s already defined;%1:s';
+ RsEVariablesIsNotYetDefineds = 'Variable %0:s is not yet defined;%1:s';
+ RsEProceduresNears = 'Procedure %0:s near %1:s';
+ RsEUndefinedProcedures = 'Undefined procedure %s';
+ RsECouldNotFindEndOfProcedure = 'Could not find end of procedure';
+
+//=== JvSALCore.pas ==========================================================
+resourcestring
+ RsEVariablesIsNotInitialized = 'Variable %s is not initialized';
+ RsEDivisionByZeroError = 'Division by zero error';
+ RsEMissingendselect = 'Missing "endselect"';
+
+//=== JvSchedEvtStore.pas ====================================================
+resourcestring
+ RsEStructureStackIsEmpty = 'Structure stack is empty';
+ RsEScheduleIsActiveReadingANewSchedule =
+ 'Schedule is active. Reading a new schedule can only be done on inactive schedules';
+ RsEScheduleIsActiveStoringOfAScheduleC =
+ 'Schedule is active. Storing of a schedule can only be done on inactive schedules';
+ RsENotImplemented_ = 'not implemented';
+ RsENotASchedule = 'Not a schedule';
+ RsEUnknownScheduleVersions = 'Unknown schedule version ($%s)';
+ RsEUnexpectedStructure = 'Unexpected structure';
+ RsEIncorrectIdentifierFound = 'Incorrect identifier found';
+ RsEIncorrectStructure = 'Incorrect structure found';
+
+//=== JvScheduledEvents.pas ==================================================
+resourcestring
+ RsECannotRestart = 'Cannot restart: Event is being triggered or is executing';
+
+//=== JvScrollMax.pas ========================================================
+resourcestring
+ RsRightClickAndChooseAddBand = 'Right click and choose "Add band"';
+
+ { (rom) deactivated see DefineCursor in JvScrollMax.pas
+ RsECannotLoadCursorResource = 'Cannot load cursor resource';
+ RsETooManyUserdefinedCursors = 'Too many user-defined cursors';
+ }
+ RsETJvScrollMaxBandCanBePutOnlyIntoTJv = 'TJvScrollMaxBand can be put only into TJvScrollMax component';
+ RsETJvScrollMaxCanContainOnlyTJvScroll = 'TJvScrollMax can contain only TJvScrollMaxBand components';
+ RsEControlsNotAChildOfs = 'Control %0:s not a child of %1:s';
+
+//=== JvSegmentedLEDDisplay.pas ==============================================
+resourcestring
+ RsEInvalidClass = 'Invalid class';
+ RsEInvalidMappingFile = 'Invalid mapping file';
+ RsEDuplicateDigitClass = 'Duplicate DigitClass registered';
+
+//=== JvSegmentedLEDDisplayMapperFrame.pas ===================================
+resourcestring
+ RsTheCurrentCharacterHasBeenModifiedA = 'The current character has been modified. Apply changes?';
+ RsTheCurrentMappingHasBeenModifiedSav = 'The current mapping has been modified. Save changes to file?';
+ RsSegmentedLEDDisplayMappingFilessdms = 'Segmented LED display mapping files (*.sdm)|*.sdm|All files (*.*)|*.*';
+ RsSelectCharacter = 'Select character...';
+ RsSpecifyANewCharacter = 'Specify a new character';
+
+//=== JvSHFileOperation.pas ==================================================
+resourcestring
+ RsENoFilesSpecifiedToTJvSHFileOperatio = 'No files specified to TJvSHFileOperation Execute function';
+
+//=== JvSpeedbar.pas =========================================================
+resourcestring
+ RsEAutoSpeedbarMode = 'Cannot set this property value while Position is bpAuto';
+
+//=== JvSpeedbarSetupForm.pas ================================================
+resourcestring
+ RsCustomizeSpeedbar = 'Customize Speedbar';
+ RsAvailButtons = '&Available buttons:';
+ RsSpeedbarCategories = '&Categories:';
+ RsSpeedbarEditHint = 'To add command buttons, drag and drop buttons onto the SpeedBar.' +
+ ' To remove command buttons, drag them off the SpeedBar.';
+
+//=== JvSpellChecker.pas =====================================================
+resourcestring
+ RsENoSpellCheckerAvailable = 'No IJvSpellChecker implementation available!';
+
+//=== JvSpellerForm.pas ======================================================
+resourcestring
+ RsENoDictionaryLoaded = 'No dictionary loaded';
+
+//=== JvSpin.pas =============================================================
+resourcestring
+ RsEOutOfRangeFloat = 'Value must be between %0:g and %1:g';
+
+//=== JvStatusBar.pas ========================================================
+resourcestring
+ RsEInvalidControlSelection = 'Invalid control selection';
+
+//=== JvSticker.pas ==========================================================
+resourcestring
+ RsEditStickerCaption = 'Edit sticker';
+
+//=== JvStringHolder.pas =====================================================
+resourcestring
+ RsENoItemFoundWithName = 'No item found with name "%s"';
+
+//=== JvStrings.pas ==========================================================
+resourcestring
+ RsECannotLoadResource = 'Cannot load resource: %s';
+ RsEIncorrectStringFormat = 'Base64: Incorrect string format';
+
+//=== JvSyncSplitter.pas =====================================================
+resourcestring
+ RsEInvalidPartner = 'TJvSyncSplitter.SetPartner: cannot set Partner to Self!';
+
+//=== JvSysRequirements.pas ==================================================
+resourcestring
+ RsSysRequirementsCaption = 'System Requirements for %s';
+ RsMinColorDepthReq = 'The color depth must be at least %1:d bits per pixel, but is only %0:d bits per pixel.';
+ RsMaxColorDepthReq = 'The color depth cannot be more than %1:d bits per pixel, but is %0:d bits per pixel.';
+ RsBetweenColorDepthReq = 'The color depth must be between %1:d and %2:d bits per pixel, but is %0:d bits per pixel.';
+ RsMinScreenXReq = 'The horizontal screen resolution must be at least %1:d pixels, but is only %0:d pixels.';
+ RsMaxScreenXReq = 'The horizontal screen resolution cannot be more than %1:d pixels, but is %0:d pixel.';
+ RsBetweenScreenXReq = 'The horizontal screen resolution must be between %1:d and %2:d pixels, but is %0:d pixel.';
+ RsMinScreenYReq = 'The vertical screen resolution must be at least %1:d pixels, but is only %0:d pixels.';
+ RsMaxScreenYReq = 'The vertical screen resolution cannot be more than %1:d pixels, but is %0:d pixel.';
+ RsBetweenScreenYReq = 'The vertical screen resolution must be between %1:d and %2:d pixels, but is %0:d pixel.';
+ RsMinRefreshReq = 'The video refresh rate must be at least %1:d Hertz, but is only %0:d Hertz.';
+ RsMaxRefreshReq = 'The video refresh rate cannot be more than %1:d Hertz, but is %0:d Hertz.';
+ RsBetweenRefreshReq = 'The video refresh rate must be between %1:d and %2:d Hertz, but is %0:d Hertz.';
+ RsWindowsVersionReq = 'This version of Windows is not supported.';
+ RsSystemFontSmallReq = 'The system does not use small fonts.';
+ RsSystemFontBigReq = 'The system does not use big fonts.';
+
+//=== JvSystemPopup.pas ======================================================
+resourcestring
+ RsEAlreadyHooked = 'TJvSystemPopup.Hook: already hooked';
+
+//=== JvTFDays.pas ===========================================================
+resourcestring
+ RsEInvalidPrimeTimeStartTime = 'Invalid PrimeTime StartTime';
+ RsEInvalidPrimeTimeEndTime = 'Invalid PrimeTime EndTime';
+ RsEColumnIndexOutOfBounds = 'Column index out of bounds';
+ RsERowIndexOutOfBounds = 'Row index out of bounds';
+ RsEMapColNotFoundForAppointment = 'Map column not found for appointment';
+ RsECorruptAppointmentMap = 'Corrupt appointment map';
+ RsEGridGranularityCannotBeGreater = 'Grid granularity cannot be greater ' +
+ 'than the time block granularity';
+ RsETimeBlockGranularityMustBeEvenly = 'Time block granularity must be evenly ' +
+ 'divisible by the grid granularity';
+ RsETimeBlocksMustBeginExactlyOn = 'Time blocks must begin exactly on ' +
+ 'a grid time division';
+ RsEGridEndTimeCannotBePriorToGridStart = 'GridEndTime cannot be prior to GridStartTime';
+ RsEGridStartTimeCannotBeAfterGridEndTi = 'GridStartTime cannot be after GridEndTime';
+ RsEInvalidRowd = 'Invalid row (%d)';
+ RsEThereIsNoDataToPrint = 'There is no data to print';
+ RsENoPageInfoExists = 'No page info exists. ' +
+ 'Document must be prepared';
+ RsEATimeBlockNameCannotBeNull = 'A time block name cannot be null';
+ RsEAnotherTimeBlockWithTheName = 'Another time block with the name "%s" already exists';
+ RsEATimeBlockWithTheNamesDoesNotExist = 'A time block with the name "%s" does not exist';
+
+//=== JvTFGantt.pas ==========================================================
+resourcestring
+ RsThisIsTheMajorScale = 'This is the Major Scale';
+ RsThisIsTheMinorScale = 'This is the Minor Scale';
+
+//=== JvTFGlance.pas =========================================================
+resourcestring
+ RsECellDatesCannotBeChanged = 'Cell Dates cannot be changed';
+ RsECellMapHasBeenCorrupteds = 'Cell map has been corrupted %s';
+ RsECellObjectNotAssigned = 'Cell object not assigned';
+ RsEInvalidColIndexd = 'Invalid col index (%d)';
+ RsEInvalidRowIndexd = 'Invalid row index (%d)';
+ RsEApptIndexOutOfBoundsd = 'Appt index out of bounds (%d)';
+ RsECellCannotBeSplit = 'Cell cannot be split';
+ RsEASubcellCannotBeSplit = 'A subcell cannot be split';
+ RsGlanceMainTitle = '(Title)';
+
+//=== JvTFGlanceTextViewer.pas ===============================================
+resourcestring
+ RsEGlanceControlNotAssigned = 'GlanceControl not assigned';
+
+//=== JvTFManager.pas ========================================================
+resourcestring
+ RsECouldNotCreateCustomImageMap = 'Could not create CustomImageMap. ' +
+ 'Appointment not assigned';
+ RsECouldNotCreateAppointmentObject = 'Could not create Appointment object. ' +
+ 'ScheduleManager not assigned';
+ RsEScheduleManagerNotificationFailedSc = 'ScheduleManager notification failed. ScheduleManager not assigned';
+ RsEScheduleNotificationFailed = 'Schedule notification failed. ' +
+ 'Schedule not assigned';
+ RsEInvalidStartAndEndTimes = 'Invalid start and end times';
+ RsEInvalidStartAndEndDates = 'Invalid start and end dates';
+ RsEAppointmentNotificationFailed = 'Appointment notification failed. ' +
+ 'Appointment not assigned';
+ RsECouldNotCreateNewAppointment = 'Could not create new appointment. ' +
+ 'Appointment with given ID already exists';
+ RsEInvalidTriggerForRefreshControls = 'Invalid Trigger for RefreshControls';
+ RsEInvalidScopeInReconcileRefresh = 'Invalid Scope in ReconcileRefresh';
+ RsECouldNotRetrieveSchedule = 'Could not retrieve schedule. ' +
+ 'ScheduleManager not assigned';
+ RsECouldNotReleaseSchedule = 'Could not release schedule. ' +
+ 'ScheduleManager not assigned';
+ RsECouldNotCreateADocumentBecauseA = 'Could not create a document because a ' +
+ 'document already exists';
+ RsECouldNotFinishDocumentBecauseNo = 'Could not finish document because no ' +
+ 'document has been created';
+ RsEDocumentDoesNotExist = 'Document does not exist';
+ RsEDocumentPagesCannotBeAccessedIf = 'Document pages cannot be accessed if ' +
+ 'printing directly to the printer';
+ RsEDocumentPagesAreInaccessibleUntil = 'Document pages are inaccessible until ' +
+ 'the document has been finished';
+ RsECouldNotRetrievePageCount = 'Could not retrieve page count ' +
+ 'because document does not exist';
+ RsEOnlyAFinishedDocumentCanBePrinted = 'Only a finished document can be printed';
+ RsEThereAreNoPagesToPrint = 'There are no pages to print';
+ RsEDocumentMustBeFinishedToSaveToFile = 'Document must be Finished to save to file';
+ RsEThisPropertyCannotBeChangedIfA = 'This property cannot be changed if a ' +
+ 'document exists';
+ RsECouldNotCreateTJvTFPrinterPageLayou = 'Could not create TJvTFPrinterPageLayout ' +
+ 'because aPrinter must be assigned';
+ RsEInvalidFooterHeightd = 'Invalid Footer Height (%d)';
+ RsEInvalidHeaderHeightd = 'Invalid Header Height (%d)';
+
+//=== JvTFSparseMatrix.pas ===================================================
+resourcestring
+ RsEMatrixMustBeEmpty = 'Matrix must be empty before setting null value';
+
+//=== JvTFUtils.pas ==========================================================
+resourcestring
+ RsEResultDoesNotFallInMonth = 'Result does not fall in given month';
+ RsEInvalidMonthValue = 'Invalid Month Value (%d)';
+ RsEInvalidDayOfWeekValue = 'Invalid value for day of week (%d)';
+
+//=== JvTFWeeks.pas ==========================================================
+resourcestring
+ RsWeekOf = 'Week of %s';
+
+//=== JvThreadDialog.pas =====================================================
+resourcestring
+ RsENotATJvThread = 'TJvCustomThreadDialogForm.SetConnectedThread: A thread must be a TJvThread-Component';
+
+//=== JvThumbImage.pas =======================================================
+resourcestring
+ RsEUnknownFileExtension = 'Unknown file extension %s';
+ RsFileFilters = '|PCX Files(*.pcx)|*.pcx|Targa Files(*.tga)|*.tga';
+ RsPcxTga = '*.pcx;*.tga;';
+
+//=== JvThumbnails.pas =======================================================
+resourcestring
+ RsUnknown = 'Unknown';
+
+//=== JvTimer.pas ============================================================
+resourcestring
+ RsCannotChangeInTimerEvent = 'Cannot change %s in the timer event';
+
+//=== JvTimeLimit.pas ========================================================
+resourcestring
+ RsExpired = 'The test period has expired, please register this application';
+
+//=== JvTimeList.pas =========================================================
+resourcestring
+ RsEOwnerMustBeTJvTimerList = 'Owner of TJvTimerEvents must be a TJvTimerList';
+
+//=== JvTipOfDay.pas =========================================================
+resourcestring
+ RsCloseCaption = '&Close';
+ RsNextCaption = '&Next Tip';
+ RsTipsTitle = 'Tips and Tricks';
+ RsTipsHeaderText = 'Did you know...';
+ RsTipsCheckBoxText = '&Show Tips on Startup';
+ RsStoreShowOnStartUp = 'Show_On_Startup'; // (p3) Spaces in XML node names is not valid XML...
+
+//=== JvToolEdit.pas =========================================================
+resourcestring
+ RsBrowseCaption = 'Browse';
+ {$IFDEF MSWINDOWS}
+ RsDefaultFilter = 'All files (*.*)|*.*';
+ {$ENDIF MSWINDOWS}
+ {$IFDEF UNIX}
+ RsDefaultFilter = 'All files (*)|*';
+ {$ENDIF UNIX}
+
+ { Polaris patch }
+ RsEDateMinLimit = 'Enter a date before "%s"';
+ RsEDateMaxLimit = 'Enter a date after "%s"';
+
+//=== JvTurtle.pas ===========================================================
+resourcestring
+ RsErrorCanvasNotAssigned = 'Canvas not assigned';
+ RsEmptyScript = 'Empty script';
+ RsInvalidIntegerIns = 'Invalid integer in %s';
+ RsInvalidColorIns = 'Invalid color in %s';
+ RsInvalidCopyMode = 'Invalid copy mode';
+ RsInvalidPenMode = 'Invalid pen mode';
+ RsInvalidTextIns = 'Invalid text in %s';
+ RsMissingFontname = 'Missing fontname';
+ RsNumberExpectedIns = 'Number expected in %s';
+ RsNumberStackUnderflow = 'Number stack underflow';
+ RsNumberStackOverflow = 'Number stack overflow';
+ RsMissingAfterComment = 'Missing "}" after comment';
+ RsErrorIns = 'Error in %s';
+ RsDivisionByZero = 'Division by zero';
+ RsInvalidParameterIns = 'Invalid parameter in %s';
+ RsSymbolsIsNotDefined = 'Symbol %s is not defined';
+ RsMissingAfterBlock = 'Missing "]" after block';
+ RsStackUnderflowIns = 'Stack underflow in %s';
+ RsSymbolExpectedAfterIf = 'Symbol expected after if';
+ RsCanNotTakeSqrtOf = 'Can not take sqrt of 0';
+ RsNotAllowedIns = '0 not allowed in %s';
+ RsNeedMinimumOfSidesIns = 'Need minimum of 3 sides in %s';
+ RsMaximumSidesExceededIns = 'Maximum 12 sides exceeded in %s';
+ RsTokenExpected = 'Token expected';
+ RssDoesNotExist = '%s does not exist';
+ RsDivisionByZeroNotAllowedInIn = 'Division by zero not allowed in in-';
+ RsStackOverflow = 'Stack overflow';
+ RsStackUnderflow = 'Stack underflow';
+
+//=== JvTypes.pas ============================================================
+resourcestring
+ RsClBlack = 'Black';
+ RsClMaroon = 'Maroon';
+ RsClGreen = 'Green';
+ RsClOlive = 'Olive green';
+ RsClNavy = 'Navy blue';
+ RsClPurple = 'Purple';
+ RsClTeal = 'Teal';
+ RsClGray = 'Gray';
+ RsClSilver = 'Silver';
+ RsClRed = 'Red';
+ RsClLime = 'Lime';
+ RsClYellow = 'Yellow';
+ RsClBlue = 'Blue';
+ RsClFuchsia = 'Fuchsia';
+ RsClAqua = 'Aqua';
+ RsClWhite = 'White';
+ RsClMoneyGreen = 'Money green';
+ RsClSkyBlue = 'Sky blue';
+ RsClCream = 'Cream';
+ RsClMedGray = 'Medium gray';
+
+ //Standrad colors
+ RsClBrown = 'Brown';
+ RsClOliveGreen = 'Olive Green';
+ RsClDarkGreen = 'Dark Green';
+ RsClDarkTeal = 'Dark Teal';
+ RsClDarkBlue = 'Dark Blue';
+ RsClIndigo = 'Indigo';
+ RsClGray80 = 'Gray 80%';
+
+ RsClDarkRed = 'Dark Red';
+ RsClOrange = 'Orange';
+ RsClDarkYellow = 'Dark Yellow';
+ RsClBlueGray = 'Blue Gray';
+ RsClGray50 = 'Gray 50%';
+
+ RsClLightOrange = 'Light Orange';
+ RsClSeaGreen = 'Sea Green';
+ RsClLightBlue = 'Light Blue';
+ RsClViolet = 'Violet';
+ RsClGray40 = 'Gray 40%';
+
+ RsClPink = 'Pink';
+ RsClGold = 'Gold';
+ RsClBrightGreen = 'Bright Green';
+ RsClTurquoise = 'Turquoise';
+ RsClPlum = 'Plum';
+ RsClGray25 = 'Gray 25%';
+
+ RsClRose = 'Rose';
+ RsClTan = 'Tan';
+ RsClLightYellow = 'Light Yellow';
+ RsClLightGreen = 'Light Green';
+ RsClLightTurquoise = 'Light Turquoise';
+ RsClPaleBlue = 'Pale Blue';
+ RsClLavender = 'Lavender';
+
+ // windows system colors
+ RsClScrollBar = 'Scrollbar';
+ RsClBackground = 'Desktop background';
+ RsClActiveCaption = 'Active window title bar';
+ RsClInactiveCaption = 'Inactive window title bar';
+ RsClMenu = 'Menu background';
+ RsClWindow = 'Window background';
+ RsClWindowFrame = 'Window frame';
+ RsClMenuText = 'Menu text';
+ RsClWindowText = 'Window text';
+ RsClCaptionText = 'Active window title bar text';
+ RsClActiveBorder = 'Active window border';
+ RsClInactiveBorder = 'Inactive window border';
+ RsClAppWorkSpace = 'Application workspace';
+ RsClHighlight = 'Selection background';
+ RsClHighlightText = 'Selection text';
+ RsClBtnFace = 'Button face';
+ RsClBtnShadow = 'Button shadow';
+ RsClGrayText = 'Dimmed text';
+ RsClBtnText = 'Button text';
+ RsClInactiveCaptionText = 'Inactive window title bar text';
+ RsClBtnHighlight = 'Button highlight';
+ RsCl3DDkShadow = 'Dark shadow 3D elements';
+ RsCl3DLight = 'Highlight 3D elements';
+ RsClInfoText = 'Tooltip text';
+ RsClInfoBk = 'Tooltip background';
+ RsGradientActiveCaption ='Gradient Active Caption';
+ RsGradientInactiveCaption ='Gradient Inactive Caption';
+ RsHotLight ='Hot Light';
+ RsMenuBar ='Menu Bar';
+ RsMenuHighlight ='Menu Highlight';
+
+
+//=== JvUrlGrabbers.pas ======================================================
+resourcestring
+ RsFileNotFoundFmt = 'File "%s" not found';
+
+//=== JvUrlListGrabber.pas ===================================================
+resourcestring
+ RsENoGrabberForUrl = 'There is no grabber capable of handling URL: %s';
+ RsEAtLeastOneGrabberRunning = 'There is at least one grabber running, you cannot change the URLs.';
+ RsEGrabberNotStopped = 'The grabber is not stopped, you cannot change its URL.';
+
+ RsJediAgent = 'JEDI-VCL';
+ RsDefaultOutputFileName = 'output.txt';
+
+//=== JvValidateEdit.pas =====================================================
+resourcestring
+ RsEBaseTooBig = 'Base > 36 not supported';
+ RsEBaseTooSmall = 'Base must be greater than 1';
+
+//=== JvValidators.pas =======================================================
+resourcestring
+ RsEInsertNilValidator = 'Cannot insert nil validator';
+ RsERemoveNilValidator = 'Cannot remove nil validator';
+ RsEValidatorNotChild = 'Validator is not owned by this component';
+ RsEInvalidIndexd = 'Invalid index (%d)';
+
+//=== JvVirtualKeySelectionFrame.pas =========================================
+resourcestring
+ RsNoValidKeyCode = 'This is not a valid key code';
+ RsInvalidKeyCode = 'Invalid key code';
+
+//=== JvWinampLabel.pas ======================================================
+resourcestring
+ RsEInvalidSkin = 'Invalid skin';
+
+//=== JvWinDialogs.pas =======================================================
+resourcestring
+ //SDiskFullError =
+ // 'TJvDiskFullDialog does not support removable media or network drives.';
+ RsEFunctionNotSupported = 'This function is not supported by your version of Windows';
+ RsEInvalidDriveChar = 'Invalid drive (%s)';
+ { make Delphi 5 compiler happy // andreas
+ RsEUnsupportedDisk = 'Unsupported drive (%s): JvDiskFullDialog only supports fixed drives';}
+
+//=== JvWinHelp.pas ==========================================================
+resourcestring
+ RsEOwnerForm = 'Owner must be of type TCustomForm';
+
+//=== JvWizard.pas ===========================================================
+resourcestring
+ RsFirstButtonCaption = 'To &Start Page';
+ RsLastButtonCaption = 'To &Last Page';
+ RsFinishButtonCaption = '&Finish';
+ RsWelcome = 'Welcome';
+ RsTitle = 'Title';
+ RsSubtitle = 'Subtitle';
+
+ RsEInvalidParentControl = 'The Parent should be TJvWizard or a descendant';
+ RsEInvalidWizardPage = 'The pages belong to another wizard';
+
+//=== JvWizardCommon.pas =====================================================
+resourcestring
+ RsETilingError = 'Tiling only works on images with dimensions > 0';
+
+//=== JvWizardRouteMapSteps.pas ==============================================
+resourcestring
+ RsActiveStepFormat = 'Step %0:d of %1:d';
+ RsBackTo = 'Back to';
+ RsNextStep = 'Next Step';
+
+//=== JvXmlDatabase.pas ======================================================
+resourcestring
+ RsEUnknownInstruction = 'Unknown Instruction %s';
+ RsEUnexpectedEndOfQuery = 'Unexpected end of query';
+ RsEUnexpectedStatement = 'Unexpected statement %s';
+
+//=== JvXPBar.pas ============================================================
+resourcestring
+ RsUntitled = 'untitled';
+ RsUntitledFmt = '(%0:s %1:d)';
+ RsHintShortcutFmt = '%0:s (%1:s)';
+
+//=== JvXPCore.pas ===========================================================
+resourcestring
+ RsCopyright = 'Design eXperience. (c) 2002 M. Hoffmann Version ';
+ RsCopyright2 = 'Design eXperience II - (c) 2002 M. Hoffmann Version ';
+ RsVersion = '2.0.1'; // always increase version number on new releases!
+
+//=== JvYearGrid.pas =========================================================
+resourcestring
+ RsYearGrid = 'YearGrid';
+ RsEnterYear = 'Enter year (1999-2050):';
+ RsInvalidYear = 'invalid year';
+ RsYear = '&Year...';
+ RsEdit = '&Edit';
+ RsColor = '&Color...';
+ RsNoColor = '&No Color';
+ RsSaveAllInfo = '&Save All Info';
+ RsSaveFoundInfo = 'Save Found Info';
+ RsBorderColor = '&Border Color...';
+ RsBookMarkColor = 'Book&Mark Color...';
+ RsFindItem = '&Find...';
+ RsClearFind = 'Clear Find';
+ RsYearGridFind = 'YearGrid Find';
+ RsEnterSeachText = 'Enter seach text:';
+ RsFounds = 'Found %s';
+ RsToday = 'Today ';
+
+//=== JvDBFilterExpr =========================================================
+resourcestring
+ RsInvalidFilterNodeKind = 'Invalid filter node kind';
+ RsUnknownFilterOperation = 'Unknown filter operator';
+ RsUnknownFilterFunction = 'Unknown filter function "%s"';
+ RsMissingFilterFunctionParameters = 'Missing filter function parameters for "%s"';
+
+//=== JvPanel ================================================================
+resourcestring
+ RsDestroyingArrangeSettingsNotAllowed = 'Your code tried to destroy the TJvPanel.ArrangeSettings ' +
+ 'objects leaving the panel in a broken state. Please fix your code by adding'#13#10#13#10 +
+ ' if not ((Components[I] is TJvArrangeSettings) or'#13#10 +
+ ' (Components[I] is TJvPanelHotTrackOptions)) then'#13#10#13#10 +
+ 'or by using the Controls[] array property if possible.';
+
+//=== JvXMLBrowser.pas ====================================================
+resourcestring
+ RSXMLBrowserDialogButtonClose = '&Close';
+
+//=== not taken into JVCL ====================================================
+{
+resourcestring
+ // MathParser
+ SParseSyntaxError = 'Syntax error';
+ SParseNotCramp = 'Invalid condition (no cramp)';
+ SParseDivideByZero = 'Divide by zero';
+ SParseSqrError = 'Invalid floating operation';
+ SParseLogError = 'Invalid floating operation';
+ SParseInvalidFloatOperation = 'Invalid floating operation';
+ // JvDBFilter
+ SExprNotBoolean = 'Field ''%s'' is not of type Boolean';
+ SExprBadNullTest = 'NULL only allowed with ''='' and ''<>''';
+ SExprBadField = 'Field ''%s'' cannot be used in a filter expression';
+ // JvDBFilter expression parser
+ SExprIncorrect = 'Incorrectly formed filter expression';
+ SExprTermination = 'Filter expression incorrectly terminated';
+ SExprNameError = 'Unterminated field name';
+ SExprStringError = 'Unterminated string constant';
+ SExprInvalidChar = 'Invalid filter expression character: ''%s''';
+ SExprNoRParen = ''')'' expected but %s found';
+ SExprExpected = 'Expression expected but %s found';
+ SExprBadCompare = 'Relational operators require a field and a constant';
+}
+
+implementation
+
+end.
diff --git a/components/jvcllaz/run/JvTypes.pas b/components/jvcllaz/run/JvTypes.pas
index a665f0ec3..31ff1bf9d 100644
--- a/components/jvcllaz/run/JvTypes.pas
+++ b/components/jvcllaz/run/JvTypes.pas
@@ -61,10 +61,10 @@ type
Result: Longint;
end;
-(********************
THintString = string;
THintStringList = TStringList;
+ (********************
{ JvExVCL classes }
TInputKey = (ikAll, ikArrows, ikChars, ikButton, ikTabs, ikEdit, ikNative{, ikNav, ikEsc});
TInputKeys = set of TInputKey;
diff --git a/components/jvcllaz/run/JvValidators.pas b/components/jvcllaz/run/JvValidators.pas
new file mode 100644
index 000000000..63f5a7667
--- /dev/null
+++ b/components/jvcllaz/run/JvValidators.pas
@@ -0,0 +1,993 @@
+{-----------------------------------------------------------------------------
+The contents of this file are subject to the Mozilla Public License
+Version 1.1 (the "License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+http://www.mozilla.org/MPL/MPL-1.1.html
+
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for
+the specific language governing rights and limitations under the License.
+
+The Original Code is: JvValidators.PAS, released on 2003-01-01.
+
+The Initial Developer of the Original Code is Peter Thörnqvist [peter3 at sourceforge dot net] .
+Portions created by Peter Thörnqvist are Copyright (C) 2003 Peter Thörnqvist.
+All Rights Reserved.
+
+Contributor(s):
+
+You may retrieve the latest version of this file at the Project JEDI's JVCL home page,
+located at http://jvcl.delphi-jedi.org
+
+Known Issues:
+-----------------------------------------------------------------------------}
+// $Id$
+
+unit JvValidators;
+
+{$mode objfpc}{$H+}
+
+// NB: this is here so a user can disable DB support if he wants to
+// NB2: this need not be defined in the design package because GetDataLink is
+// defined differently depending on this define
+{$DEFINE JVVALIDATORS_SUPPORTS_DBCONTROLS}
+
+interface
+
+uses
+ {$IFDEF JVVALIDATORS_SUPPORTS_DBCONTROLS}
+ DB,
+ {$ENDIF JVVALIDATORS_SUPPORTS_DBCONTROLS}
+ SysUtils, Classes, Controls, Forms, {JvComponentBase,} JvErrorIndicator;
+
+type
+ EValidatorError = class(Exception);
+
+ // Implemented by classes that can return the value to validate against.
+ // The validator classes first check if the ControlToValidate supports this interface
+ // and if it does, uses the value returned from GetValidationPropertyValue instead of
+ // extracting it from RTTI (using ControlToValidate and PropertyToValidate)
+ // The good thing about implementing this interface is that the value to validate do
+ // not need to be a published property but can be anything, even a calculated value
+ IJvValidationProperty = interface
+ ['{564FD9F5-BE57-4559-A6AF-B0624C956E50}']
+ function GetValidationPropertyValue: Variant;
+ function GetValidationPropertyName: WideString;
+ end;
+
+ IJvValidationSummary = interface
+ ['{F2E4F4E5-E831-4514-93C9-0E2ACA941DCF}']
+ procedure BeginUpdate;
+ procedure EndUpdate;
+ procedure AddError(const ErrorMessage: string);
+ procedure RemoveError(const ErrorMessage: string);
+ end;
+
+ TJvBaseValidator = class;
+ TJvValidators = class;
+ TJvBaseValidatorClass = class of TJvBaseValidator;
+
+ TJvBaseValidator = class(TComponent)
+ private
+ FEnabled: Boolean;
+ FValid: Boolean;
+ FPropertyToValidate: string;
+ FErrorMessage: string;
+ FGroupName: string;
+ FControlToValidate: TControl;
+ FErrorControl: TControl;
+ FValidator: TJvValidators;
+ FOnValidateFailed: TNotifyEvent;
+
+ procedure SetControlToValidate(Value: TControl);
+ procedure SetErrorControl(Value: TControl);
+ protected
+ function GetValidationPropertyValue: Variant; virtual;
+ procedure SetValid(const Value: Boolean); virtual;
+ function GetValid: Boolean; virtual;
+ procedure DoValidateFailed; dynamic;
+ procedure Validate; virtual; abstract;
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+ procedure SetParentComponent(Value: TComponent); override;
+ procedure ReadState(Reader: TReader); override;
+
+ // get the number of registered base validator classes
+ class function BaseValidatorsCount: Integer;
+ // get info on a registered class
+ class procedure GetBaseValidatorInfo(Index: Integer; var DisplayName: string;
+ var ABaseValidatorClass: TJvBaseValidatorClass);
+
+ public
+ {$IFDEF JVVALIDATORS_SUPPORTS_DBCONTROLS}
+ // return a TDataLink if the control is a DB control or nil if is not
+ function GetDataLink(AControl:TControl):TDataLink;virtual;
+ {$ELSE}
+ function GetDataLink(AControl:TControl):TObject;virtual;
+ {$ENDIF JVVALIDATORS_SUPPORTS_DBCONTROLS}
+ // register a new base validator class. DisplayName is used by the design-time editor.
+ // A class with an empty DisplayName will not sshow up in the editor
+ class procedure RegisterBaseValidator(const DisplayName: string; AValidatorClass: TJvBaseValidatorClass);
+ class procedure UnregisterBaseValidator(AValidatorClass: TJvBaseValidatorClass);
+
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+
+ function GetParentComponent: TComponent; override;
+ function HasParent: Boolean; override;
+ property Value: Variant read GetValidationPropertyValue;
+ published
+ property Valid: Boolean read GetValid write SetValid default true;
+ // the control that is used to align the error indicator (nil means that the ControlToValidate should be used)
+ property ErrorControl: TControl read FErrorControl write SetErrorControl;
+ // the control to validate
+ property ControlToValidate: TControl read FControlToValidate write SetControlToValidate;
+ // the property in ControlToValidate to validate against
+ property PropertyToValidate: string read FPropertyToValidate write FPropertyToValidate;
+ // make this validator a part of a group so it can be validated separately using Validate(GroupName)
+ property GroupName:string read FGroupName write FGroupName;
+ property Enabled: Boolean read FEnabled write FEnabled default true;
+ // the message to display in case of error
+ property ErrorMessage: string read FErrorMessage write FErrorMessage;
+ // triggered when Valid is set to False
+ property OnValidateFailed: TNotifyEvent read FOnValidateFailed write FOnValidateFailed;
+ end;
+
+ TJvRequiredFieldValidator = class(TJvBaseValidator)
+ private
+ FAllowBlank: Boolean;
+ protected
+ procedure Validate; override;
+ published
+ property AllowBlank: Boolean read FAllowBlank write FAllowBlank default true;
+ end;
+
+ TJvValidateCompareOperator = (vcoLessThan, vcoLessOrEqual, vcoEqual, vcoGreaterOrEqual, vcoGreaterThan, vcoNotEqual);
+
+ TJvCompareValidator = class(TJvBaseValidator)
+ private
+ FValueToCompare: Variant;
+ FOperator: TJvValidateCompareOperator;
+ protected
+ procedure Validate; override;
+ public
+ constructor Create(AOwner: TComponent); override;
+ published
+ property ValueToCompare: Variant read FValueToCompare write FValueToCompare;
+ property CmpOperator: TJvValidateCompareOperator read FOperator write FOperator default vcoEqual;
+ end;
+
+ TJvRangeValidator = class(TJvBaseValidator)
+ private
+ FMinimumValue: Variant;
+ FMaximumValue: Variant;
+ protected
+ procedure Validate; override;
+ published
+ property MinimumValue: Variant read FMinimumValue write FMinimumValue;
+ property MaximumValue: Variant read FMaximumValue write FMaximumValue;
+ end;
+
+ TJvRegularExpressionValidator = class(TJvBaseValidator)
+ private
+ FValidationExpression: string;
+ protected
+ procedure Validate; override;
+ published
+ property ValidationExpression: string read FValidationExpression write FValidationExpression;
+ end;
+
+ TJvCustomValidateEvent = procedure(Sender: TObject; ValueToValidate: Variant; var Valid: Boolean) of object;
+
+ TJvCustomValidator = class(TJvBaseValidator)
+ private
+ FOnValidate: TJvCustomValidateEvent;
+ protected
+ function DoValidate: Boolean; virtual;
+ procedure Validate; override;
+ published
+ property OnValidate: TJvCustomValidateEvent read FOnValidate write FOnValidate;
+ end;
+
+ // compares the properties of two controls
+ // if CompareToControl implements the IJvValidationProperty interface, the value
+ // to compare is taken from GetValidationPropertyValue, otherwise RTTI is used to get the
+ // property value
+ TJvControlsCompareValidator = class(TJvBaseValidator)
+ private
+ FCompareToControl: TControl;
+ FCompareToProperty: string;
+ FOperator: TJvValidateCompareOperator;
+ FAllowNull: Boolean;
+ procedure SetCompareToControl(const AValue: TControl);
+ protected
+ procedure Validate; override;
+ function GetPropertyValueToCompare: Variant;
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+ public
+ constructor Create(AOwner: TComponent); override;
+
+ published
+ property CompareToControl: TControl read FCompareToControl write SetCompareToControl;
+ property CompareToProperty: string read FCompareToProperty write FCompareToProperty;
+ property CmpOperator: TJvValidateCompareOperator read FOperator write FOperator default vcoEqual;
+ property AllowNull: Boolean read FAllowNull write FAllowNull default True;
+ end;
+
+ TJvValidateFailEvent = procedure(Sender: TObject; BaseValidator: TJvBaseValidator; var Continue: Boolean) of object;
+
+ TJvValidators = class(TComponent)
+ private
+ FOnValidateFailed: TJvValidateFailEvent;
+ FItems: TList;
+ FValidationSummary: IJvValidationSummary;
+ FErrorIndicator: IJvErrorIndicator;
+ procedure SetValidationSummary(const Value: IJvValidationSummary);
+ procedure SetErrorIndicator(const Value: IJvErrorIndicator);
+ function GetCount: Integer;
+ function GetItem(Index: Integer): TJvBaseValidator;
+ protected
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+ procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;
+ function DoValidateFailed(const ABaseValidator: TJvBaseValidator): Boolean; dynamic;
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Insert(AValidator: TJvBaseValidator);
+ procedure Remove(AValidator: TJvBaseValidator);
+ procedure Exchange(Index1, Index2: Integer);
+ function Validate: Boolean; overload;
+ function Validate(const GroupName:string): Boolean; overload;
+ property Items[Index: Integer]: TJvBaseValidator read GetItem; default;
+ property Count: Integer read GetCount;
+ published
+ property ValidationSummary: IJvValidationSummary read FValidationSummary write SetValidationSummary;
+ property ErrorIndicator: IJvErrorIndicator read FErrorIndicator write SetErrorIndicator;
+ property OnValidateFailed: TJvValidateFailEvent read FOnValidateFailed write FOnValidateFailed;
+ end;
+
+ TJvValidationSummary = class(TComponent, IUnknown, IJvValidationSummary)
+ private
+ FUpdateCount: Integer;
+ FPendingUpdates: Integer;
+ FSummaries: TStringList;
+ FOnChange: TNotifyEvent;
+ FOnRemoveError: TNotifyEvent;
+ FOnAddError: TNotifyEvent;
+ function GetSummaries: TStrings;
+ protected
+ { IJvValidationSummary }
+ procedure AddError(const ErrorMessage: string);
+ procedure RemoveError(const ErrorMessage: string);
+ procedure BeginUpdate;
+ procedure EndUpdate;
+
+ procedure Change; virtual;
+ public
+ destructor Destroy; override;
+ property Summaries: TStrings read GetSummaries;
+ published
+ property OnChange: TNotifyEvent read FOnChange write FOnChange;
+ property OnAddError: TNotifyEvent read FOnAddError write FOnAddError;
+ property OnRemoveError: TNotifyEvent read FOnRemoveError write FOnRemoveError;
+ end;
+
+const
+ cValidatorsDBValue = '(DBValue)';
+
+implementation
+
+uses
+ {$IFDEF JVVALIDATORS_SUPPORTS_DBCONTROLS}
+ DBCtrls,
+ {$ENDIF JVVALIDATORS_SUPPORTS_DBCONTROLS}
+ Masks,
+ Variants,
+ TypInfo,
+// JclUnicode, // for reg exp support
+ {JvTypes,} JvResources, JvJVCLUtils;
+
+var
+ GlobalValidatorsList: TStringList = nil;
+
+procedure RegisterBaseValidators; forward;
+
+function ValidatorsList: TStringList;
+begin
+ if not Assigned(GlobalValidatorsList) then
+ begin
+ GlobalValidatorsList := TStringList.Create;
+ // register
+ //RegisterBaseValidators; is registered in initialization
+ end;
+ Result := GlobalValidatorsList;
+end;
+
+procedure Debug(const Msg: string); overload;
+begin
+// Application.MessageBox(PChar(Msg),PChar('Debug'),MB_OK or MB_TASKMODAL)
+end;
+
+procedure Debug(const Msg: string; const Fmt: array of const); overload;
+begin
+ Debug(Format(Msg, Fmt));
+end;
+
+function ComponentName(Comp: TComponent): string;
+begin
+ if Comp = nil then
+ Result := 'nil'
+ else
+ if Comp.Name <> '' then
+ Result := Comp.Name
+ else
+ Result := Comp.ClassName;
+end;
+
+//=== { TJvBaseValidator } ===================================================
+
+constructor TJvBaseValidator.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ FValid := True;
+ FEnabled := True;
+end;
+
+destructor TJvBaseValidator.Destroy;
+begin
+ Debug('TJvBaseValidator.Destroy: FValidator is %s', [ComponentName(FValidator)]);
+ ErrorControl := nil;
+ ControlToValidate := nil;
+ if FValidator <> nil then
+ begin
+ FValidator.Remove(Self);
+ FValidator := nil;
+ end;
+ inherited Destroy;
+end;
+
+class procedure TJvBaseValidator.RegisterBaseValidator(const DisplayName: string; AValidatorClass:
+ TJvBaseValidatorClass);
+begin
+ if ValidatorsList.IndexOfObject(TObject(Pointer(AValidatorClass))) < 0 then
+ begin
+ Classes.RegisterClass(TPersistentClass(AValidatorClass));
+ ValidatorsList.AddObject(DisplayName, TObject(Pointer(AValidatorClass)));
+ end;
+end;
+
+class procedure TJvBaseValidator.UnregisterBaseValidator(AValidatorClass: TJvBaseValidatorClass);
+var
+ ClassIndex: Integer;
+begin
+ ClassIndex := ValidatorsList.IndexOfObject(TObject(Pointer(AValidatorClass)));
+ if ClassIndex >= 0 then
+ begin
+ Classes.UnregisterClass(TPersistentClass(AValidatorClass));
+ ValidatorsList.Delete(ClassIndex);
+ end;
+end;
+
+class function TJvBaseValidator.BaseValidatorsCount: Integer;
+begin
+ Result := ValidatorsList.Count;
+end;
+
+class procedure TJvBaseValidator.GetBaseValidatorInfo(Index: Integer;
+ var DisplayName: string; var ABaseValidatorClass: TJvBaseValidatorClass);
+begin
+ if (Index < 0) or (Index >= ValidatorsList.Count) then
+ raise Exception.CreateFmt(RsEInvalidIndexd, [Index]);
+ DisplayName := ValidatorsList[Index];
+ ABaseValidatorClass := TJvBaseValidatorClass(ValidatorsList.Objects[Index]);
+end;
+
+function TJvBaseValidator.GetValid: Boolean;
+begin
+ Result := FValid;
+end;
+
+function TJvBaseValidator.GetParentComponent: TComponent;
+begin
+ Debug('TJvBaseValidator.GetParentComponent: Parent is %s', [ComponentName(FValidator)]);
+ Result := FValidator;
+end;
+
+function TJvBaseValidator.GetValidationPropertyValue: Variant;
+var
+ ValProp: IJvValidationProperty;
+ PropInfo: PPropInfo;
+ {$IFDEF JVVALIDATORS_SUPPORTS_DBCONTROLS}
+ DataLink:TDataLink;
+ {$ENDIF JVVALIDATORS_SUPPORTS_DBCONTROLS}
+begin
+ Result := Null;
+ if FControlToValidate <> nil then
+ begin
+ if Supports(FControlToValidate, IJvValidationProperty, ValProp) then
+ Result := ValProp.GetValidationPropertyValue
+ {$IFDEF JVVALIDATORS_SUPPORTS_DBCONTROLS}
+ else if AnsiSameText(FPropertyToValidate,cValidatorsDBValue) then
+ begin
+ DataLink := GetDataLink(FControlToValidate);
+ if (DataLink is TFieldDataLink) and (TFieldDataLink(DataLink).Field <> nil) then
+ Result := TFieldDataLink(DataLink).Field.DisplayText;
+ end
+ {$ENDIF JVVALIDATORS_SUPPORTS_DBCONTROLS}
+ else if FPropertyToValidate <> '' then
+ begin
+ PropInfo := GetPropInfo(FControlToValidate, FPropertyToValidate);
+ if (PropInfo <> nil) and (PropInfo^.GetProc <> nil) then
+ begin
+ Result := GetPropValue(FControlToValidate, FPropertyToValidate, False);
+ if (PropInfo^.PropType = TypeInfo(TDateTime)) or
+ (PropInfo^.PropType = TypeInfo(TDate)) or
+ (PropInfo^.PropType = TypeInfo(TTime)) then
+ Result := VarAsType(Result, varDate);
+ end;
+ end;
+ end;
+end;
+
+function TJvBaseValidator.HasParent: Boolean;
+begin
+ Debug('TJvBaseValidator.HasParent');
+ Result := True;
+end;
+
+procedure TJvBaseValidator.Notification(AComponent: TComponent;
+ Operation: TOperation);
+begin
+ inherited Notification(AComponent, Operation);
+ if Operation = opRemove then
+ begin
+ if AComponent = ControlToValidate then
+ ControlToValidate := nil;
+ if AComponent = ErrorControl then
+ ErrorControl := nil;
+ end;
+end;
+
+procedure TJvBaseValidator.SetValid(const Value: Boolean);
+begin
+ FValid := Value;
+ if not FValid then
+ DoValidateFailed;
+end;
+
+procedure TJvBaseValidator.SetControlToValidate(Value: TControl);
+var
+ Obj: IJvValidationProperty;
+begin
+ if ReplaceComponentReference(Self, Value, TComponent(FControlToValidate)) then
+ if FControlToValidate <> nil then
+ if not (csLoading in ComponentState) then
+ begin
+ if Supports(FControlToValidate, IJvValidationProperty, Obj) then
+ PropertyToValidate := UTF8Encode(Obj.GetValidationPropertyName)
+ else
+ PropertyToValidate := '';
+ end;
+end;
+
+procedure TJvBaseValidator.SetErrorControl(Value: TControl);
+begin
+ ReplaceComponentReference(Self, Value, TComponent(FErrorControl));
+end;
+
+procedure TJvBaseValidator.SetParentComponent(Value: TComponent);
+begin
+ if not (csLoading in ComponentState) then
+ begin
+ Debug('TJvBaseValidator.SetParentComponent: Parent is %s, changing to %s',
+ [ComponentName(FValidator), ComponentName(Value)]);
+ if FValidator <> nil then
+ begin
+ Debug('FValidator.Remove');
+ FValidator.Remove(Self);
+ end;
+ if (Value <> nil) and (Value is TJvValidators) then
+ begin
+ Debug('FValidator.Insert');
+ TJvValidators(Value).Insert(Self);
+ end;
+ end;
+end;
+
+procedure TJvBaseValidator.ReadState(Reader: TReader);
+begin
+ inherited ReadState(Reader);
+ Debug('TJvBaseValidator.ReadState: Reader.Parent is %s', [ComponentName(Reader.Parent)]);
+ if Reader.Parent is TJvValidators then
+ begin
+ if FValidator <> nil then
+ FValidator.Remove(Self);
+ FValidator := TJvValidators(Reader.Parent);
+ FValidator.Insert(Self);
+ end;
+end;
+
+procedure TJvBaseValidator.DoValidateFailed;
+begin
+ if Assigned(FOnValidateFailed) then
+ FOnValidateFailed(Self);
+end;
+
+{$IFDEF JVVALIDATORS_SUPPORTS_DBCONTROLS}
+function TJvBaseValidator.GetDataLink(AControl:TControl): TDataLink;
+begin
+ if AControl <> nil then
+ Result := TDataLink(AControl.Perform(CM_GETDATALINK, 0, 0))
+ else
+ Result := nil;
+end;
+{$ELSE}
+function TJvBaseValidator.GetDataLink(AControl:TControl):TObject;
+begin
+ Result := nil;
+end;
+{$ENDIF JVVALIDATORS_SUPPORTS_DBCONTROLS}
+
+
+//=== { TJvRequiredFieldValidator } ==========================================
+
+procedure TJvRequiredFieldValidator.Validate;
+var
+ R: Variant;
+begin
+ R := GetValidationPropertyValue;
+ case VarType(R) of
+ varDate:
+ Valid := VarCompareValue(R, 0) <> vrEqual; // zero is the invalid value for dates
+ varSmallint,
+ varInteger,
+ varSingle,
+ varDouble,
+ varCurrency,
+ varBoolean,
+ varByte:
+ ; // nothing to do because all values are valid
+ else
+ if FAllowBlank then
+ Valid := VarCompareValue(R, '') <> vrEqual
+ else
+ Valid := Trim(VarToStr(R)) <> '';
+ end;
+end;
+
+//=== { TJvCustomValidator } =================================================
+
+function TJvCustomValidator.DoValidate: Boolean;
+begin
+ Result := Valid;
+ if Assigned(FOnValidate) then
+ FOnValidate(Self, GetValidationPropertyValue, Result);
+end;
+
+procedure TJvCustomValidator.Validate;
+begin
+ Valid := DoValidate;
+end;
+
+//=== { TJvRegularExpressionValidator } ======================================
+
+function MatchesMask(const Filename, Mask: string{;
+ const SearchFlags: TSearchFlags = [sfCaseSensitive]}): Boolean;
+{var
+ URE: TURESearch;
+ SL: TWideStringList;}
+begin
+ Result := Masks.MatchesMask(Filename, Mask);
+ (*
+ // use the regexp engine in JclUnicode
+ SL := TWideStringList.Create;
+ try
+ URE := TURESearch.Create(SL);
+ try
+ URE.FindPrepare(Mask, SearchFlags);
+ // this could be overkill for long strings and many matches,
+ // but it's a lot simpler than calling FindFirst...
+ Result := URE.FindAll(Filename);
+ finally
+ URE.Free;
+ end;
+ finally
+ SL.Free;
+ end;
+ *)
+end;
+
+procedure TJvRegularExpressionValidator.Validate;
+var
+ R: string;
+begin
+ R := VarToStr(GetValidationPropertyValue);
+ Valid := (R = ValidationExpression) or MatchesMask(R, ValidationExpression);
+end;
+
+//=== { TJvCompareValidator } ================================================
+
+constructor TJvCompareValidator.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ FOperator := vcoEqual;
+end;
+
+procedure TJvCompareValidator.Validate;
+var
+ VR: TVariantRelationship;
+begin
+ VR := VarCompareValue(GetValidationPropertyValue, ValueToCompare);
+ case CmpOperator of
+ vcoLessThan:
+ Valid := VR = vrLessThan;
+ vcoLessOrEqual:
+ Valid := (VR = vrLessThan) or (VR = vrEqual);
+ vcoEqual:
+ Valid := (VR = vrEqual);
+ vcoGreaterOrEqual:
+ Valid := (VR = vrGreaterThan) or (VR = vrEqual);
+ vcoGreaterThan:
+ Valid := (VR = vrGreaterThan);
+ vcoNotEqual:
+ Valid := VR <> vrEqual;
+ end;
+end;
+
+//=== { TJvRangeValidator } ==================================================
+
+procedure TJvRangeValidator.Validate;
+var
+ VR: TVariantRelationship;
+begin
+ VR := VarCompareValue(GetValidationPropertyValue, MinimumValue);
+ Valid := (VR = vrGreaterThan) or (VR = vrEqual);
+ if Valid then
+ begin
+ VR := VarCompareValue(GetValidationPropertyValue, MaximumValue);
+ Valid := (VR = vrLessThan) or (VR = vrEqual);
+ end;
+end;
+
+//=== { TJvControlsCompareValidator } ========================================
+
+constructor TJvControlsCompareValidator.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ FAllowNull := True;
+ FOperator := vcoEqual;
+end;
+
+function TJvControlsCompareValidator.GetPropertyValueToCompare: Variant;
+var
+ ValProp: IJvValidationProperty;
+ PropInfo: PPropInfo;
+begin
+ Result := Null;
+ if FCompareToControl <> nil then
+ begin
+ if Supports(FCompareToControl, IJvValidationProperty, ValProp) then
+ Result := ValProp.GetValidationPropertyValue
+ else
+ if FCompareToProperty <> '' then
+ begin
+ PropInfo := GetPropInfo(FCompareToControl, FCompareToProperty);
+ if (PropInfo <> nil) and (PropInfo^.GetProc <> nil) then
+ Result := GetPropValue(FCompareToControl, FCompareToProperty, False);
+ end;
+ end;
+end;
+
+procedure TJvControlsCompareValidator.Notification(AComponent: TComponent;
+ Operation: TOperation);
+begin
+ inherited Notification(AComponent, Operation);
+ if (Operation = opRemove) and (AComponent = CompareToControl) then
+ CompareToControl := nil;
+end;
+
+procedure TJvControlsCompareValidator.SetCompareToControl(const AValue: TControl);
+var
+ Obj: IJvValidationProperty;
+begin
+ if ReplaceComponentReference(Self, AValue, TComponent(FCompareToControl)) then
+ if FCompareToControl <> nil then
+ begin
+ if not (csLoading in ComponentState) then
+ begin
+ if Supports(FCompareToControl, IJvValidationProperty, Obj) then
+ CompareToProperty := UTF8Encode(Obj.GetValidationPropertyName)
+ else
+ CompareToProperty := '';
+ end;
+ end;
+end;
+
+procedure TJvControlsCompareValidator.Validate;
+var
+ Val1, Val2: Variant;
+ VR: TVariantRelationship;
+begin
+ Val1 := GetValidationPropertyValue;
+ Val2 := GetPropertyValueToCompare;
+ if not AllowNull and
+ ((TVarData(Val1).VType in [varEmpty, varNull]) or (TVarData(Val2).VType in [varEmpty, varNull])) then
+ begin
+ Valid := False;
+ Exit;
+ end;
+ VR := VarCompareValue(Val1, Val2);
+ case CmpOperator of
+ vcoLessThan:
+ Valid := VR = vrLessThan;
+ vcoLessOrEqual:
+ Valid := (VR = vrLessThan) or (VR = vrEqual);
+ vcoEqual:
+ Valid := (VR = vrEqual);
+ vcoGreaterOrEqual:
+ Valid := (VR = vrGreaterThan) or (VR = vrEqual);
+ vcoGreaterThan:
+ Valid := (VR = vrGreaterThan);
+ vcoNotEqual:
+ Valid := (VR <> vrEqual);
+ end;
+end;
+
+//=== { TJvValidators } ======================================================
+
+constructor TJvValidators.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ FItems := TList.Create;
+end;
+
+destructor TJvValidators.Destroy;
+var
+ V: TJvBaseValidator;
+begin
+ Debug('TJvValidators.Destroy: Count is %d', [FItems.Count]);
+ while FItems.Count > 0 do
+ begin
+ V := TJvBaseValidator(FItems.Last);
+ V.FValidator := nil;
+ V.Free;
+ FItems.Delete(FItems.Count - 1);
+ end;
+ FItems.Free;
+ inherited Destroy;
+end;
+
+function TJvValidators.DoValidateFailed(const ABaseValidator: TJvBaseValidator): Boolean;
+begin
+ Result := True;
+ if Assigned(FOnValidateFailed) then
+ FOnValidateFailed(Self, ABaseValidator, Result);
+end;
+
+function TJvValidators.Validate(const GroupName:string): Boolean;
+var
+ I: Integer;
+ Controls: TList;
+ ErrCtrl: TControl;
+begin
+ Result := True;
+ if ValidationSummary <> nil then
+ FValidationSummary.BeginUpdate;
+ try
+ Controls := TList.Create;
+ if FErrorIndicator <> nil then
+ FErrorIndicator.BeginUpdate;
+ try
+ { Get all controls that should be validated }
+ if FErrorIndicator <> nil then
+ for I := 0 to Count - 1 do
+ begin
+ ErrCtrl := Items[i].ErrorControl;
+ if ErrCtrl = nil then
+ ErrCtrl := Items[i].ControlToValidate;
+ if ErrCtrl <> nil then
+ if Controls.IndexOf(ErrCtrl) = -1 then
+ Controls.Add(ErrCtrl);
+ end;
+
+ for I := 0 to Count - 1 do
+ begin
+ if Items[I].Enabled and ((Items[I].GroupName = '') or AnsiSameText(GroupName, Items[I].GroupName)) then
+ begin
+ Items[I].Validate;
+ if not Items[I].Valid then
+ begin
+ if (Items[I].ErrorMessage <> '') and (Items[I].ControlToValidate <> nil) then
+ begin
+ ErrCtrl := Items[I].ErrorControl;
+ if ErrCtrl = nil then
+ ErrCtrl := Items[i].ControlToValidate;
+
+ if ValidationSummary <> nil then
+ FValidationSummary.AddError(Items[I].ErrorMessage);
+ if ErrorIndicator <> nil then
+ FErrorIndicator.SetError(ErrCtrl, UTF8Decode(Items[I].ErrorMessage));
+ if FErrorIndicator <> nil then
+ Controls.Remove(ErrCtrl); { control is not valid }
+ end;
+ Result := False;
+ if not DoValidateFailed(Items[I]) then
+ Exit;
+ end;
+ end;
+ end;
+ { Clear ErrorIndicators for controls that are valid }
+ if FErrorIndicator <> nil then
+ for I := 0 to Controls.Count - 1 do
+ FErrorIndicator.SetError(TControl(Controls[I]), ''); // clear error indicator
+ finally
+ if FErrorIndicator <> nil then
+ FErrorIndicator.EndUpdate;
+ Controls.Free;
+ end;
+ finally
+ if ValidationSummary <> nil then
+ FValidationSummary.EndUpdate;
+ end;
+end;
+
+function TJvValidators.Validate: Boolean;
+begin
+ Result := Validate('');
+end;
+
+procedure TJvValidators.Notification(AComponent: TComponent;
+ Operation: TOperation);
+begin
+ inherited Notification(AComponent, Operation);
+ if Operation = opRemove then
+ begin
+ if Assigned(ValidationSummary) and AComponent.IsImplementorOf(ValidationSummary) then
+ ValidationSummary := nil;
+ if Assigned(ErrorIndicator) and AComponent.IsImplementorOf(ErrorIndicator) then
+ ErrorIndicator := nil;
+ end;
+end;
+
+procedure TJvValidators.GetChildren(Proc: TGetChildProc; Root: TComponent);
+var
+ I: Integer;
+begin
+ Debug('TJvValidators.GetChildren: Count is %d, Root is %s', [Count, ComponentName(Root)]);
+ for I := 0 to Count - 1 do
+ Proc(Items[I]);
+end;
+
+procedure TJvValidators.SetValidationSummary(const Value: IJvValidationSummary);
+begin
+ ReferenceInterface(FValidationSummary, opRemove);
+ FValidationSummary := Value;
+ ReferenceInterface(FValidationSummary, opInsert);
+end;
+
+procedure TJvValidators.Insert(AValidator: TJvBaseValidator);
+begin
+ Debug('TJvValidators.Insert: inserting %s', [ComponentName(AValidator)]);
+ Assert(AValidator <> nil, RsEInsertNilValidator);
+ AValidator.FValidator := Self;
+ if FItems.IndexOf(AValidator) < 0 then
+ FItems.Add(AValidator);
+end;
+
+procedure TJvValidators.Remove(AValidator: TJvBaseValidator);
+begin
+ Debug('TJvValidators.Remove: removing %s', [ComponentName(AValidator)]);
+ Assert(AValidator <> nil, RsERemoveNilValidator);
+ Assert(AValidator.FValidator = Self, RsEValidatorNotChild);
+ AValidator.FValidator := nil;
+ FItems.Remove(AValidator);
+end;
+
+function TJvValidators.GetCount: Integer;
+begin
+ Result := FItems.Count;
+end;
+
+function TJvValidators.GetItem(Index: Integer): TJvBaseValidator;
+begin
+ Result := TJvBaseValidator(FItems[Index]);
+end;
+
+procedure TJvValidators.Exchange(Index1, Index2: Integer);
+begin
+ FItems.Exchange(Index1, Index2);
+end;
+
+procedure TJvValidators.SetErrorIndicator(const Value: IJvErrorIndicator);
+begin
+ ReferenceInterface(FErrorIndicator, opRemove);
+ FErrorIndicator := Value;
+ ReferenceInterface(FErrorIndicator, opInsert);
+end;
+
+//=== { TJvValidationSummary } ===============================================
+
+destructor TJvValidationSummary.Destroy;
+begin
+ FSummaries.Free;
+ inherited Destroy;
+end;
+
+procedure TJvValidationSummary.AddError(const ErrorMessage: string);
+begin
+ if Summaries.IndexOf(ErrorMessage) < 0 then
+ begin
+ Summaries.Add(ErrorMessage);
+ if (FUpdateCount = 0) and Assigned(FOnAddError) then
+ FOnAddError(Self);
+ Change;
+ end;
+end;
+
+procedure TJvValidationSummary.RemoveError(const ErrorMessage: string);
+var
+ I: Integer;
+begin
+ I := Summaries.IndexOf(ErrorMessage);
+ if I > -1 then
+ begin
+ Summaries.Delete(I);
+ if (FUpdateCount = 0) and Assigned(FOnRemoveError) then
+ FOnRemoveError(Self);
+ Change;
+ end;
+end;
+
+function TJvValidationSummary.GetSummaries: TStrings;
+begin
+ if FSummaries = nil then
+ FSummaries := TStringList.Create;
+ Result := FSummaries;
+end;
+
+procedure TJvValidationSummary.Change;
+begin
+ if FUpdateCount <> 0 then
+ begin
+ Inc(FPendingUpdates);
+ Exit;
+ end;
+ if Assigned(FOnChange) then
+ FOnChange(Self);
+end;
+
+procedure TJvValidationSummary.BeginUpdate;
+begin
+ Inc(FUpdateCount);
+end;
+
+procedure TJvValidationSummary.EndUpdate;
+begin
+ Dec(FUpdateCount);
+ if FUpdateCount < 0 then
+ FUpdateCount := 0;
+ if (FUpdateCount = 0) and (FPendingUpdates > 0) then
+ begin
+ Change;
+ FPendingUpdates := 0;
+ end;
+end;
+
+procedure RegisterBaseValidators;
+begin
+ TJvBaseValidator.RegisterBaseValidator('Required Field Validator', TJvRequiredFieldValidator);
+ TJvBaseValidator.RegisterBaseValidator('Compare Validator', TJvCompareValidator);
+ TJvBaseValidator.RegisterBaseValidator('Range Validator', TJvRangeValidator);
+ TJvBaseValidator.RegisterBaseValidator('Regular Expression Validator', TJvRegularExpressionValidator);
+ TJvBaseValidator.RegisterBaseValidator('Custom Validator', TJvCustomValidator);
+ TJvBaseValidator.RegisterBaseValidator('Controls Compare Validator', TJvControlsCompareValidator);
+end;
+
+
+initialization
+ // (p3) do NOT touch! This is required to make the registration work on formulars!!!
+ RegisterBaseValidators;
+
+finalization
+ FreeAndNil(GlobalValidatorsList);
+
+end.