• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ scrollok函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: draw_log_window

static void draw_log_window(void)
{
	idlok(win_txt, FALSE);
	/* Get scrolling */
	scrollok(win_txt, TRUE);

	/* Leave cursor where it was */
	leaveok(win_txt, TRUE);
	wbkgd(win_txt, COLOR_PAIR(BLACK_ON_CYAN));
	wrefresh(win_txt);
}
开发者ID:nvf-crucio,项目名称:PROX,代码行数:11,代码来源:display.c


示例17: printe

static void printe(const char *msg){
   scrollok(winmsg, FALSE);
   cbreak();
   refi();
   wprintw(winses, "%s: %m\n", msg);
   wprintw(winses, "Exiting...");
   refo();
   geti();
   endwin();
   exit(EXIT_FAILURE);
}
开发者ID:abudawud,项目名称:uchat,代码行数:11,代码来源:uchat.c


示例18: setup_ncurses

static void setup_ncurses() {
    SCREEN* main_screen = newterm(term_type, stdout, term_in);
    set_term(main_screen);
    scrollok(stdscr, TRUE);  // If enabled the window is scrolled up one line when reaching bottom
    idlok(stdscr, TRUE);     // Use the hardware insert/delete line feature of terminals so equipped
    ncurses_active = TRUE;
    //printf("\t\t\t\t\tncurses set up.\n");
    if (signal(SIGWINCH, catch_sigwinch) == SIG_ERR) {
        fputs("\t\t\t\t\tAn error occurred when setting up SIGWINCH signal handler.\n", stderr);
    }
}    // Done setting up ncurses
开发者ID:DanCard,项目名称:5lines,代码行数:11,代码来源:5lines.c


示例19: start_graph

void	start_graph(void)
{
	initscr();
	raw();
	color_init();
	curs_set(0);
	cbreak();
	noecho();
	nodelay(stdscr, TRUE);
	scrollok(stdscr, TRUE);
	draw_border();
}
开发者ID:mklon,项目名称:Corewar,代码行数:12,代码来源:v_first.c


示例20: Q_UNUSED

void NYView::guiScroll(int dx, int dy)
{
    Q_UNUSED(dx); //TODO

    if(dy >= getLinesVisible()) {
        guiPaintEvent(YSelection(YInterval(YCursor(0, 0), YCursor(getColumnsVisible() - 1, getLinesVisible() - 1))));
    } else {
        scrollok(editor, true);
        wscrl(editor, dy);
        scrollok(editor, false);
        int top = 0;
        int n = qAbs(dy);

        if(dy > 0) {
            /* redraw the new bottom */
            top += getLinesVisible() - n;
        }

        guiPaintEvent(YSelection(YInterval(YCursor(0, top), YCursor(getColumnsVisible() - 1, top + n - 1))));
    }
}
开发者ID:sandsmark,项目名称:yzis,代码行数:21,代码来源:nyview.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ scsi_add_host函数代码示例发布时间:2022-05-30
下一篇:
C++ scroll_up函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap