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

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

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

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

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

示例1: wborder

void ncursesWindow::setborder(char ls, char rs, char ts, char bs, char tl, char tr, char bl, char br){    m_border->m_ls = ls;    m_border->m_rs = rs;    m_border->m_ts = ts;    m_border->m_bs = bs;    m_border->m_tl = tl;    m_border->m_tr = tr;    m_border->m_bl = bl;    m_border->m_br = br;        wborder(m_window, ls, rs, ts, bs, tl, tr, bl, br);}
开发者ID:kylelk,项目名称:warpdriveoverload,代码行数:14,


示例2: popup

void popup(const char *mes, ...){ va_list ap; va_start(ap, mes); char buff[8192]; vsprintf(buff, mes, ap); va_end(ap); std::string tmp = buff; int width = 0; int height = 2; size_t pos = tmp.find_first_of('/n'); while (pos != std::string::npos) {  height++;  if (pos > width)   width = pos;  tmp = tmp.substr(pos + 1);  pos = tmp.find_first_of('/n'); } if (width == 0 || tmp.length() > width)  width = tmp.length(); width += 2; if (height > 25)  height = 25; WINDOW* w = newwin(height + 1, width, int((25 - height) / 2),                    int((80 - width) / 2)); wborder(w, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX,            LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX ); tmp = buff; pos = tmp.find_first_of('/n'); int line_num = 0; while (pos != std::string::npos) {  std::string line = tmp.substr(0, pos);  line_num++;  mvwprintz(w, line_num, 1, c_white, line.c_str());  tmp = tmp.substr(pos + 1);  pos = tmp.find_first_of('/n'); } line_num++; mvwprintz(w, line_num, 1, c_white, tmp.c_str()); wrefresh(w); char ch; do  ch = getch(); while(ch != ' ' && ch != '/n' && ch != KEY_ESCAPE); werase(w); wrefresh(w); delwin(w); refresh();}
开发者ID:pistacchio,项目名称:Cataclysm,代码行数:50,


示例3: wgotonum

int wgotonum(int xpos, WINDOW *win) {    int orig = xpos;    /* wborder(win, 0, 0, 0, 0, 0, 0, 0, 0); */    wborder(win, '|', '|', '-', '-', '+', '+', '+', '+');    mvwprintw(win, 1, 2, "Goto base:                       ", xpos);    mvwprintw(win, 1, 13, "%-d", xpos);    for (;;) {        int c;        wrefresh(win);        switch (c = wgetch(win)) {        case '0':        case '1':        case '2':        case '3':        case '4':        case '5':        case '6':        case '7':        case '8':        case '9':            xpos = xpos * 10 + c - '0';            break;        case KEY_BACKSPACE:        case '/010':        case '/177':            xpos /= 10;            break;        case '/027': /* control w */            xpos = 0;            break;        case '/033': /* escape */            return orig;        case KEY_ENTER:        case '/012':        case '/015':            return xpos;        }        mvwprintw(win, 1, 13, "            ");        mvwprintw(win, 1, 13, "%-d", xpos);    }}
开发者ID:nathanhaigh,项目名称:staden-trunk,代码行数:50,


示例4: string_input_popup

std::string string_input_popup(std::string title, int max_length, std::string input){ std::string ret = input; int startx = title.size() + 2; WINDOW *w = newwin(3, FULL_SCREEN_WIDTH, (TERMY-3)/2,                    ((TERMX > FULL_SCREEN_WIDTH) ? (TERMX-FULL_SCREEN_WIDTH)/2 : 0)); wborder(w, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX,            LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX ); for (int i = startx + 1; i < 79; i++)  mvwputch(w, 1, i, c_ltgray, '_'); mvwprintz(w, 1, 1, c_ltred, "%s", title.c_str()); if (input != "")  mvwprintz(w, 1, startx, c_magenta, "%s", input.c_str()); int posx = startx + input.size(); mvwputch(w, 1, posx, h_ltgray, '_'); do {  wrefresh(w);  long ch = getch();  if (ch == 27) {	// Escape   werase(w);   wrefresh(w);   delwin(w);   refresh();   return "";  } else if (ch == '/n') {   werase(w);   wrefresh(w);   delwin(w);   refresh();   return ret;  } else if (ch == KEY_BACKSPACE || ch == 127) {// Move the cursor back and re-draw it   if( posx > startx ) { // but silently drop input if we're at 0, instead of adding '^'       ret = ret.substr(0, ret.size() - 1);       mvwputch(w, 1, posx, c_ltgray, '_');       posx--;       mvwputch(w, 1, posx, h_ltgray, '_');   }  } else if(ret.size() < max_length || max_length == 0) {   ret += ch;   mvwputch(w, 1, posx, c_magenta, ch);   posx++;   mvwputch(w, 1, posx, h_ltgray, '_');  } } while (true);}
开发者ID:CoZarctan,项目名称:Cataclysm-DDA,代码行数:50,


示例5: resize

void resize(YWidgetState *wid, int renderType){  CWidget *state = wid->renderStates[renderType].opac;  Entity *pos = yeGet(wid->entity, "wid-pos");  state->h = yeGetInt(yeGet(pos, "h")) * LINES / 1000;  state->w = yeGetInt(yeGet(pos, "w")) * COLS / 1000;  state->x = yeGetInt(yeGet(pos, "x")) * COLS / 1000;  state->y = yeGetInt(yeGet(pos, "y")) * LINES / 1000;  wresize(state->win, state->h, state->w);  mvwin(state->win, state->y, state->x);  wborder(state->win, '|', '|', '-','-','+','+','+','+');  refresh();}
开发者ID:cosmo-ray,项目名称:yirl,代码行数:15,


示例6: wclear

void InterfaceCLI::drawStatusWin(){    wclear(_statusWin);    wborder(_statusWin,         ACS_VLINE, ACS_VLINE, ACS_HLINE, ACS_HLINE,         ACS_ULCORNER, ACS_URCORNER, ACS_LLCORNER, ACS_LRCORNER);    wattrset(_statusWin, A_BOLD | A_UNDERLINE);    mvwprintw(_statusWin, 1, 1, "Status");    wattrset(_statusWin, A_NORMAL);    mvwprintw(_statusWin, 3, 1, "Delta (parameter)       %0.4f", _paramsDelta);    for (size_t i=0;i<_userStatus.size();i++) {        mvwprintw(_statusWin, 4+i, 1, "%s", _userStatus[i]->c_str());    }    wrefresh(_statusWin);}
开发者ID:RhobanProject,项目名称:Model,代码行数:15,


示例7: updateWindows

//Updates the window size:void updateWindows(){    //Clears the windows:    wclear(fileview.window);    wclear(fileinfo.window);    wclear(extrainfo.window);    //Gets the screen size:    getmaxyx(stdscr, screenY, screenX);    //Initialises the windows:    fileview.x = 0;    fileview.y = 1;    fileview.width = screenX * 0.75;    fileview.height = screenY - 2;    fileinfo.x = fileview.width + 1;    fileinfo.y = 1;    fileinfo.width = (screenX - fileview.width) - 1;    fileinfo.height = ((screenY - 2) * 0.75) - 1;    extrainfo.x = fileinfo.x;    extrainfo.y = fileinfo.y + fileinfo.height;    extrainfo.width = fileinfo.width;    extrainfo.height = (screenY - fileinfo.height) - 2;    //Creates new window objects with the new values:    fileview.window = newwin(fileview.height, fileview.width, fileview.y, fileview.x);    fileinfo.window = newwin(fileinfo.height, fileinfo.width, fileinfo.y, fileinfo.x);    extrainfo.window = newwin(extrainfo.height, extrainfo.width, extrainfo.y, extrainfo.x);    //Creates a border around each of the windows:    wborder(fileview.window, '|', '|', '-', '-', '+', '+', '+', '+');    wborder(fileinfo.window, '|', '|', '-', '-', '+', '+', '+', '+');    wborder(extrainfo.window, '|', '|', '-', '-', '+', '+', '+', '+');}
开发者ID:kirbyUK,项目名称:trilobite,代码行数:37,


示例8: SCW_Border

static int SCW_Border( lua_State *L ){	WINDOW **w = checkSelCWindow(L);	chtype ls, rs, ts, bs, tl, tr, bl, br;	ls = rs = ts = bs = tl = tr = bl = br = 0;/* TODO :Here argument reading from an associtiative table */	if(wborder( *w, ls, rs, ts, bs, tl, tr, bl, br ) == ERR){		lua_pushnil(L);		lua_pushstring(L, "wborder() returned an error");		return 2;	}	return 0;}
开发者ID:destroyedlolo,项目名称:Selene,代码行数:15,


示例9: va_start

void computer::print_error(const char *mes, ...){// Translate the printf flags va_list ap; va_start(ap, mes); char buff[6000]; vsprintf(buff, mes, ap); va_end(ap);// Print the line. wprintz(w_terminal, c_red, " %s%s", buff, "/n");// Reprint the border, in case we pushed a line over it wborder(w_terminal, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX,                     LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX ); wrefresh(w_terminal);}
开发者ID:Teddiousbear,项目名称:Cataclysm,代码行数:15,


示例10: string_input_popup

std::string string_input_popup(std::string title, int width, std::string input, std::string desc, std::string identifier, int max_length ) {  nc_color title_color = c_ltred;  nc_color desc_color = c_green;  std::vector<std::string> descformatted;  int titlesize = utf8_width(title.c_str());  int startx = titlesize + 2;  if ( max_length == 0 ) max_length = width;  int w_height=3;  int iPopupWidth = (width == 0) ? FULL_SCREEN_WIDTH : width + titlesize + 4;  if (iPopupWidth > FULL_SCREEN_WIDTH) {    iPopupWidth = FULL_SCREEN_WIDTH;  }  if ( desc.size() > 0 ) {    int twidth = utf8_width(desc.c_str());    if ( twidth > iPopupWidth-4 ) {      twidth=iPopupWidth-4;    }    descformatted = foldstring(desc, twidth);    w_height+=descformatted.size();  }  int starty=1+descformatted.size();  if ( max_length == 0 ) max_length = 1024;  int w_y=(TERMY-w_height)/2;  int w_x=((TERMX > iPopupWidth) ? (TERMX-iPopupWidth)/2 : 0);  WINDOW *w = newwin(w_height, iPopupWidth, w_y,    ((TERMX > iPopupWidth) ? (TERMX-iPopupWidth)/2 : 0));  wborder(w, LINE_XOXO, LINE_XOXO, LINE_OXOX, LINE_OXOX,             LINE_OXXO, LINE_OOXX, LINE_XXOO, LINE_XOOX );  int endx=iPopupWidth-3;  for(int i=0; i < descformatted.size(); i++ ) {    mvwprintz(w, 1+i, 1, desc_color, "%s", descformatted[i].c_str() );  }  mvwprintz(w, starty, 1, title_color, "%s", title.c_str() );  long key=0;  int pos = -1;  std::string ret = string_input_win(w, input, max_length, startx, starty, endx, true, key, pos, identifier, w_x, w_y, true );      werase(w);      wrefresh(w);      delwin(w);      refresh();  return ret;}
开发者ID:8Z,项目名称:Cataclysm-DDA,代码行数:48,


示例11: prompt_credits

void	prompt_credits(t_tetris *game){  wborder(game->credits, '|', '|', '-', '-', '/', '//', '//', '/');  wrefresh(game->credits);  attron(COLOR_PAIR(7));  if (game->score > game->highscore)    game->highscore = game->score;  mvprintw(9, 2, "High Score/t%d", game->highscore);  mvprintw(10, 2, "Score/t        %d", game->score);  mvprintw(12, 2, "Lines/t        %d", game->score_lines);  mvprintw(13, 2, "Level/t        %d", game->level);  mvprintw(15, 2, "Timer:   %d%d:%d%d", game->timer[0], game->timer[1],	   game->timer[2], game->timer[3]);  mvprintw(2 + game->board_lines, 0, "Uberti_l & Wadel_n 
C++ wchar_to_utf8_cstr函数代码示例
C++ wbkgdset函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。