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

📄 frxclass.pas

📁 Fastreport最新版本的补丁
💻 PAS
📖 第 1 页 / 共 5 页
字号:
      ColorChanged, StyleChanged, WidthChanged: Boolean): String;
  published
    property Color: TColor read FColor write FColor stored IsColorStored;
    property Style: TfrxFrameStyle read FStyle write FStyle stored IsStyleStored;
    property Width: Extended read FWidth write FWidth stored IsWidthStored;
  end;

{$IFDEF FR_COM}
  TfrxFrame = class(TDispatchablePersistent, IfrxFrame)
{$ELSE}
  TfrxFrame = class(TPersistent)
{$ENDIF}
  private
    FLeftLine: TfrxFrameLine;
    FTopLine: TfrxFrameLine;
    FRightLine: TfrxFrameLine;
    FBottomLine: TfrxFrameLine;
    FColor: TColor;
    FDropShadow: Boolean;
    FShadowWidth: Extended;
    FShadowColor: TColor;
    FStyle: TfrxFrameStyle;
    FTyp: TfrxFrameTypes;
    FWidth: Extended;
    function IsShadowWidthStored: Boolean;
    function IsTypStored: Boolean;
    function IsWidthStored: Boolean;
    procedure SetBottomLine(const Value: TfrxFrameLine);
    procedure SetLeftLine(const Value: TfrxFrameLine);
    procedure SetRightLine(const Value: TfrxFrameLine);
    procedure SetTopLine(const Value: TfrxFrameLine);
    procedure SetColor(const Value: TColor);
    procedure SetStyle(const Value: TfrxFrameStyle);
    procedure SetWidth(const Value: Extended);
{$IFDEF FR_COM}
    { IfrxFrame }
    function Get_Color(out Value: Integer): HResult; stdcall;
    function Set_Color(Value: Integer): HResult; stdcall;
    function Get_DropShadow(out Value: WordBool): HResult; stdcall;
    function Set_DropShadow(Value: WordBool): HResult; stdcall;
    function Get_ShadowColor(out Value: Integer): HResult; stdcall;
    function Set_ShadowColor(Value: Integer): HResult; stdcall;
    function Get_ShadowWidth(out Value: Double): HResult; stdcall;
    function Set_ShadowWidth(Value: Double): HResult; stdcall;
    function Get_Style(out Value: frxFrameStyle): HResult; stdcall;
    function Set_Style(Value: frxFrameStyle): HResult; stdcall;
    function Get_FrameType(out Value: Integer): HResult; stdcall;
    function Set_FrameType(Value: Integer): HResult; stdcall;
    function Get_Width(out Value: Double): HResult; stdcall;
    function Set_Width(Value: Double): HResult; stdcall;
{$ENDIF}
  public
    constructor Create;
    destructor Destroy; override;
    procedure Assign(Source: TPersistent); override;
    function Diff(AFrame: TfrxFrame): String;
  published
    property Color: TColor read FColor write SetColor default clBlack;
    property DropShadow: Boolean read FDropShadow write FDropShadow default False;
    property ShadowColor: TColor read FShadowColor write FShadowColor default clBlack;
    property ShadowWidth: Extended read FShadowWidth write FShadowWidth stored IsShadowWidthStored;
    property Style: TfrxFrameStyle read FStyle write SetStyle default fsSolid;
    property Typ: TfrxFrameTypes read FTyp write FTyp stored IsTypStored;
    property Width: Extended read FWidth write SetWidth stored IsWidthStored;
    property LeftLine: TfrxFrameLine read FLeftLine write SetLeftLine;
    property TopLine: TfrxFrameLine read FTopLine write SetTopLine;
    property RightLine: TfrxFrameLine read FRightLine write SetRightLine;
    property BottomLine: TfrxFrameLine read FBottomLine write SetBottomLine;
  end;

{$IFDEF FR_COM}
 TfrxView = class(TfrxReportComponent, IfrxView)
{$ELSE}
 TfrxView = class(TfrxReportComponent)
{$ENDIF}
  private
    FAlign: TfrxAlign;
    FBrushStyle: TBrushStyle;
    FColor: TColor;
    FCursor: TCursor;
    FDataField: String;
    FDataSet: TfrxDataSet;
    FDataSetName: String;
    FFrame: TfrxFrame;
    FPrintable: Boolean;
    FShiftMode: TfrxShiftMode;
    FTagStr: String;
    FTempTag: String;
    FTempURL: String;
    FURL: String;
    FPlainText: Boolean;
    procedure SetFrame(const Value: TfrxFrame);
    procedure SetDataSet(const Value: TfrxDataSet);
    procedure SetDataSetName(const Value: String);
    function GetDataSetName: String;
  protected
    FX: Integer;
    FY: Integer;
    FX1: Integer;
    FY1: Integer;
    FDX: Integer;
    FDY: Integer;
    FFrameWidth: Integer;
    FScaleX: Extended;
    FScaleY: Extended;
    FOffsetX: Extended;
    FOffsetY: Extended;
    FCanvas: TCanvas;
    procedure BeginDraw(Canvas: TCanvas; ScaleX, ScaleY, OffsetX, OffsetY: Extended); virtual;
    procedure DrawBackground; virtual;
    procedure DrawFrame; virtual;
    procedure DrawLine(x, y, x1, y1, w: Integer);
    procedure ExpandVariables(var Expr: String);
    procedure Notification(AComponent: TComponent; Operation: TOperation); override;
{$IFDEF FR_COM}
    function Get_DataField(out Value: WideString): HResult; stdcall;
    function Set_DataField(const Value: WideString): HResult; stdcall;
    function Get_TagStr(out Value: WideString): HResult; stdcall;
    function Set_TagStr(const Value: WideString): HResult; stdcall;
    function Get_URL(out Value: WideString): HResult; stdcall;
    function Set_URL(const Value: WideString): HResult; stdcall;
    function Get_DataSetName(out Value: WideString): HResult; stdcall;
    function Set_DataSetName(const Value: WideString): HResult; stdcall;
    function Get_Name(out Value: WideString): HResult; stdcall;
    function Get_Frame(out Value: IfrxFrame): HResult; stdcall;
    function Get_ShiftMode(out Value: frxShiftMode): HResult; stdcall;
    function Set_ShiftMode(Value: frxShiftMode): HResult; stdcall;
    function Get_Align(out Value: frxAlign): HResult; stdcall;
    function Set_Align(Value: frxAlign): HResult; stdcall;
{$ENDIF}
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
    function Diff(AComponent: TfrxComponent): String; override;
    function IsDataField: Boolean;
    procedure Draw(Canvas: TCanvas; ScaleX, ScaleY, OffsetX, OffsetY: Extended); override;
    procedure BeforePrint; override;
    procedure GetData; override;
    procedure AfterPrint; override;
    property BrushStyle: TBrushStyle read FBrushStyle write FBrushStyle default bsSolid;
    property Color: TColor read FColor write FColor default clNone;
    property DataField: String read FDataField write FDataField;
    property DataSet: TfrxDataSet read FDataSet write SetDataSet;
    property DataSetName: String read GetDataSetName write SetDataSetName;
    property Frame: TfrxFrame read FFrame write SetFrame;
    property PlainText: Boolean read FPlainText write FPlainText;
    property Cursor: TCursor read FCursor write FCursor default crDefault;
    property TagStr: String read FTagStr write FTagStr;
    property URL: String read FURL write FURL;
  published
    property Align: TfrxAlign read FAlign write FAlign default baNone;
    property Printable: Boolean read FPrintable write FPrintable default True;
    property ShiftMode: TfrxShiftMode read FShiftMode write FShiftMode default smAlways;
    property Left;
    property Top;
    property Width;
    property Height;
    property GroupIndex;
    property Restrictions;
    property Visible;
    property OnAfterData;
    property OnAfterPrint;
    property OnBeforePrint;
    property OnPreviewClick;
  end;

{$IFDEF FR_COM}
  TfrxStretcheable = class(TfrxView, IfrxStretcheable)
{$ELSE}
  TfrxStretcheable = class(TfrxView)
{$ENDIF}
  private
    FStretchMode: TfrxStretchMode;
{$IFDEF FR_COM}
    function Get_StretchMode(out Value: frxStretchMode): HResult; stdcall;
    function Set_StretchMode(Value: frxStretchMode): HResult; stdcall;
{$ENDIF}
  public
    FSaveHeight: Extended;
    constructor Create(AOwner: TComponent); override;
    function CalcHeight: Extended; virtual;
    function DrawPart: Extended; virtual;
    procedure InitPart; virtual;
  published
    property StretchMode: TfrxStretchMode read FStretchMode write FStretchMode
      default smDontStretch;
  end;

{$IFDEF FR_COM}
  TfrxHighlight = class(TDispatchablePersistent, IfrxHighlight)
{$ELSE}
  TfrxHighlight = class(TPersistent)
{$ENDIF}
  private
    FActive: Boolean;
    FColor: TColor;
    FCondition: String;
{$IFNDEF FR_COM}
    FFont: TFont;
{$ELSE}
    FFont: TfrxFont;
    function GetFont: TFont;
{$ENDIF}
    procedure SetFont(const Value: TFont);
{$IFDEF FR_COM}
    { IfrxHighlight }
    function Get_Active(out Value: WordBool): HResult; stdcall;
    function Set_Active(Value: WordBool): HResult; stdcall;
    function Get_Color(out Value: Integer): HResult; stdcall;
    function Set_Color(Value: Integer): HResult; stdcall;
    function Get_Font(out Value: IfrxFont): HResult; stdcall;
{$ENDIF}
  public
    constructor Create;
    destructor Destroy; override;
    procedure Assign(Source: TPersistent); override;
  published
    property Active: Boolean read FActive write FActive default False;
{$IFNDEF FR_COM}
    property Font: TFont read FFont write SetFont;
{$ELSE}
    property Font: TFont read GetFont write SetFont;
{$ENDIF}
    property Color: TColor read FColor write FColor default clNone;
    property Condition: String read FCondition write FCondition;
  end;

{$IFDEF FR_COM}
  TfrxFormat = class(TDispatchablePersistent, IfrxDisplayFormat)
{$ELSE}
  TfrxFormat = class(TPersistent)
{$ENDIF}
  private
    FDecimalSeparator: String;
    FFormatStr: String;
    FKind: TfrxFormatKind;
{$IFDEF FR_COM}
    { IfrxDisplayFormat }
    function Get_DecimalSeparator(out Value: WideString): HResult; stdcall;
    function Set_DecimalSeparator(const Value: WideString): HResult; stdcall;
    function Get_FormatStr(out Value: WideString): HResult; stdcall;
    function Set_FormatStr(const Value: WideString): HResult; stdcall;
    function Get_Kind(out Value: frxFormatKind): HResult; stdcall;
    function Set_Kind(Value: frxFormatKind): HResult; stdcall;
{$ENDIF}
  public
{$IFDEF FR_COM}
    constructor Create;
{$ENDIF}
    procedure Assign(Source: TPersistent); override;
  published
    property DecimalSeparator: String read FDecimalSeparator write FDecimalSeparator;
    property FormatStr: String read FFormatStr write FFormatStr;
    property Kind: TfrxFormatKind read FKind write FKind default fkText;
  end;

{$IFDEF FR_COM}
  TfrxCustomMemoView = class(TfrxStretcheable, IfrxCustomMemoView)
{$ELSE}
  TfrxCustomMemoView = class(TfrxStretcheable)
{$ENDIF}
  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);
    function AdjustCalcHeight: Extended;
    function AdjustCalcWidth: Extended;
    function GetText: WideString;
    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;

⌨️ 快捷键说明

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