📄 frxrichedit.hpp
字号:
// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved
// (DO NOT EDIT: machine generated header) 'Frxrichedit.pas' rev: 10.00
#ifndef FrxricheditHPP
#define FrxricheditHPP
#pragma delphiheader begin
#pragma option push
#pragma option -w- // All warnings off
#pragma option -Vx // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp> // Pascal unit
#include <Sysinit.hpp> // Pascal unit
#include <Windows.hpp> // Pascal unit
#include <Activex.hpp> // Pascal unit
#include <Comobj.hpp> // Pascal unit
#include <Commctrl.hpp> // Pascal unit
#include <Messages.hpp> // Pascal unit
#include <Sysutils.hpp> // Pascal unit
#include <Classes.hpp> // Pascal unit
#include <Controls.hpp> // Pascal unit
#include <Forms.hpp> // Pascal unit
#include <Graphics.hpp> // Pascal unit
#include <Stdctrls.hpp> // Pascal unit
#include <Dialogs.hpp> // Pascal unit
#include <Richedit.hpp> // Pascal unit
#include <Menus.hpp> // Pascal unit
#include <Comctrls.hpp> // Pascal unit
//-- user supplied -----------------------------------------------------------
namespace Frxrichedit
{
//-- type declarations -------------------------------------------------------
typedef Shortint TRichEditVersion;
struct TCharFormat2A
{
public:
unsigned cbSize;
unsigned dwMask;
unsigned dwEffects;
int yHeight;
int yOffset;
unsigned crTextColor;
Byte bCharSet;
Byte bPitchAndFamily;
char szFaceName[32];
Word wWeight;
short sSpacing;
unsigned crBackColor;
unsigned lid;
unsigned dwReserved;
short sStyle;
Word wKerning;
Byte bUnderlineType;
Byte bAnimation;
Byte bRevAuthor;
Byte bReserved1;
} ;
typedef TCharFormat2A TCharFormat2;
struct TParaFormat2
{
public:
unsigned cbSize;
unsigned dwMask;
Word wNumbering;
Word wReserved;
int dxStartIndent;
int dxRightIndent;
int dxOffset;
Word wAlignment;
short cTabCount;
int rgxTabs[32];
int dySpaceBefore;
int dySpaceAfter;
int dyLineSpacing;
short sStyle;
Byte bLineSpacingRule;
Byte bCRC;
Word wShadingWeight;
Word wShadingStyle;
Word wNumberingStart;
Word wNumberingStyle;
Word wNumberingTab;
Word wBorderSpace;
Word wBorderWidth;
Word wBorders;
} ;
#pragma option push -b-
enum TRxAttributeType { atDefaultText, atSelected, atWord };
#pragma option pop
#pragma option push -b-
enum TRxConsistentAttribute { caBold, caColor, caFace, caItalic, caSize, caStrikeOut, caUnderline, caProtected, caOffset, caHidden, caLink, caBackColor, caDisabled, caWeight, caSubscript, caRevAuthor };
#pragma option pop
typedef Set<TRxConsistentAttribute, caBold, caRevAuthor> TRxConsistentAttributes;
#pragma option push -b-
enum TSubscriptStyle { ssNone, ssSubscript, ssSuperscript };
#pragma option pop
#pragma option push -b-
enum TUnderlineType { utNone, utSolid, utWord, utDouble, utDotted, utWave };
#pragma option pop
class DELPHICLASS TRxTextAttributes;
class DELPHICLASS TRxCustomRichEdit;
class DELPHICLASS TRxParaAttributes;
#pragma option push -b-
enum TParaAlignment { paLeftJustify, paRightJustify, paCenter, paJustify };
#pragma option pop
typedef Shortint THeadingStyle;
#pragma option push -b-
enum TLineSpacingRule { lsSingle, lsOneAndHalf, lsDouble, lsSpecifiedOrMore, lsSpecified, lsMultiple };
#pragma option pop
#pragma option push -b-
enum TRxNumbering { nsNone, nsBullet, nsArabicNumbers, nsLoCaseLetter, nsUpCaseLetter, nsLoCaseRoman, nsUpCaseRoman };
#pragma option pop
#pragma option push -b-
enum TRxNumberingStyle { nsParenthesis, nsPeriod, nsEnclosed, nsSimple };
#pragma option pop
#pragma option push -b-
enum TParaTableStyle { tsNone, tsTableRow, tsTableCellEnd, tsTableCell };
#pragma option pop
class PASCALIMPLEMENTATION TRxParaAttributes : public Classes::TPersistent
{
typedef Classes::TPersistent inherited;
private:
TRxCustomRichEdit* RichEdit;
void __fastcall GetAttributes(TParaFormat2 &Paragraph);
TParaAlignment __fastcall GetAlignment(void);
int __fastcall GetFirstIndent(void);
THeadingStyle __fastcall GetHeadingStyle(void);
int __fastcall GetLeftIndent(void);
int __fastcall GetRightIndent(void);
int __fastcall GetSpaceAfter(void);
int __fastcall GetSpaceBefore(void);
int __fastcall GetLineSpacing(void);
TLineSpacingRule __fastcall GetLineSpacingRule(void);
TRxNumbering __fastcall GetNumbering(void);
TRxNumberingStyle __fastcall GetNumberingStyle(void);
Word __fastcall GetNumberingTab(void);
int __fastcall GetTab(Byte Index);
int __fastcall GetTabCount(void);
TParaTableStyle __fastcall GetTableStyle(void);
void __fastcall SetAlignment(TParaAlignment Value);
void __fastcall SetAttributes(TParaFormat2 &Paragraph);
void __fastcall SetFirstIndent(int Value);
void __fastcall SetHeadingStyle(THeadingStyle Value);
void __fastcall SetLeftIndent(int Value);
void __fastcall SetRightIndent(int Value);
void __fastcall SetSpaceAfter(int Value);
void __fastcall SetSpaceBefore(int Value);
void __fastcall SetLineSpacing(int Value);
void __fastcall SetLineSpacingRule(TLineSpacingRule Value);
void __fastcall SetNumbering(TRxNumbering Value);
void __fastcall SetNumberingStyle(TRxNumberingStyle Value);
void __fastcall SetNumberingTab(Word Value);
void __fastcall SetTab(Byte Index, int Value);
void __fastcall SetTabCount(int Value);
void __fastcall SetTableStyle(TParaTableStyle Value);
protected:
void __fastcall InitPara(TParaFormat2 &Paragraph);
virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
public:
__fastcall TRxParaAttributes(TRxCustomRichEdit* AOwner);
virtual void __fastcall Assign(Classes::TPersistent* Source);
__property TParaAlignment Alignment = {read=GetAlignment, write=SetAlignment, nodefault};
__property int FirstIndent = {read=GetFirstIndent, write=SetFirstIndent, nodefault};
__property THeadingStyle HeadingStyle = {read=GetHeadingStyle, write=SetHeadingStyle, nodefault};
__property int LeftIndent = {read=GetLeftIndent, write=SetLeftIndent, nodefault};
__property int LineSpacing = {read=GetLineSpacing, write=SetLineSpacing, nodefault};
__property TLineSpacingRule LineSpacingRule = {read=GetLineSpacingRule, write=SetLineSpacingRule, nodefault};
__property TRxNumbering Numbering = {read=GetNumbering, write=SetNumbering, nodefault};
__property TRxNumberingStyle NumberingStyle = {read=GetNumberingStyle, write=SetNumberingStyle, nodefault};
__property Word NumberingTab = {read=GetNumberingTab, write=SetNumberingTab, nodefault};
__property int RightIndent = {read=GetRightIndent, write=SetRightIndent, nodefault};
__property int SpaceAfter = {read=GetSpaceAfter, write=SetSpaceAfter, nodefault};
__property int SpaceBefore = {read=GetSpaceBefore, write=SetSpaceBefore, nodefault};
__property int Tab[Byte Index] = {read=GetTab, write=SetTab};
__property int TabCount = {read=GetTabCount, write=SetTabCount, nodefault};
__property TParaTableStyle TableStyle = {read=GetTableStyle, write=SetTableStyle, nodefault};
public:
#pragma option push -w-inl
/* TPersistent.Destroy */ inline __fastcall virtual ~TRxParaAttributes(void) { }
#pragma option pop
};
#pragma option push -b-
enum TRichLangOption { rlAutoKeyboard, rlAutoFont, rlImeCancelComplete, rlImeAlwaysSendNotify };
#pragma option pop
typedef Set<TRichLangOption, rlAutoKeyboard, rlImeAlwaysSendNotify> TRichLangOptions;
typedef void __fastcall (__closure *TRichEditProtectChangeEx)(System::TObject* Sender, const Messages::TMessage &Message, int StartPos, int EndPos, bool &AllowChange);
typedef void __fastcall (__closure *TRichEditURLClickEvent)(System::TObject* Sender, const AnsiString URLText, Controls::TMouseButton Button);
typedef void __fastcall (__closure *TRichEditFindErrorEvent)(System::TObject* Sender, const AnsiString FindText);
typedef void __fastcall (__closure *TRichEditFindCloseEvent)(System::TObject* Sender, Dialogs::TFindDialog* Dialog);
#pragma option push -b-
enum TUndoName { unUnknown, unTyping, unDelete, unDragDrop, unCut, unPaste };
#pragma option pop
#pragma option push -b-
enum TRichStreamFormat { sfDefault, sfRichText, sfPlainText };
#pragma option pop
#pragma option push -b-
enum TRichStreamMode { smSelection, smPlainRtf, smNoObjects, smUnicode };
#pragma option pop
typedef Set<TRichStreamMode, smSelection, smUnicode> TRichStreamModes;
#pragma option push -b-
enum TRichSelection { stText, stObject, stMultiChar, stMultiObject };
#pragma option pop
typedef Set<TRichSelection, stText, stMultiObject> TRichSelectionType;
#pragma option push -b-
enum TRichSearchType { stWholeWord, stMatchCase, stBackward, stSetSelection };
#pragma option pop
typedef Set<TRichSearchType, stWholeWord, stSetSelection> TRichSearchTypes;
class PASCALIMPLEMENTATION TRxCustomRichEdit : public Stdctrls::TCustomMemo
{
typedef Stdctrls::TCustomMemo inherited;
private:
bool FHideScrollBars;
bool FSelectionBar;
bool FAutoURLDetect;
bool FWordSelection;
bool FPlainText;
TRxTextAttributes* FSelAttributes;
TRxTextAttributes* FDefAttributes;
TRxTextAttributes* FWordAttributes;
TRxParaAttributes* FParagraph;
TParaAlignment FOldParaAlignment;
int FScreenLogPixels;
int FUndoLimit;
Classes::TStrings* FRichEditStrings;
Classes::TMemoryStream* FMemStream;
bool FHideSelection;
TRichLangOptions FLangOptions;
bool FModified;
bool FLinesUpdating;
#pragma pack(push,1)
Types::TRect FPageRect;
#pragma pack(pop)
_charrange FClickRange;
Controls::TMouseButton FClickBtn;
Dialogs::TFindDialog* FFindDialog;
Dialogs::TReplaceDialog* FReplaceDialog;
Dialogs::TFindDialog* FLastFind;
bool FAllowObjects;
System::TObject* FCallback;
System::_di_IInterface FRichEditOle;
Menus::TPopupMenu* FPopupVerbMenu;
AnsiString FTitle;
bool FAutoVerbMenu;
bool FAllowInPlace;
TMetaClass* FDefaultConverter;
Classes::TNotifyEvent FOnSelChange;
Comctrls::TRichEditResizeEvent FOnResizeRequest;
Comctrls::TRichEditProtectChange FOnProtectChange;
TRichEditProtectChangeEx FOnProtectChangeEx;
Comctrls::TRichEditSaveClipboard FOnSaveClipboard;
TRichEditURLClickEvent FOnURLClick;
TRichEditFindErrorEvent FOnTextNotFound;
TRichEditFindCloseEvent FOnCloseFindDialog;
bool __fastcall GetAutoURLDetect(void);
bool __fastcall GetWordSelection(void);
TRichLangOptions __fastcall GetLangOptions(void);
bool __fastcall GetCanRedo(void);
bool __fastcall GetCanPaste(void);
TUndoName __fastcall GetRedoName(void);
TUndoName __fastcall GetUndoName(void);
TRichStreamFormat __fastcall GetStreamFormat(void);
TRichStreamModes __fastcall GetStreamMode(void);
TRichSelectionType __fastcall GetSelectionType(void);
void __fastcall PopupVerbClick(System::TObject* Sender);
void __fastcall ObjectPropsClick(System::TObject* Sender);
void __fastcall CloseObjects(void);
void __fastcall UpdateHostNames(void);
void __fastcall SetAllowObjects(bool Value);
void __fastcall SetStreamFormat(TRichStreamFormat Value);
void __fastcall SetStreamMode(TRichStreamModes Value);
void __fastcall SetAutoURLDetect(bool Value);
void __fastcall SetWordSelection(bool Value);
void __fastcall SetHideScrollBars(bool Value);
HIDESBASE void __fastcall SetHideSelection(bool Value);
void __fastcall SetTitle(const AnsiString Value);
void __fastcall SetLangOptions(TRichLangOptions Value);
void __fastcall SetRichEditStrings(Classes::TStrings* Value);
void __fastcall SetDefAttributes(TRxTextAttributes* Value);
void __fastcall SetSelAttributes(TRxTextAttributes* Value);
void __fastcall SetWordAttributes(TRxTextAttributes* Value);
void __fastcall SetSelectionBar(bool Value);
void __fastcall SetUndoLimit(int Value);
void __fastcall UpdateTextModes(bool Plain);
void __fastcall AdjustFindDialogPosition(Dialogs::TFindDialog* Dialog);
void __fastcall SetupFindDialog(Dialogs::TFindDialog* Dialog, const AnsiString SearchStr, const AnsiString ReplaceStr);
bool __fastcall FindEditText(Dialogs::TFindDialog* Dialog, bool AdjustPos, bool Events);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -