⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 textbox.h

📁 本程序是使用CDMA450模块开发的一个无线公话完整程序
💻 H
字号:
#ifndef _COMPONENT_TEXTBOX
#define _COMPONENT_TEXTBOX

#include "component.h"
#include "scrollbar.h"

#define  TEXTBOX_START		0
#define  TEXTBOX_END		-1

#define	 TEXT_ROW_HEIGHT	HZ_MAIN//16

typedef struct textbox textbox_t;
typedef struct {
	char*		start;		/* 文本内容起始地址 */
	BYTE		count;		/* 文本长度 */
} TEXTITEM;

struct textbox {
	component_t		comp;		/**< 文本框组件 */
	scrollbar_t		scroll;
	BYTE			*text;		/**< 文本指针 */
	int				maxlen;		/**< 文本长度 */ 
	int				firstLine;	/**< 页面中显示的第一行的标号 */ 
	short			totalline;	/**< 文本的总行数 */
	short			onepagerow;	/**< 一页显示的行数 */
	int				linenum;	/**< 每行最大字节数 */ 
	TEXTITEM		*lines;		/**< 每行显示文本信息 */
};

/**
*XCreateTextBox --- 创建文本框组件
*/
int XCreateTextBox(component_t *parent,
					textbox_t    *tbox,
					rect	     *rc,
					unsigned int  maxlen,
					unsigned char *text);

/**
*XTextBoxNewText --- 改变文本框组件内容
*/
int XTextBoxNewText(textbox_t	*tbox,
					unsigned char *text,
					int			 maxlen);

int XTextBoxKeyHandle(textbox_t *tb, int key);


int	XTextBoxSetPos(textbox_t *tb, int pos);

int	XTextBoxSetRect(textbox_t *tb, rect *rc);

#endif 

⌨️ 快捷键说明

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