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

📄 rm_jveditorcommon.hpp

📁 这是一个功能强大
💻 HPP
📖 第 1 页 / 共 4 页
字号:
	unsigned __fastcall GetInterval(void);
	void __fastcall SetInterval(unsigned AValue);
	Classes::TStrings* __fastcall GetItems(void);
	
protected:
	virtual bool __fastcall DoKeyDown(Word Key, Classes::TShiftState Shift);
	virtual void __fastcall DoKeyPress(char Key);
	virtual void __fastcall FindSelItem(bool &Eq) = 0 ;
	virtual void __fastcall MakeItems(void) = 0 ;
	virtual void __fastcall ReplaceWordItemIndex(int SubStrStart) = 0 ;
	virtual int __fastcall GetTemplateCount(void) = 0 ;
	virtual int __fastcall GetIdentifierCount(void) = 0 ;
	virtual AnsiString __fastcall GetAnsiSeparator(void) = 0 ;
	int __fastcall GetItemCount(void);
	__property TJvCustomEditorBase* JvEditor = {read=FJvEditor};
	__property Classes::TStrings* Items = {read=GetItems};
	
public:
	__fastcall TJvCompletionBase(TJvCustomEditorBase* AJvEditor);
	__fastcall virtual ~TJvCompletionBase(void);
	void __fastcall DropDown(const TCompletionList AMode, const bool ShowAlways);
	void __fastcall DoCompletion(const TCompletionList AMode);
	void __fastcall CloseUp(const bool Apply);
	void __fastcall SelectItem(void);
	__property int ItemIndex = {read=GetItemIndex, write=SetItemIndex, nodefault};
	__property bool Visible = {read=FVisible, write=FVisible, nodefault};
	__property TCompletionList Mode = {read=FMode, write=FMode, nodefault};
	
__published:
	__property int DropDownCount = {read=FDropDownCount, write=FDropDownCount, default=6};
	__property int DropDownWidth = {read=FDropDownWidth, write=FDropDownWidth, default=300};
	__property bool Enabled = {read=FEnabled, write=FEnabled, default=0};
	__property int ItemHeight = {read=FItemHeight, write=FItemHeight, nodefault};
	__property unsigned Interval = {read=GetInterval, write=SetInterval, nodefault};
	__property Stdctrls::TListBoxStyle ListBoxStyle = {read=FListBoxStyle, write=FListBoxStyle, nodefault};
};


class DELPHICLASS TJvGutter;
class PASCALIMPLEMENTATION TJvGutter : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	TJvCustomEditorBase* FJvEditor;
	
public:
	void __fastcall Paint(void);
	void __fastcall Invalidate(void);
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TJvGutter(void) : System::TObject() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TJvGutter(void) { }
	#pragma option pop
	
};


class DELPHICLASS TJvBracketHighlighting;
class PASCALIMPLEMENTATION TJvBracketHighlighting : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	#pragma pack(push,1)
	Types::TRect FStart;
	#pragma pack(pop)
	#pragma pack(push,1)
	Types::TRect FStop;
	#pragma pack(pop)
	bool FActive;
	Graphics::TColor FFontColor;
	Graphics::TColor FBorderColor;
	Graphics::TColor FColor;
	Classes::TStrings* FWordPairs;
	bool FCaseSensitiveWordPairs;
	AnsiString FStringChar;
	Classes::TStrings* FCommentPairs;
	AnsiString FStringChars;
	AnsiString FStringEscape;
	bool FShowBetweenHighlighting;
	void __fastcall SetWordPairs(Classes::TStrings* Value);
	void __fastcall SetCommentPairs(const Classes::TStrings* Value);
	
public:
	__fastcall TJvBracketHighlighting(void);
	__fastcall virtual ~TJvBracketHighlighting(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	TDynBoolArray __fastcall CreateStringMap(const AnsiString Text);
	
__published:
	__property bool Active = {read=FActive, write=FActive, default=0};
	__property Graphics::TColor BorderColor = {read=FBorderColor, write=FBorderColor, default=12632256};
	__property Graphics::TColor Color = {read=FColor, write=FColor, default=536870911};
	__property Graphics::TColor FontColor = {read=FFontColor, write=FFontColor, default=536870911};
	__property bool ShowBetweenHighlighting = {read=FShowBetweenHighlighting, write=FShowBetweenHighlighting, default=0};
	__property bool CaseSensitiveWordPairs = {read=FCaseSensitiveWordPairs, write=FCaseSensitiveWordPairs, default=1};
	__property Classes::TStrings* WordPairs = {read=FWordPairs, write=SetWordPairs};
	__property AnsiString StringChars = {read=FStringChars, write=FStringChars};
	__property AnsiString StringEscape = {read=FStringEscape, write=FStringEscape};
	__property Classes::TStrings* CommentPairs = {read=FCommentPairs, write=SetCommentPairs};
};


class DELPHICLASS TJvErrorHighlighting;
class DELPHICLASS TJvErrorHighlightingItem;
class PASCALIMPLEMENTATION TJvErrorHighlighting : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	TJvErrorHighlightingItem* operator[](int Index) { return Items[Index]; }
	
private:
	Contnrs::TObjectList* FItems;
	TJvCustomEditorBase* FEditor;
	bool FNeedsRepaint;
	int FPaintLock;
	int __fastcall GetCount(void);
	TJvErrorHighlightingItem* __fastcall GetItem(int Index);
	
protected:
	void __fastcall RepaintLine(int Line);
	
public:
	__fastcall TJvErrorHighlighting(TJvCustomEditorBase* AEditor);
	__fastcall virtual ~TJvErrorHighlighting(void);
	int __fastcall Add(int ACol, int ALine, int ALen, const AnsiString AErrorText);
	void __fastcall Remove(TJvErrorHighlightingItem* Item);
	void __fastcall Delete(int Index);
	void __fastcall Clear(void);
	void __fastcall BeginUpdate(void);
	void __fastcall EndUpdate(void);
	void __fastcall DeleteLine(int Line);
	void __fastcall InsertLine(int Line);
	TDynBoolArray __fastcall GetLineErrorMap(int Y);
	TJvErrorHighlightingItem* __fastcall ErrorAt(int X, int Y);
	void __fastcall PaintError(Graphics::TCanvas* Canvas, int Col, int Line, const Types::TRect &R, int Len, const TDynIntArray MyDi);
	__property int Count = {read=GetCount, nodefault};
	__property TJvErrorHighlightingItem* Items[int Index] = {read=GetItem/*, default*/};
	__property TJvCustomEditorBase* Editor = {read=FEditor};
};


class DELPHICLASS TJvLineInformationList;
class DELPHICLASS TJvLineInformation;
class PASCALIMPLEMENTATION TJvLineInformationList : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	TJvLineInformation* operator[](int Index) { return Lines[Index]; }
	
private:
	TJvCustomEditorBase* FEditor;
	Contnrs::TObjectList* FList;
	Graphics::TColor FDebugColor;
	Graphics::TColor FDebugTextColor;
	Graphics::TColor FBreakpointColor;
	Graphics::TColor FBreakpointTextColor;
	Graphics::TColor FErrorPointTextColor;
	Graphics::TColor FErrorPointColor;
	int __fastcall GetCount(void);
	void * __fastcall GetData(int Index);
	TJvLineInformation* __fastcall GetItems(int Index);
	int __fastcall GetLineCount(void);
	TJvLineInformation* __fastcall GetLines(int Index);
	TJvLineSelectStyle __fastcall GetSelectStyle(int Index);
	void __fastcall SetData(int Index, void * Value);
	void __fastcall SetSelectStyle(int Index, const TJvLineSelectStyle Value);
	void __fastcall SetBreakpointColor(const Graphics::TColor Value);
	void __fastcall SetBreakpointTextColor(const Graphics::TColor Value);
	void __fastcall SetDebugColor(const Graphics::TColor Value);
	void __fastcall SetDebugTextColor(const Graphics::TColor Value);
	void __fastcall SetErrorPointColor(const Graphics::TColor Value);
	void __fastcall SetErrorPointTextColor(const Graphics::TColor Value);
	
protected:
	TJvLineInformation* __fastcall CreateLineInfo(int Index);
	
public:
	__fastcall TJvLineInformationList(TJvCustomEditorBase* AEditor);
	__fastcall virtual ~TJvLineInformationList(void);
	void __fastcall Clear(void);
	void __fastcall DeleteLine(int Line);
	void __fastcall InsertLine(int Line);
	__property int Count = {read=GetCount, nodefault};
	__property TJvLineInformation* Items[int Index] = {read=GetItems};
	__property int LineCount = {read=GetLineCount, nodefault};
	__property TJvLineInformation* Lines[int Index] = {read=GetLines/*, default*/};
	__property TJvLineSelectStyle SelectStyle[int Index] = {read=GetSelectStyle, write=SetSelectStyle};
	__property void * Data[int Index] = {read=GetData, write=SetData};
	__property Graphics::TColor DebugPointColor = {read=FDebugColor, write=SetDebugColor, nodefault};
	__property Graphics::TColor DebugPointTextColor = {read=FDebugTextColor, write=SetDebugTextColor, nodefault};
	__property Graphics::TColor BreakpointColor = {read=FBreakpointColor, write=SetBreakpointColor, nodefault};
	__property Graphics::TColor BreakpointTextColor = {read=FBreakpointTextColor, write=SetBreakpointTextColor, nodefault};
	__property Graphics::TColor ErrorPointColor = {read=FErrorPointColor, write=SetErrorPointColor, nodefault};
	__property Graphics::TColor ErrorPointTextColor = {read=FErrorPointTextColor, write=SetErrorPointTextColor, nodefault};
	__property TJvCustomEditorBase* Editor = {read=FEditor};
};


class PASCALIMPLEMENTATION TJvCustomEditorBase : public Rm_jvexcontrols::TJvExCustomControl 
{
	typedef Rm_jvexcontrols::TJvExCustomControl inherited;
	
private:
	TJvControlScrollBar95* FScrollBarHorz;
	TJvControlScrollBar95* FScrollBarVert;
	TJvEditorClient* FEditorClient;
	TJvCompletionBase* FCompletion;
	TJvGutter* FGutter;
	TJvKeyboard* FKeyboard;
	int FUpdateLock;
	TJvUndoBuffer* FUndoBuffer;
	bool FGroupUndo;
	bool FUndoAfterSave;
	TJvBracketHighlighting* FBracketHighlighting;
	TJvErrorHighlighting* FErrorHighlighting;
	Graphics::TColor FCurrentLineHighlight;
	int FCols;
	int FRows;
	int FLeftCol;
	int FTopRow;
	int FLastVisibleCol;
	int FLastVisibleRow;
	int FVisibleColCount;
	int FVisibleRowCount;
	Classes::TList* FFontCache;
	bool FAllRepaint;
	TCellRect FCellRect;
	bool IgnoreKeyPress;
	bool WaitSecondKey;
	Word Key1;
	Classes::TShiftState Shift1;
	int FUpdateSelBegY;
	int FUpdateSelEndY;
	bool FPersistentBlocksCaretChanged;
	Graphics::TColor FSelBackColor;
	Graphics::TColor FSelForeColor;
	TJvLineInformationList* FLineInformations;
	Extctrls::TTimer* TimerScroll;
	int MouseMoveY;
	int MouseMoveXX;
	int MouseMoveYY;
	bool FDoubleClick;
	bool FMouseDown;
	AnsiString FTabStops;
	int FCompound;
	Forms::TFormBorderStyle FBorderStyle;
	Graphics::TColor FGutterColor;
	int FGutterWidth;
	bool FRightMarginVisible;
	int FRightMargin;
	Graphics::TColor FRightMarginColor;
	Stdctrls::TScrollStyle FScrollBars;
	bool FDoubleClickLine;
	bool FSmartTab;
	bool FBackSpaceUnindents;
	bool FAutoIndent;
	bool FKeepTrailingBlanks;
	bool FCursorBeyondEOF;
	bool FBlockOverwrite;
	bool FPersistentBlocks;
	bool FHideCaret;
	bool FInsertMode;
	bool FReadOnly;
	bool FModified;
	bool FRecording;
	bool FBeepOnError;
	bool FUseFixedPopup;
	Classes::TNotifyEvent FOnChange;
	Classes::TNotifyEvent FOnSelectionChange;
	Classes::TNotifyEvent FOnChangeStatus;
	Classes::TNotifyEvent FOnScroll;
	Classes::TNotifyEvent FOnResize;
	Classes::TNotifyEvent FOnDblClick;
	TOnPaintGutter FOnPaintGutter;
	TOnGutterClick FOnGutterClick;
	TOnGutterClick FOnGutterDblClick;
	TOnCompletion FOnCompletionIdentifier;
	TOnCompletion FOnCompletionTemplate;
	Stdctrls::TDrawItemEvent FOnCompletionDrawItem;
	Stdctrls::TMeasureItemEvent FOnCompletionMeasureItem;
	TJvLineChangeEvent FOnLineInserted;
	TJvLineChangeEvent FOnLineDeleted;
	MESSAGE void __fastcall WMEditCommand(Messages::TMessage &Msg);
	MESSAGE void __fastcall WMCompound(Messages::TMessage &Msg);
	MESSAGE void __fastcall CMResetCaptureControl(Messages::TMessage &Msg);
	HIDESBASE MESSAGE void __fastcall WMHScroll(Messages::TWMScroll &Msg);
	HIDESBASE MESSAGE void __fastcall WMVScroll(Messages::TWMScroll &Msg);
	HIDESBASE MESSAGE void __fastcall WMSetCursor(Messages::TWMSetCursor &Msg);
	MESSAGE void __fastcall WMCopy(Messages::TMessage &Msg);
	MESSAGE void __fastcall WMCut(Messages::TMessage &Msg);
	MESSAGE void __fastcall WMPaste(Messages::TMessage &Msg);
	MESSAGE void __fastcall WMUndo(Messages::TMessage &Msg);
	MESSAGE void __fastcall WMClear(Messages::TMessage &Msg);
	MESSAGE void __fastcall EMSetReadOnly(Messages::TMessage &Msg);
	MESSAGE void __fastcall EMSetSelection(Messages::TMessage &Msg);
	MESSAGE void __fastcall EMGetSelection(Messages::TMessage &Msg);
	MESSAGE void __fastcall EMCanUndo(Messages::TMessage &Msg);
	MESSAGE void __fastcall WMGetTextLength(Messages::TMessage &Msg);
	
protected:
	DynamicArray<int >  FMyDi;
	TJvSelectionRec FSelection;
	int FCaretX;
	int FCaretY;
	bool FTabPos[1025];
	AnsiString FMacro;
	AnsiString FDefMacro;
	virtual void __fastcall UpdateEditorSize(void);
	virtual void __fastcall UpdateEditorView(void);
	void __fastcall ScrollTimer(System::TObject* Sender);
	AnsiString __fastcall ExpandTabsAnsi(const AnsiString S);
	virtual int __fastcall GetDefTabStop(int X, bool Next);
	virtual int __fastcall GetTabStop(int X, int Y, bool Next) = 0 ;
	virtual int __fastcall GetBackStop(int X, int Y) = 0 ;
	virtual int __fastcall GetAutoIndentStop(int Y) = 0 ;
	virtual bool __fastcall GetAnsiTextLine(int Y, /* out */ AnsiString &Text) = 0 ;
	virtual AnsiString __fastcall GetAnsiWordOnCaret(void) = 0 ;
	virtual void __fastcall DoLinesChange(System::TObject* Sender);
	virtual void __fastcall ReLine(void) = 0 ;
	virtual void __fastcall TextAllChangedInternal(bool Unselect);
	HIDESBASEDYNAMIC void __fastcall Changed(void);
	DYNAMIC void __fastcall TextAllChanged(void);
	DYNAMIC void __fastcall StatusChanged(void);
	DYNAMIC void __fastcall SelectionChanged(void);

⌨️ 快捷键说明

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