⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frxclass.pas

📁 Fastreport最新版本的补丁
💻 PAS
📖 第 1 页 / 共 5 页
字号:
    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 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;
{$IFDEF FR_COM}
    { IfrxCustomMemoView }
    function IfrxCustomMemoView.Get_Text = IfrxCustomMemoView_Get_Text;
    function IfrxCustomMemoView.Set_Text = IfrxCustomMemoView_Set_Text;

    function IfrxCustomMemoView_Get_Text(out Value: WideString): HResult; stdcall;
    function IfrxCustomMemoView_Set_Text(const Value: WideString): HResult; stdcall;
{$ENDIF}
  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;

{$IFDEF FR_COM}
  TfrxMemoView = class(TfrxCustomMemoView, IfrxMemoView)
  protected
    function Get_AutoWidth(out Value: WordBool): HResult; stdcall;
    function Set_AutoWidth(Value: WordBool): HResult; stdcall;
    function Get_AllowExpressions(out Value: WordBool): HResult; stdcall;
    function Set_AllowExpressions(Value: WordBool): HResult; stdcall;
    function Get_AllowHTMLTags(out Value: WordBool): HResult; stdcall;
    function Set_AllowHTMLTags(Value: WordBool): HResult; stdcall;
    function Get_BrushStyle(out Value: frxBrushStyle): HResult; stdcall;
    function Set_BrushStyle(Value: frxBrushStyle): HResult; stdcall;
    function Get_CharSpacing(out Value: Double): HResult; stdcall;
    function Set_CharSpacing(Value: Double): HResult; stdcall;
    function Get_Clipped(out Value: WordBool): HResult; stdcall;
    function Set_Clipped(Value: WordBool): HResult; stdcall;
    function Get_Color(out Value: Integer): HResult; stdcall;
    function Set_Color(Value: Integer): HResult; stdcall;
    function Get_DataField(out Value: WideString): HResult; stdcall;
    function Set_DataField(const Value: WideString): HResult; stdcall;
    function Get_DataSet(out Value: IfrxDataSet): HResult; stdcall;
    function Set_DataSet(const Value: IfrxDataSet): HResult; stdcall;
    function Get_DataSetName(out Value: WideString): HResult; stdcall;
    function Set_DataSetName(const Value: WideString): HResult; stdcall;
    function Get_DisplayFormat(out Value: IfrxDisplayFormat): HResult; stdcall;
    function Get_ExpressionDelimiters(out Value: WideString): HResult; stdcall;
    function Set_ExpressionDelimiters(const Value: WideString): HResult; stdcall;
    function Get_FlowTo(out Value: IfrxCustomMemoView): HResult; stdcall;
    function Set_FlowTo(const Value: IfrxCustomMemoView): HResult; stdcall;
    function Get_Font(out Value: IfrxFont): HResult; stdcall;
    function Get_Frame(out Value: IfrxFrame): HResult; stdcall;
    function Get_GapX(out Value: Double): HResult; stdcall;
    function Set_GapX(Value: Double): HResult; stdcall;
    function Get_GapY(out Value: Double): HResult; stdcall;
    function Set_GapY(Value: Double): HResult; stdcall;
    function Get_HAlign(out Value: frxHAlign): HResult; stdcall;
    function Set_HAlign(Value: frxHAlign): HResult; stdcall;
    function Get_HideZeros(out Value: WordBool): HResult; stdcall;
    function Set_HideZeros(Value: WordBool): HResult; stdcall;
    function Get_Highlight(out Value: IfrxHighlight): HResult; stdcall;
    function Get_LineSpacing(out Value: Double): HResult; stdcall;
    function Set_LineSpacing(Value: Double): HResult; stdcall;
    function Get_Memo(out Value: WideString): HResult; stdcall;
    function Set_Memo(const Value: WideString): HResult; stdcall;
    function Get_ParagraphGap(out Value: Double): HResult; stdcall;
    function Set_ParagraphGap(Value: Double): HResult; stdcall;
    function Get_ParentFont(out Value: WordBool): HResult; stdcall;
    function Set_ParentFont(Value: WordBool): HResult; stdcall;
    function Get_Rotation(out Value: Integer): HResult; stdcall;
    function Set_Rotation(Value: Integer): HResult; stdcall;
    function Get_RTLReading(out Value: WordBool): HResult; stdcall;
    function Set_RTLReading(Value: WordBool): HResult; stdcall;
    function Get_Style(out Value: WideString): HResult; stdcall;
    function Set_Style(const Value: WideString): HResult; stdcall;
    function Get_SuppressRepeated(out Value: WordBool): HResult; stdcall;
    function Set_SuppressRepeated(Value: WordBool): HResult; stdcall;
    function Get_Underlines(out Value: WordBool): HResult; stdcall;
    function Set_Underlines(Value: WordBool): HResult; stdcall;
    function Get_WordBreak(out Value: WordBool): HResult; stdcall;
    function Set_WordBreak(Value: WordBool): HResult; stdcall;
    function Get_WordWrap(out Value: WordBool): HResult; stdcall;
    function Set_WordWrap(Value: WordBool): HResult; stdcall;
    function Get_VAlign(out Value: frxVAlign): HResult; stdcall;
    function Set_VAlign(Value: frxVAlign): HResult; stdcall;
{$ELSE}
  TfrxMemoView = class(TfrxCustomMemoView)
{$ENDIF}
  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: Integer);
    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;

{$IFDEF FR_COM}
  TfrxPictureView = class(TfrxView, IfrxPictureView)
{$ELSE}
  TfrxPictureView = class(TfrxView)
{$ENDIF}
  private
    FAutoSize: Boolean;
    FCenter: Boolean;
    FFileLink: String;
    FImageIndex: Integer;
    FIsImageIndexStored: Boolean;
    FIsPictureStored: Boolean;
    FKeepAspectRatio: Boolean;
    FPicture: TPicture;
    FPictureChanged: Boolean;
    FStretched: Boolean;
    procedure SetPicture(const Value: TPicture);
    procedure PictureChanged(Sender: TObject);
    procedure SetAutoSize(const Value: Boolean);
{$IFDEF FR_COM}
  protected
    function Get_Picture(out Value: OLE_HANDLE): HResult; stdcall;
    function Set_Picture(Value: OLE_HANDLE): HResult; stdcall;
    function Get_Metafile(out Value: OLE_HANDLE): HResult; stdcall;
    function Set_Metafile(Value: OLE_HANDLE): HResult; stdcall;
    function LoadViewFromStream(const Stream: IUnknown): HResult; stdcall;
    function SaveViewToStream(const Stream: IUnknown): HResult; stdcall;
{$ENDIF}
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
    class function GetDescription: String; override;
    function Diff(AComponent: TfrxComponent): String; override;
    function LoadPictureFromStream(s: TStream): 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;
  end;

{$IFDEF FR_COM}
  TfrxShapeView = class(TfrxView, IfrxShapeView)
{$ELSE}
  TfrxShapeView = class(TfrxView)
{$ENDIF}
  private
    FCurve: Integer;
    FShape: TfrxShapeKind;
{$IFDEF FR_COM}
    function Get_Curve(out Value: Integer): HResult; stdcall;
    function Set_Curve(Value: Integer): HResult; stdcall;
    function Get_ShapeType(out Value: frxShapeType): HResult; stdcall;
    function Set_ShapeType(Value: frxShapeType): HResult; stdcall;
{$ENDIF}
  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;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -