本文整理汇总了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);
}
}
示例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);
}
示例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;
}
示例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();
}
示例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();
}
}
示例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);
}
示例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());
}
示例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);
}
}
示例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();
}
}
示例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;
}
示例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);
}
示例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;
}
}
示例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);
}
示例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);
}
示例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);
}