📄 synedit.hpp
字号:
virtual Synedittypes::TBufferCoord __fastcall DisplayToBufferPos(const Synedittypes::TDisplayCoord &aPos) = 0 ;
virtual int __fastcall RowCount(void) = 0 ;
virtual int __fastcall GetRowLength(int aRow) = 0 ;
virtual int __fastcall LinesInserted(int aIndex, int aCount) = 0 ;
virtual int __fastcall LinesDeleted(int aIndex, int aCount) = 0 ;
virtual int __fastcall LinesPutted(int aIndex, int aCount) = 0 ;
virtual void __fastcall DisplayChanged(void) = 0 ;
virtual void __fastcall Reset(void) = 0 ;
};
typedef void __fastcall (__closure *TPlaceMarkEvent)(System::TObject* Sender, TSynEditMark* &Mark);
typedef void __fastcall (__closure *TGutterClickEvent)(System::TObject* Sender, Controls::TMouseButton Button, int X, int Y, int Line, TSynEditMark* Mark);
class PASCALIMPLEMENTATION TCustomSynEdit : public Controls::TCustomControl
{
typedef Controls::TCustomControl inherited;
private:
HIDESBASE MESSAGE void __fastcall WMCancelMode(Messages::TMessage &Message);
MESSAGE void __fastcall WMCaptureChanged(Messages::TMessage &Msg);
MESSAGE void __fastcall WMClear(Messages::TMessage &Msg);
MESSAGE void __fastcall WMCopy(Messages::TMessage &Message);
MESSAGE void __fastcall WMCut(Messages::TMessage &Message);
MESSAGE void __fastcall WMDropFiles(Messages::TMessage &Msg);
HIDESBASE MESSAGE void __fastcall WMEraseBkgnd(Messages::TMessage &Msg);
MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Msg);
MESSAGE void __fastcall WMGetText(Messages::TWMGetText &Msg);
MESSAGE void __fastcall WMGetTextLength(Messages::TWMNoParams &Msg);
HIDESBASE MESSAGE void __fastcall WMHScroll(Messages::TWMScroll &Msg);
MESSAGE void __fastcall WMPaste(Messages::TMessage &Message);
MESSAGE void __fastcall WMSetText(Messages::TWMSetText &Msg);
MESSAGE void __fastcall WMImeComposition(Messages::TMessage &Msg);
MESSAGE void __fastcall WMImeNotify(Messages::TMessage &Msg);
HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Msg);
HIDESBASE MESSAGE void __fastcall WMMouseWheel(Messages::TMessage &Msg);
HIDESBASE MESSAGE void __fastcall WMSetCursor(Messages::TWMSetCursor &Msg);
HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Msg);
HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Msg);
MESSAGE void __fastcall WMUndo(Messages::TMessage &Msg);
HIDESBASE MESSAGE void __fastcall WMVScroll(Messages::TWMScroll &Msg);
bool fAlwaysShowCaret;
Synedittypes::TBufferCoord fBlockBegin;
Synedittypes::TBufferCoord fBlockEnd;
int fCaretX;
int fLastCaretX;
int fCaretY;
int fCharsInWindow;
int fCharWidth;
Graphics::TFont* fFontDummy;
int fImeCount;
bool fMBCSStepAside;
bool fInserting;
Classes::TStrings* fLines;
Classes::TStrings* fOrigLines;
Synedittextbuffer::TSynEditUndoList* fOrigUndoList;
Synedittextbuffer::TSynEditUndoList* fOrigRedoList;
int fLinesInWindow;
int fLeftChar;
int fMaxScrollWidth;
int fPaintLock;
bool fReadOnly;
int fRightEdge;
Graphics::TColor fRightEdgeColor;
Graphics::TColor fScrollHintColor;
TScrollHintFormat fScrollHintFormat;
Stdctrls::TScrollStyle FScrollBars;
int fTextHeight;
int fTextOffset;
int fTopLine;
Synedithighlighter::TSynCustomHighlighter* fHighlighter;
Syneditmiscclasses::TSynSelectedColor* fSelectedColor;
Graphics::TColor fActiveLineColor;
Synedittextbuffer::TSynEditUndoList* fUndoList;
Synedittextbuffer::TSynEditUndoList* fRedoList;
TSynEditMark* fBookMarks[10];
int fMouseDownX;
int fMouseDownY;
Syneditmiscclasses::TSynBookMarkOpt* fBookMarkOpt;
Forms::TFormBorderStyle fBorderStyle;
bool fHideSelection;
int fMouseWheelAccumulator;
TSynEditCaretType fOverwriteCaret;
TSynEditCaretType fInsertCaret;
#pragma pack(push, 1)
Types::TPoint fCaretOffset;
#pragma pack(pop)
Syneditkeycmds::TSynEditKeyStrokes* fKeyStrokes;
bool fModified;
TSynEditMarkList* fMarkList;
int fExtraLineSpacing;
Synedittypes::TSynSelectionMode fSelectionMode;
Synedittypes::TSynSelectionMode fActiveSelectionMode;
bool fWantReturns;
bool fWantTabs;
_di_ISynEditBufferPlugin fWordWrapPlugin;
Syneditmiscclasses::TSynGlyph* fWordWrapGlyph;
bool fCaretAtEOL;
Syneditmiscclasses::TSynGutter* fGutter;
int fTabWidth;
Syntextdrawer::TheTextDrawer* fTextDrawer;
#pragma pack(push, 1)
Types::TRect fInvalidateRect;
#pragma pack(pop)
TSynStateFlags fStateFlags;
TSynEditorOptions fOptions;
TSynStatusChanges fStatusChanges;
Word fLastKey;
Classes::TShiftState fLastShiftState;
Syneditmiscclasses::TSynEditSearchCustom* fSearchEngine;
Classes::TList* fHookedCommandHandlers;
Syneditkbdhandler::TSynEditKbdHandler* fKbdHandler;
Classes::TList* fFocusList;
Classes::TList* fPlugins;
Extctrls::TTimer* fScrollTimer;
int fScrollDeltaX;
int fScrollDeltaY;
Classes::TNotifyEvent fOnChange;
TPlaceMarkEvent fOnClearMark;
TProcessCommandEvent fOnCommandProcessed;
TDropFilesEvent fOnDropFiles;
TGutterClickEvent fOnGutterClick;
TMouseCursorEvent fOnMouseCursor;
TPaintEvent fOnPaint;
TPlaceMarkEvent fOnPlaceMark;
TProcessCommandEvent fOnProcessCommand;
TProcessCommandEvent fOnProcessUserCommand;
TReplaceTextEvent fOnReplaceText;
TSpecialLineColorsEvent fOnSpecialLineColors;
TContextHelpEvent fOnContextHelp;
TPaintTransient fOnPaintTransient;
TScrollEvent fOnScroll;
TGutterGetTextEvent fOnGutterGetText;
TGutterPaintEvent fOnGutterPaint;
TStatusChangeEvent fOnStatusChange;
bool fShowSpecChar;
int FPaintTransientLock;
bool FIsScrolling;
Classes::TNotifyEvent fChainListCleared;
Synedittextbuffer::TStringListChangeEvent fChainListDeleted;
Synedittextbuffer::TStringListChangeEvent fChainListInserted;
Synedittextbuffer::TStringListChangeEvent fChainListPutted;
Classes::TNotifyEvent fChainLinesChanging;
Classes::TNotifyEvent fChainLinesChanged;
TCustomSynEdit* fChainedEditor;
Classes::TNotifyEvent fChainUndoAdded;
Classes::TNotifyEvent fChainRedoAdded;
void __fastcall BookMarkOptionsChanged(System::TObject* Sender);
void __fastcall ComputeCaret(int X, int Y);
void __fastcall ComputeScroll(int X, int Y);
void __fastcall DoBlockIndent(void);
void __fastcall DoBlockUnindent(void);
void __fastcall DoHomeKey(bool Selection);
void __fastcall DoEndKey(bool aSelection);
void __fastcall DoLinesDeleted(int FirstLine, int Count);
void __fastcall DoLinesInserted(int FirstLine, int Count);
void __fastcall DoShiftTabKey(void);
void __fastcall DoTabKey(void);
void __fastcall DoCaseChange(const Syneditkeycmds::TSynEditorCommand Cmd);
int __fastcall FindHookedCmdEvent(THookedCommandEvent AHandlerProc);
void __fastcall SynFontChanged(System::TObject* Sender);
Synedittypes::TBufferCoord __fastcall GetBlockBegin();
Synedittypes::TBufferCoord __fastcall GetBlockEnd();
bool __fastcall GetCanPaste(void);
bool __fastcall GetCanRedo(void);
bool __fastcall GetCanUndo(void);
Synedittypes::TBufferCoord __fastcall GetCaretXY();
int __fastcall GetDisplayX(void);
int __fastcall GetDisplayY(void);
Synedittypes::TDisplayCoord __fastcall GetDisplayXY();
int __fastcall GetDisplayLineCount(void);
Graphics::TFont* __fastcall GetFont(void);
int __fastcall GetHookedCommandHandlersCount(void);
AnsiString __fastcall GetLineText();
int __fastcall GetMaxUndo(void);
TSynEditorOptions __fastcall GetOptions(void);
bool __fastcall GetSelAvail(void);
bool __fastcall GetSelTabBlock(void);
bool __fastcall GetSelTabLine(void);
AnsiString __fastcall GetSelText();
AnsiString __fastcall SynGetText();
AnsiString __fastcall GetWordAtCursor();
AnsiString __fastcall GetWordAtMouse();
bool __fastcall GetWordWrap(void);
void __fastcall GutterChanged(System::TObject* Sender);
void __fastcall InsertBlock(const Synedittypes::TBufferCoord &BB, const Synedittypes::TBufferCoord &BE, char * ChangeStr, bool AddToUndoList);
int __fastcall LeftSpaces(const AnsiString Line);
int __fastcall LeftSpacesEx(const AnsiString Line, bool WantTabs);
AnsiString __fastcall GetLeftSpacing(int CharCount, bool WantTabs);
void __fastcall LinesChanging(System::TObject* Sender);
void __fastcall MoveCaretAndSelection(const Synedittypes::TBufferCoord &ptBefore, const Synedittypes::TBufferCoord &ptAfter, bool SelectionCommand);
void __fastcall MoveCaretHorz(int DX, bool SelectionCommand);
void __fastcall MoveCaretVert(int DY, bool SelectionCommand);
void __fastcall PluginsAfterPaint(Graphics::TCanvas* ACanvas, const Types::TRect &AClip, int FirstLine, int LastLine);
void __fastcall ReadAddedKeystrokes(Classes::TReader* Reader);
void __fastcall ReadRemovedKeystrokes(Classes::TReader* Reader);
int __fastcall ScanFrom(int Index);
void __fastcall ScrollTimerHandler(System::TObject* Sender);
void __fastcall SelectedColorsChanged(System::TObject* Sender);
void __fastcall SetBlockBegin(const Synedittypes::TBufferCoord &Value);
void __fastcall SetBlockEnd(const Synedittypes::TBufferCoord &Value);
void __fastcall SetBorderStyle(Forms::TBorderStyle Value);
void __fastcall SetCaretX(int Value);
void __fastcall SetCaretY(int Value);
void __fastcall InternalSetCaretX(int Value);
void __fastcall InternalSetCaretY(int Value);
void __fastcall SetInternalDisplayXY(const Synedittypes::TDisplayCoord &aPos);
void __fastcall SetActiveLineColor(Graphics::TColor Value);
void __fastcall SetExtraLineSpacing(const int Value);
HIDESBASE void __fastcall SetFont(const Graphics::TFont* Value);
void __fastcall SetGutter(const Syneditmiscclasses::TSynGutter* Value);
void __fastcall SetGutterWidth(int Value);
void __fastcall SetHideSelection(const bool Value);
void __fastcall SetHighlighter(const Synedithighlighter::TSynCustomHighlighter* Value);
void __fastcall SetInsertCaret(const TSynEditCaretType Value);
void __fastcall SetInsertMode(const bool Value);
void __fastcall SetKeystrokes(const Syneditkeycmds::TSynEditKeyStrokes* Value);
void __fastcall SetLeftChar(int Value);
void __fastcall SetLines(Classes::TStrings* Value);
void __fastcall SetLineText(AnsiString Value);
void __fastcall SetMaxScrollWidth(int Value);
void __fastcall SetMaxUndo(const int Value);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -