📄 rvrtf.pas
字号:
{$ELSE}
FTextW: String;
{$ENDIF}
FFollow: TRVRTFLevelFollow97;
FLeftIndentTw, FFirstIndentTw, FTabPosTw: Integer;
public
procedure Reset; override;
procedure Assign(Source: TRVRTFListLevel97);
property OldStyle: Boolean read FOldStyle;
property Legal: Boolean read FLegal;
property NoRestart: Boolean read FNoRestart;
property Text: String read FText;
property TextW: {$IFDEF RICHVIEWCBDEF3}WideString{$ELSE}String{$ENDIF} read FTextW;
property Numbers: String read FNumbers;
property Follow: TRVRTFLevelFollow97 read FFollow;
property LeftIndentTw: Integer read FLeftIndentTw;
property FirstIndentTw: Integer read FFirstIndentTw;
property TabPosTw: Integer read FTabPosTw;
end;
TRVRTFList97 = class (TRVList)
private
FId, FTemplateId: Integer;
FSimple: Boolean;
FName: String;
function Get(Index: Integer): TRVRTFListLevel97;
procedure Put(Index: Integer; const Value: TRVRTFListLevel97);
protected
function GetLastLevel: TRVRTFListLevel97;
procedure AddNew;
public
property Items[Index: Integer]: TRVRTFListLevel97 read Get write Put; default;
property Id: Integer read FId;
property TemplateId: Integer read FTemplateId;
property Simple: Boolean read FSimple;
property Name: String read FName;
end;
TRVRTFListTable97 = class (TRVList)
private
function Get(Index: Integer): TRVRTFList97;
procedure Put(Index: Integer; const Value: TRVRTFList97);
protected
function GetLastList: TRVRTFList97;
function FindList(ID: Integer): Integer;
procedure AddNew;
public
property Items[Index: Integer]: TRVRTFList97 read Get write Put; default;
end;
TRVRTFListOverrideLevel97 = class
private
FUseStart: Boolean;
FStart: Integer;
public
constructor Create;
property Start: Integer read FStart;
property UseStart: Boolean read FUseStart;
end;
TRVRTFListOverride97 = class (TRVList)
private
FListIndex, FNumber, FOverrideCount: Integer;
function Get(Index: Integer): TRVRTFListOverrideLevel97;
procedure Put(Index: Integer; const Value: TRVRTFListOverrideLevel97);
public
function GetLastLevel: TRVRTFListOverrideLevel97;
procedure AddNew;
property ListIndex: Integer read FListIndex;
property Number: Integer read FNumber;
property OverrideCount: Integer read FOverrideCount;
property Items[Index: Integer]: TRVRTFListOverrideLevel97 read Get write Put; default;
end;
TRVRTFListOverrideTable97 = class (TRVList)
private
function Get(Index: Integer): TRVRTFListOverride97;
procedure Put(Index: Integer; const Value: TRVRTFListOverride97);
protected
function GetLastListOverride: TRVRTFListOverride97;
function FindListOverride(Number: Integer): Integer;
procedure AddNew;
public
property Items[Index: Integer]: TRVRTFListOverride97 read Get write Put; default;
end;
TRVRTFParaProperties = class
private
FLeftIndentTw, FRightIndentTw, FFirstIndentTw: Integer;
FSpaceBeforeTw, FSpaceAfterTw: Integer;
FAlignment: TRVRTFAlignment;
FBorder: TRVRTFParaBorder;
FMarkerProps: TRVRTFMarkerProperties;
FCurBorderSide: TRVRTFSide;
FLineSpacing: Integer;
FLineSpacingMulti: Boolean;
FColor: TColor;
FNestingLevel: Integer;
FInTable: Boolean;
FListOverrideIndex, FListLevel: Integer;
NoTableEv, NoResetLev: Boolean;
function GetBorder: TRVRTFParaBorder;
function GetMarkerProps: TRVRTFMarkerProperties;
public
constructor Create;
destructor Destroy; override;
procedure Reset;
procedure Assign(Source: TRVRTFParaProperties);
function HasBorder: Boolean;
function HasMarker: Boolean;
property LeftIndentTw : Integer read FLeftIndentTw;
property RightIndentTw: Integer read FRightIndentTw;
property FirstIndentTw: Integer read FFirstIndentTw;
property SpaceBeforeTw: Integer read FSpaceBeforeTw;
property SpaceAfterTw : Integer read FSpaceAfterTw;
property Alignment : TRVRTFAlignment read FAlignment;
property Border : TRVRTFParaBorder read GetBorder;
property MarkerProps : TRVRTFMarkerProperties read GetMarkerProps;
property Color : TColor read FColor;
property LineSpacing : Integer read FLineSpacing;
property LineSpacingMulti: Boolean read FLineSpacingMulti;
property NestingLevel : Integer read FNestingLevel;
property InTable : Boolean read FInTable;
property ListOverrideIndex: Integer read FListOverrideIndex;
property ListLevel : Integer read FListLevel;
end;
{-------------------- table cell properties --------------------}
TRVRTFCellMerge = (rtf_cm_None, rtf_cm_First, rtf_cm_Merged);
TRVRTFCellProperties = class
private
FHMerge, FVMerge: TRVRTFCellMerge;
InvertWidth: Boolean;
FBestWidth: Integer;
FColor: TColor;
FVAlign: TRVRTFVAlign;
FBorder: TRVRTFParaBorder;
FCurBorderSide: TRVRTFSide;
FRightBoundaryTw: Integer;
ForeColor: TColor;
Shading: Integer;
procedure Finalize;
public
{$IFDEF RICHVIEW}
BestHeight: Integer;
{$ENDIF}
constructor Create;
destructor Destroy; override;
procedure Reset;
procedure Assign(Source: TRVRTFCellProperties);
property HMerge : TRVRTFCellMerge read FHMerge;
property VMerge : TRVRTFCellMerge read FVMerge;
property BestWidth : Integer read FBestWidth; // positive: twips; negative: 50th of %; 0: undefined
property Color : TColor read FColor;
property VAlign : TRVRTFVAlign read FVAlign;
property Border : TRVRTFParaBorder read FBorder;
property RightBoundaryTw: Integer read FRightBoundaryTw;
end;
TRVRTFCellPropsList = class (TRVList)
private
function Get(Index: Integer): TRVRTFCellProperties;
procedure Put(Index: Integer; const Value: TRVRTFCellProperties);
public
procedure AddNew;
procedure AssignItems(Source: TRVRTFCellPropsList);
property Items[Index: Integer]: TRVRTFCellProperties read Get write Put; default;
end;
{-------------------- table row properties ---------------------}
TRVRTFRowProperties = class
private
InvertWidth, FHeading: Boolean;
FGapHTw, FLeftTw, FHeightTw: Integer;
FPaddingTw, FSpacingTw: array[TRVRTFSide] of Integer;
FUsePadding, FUseSpacing: array[TRVRTFSide] of Boolean;
FBestWidth: Integer;
FAlignment: TRVRTFAlignment;
FBorder: TRVRTFParaBorder;
FCurBorderSide: TRVRTFSide;
FCellProps: TRVRTFCellPropsList;
NewCellProps, AssumedLastCell: Boolean;
function GetPaddingTw(Index: TRVRTFSide): Integer;
function GetSpacingTw(Index: TRVRTFSide): Integer;
function GetUsePadding(Index: TRVRTFSide): Boolean;
function GetUseSpacing(Index: TRVRTFSide): Boolean;
function GetLastCellProp: TRVRTFCellProperties;
procedure Finalize;
public
{$IFDEF RICHVIEW}
RichViewSpecial: Boolean;
{$ENDIF}
constructor Create;
destructor Destroy; override;
procedure Reset;
procedure Assign(Source: TRVRTFRowProperties);
property CellProps : TRVRTFCellPropsList read FCellProps;
property GapHTw : Integer read FGapHTw;
property LeftTw : Integer read FLeftTw;
property Alignment : TRVRTFAlignment read FAlignment;
property HeightTw : Integer read FHeightTw;
property BestWidth : Integer read FBestWidth; // positive: twips; negative: 50-th of %; 0: undefined
property PaddingTw [Index:TRVRTFSide]: Integer read GetPaddingTw;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -