📄 term.h
字号:
#ifndef __TERM_H#define __TERM_H#include "note.h"#define _orig cursors[ 5 * cursor ]#define _row cursors[ 5 * cursor + 1 ]#define _col cursors[ 5 * cursor + 2 ]#define _pcol cursors[ 5 * cursor + 3 ]#define _here cursors[ 5 * cursor + 4 ]#define __here ( ( line* )cursors[ 5 * cursor + 4 ] )#define xorig cursors[ 0 ]#define xrow cursors[ 1 ]#define xcol cursors[ 2 ]#define xpcol cursors[ 3 ]#define xhere cursors[ 4 ]#define x_here ( ( line* )cursors[ 4 ] )class term : public note{ public:// int orig, row, col, pcol; // to be removed u_int* cursors; u_int cursor_total; int rows; // in script, rows also in note.h int digits; int ascii_buffer[ 3 ];// script* scr; - use note::s// line* here; note* area[ 10 ]; term* last,* next,* repl; bool asc_hex; bool mousekeys; bool shiftlock; bool exiting; ~term(); term(); term( void* ); u_int add_cursor(); void del_cursor( u_int which ); void for_each_cursor_below( u_int, void(term::* x)( u_int ) ); void for_each_cursor_right( u_int row, u_int col, void(term::* x)( u_int, u_int ) ); void term::for_each_cursor_here( u_int row, u_int x, void(term::* x)( u_int, u_int ) ); void for_each_cursor( void(term::* x)( u_int ) ); void set_each_line( line* x ); void dec_orig( u_int cursor ); void dec_row( u_int cursor ); void inc_row( u_int cursor ); void dec_col( u_int cursor, u_int col ); void inc_col( u_int cursor, u_int col ); void cursor_lbs( u_int cursor, u_int col ); void cursor_cr( u_int cursor, u_int col ); void home_cursor( u_int cursor ); void ctrlalt( u_int cursor, register char ); void altlock( u_int cursor, register char ); void ctrlpunc( u_int cursor, register char ); void ctrlmath( u_int cursor, register char ); void altund( u_int cursor ); void altmny( u_int cursor ); void altexc( u_int cursor ); void fire( u_int cursor, bool ); void accel( u_int cursor, bool ); void meta( u_int cursor, bool ); void meta_ctrlesc( u_int cursor ); void meta_altesc( u_int cursor ); void meta_ctrlaltshift( u_int cursor ); void meta_altarrow( u_int cursor, int ); void meta_althome( u_int cursor ); void meta_altend( u_int cursor ); void meta_altpgup( u_int cursor ); void meta_altpgdn( u_int cursor ); void meta_altfunc( u_int cursor, int ); void meta_altnum( u_int cursor, int ); void meta_ctrlnum( u_int cursor, int ); void hash( u_int cursor, register char ); char ascii_eval_hex( u_int cursor ); char ascii_eval( u_int cursor ); void ascii( u_int cursor, int digit, bool adding ); void ascii_hex( u_int cursor, int digit ); void select( u_int cursor, bool ); void lock( u_int cursor, int ); // dir: hold, arrow, page; speed: normal, (real) fast void pan( u_int cursor, int, bool ); void mousekey( u_int cursor, char ); // 0-9, + - * /, (.) void submit( u_int cursor ); void full_screen( u_int cursor ); void run( u_int cursor ); void cell_new( u_int cursor ); // currently untypable void cell_del( u_int cursor ); void frame_new( u_int cursor ); void hide( u_int cursor ); void frame_del( u_int cursor ); void ht_back( u_int cursor ); void item( u_int cursor, bool ); // next or previous void task( u_int cursor, bool ); void taskset( u_int cursor, bool ); // dir: arrow, home/end, pgup/dn, alt-arrow? void highlight( u_int cursor, int ); void indent( u_int cursor, bool ); // left or right void skip( u_int cursor, int ); // arrow only void frame( u_int cursor, int ); // # of frame void top( u_int cursor ); void bot( u_int cursor ); void paste( u_int cursor ); void copy( u_int cursor ); void exchange( u_int cursor ); void cut( u_int cursor ); void cut_append( u_int cursor ); void vol( u_int cursor, bool ); // up or down void res_change( u_int cursor, bool ); void longer( u_int cursor ); void shorter( u_int cursor ); void wider( u_int cursor ); void narrower( u_int cursor ); void snapshot( u_int cursor ); void snap_copy( u_int cursor ); void sysrq( u_int cursor ); void reveal( u_int cursor ); void exit( u_int cursor ); void core_dump( u_int cursor ); void beep(); void boot( u_int cursor ); void redraw(); void debug();/* char* del( int row ); // success when empty or verified (ctrl?) char* expand( int row ); char* up( int row ); char* down( int row ); char* undent( int row ); char* indent( int row ); find_top_row( char* cx ) // if not visible, finds visible parent row find_bot_row( char* cx )*/ void update_to_top( u_int cursor, line* brand , line* old_bot, line* new_bot, line* top, u_int it ); line* term::find_top( u_int cursor, u_int& x ); void collapse( u_int cursor ); void expand( u_int cursor ); void bs( u_int cursor ); void ht( u_int cursor ); void cr( u_int cursor ); int del_line_s( line_s* top ); void del_line( u_int cursor ); void setcol( u_int cursor ); void func( u_int cursor, register int, register int ); void arrow( u_int cursor, register int ); void ins( u_int cursor ); void del( u_int cursor ); void home( u_int cursor ); void end( u_int cursor ); void pgup( u_int cursor ); void pgdn( u_int cursor ); void pause( u_int cursor ); void esc( u_int cursor ); void prtsc( u_int cursor ); void cbreak( u_int cursor ); char ctrl( u_int cursor, register char ); char hex( u_int cursor, register char ); char pipe( u_int cursor, register char );};/*void nul();void soh();void stx();void etx();void eot();void enq();void ack();void bel();void lf();void vt();void ff();void so();void si();void dle();void xon();void dc2();void xoff();void dc4();void nak();void syn();void etb();void can();void em();void sub();void esc();void fs();void gs();void rs();void us();*/#endif /* __TERM_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -