📄 medit.h
字号:
//// $Id: medit.h,v 1.4 2000/11/28 04:39:24 ymwei Exp $//// edit.h: the head file of Edit Control module.//// Copyright (c) 1999, Wei Yongming.// Create date: 1999/8/26//#ifndef GUI_MEDIT_H_#define GUI_MEDIT_H_#ifdef __cplusplusextern "C" {#endif#define WIDTH_MEDIT_BORDER 2#define MARGIN_MEDIT_LEFT 1#define MARGIN_MEDIT_TOP 1#define MARGIN_MEDIT_RIGHT 2#define MARGIN_MEDIT_BOTTOM 1#define LEN_MLEDIT_BUFFER 3000#define LEN_MLEDIT_UNDOBUFFER 1024#define MAX_IMPOSSIBLE 10000#define EST_FOCUSED 0x00000001L#define EST_MODIFY 0x00000002L#define EST_READONLY 0x00000004L#define EST_REPLACE 0x00000008L#define MEDIT_OP_NONE 0x00#define MEDIT_OP_DELETE 0x01#define MEDIT_OP_INSERT 0x02#define MEDIT_OP_REPLACE 0x03/*typedef struct tagMLEDITDATA{ int bufferLen; // length of buffer int dataEnd; // data end position int editPos; // current edit position int editLine; // current eidt line int caretOff; // caret offset in box int caretLine; int startPos; // start display position int selStart; // selection start position int selStartLine; // selection start line int selEnd; // selection end position int selEndLine; // selection end line int passwdChar; // password character int leftMargin; // left margin int topMargin; // top margin int rightMargin; // right margin int bottomMargin; // bottom margin int hardLimit; // hard limit int lastOp; // last operation int lastPos; // last operation position int lastLine; // last operation line int affectedLen; // affected len of last operation int undoBufferLen; // undo buffer len char undoBuffer [LEN_MLEDIT_UNDOBUFFER]; // Undo buffer; char buffer [LEN_MLEDIT_BUFFER]; // buffer}MLEDITDATA;typedef MLEDITDATA* PMLEDITDATA; */ typedef struct tagLINEDATA{ int lineNO; // 行号 int dataEnd; struct tagLINEDATA *previous; // 前一行 struct tagLINEDATA *next; // 后一行 char buffer[LEN_MLEDIT_BUFFER+1];}LINEDATA;typedef LINEDATA* PLINEDATA;typedef struct tagMLEDITDATA{ DWORD status; // status of box int totalLen; // length of buffer,可能没有用 int editPos; // current edit position int caretPos; // caret offset in box int editLine; // current eidt line int dispPos; // 开始显示的位置 int StartlineDisp; // start line displayed int EndlineDisp; // end line displayed int linesDisp; // 需要显示的行数 int lines; // 总的行数` int MaxlinesDisp; // 最大显示的行数. int selStartPos; // selection start position int selStartLine; // selection start line int selEndPos; // selection end position int selEndLine; // selection end line int passwdChar; // password character int leftMargin; // left margin int topMargin; // top margin int rightMargin; // right margin int bottomMargin; // bottom margin int hardLimit; // hard limit int lastOp; // last operation int lastPos; // last operation position int lastLine; // last operation line int affectedLen; // affected len of last operation int undoBufferLen; // undo buffer len char undoBuffer [LEN_MLEDIT_UNDOBUFFER]; // Undo buffer; PLINEDATA head; // buffer PLINEDATA tail; // 可能不需要 // added by leon for charset support int fit_chars; // number of valid units to display int* pos_chars; // postion of each valid unit in buffer int* dx_chars; // display postion of each valid unit SIZE sz; // display rect size int veditPos; // editPos position of valid unit in both arrays int vdispPos; // dispPos position of valid unit in both arrays int realeditLine; // the 'real' line number that the cursor should be on if visible int realdispPos; // the 'real' valid unit edit position that the cursor should be on if visible int realstartLine; // the 'real' valid start line number int realendLine; // the 'real' valid end line number // end add PLOGFONT logfont; }MLEDITDATA;typedef MLEDITDATA* PMLEDITDATA;BOOL RegisterMLEditControl (void);void MLEditControlCleanup (void);int MLEditCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam);#ifdef __cplusplus}#endif#endif // GUI_MEDIT_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -