bctextarea.h

来自「用你的语音Modem实现像电话一样通话的程序」· C头文件 代码 · 共 58 行

H
58
字号
#ifndef TEXTAREA_H#define TEXTAREA_Hclass BC_TextArea;#include "bcscrollbar.h"#include "bctool.h"#include <string.h>class BC_TextAreaScroll : public BC_YScrollBar{public:	BC_TextAreaScroll(BC_TextArea *textarea, int totallines_, int yposition);	handle_event();		BC_TextArea *textarea;};class BC_TextArea : public BC_Tool{public:	BC_TextArea(int x_, int y_, int w_, int h_, char *text, int yposition = 0);	virtual ~BC_TextArea();	create_tool_objects();	// ================================ user commands		set_size(int x_, int y_, int w_, int h_);	set_contents(char *text, int yposition = 0);	append_contents(char *new_text);	set_yposition(int yposition);	get_yposition();		// ================================ tool event handlers	resize(int w, int h);	draw();	deactivate();	button_press_();	cursor_left_();		// ================================ tool commands		get_total_lines();	cursor_motion_();	button_release_();			BC_TextAreaScroll *scrollbar;	char *text;	int yposition;  // item of top line in list display	int itemheight;   // height of a row in a list	int button_down;    // scroll by pointing	int highlighted;};#endif

⌨️ 快捷键说明

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