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

📄 hu_lib.h

📁 PIXIL is a small footprint operating environment, complete with PDA PIM applications, a browser and
💻 H
字号:
// Emacs style mode select   -*- C++ -*- //-----------------------------------------------------------------------------//// $Id: hu_lib.h,v 1.2 2003/09/08 22:34:28 jasonk Exp $//// Copyright (C) 1993-1996 by id Software, Inc.//// This source is available for distribution and/or modification// only under the terms of the DOOM Source Code License as// published by id Software. All rights reserved.//// The source is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License// for more details.//// DESCRIPTION:  none////-----------------------------------------------------------------------------#ifndef __HULIB__#define __HULIB__// We are referring to patches.#include "r_defs.h"// background and foreground screen numbers// different from other modules.#define BG			1#define FG			0// font stuff#define HU_CHARERASE	KEY_BACKSPACE#define HU_MAXLINES		4#define HU_MAXLINELENGTH	80//// Typedefs of widgets//// Text Line widget//  (parent of Scrolling Text and Input Text widgets)typedef struct{    // left-justified position of scrolling text window    int		x;    int		y;        patch_t**	f;			// font    int		sc;			// start character    char	l[HU_MAXLINELENGTH+1];	// line of text    int		len;		      	// current line length    // whether this line needs to be udpated    int		needsupdate;	      } hu_textline_t;// Scrolling Text window widget//  (child of Text Line widget)typedef struct{    hu_textline_t	l[HU_MAXLINES];	// text lines to draw    int			h;		// height in lines    int			cl;		// current line number    // pointer to boolean stating whether to update window    boolean*		on;    boolean		laston;		// last value of *->on.} hu_stext_t;// Input Text Line widget//  (child of Text Line widget)typedef struct{    hu_textline_t	l;		// text line to input on     // left margin past which I am not to delete characters    int			lm;    // pointer to boolean stating whether to update window    boolean*		on;     boolean		laston; // last value of *->on;} hu_itext_t;//// Widget creation, access, and update routines//// initializes heads-up widget libraryvoid HUlib_init(void);//// textline code//// clear a line of textvoid	HUlib_clearTextLine(hu_textline_t *t);void	HUlib_initTextLine(hu_textline_t *t, int x, int y, patch_t **f, int sc);// returns successboolean HUlib_addCharToTextLine(hu_textline_t *t, char ch);// returns successboolean HUlib_delCharFromTextLine(hu_textline_t *t);// draws tlinevoid	HUlib_drawTextLine(hu_textline_t *l, boolean drawcursor);// erases text linevoid	HUlib_eraseTextLine(hu_textline_t *l); //// Scrolling Text window widget routines//// ?voidHUlib_initSText( hu_stext_t*	s,  int		x,  int		y,  int		h,  patch_t**	font,  int		startchar,  boolean*	on );// add a new linevoid HUlib_addLineToSText(hu_stext_t* s);  // ?voidHUlib_addMessageToSText( hu_stext_t*	s,  char*		prefix,  char*		msg );// draws stextvoid HUlib_drawSText(hu_stext_t* s);// erases all stext linesvoid HUlib_eraseSText(hu_stext_t* s); // Input Text Line widget routinesvoidHUlib_initIText( hu_itext_t*	it,  int		x,  int		y,  patch_t**	font,  int		startchar,  boolean*	on );// enforces left marginvoid HUlib_delCharFromIText(hu_itext_t* it);// enforces left marginvoid HUlib_eraseLineFromIText(hu_itext_t* it);// resets line and left marginvoid HUlib_resetIText(hu_itext_t* it);// left of left-marginvoidHUlib_addPrefixToIText( hu_itext_t*	it,  char*		str );// whether eatenbooleanHUlib_keyInIText( hu_itext_t*	it,  unsigned char ch );void HUlib_drawIText(hu_itext_t* it);// erases all itext linesvoid HUlib_eraseIText(hu_itext_t* it); #endif//-----------------------------------------------------------------------------//// $Log: hu_lib.h,v $// Revision 1.2  2003/09/08 22:34:28  jasonk// Updated files because this fucker won't build for no fucking good reason.//// Revision 1.1.1.1  2003/09/04 21:08:12  jasonk// Initial import//// Revision 1.1  2000/12/08 21:07:53  jeffw// nxdoom initial entry -- No nxdoom/Makefile so it won't build automatically//////-----------------------------------------------------------------------------

⌨️ 快捷键说明

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