本文整理汇总了C++中del_panel函数的典型用法代码示例。如果您正苦于以下问题:C++ del_panel函数的具体用法?C++ del_panel怎么用?C++ del_panel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了del_panel函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rmpanel
void rmpanel(PANEL *pan)
{
WINDOW *win = pan->win;
del_panel(pan);
delwin(win);
}
示例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);
}
示例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();
}
示例4: closeWindow
/**
* Close window and free allocated ram
*/
void closeWindow(struct panelw *p)
{
wborder(p->win, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ');
delwin(p->win);
del_panel(p->panel);
refresh();
}
示例5: close_panel
static void close_panel(PANEL *p)
{
if (p) {
del_panel(p);
p = NULL;
}
}
示例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));
}
示例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);
}
示例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;
}
示例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");
}
}
示例10: del_panel
//--------------------------------------------------------------------
void ConWindow::close()
{
if (pan) {
del_panel(pan);
pan = NULL;
}
if (win) {
delwin(win);
win = NULL;
}
} // end ConWindow::close
示例11: SafeDelete
CWidget::~CWidget()
{
SafeDelete(_fwdDataSelect);
del_panel(_panel);
delwin(_window);
_window = 0;
_panel = 0;
SafeDelete(_layout);
}
示例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");
}
示例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;
}
示例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();
}
示例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);
}