📄 frxclass.pas
字号:
private
FActive: Boolean;
FColor: TColor;
FCondition: String;
FFont: TFont;
procedure SetFont(const Value: TFont);
public
constructor Create;
destructor Destroy; override;
procedure Assign(Source: TPersistent); override;
published
property Active: Boolean read FActive write FActive default False;
property Font: TFont read FFont write SetFont;
property Color: TColor read FColor write FColor default clNone;
property Condition: String read FCondition write FCondition;
end;
TfrxFormat = class(TPersistent)
private
FDecimalSeparator: String;
FThousandSeparator: String;
FFormatStr: String;
FKind: TfrxFormatKind;
public
procedure Assign(Source: TPersistent); override;
published
property DecimalSeparator: String read FDecimalSeparator write FDecimalSeparator;
property ThousandSeparator: String read FThousandSeparator write FThousandSeparator;
property FormatStr: String read FFormatStr write FFormatStr;
property Kind: TfrxFormatKind read FKind write FKind default fkText;
end;
TfrxCustomMemoView = class(TfrxStretcheable)
private
FAllowExpressions: Boolean;
FAllowHTMLTags: Boolean;
FAutoWidth: Boolean;
FCharSpacing: Extended;
FClipped: Boolean;
FDisplayFormat: TfrxFormat;
FExpressionDelimiters: String;
FFlowTo: TfrxCustomMemoView;
FFirstParaBreak: Boolean;
FGapX: Extended;
FGapY: Extended;
FHAlign: TfrxHAlign;
FHideZeros: Boolean;
FHighlight: TfrxHighlight;
FLastParaBreak: Boolean;
FLineSpacing: Extended;
FMemo: TWideStrings;
FParagraphGap: Extended;
FPartMemo: WideString;
FRotation: Integer;
FRTLReading: Boolean;
FStyle: String;
FSuppressRepeated: Boolean;
FTempMemo: WideString;
FUnderlines: Boolean;
FVAlign: TfrxVAlign;
FValue: Variant;
FWordBreak: Boolean;
FWordWrap: Boolean;
FWysiwyg: Boolean;
procedure SetMemo(const Value: TWideStrings);
procedure SetRotation(Value: Integer);
procedure SetText(const Value: WideString);
procedure SetAnsiText(const Value: AnsiString);
function AdjustCalcHeight: Extended;
function AdjustCalcWidth: Extended;
function GetText: WideString;
function GetAnsiText: AnsiString;
function IsExprDelimitersStored: Boolean;
function IsLineSpacingStored: Boolean;
function IsGapXStored: Boolean;
function IsGapYStored: Boolean;
function IsHighlightStored: Boolean;
function IsParagraphGapStored: Boolean;
procedure SetHighlight(const Value: TfrxHighlight);
procedure SetDisplayFormat(const Value: TfrxFormat);
procedure SetStyle(const Value: String);
function IsCharSpacingStored: Boolean;
protected
FLastValue: Variant;
FTotalPages: Integer;
FCopyNo: Integer;
FTextRect: TRect;
FPrintScale: Extended;
function CalcAndFormat(const Expr: WideString): WideString;
procedure BeginDraw(Canvas: TCanvas; ScaleX, ScaleY, OffsetX, OffsetY: Extended); override;
procedure SetDrawParams(Canvas: TCanvas; ScaleX, ScaleY, OffsetX, OffsetY: Extended);
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
class function GetDescription: String; override;
function Diff(AComponent: TfrxComponent): String; override;
function CalcHeight: Extended; override;
function CalcWidth: Extended; virtual;
function DrawPart: Extended; override;
function GetComponentText: String; override;
function FormatData(const Value: Variant; AFormat: TfrxFormat = nil): WideString;
function WrapText(WrapWords: Boolean): WideString;
procedure Draw(Canvas: TCanvas; ScaleX, ScaleY, OffsetX, OffsetY: Extended); override;
procedure BeforePrint; override;
procedure GetData; override;
procedure AfterPrint; override;
procedure InitPart; override;
procedure ApplyStyle(Style: TfrxStyleItem);
procedure ExtractMacros;
procedure ResetSuppress;
property Text: WideString read GetText write SetText;
property AnsiText: AnsiString read GetAnsiText write SetAnsiText;
property Value: Variant read FValue write FValue;
// analogue of Memo property
property Lines: TWideStrings read FMemo write SetMemo;
property AllowExpressions: Boolean read FAllowExpressions write FAllowExpressions default True;
property AllowHTMLTags: Boolean read FAllowHTMLTags write FAllowHTMLTags default False;
property AutoWidth: Boolean read FAutoWidth write FAutoWidth default False;
property CharSpacing: Extended read FCharSpacing write FCharSpacing stored IsCharSpacingStored;
property Clipped: Boolean read FClipped write FClipped default True;
property DisplayFormat: TfrxFormat read FDisplayFormat write SetDisplayFormat;
property ExpressionDelimiters: String read FExpressionDelimiters
write FExpressionDelimiters stored IsExprDelimitersStored;
property FlowTo: TfrxCustomMemoView read FFlowTo write FFlowTo;
property GapX: Extended read FGapX write FGapX stored IsGapXStored;
property GapY: Extended read FGapY write FGapY stored IsGapYStored;
property HAlign: TfrxHAlign read FHAlign write FHAlign default haLeft;
property HideZeros: Boolean read FHideZeros write FHideZeros default False;
property Highlight: TfrxHighlight read FHighlight write SetHighlight
stored IsHighlightStored;
property LineSpacing: Extended read FLineSpacing write FLineSpacing stored IsLineSpacingStored;
property Memo: TWideStrings read FMemo write SetMemo;
property ParagraphGap: Extended read FParagraphGap write FParagraphGap stored IsParagraphGapStored;
property Rotation: Integer read FRotation write SetRotation default 0;
property RTLReading: Boolean read FRTLReading write FRTLReading default False;
property Style: String read FStyle write SetStyle;
property SuppressRepeated: Boolean read FSuppressRepeated write FSuppressRepeated default False;
property Underlines: Boolean read FUnderlines write FUnderlines default False;
property WordBreak: Boolean read FWordBreak write FWordBreak default False;
property WordWrap: Boolean read FWordWrap write FWordWrap default True;
property Wysiwyg: Boolean read FWysiwyg write FWysiwyg default True;
property VAlign: TfrxVAlign read FVAlign write FVAlign default vaTop;
published
property FirstParaBreak: Boolean read FFirstParaBreak write FFirstParaBreak default False;
property LastParaBreak: Boolean read FLastParaBreak write FLastParaBreak default False;
property Cursor;
property TagStr;
property URL;
end;
TfrxMemoView = class(TfrxCustomMemoView)
published
property AutoWidth;
property AllowExpressions;
property AllowHTMLTags;
property BrushStyle;
property CharSpacing;
property Clipped;
property Color;
property DataField;
property DataSet;
property DataSetName;
property DisplayFormat;
property ExpressionDelimiters;
property FlowTo;
property Font;
property Frame;
property GapX;
property GapY;
property HAlign;
property HideZeros;
property Highlight;
property LineSpacing;
property Memo;
property ParagraphGap;
property ParentFont;
property Rotation;
property RTLReading;
property Style;
property SuppressRepeated;
property Underlines;
property WordBreak;
property WordWrap;
property Wysiwyg;
property VAlign;
end;
TfrxSysMemoView = class(TfrxCustomMemoView)
public
class function GetDescription: String; override;
published
property AutoWidth;
property BrushStyle;
property CharSpacing;
property Color;
property DisplayFormat;
property Font;
property Frame;
property GapX;
property GapY;
property HAlign;
property HideZeros;
property Highlight;
property Memo;
property ParentFont;
property Rotation;
property RTLReading;
property Style;
property SuppressRepeated;
property VAlign;
property WordWrap;
end;
TfrxCustomLineView = class(TfrxStretcheable)
private
FDiagonal: Boolean;
FArrowEnd: Boolean;
FArrowLength: Integer;
FArrowSolid: Boolean;
FArrowStart: Boolean;
FArrowWidth: Integer;
procedure DrawArrow(x1, y1, x2, y2: Extended);
procedure DrawDiagonalLine;
public
constructor Create(AOwner: TComponent); override;
constructor DesignCreate(AOwner: TComponent; Flags: Word); override;
procedure Draw(Canvas: TCanvas; ScaleX, ScaleY, OffsetX, OffsetY: Extended); override;
property ArrowEnd: Boolean read FArrowEnd write FArrowEnd default False;
property ArrowLength: Integer read FArrowLength write FArrowLength default 20;
property ArrowSolid: Boolean read FArrowSolid write FArrowSolid default False;
property ArrowStart: Boolean read FArrowStart write FArrowStart default False;
property ArrowWidth: Integer read FArrowWidth write FArrowWidth default 5;
property Diagonal: Boolean read FDiagonal write FDiagonal default False;
published
property TagStr;
end;
TfrxLineView = class(TfrxCustomLineView)
public
class function GetDescription: String; override;
published
property ArrowEnd;
property ArrowLength;
property ArrowSolid;
property ArrowStart;
property ArrowWidth;
property Frame;
property Diagonal;
end;
TfrxPictureView = class(TfrxView)
private
FAutoSize: Boolean;
FCenter: Boolean;
FFileLink: String;
FImageIndex: Integer;
FIsImageIndexStored: Boolean;
FIsPictureStored: Boolean;
FKeepAspectRatio: Boolean;
FPicture: TPicture;
FPictureChanged: Boolean;
FStretched: Boolean;
FHightQuality: Boolean;
procedure SetPicture(const Value: TPicture);
procedure PictureChanged(Sender: TObject);
procedure SetAutoSize(const Value: Boolean);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
class function GetDescription: String; override;
function Diff(AComponent: TfrxComponent):String; override;
function LoadPictureFromStream(s: TStream; ResetStreamPos: Boolean = True): HResult;
procedure Draw(Canvas: TCanvas; ScaleX, ScaleY, OffsetX, OffsetY: Extended); override;
procedure GetData; override;
property IsImageIndexStored: Boolean read FIsImageIndexStored write FIsImageIndexStored;
property IsPictureStored: Boolean read FIsPictureStored write FIsPictureStored;
published
property Cursor;
property AutoSize: Boolean read FAutoSize write SetAutoSize default False;
property Center: Boolean read FCenter write FCenter default False;
property DataField;
property DataSet;
property DataSetName;
property Frame;
property FileLink: String read FFileLink write FFileLink;
property ImageIndex: Integer read FImageIndex write FImageIndex stored FIsImageIndexStored;
property KeepAspectRatio: Boolean read FKeepAspectRatio write FKeepAspectRatio default True;
property Picture: TPicture read FPicture write SetPicture stored FIsPictureStored;
property Stretched: Boolean read FStretched write FStretched default True;
property TagStr;
property URL;
property HightQuality: Boolean read FHightQuality write FHightQuality;
end;
TfrxShapeView = class(TfrxView)
private
FCurve: Integer;
FShape: TfrxShapeKind;
public
constructor Create(AOwner: TComponent); override;
constructor DesignCreate(AOwner: TComponent; Flags: Word); override;
function Diff(AComponent: TfrxComponent): String; override;
procedure Draw(Canvas: TCanvas; ScaleX, ScaleY, OffsetX, OffsetY: Extended); override;
class function GetDescription: String; override;
published
property BrushStyle;
property Color;
property Cursor;
property Curve: Integer read FCurve write FCurve default 0;
property Frame;
property Shape: TfrxShapeKind read FShape write FShape default skRectangle;
property TagStr;
property URL;
end;
TfrxSubreport = class(TfrxView)
private
FPage: TfrxReportPage;
FPrintOnParent: Boolean;
procedure SetPage(const Value: TfrxReportPage);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Draw(Canvas: TCanvas; ScaleX, ScaleY, OffsetX, OffsetY: Extended); override;
class function GetDescription: String; override;
published
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -