📄 codearea.h
字号:
#define GETCH(curpos) if((curpos)+1<CODE_QUANTUM)\ch=line[++curpos];\else \goto overstruct page{ chtype **data; int quantum; int qset; struct page *next; struct page *prev;};typedef struct page Page;typedef struct page *PageList;struct selected{ BOOL selected; int begline; int begcol; int endline; int endcol;};typedef struct selected SelText;class CodeArea:public BaseWindow{private: int active; int currow; int curcol; int curpage; int offline; int offcol; //the count of shift page int scrrow; int scrcol; int totalrow; //the total rows of the file int totalcol; //the max col of current row int maxcol; //max col of the whole file int totalpage; int insertmode; int multiremark; //the flag of multi remark line int sym; //the current type of symbol BOOL modified; char filenm[MAXFIELDLEN]; PageList pagelist; PageList beginpage; SelText seltext;public: int InitCodeArea(int Y,int X,int Height,int Width,int Color,int FontStyle,int WinType); BOOL InitLocalVar(); int CodeAreaDriver(int key); void DestroyCodeArea(); int Active(int item); int Active(); int IsActive(); int LostActive(); int GetCurCol(); int GetMaxCol(); int GetCurRow(); int GetTotalRow(); int GetCurColWidth(PageList page,int line); ////memory alloc and free int Trim(); void InsertPage(PageList prev,PageList newpage); PageList AllocPage(); PageList LocatePage(PageList page,int row); void FreePage(PageList page); int ReadFile(char *filename); void ShowPage(PageList page,int beginline,int lines,int begincol,int cols,int y,int x); void ShowPage(); void ShowPage(int offcols); void ShowLine(chtype *line, int beginpos, int chars, int row, int col); void ShiftLinesDown(PageList pg,int line,int shift); void ShiftLinesUp(PageList pg,int line,int shift); void CopyLineDown(chtype *source,int begin,int len,chtype *target,int tarbeg,int shift,int clearup); void CopyLineUp(chtype *source,int begin,int len,chtype *target,int tarbeg,int shift,int clearup); void linecolor(chtype *line); BOOL NewFile(); BOOL Modified(); BOOL SaveFile(char *filename); BOOL SaveFile(); char* GetFileName(); // block operation BOOL SelectText(); void UnSelectTxt(); BOOL CutBlock(); BOOL CopyBlock(); BOOL PasteBlock(); BOOL DelBlock(); //tool operation void CodeIndent(); void AutoMake();};//end of file codearea.h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -