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

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

?? menu.c

?? tc圖形編程中的鼠標和鍵盤的重要頭文件
?? C
?? 第 1 頁 / 共 2 頁
字號:
/**
*	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)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
性欧美疯狂xxxxbbbb| 亚洲欧美激情在线| 国产91精品欧美| 亚洲欧美日韩电影| 精品久久久久久久一区二区蜜臀| 国产成人精品免费| 日本欧美大码aⅴ在线播放| 中文字幕欧美区| 日韩一本二本av| 在线观看av不卡| 国产91精品一区二区麻豆网站 | 麻豆精品在线视频| 日韩美女啊v在线免费观看| 欧美成人官网二区| 欧美老人xxxx18| 91污片在线观看| 国产激情精品久久久第一区二区 | 日韩理论在线观看| 精品国产髙清在线看国产毛片| 在线一区二区三区四区| 国产美女精品一区二区三区| 日本欧美肥老太交大片| 亚洲激情在线播放| 欧美精品亚洲一区二区在线播放| 国产拍揄自揄精品视频麻豆| 99久久777色| 国产成人免费视| 捆绑调教一区二区三区| 午夜免费欧美电影| 亚洲国产一二三| 一区二区三区产品免费精品久久75| 欧美高清在线一区二区| 久久久九九九九| 精品剧情v国产在线观看在线| 欧美精品黑人性xxxx| 欧美日韩中文字幕一区| 色噜噜狠狠成人网p站| 99久久精品免费精品国产| 国产成人免费视频网站| 国产精品资源在线看| 精品在线亚洲视频| 久久99精品国产麻豆婷婷| 麻豆国产一区二区| 麻豆成人免费电影| 麻豆精品视频在线观看| 精品一区二区三区久久久| 免费不卡在线观看| 精品一区二区免费在线观看| 婷婷开心久久网| 亚洲精品美腿丝袜| 亚洲成人av一区二区三区| 成人美女在线视频| 99亚偷拍自图区亚洲| 色综合天天性综合| 欧美一区二区三区在线| 欧美福利视频导航| 欧美在线观看你懂的| 成人午夜激情在线| 一本大道久久精品懂色aⅴ | 欧美探花视频资源| 欧美日韩mp4| 亚洲精品一区二区三区99| 精品卡一卡二卡三卡四在线| 久久久久久99精品| 国产精品不卡在线| 亚洲香肠在线观看| 免费观看一级特黄欧美大片| 国产乱码字幕精品高清av| 不卡一区二区中文字幕| 色婷婷久久综合| 777亚洲妇女| 久久久久国产免费免费| 国产精品久久久久久久久动漫| 亚洲欧美偷拍另类a∨色屁股| 午夜精品久久久久久不卡8050| 久久不见久久见免费视频7 | 91色.com| 69久久99精品久久久久婷婷| 欧美zozo另类异族| 国产精品国产自产拍高清av | 亚洲图片有声小说| 寂寞少妇一区二区三区| 91在线视频播放地址| 56国语精品自产拍在线观看| 久久综合九色综合久久久精品综合| 国产欧美一二三区| 五月天中文字幕一区二区| 国产在线精品一区二区不卡了| 99久久伊人精品| 日韩丝袜美女视频| 国产精品久久久久久久久免费相片| 亚洲国产一区二区a毛片| 国产精选一区二区三区| 欧美无人高清视频在线观看| 欧美r级电影在线观看| 一区二区在线观看视频在线观看| 久久精品国产色蜜蜜麻豆| 95精品视频在线| 亚洲精品一区二区三区在线观看 | 韩国三级在线一区| 色狠狠桃花综合| www久久久久| 日韩av中文字幕一区二区三区| 国产伦理精品不卡| 在线综合亚洲欧美在线视频| 国产三级精品三级| 伦理电影国产精品| 91国偷自产一区二区三区观看| 久久久另类综合| 日日夜夜一区二区| 一本到一区二区三区| 国产婷婷色一区二区三区四区| 午夜激情久久久| 色婷婷亚洲婷婷| 中文字幕一区二区三区在线播放| 麻豆精品久久久| 69堂亚洲精品首页| 香蕉久久一区二区不卡无毒影院| 波多野洁衣一区| 久久嫩草精品久久久精品一| 五月天网站亚洲| 91极品视觉盛宴| 亚洲麻豆国产自偷在线| 成人看片黄a免费看在线| wwww国产精品欧美| 久久精品国产一区二区三区免费看| 欧美色成人综合| 亚洲精品国久久99热| 91在线精品一区二区| 国产精品国产自产拍高清av | 欧美无人高清视频在线观看| 久久夜色精品一区| 国内精品伊人久久久久av一坑| 欧美日韩精品一区二区三区四区| 亚洲精品一卡二卡| 色综合天天综合| 伊人开心综合网| 欧美视频完全免费看| 亚洲一区二区在线免费看| 91行情网站电视在线观看高清版| 亚洲精品伦理在线| 91国偷自产一区二区三区观看| 亚洲嫩草精品久久| 日本高清不卡aⅴ免费网站| 亚洲靠逼com| 欧美日韩久久久| 日本免费新一区视频| 日韩久久精品一区| 国产一区二区导航在线播放| 久久精品水蜜桃av综合天堂| 国产 欧美在线| 亚洲欧美在线视频观看| 色婷婷综合久久久久中文| 尤物在线观看一区| 欧美二区三区91| 另类调教123区 | 久久影音资源网| 国产成人在线免费观看| 国产精品国产三级国产普通话三级 | av午夜一区麻豆| 亚洲色图丝袜美腿| 色噜噜久久综合| 日本三级韩国三级欧美三级| 日韩美女视频一区二区在线观看| 国产一区欧美日韩| 国产欧美一区二区精品性色| 色综合色综合色综合| 日韩极品在线观看| 国产性天天综合网| 处破女av一区二区| 亚洲国产精品欧美一二99| 久久综合九色综合欧美98| 一本一道久久a久久精品| 日韩黄色免费网站| 中文在线免费一区三区高中清不卡| 日本韩国欧美一区二区三区| 麻豆免费看一区二区三区| 日韩伦理av电影| 欧美成人午夜电影| 色偷偷一区二区三区| 精品一区二区精品| 亚洲一区二区三区精品在线| 精品国产91洋老外米糕| 色综合久久88色综合天天免费| 精品一区二区三区不卡 | 国产一区不卡精品| 亚洲一区自拍偷拍| 国产女同性恋一区二区| 欧美日韩三级一区二区| 福利一区在线观看| 青娱乐精品视频在线| 亚洲免费色视频| 精品国产乱码久久久久久闺蜜| 国产91丝袜在线18| 亚洲午夜在线电影| 免费人成在线不卡| 久久精品男人的天堂| 欧美一区二区免费观在线| 国产露脸91国语对白| 欧美亚洲高清一区|