📄 sourceeditunit.hpp
字号:
public:
virtual bool __fastcall EqualEndingsWith(TSyntaxRange* Range);
public:
#pragma option push -w-inl
/* TSyntaxRange.Destroy */ inline __fastcall virtual ~TNormalTextRange(void) { }
#pragma option pop
public:
#pragma option push -w-inl
/* TMCRange.Create */ inline __fastcall virtual TNormalTextRange(Objlist::TFastObjectContainer* Collection) : TSyntaxRange(Collection) { }
#pragma option pop
};
class DELPHICLASS TCustomStyleRange;
class PASCALIMPLEMENTATION TCustomStyleRange : public TSyntaxRange
{
typedef TSyntaxRange inherited;
private:
TCustomStyle* FStyle;
protected:
virtual Graphics::TFont* __fastcall GetFont(void);
public:
virtual bool __fastcall EqualEndingsWith(TSyntaxRange* Range);
__published:
__property TCustomStyle* Style = {read=FStyle, write=FStyle};
public:
#pragma option push -w-inl
/* TSyntaxRange.Destroy */ inline __fastcall virtual ~TCustomStyleRange(void) { }
#pragma option pop
public:
#pragma option push -w-inl
/* TMCRange.Create */ inline __fastcall virtual TCustomStyleRange(Objlist::TFastObjectContainer* Collection) : TSyntaxRange(Collection) { }
#pragma option pop
};
class DELPHICLASS TCustomTextRange;
class PASCALIMPLEMENTATION TCustomTextRange : public TSyntaxRange
{
typedef TSyntaxRange inherited;
protected:
virtual Graphics::TFont* __fastcall GetFont(void);
public:
virtual bool __fastcall EqualEndingsWith(TSyntaxRange* Range);
public:
#pragma option push -w-inl
/* TSyntaxRange.Destroy */ inline __fastcall virtual ~TCustomTextRange(void) { }
#pragma option pop
public:
#pragma option push -w-inl
/* TMCRange.Create */ inline __fastcall virtual TCustomTextRange(Objlist::TFastObjectContainer* Collection) : TSyntaxRange(Collection) { }
#pragma option pop
};
class DELPHICLASS TWordListRange;
class PASCALIMPLEMENTATION TWordListRange : public TSyntaxRange
{
typedef TSyntaxRange inherited;
private:
TWordList* FWordList;
protected:
virtual Graphics::TFont* __fastcall GetFont(void);
public:
virtual bool __fastcall EqualEndingsWith(TSyntaxRange* Range);
__published:
__property TWordList* WordList = {read=FWordList, write=FWordList};
public:
#pragma option push -w-inl
/* TSyntaxRange.Destroy */ inline __fastcall virtual ~TWordListRange(void) { }
#pragma option pop
public:
#pragma option push -w-inl
/* TMCRange.Create */ inline __fastcall virtual TWordListRange(Objlist::TFastObjectContainer* Collection) : TSyntaxRange(Collection) { }
#pragma option pop
};
class DELPHICLASS TSymbolRange;
class PASCALIMPLEMENTATION TSymbolRange : public TSyntaxRange
{
typedef TSyntaxRange inherited;
private:
AnsiString FSymbol;
protected:
virtual Graphics::TFont* __fastcall GetFont(void);
public:
virtual bool __fastcall EqualEndingsWith(TSyntaxRange* Range);
__published:
__property AnsiString Symbol = {read=FSymbol, write=FSymbol};
public:
#pragma option push -w-inl
/* TSyntaxRange.Destroy */ inline __fastcall virtual ~TSymbolRange(void) { }
#pragma option pop
public:
#pragma option push -w-inl
/* TMCRange.Create */ inline __fastcall virtual TSymbolRange(Objlist::TFastObjectContainer* Collection) : TSyntaxRange(Collection) { }
#pragma option pop
};
class DELPHICLASS TNumberRange;
class PASCALIMPLEMENTATION TNumberRange : public TSyntaxRange
{
typedef TSyntaxRange inherited;
private:
AnsiString FNumber;
protected:
virtual Graphics::TFont* __fastcall GetFont(void);
public:
virtual bool __fastcall EqualEndingsWith(TSyntaxRange* Range);
__published:
__property AnsiString Number = {read=FNumber, write=FNumber};
public:
#pragma option push -w-inl
/* TSyntaxRange.Destroy */ inline __fastcall virtual ~TNumberRange(void) { }
#pragma option pop
public:
#pragma option push -w-inl
/* TMCRange.Create */ inline __fastcall virtual TNumberRange(Objlist::TFastObjectContainer* Collection) : TSyntaxRange(Collection) { }
#pragma option pop
};
class DELPHICLASS TParenthesisRange;
class PASCALIMPLEMENTATION TParenthesisRange : public TSyntaxRange
{
typedef TSyntaxRange inherited;
private:
TParenthesisStyle FStyle;
protected:
virtual void __fastcall SetNewParenthesisLevel(void);
virtual int __fastcall GetNextParenthesisLevel(void);
virtual Graphics::TFont* __fastcall GetFont(void);
public:
virtual bool __fastcall EqualEndingsWith(TSyntaxRange* Range);
virtual void __fastcall UpdateParenthesisLevel(void);
__published:
__property TParenthesisStyle Style = {read=FStyle, write=FStyle, nodefault};
public:
#pragma option push -w-inl
/* TSyntaxRange.Destroy */ inline __fastcall virtual ~TParenthesisRange(void) { }
#pragma option pop
public:
#pragma option push -w-inl
/* TMCRange.Create */ inline __fastcall virtual TParenthesisRange(Objlist::TFastObjectContainer* Collection) : TSyntaxRange(Collection) { }
#pragma option pop
};
class PASCALIMPLEMENTATION TWordList : public Classes::TCollectionItem
{
typedef Classes::TCollectionItem inherited;
private:
bool FCustomStyle;
bool FCustomColor;
Graphics::TColor FColor;
Graphics::TFontStyles FStyle;
Classes::TStringList* FWords;
AnsiString FDisplayName;
bool FCaseSensitive;
void __fastcall SetColor(const Graphics::TColor Value);
void __fastcall SetCustomColor(const bool Value);
void __fastcall SetCustomStyle(const bool Value);
void __fastcall SetStyle(const Graphics::TFontStyles Value);
void __fastcall SetWords(const Classes::TStringList* Value);
void __fastcall SetCaseSensitive(const bool Value);
protected:
Graphics::TFont* Font;
virtual AnsiString __fastcall GetDisplayName();
virtual void __fastcall SetDisplayName(const AnsiString Value);
virtual void __fastcall ListChange(void);
void __fastcall ChangeNotification(System::TObject* Sender);
public:
__fastcall virtual TWordList(Classes::TCollection* Collection);
__fastcall virtual ~TWordList(void);
virtual void __fastcall Assign(Classes::TPersistent* Source);
bool __fastcall WordInList(AnsiString S);
__published:
__property AnsiString Caption = {read=FDisplayName, write=SetDisplayName};
__property bool CustomColor = {read=FCustomColor, write=SetCustomColor, nodefault};
__property Graphics::TColor Color = {read=FColor, write=SetColor, nodefault};
__property bool CustomStyle = {read=FCustomStyle, write=SetCustomStyle, nodefault};
__property Graphics::TFontStyles Style = {read=FStyle, write=SetStyle, nodefault};
__property bool CaseSensitive = {read=FCaseSensitive, write=SetCaseSensitive, nodefault};
__property Classes::TStringList* Words = {read=FWords, write=SetWords};
};
class PASCALIMPLEMENTATION TCustomStyle : public Classes::TCollectionItem
{
typedef Classes::TCollectionItem inherited;
private:
bool FCaseSensitive;
bool FCustomStyle;
bool FCustomColor;
AnsiString FEndText;
AnsiString FBeginText;
Graphics::TColor FColor;
Graphics::TFontStyles FStyle;
TIgnoreChar FIgnoreChar;
AnsiString FDisplayName;
bool FSwitchable;
bool FLineStartOnly;
void __fastcall SetBeginText(AnsiString Value);
void __fastcall SetColor(const Graphics::TColor Value);
void __fastcall SetCustomColor(const bool Value);
void __fastcall SetCustomStyle(const bool Value);
void __fastcall SetEndText(AnsiString Value);
void __fastcall SetIgnoreChar(const TIgnoreChar &Value);
void __fastcall SetStyle(const Graphics::TFontStyles Value);
void __fastcall SetSwitchable(const bool Value);
void __fastcall SetLineStartOnly(const bool Value);
protected:
Graphics::TFont* Font;
virtual AnsiString __fastcall GetDisplayName();
virtual void __fastcall SetDisplayName(const AnsiString Value);
virtual void __fastcall StyleChange(void);
public:
__fastcall virtual TCustomStyle(Classes::TCollection* Collection);
__fastcall virtual ~TCustomStyle(void);
virtual void __fastcall Assign(Classes::TPersistent* Source);
__published:
__property AnsiString Caption = {read=FDisplayName, write=SetDisplayName};
__property bool CustomColor = {read=FCustomColor, write=SetCustomColor, nodefault};
__property Graphics::TColor Color = {read=FColor, write=SetColor, nodefault};
__property bool CustomStyle = {read=FCustomStyle, write=SetCustomStyle, nodefault};
__property Graphics::TFontStyles Style = {read=FStyle, write=SetStyle, nodefault};
__property AnsiString BeginText = {read=FBeginText, write=SetBeginText};
__property AnsiString EndText = {read=FEndText, write=SetEndText};
__property TIgnoreChar IgnoreChar = {read=FIgnoreChar, write=SetIgnoreChar};
__property bool Switchable = {read=FSwitchable, write=SetSwitchable, nodefault};
__property bool LineStartOnly = {read=FLineStartOnly, write=SetLineStartOnly, nodefault};
__property bool CaseSensitive = {read=FCaseSensitive, write=FCaseSensitive, nodefault};
};
class DELPHICLASS TSyntaxColoringCopy;
class PASCALIMPLEMENTATION TSyntaxColoringCopy : public Classes::TComponent
{
typedef Classes::TComponent inherited;
private:
Graphics::TColor FNumberColor;
Graphics::TColor FSymbolColor;
TCustomStyles* FCustomStyles;
TWordLists* FWordLists;
bool FEnabled;
Classes::TStringList* FParenthesisColors;
bool FSymbolCustomStyle;
bool FNumberCustomStyle;
Graphics::TFontStyles FNumberStyle;
Graphics::TFontStyles FSymbolStyle;
bool FParenthesisCustomStyle;
Graphics::TFontStyles FParenthesisStyle;
void __fastcall SetCustomStyles(const TCustomStyles* Value);
void __fastcall SetParenthesisColors(const Classes::TStringList* Value);
void __fastcall SetWordLists(const TWordLists* Value);
public:
virtual void __fastcall Assign(Classes::TPersistent* Source);
__published:
__fastcall virtual TSyntaxColoringCopy(Classes::TComponent* AOwner);
__fastcall virtual ~TSyntaxColoringCopy(void);
__property bool Enabled = {read=FEnabled, write=FEnabled, nodefault};
__property Graphics::TColor SymbolColor = {read=FSymbolColor, write=FSymbolColor, nodefault};
__property Graphics::TFontStyles SymbolStyle = {read=FSymbolStyle, write=FSymbolStyle, nodefault};
__property bool SymbolCustomStyle = {read=FSymbolCustomStyle, write=FSymbolCustomStyle, nodefault};
__property Graphics::TColor NumberColor = {read=FNumberColor, write=FNumberColor, nodefault};
__property Graphics::TFontStyles NumberStyle = {read=FNumberStyle, write=FNumberStyle, nodefault};
__property bool NumberCustomStyle = {read=FNumberCustomStyle, write=FNumberCustomStyle, nodefault};
__property TWordLists* WordLists = {read=FWordLists, write=SetWordLists};
__property TCustomStyles* CustomStyles = {read=FCustomStyles, write=SetCustomStyles};
__property Classes::TStringList* ParenthesisColors = {read=FParenthesisColors, write=SetParenthesisColors};
__property Graphics::TFontStyles ParenthesisStyle = {read=FParenthesisStyle, write=FParenthesisStyle, nodefault};
__property bool ParenthesisCustomStyle = {read=FParenthesisCustomStyle, write=FParenthesisCustomStyle, nodefault};
};
#pragma option push -b-
enum TSectionType { stText, stSymbol, stParenthesis, stCustomStyle };
#pragma option pop
//-- var, const, procedure ---------------------------------------------------
extern PACKAGE System::Set<char, 0, 255> SymbolChars;
static const Shortint MaxBeginEndTextLength = 0x14;
static const Byte MaxOnFlySectionLength = 0x80;
#define SSourceEditError "TSourceEdit internal error"
extern PACKAGE bool __fastcall CharIsWordable(char Ch);
extern PACKAGE bool __fastcall CharIsIdentifier(char Ch);
extern PACKAGE bool __fastcall CharIsExtNumber(char Ch);
extern PACKAGE bool __fastcall CharIsNumber(char Ch);
extern PACKAGE bool __fastcall CharIsSymbol(char Ch);
extern PACKAGE bool __fastcall CharIsParenthesis(char Ch);
extern PACKAGE void __fastcall Register(void);
} /* namespace Sourceeditunit */
using namespace Sourceeditunit;
#pragma option pop // -w-
#pragma option pop // -Vx
#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif // SourceEditUnit
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -