void tui_error_va(const char *prompt, const char *err, va_list vararg) { WINDOW *win = newwin(4, 70, (LINES - 4) / 2, (COLS - 70) / 2); PANEL *panel = new_panel(win); wattrset(win, ERR_BORDER_ATTR); tx_colorwin(win); tx_box(win, ACS_VLINE, ACS_HLINE); wattrset(win, ERR_PROMPT_ATTR); mvwprintw(win, 2, 2, "%s", prompt); wattrset(win, ERR_TEXT_ATTR); wmove(win, 1, 2); vw_printw(win, err, vararg); update_panels(); doupdate(); int response; do { response = wgetch(win); if (response == 12) tx_refresh_screen(); } while (response == 12); del_panel(panel); delwin(win); update_panels(); doupdate(); }
void tx_infobox(char *text, char *prompt) { WINDOW *win; PANEL *panel; int ch; win = newwin(4, 50, (LINES - 4) / 2, (COLS - 50) / 2); panel = new_panel(win); wattrset(win, INFO_BORDER_ATTR); tx_colorwin(win); tx_box(win, ACS_VLINE, ACS_HLINE); wattrset(win, INFO_TEXT_ATTR); mvwprintw(win, 1, 2, text); wattrset(win, INFO_PROMPT_ATTR); mvwprintw(win, 2, 2, prompt); update_panels(); doupdate(); do { ch = wgetch(win); if (ch == 12) tx_refresh_screen(); } while (ch == 12); del_panel(panel); delwin(win); update_panels(); doupdate(); }
void errbox(char *message, char *prompt, int *response) { WINDOW *win; PANEL *panel; win = newwin(4, 70, (LINES - 4) / 2, (COLS - 70) / 2); panel = new_panel(win); wattrset(win, ERRBOXATTR); colorwin(win); box(win, ACS_VLINE, ACS_HLINE); wmove(win, 2, 2); wprintw(win, "%s", prompt); wattrset(win, ERRTXTATTR); wmove(win, 1, 2); wprintw(win, "%s", message); update_panels(); doupdate(); do { *response = wgetch(win); if (*response == 12) refresh_screen(); } while (*response == 12); del_panel(panel); delwin(win); update_panels(); doupdate(); }
int main() { WINDOW *my_wins[3]; PANEL *my_panels[3]; PANEL *top; int ch; /* Initialize curses */ initscr();g start_color(); cbreak(); noecho(); keypad(stdscr, TRUE); /* Initialize all the colors */ init_pair(1, COLOR_RED, COLOR_BLACK); init_pair(2, COLOR_GREEN, COLOR_BLACK); init_pair(3, COLOR_BLUE, COLOR_BLACK); init_pair(4, COLOR_CYAN, COLOR_BLACK); init_wins(my_wins, 3); /* Attach a panel to each window */ /* Order is bottom up */ my_panels[0] = new_panel(my_wins[0]); /* Push 0, order: stdscr-0 */ my_panels[1] = new_panel(my_wins[1]); /* Push 1, order: stdscr-0-1 */ my_panels[2] = new_panel(my_wins[2]); /* Push 2, order: stdscr-0-1-2 */ /* Set up the user pointers to the next panel */ set_panel_userptr(my_panels[0], my_panels[1]); set_panel_userptr(my_panels[1], my_panels[2]); set_panel_userptr(my_panels[2], my_panels[0]); /* Update the stacking order. 2nd panel will be on top */ update_panels(); /* Show it on the screen */ attron(COLOR_PAIR(4)); mvprintw(LINES - 2, 0, "Use tab to browse through the windows (F1 to Exit)"); attroff(COLOR_PAIR(4)); doupdate(); top = my_panels[2]; while((ch = getch()) != KEY_F(1)) { switch(ch) { case 9: top = (PANEL *)panel_userptr(top); top_panel(top); break; } update_panels(); doupdate(); } endwin(); return 0; }
int main () { WINDOW *ventanas[3]; PANEL *paneles[3]; PANEL *top; int ch; int n_paneles=4444; /* Initialize curses */ initscr (); start_color (); cbreak (); noecho (); keypad (stdscr, TRUE); /* Initialize all the colors */ init_pair (1, COLOR_RED, COLOR_BLACK); init_pair (2, COLOR_GREEN, COLOR_BLACK); init_pair (3, COLOR_BLUE, COLOR_BLACK); init_pair (4, COLOR_CYAN, COLOR_BLACK); init_wins (ventanas, 6); /* Attach a panel to each window *//* Order is bottom up */ paneles[0] = new_panel (ventanas[0]); /* Push 0, order: stdscr-0 */ paneles[1] = new_panel (ventanas[1]); /* Push 1, order: stdscr-0-1 */ paneles[2] = new_panel (ventanas[2]); /* Push 2, order: stdscr-0-1-2 */ /* Set up the user pointers to the next panel */ set_panel_userptr (paneles[0], paneles[1]); set_panel_userptr (paneles[1], paneles[2]); set_panel_userptr (paneles[2], paneles[0]); /* Update the stacking order. 2nd panel will be on top */ update_panels (); /* Show it on the screen */ attron (COLOR_PAIR (4)); mvprintw (LINES - 2, 0, "Q->Salir"); attroff (COLOR_PAIR (4)); doupdate (); top = paneles[2]; /* Store the top panel pointer */ while ((ch = getch ()) != 'q') { switch (ch) { case 9: top = (PANEL *) panel_userptr (top); /* Find out the next panel in the cycle */ top_panel (top); /* Make it as the top panel */ break; } update_panels (); doupdate (); } endwin (); return 0; }
int main(void) { int flag=0; initscr(); atexit(quit); clear(); noecho(); curs_set(0); cbreak(); keypad(stdscr, 1); start_color(); init_pair(1, COLOR_YELLOW, COLOR_BLUE); init_pair(2, COLOR_BLACK, COLOR_WHITE); init_pair(3, COLOR_BLACK, COLOR_YELLOW); win1 = newwin(10, 25, 5, 10); win2 = newwin(10, 25, 10, 15); box(win1, ACS_VLINE, ACS_HLINE); box(win2, ACS_VLINE, ACS_HLINE); pan1 = new_panel(win1); pan2 = new_panel(win2); bkgd(COLOR_PAIR(1)); wbkgd(win1, COLOR_PAIR(2)); wbkgd(win2, COLOR_PAIR(3)); mvaddstr(2,4, "F9 beendet das Programm"); mvwaddstr(win1, 2, 3, "Druecke eine Taste"); mvwaddstr(win2, 7, 3, "Druecke eine Taste"); update_panels(); doupdate(); while(getch() != KEY_F(9)) { if (flag==0) { top_panel(pan1); flag = 1; } else { top_panel(pan2); flag = 0; } update_panels(); doupdate(); } return (0); }
void about(void) { WINDOW *win; PANEL *panel; int ch; win = newwin(18, 62, (LINES - 17) / 2, (COLS - 62) / 2); panel = new_panel(win); tx_stdwinset(win); wtimeout(win, -1); wattrset(win, BOXATTR); tx_colorwin(win); tx_box(win, ACS_VLINE, ACS_HLINE); wattrset(win, STDATTR); mvwprintw(win, 1, 2, IPTRAF_NAME); mvwprintw(win, 2, 2, "An IP Network Statistics Utility"); mvwprintw(win, 3, 2, "Version %s", IPTRAF_VERSION); mvwprintw(win, 5, 2, "Written by Gerard Paul Java"); mvwprintw(win, 6, 2, "Copyright (c) Gerard Paul Java 1997-2004"); mvwprintw(win, 8, 2, "This program is open-source software released"); mvwprintw(win, 9, 2, "under the terms of the GNU General Public"); mvwprintw(win, 10, 2, "Public License Version 2 or any later version."); mvwprintw(win, 11, 2, "See the included LICENSE file for details."); mvwprintw(win, 13, 2, "IPv6 support by Markus Ullmann <*****@*****.**>"); mvwprintw(win, 14, 2, "inspired by 2.7.0 diff by Guy Martin <*****@*****.**>"); wattrset(win, HIGHATTR); mvwprintw(win, 16, 2, ANYKEY_MSG); update_panels(); doupdate(); do { ch = wgetch(win); if (ch == 12) tx_refresh_screen(); } while (ch == 12); del_panel(panel); delwin(win); update_panels(); doupdate(); }
void init_othp_table(struct othptable *table) { unsigned int winht; unsigned int wintop; unsigned int obmaxx __unused; winht = LINES - (LINES * 0.6) - 2; wintop = (LINES * 0.6) + 1; table->count = 0; table->lastpos = 0; table->strindex = 0; table->htstat = NOHTIND; table->head = table->tail = NULL; table->firstvisible = table->lastvisible = NULL; table->borderwin = newwin(winht, COLS, wintop, 0); table->borderpanel = new_panel(table->borderwin); wattrset(table->borderwin, BOXATTR); tx_box(table->borderwin, ACS_VLINE, ACS_HLINE); table->head = table->tail = NULL; table->othpwin = newwin(winht - 2, COLS - 2, wintop + 1, 1); table->othppanel = new_panel(table->othpwin); wattrset(table->othpwin, STDATTR); tx_colorwin(table->othpwin); update_panels(); doupdate(); tx_stdwinset(table->othpwin); getmaxyx(table->borderwin, table->obmaxy, obmaxx); table->oimaxy = table->obmaxy - 2; }
static void render_ui(ui_t *ui) { chat_tab = COLS-12; log_tab = COLS-6; render_tab_bar(ACTIVE_CHAT); ui->screen = newwin(LINES - 6, COLS - 1, 1, 1); scrollok(ui->screen, TRUE); box(ui->screen, 0, 0); ui->next_line = 1; CHAT = new_panel(ui->screen); chat_history = ui_history_create(); ui->log = newwin(LINES - 6, COLS - 1, 1, 1); scrollok(ui->log, TRUE); box(ui->log, 0, 0); ui->next_log_line = 1; LOG = new_panel(ui->log); log_history = ui_history_create(); ui->alert = newwin(3, COLS, 1, 0); ALERT = new_panel(ui->alert); set_panel_userptr(CHAT, LOG); set_panel_userptr(LOG, ALERT); set_panel_userptr(ALERT, CHAT); top_panel(CHAT); hide_panel(LOG); hide_panel(ALERT); update_panels(); doupdate(); ui->prompt = newwin(4, COLS - 1, LINES - 5, 1); show_prompt(ui, NULL); }
static void listmode_done (void) { destroy_dlg (listmode_dlg); if (0) update_panels (UP_OPTIMIZE, UP_KEEPSEL); repaint_screen (); }
static void chown_done (void) { if (need_update) update_panels (UP_OPTIMIZE, UP_KEEPSEL); repaint_screen (); }
void edit_symlink_cmd (void) { if (S_ISLNK (selection (current_panel)->st.st_mode)) { char buffer[MC_MAXPATHLEN]; char *p = NULL; int i; char *q; vfs_path_t *p_vpath; p = selection (current_panel)->fname; p_vpath = vfs_path_from_str (p); q = g_strdup_printf (_("Symlink '%s\' points to:"), str_trunc (p, 32)); i = readlink (p, buffer, MC_MAXPATHLEN - 1); if (i > 0) { char *dest; buffer[i] = 0; dest = input_expand_dialog (_("Edit symlink"), q, MC_HISTORY_FM_EDIT_LINK, buffer, INPUT_COMPLETE_FILENAMES); if (dest) { if (*dest && strcmp (buffer, dest)) { save_cwds_stat (); if (mc_unlink (p_vpath) == -1) { message (D_ERROR, MSG_ERROR, _("edit symlink, unable to remove %s: %s"), p, unix_error_string (errno)); } else { vfs_path_t *dest_vpath; dest_vpath = vfs_path_from_str_flags (dest, VPF_NO_CANON); if (mc_symlink (dest_vpath, p_vpath) == -1) message (D_ERROR, MSG_ERROR, _("edit symlink: %s"), unix_error_string (errno)); vfs_path_free (dest_vpath); } update_panels (UP_OPTIMIZE, UP_KEEPSEL); repaint_screen (); } g_free (dest); } } g_free (q); vfs_path_free (p_vpath); } else { message (D_ERROR, MSG_ERROR, _("'%s' is not a symbolic link"), selection (current_panel)->fname); } }
void do_edit_at_line (const char *what, gboolean internal, int start_line) { static const char *editor = NULL; #ifdef USE_INTERNAL_EDIT if (internal) edit_file (what, start_line); else #else (void) start_line; #endif /* USE_INTERNAL_EDIT */ { if (editor == NULL) { editor = getenv ("EDITOR"); if (editor == NULL) editor = get_default_editor (); } execute_with_vfs_arg (editor, what); } if (mc_global.mc_run_mode == MC_RUN_FULL) update_panels (UP_OPTIMIZE, UP_KEEPSEL); #ifdef USE_INTERNAL_EDIT if (use_internal_edit) dialog_switch_process_pending (); else #endif /* USE_INTERNAL_EDIT */ repaint_screen (); }
static void bw_show_value (float val, bw_show_t *bw, int idx) { float w; int pos; float delta; float minval,maxval; WINDOW *bw_bar_w = panel_window (bw->bar_p[idx]); WINDOW *bw_cell_w = panel_window (bw->cell_p[idx]); PANEL *bw_slider_p = bw->slider_p[idx]; minval = 0.01; maxval = 5.00; delta = maxval - minval; w = getmaxx (bw_bar_w) - 1; pos = (w/delta) * val; if (val >= minval && val <=maxval) { move_panel (bw_slider_p,getbegy (panel_window (bw_slider_p)),getbegx (bw_bar_w) + pos ); } mvwprintw (bw_cell_w,0,0,"%f",val); update_panels (); doupdate (); return; }
int main() { WINDOW *my_wins[3]; PANEL *my_panels[3]; int lines = 10, cols = 40, y = 2, x = 4, i; initscr(); cbreak(); noecho(); my_wins[0] = newwin(lines, cols, y, x); my_wins[1] = newwin(lines, cols, y + 1, x + 5); my_wins[2] = newwin(lines, cols, y + 2, x + 10); for(i = 0; i < 3; i++) box(my_wins[i], 0, 0); my_panels[0] = new_panel(my_wins[0]); my_panels[1] = new_panel(my_wins[1]); my_panels[2] = new_panel(my_wins[2]); update_panels(); doupdate(); getch(); endwin(); return 0; }
void selectiface(char *ifname, int withall, int *aborted) { int ch; struct iflist *list; struct iflist *ptmp; struct scroll_list scrolllist; initiflist(&list); if (list == NULL) { no_ifaces_error(); *aborted = 1; return; } if ((withall) && (list != NULL)) { ptmp = xmalloc(sizeof(struct iflist)); strncpy(ptmp->ifname, "All interfaces", sizeof(ptmp->ifname)); ptmp->ifindex = 0; rate_init(&ptmp->rate, 5); /* FIXME: need iflist_entry_init() */ ptmp->prev_entry = NULL; list->prev_entry = ptmp; ptmp->next_entry = list; list = ptmp; } tx_listkeyhelp(STDATTR, HIGHATTR); ptmp = list; tx_init_listbox(&scrolllist, 24, 14, (COLS - 24) / 2 - 9, (LINES - 14) / 2, STDATTR, BOXATTR, BARSTDATTR, HIGHATTR); tx_set_listbox_title(&scrolllist, "Select Interface", 1); while (ptmp != NULL) { tx_add_list_entry(&scrolllist, (char *) ptmp, ptmp->ifname); ptmp = ptmp->next_entry; } tx_show_listbox(&scrolllist); tx_operate_listbox(&scrolllist, &ch, aborted); tx_close_listbox(&scrolllist); if (!(*aborted) && (list != NULL)) { ptmp = (struct iflist *) scrolllist.textptr->nodeptr; if ((withall) && (ptmp->prev_entry == NULL)) /* All Interfaces */ strcpy(ifname, ""); else strcpy(ifname, ptmp->ifname); } tx_destroy_list(&scrolllist); destroyiflist(list); update_panels(); doupdate(); }
void tx_addfield(struct FIELDLIST *list, unsigned int len, unsigned int y, unsigned int x, const char *initstr) { struct FIELD *newfield; newfield = xmalloc(sizeof(struct FIELD)); if (list->list == NULL) { list->list = newfield; newfield->prevfield = newfield; newfield->nextfield = newfield; } else { newfield->prevfield = list->list->prevfield; list->list->prevfield->nextfield = newfield; list->list->prevfield = newfield; newfield->nextfield = list->list; } newfield->xpos = x; newfield->ypos = y; newfield->len = len; newfield->tlen = strlen(initstr); newfield->buf = xmallocz(len + 1); strncpy(newfield->buf, initstr, len); if (newfield->tlen > (len)) newfield->tlen = len; wattrset(list->fieldwin, list->fieldattr); mvwprintw(list->fieldwin, y, x, "%-*s", len, newfield->buf); update_panels(); doupdate(); }
/** * Regular handling of a key-press. */ static void handle_key(volatile struct readline_session_context *ctx, wint_t wc) { if (ctx->no_bufspc) { term_beep(); return; } if (hiLim_isset(ctx->act)) { magic_swap_panels(ctx, true); } if (ctx->insert_mode) { wchar_t *ptr = &ctx->buffer[ctx->bufpos]; struct current_cursor_pos yx; (void) wmemmove(ptr + 1, ptr, wcslen(ptr)); *ptr = wc; ctx->bufpos++, ctx->n_insert++; readline_winsch(ctx->act, wc); yx = term_get_pos(ctx->act); if (wmove(ctx->act, yx.cury, yx.curx + 1) == ERR) { readline_error(EPERM, "wmove"); } } else { ctx->buffer[ctx->bufpos] = wc; ctx->bufpos++, ctx->n_insert++; readline_waddch(ctx->act, wc); } update_panels(); (void) doupdate(); }
static void printdetlabels(WINDOW * win) { wattrset(win, BOXATTR); mvwprintw(win, 2, 14, " Total Total Incoming Incoming Outgoing Outgoing"); mvwprintw(win, 3, 14, "Packets Bytes Packets Bytes Packets Bytes"); wattrset(win, STDATTR); mvwprintw(win, 4, 2, "Total:"); mvwprintw(win, 5, 2, "IPv4:"); mvwprintw(win, 6, 2, "IPv6:"); mvwprintw(win, 7, 2, "TCP:"); mvwprintw(win, 8, 2, "UDP:"); mvwprintw(win, 9, 2, "ICMP:"); mvwprintw(win, 10, 2, "Other IP:"); mvwprintw(win, 11, 2, "Non-IP:"); mvwprintw(win, 14, 2, "Total rates:"); mvwprintw(win, 17, 2, "Incoming rates:"); mvwprintw(win, 20, 2, "Outgoing rates:"); mvwprintw(win, 14, 45, "Broadcast packets:"); mvwprintw(win, 15, 45, "Broadcast bytes:"); mvwprintw(win, 19, 45, "IP checksum errors:"); update_panels(); doupdate(); }
void tx_hide_listbox(struct scroll_list *list) { hide_panel(list->panel); hide_panel(list->borderpanel); update_panels(); doupdate(); }
bool InputForm::Init() { field = (FIELD **)calloc(choices*2+1, sizeof(FIELD *)); for (int i = 0; i < choices; ++i) { field[2*i] = new_field(1, 30, 4+i*2, 2, 02, 02); field[2*i+1] = new_field(1, 20, 4+i*2, 30, 02, 02); set_field_back(field[2*i+1], A_UNDERLINE); field_opts_off(field[2*i+1], O_AUTOSKIP); set_field_buffer(field[2*i], 0, itemNames[i].c_str()); set_field_back(field[2*i], O_EDIT); } field[choices*2] = NULL; form = new_form(field); scale_form(form, &formRows, &formCols); win = newwin(formRows+8, formCols+20, LINES/2-formRows/2 -6, COLS/2-10-formCols/2); keypad(win, TRUE); set_form_win(form, win); set_form_sub(form, derwin(win, formRows, formCols, 2, 2)); box(win, 0, 0); wattron(win, COLOR_PAIR(1)); mvwprintw(win, 0, formCols/2+8-title.size()/2, "%s", title.c_str()); wattroff(win, COLOR_PAIR(1)); post_form(form); panel = new_panel(win); switchOkCancle(); update_panels(); doupdate(); form_driver(form, REQ_NEXT_FIELD); return true; }
void SCREEN_refresh() { if (!NCURSES_RUNNING) return; update_panels(); doupdate(); }
/* Create a new window Window() */ int lui_new_window(lua_State *L) { int width = luaL_checkint(L, 1); int height = luaL_checkint(L, 2); int begin_x = luaL_checkint(L, 3); int begin_y = luaL_checkint(L, 4); WINDOW *win; PANEL *pan; win = newwin(height, width, begin_y, begin_x); wrefresh(win); pan = new_panel(win); update_panels(); wnoutrefresh(win); doupdate(); *((PANEL **) lua_newuserdata(L, sizeof(pan))) = pan; /* set instance metatable to registered methods */ luaL_getmetatable(L, WINDOW_CLASS); lua_setmetatable(L, -2); return 1; }
void pbupdate(double dlnow, double dltotal) { char bar[51]; int bars = (int)((dlnow/dltotal)*50.0); if (bars > 50) bars = 50; // Shouldn't be possible, but... int i; for (i = 0; i < bars; i++) bar[i] = '='; bar[i] = 0; time_t tnow = time(NULL); double speed = dlnow / (double)(tnow - progressinfo.tstart); werase(progressinfo.progwin); mvwprintw(progressinfo.progwin, 1, 1, "Downloading: %s\n", progressinfo.filename); mvwprintw(progressinfo.progwin, 2, 1, "From: %s\n", progressinfo.url); mvwprintw(progressinfo.progwin, 4, 1, "Speed: %.2lf kB/s\n", speed/1024.0); mvwprintw(progressinfo.progwin, 5, 1, "Progress: %d/%d kB (%.2lf%%)\n", (int)dlnow/1024, (int)dltotal/1024, (dlnow/dltotal)*100.0); mvwprintw(progressinfo.progwin, 6, 1, "%-50s", bar); box(progressinfo.progwin, 0, 0); update_panels(); doupdate(); }
void tx_unhide_listbox(struct scroll_list *list) { show_panel(list->panel); show_panel(list->panel); update_panels(); doupdate(); }
/** * print_tcp_stat_screen() * ------------------- * displays the main background screen **/ void print_tcp_stat_screen(WINDOW ** statwin, PANEL ** statpanel, int card, char *iface) { if (GUI_DEBUG) fprintf(stderr,"making overall window\n"); /** make the overall wireless traffic monitor box window **/ *statwin = newwin(LINES - 2, COLS, 1, 0); *statpanel = new_panel(*statwin); stdwinset(*statwin); wtimeout(*statwin, -1); wattrset(*statwin, BOXATTR); colorwin(*statwin); box(*statwin, ACS_VLINE, ACS_HLINE); wmove(*statwin, 0, 1); if (card == AIRONET) wprintw(*statwin, " TCP Performance Analysis: listening using Cisco Aironet (%s) ", iface); else if (card == PRISMII) wprintw(*statwin, " TCP Performance Analysis: listening using PrismII-compatible (%s) ", iface); else if (card == HOSTAP) wprintw(*statwin, " TCP Performance Analysis: listening using HostAP driver (%s) ", iface); else if (card == HERMES) wprintw(*statwin, " TCP Performance Analysis: listening using Hermes-compatible (%s) ", iface); else if (card == WLANNG) wprintw(*statwin, " TCP Performance Analysis: listening using Wlan-ng driver (%s) ", iface); wattrset(*statwin, STDATTR); update_panels(); doupdate(); }
void edit_file_at_line (const vfs_path_t * what_vpath, gboolean internal, long start_line) { #ifdef USE_INTERNAL_EDIT if (internal) edit_file (what_vpath, start_line); else #endif /* USE_INTERNAL_EDIT */ { static const char *editor = NULL; (void) internal; if (editor == NULL) { editor = getenv ("EDITOR"); if (editor == NULL) editor = get_default_editor (); } execute_external_editor_or_viewer (editor, what_vpath, start_line); } if (mc_global.mc_run_mode == MC_RUN_FULL) update_panels (UP_OPTIMIZE, UP_KEEPSEL); #ifdef USE_INTERNAL_EDIT if (use_internal_edit) dialog_switch_process_pending (); else #endif /* USE_INTERNAL_EDIT */ repaint_screen (); }
void shNCursesInterface::delTempWin () { hide_panel (mPan[kTemp]); del_panel (mPan[kTemp]); update_panels (); }
static void show_hostsort_keywin(WINDOW ** win, PANEL ** panel) { *win = newwin(13, 35, (LINES - 10) / 2, COLS - 40); *panel = new_panel(*win); wattrset(*win, DLGBOXATTR); tx_colorwin(*win); tx_box(*win, ACS_VLINE, ACS_HLINE); wattrset(*win, DLGTEXTATTR); mvwprintw(*win, 2, 2, "Select sort criterion"); wmove(*win, 4, 2); tx_printkeyhelp("P", " - total packets in", *win, DLGHIGHATTR, DLGTEXTATTR); wmove(*win, 5, 2); tx_printkeyhelp("I", " - IP packets in", *win, DLGHIGHATTR, DLGTEXTATTR); wmove(*win, 6, 2); tx_printkeyhelp("B", " - total bytes in", *win, DLGHIGHATTR, DLGTEXTATTR); wmove(*win, 7, 2); tx_printkeyhelp("K", " - total packets out", *win, DLGHIGHATTR, DLGTEXTATTR); wmove(*win, 8, 2); tx_printkeyhelp("O", " - IP packets out", *win, DLGHIGHATTR, DLGTEXTATTR); wmove(*win, 9, 2); tx_printkeyhelp("Y", " - total bytes out", *win, DLGHIGHATTR, DLGTEXTATTR); wmove(*win, 10, 2); tx_printkeyhelp("Any other key", " - cancel sort", *win, DLGHIGHATTR, DLGTEXTATTR); update_panels(); doupdate(); }
void print_ids_labels(WINDOW *win) { wattrset(win, BOXATTR); wmove(win, 0, 35 * COLS / 80); whline(win, ACS_HLINE, 23 * COLS / 80); wmove(win, 0, 25 * COLS / 80); wprintw(win, " Probe "); wmove(win, 0, 30 * COLS / 80); wprintw(win, " Assoc "); wmove(win, 0, 35 * COLS / 80); wprintw(win, " ReAssoc "); wmove(win, 0, 41 * COLS / 80); wprintw(win, " DisAssoc "); wmove(win, 0, 49 * COLS / 80); wprintw(win, " Auth "); wmove(win, 0, 53 * COLS / 80); wprintw(win, " DeAuth "); wmove(win, 0, 60 * COLS / 80); wprintw(win, " Status "); wmove(win, 0, 70 * COLS / 80); wprintw(win, " Diagnosis "); update_panels(); doupdate(); }