/*
* =====================================================================================
*
* Filename: 16_2.c
*
* Description: panel
*
* Version: 1.0
* Created: 2010骞?9鏈?7鏃?16鏃?7鍒?9绉? * Revision: none
* Compiler: gcc
*
* Author: Yang Shao Kun (), cdutyangshaokun@163.com
* Company: College of Information Engineering of CDUT
*
* =====================================================================================
*/
#include<panel.h>
int main()
{
WINDOW *my_wins[3];
PANEL *my_panels[3];
int lines=10,cols=40,y=2,x=4,i;
initscr();
cbreak();
noecho();
my_wins[0]=newwin(lines,cols,y,x);
my_wins[1]=newwin(lines,cols,y+1,x+5);
my_wins[2]=newwin(lines,cols,y+2,x+10);
for(i=0;i<3;++i)
box(my_wins[i],0,0);
my_panels[0]=new_panel(my_wins[0]);
my_panels[1]=new_panel(my_wins[1]);
my_panels[2]=new_panel(my_wins[2]);
update_panels();
doupdate();
getch();
endwin();
}
ncurses programming howto 书中源代码-4
最新推荐文章于 2018-11-29 16:06:14 发布