当前位置: 首页>>代码示例>>C++>>正文


C++ scrollok函数代码示例

本文整理汇总了C++中scrollok函数的典型用法代码示例。如果您正苦于以下问题:C++ scrollok函数的具体用法?C++ scrollok怎么用?C++ scrollok使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了scrollok函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: init_ncurses

void init_ncurses() {
  initscr();
  curs_set(0);
  cbreak();
  noecho();
  nodelay(stdscr, TRUE);  // getch can't block clock
  keypad(stdscr, TRUE);
  scrollok(stdscr, TRUE);
  resizeterm(MAX_BOARD_Y + 10, 2 * MAX_BOARD_X + 10);
}
开发者ID:dqlynch,项目名称:Little-Projects,代码行数:10,代码来源:tron.cpp

示例2: if

void WindowManager::init_gameLog(bool firstTime)
{	if (firstTime)
		gameLog = newwin(10,101,27,1);
	else {
		wresize(gameLog,10,101);
		wclear(gameLog);
	}
	drawFrame(26,0,37,102);
	scrollok(gameLog,TRUE);
}
开发者ID:case93,项目名称:Chiasmus2,代码行数:10,代码来源:WindowManager.cpp

示例3: init_ncurses

void init_ncurses() {
  srand(time(NULL));
  initscr();
  curs_set(0);
  cbreak();
  noecho();
  nodelay(stdscr, TRUE);  // getch can't block clock
  keypad(stdscr, TRUE);
  scrollok(stdscr, TRUE);
}
开发者ID:dqlynch,项目名称:Little-Projects,代码行数:10,代码来源:Screen.cpp

示例4: gli_setup_curses

/* Set up all the curses parameters. This is called from main() -- 
    before gli_initialize_windows, actually -- and also when curses
    is reinitialized for a screen-size change. */
void gli_setup_curses()
{
    initscr();
    cbreak();
    noecho();
    nonl(); 
    intrflush(stdscr, FALSE); 
    keypad(stdscr, TRUE);
    scrollok(stdscr, FALSE);
}
开发者ID:ChadMcKinney,项目名称:Entropy,代码行数:13,代码来源:gtwindow.c

示例5: genlines

static void genlines(int base)
{
    int i, j;

#if USE_TRACE
    if (base == 'a')
        Trace(("Resetting screen"));
    else
        Trace(("Painting `%c' screen", base));
#endif

    /* Do this so writes to lower-right corner don't cause a spurious
     * scrolling operation.  This _shouldn't_ break the scrolling
     * optimization, since that's computed in the refresh() call.
     */
    scrollok(stdscr, FALSE);

    move(0,0);
    for (i = 0; i < head_lines; i++)
        for (j = 0; j < COLS; j++)
            addch((j % 8 == 0) ? ('A' + j/8) : '-');

    move(head_lines, 0);
    for (i = head_lines; i < LINES - foot_lines; i++) {
        int c = (base - LO_CHAR + i) % (HI_CHAR - LO_CHAR + 1) + LO_CHAR;
        int hi = (extend_corner || (i < LINES - 1)) ? COLS : COLS - 1;
        for (j = 0; j < hi; j++)
            addch(c);
    }

    for (i = LINES - foot_lines; i < LINES; i++) {
        move(i, 0);
        for (j = 0; j < (extend_corner ? COLS : COLS - 1); j++)
            addch((j % 8 == 0) ? ('A' + j/8) : '-');
    }

    scrollok(stdscr, TRUE);
    if (single_step) {
        move(LINES-1, 0);
        getch();
    } else
        refresh();
}
开发者ID:BackupTheBerlios,项目名称:wl530g-svn,代码行数:43,代码来源:hashtest.c

示例6: init0

int init0() {
	initscr();
	clear();
	noecho();
	cbreak();
	curs_set(0);
	scrollok(stdscr, TRUE);
	keypad(stdscr, TRUE);
	return 0;
}
开发者ID:wlgfour,项目名称:eth,代码行数:10,代码来源:ethlib.c

示例7: Scrollok

void
Scrollok ( WINDOW *win, bool bf )
{
	int retval;
	
	retval = scrollok ( win, bf );
	
	if ( retval == ERR )
		Fatal_failure ( "scrollok\n" );
}
开发者ID:kkaneda,项目名称:vm,代码行数:10,代码来源:vga.c

示例8: chat_onInit

static void chat_onInit(ToxWindow *self)
{
  int x, y;
  ChatContext *ctx = (ChatContext*) self->x;
  getmaxyx(self->window, y, x);
  ctx->history = subwin(self->window, y - 4, x, 0, 0);
  scrollok(ctx->history, 1);
  ctx->linewin = subwin(self->window, 2, x, y - 3, 0);
  print_help(ctx);
}
开发者ID:ghacnt,项目名称:ProjectTox-Core,代码行数:10,代码来源:chat.c

示例9: main

int main()
{
	WINDOW *sub_window_ptr;
	int x_loop;
	int y_loop;
	int counter;
	
	char a_letter = '1';

	initscr();

	for (y_loop = 0; y_loop < LINES - 1; y_loop ++){
		for (x_loop = 0; x_loop < COLS - 1; x_loop ++){
			mvwaddch(stdscr, y_loop, x_loop, a_letter);
			a_letter ++;
			if (a_letter > '9')
				a_letter = '0';
		}
	}


	sub_window_ptr = subwin(stdscr, 10, 20, 10, 10);
	scrollok(sub_window_ptr, 1);

	touchwin(stdscr);
	refresh();
	sleep(1);


	werase(sub_window_ptr);
	mvwprintw(sub_window_ptr, 2, 0, "%s", "This window will now scroll");
	wrefresh(sub_window_ptr);
	sleep(1);

	for (counter = 1; counter < 10; counter ++){
		wprintw(sub_window_ptr, "%s", "This text is both wrapping and \
				scrolling.");
		wrefresh(sub_window_ptr);
		sleep(1);
	}


	delwin(sub_window_ptr);

	touchwin(stdscr);
	refresh();
	sleep(1);


	endwin();


	exit(EXIT_SUCCESS);

}
开发者ID:BlueCabbage,项目名称:BeginningLinuxProgramming,代码行数:55,代码来源:subsc1.c

示例10: newwin

void WindowManager::init_debugLog(bool firstTime)
{
	if (firstTime)
		debugLog = newwin(10,101,39,1);
	else {
		wresize(debugLog,10,101);
		wclear(debugLog);
	}
	drawFrame(38,0,49,102);
	scrollok(debugLog,TRUE);
}
开发者ID:case93,项目名称:Chiasmus2,代码行数:11,代码来源:WindowManager.cpp

示例11: os_reset_screen

void os_reset_screen (void)
{

    os_stop_sample(0);
    os_set_text_style(0);
    print_string("[Hit any key to exit.]\n");
    os_read_key(0, FALSE);
    scrollok(stdscr, TRUE); scroll(stdscr);
    refresh(); endwin();

}/* os_reset_screen */
开发者ID:nosyndicate,项目名称:frotzen,代码行数:11,代码来源:ux_init.c

示例12: groupchat_onInit

static void groupchat_onInit(ToxWindow *self, Tox *m)
{
    int x, y;
    ChatContext *ctx = (ChatContext *) self->chatwin;
    getmaxyx(self->window, y, x);
    ctx->history = subwin(self->window, y-3, x, 0, 0);
    scrollok(ctx->history, 1);
    ctx->linewin = subwin(self->window, 2, x, y-4, 0);
    print_groupchat_help(ctx);
    wmove(self->window, y - CURS_Y_OFFSET, 0);
}
开发者ID:devurandom,项目名称:toxic,代码行数:11,代码来源:groupchat.c

示例13: setupscreen

void setupscreen()
{
	int rows, cols;
	initscr();
	cbreak();
	noecho();
	intrflush(stdscr, FALSE);
	cols = COLS - 2;
	rows = (LINES - 3) / 2; 
	me = newwin(rows + 1 , cols, 0, 0);
	them = newwin(rows + 1 , cols, rows + 2, 0);
	idlok(me, TRUE);
	scrollok(me, TRUE);
	keypad(me, TRUE);
	idlok(them, TRUE);
	scrollok(them, TRUE);
	move(rows + 1, 0);
	hline(0, cols+2);
	refresh();
}
开发者ID:rakasunka,项目名称:ntalk,代码行数:20,代码来源:main.c

示例14: wrefresh

void Ui::create_window_scroll(int px, int py, int sizex, int sizey, std::string id){
  if(m_windows.count(id) != 0){
    wrefresh(m_windows[id]);
    delwin(m_windows[id]);
  }
  WINDOW * win;
  win = newwin(sizey, sizex, py, px);
  wrefresh(win);
  scrollok(win, true);
  m_windows[id] = win;
}
开发者ID:kalsipp,项目名称:destrobustro,代码行数:11,代码来源:ui.cpp

示例15: caml_curses_scrollok

value caml_curses_scrollok(value mlwindow, value scrollable) {

   CAMLparam2(mlwindow, scrollable);
   WINDOW *window = window_of_ml(mlwindow);

   /* Update window settings */   
   scrollok(window, Bool_val(scrollable));
   
   CAMLreturn(Val_unit);

}
开发者ID:camlspotter,项目名称:my-ocaml-win,代码行数:11,代码来源:lm_ncurses.c


注:本文中的scrollok函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。