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


C++ wresize函数代码示例

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


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

示例1: win_hide_subwin

void
win_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,代码来源:window.c

示例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,代码来源:Window.cpp

示例3: call_list_resize

int
call_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,代码来源:ui_call_list.c

示例4: title_bar_resize

void
title_bar_resize(void)
{
    int cols = getmaxx(stdscr);

    wresize(win, 1, cols);
    wbkgd(win, COLOUR_TITLE_TEXT);

    _title_bar_draw();
}
开发者ID:ashleyblackmore,项目名称:profanity,代码行数:10,代码来源:titlebar.c

示例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,代码来源:napplication.cpp

示例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,代码来源:WindowManager.cpp

示例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,代码来源:frame.cpp

示例8: leave_cmdline_mode

static void
leave_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,代码来源:cmdline.c

示例9: leave_cmdline_mode

static void
leave_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,代码来源:cmdline.c

示例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,代码来源:ttypomodoro.c

示例11: progress_bar_resize

void
progress_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,代码来源:progress_bar.c

示例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,代码来源:output_visualizer.cpp

示例13: resize_windows

void
resize_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,代码来源:ui.c

示例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,代码来源:WindowManager.cpp

示例15: term_size

/* Determine the actual size of the main window. */
void
term_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,代码来源:ui.c


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