亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? menu.c

?? tc圖形編程中的鼠標(biāo)和鍵盤的重要頭文件
?? C
?? 第 1 頁 / 共 2 頁
字號(hào):
/**
*	MENU.C		Display several types of keyboard-activated
*			menus.
*
*  This program displays a series of menus on the screen, allowing
*  the user to choose which of several types of menus will be
*  displayed.
*
*  Five menus are used.  The main menu allows the user to select
*  one of four other menus or to terminate the program.  The
*  main menu is an example of a vertical menu style; the other
*  four exhibit horizontal, grid, Lotus-style, and virtual menus,
*  respectively.
*
*  The command line format is as follows:
*
*	menu [/c | /d | /a]
*
*  The user may specify either /c, /d, or /a, corresponding to the
*  type of mouse style they wish to use; click, drag, or alternate
*  drag, respectively.	If no switch is specified, the default is
*  click.
*
*  The two purposes of MENU are to show off the menuing
*  capabilities of Turbo C TOOLS, and to provide a working example
*  of the proper method of construction and use of the menu
*  functions.
*
*  Version	6.00 (C)Copyright Blaise Computing Inc. 1987-1989
*
**/

#include "ctype.h"
#include "stdio.h"

#include "bkeybrd.h"
#include "bkeys.h"
#include "bmenu.h"
#include "butil.h"
#include "bmouse.h"

		/* Text color is intense white on blue. 	    */
#define MYTEXTATR (utnybbyt (SC_BLUE,  NORMAL	| INTENSITY))

		/* "Lotus" description color is intense magenta on  */
		/* blue.					    */
#define MYLNGATTR (utnybbyt (SC_BLUE,  SC_MAGENTA | INTENSITY))

		/* Color of highlight bar is black text on a white  */
		/* background.					    */
#define MYHILATR  (utnybbyt (NORMAL, SC_BLACK))

		/* Color of "protected" items is green on blue.     */
#define MYPROATR  (utnybbyt (SC_BLUE,  SC_GREEN))

		/* Color of menu borders is cyan on black.	    */
#define MYBORDATR (utnybbyt (SC_BLACK, SC_CYAN))

		/* Color of menu titles is the same as menu borders.*/
#define MYTITATR  MYBORDATR

#define NUL    '\0'
#define TRUE   1
#define FALSE  0

		/* Terminate-on-error macro.			    */
#define exitBad()						     \
    {								     \
	mohide(MO_HIDE);					     \
	fprintf (stderr,					     \
		 "menu: died with b_wnerr = %d in line %d",          \
		 b_wnerr, __LINE__);				     \
	exit (b_wnerr); 					     \
    }


		/* Declare function prototypes. 		    */
void main	(int, char **);
void horizontal (int, int, int, int, int *, int *);
void lotus	(int, int, int, int, int *, int *);
void grid	(int, int, int, int, int *, int *);
void virtual	(int, int, int, int, int *, int *);


void main (argc, argv)
int    argc;
char **argv;
{
    BMENU  *pmenu;
    BORDER  border;
    WHERE   where;
    int     ch, scan;
    int     row, col;
    int     rrow, rcol;
    int     showrow, showcol;
    int     adapter, mode, cols, apage;
    int     coff, crow, ccol, chigh, clow;
    int     done = FALSE;
    int     mouse_style = MN_MOU_CLICK;
    int     bad_command_line = 0;

		/* First, check to see if the user specified a	    */
		/* mouse style. 				    */
    if (argc == 2)
    {
		/* Make sure the switch character is valid.	    */
	if ((argv[1][0] == '/') || (argv[1][0] == '-'))
	{
		/* Make sure the option character is valid.	    */
	    switch(toupper(argv[1][1]))
	    {
	    case 'C':
		mouse_style = MN_MOU_CLICK;
		break;
	    case 'D':
		mouse_style = MN_MOU_DRAG;
		break;
	    case 'A':
		mouse_style = MN_MOU_ALT_DRAG;
		break;
	    default:
		bad_command_line = 1;
		break;
	    }
	}
	else
	    bad_command_line = 1;
    }
    else
	if (argc > 2)
		bad_command_line = 1;

    if (bad_command_line)
    {
	fprintf(stderr, "Usage: menu [/c | /d | /a].\n");
	exit(1);
    }


		/* Now we make certain that we are in 80 column     */
		/* text video mode.				    */
    adapter = scmode (&mode, &cols, &apage);
    switch (mode)
    {
	case 2:
	case 3:
	case 7:
	    break;

	default:
	    fprintf (stderr,
		     "menu: This demonstration works only in 80 column\n");
	    fprintf (stderr,
		     "      text modes (modes 2, 3, and 7)\n");
	    exit (1);
    }

		/* Save cursor position and style to restore later. */
    coff = sccurst (&crow, &ccol, &chigh, &clow);

		/* Create the menu data structure.		    */
    if ((pmenu = mncreate (8, 14,
			   MYTEXTATR, MYHILATR,
			   MYPROATR, MYLNGATTR)) == NIL)
	exitBad ()

		/* Set up items on the menu, and define 	    */
		/* corresponding keys (upper and lower case of the  */
		/* first letters of the items). 		    */
    if (mnitmkey (pmenu, 0, 1, 0, "Horizontal", "Hh", MN_NOMOVE) == NIL)
	exitBad ()
    if (mnitmkey (pmenu, 1, 1, 0, "Lotus-Style", "Ll", MN_NOMOVE) == NIL)
	exitBad ()
    if (mnitmkey (pmenu, 2, 1, 0, "Grid", "Gg", MN_NOMOVE) == NIL)
	exitBad ()
    if (mnitmkey (pmenu, 3, 1, 0, "Virtual", "Vv", MN_NOMOVE) == NIL)
	exitBad ()
    if (mnitmkey (pmenu, 5, 1, 0, "Quit", "QqXx", MN_NOMOVE | MN_BEEP)
	== NIL)
	exitBad ()

		/* Define the following keys as selection &	    */
		/* transmission keys: ALT-H, ALT-L, ALT-G, ALT-V,   */
		/* ALT-Q and X. 				    */
    if (mnkey (pmenu,  0,  1, KB_C_A_H, KB_S_A_H,
	       MN_SELECT | MN_TRANSMIT, MN_ADD) == NIL)
	exitBad ()
    if (mnkey (pmenu,  1,  1, KB_C_A_L, KB_S_A_L,
	       MN_SELECT | MN_TRANSMIT, MN_ADD) == NIL)
	exitBad ()
    if (mnkey (pmenu,  2,  1, KB_C_A_G, KB_S_A_G,
	       MN_SELECT | MN_TRANSMIT, MN_ADD) == NIL)
	exitBad ()
    if (mnkey (pmenu,  3,  1, KB_C_A_V, KB_S_A_V,
	       MN_SELECT | MN_TRANSMIT, MN_ADD) == NIL)
	exitBad ()
    if (mnkey (pmenu,  5,  1, KB_C_A_Q, KB_S_A_Q,
	       MN_SELECT | MN_TRANSMIT | MN_BEEP, MN_ADD) == NIL)
	exitBad ()
    if (mnkey (pmenu,  5,  1, KB_C_A_X, KB_S_A_X,
	       MN_SELECT | MN_TRANSMIT | MN_BEEP, MN_ADD) == NIL)
	exitBad ()

		/* Disable ESC key.				    */
    if (mnkey (pmenu, 0, 0, KB_C_N_ESC, KB_S_N_ESC,
	       MN_ABORT, MN_DELETE) == NIL)
	exitBad ()

		/* Now that we have put all of the menu items on    */
		/* the menu in item color, set the native window    */
		/* color so that additional text will appear in the */
		/* menu's window in "long-item" (description) color.*/
    wnsetopt (pmenu->pwin, WN_ATTR, MYLNGATTR);

		/* Figure out where to display the menu.	    */
    where.dev	     = (adapter == 0) ? SC_MONO : SC_COLOR;
    where.page	     = 0;
    where.corner.row = 1;
    where.corner.col = 1;

		/* Make a border with a top centered title.	    */
    border.type     = BBRD_SSSS | BBRD_TCT;
    border.attr     = MYBORDATR;
    border.ch	    = NUL;
    border.pttitle  = "Menu Styles";
    border.ttattr   = MYTITATR;

		/* Display the menu on the screen.		    */
    if (mndsplay (pmenu, &where, &border) == NIL)
	exitBad ()

		/* Set up starting row and column for highlight bar.*/
    row = 0;
    col = 1;

		/* If the mouse is present, enable its cursor.	    */
    if (MO_OK == mohide(MO_SHOW))
	if (NULL == mnmstyle(pmenu, mouse_style, MO_LEFT))
	    exitBad ()

		/* Leave this menu on the screen until they select  */
		/* the "Quit" entry.                                */
    do
    {
		/* Read a response from the menu.		    */
	if (mnread (pmenu, row, col, &row, &col, &ch, &scan,
		    MN_KEEP_HIGHLIGHT))
	    exitBad ()

		/* Set up location to show sub-menu.		    */
	showrow = where.corner.row + row + 2;
	showcol = where.corner.col + col + 0;

		/* Go do what was requested.			    */
	switch (row)
	{
	    case 0:
		horizontal (where.dev, showrow, showcol, mouse_style,
			    &rrow, &rcol);
		break;
	    case 1:
		lotus (where.dev, showrow, showcol, mouse_style,
		       &rrow, &rcol);
		break;
	    case 2:
		grid (where.dev, showrow, showcol, mouse_style,
		      &rrow, &rcol);
		break;
	    case 3:
		virtual (where.dev, showrow, showcol, mouse_style,
			 &rrow, &rcol);
		break;
	    case 5:
		done = TRUE;
	}

		/* At this point, rrow and rcol contain the row and */
		/* column of the item selected from the submenu.    */
	if (!done)
	{	/* Tell the user what was selected from the submenu.*/
	    if (b_pcurwin != pmenu->pwin)
		wnselect (pmenu->pwin);
	    wnscrblk (b_pcurwin, 6, 0, 6, 13, -1, -1, 0, 0, 0);
	    wncurmov (6, 1);
	    wnprintf ("xmit (%d %d)", rrow, rcol);
	}
    } while (!done);

    mndstroy (pmenu);

    mohide(MO_HIDE);

		/* Restore cursor position and style.		    */
    sccurset (crow, ccol);
    scpgcur (coff, chigh, clow, CUR_NO_ADJUST);
}



/**
*
* Name		HORIZONTAL -- Display and allow user selection from
*			      a simple horizontal menu.
*
* Synopsis	horizontal (dev, row, col, prrow, prcol);
*
*		int dev 	  Device on which to display the
*				  menu.  Either SC_COLOR or SC_MONO.
*		int row, col	  Row and column where the upper-
*				  left corner of the menu's data
*				  area should appear.
*		int mouse_style   The mouse style to use.
*		int *prrow,	  Pointers to variables in which to
*		    *prcol	  return the row and column selected
*				  from the menu.
*
* Description	This function constructs a simple horizontal menu,
*		and waits for user input.  It then returns the row
*		and column of the selection to its caller.
*
* Returns	*prrow, *prcol	  Row and column (relative to menu) of
*				  user selection.
*
**/


void horizontal (dev, row, col, mouse_style, prrow, prcol)
int  dev;
int  row,    col;
int  mouse_style;
int *prrow, *prcol;
{
    BMENU  *pmenu;
    BORDER  border;
    WHERE   where;
    int     ch, scan;

		/* Figure out where to display the menu.	    */
    where.dev	     = dev;
    where.page	     = 0;
    where.corner.row = row;
    where.corner.col = col;

		/* Create the menu data structure.		    */
    if ((pmenu = mncreate (1, 28,
			   MYTEXTATR, MYHILATR,
			   MYPROATR, MYLNGATTR)) == NIL)
	exitBad ()

		/* Set up items on the menu, and add keys to the key*/
		/* binding list (upper and lower case of the first  */
		/* letters of the items.			    */
    if (mnitmkey (pmenu, 0, 1,	0, "My dog", "MmDd",   MN_NOMOVE) == NIL)
	exitBad ()
    if (mnitmkey (pmenu, 0, 9,	0, "has", "Hh",   MN_NOMOVE) == NIL)
	exitBad ()
    if (mnitmkey (pmenu, 0, 14, 0, "itchy", "Ii",   MN_NOMOVE) == NIL)
	exitBad ()
    if (mnitmkey (pmenu, 0, 21, 0, "fleas.", "Ff",   MN_NOMOVE) == NIL)
	exitBad ()

		/* Disable ESC key.				    */
    if (mnkey (pmenu, 0, 0, KB_C_N_ESC, KB_S_N_ESC,
	       MN_ABORT, MN_DELETE) == NIL)

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一二三区在线观看| 国产精品超碰97尤物18| 日韩国产成人精品| 88在线观看91蜜桃国自产| 日韩av网站免费在线| 亚洲精品在线网站| 成人午夜私人影院| 一区二区三区成人| 欧美福利视频导航| 激情图区综合网| 中文字幕一区二区三区不卡在线| 97成人超碰视| 日韩精品久久久久久| 久久亚洲二区三区| 99视频精品全部免费在线| 午夜精品一区在线观看| 久久色.com| 色综合激情久久| 人人爽香蕉精品| 久久久综合九色合综国产精品| 99re成人在线| 麻豆中文一区二区| 亚洲丝袜精品丝袜在线| 欧美日韩免费电影| 国产真实精品久久二三区| 亚洲久草在线视频| 欧美va在线播放| 91在线观看免费视频| 男人的j进女人的j一区| 国产精品国产自产拍高清av| 欧美精品在线观看一区二区| 国产精品911| 日本三级韩国三级欧美三级| 国产精品亲子乱子伦xxxx裸| 欧美丰满少妇xxxbbb| 国产aⅴ精品一区二区三区色成熟| 夜夜亚洲天天久久| 国产欧美日本一区二区三区| 欧美理论片在线| 成人黄色片在线观看| 日本一道高清亚洲日美韩| 亚洲国产高清不卡| 日韩欧美国产电影| 色88888久久久久久影院野外| 久久精品国产秦先生| 亚洲乱码国产乱码精品精小说| 日韩精品在线网站| 欧美乱妇15p| 91亚洲精品久久久蜜桃网站 | 欧洲视频一区二区| 国产福利视频一区二区三区| 丝袜亚洲另类欧美| 亚洲理论在线观看| 欧美经典一区二区| 日韩精品资源二区在线| 欧美日韩视频在线第一区 | 色菇凉天天综合网| 国产a视频精品免费观看| 日韩激情一二三区| 亚洲另类在线制服丝袜| 国产精品毛片大码女人| 国产蜜臀av在线一区二区三区| 精品国产乱码久久久久久老虎| 欧美三级视频在线观看| 色域天天综合网| 99re这里只有精品视频首页| 成人激情综合网站| 国产黄色精品网站| 国产高清精品在线| 国产精品综合视频| 国产成人久久精品77777最新版本| 久久99久久99精品免视看婷婷| 日韩制服丝袜av| 欧美a级理论片| 精品一区二区三区的国产在线播放| 日本亚洲视频在线| 日本麻豆一区二区三区视频| 日本亚洲欧美天堂免费| 日本午夜精品一区二区三区电影| 天堂va蜜桃一区二区三区| 日日嗨av一区二区三区四区| 日本不卡123| 日韩国产高清在线| 韩国av一区二区三区四区 | 亚洲成人动漫av| 亚洲综合色丁香婷婷六月图片| 亚洲一区影音先锋| 亚洲第一狼人社区| 另类欧美日韩国产在线| 国产一区二区三区在线观看免费| 国产精品影音先锋| av电影一区二区| 在线看日本不卡| 欧美久久一区二区| 精品成人一区二区三区| 国产亚洲精久久久久久| 国产精品短视频| 亚洲精品乱码久久久久久| 亚洲高清免费在线| 久久aⅴ国产欧美74aaa| 国产成人精品一区二区三区四区| 97久久精品人人澡人人爽| 欧美中文字幕久久| 欧美精品一区男女天堂| 国产蜜臀97一区二区三区| 亚洲精品你懂的| 奇米一区二区三区| 粉嫩aⅴ一区二区三区四区五区| 91无套直看片红桃| 91精品欧美久久久久久动漫| 精品卡一卡二卡三卡四在线| 综合欧美一区二区三区| 日韩电影免费在线看| 国产精品乡下勾搭老头1| 91极品视觉盛宴| 精品电影一区二区| 亚洲一区免费观看| 韩国v欧美v日本v亚洲v| 色综合色狠狠综合色| 日韩精品资源二区在线| 亚洲免费视频中文字幕| 精品中文字幕一区二区| 色天天综合久久久久综合片| 日韩欧美一级二级三级久久久| 国产精品久久久久久久久免费桃花| 亚洲电影激情视频网站| jizz一区二区| 精品久久久久一区二区国产| 一区二区免费看| 国产99久久久精品| 日韩免费性生活视频播放| 亚洲黄色性网站| 国产中文一区二区三区| 欧美裸体bbwbbwbbw| 综合在线观看色| 国产一区二区按摩在线观看| 欧美午夜不卡视频| 中文字幕亚洲不卡| 国产麻豆91精品| 欧美一区二区视频在线观看2022| 亚洲免费三区一区二区| 国产91在线看| 精品国产一二三区| 天天影视涩香欲综合网| 色8久久人人97超碰香蕉987| 中文字幕在线不卡一区二区三区| 六月丁香婷婷久久| 欧美一卡在线观看| 亚洲国产成人av好男人在线观看| 91亚洲男人天堂| 国产精品网站导航| 国产91色综合久久免费分享| 精品国产a毛片| 九九国产精品视频| 亚洲精品一区二区精华| 天堂在线一区二区| 欧美日本高清视频在线观看| 亚洲精品中文在线观看| 色悠久久久久综合欧美99| 国产精品久久久久久久久快鸭| 国产乱一区二区| 久久免费视频一区| 国内欧美视频一区二区| 日韩精品一区二区三区老鸭窝| 亚瑟在线精品视频| 欧美无砖专区一中文字| 亚洲第一精品在线| 欧美人妖巨大在线| 日韩精品五月天| 56国语精品自产拍在线观看| 亚洲丰满少妇videoshd| 91精品国产综合久久精品麻豆| 偷窥国产亚洲免费视频| 欧美一区二区三区四区五区| 免费在线观看不卡| 亚洲精品一区二区三区99| 不卡欧美aaaaa| 亚洲女人的天堂| 欧美天堂一区二区三区| 婷婷丁香久久五月婷婷| 日韩精品一区二区三区在线播放 | 国产精品欧美一区二区三区| 成人精品国产福利| 亚洲人成亚洲人成在线观看图片 | 99久久精品免费看国产免费软件| 国产精品剧情在线亚洲| 色婷婷久久久亚洲一区二区三区| 艳妇臀荡乳欲伦亚洲一区| 欧美日韩精品免费| 久久99精品国产91久久来源| 2024国产精品| 成人黄色在线视频| 午夜电影久久久| 亚洲精品一区二区在线观看| 国产成人h网站| 一区二区三区四区亚洲| 4438x成人网最大色成网站| 国产精品一区二区91| 中文字幕一区二区三| 777a∨成人精品桃花网|