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

📄 advmemo.hpp

📁 一个非常棒的控件.做商业软件特别适用.里面的控件涉及面非常的广,有兴趣的话可以下来用用就知道了.
💻 HPP
📖 第 1 页 / 共 5 页
字号:
	void __fastcall SetGutterMargin(int Value);
	void __fastcall SetGutterColor(Graphics::TColor Value);
	Graphics::TColor __fastcall GetGutterColor(void);
	void __fastcall SetShowLeadingZeros(const bool Value);
	void __fastcall SetDigitCount(const int Value);
	void __fastcall SetFont(Graphics::TFont* Value);
	void __fastcall OnFontChange(System::TObject* Sender);
	void __fastcall SetGutterColorTo(const Graphics::TColor Value);
	Graphics::TColor __fastcall GetGutterColorTo(void);
	void __fastcall SetShowLineNumbers(const bool Value);
	void __fastcall SetLineNumberStart(const int Value);
	void __fastcall SetShowGutter(const bool Value);
	void __fastcall SetShowModified(const bool Value);
	void __fastcall SetNumberSuffix(const AnsiString Value);
	void __fastcall SetParams(int Index, int Value);
	void __fastcall SetModifiedColor(const Graphics::TColor Value);
	void __fastcall SetModifiedColorBkg(const Graphics::TColor Value);
	void __fastcall SetBorderColor(const Graphics::TColor Value);
	Types::TRect __fastcall GetRect();
	
protected:
	void __fastcall PaintTo(Graphics::TCanvas* ACanvas);
	void __fastcall Invalidate(void);
	
public:
	__fastcall TAdvGutter(TAdvCustomMemo* AOwner);
	__fastcall virtual ~TAdvGutter(void);
	__property int Left = {read=FLeft, write=SetParams, index=0, nodefault};
	__property int Top = {read=FTop, write=SetParams, index=1, nodefault};
	__property int Width = {read=FWidth, write=SetParams, index=2, default=45};
	__property int Height = {read=FHeight, write=SetParams, index=3, nodefault};
	__property Types::TRect FullRect = {read=GetRect};
	
__published:
	__property int DigitCount = {read=FDigitCount, write=SetDigitCount, nodefault};
	__property Graphics::TFont* Font = {read=FFont, write=SetFont};
	__property Graphics::TColor BorderColor = {read=FBorderColor, write=SetBorderColor, default=8421504};
	__property int GutterWidth = {read=FGutterWidth, write=SetGutterWidth, default=45};
	__property int GutterMargin = {read=FGutterMargin, write=SetGutterMargin, default=45};
	__property Graphics::TColor GutterColor = {read=GetGutterColor, write=SetGutterColor, default=-16777201};
	__property Graphics::TColor GutterColorTo = {read=GetGutterColorTo, write=SetGutterColorTo, default=16777215};
	__property int LineNumberStart = {read=FLineNumberStart, write=SetLineNumberStart, default=1};
	__property Graphics::TColor LineNumberTextColor = {read=FLineNumberTextColor, write=SetLineNumberTextColor, default=0};
	__property Graphics::TColor ModifiedColorBkg = {read=FModifiedColorBkg, write=SetModifiedColorBkg, default=65280};
	__property Graphics::TColor ModifiedColor = {read=FModifiedColor, write=SetModifiedColor, default=65535};
	__property AnsiString NumberSuffix = {read=FNumberSuffix, write=SetNumberSuffix};
	__property bool ShowLineNumbers = {read=FShowLineNumbers, write=SetShowLineNumbers, default=1};
	__property bool ShowModified = {read=FShowModified, write=SetShowModified, default=0};
	__property bool Visible = {read=FShowGutter, write=SetShowGutter, default=1};
	__property bool ShowLeadingZeros = {read=FShowLeadingZeros, write=SetShowLeadingZeros, default=0};
};


#pragma option push -b-
enum TScrollMode { smAuto, smStrict };
#pragma option pop

class DELPHICLASS TAdvUndoList;
class DELPHICLASS TUndo;
class PASCALIMPLEMENTATION TAdvUndoList : public Classes::TList 
{
	typedef Classes::TList inherited;
	
public:
	TUndo* operator[](int Index) { return Items[Index]; }
	
private:
	int FPos;
	TAdvCustomMemo* FMemo;
	bool FIsPerforming;
	int FLimit;
	
protected:
	HIDESBASE TUndo* __fastcall Get(int Index);
	void __fastcall SetLimit(int Value);
	
public:
	__fastcall TAdvUndoList(void);
	__fastcall virtual ~TAdvUndoList(void);
	HIDESBASE int __fastcall Add(void * Item);
	virtual void __fastcall Clear(void);
	HIDESBASE void __fastcall Delete(int Index);
	void __fastcall Undo(void);
	void __fastcall Redo(void);
	__property TUndo* Items[int Index] = {read=Get/*, default*/};
	__property bool IsPerforming = {read=FIsPerforming, write=FIsPerforming, nodefault};
	__property TAdvCustomMemo* Memo = {read=FMemo, write=FMemo};
	__property int Pos = {read=FPos, write=FPos, nodefault};
	__property int Limit = {read=FLimit, write=SetLimit, nodefault};
};


class DELPHICLASS TAutoCompletion;
class PASCALIMPLEMENTATION TAutoCompletion : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	TAdvCustomMemo* FOwner;
	bool FShowImages;
	bool FActive;
	int FHeight;
	int FWidth;
	int FDelay;
	Graphics::TColor FColor;
	Graphics::TFont* FFont;
	Graphics::TColor FColorVar;
	Graphics::TColor FColorProp;
	Graphics::TColor FColorIdentifier;
	Graphics::TColor FColorFunc;
	Graphics::TColor FColorEvent;
	Graphics::TColor FColorProc;
	Graphics::TColor FColorMethod;
	bool FSizeDropDown;
	bool FAutoDisplay;
	void __fastcall SetColor(const Graphics::TColor Value);
	void __fastcall SetFont(const Graphics::TFont* Value);
	void __fastcall SetShowImages(const bool Value);
	void __fastcall SetDelay(const int Value);
	
public:
	__fastcall TAutoCompletion(TAdvCustomMemo* AOwner);
	__fastcall virtual ~TAutoCompletion(void);
	
__published:
	__property bool Active = {read=FActive, write=FActive, default=1};
	__property bool AutoDisplay = {read=FAutoDisplay, write=FAutoDisplay, default=1};
	__property Graphics::TColor Color = {read=FColor, write=SetColor, default=-16777211};
	__property int Delay = {read=FDelay, write=SetDelay, default=500};
	__property Graphics::TFont* Font = {read=FFont, write=SetFont};
	__property Graphics::TColor ColorVar = {read=FColorVar, write=FColorVar, default=16711680};
	__property Graphics::TColor ColorProp = {read=FColorProp, write=FColorProp, default=8421376};
	__property Graphics::TColor ColorMethod = {read=FColorMethod, write=FColorMethod, default=8388608};
	__property Graphics::TColor ColorFunc = {read=FColorFunc, write=FColorFunc, default=8388608};
	__property Graphics::TColor ColorProc = {read=FColorProc, write=FColorProc, default=8388608};
	__property Graphics::TColor ColorEvent = {read=FColorEvent, write=FColorEvent, default=255};
	__property Graphics::TColor ColorIdentifier = {read=FColorIdentifier, write=FColorIdentifier, default=8421376};
	__property int Height = {read=FHeight, write=FHeight, default=100};
	__property bool ShowImages = {read=FShowImages, write=SetShowImages, default=0};
	__property bool SizeDropDown = {read=FSizeDropDown, write=FSizeDropDown, default=1};
	__property int Width = {read=FWidth, write=FWidth, default=200};
};


typedef void __fastcall (__closure *TGutterDrawEvent)(System::TObject* Sender, Graphics::TCanvas* ACanvas, int LineNo, const Types::TRect &rct);

typedef void __fastcall (__closure *TGutterClickEvent)(System::TObject* Sender, int LineNo);

typedef void __fastcall (__closure *TUndoChangeEvent)(System::TObject* Sender, bool CanUndo, bool CanRedo);

typedef void __fastcall (__closure *TURLClick)(System::TObject* Sender, AnsiString URL);

typedef void __fastcall (__closure *TMemoActiveLineChangeEvent)(int CurYPos);

typedef void __fastcall (__closure *TMemoColumnChangeEvent)(int CurXPos);

typedef void __fastcall (__closure *TMemoMarkerAddedEvent)(int LnNo, AnsiString MarkerText);

typedef void __fastcall (__closure *TMemoMarkerRemovedEvent)(int LnNo);

typedef void __fastcall (__closure *TMemoHintEvent)(System::TObject* Sender, int X, int Y, AnsiString AValue, AnsiString &AHint, bool &Show);

typedef void __fastcall (__closure *TMemoWordEvent)(System::TObject* Sender, AnsiString CurrentWord, AnsiString &NewWord);

class DELPHICLASS TAutoCorrect;
class PASCALIMPLEMENTATION TAutoCorrect : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	Classes::TStringList* FOldValue;
	Classes::TStringList* FNewValue;
	bool FDoAutoCorrect;
	void __fastcall SetDoAutoCorrect(const bool Value);
	void __fastcall SetNewValue(const Classes::TStringList* Value);
	void __fastcall SetOldValue(const Classes::TStringList* Value);
	
public:
	__fastcall TAutoCorrect(void);
	__fastcall virtual ~TAutoCorrect(void);
	
__published:
	__property bool Active = {read=FDoAutoCorrect, write=SetDoAutoCorrect, nodefault};
	__property Classes::TStringList* OldValue = {read=FOldValue, write=SetOldValue};
	__property Classes::TStringList* NewValue = {read=FNewValue, write=SetNewValue};
};


typedef void __fastcall (__closure *TMemoBeforeCompleteEvent)(System::TObject* Sender, AnsiString AToken, bool &Show);

typedef void __fastcall (__closure *TMemoGetCompletionListEvent)(System::TObject* Sender, AnsiString AToken, Classes::TStringList* AList);

typedef void __fastcall (__closure *TMemoInsertCompletionEntryEvent)(System::TObject* Sender, AnsiString &AEntry);

typedef int __fastcall (__closure *TMemoSortCompletionListEvent)(System::TObject* Sender, Classes::TStringList* List, int Index1, int Index2);

typedef void __fastcall (__closure *TMemoGetParameterHintEvent)(System::TObject* Sender, AnsiString AToken, AnsiString &AParameterHint, bool &Handled);

class DELPHICLASS TAdvMemoSource;
struct TAdvMemoSavePos
{
	
public:
	int CurX;
	int CurY;
	int LeftCol;
	int TopLine;
	int SelStartX;
	int SelStartY;
	int SelEndX;
	int SelEndY;
} ;

class PASCALIMPLEMENTATION TAdvMemoSource : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
	
private:
	TAdvCustomMemoStyler* FSyntaxStyler;
	TAdvMemoStrings* FLines;
	TAdvUndoList* FUndoList;
	int FUndoLimit;
	TAdvCustomMemo* FMemo;
	bool FModified;
	bool FReadOnly;
	TAdvMemoSavePos FCaretInfo;
	TIntList* FBookmarkList;
	bool __fastcall GetReadOnly(void);
	void __fastcall SetReadOnly(const bool Value);
	
protected:
	void __fastcall SetSyntaxStyler(const TAdvCustomMemoStyler* Value);
	void __fastcall SetLines(const TAdvMemoStrings* Value);
	void __fastcall SetMemo(const TAdvCustomMemo* Value);
	bool __fastcall GetModified(void);
	void __fastcall SetModified(const bool Value);
	TAdvUndoList* __fastcall GetUndoList(void);
	void __fastcall SetUndoList(const TAdvUndoList* Value);
	virtual void __fastcall Loaded(void);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	
public:
	__fastcall virtual TAdvMemoSource(Classes::TComponent* AOwner);
	__fastcall virtual ~TAdvMemoSource(void);
	__property bool Modified = {read=GetModified, write=SetModified, nodefault};
	__property TAdvUndoList* UndoList = {read=GetUndoList, write=SetUndoList};
	
__published:
	__property TAdvCustomMemoStyler* SyntaxStyler = {read=FSyntaxStyler, write=SetSyntaxStyler};
	__property TAdvMemoStrings* Lines = {read=FLines, write=SetLines};
	__property bool ReadOnly = {read=GetReadOnly, write=SetReadOnly, nodefault};
};


#pragma option push -b-
enum TWordWrapStyle { wwNone, wwClientWidth, wwRightMargin };
#pragma option pop

class DELPHICLASS TAdvMemoChecker;
#pragma option push -b-
enum TAutoCorrectType { acNone, acLineCorrect, acLineCheck, acWordCorrect, acWordCheck };
#pragma option pop

class PASCALIMPLEMENTATION TAdvMemoChecker : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
	
private:
	TAdvCustomMemo* FMemo;
	TAutoCorrectType FAutoCorrectType;
	
protected:
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation AOperation);
	AnsiString __fastcall ReplaceOnce(const AnsiString S, const AnsiString OldPattern, const AnsiString NewPattern);
	
public:
	__property TAdvCustomMemo* Memo = {read=FMemo, write=FMemo};
	virtual void __fastcall CheckLine(int LineNo);
	virtual void __fastcall CheckWord(int LineNo, int LinePos, AnsiString s);
	virtual void __fastcall CorrectLine(int LineNo);
	virtual void __fastcall CorrectWord(int LineNo, int LinePos, AnsiString &s);
	virtual void __fastcall CheckAllLines(void);
	virtual void __fastcall CorrectAllLines(void);
	__property TAutoCorrectType AutoCorrectType = {read=FAutoCorrectType, write=FAutoCorrectType, default=0};
public:
	#pragma option push -w-inl
	/* TComponent.Create */ inline __fastcall virtual TAdvMemoChecker(Classes::TComponent* AOwner) : Classes::TComponent(AOwner) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TComponent.Destroy */ inline __fastcall virtual ~TAdvMemoChecker(void) { }
	#pragma option pop
	
};


#pragma option push -b-
enum TDrawMode { dmScreen, dmHTML, dmPrinter, dmPrintPreview, dmRTF };
#pragma option pop

class PASCALIMPLEMENTATION TAdvCustomMemo : public Controls::TCustomControl 
{
	typedef Controls::TCustomControl inherited;
	
private:
	Classes::TComponent* FOwner;
	AnsiString FVersion;

⌨️ 快捷键说明

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