您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ wresize函数代码示例

51自学网 2021-06-03 10:03:41
  C++
这篇教程C++ wresize函数代码示例写得很实用,希望能帮到您。

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

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

示例1: win_hide_subwin

voidwin_hide_subwin(ProfWin *window){    if (window->layout->type == LAYOUT_SPLIT) {        ProfLayoutSplit *layout = (ProfLayoutSplit*)window->layout;        if (layout->subwin) {            delwin(layout->subwin);        }        layout->subwin = NULL;        layout->sub_y_pos = 0;        int cols = getmaxx(stdscr);        wresize(layout->base.win, PAD_SIZE, cols);        win_redraw(window);    } else {        int cols = getmaxx(stdscr);        wresize(window->layout->win, PAD_SIZE, cols);        win_redraw(window);    }}
开发者ID:sizeofvoid,项目名称:profanity,代码行数:19,


示例2: wresize

	void Window::resize(int x, int y, int cols, int lines) {		wresize(this->win, lines, cols);		this->startx = x;		this->starty = y;		this->cols = cols;		this->lines = lines;		mvwin(this->win, y, x);	}
开发者ID:svkampen,项目名称:IRC,代码行数:10,


示例3: call_list_resize

intcall_list_resize(PANEL *panel){    int maxx, maxy;    // Get panel info    call_list_info_t *info = call_list_info(panel);    // Get current screen dimensions    getmaxyx(stdscr, maxy, maxx);    // Change the main window size    wresize(panel_window(panel), maxy, maxx);    // Calculate available printable area    wresize(info->list_win, maxy - 5, maxx - 4);    // Force list redraw    call_list_clear(panel);    return 0;}
开发者ID:dynax60,项目名称:sngrep,代码行数:19,


示例4: title_bar_resize

voidtitle_bar_resize(void){    int cols = getmaxx(stdscr);    wresize(win, 1, cols);    wbkgd(win, COLOUR_TITLE_TEXT);    _title_bar_draw();}
开发者ID:ashleyblackmore,项目名称:profanity,代码行数:10,


示例5: wresize

void NApplication::Private::resize (int rows, int cols) {    this->size.rows() = rows;    this->size.cols() = cols;    wresize(this->screen.get(), rows, cols);    wrefresh(this->screen.get());    if (this->topLevelWidget) {        this->topLevelWidget->resize(rows, cols);        this->topLevelWidget->update();    }}
开发者ID:Manuel4131,项目名称:junkcode,代码行数:10,


示例6: 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,


示例7: CONS_ASSERT

void frame::set_dimension(const point& dimension) {	CONS_ASSERT(handle, "inavlid handle");	if(wresize(handle.get(), dimension.y, dimension.x)==ERR) {		std::ostringstream oss;		oss << "Unable to resize frame from: " << get_dimension()		    << " to "                          << dimension;		throw CONS_MAKE_EXCEPTION(oss.str());	}	touchwin(handle.get());}
开发者ID:dobson156,项目名称:irc_client,代码行数:10,


示例8: leave_cmdline_mode

static voidleave_cmdline_mode(void){	int attr;	if(getmaxy(status_bar) > 1)	{		curr_stats.need_redraw = 2;		wresize(status_bar, 1, getmaxx(stdscr) - 19);		mvwin(status_bar, getmaxy(stdscr) - 1, 0);		if(prev_mode == MENU_MODE)		{			wresize(menu_win, getmaxy(stdscr) - 1, getmaxx(stdscr));			update_menu();		}	}	else	{		wresize(status_bar, 1, getmaxx(stdscr) - 19);	}	curs_set(FALSE);	curr_stats.save_msg = 0;	free(input_stat.line);	free(input_stat.line_buf);	clean_status_bar();	if(*mode == CMDLINE_MODE)		*mode = prev_mode;	if(*mode != MENU_MODE)		update_pos_window(curr_view);	attr = cfg.cs.color[CMD_LINE_COLOR].attr;	wattroff(status_bar, COLOR_PAIR(DCOLOR_BASE + CMD_LINE_COLOR) | attr);	if(prev_mode != MENU_MODE && prev_mode != VIEW_MODE)	{		draw_dir_list(curr_view, curr_view->top_line);		move_to_list_pos(curr_view, curr_view->list_pos);	}}
开发者ID:sklnd,项目名称:vifm,代码行数:42,


示例9: leave_cmdline_mode

static voidleave_cmdline_mode(void){	int attr;	if(getmaxy(status_bar) > 1)	{		curr_stats.need_update = UT_FULL;		wresize(status_bar, 1, getmaxx(stdscr) - FIELDS_WIDTH);		mvwin(status_bar, getmaxy(stdscr) - 1, 0);		if(prev_mode == MENU_MODE)		{			wresize(menu_win, getmaxy(stdscr) - 1, getmaxx(stdscr));			update_menu();		}	}	else	{		wresize(status_bar, 1, getmaxx(stdscr) - FIELDS_WIDTH);	}	curs_set(FALSE);	curr_stats.save_msg = 0;	free(input_stat.line);	free(input_stat.initial_line);	free(input_stat.line_buf);	clean_status_bar();	if(*mode == CMDLINE_MODE)		*mode = prev_mode;	if(*mode != MENU_MODE)		update_pos_window(curr_view);	attr = cfg.cs.color[CMD_LINE_COLOR].attr;	wattroff(status_bar, COLOR_PAIR(DCOLOR_BASE + CMD_LINE_COLOR) | attr);	if(prev_mode != MENU_MODE && prev_mode != VIEW_MODE)	{		redraw_current_view();	}}
开发者ID:ackeack,项目名称:workenv,代码行数:42,


示例10: clock_move

void clock_move(int x, int y, int w, int h){     /* Erase border for a clean move */     wbkgdset(ttyclock->framewin, COLOR_PAIR(0));     wborder(ttyclock->framewin, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ');     werase(ttyclock->framewin);     wrefresh(ttyclock->framewin);     if (ttyclock->option.date)     {          wbkgdset(ttyclock->datewin, COLOR_PAIR(0));          wborder(ttyclock->datewin, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ');          werase(ttyclock->datewin);          wrefresh(ttyclock->datewin);     }     /* Frame win move */     mvwin(ttyclock->framewin, (ttyclock->geo.x = x), (ttyclock->geo.y = y));     wresize(ttyclock->framewin, (ttyclock->geo.h = h), (ttyclock->geo.w = w));     /* Date win move */     if (ttyclock->option.date)     {          mvwin(ttyclock->datewin,                ttyclock->geo.x + ttyclock->geo.h - 1,                ttyclock->geo.y + (ttyclock->geo.w / 2) - (strlen(ttyclock->date.datestr) / 2) - 1);          wresize(ttyclock->datewin, DATEWINH, strlen(ttyclock->date.datestr) + 2);          if (ttyclock->option.box) {            box(ttyclock->datewin,  0, 0);          }     }     if (ttyclock->option.box)     {        box(ttyclock->framewin, 0, 0);     }     wrefresh(ttyclock->framewin);     wrefresh(ttyclock->datewin);      return;}
开发者ID:pato,项目名称:tty-pomodoro,代码行数:42,


示例11: progress_bar_resize

voidprogress_bar_resize(struct progress_bar *p, unsigned width, int y, int x){	assert(p != NULL);	p->window.cols = width;	wresize(p->window.w, 1, width);	mvwin(p->window.w, y, x);	progress_bar_calc(p);}
开发者ID:djrtl,项目名称:ncmpc-dj,代码行数:11,


示例12: getmaxyx

void taylortrack::vis::OutputVisualizer::handle_resize() {  int rows, cols;  // retrieve window size  getmaxyx(stdscr, rows, cols);  if (rows != this->rows_ || cols != this->cols_) {    if (this->show_top_window_) {      wresize(this->top_window_, 4, cols);      wresize(this->main_window_, rows - 4, cols);      if (cols != this->cols_) {        this->update_top_window();      }    } else {      wresize(this->main_window_, rows, cols);    }    this->rows_ = rows;    this->cols_ = cols;  }}
开发者ID:Dasug,项目名称:TaylorTrack,代码行数:20,


示例13: resize_windows

voidresize_windows(){	struct window_dimensions *dimensions;	set_status_window_size();	dimensions = status_win_dimensions;	wresize(status_win, dimensions->height, dimensions->width);	mvwin(status_win, dimensions->starty, dimensions->startx);	wclear(status_win);	box(status_win, 0, 0);	show_status();	wrefresh(status_win);	set_main_window_size();	dimensions = main_win_dimensions;	wresize(main_win, dimensions->height, dimensions->width);	handle_resize(main_win);	show_files(main_win);}
开发者ID:estibi,项目名称:audioplayer,代码行数:20,


示例14: 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,


示例15: term_size

/* Determine the actual size of the main window. */voidterm_size (WINDOW * main_win, int *main_win_height){  int term_h = 0, term_w = 0;  getmaxyx (stdscr, term_h, term_w);  *main_win_height = term_h - (MAX_HEIGHT_HEADER + MAX_HEIGHT_FOOTER);  wresize (main_win, *main_win_height, term_w);  wmove (main_win, *main_win_height, 0);}
开发者ID:charpty,项目名称:goaccess,代码行数:12,


示例16: wresize

void CTabWidget::setSize(uint width, uint height){	_size.set(width, height);	wresize(_window, height, width);	replace_panel(_panel, _window);	for(vector<CWidget *>::const_iterator i = _widgets.begin(); i != _widgets.end(); ++i)		(*i)->setSize(width, height - 1);	_changed = true;}
开发者ID:ProDotaTrY,项目名称:ghostcb,代码行数:12,


示例17: handle_window_resizing

void handle_window_resizing(){  Position act_term_size;  // stdscr is global variable from ncurses library for main screen  getmaxyx(stdscr, act_term_size.y, act_term_size.x);  if (act_term_size.y != term_size.y || act_term_size.x != term_size.x)  {    check_term_size();        term_size.x = act_term_size.x;    term_size.y = act_term_size.y;        computer.x = term_size.x-2;        wresize(info, INFO_HEIGHT, term_size.x);    wresize(field, term_size.y - INFO_HEIGHT, term_size.x);        wclear(stdscr);  }}
开发者ID:sasvarizoli,项目名称:SNP15,代码行数:21,


示例18: create_or_move_display_separator

static void create_or_move_display_separator(int height, int x){	if (!display_sep) {		display_sep = newwin(height, 1, 0, x);		if (!display_sep)			die("Failed to create separator window");	} else {		wresize(display_sep, height, 1);		mvwin(display_sep, 0, x);	}}
开发者ID:noscripter,项目名称:tig,代码行数:12,


示例19: DEBUG_ui

void CWidget::setSize(uint width, uint height){	DEBUG_ui("CWidget::setSize [" + _name + "]");	_size.set(width, height);	wresize(_window, height, width);	replace_panel(_panel, _window);	if(_layout)		_layout->setSize(width, height);	_changed = true;}
开发者ID:ProDotaTrY,项目名称:ghostcb,代码行数:13,


示例20: ui

void ui(void)  {    int  max_x, max_y;    getmaxyx ( stdscr, max_y, max_x );    if ( mx != max_x || my != max_y )      {        mx = max_x;        my = max_y;        wresize ( vi_w, 10, max_x );        mvwin ( vi_w, 0, 0 );        wresize ( log_w, max_y- 10 - 3, max_x );        mvwin ( log_w, 10, 0 );        wresize ( log_iw, max_y- 10 - 3-2, max_x-2 );        mvwin ( log_iw, 11, 1 );        wresize ( shell_w, 3, max_x );        mvwin ( shell_w, 10+max_y- 10 - 3, 0 );        box ( vi_w, 0, 0 );        mvwprintw ( vi_w, 0, 1, " Samu's visual imagery " );        box ( log_w, 0, 0 );        mvwprintw ( log_w, 0, 1, " Samu's answers " );        box ( shell_w, 0, 0 );        mvwprintw ( shell_w, 0, 1, " Caregiver shell " );        mvwprintw ( shell_w, 1, 1, "Norbi> " );        wrefresh ( vi_w );        wrefresh ( log_w );        wrefresh ( log_iw );        wrefresh ( shell_w );      }  }
开发者ID:Holi60k,项目名称:judah,代码行数:39,


示例21: main

int main(int argc, char *argv[]){    int c; /* c must be int not char, because the value of KEY_RESIZE is 632. */    char buf[BUFSIZ];    enum request request;     request = REQ_VIEW_MAIN;     struct view *view;    if (argc < 2) {        printf("Usage: %s <dir/filename> <keyword>/n", argv[0]);        return;    }    signal(SIGINT, quit);    if (argc == 3) {        snprintf(buf, sizeof(buf), FIND_CMDD, argv[1], argv[2]);        string_copy(fmt_cmd, buf);    }else{        snprintf(buf, sizeof(buf), FIND_CMD, argv[1]);        string_copy(fmt_cmd, buf);    }    	init();            	while (view_driver(display[current_view], request))     {        int i;        foreach_view (view, i)            update_view(view);        c = wgetch(status_win);             request = get_request(c);                if ( request == REQ_SCREEN_RESIZE) {            int height, width;            getmaxyx(stdscr, height, width);            wresize(status_win, 1, width);            mvwin(status_win, height - 1, 0);            wrefresh(status_win);        }    }	quit(0);    return 0;}
开发者ID:lexuszhi1990,项目名称:hen,代码行数:51,


示例22: pad_resize

/*  * Needed for SIGWINCH handling. */void pad_resize(void){	set_size(main_pad);	if(!main_pad->wd) return;//	wresize(border_wd, main_pad->size_y-PAD_Y+3, main_pad->size_x-PAD_X+3);	wresize(border_wd, BORDER_ROWS+1, BORDER_COLS+1);	werase(border_wd);	box(border_wd, ACS_VLINE, ACS_HLINE);	print_titles();	wbkgd(main_pad->wd, COLOR_PAIR(8));	werase(main_pad->wd);	pad_draw();	pad_refresh();}	
开发者ID:svn2github,项目名称:whowatch,代码行数:17,


示例23: hi_ncurses_fpager_resize

void hi_ncurses_fpager_resize(hi_ncurses_fpager *pager,                              int height, int width,                              int y, int x){  pager->x = x;  pager->y = y;  pager->width = width;  pager->height = height;  update_bytes_per_line(pager);  wresize(pager->window,height, width);  mvwin(pager->window, y, x);  box(pager->window, 0, 0);  werase(pager->window);}
开发者ID:jenf,项目名称:hexinspector,代码行数:14,


示例24: handle_resize

void handle_resize() /* {{{ */{	/* handle a change in screen size */	int pagerheight;	/* make sure rows and cols are set correctly */	rows = getmaxy(stdscr);	cols = getmaxx(stdscr);	/* resize windows */	wresize(header, 1, cols);	wresize(tasklist, rows-2, cols);	wresize(statusbar, 1, cols);	/* move to proper positions */	mvwin(header, 0, 0);	mvwin(tasklist, 1, 0);	mvwin(statusbar, rows-1, 0);	/* handle pager */	if (pager != NULL)	{		pagerheight = getmaxy(pager);		if (pagerheight > rows-2)			pagerheight = rows-2;		wresize(pager, pagerheight, cols);		mvwin(pager, rows-pagerheight-1, 0);	}	/* redraw windows */	tasklist_print_task_list();	print_header();	/* message about resize */	tnc_fprintf(logfp, LOG_DEBUG, "window resized to y=%d x=%d", rows, cols);	statusbar_message(cfg.statusbar_timeout, "window resized to y=%d x=%d", rows, cols);} /* }}} */
开发者ID:skn,项目名称:tasknc,代码行数:37,


示例25: redraw_sort_dialog

voidredraw_sort_dialog(void){	int x, y, cy;	y = (getmaxy(stdscr) - ((top + SK_COUNT) - 2 + 3))/2;	x = (getmaxx(stdscr) - SORT_WIN_WIDTH)/2;	wresize(sort_win, MIN(getmaxy(stdscr), SK_COUNT + 6), SORT_WIN_WIDTH);	mvwin(sort_win, MAX(0, y), x);	werase(sort_win);	box(sort_win, 0, 0);	mvwaddstr(sort_win, 0, (getmaxx(sort_win) - 6)/2, " Sort ");	mvwaddstr(sort_win, top - 2, 2, " Sort files by:");	cy = top;	mvwaddstr(sort_win, cy++, 2, " [   ] e Extension");	mvwaddstr(sort_win, cy++, 2, " [   ] f File Extension");	mvwaddstr(sort_win, cy++, 2, " [   ] n Name");	mvwaddstr(sort_win, cy++, 2, " [   ] N Name (ignore case)");	mvwaddstr(sort_win, cy++, 2, " [   ] t Type");	mvwaddstr(sort_win, cy++, 2, " [   ] d Dir");#ifndef _WIN32	mvwaddstr(sort_win, cy++, 2, " [   ] r Group ID");	mvwaddstr(sort_win, cy++, 2, " [   ] R Group Name");	mvwaddstr(sort_win, cy++, 2, " [   ] M Mode");	mvwaddstr(sort_win, cy++, 2, " [   ] p Permissions");	mvwaddstr(sort_win, cy++, 2, " [   ] o Owner ID");	mvwaddstr(sort_win, cy++, 2, " [   ] O Owner Name");	mvwaddstr(sort_win, cy++, 2, " [   ] L Links Count");	mvwaddstr(sort_win, cy++, 2, " [   ] I Inode");#endif	mvwaddstr(sort_win, cy++, 2, " [   ] s Size");	mvwaddstr(sort_win, cy++, 2, " [   ] i Item Count");	mvwaddstr(sort_win, cy++, 2, " [   ] u Groups");	mvwaddstr(sort_win, cy++, 2, " [   ] T Link Target");	mvwaddstr(sort_win, cy++, 2, " [   ] a Time Accessed");#ifndef _WIN32	mvwaddstr(sort_win, cy++, 2, " [   ] c Time Changed");#else	mvwaddstr(sort_win, cy++, 2, " [   ] c Time Created");#endif	mvwaddstr(sort_win, cy++, 2, " [   ] m Time Modified");	mvwaddstr(sort_win, cy++, 2, " [   ] S Star Rating");  //add by sim1	assert(cy - top == SK_COUNT && "Sort dialog and sort options should not diverge");	print_at_pos();	ui_refresh_win(sort_win);}
开发者ID:phantasea,项目名称:vifm,代码行数:49,


示例26: win_resize

voidwin_resize(ProfWin *window){    int cols = getmaxx(stdscr);    if (window->layout->type == LAYOUT_SPLIT) {        ProfLayoutSplit *layout = (ProfLayoutSplit*)window->layout;        if (layout->subwin) {            int subwin_cols = 0;            if (window->type == WIN_CONSOLE) {                subwin_cols = win_roster_cols();            } else if (window->type == WIN_MUC) {                subwin_cols = win_occpuants_cols();            }            wbkgd(layout->base.win, theme_attrs(THEME_TEXT));            wresize(layout->base.win, PAD_SIZE, cols - subwin_cols);            wbkgd(layout->subwin, theme_attrs(THEME_TEXT));            wresize(layout->subwin, PAD_SIZE, subwin_cols);            if (window->type == WIN_CONSOLE) {                rosterwin_roster();            } else if (window->type == WIN_MUC) {                ProfMucWin *mucwin = (ProfMucWin *)window;                assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK);                occupantswin_occupants(mucwin->roomjid);            }        } else {            wbkgd(layout->base.win, theme_attrs(THEME_TEXT));            wresize(layout->base.win, PAD_SIZE, cols);        }    } else {        wbkgd(window->layout->win, theme_attrs(THEME_TEXT));        wresize(window->layout->win, PAD_SIZE, cols);    }    win_redraw(window);}
开发者ID:sizeofvoid,项目名称:profanity,代码行数:36,


示例27: ui_resize

static void ui_resize(Ui *ui) {	struct winsize ws;	int width, height;	if (ioctl(STDERR_FILENO, TIOCGWINSZ, &ws) == -1) {		getmaxyx(stdscr, height, width);	} else {		width = ws.ws_col;		height = ws.ws_row;	}	resizeterm(height, width);	wresize(stdscr, height, width);	ui_resize_to(ui, width, height);}
开发者ID:EgoIncarnate,项目名称:vis,代码行数:15,


示例28: vtMove

void vtMove(int index, int x, int y, int width, int height) {	struct virtualTerminal *vt;	char message[64];	vt = virtualTerminals[index];	if(vt != NULL) {		vt->x = x;		vt->y = y;		if(vt->wBorder) {			wresize(vt->wBorder, height, width);			wnoutrefresh(vt->wBorder);		}		height--; // because of title window		vt->width = width;		vt->height = height;		wresize(vt->window, height, width);		wnoutrefresh(vt->window);		// move windows		//		// resize ncurses windows		// send resize signal to app (will bash pass signal on to child?)		// is there any way to check if bash has a child process?		VTCore_set_screen_size(vt->core, width, height);		/*		vtScrollRegion(vt, 0, height);		snprintf(message, 63, "export LINES=%d /n", height);		vtSend(index, message);		snprintf(message, 63, "export COLUMNS=%d /n", width);		vtSend(index, message);		*/		//kill(to->pid, SIGWINCH);		// re-number terminal in wBorder	}}
开发者ID:alanszlosek,项目名称:knox,代码行数:36,



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


C++ write16函数代码示例
C++ wrapper函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。