• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ del_panel函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: rmpanel

void rmpanel(PANEL *pan)
{
    WINDOW *win = pan->win;

    del_panel(pan);
    delwin(win);
}
开发者ID:ryoon,项目名称:eCos,代码行数:7,代码来源:ptest.c


示例2: curses_form_free

/*
 * Deallocate the memory used for the given curses form and all of the
 * widgets it contains.  Note that this only frees any data at the form's
 * userdata pointer IFF cleanup is non-zero.  Also, it does not cause the
 * screen to be refreshed - call curses_form_refresh(NULL) afterwards to
 * make the form disappear.
 */
void
curses_form_free(struct curses_form *cf)
{
	struct curses_widget *w, *t;

	w = cf->widget_head;
	while (w != NULL) {
		t = w->next;
		curses_widget_free(w);
		w = t;
	}

	if (cf->help_text != NULL) {
		free(cf->help_text);
	}

	if (cf->cleanup && cf->userdata != NULL) {
		free(cf->userdata);
	}

	if (cf->win != NULL) {
		del_panel(cf->pan);
		delwin(cf->win);
	}

	free(cf->title);
	AURA_FREE(cf, curses_form);
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:35,代码来源:curses_form.c


示例3: tx_errbox

void tx_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, ERR_BORDER_ATTR);
    tx_colorwin(win);
    tx_box(win, ACS_VLINE, ACS_HLINE);
    wmove(win, 2, 2);
    wattrset(win, ERR_PROMPT_ATTR);
    wprintw(win, "%s", prompt);
    wattrset(win, ERR_TEXT_ATTR);
    wmove(win, 1, 2);
    wprintw(win, "%s", message);
    update_panels();
    doupdate();

    do {
        *response = wgetch(win);
        if (*response == 12)
            tx_refresh_screen();
    } while (*response == 12);

    del_panel(panel);
    delwin(win);
    update_panels();
    doupdate();
}                                
开发者ID:SvenDowideit,项目名称:clearlinux,代码行数:31,代码来源:msgboxes.c


示例4: closeWindow

/**
 * Close window and free allocated ram
 */
void closeWindow(struct panelw *p)
{
        wborder(p->win, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ');
	delwin(p->win);
        del_panel(p->panel);
        refresh();
}
开发者ID:lucidm,项目名称:i2lcd,代码行数:10,代码来源:editlcd.c


示例5: close_panel

static void close_panel(PANEL *p)
{
	if (p) {
		del_panel(p);
		p = NULL;
	}
}
开发者ID:383530895,项目名称:linux,代码行数:7,代码来源:tui.c


示例6: rbncurs_c_del_panel

static VALUE rbncurs_c_del_panel(VALUE rb_panel) {
    VALUE panels_hash   = rb_iv_get(mPanel, "@panels_hash");
    PANEL* panel       = get_panel(rb_panel);
    VALUE panel_adress  = INT2NUM((long)(panel));
    rb_funcall(panels_hash, rb_intern("delete"), 1, panel_adress);
    rb_iv_set(rb_panel, "@destroyed", Qtrue);
    return INT2NUM(del_panel(panel));
}
开发者ID:sup-heliotrope,项目名称:ncursesw-ruby,代码行数:8,代码来源:panel_wrap.c


示例7: destroy_ui

void destroy_ui(ui_t *ui) {
  // chat panel and window
  del_panel(CHAT);
  delwin(ui->screen);
  ui_history_destroy(&chat_history);
  // log panel and window
  del_panel(LOG);
  delwin(ui->log);
  ui_history_destroy(&log_history);
  // alert panel and window
  del_panel(ALERT);
  delwin(ui->alert);
  // prompt window
  delwin(ui->prompt);

  endwin();
  free(ui);
}
开发者ID:draganglumac,项目名称:whisper-shell,代码行数:18,代码来源:ui.c


示例8: lui_destroy_window

/*
  window.__gc
  destroy the window

  Stack:
  1: the instance table
  2: the accessed key
*/
int		lui_destroy_window(lua_State *L)
{
    PANEL		*p;
    WINDOW	*w;

    p = check_window(L, 1);
    w = panel_window(p);
    del_panel(p);
    delwin(w);
    return 0;
}
开发者ID:Sarcasm,项目名称:luasoul,代码行数:19,代码来源:window.c


示例9: mydelwin

void mydelwin(NEWWIN *win)
{
	if (win)
	{
		if (win -> pwin && ERR == del_panel(win -> pwin))
			error_exit(TRUE, "del_panel() failed\n");

		if (win -> win && ERR == delwin(win -> win))
			error_exit(TRUE, "delwin() failed\n");
	}
}
开发者ID:Toeger,项目名称:f-irc,代码行数:11,代码来源:term.c


示例10: del_panel

//--------------------------------------------------------------------
void ConWindow::close()
{
    if (pan) {
        del_panel(pan);
        pan = NULL;
    }

    if (win) {
        delwin(win);
        win = NULL;
    }
} // end ConWindow::close
开发者ID:modulexcite,项目名称:vbindiff,代码行数:13,代码来源:ConWin.cpp


示例11: SafeDelete

CWidget::~CWidget()
{
	SafeDelete(_fwdDataSelect);

	del_panel(_panel);
	delwin(_window);

	_window = 0;
	_panel = 0;

	SafeDelete(_layout);
}
开发者ID:ProDotaTrY,项目名称:ghostcb,代码行数:12,代码来源:widget.cpp


示例12: panel_stack_rm

void panel_stack_rm(PANEL *panel) {
	WINDOW *win;
	
	if( (win = panel_window(panel) ) == NULL ) 
		err_exit(0, "could not get window from panel");

	if( del_panel(panel) == ERR ) 
		err_exit(0, "could not delete panel");
	
	if( delwin(win) == ERR )
		err_exit(0, "could not delete window");

}
开发者ID:cantora,项目名称:aug,代码行数:13,代码来源:panel_stack.c


示例13: value_list_free

static int value_list_free(struct value_list *vl)
{
	if (vl->panel) {
		del_panel(vl->panel);
	}
	if (vl->sub) {
		delwin(vl->sub);
	}
	if (vl->window) {
		delwin(vl->window);
	}

	return 0;
}
开发者ID:DanilKorotenko,项目名称:samba,代码行数:14,代码来源:regedit_valuelist.c


示例14: settimeout

static void settimeout(time_t *value, const char *units, int allow_zero,
		       int *aborted)
{
	WINDOW *dlgwin;
	PANEL *dlgpanel;
	struct FIELDLIST field;
	time_t tmval = 0;

	dlgwin = newwin(7, 40, (LINES - 7) / 2, (COLS - 40) / 4);
	dlgpanel = new_panel(dlgwin);

	wattrset(dlgwin, DLGBOXATTR);
	tx_colorwin(dlgwin);
	tx_box(dlgwin, ACS_VLINE, ACS_HLINE);

	wattrset(dlgwin, DLGTEXTATTR);
	wmove(dlgwin, 2, 2);
	wprintw(dlgwin, "Enter value in %s", units);
	wmove(dlgwin, 5, 2);
	stdkeyhelp(dlgwin);

	tx_initfields(&field, 1, 10, (LINES - 7) / 2 + 3, (COLS - 40) / 4 + 2,
		      DLGTEXTATTR, FIELDATTR);
	tx_addfield(&field, 3, 0, 0, "");

	do {
		tx_fillfields(&field, aborted);

		if (!(*aborted)) {
			unsigned int tm;

			tmval = 0;
			int ret = strtoul_ui(field.list->buf, 10, &tm);
			if ((ret == -1) || (!allow_zero && (tm == 0)))
				tui_error(ANYKEY_MSG, "Invalid timeout value");
			else
				tmval = tm;
		}
	} while (((!allow_zero) && (tmval == 0)) && (!(*aborted)));

	if (!(*aborted))
		*value = tmval;

	del_panel(dlgpanel);
	delwin(dlgwin);

	tx_destroyfields(&field);
	update_panels();
	doupdate();
}
开发者ID:rogerhu,项目名称:dd-wrt,代码行数:50,代码来源:options.c


示例15: call_raw_destroy

void
call_raw_destroy(PANEL *panel)
{
    call_raw_info_t *info;

    if ((info = call_raw_info(panel))) {
        // Delete panel windows
        delwin(info->pad);
        sng_free(info);
    }
    // Delete panel window
    delwin(panel_window(panel));
    // Delete panel
    del_panel(panel);
}
开发者ID:jungle-boogie,项目名称:sngrep,代码行数:15,代码来源:ui_call_raw.c


示例16: my_remove_panel

static void
my_remove_panel(PANEL ** pans, int which)
{
    if (pans[which] != 0) {
	PANEL *pan = pans[which];
	WINDOW *win = panel_window(pan);
	char *user = (char *) panel_userptr(pan);

	free(user);
	del_panel(pan);
	delwin(win);

	pans[which] = 0;
    }
}
开发者ID:Scarletts,项目名称:LiteBSD,代码行数:15,代码来源:demo_panels.c


示例17: about

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 <[email protected]>");
	mvwprintw(win, 14, 2,
		  "inspired by 2.7.0 diff by Guy Martin <[email protected]>");

	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();
}
开发者ID:ebichu,项目名称:dd-wrt,代码行数:48,代码来源:deskman.c


示例18: curses_bar_free

void
curses_bar_free(struct curses_bar *b)
{
	if (b != NULL) {
		if (b->pan != NULL) {
			del_panel(b->pan);
			if (b->win != NULL) {
				delwin(b->win);
			}
		}
		AURA_FREE(b, curses_bar);
	}

	update_panels();
	doupdate();
}
开发者ID:Key4ce,项目名称:bsdinstaller,代码行数:16,代码来源:curses_bar.c


示例19: tx_destroyfields

void tx_destroyfields(struct FIELDLIST *list)
{
	struct FIELD *ptmp = list->list;

	/* break the circular list */
	if (ptmp != NULL)
		ptmp->prevfield->nextfield = NULL;

	while (ptmp != NULL) {
		struct FIELD *pnext = ptmp->nextfield;

		free(ptmp);
		ptmp = pnext;
	}

	del_panel(list->fieldpanel);
	delwin(list->fieldwin);
}
开发者ID:bearstech,项目名称:iptraf-ng,代码行数:18,代码来源:input.c


示例20: strlen

void Screen::notice(const char* msg)
{
  const char* dismiss="Press spacebar to dismiss";
  int greater=strlen(msg)>strlen(dismiss) ? strlen(msg) : strlen(dismiss);
  int ycoord= screenHeight>1 ? screenHeight/2-2 : 0;
  int xcoord=screenWidth>greater ? screenWidth/2-greater/2-1 : 0;
  WINDOW* dialog=newwin(4,greater+2,ycoord,xcoord);
  PANEL* dialog_panel=new_panel(dialog);
    box(dialog,0,0);
  mvwprintw(dialog,1,1+(greater-strlen(msg))/2,msg);
  mvwprintw(dialog,2,1+(greater-strlen(dismiss))/2,dismiss);
  panelRefresh();
  do;
    while(getch()!=' ');
  del_panel(dialog_panel);
  delwin(dialog);
  panelRefresh();

}
开发者ID:charford,项目名称:goldrush,代码行数:19,代码来源:Screen.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ del_timer函数代码示例发布时间:2022-05-30
下一篇:
C++ del_page_from_lru_list函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap