crt.d

来自「Object-Oriented Programming With ANSI-C这」· D 代码 · 共 32 行

D
32
字号
// new(Crt())//	wraps a curses window, gate(crt, 0) produces events// new(CLineOut(), y, x, len)//	LineOut, located at y, x, with line length len// new(CButton(), "text", y, x)//	Button, located at y, x, sized for "text"% IcClass  Crt: Ic {	void * window;		// curses WINDOW	int rows;		// size	int cols;%	void makeWindow (_self, int rows, int cols, int y, int x);	void addStr(_self, int y, int x, const char * s);	void crtBox(_self);%}%prot#define	rows(c)	(((const struct Crt *) c) -> rows)#define	cols(c)	(((const struct Crt *) c) -> cols)% IcClass  CLineOut: Crt {%}% IcClass  CButton: Crt {	void * button;	int y;	int x;%}

⌨️ 快捷键说明

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