这篇教程C++ wattrset函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中wattrset函数的典型用法代码示例。如果您正苦于以下问题:C++ wattrset函数的具体用法?C++ wattrset怎么用?C++ wattrset使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了wattrset函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: weditstr//.........这里部分代码省略......... case ERR: break; case KEY_ESC: strcpy(buf, org); /* restore original */ stop = TRUE; break; case '/n': case KEY_UP: case KEY_DOWN: stop = TRUE; break; case KEY_LEFT: if (bp > buf) bp--; break; case KEY_RIGHT: defdisp = FALSE; if (bp - buf < (int)strlen(buf)) bp++; break; case '/t': /* TAB -- because insert is broken on HPUX */ case KEY_IC: /* enter insert mode */ case KEY_EIC: /* exit insert mode */ defdisp = FALSE; insert = !insert; curs_set(insert ? 2 : 1); break; default: if (c == erasechar()) /* backspace, ^H */ { if (bp > buf) { memmove((void *)(bp - 1), (const void *)bp, strlen(bp) + 1); bp--; } } else if (c == killchar()) /* ^U */ { bp = buf; *bp = '/0'; } else if (c == wordchar()) /* ^W */ { tp = bp; while ((bp > buf) && (*(bp - 1) == ' ')) bp--; while ((bp > buf) && (*(bp - 1) != ' ')) bp--; memmove((void *)bp, (const void *)tp, strlen(tp) + 1); } else if (isprint(c)) { if (defdisp) { bp = buf; *bp = '/0'; defdisp = FALSE; } if (insert) { if ((int)strlen(buf) < field - 1) { memmove((void *)(bp + 1), (const void *)bp, strlen(bp) + 1); *bp++ = c; } } else if (bp - buf < field - 1) { /* append new string terminator */ if (!*bp) bp[1] = '/0'; *bp++ = c; } } } } curs_set(0); wattrset(wedit, oldattr); repainteditbox(wedit, (int)( bp - buf), buf); delwin(wedit); return c;}
开发者ID:Bill-Cosby,项目名称:CompSciProject,代码行数:101,
示例2: dialog_calendar/* * Display a dialog box for entering a date */intdialog_calendar(const char *title, const char *subtitle, int height, int width, int day, int month, int year){ BOX dy_box, mn_box, yr_box; int fkey; int key = 0; int key2; int step; int button = 0; int result = DLG_EXIT_UNKNOWN; WINDOW *dialog; time_t now_time = time((time_t *) 0); struct tm current; STATES state = 0; const char **buttons = dlg_ok_labels(); char *prompt = strclone(subtitle); dlg_does_output(); now_time = time((time_t *) 0); current = *localtime(&now_time); if (day < 0) day = current.tm_mday; if (month < 0) month = current.tm_mon + 1; if (year < 0) year = current.tm_year + 1900; /* compute a struct tm that matches the day/month/year parameters */ if (((year -= 1900) > 0) && (year < 200)) { /* ugly, but I'd like to run this on older machines w/o mktime -TD */ for (;;) { if (year > current.tm_year) { now_time += ONE_DAY * days_in_year(¤t, 0); } else if (year < current.tm_year) { now_time -= ONE_DAY * days_in_year(¤t, -1); } else if (month > current.tm_mon + 1) { now_time += ONE_DAY * days_in_month(¤t, 0); } else if (month < current.tm_mon + 1) { now_time -= ONE_DAY * days_in_month(¤t, -1); } else if (day > current.tm_mday) { now_time += ONE_DAY; } else if (day < current.tm_mday) { now_time -= ONE_DAY; } else { break; } current = *localtime(&now_time); } } auto_size(title, prompt, &height, &width, 0, 0); height += MIN_HIGH; if (width < MIN_WIDE) width = MIN_WIDE; print_size(height, width); ctl_size(height, width); /* FIXME: how to make this resizable? */ dialog = new_window(height, width, box_y_ordinate(height), box_x_ordinate(width)); draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr); draw_bottom_box(dialog); draw_title(dialog, title); wattrset(dialog, dialog_attr); print_autowrap(dialog, prompt, height, width); /* compute positions of day, month and year boxes */ memset(&dy_box, 0, sizeof(dy_box)); memset(&mn_box, 0, sizeof(mn_box)); memset(&yr_box, 0, sizeof(yr_box)); if (init_object(&dy_box, dialog, (width - DAY_WIDE) / 2, (height - (DAY_HIGH + BTN_HIGH + (4 * MARGIN))), DAY_WIDE, DAY_HIGH + (2 * MARGIN), draw_day, 'D') < 0 || DrawObject(&dy_box) < 0) return DLG_EXIT_ERROR; if (init_object(&mn_box, dialog, dy_box.x, dy_box.y - (HDR_HIGH + 2 * MARGIN), (DAY_WIDE / 2) - MARGIN,//.........这里部分代码省略.........
开发者ID:guadalinex-archive,项目名称:guadalinex-2005,代码行数:101,
示例3: ncurses_setupvoid ncurses_setup(struct winstruct *screen, struct satstruct *sat, struct tlmframestruct *tlmframe){ int i,j; /* Loop Counters */ int w; /* Raw Win Vert Offset */ int tlmwin; /* 0 if we are a 1 pkt bird */ char hdr_gen_txt[28]; /* Header Text */ /* Setup ncurses stuff */ initscr(); curs_set(0); /* Turn the Cursor Off */ cbreak(); /* Raw, Immediate Input */ noecho(); /* Don't Do Any Echoing */ nodelay(stdscr,TRUE); /* No Delays! */ if(has_colors() == TRUE) { start_color(); init_pair(TLM_COLOUR_HDR, COLOR_YELLOW, COLOR_BLACK); init_pair(TLM_COLOUR_CLK, COLOR_RED, COLOR_BLACK); /* also QTH */ init_pair(TLM_COLOUR_NOM, COLOR_WHITE, COLOR_BLACK); init_pair(TLM_COLOUR_STATIC, COLOR_BLACK, COLOR_CYAN); init_pair(TLM_COLOUR_DERIVED, COLOR_BLUE, COLOR_BLACK); init_pair(TLM_COLOUR_INVIS, COLOR_BLACK, COLOR_BLACK); } /* Create the clock, header, location, and binary windows. */ /* Also create their borders */ screen->hdr_win=newwin(5,25,0,28); screen->clk_win=newwin(5,29,0,0); screen->qth_win=newwin(5,28,0,52); screen->bin_win=newwin(5,80,19,0); wborder(screen->hdr_win,0,0,0,0,ACS_TTEE,ACS_TTEE,ACS_BTEE,ACS_BTEE); wborder(screen->clk_win,0,0,0,0,0,ACS_TTEE,ACS_LTEE,ACS_BTEE); wborder(screen->qth_win,0,0,0,0,ACS_TTEE,0,ACS_BTEE,ACS_RTEE); wborder(screen->bin_win,0,0,0,0,ACS_LTEE,ACS_RTEE,0,0); /* Setup non standard colours */ if (has_colors() == TRUE) { wattrset(screen->hdr_win,COLOR_PAIR(TLM_COLOUR_HDR)); wattrset(screen->clk_win,COLOR_PAIR(TLM_COLOUR_CLK)); wattrset(screen->qth_win,COLOR_PAIR(TLM_COLOUR_QTH)); } /* Now create the actual telemetry windows and panels, and border them */ /* Also add the header line, to save another for loop */ for (i=0; i<sat->tlmviews; i++) { screen->tlm_win[i]=newwin(15,80,5,0); screen->tlm_pan[i]=new_panel(screen->tlm_win[i]); wborder(screen->tlm_win[i],ACS_VLINE,ACS_VLINE,' ',ACS_HLINE,ACS_VLINE,ACS_VLINE,ACS_LTEE,ACS_RTEE); mvwprintw(screen->tlm_win[i],0,((80-strlen(sat->tlmhdr[i]))/2),sat->tlmhdr[i]); } /* Setup Any Window Headers */ strcpy(hdr_gen_txt,"APRS TELEMETRY VIEWER"); mvwprintw(screen->hdr_win,2,((25-strlen(hdr_gen_txt))/2),hdr_gen_txt); mvwprintw(screen->hdr_win,1,((25-strlen(sat->label))/2),sat->label); if (sat->frametypes>0) mvwprintw(screen->tlm_win[0],2,1,"FRAME T#NNN CH1 CH2 CH3 CH4 CH5 CMD BITS SF Z PACKET RECIEVED DATE"); else mvwprintw(screen->tlm_win[0],2,24,"T#nnn --- --- --- --- --- CMD-BITS"); /* Display the tlm labels */ if (sat->frametypes==0) tlmwin=0; else tlmwin=1; for (i=0; i<=sat->frametypes; i++) { if (i<=3) w=0; else w=2; for (j=0; j<=4; j++) { mvwprintw(screen->tlm_win[tlmwin],tlmframe[i].loc[0][j],tlmframe[i].loc[1][j],"%s",tlmframe[i].lbl[j]); switch(tlmframe[i].valtype[j]) { case TLM_VAL_TYPE_VOLT: mvwprintw(screen->tlm_win[tlmwin],tlmframe[i].loc[0][j],tlmframe[i].loc[1][j]+15,"V S"); break; case TLM_VAL_TYPE_CURR: mvwprintw(screen->tlm_win[tlmwin],tlmframe[i].loc[0][j],tlmframe[i].loc[1][j]+14,"mA S"); break; case TLM_VAL_TYPE_TEMP://.........这里部分代码省略.........
开发者ID:jpronans,项目名称:aprstlm,代码行数:101,
示例4: wattrset//--------------------------------------------------------------------void ConWindow::setAttribs(Style color){ wattrset(win, attribStyle[color]);} // end ConWindow::setAttribs
开发者ID:modulexcite,项目名称:vbindiff,代码行数:5,
示例5: dialog_inputbox/* * Display a dialog box for inputing a string */int dialog_inputbox(const char *title, const char *prompt, int height, int width, const char *init){ int i, x, y, box_y, box_x, box_width; int input_x = 0, scroll = 0, key = 0, button = -1; char *instr = dialog_input_result; WINDOW *dialog; if (!init) instr[0] = '/0'; else strcpy(instr, init);do_resize: if (getmaxy(stdscr) <= (height - 2)) return -ERRDISPLAYTOOSMALL; if (getmaxx(stdscr) <= (width - 2)) return -ERRDISPLAYTOOSMALL; /* center dialog box on screen */ x = (COLS - width) / 2; y = (LINES - height) / 2; draw_shadow(stdscr, y, x, height, width); dialog = newwin(height, width, y, x); keypad(dialog, TRUE); draw_box(dialog, 0, 0, height, width, dlg.dialog.atr, dlg.border.atr); wattrset(dialog, dlg.border.atr); mvwaddch(dialog, height - 3, 0, ACS_LTEE); for (i = 0; i < width - 2; i++) waddch(dialog, ACS_HLINE); wattrset(dialog, dlg.dialog.atr); waddch(dialog, ACS_RTEE); print_title(dialog, title, width); wattrset(dialog, dlg.dialog.atr); print_autowrap(dialog, prompt, width - 2, 1, 3); /* Draw the input field box */ box_width = width - 6; getyx(dialog, y, x); box_y = y + 2; box_x = (width - box_width) / 2; draw_box(dialog, y + 1, box_x - 1, 3, box_width + 2, dlg.border.atr, dlg.dialog.atr); print_buttons(dialog, height, width, 0); /* Set up the initial value */ wmove(dialog, box_y, box_x); wattrset(dialog, dlg.inputbox.atr); input_x = strlen(instr); if (input_x >= box_width) { scroll = input_x - box_width + 1; input_x = box_width - 1; for (i = 0; i < box_width - 1; i++) waddch(dialog, instr[scroll + i]); } else { waddstr(dialog, instr); } wmove(dialog, box_y, box_x + input_x); wrefresh(dialog); while (key != KEY_ESC) { key = wgetch(dialog); if (button == -1) { /* Input box selected */ switch (key) { case TAB: case KEY_UP: case KEY_DOWN: break; case KEY_LEFT: continue; case KEY_RIGHT: continue; case KEY_BACKSPACE: case 127: case '/b': if (input_x || scroll) { wattrset(dialog, dlg.inputbox.atr); if (!input_x) { scroll = scroll < box_width - 1 ? 0 : scroll - (box_width - 1); wmove(dialog, box_y, box_x); for (i = 0; i < box_width; i++) waddch(dialog, instr[scroll + input_x + i] ? instr[scroll + input_x + i] : ' '); input_x = strlen(instr) - scroll;//.........这里部分代码省略.........
开发者ID:andy737,项目名称:firebrickRemote,代码行数:101,
示例6: dialog_inputboxint dialog_inputbox(WINDOW *main_window, const char *title, const char *prompt, const char *init, char **resultp, int *result_len){ int prompt_lines = 0; int prompt_width = 0; WINDOW *win; WINDOW *prompt_win; WINDOW *form_win; PANEL *panel; int i, x, y; int res = -1; int cursor_position = strlen(init); int cursor_form_win; char *result = *resultp; if ((int)strlen(init)+1 > *result_len) { *result_len = strlen(init)+1; *resultp = result = realloc(result, *result_len); } /* find the widest line of msg: */ prompt_lines = get_line_no(prompt); for (i = 0; i < prompt_lines; i++) { const char *line = get_line(prompt, i); int len = get_line_length(line); prompt_width = max(prompt_width, len); } if (title) prompt_width = max(prompt_width, (int)strlen(title)); /* place dialog in middle of screen */ y = (LINES-(prompt_lines+4))/2; x = (COLS-(prompt_width+4))/2; strncpy(result, init, *result_len); /* create the windows */ win = newwin(prompt_lines+6, prompt_width+7, y, x); prompt_win = derwin(win, prompt_lines+1, prompt_width, 2, 2); form_win = derwin(win, 1, prompt_width, prompt_lines+3, 2); keypad(form_win, TRUE); (void) wattrset(form_win, attributes[INPUT_FIELD]); (void) wattrset(win, attributes[INPUT_BOX]); box(win, 0, 0); (void) wattrset(win, attributes[INPUT_HEADING]); if (title) mvwprintw(win, 0, 3, "%s", title); /* print message */ (void) wattrset(prompt_win, attributes[INPUT_TEXT]); fill_window(prompt_win, prompt); mvwprintw(form_win, 0, 0, "%*s", prompt_width, " "); cursor_form_win = min(cursor_position, prompt_width-1); mvwprintw(form_win, 0, 0, "%s", result + cursor_position-cursor_form_win); /* create panels */ panel = new_panel(win); /* show the cursor */ curs_set(1); touchwin(win); refresh_all_windows(main_window); while ((res = wgetch(form_win))) { int len = strlen(result); switch (res) { case 10: /* ENTER */ case 27: /* ESCAPE */ case KEY_F(F_HELP): case KEY_F(F_EXIT): case KEY_F(F_BACK): break; case 127: case KEY_BACKSPACE: if (cursor_position > 0) { memmove(&result[cursor_position-1], &result[cursor_position], len-cursor_position+1); cursor_position--; cursor_form_win--; len--; } break; case KEY_DC: if (cursor_position >= 0 && cursor_position < len) { memmove(&result[cursor_position], &result[cursor_position+1], len-cursor_position+1); len--; } break; case KEY_UP: case KEY_RIGHT: if (cursor_position < len) {//.........这里部分代码省略.........
开发者ID:infinitesquare-parrot,项目名称:alchemy,代码行数:101,
示例7: dialog_yesno/* * Display a dialog box with two buttons - Yes and No */int dialog_yesno(const char *title, const char *prompt, int height, int width){ int i, x, y, key = 0, button = 0; WINDOW *dialog;do_resize: if (getmaxy(stdscr) < (height + YESNO_HEIGTH_MIN)) return -ERRDISPLAYTOOSMALL; if (getmaxx(stdscr) < (width + YESNO_WIDTH_MIN)) return -ERRDISPLAYTOOSMALL; /* center dialog box on screen */ x = (getmaxx(stdscr) - width) / 2; y = (getmaxy(stdscr) - height) / 2; draw_shadow(stdscr, y, x, height, width); dialog = newwin(height, width, y, x); keypad(dialog, TRUE); draw_box(dialog, 0, 0, height, width, dlg.dialog.atr, dlg.border.atr); wattrset(dialog, dlg.border.atr); mvwaddch(dialog, height - 3, 0, ACS_LTEE); for (i = 0; i < width - 2; i++) waddch(dialog, ACS_HLINE); wattrset(dialog, dlg.dialog.atr); waddch(dialog, ACS_RTEE); print_title(dialog, title, width); wattrset(dialog, dlg.dialog.atr); print_autowrap(dialog, prompt, width - 2, 1, 3); print_buttons(dialog, height, width, 0); while (key != KEY_ESC) { key = wgetch(dialog); switch (key) { case 'Y': case 'y': delwin(dialog); return 0; case 'N': case 'n': delwin(dialog); return 1; case TAB: case KEY_LEFT: case KEY_RIGHT: button = ((key == KEY_LEFT ? --button : ++button) < 0) ? 1 : (button > 1 ? 0 : button); print_buttons(dialog, height, width, button); wrefresh(dialog); break; case ' ': case '/n': delwin(dialog); return button; case KEY_ESC: key = on_key_esc(dialog); break; case KEY_RESIZE: delwin(dialog); on_key_resize(); goto do_resize; } } delwin(dialog); return key; /* ESC pressed */}
开发者ID:21cnbao,项目名称:training,代码行数:76,
示例8: Paintvoid Paint(STATE* state){ size_t X = 0, Y = 0; attron(COLOR_PAIR(12) | A_BOLD); mvprintw(0, 0, "%s/n", gs_appname); move(state->Wy - 1, 0); for (X = 0; X < sizeof(state->keymap) / sizeof(int); X++) { attron(COLOR_PAIR(15)); printw("%s", keymap_desc[X]); attron(COLOR_PAIR(11)); printw("["); attron(COLOR_PAIR(14)); printw("%s", keyname(state->keymap[X])); attron(COLOR_PAIR(11)); printw("] "); } attroff(A_BOLD); attron(COLOR_PAIR(13)); mvprintw(state->Wy - 1, state->Wx - strlen(state->clock), "%s", state->clock); // begin painting the status window if (state->statuswin) { StatusWindowPaint(state); } // begin painting the board werase(state->fieldwin); wattrset(state->fieldwin, A_NORMAL); box(state->fieldwin, 0, 0); if (! state->pause_f || state->do_pause_blocks) { for (Y = 0; Y < state->By; Y++) { wmove(state->fieldwin, Y + 1, 1); for (X = 0; X < state->Bx; X++) { wattrset(state->fieldwin, A_NORMAL); if (state->field[state->Bx * Y + X] == CLEARED) { switch (state->do_clear) { case CLEAR_FLASH: wattron(state->fieldwin, COLOR_PAIR(rand() % 7 + 1)); break; case CLEAR_BLANK: default: break; } } else { wattron(state->fieldwin, COLOR_PAIR(state->field[state->Bx * Y + X])); } waddch(state->fieldwin, ' '); waddch(state->fieldwin, ' '); } } } if (state->pause_f) { StatusMessage(state, state->fieldwin, gs_pause); } wattrset(state->fieldwin, A_NORMAL); if (state->game_over_f) { StatusMessage(state, state->fieldwin, gs_gameover); } // paint the tetrad if (state->tetrad) TetradPaint(state->fieldwin, state->tetrad->y + 1, state->tetrad->x + 1, state->tetrad); return;}
开发者ID:KungFuJesus,项目名称:ntetris,代码行数:77,
示例9: strlenvoidshNCursesInterface::showVersion (){ const char *splash_logo[] = { /* PRIME logo designed by Psiweapon. */ ". _______________________ .", " _/ //_ ", "=| #### #### # # ##### |=", " >------#-----#-#-##-##------< ", "=| #### #### # # # ##### |=", "=| # # # # # # |=", "=|_ # # # # # ##### _|=", ". //[ ]/ ." }; const int len = strlen(splash_logo[0]); WINDOW *win; PANEL *panel; win = newwin (18, 60, 3, 10); if (!win) { return; } panel = new_panel (win); for (int y = 0; y < 8; ++y) { for (int x = 0; x < len; ++x) { if (splash_logo[y][x] == '#') { wattrset (win, ColorMap[kLime]); } else { wattrset (win, ColorMap[kGreen]); } mvwaddnstr (win, y, x + 15, &splash_logo[y][x], 1); } } wattrset (win, ColorMap[kBrown]); mvwaddstr (win, 7, 20, PRIME_VERSION"/Asbestos and webs"); mvwaddstr (win, 9, 7, "Pesky Reticulans, Improvements, More Everything"); /* The everything part includes bugs. Tell no one! -- MB */ wattrset (win, ColorMap[kYellow]); mvwaddstr (win, 9, 7, "P"); mvwaddstr (win, 9, 13, "R"); mvwaddstr (win, 9, 25, "I"); mvwaddstr (win, 9, 39, "M"); mvwaddstr (win, 9, 44, "E"); wattrset (win, ColorMap[kOrange]); mvwaddstr (win, 11, 14, "Unofficial variant of ZAPM v" ZAPM_VERSION " "); mvwaddstr (win, 12, 14, "by Psiweapon and Michal Bielinski"); wattrset (win, ColorMap[kRed]); mvwaddstr (win, 13, 13, "http://arcywidmo.republika.pl/prime/"); wattrset (win, A_NORMAL); mvwaddstr (win, 15, 15, "ZAPM (C) 2002-2010 Cyrus Dolph."); mvwaddstr (win, 16, 20, "All rights reserved."); mvwaddstr (win, 17, 20, "http://www.zapm.org"); wattrset (win, ColorMap[kLime]); wattrset (win, A_NORMAL); update_panels (); doupdate (); getChar (); hide_panel (panel); del_panel (panel); delwin (win); update_panels ();}
开发者ID:ronw23,项目名称:prime-osx,代码行数:64,
示例10: wattrsetvoidshNCursesInterface::setWinColor (Window win, shColor color){ wattrset (mWin[win], ColorMap[color]);}
开发者ID:ronw23,项目名称:prime-osx,代码行数:5,
示例11: setup_ncurses_interfaceintsetup_ncurses_interface(){ int screen_x, screen_y; int i, x, y; initscr(); noecho(); nonl(); raw(); getmaxyx(stdscr, screen_y, screen_x); /* screen is too small to be useful*/ if(screen_y < 10) finish("Terminal is too small to run vifm/n"); if(screen_x < 30) finish("Terminal is too small to run vifm/n"); if(! has_colors()) finish("Vifm requires a console that can support color./n"); start_color(); // Changed for pdcurses use_default_colors(); x = 0; for (i = 0; i < cfg.color_scheme_num; i++) { for(x = 0; x < 12; x++) init_pair(col_schemes[i].color[x].name, col_schemes[i].color[x].fg, col_schemes[i].color[x].bg); } werase(stdscr); menu_win = newwin(screen_y - 1, screen_x, 0, 0); wbkgdset(menu_win, COLOR_PAIR(WIN_COLOR)); werase(menu_win); sort_win = newwin(NUM_SORT_OPTIONS + 3, 30, (screen_y -12)/2, (screen_x -30)/2); wbkgdset(sort_win, COLOR_PAIR(WIN_COLOR)); werase(sort_win); change_win = newwin(20, 30, (screen_y -20)/2, (screen_x -30)/2); wbkgdset(change_win, COLOR_PAIR(WIN_COLOR)); werase(change_win); error_win = newwin(10, screen_x -2, (screen_y -10)/2, 1); wbkgdset(error_win, COLOR_PAIR(WIN_COLOR)); werase(error_win); /* lborder = newwin(screen_y - 2, 1, 0, 0); */ /* wbkgdset(lborder, COLOR_PAIR(BORDER_COLOR)); */ /* werase(lborder); */ if (curr_stats.number_of_windows == 1) lwin.title = newwin(0, screen_x -2, 0, 0); else lwin.title = newwin(0, screen_x/2 -1, 0, 1); /* wattrset(lwin.title, A_BOLD); */ /* wbkgdset(lwin.title, COLOR_PAIR(BORDER_COLOR)); */ /* werase(lwin.title); */ if (curr_stats.number_of_windows == 1) lwin.win = newwin(screen_y -3, screen_x -2, 1, 1); else lwin.win = newwin(screen_y -3, screen_x/2 -2, 1, 1); keypad(lwin.win, TRUE); wbkgdset(lwin.win, COLOR_PAIR(WIN_COLOR)); wattrset(lwin.win, A_BOLD); wattron(lwin.win, A_BOLD); werase(lwin.win); getmaxyx(lwin.win, y, x); lwin.window_rows = y -2; lwin.window_width = x -1; /* mborder = newwin(screen_y, 1, 0, screen_x/2 -1); */ /* wbkgdset(mborder, COLOR_PAIR(BORDER_COLOR)); */ /* werase(mborder); */ if (curr_stats.number_of_windows == 1) rwin.title = newwin(0, screen_x -2 , 0, 1); else rwin.title = newwin(1, screen_x/2+2, 0, screen_x/2-1 ); /* wbkgdset(rwin.title, COLOR_PAIR(BORDER_COLOR)); */ /* wattrset(rwin.title, A_BOLD); */ /* wattroff(rwin.title, A_BOLD); */ /* werase(rwin.title); */ if (curr_stats.number_of_windows == 1) rwin.win = newwin(screen_y - 3, screen_x -2 , 1, 1); else rwin.win = newwin(screen_y - 3, screen_x/2 -2 , 1, screen_x/2 +1); keypad(rwin.win, TRUE);//.........这里部分代码省略.........
开发者ID:BlackLight,项目名称:vifm,代码行数:101,
示例12: garmin_bin_initialize |