void font_box_switch_to_stand (Widget widget, font_box_data * client, XtPointer motif) { if (client->is_stand_mode) return; XtUnmapWidget (XtParent (client->non_stand_list)); XtMapWidget (client->frame); client->current_font_name = client->stand_fonts_list [client->current_stand_font]->name; client->is_stand_mode = 1; font_box_show_font (client); }
static void SFprepareToReturn (void) { SFstatus = SEL_FILE_NULL; XtRemoveGrab (selFile); XtUnmapWidget (selFile); XtRemoveTimeOut (SFdirModTimerId); if (SFchdir (SFstartDir)) { XtAppError (SFapp, "XsraSelFile: can't return to current directory"); } }
static void sched_back (Widget w NOTUSED, XtPointer client_data, XtPointer call_data NOTUSED) { PgmState *pgm = client_data; sched_purge (pgm); XtUnmapWidget (pgm->sched_form); XtMapWidget (pgm->main_form); }
void hide_widget(QSP_ARG_DECL Screen_Obj *sop, int yesno) { #ifdef HAVE_MOTIF // ?? BUG? should we warn for redundant calls? if( yesno ) XtUnmapWidget(sop->so_obj); else XtMapWidget(sop->so_obj); #endif // HAVE_MOTIF }
void iupdrvSetVisible(Ihandle* ih, int visible) { Widget widget = (Widget)iupAttribGet(ih, "_IUP_EXTRAPARENT"); if (!widget) widget = ih->handle; if (visible) XtMapWidget(widget); else XtUnmapWidget(widget); }
void VideoModeConfigureEnd(void) { XtUnmapWidget(vtune); if (vidtune != NULL) { XF86VidModeLockModeSwitch(XtDisplay(toplevel), vidtune->screen, False); XSetErrorHandler(XtErrorFunc); } vidtune = NULL; }
static void fav_list_dlg_back (Widget w NOTUSED, XtPointer client_data, XtPointer call_data NOTUSED) { PgmState *pgm = client_data; fav_list_dlg_purge_fav (pgm); fav_list_dlg_purge_favlist (pgm); XtUnmapWidget (pgm->favlist_form); XtMapWidget (pgm->main_form); }
static void sched_edit (Widget w NOTUSED, XtPointer client_data, XtPointer call_data NOTUSED) { PgmState *pgm = client_data; if (pgm->sched_idx == XAW_LIST_NONE) return; XtUnmapWidget (pgm->sched_form); XtMapWidget (pgm->ed_sched_form); schedEdDisplay (pgm); }
void iupdrvTabsSetCurrentTab(Ihandle* ih, int pos) { Ihandle* child = IupGetChild(ih, pos); Ihandle* prev_child = IupGetChild(ih, iupdrvTabsGetCurrentTab(ih)); Widget child_manager = (Widget)iupAttribGet(child, "_IUPTAB_CONTAINER"); Widget prev_child_manager = (Widget)iupAttribGet(prev_child, "_IUPTAB_CONTAINER"); XtMapWidget(child_manager); if (prev_child_manager) XtUnmapWidget(prev_child_manager); XtVaSetValues(ih->handle, XmNcurrentPageNumber, pos, NULL); }
void EndActFunc(Widget w, int id, int cdata) { // garbage, just to remove warning void *ptr = w; if(ptr==NULL) { cdata=cdata; } XtRemoveGrab(act.shell); XtUnmapWidget(act.shell); if (act.callBack) (act.callBack)(id); XtDestroyWidget(act.shell); act.active = 0; if (act.message) free(act.message); return; }
void unshow_panel(QSP_ARG_DECL Panel_Obj *po) { #ifdef HAVE_MOTIF if( PANEL_UNMAPPED(po) ){ sprintf(ERROR_STRING,"unshow_panel: panel %s is not currently mapped!?",PO_NAME(po)); WARN(ERROR_STRING); return; } XtUnmapWidget(po->po_frame_obj); po->po_flags &= ~PANEL_SHOWN; #endif /* HAVE_MOTIF */ }
void ScrollBarOff(register TScreen *screen) { if(!screen->fullVwin.scrollbar) return; XtUnmapWidget(screen->scrollWidget); screen->fullVwin.scrollbar = 0; DoResizeScreen (term); update_scrollbar (); if (screen->visbuf) { XClearWindow (screen->display, XtWindow (term)); Redraw (); } }
static void ChangeNoResize(Widget w, XtPointer client_data, XtPointer call_data) { Cardinal n; Arg args[MAX_ARGS]; n = 0; XtSetArg(args[n], XmNnoResize, True); n++; XtSetValues(BBoard1, args, n); XtUnmapWidget(toplevelShell); XtMapWidget(toplevelShell); }
bool wxDialog::Show( bool show ) { if( !wxWindowBase::Show( show ) ) return false; if ( !show && IsModal() ) EndModal(wxID_CANCEL); m_isShown = show; if (show) { if (CanDoLayoutAdaptation()) DoLayoutAdaptation(); // this usually will result in TransferDataToWindow() being called // which will change the controls values so do it before showing as // otherwise we could have some flicker InitDialog(); } if (show) { #if !wxUSE_INVISIBLE_RESIZE XtMapWidget(XtParent((Widget) m_mainWidget)); #else XtManageChild((Widget)m_mainWidget) ; #endif XRaiseWindow( XtDisplay( (Widget)m_mainWidget ), XtWindow( (Widget)m_mainWidget) ); } else { #if !wxUSE_INVISIBLE_RESIZE XtUnmapWidget(XtParent((Widget) m_mainWidget)); #else XtUnmanageChild((Widget)m_mainWidget) ; #endif XFlush(XtDisplay((Widget)m_mainWidget)); XSync(XtDisplay((Widget)m_mainWidget), False); } return true; }
static void day_btn_cb(Widget w, XtPointer client, XtPointer call) { XmMonthPanelCallbackStruct *cbs = (XmMonthPanelCallbackStruct *) call; Calendar *c = (Calendar *)client; int monthno, year; int date = c->view->date; invalidate_cache(c); XtVaGetValues(w, XmNmonth, &monthno, XmNyear, &year, NULL); if (cbs->type == MONTH_SELECTION) { XtUnmapWidget(c->canvas); /* * Date update: * if month chosen is not current month * set date to 1st of new month, otherwise * don't change date. */ if (month(c->view->date) != monthno) { calendar_deselect (c); c->view->olddate = c->view->date; c->view->date = monthdayyear(monthno, 1, year); c->view->nwks = numwks(c->view->date); calendar_select (c, monthSelect, NULL); } /* switch to month view */ c->view->glance = monthGlance; cleanup_after_dayview(c); prepare_to_paint_monthview(c, NULL); XtMapWidget(c->canvas); } else { /* type == DAY_SELECTION */ c->view->olddate = c->view->date; c->view->date = monthdayyear(monthno, cbs->day, year); gr_clear_area(c->xcontext, 0, 0, c->view->winw, c->view->winh); paint_dayview(c, True, NULL, False); calendar_select(c, hourSelect, (caddr_t)NULL); } }
static void fav_list_dlg_epg (Widget w NOTUSED, XtPointer client_data, XtPointer call_data NOTUSED) { PgmState *pgm = client_data; EpgArray *epga = NULL; uint32_t start, end, num_entries = 0; long num_days = 7; long tmp; if (!fav_list_dlg_valid_fav (pgm)) return; if (!rcfileFindValInt (&pgm->cfg, "EPG", "num_days", &tmp)) num_days = tmp; if (!rcfileFindValInt (&pgm->cfg, "EPG", "num_entries", &tmp)) num_entries = tmp; start = epg_get_buf_time (); if (num_days) end = start + num_days * 3600 * 24; else end = 0; epga = clientGetEpg (pgm->sock, pgm->current_fav_list->favourites[pgm->fav_idx].pos, pgm->current_fav_list->favourites[pgm->fav_idx].freq, pgm->current_fav_list->favourites[pgm->fav_idx].pol, &pgm->current_fav_list->favourites[pgm->fav_idx].pnr, 1, start, end, num_entries); pgm->epga = epga; if (NULL != epga) { //hide current dialog and show epg here pgm->pos = pgm->current_fav_list->favourites[pgm->fav_idx].pos; pgm->parent = pgm->favlist_form; pgm->frequency = pgm->current_fav_list->favourites[pgm->fav_idx].freq; pgm->pol = pgm->current_fav_list->favourites[pgm->fav_idx].pol; pgm->pnr = pgm->current_fav_list->favourites[pgm->fav_idx].pnr; pgm->svc_name = &pgm->current_fav_list->favourites[pgm->fav_idx].service_name; epgDlgDisplay (pgm); XtUnmapWidget (pgm->favlist_form); XtMapWidget (pgm->epg_form); } }
void motTabsPageChangedCallback(Widget w, Ihandle* ih, XmNotebookCallbackStruct *nptr) { if (nptr->reason == XmCR_MAJOR_TAB) { IFnnn cb; Ihandle* child = IupGetChild(ih, nptr->page_number); Ihandle* prev_child = IupGetChild(ih, nptr->prev_page_number); Widget child_manager = (Widget)iupAttribGet(child, "_IUPTAB_CONTAINER"); Widget prev_child_manager = (Widget)iupAttribGet(prev_child, "_IUPTAB_CONTAINER"); XtMapWidget(child_manager); if (prev_child_manager) XtUnmapWidget(prev_child_manager); cb = (IFnnn)IupGetCallback(ih, "TABCHANGE_CB"); if (cb) cb(ih, child, prev_child); } (void)w; }
void Container::DoBeginUpdate() { XtAddEventHandler(XtParent(_workArea), ExposureMask, FALSE, &Container::UpdateAreaMessage, (XtPointer) this); if (_container_type == SCROLLED_WORK_AREA || _container_type == WORK_AREA || _container_type == SCROLLED_ICON_LIST || _container_type == ICON_LIST) { if (XtIsRealized(_workArea)) XtUnmapWidget(_workArea); GuiWorkAreaDisableRedisplay(_workArea); XmDropSiteStartUpdate(XtParent(_workArea)); } else XtUnmanageChild(_workArea); }
void iupmotTipLeaveNotify(void) { if (mot_tips.ShowTimerId) { XtRemoveTimeOut(mot_tips.ShowTimerId); mot_tips.ShowTimerId = (XtIntervalId) NULL; } if (mot_tips.HideTimerId) { XtRemoveTimeOut(mot_tips.HideTimerId); mot_tips.HideTimerId = (XtIntervalId) NULL; } if (mot_tips.Visible) { XtUnmapWidget(mot_tips.Dialog); mot_tips.Visible = FALSE; } }
/* called from postcoms.c In the command 'destroy ac2' Will remove window associated with the plot (e.g. ac2) just before data of the plot are deleted.*/ void RemoveWindow(GRAPH *graph) { if (graph->devdep) { /* Iplots are done asynchronously */ DEVDEP(graph).isopen = 0; /* MW. Not sure but DestroyGraph might free() to much - try Xt...() first */ XtUnmapWidget(DEVDEP(graph).shell); XtDestroyWidget(DEVDEP(graph).shell); XFreeFont(display, DEVDEP(graph).font); XFreeGC(display, DEVDEP(graph).gc); } if (graph == currentgraph) currentgraph = NULL; DestroyGraph(graph->graphid); }
void ScrollBarOff(TScreen *screen) { /* if(!screen->scrollbar) return; */ if(!screen->fullVwin.sb_info.width) return; XtUnmapWidget(screen->scrollWidget); screen->fullVwin.sb_info.width=0; DoResizeScreen (term); update_scrollbar (); if (screen->visbuf) { XClearWindow (screen->display, XtWindow (term)); Redraw (); } }
/*F-------------------------------------------------------------------------- * Function: xBMcatPopup * -called by BMmain to create a cat popup * In: -the parent widget * out: - * Return: - *--------------------------------------------------------------------------- */ void xBMcatPopup(Widget parent) { extern unsigned char actiontoggle; extern BOOKMENU bm_menu[]; Widget Wcat; BOOKMENU *b; /*--- inits -----------------------------*/ b = &bm_menu[_BMCATIX]; /*--- add menu --------------------------*/ xBMmenuActiveAdd( _BMCATIX); /*--- check presence ------*/ if ( ! b->Wgpopup ) { /*--- first create one ----------*/ Wcat = xBMcatPopupCreate(parent); if (Wcat == NULL) return ; else { b->Wgpopup = Wcat; /*--- update labels with DBI-parsed parameters --*/ xBMcatPopupUpdate(); } } else { /*--- update only with new values in hide mode --*/ XtUnmapWidget(b->Wgpopup); xBMcatPopupUpdate(); XtMapWidget(b->Wgpopup); } /***** there are no toggles defined *******/ /*--- popup existent menu, set current objects and numbers ------*/ b->openedmenu = TRUE; XtPopup(b->Wgpopup, XtGrabNone); }
static void fav_list_dlg_vt (Widget w NOTUSED, XtPointer client_data, XtPointer call_data NOTUSED) { PgmState *pgm = client_data; uint8_t *vtsvc; uint16_t *vtpids; uint16_t num_pids, num_svc; //hide current dialog and show vt here if (!fav_list_dlg_valid_fav (pgm)) return; pgm->pos = pgm->current_fav_list->favourites[pgm->fav_idx].pos; pgm->parent = pgm->favlist_form; pgm->frequency = pgm->current_fav_list->favourites[pgm->fav_idx].freq; pgm->pol = pgm->current_fav_list->favourites[pgm->fav_idx].pol; pgm->pnr = pgm->current_fav_list->favourites[pgm->fav_idx].pnr; vtpids = clientVtGetPids (pgm->sock, pgm->pos, pgm->frequency, pgm->pol, pgm->pnr, &num_pids); if (NULL == vtpids) return; vtsvc = clientVtGetSvc (pgm->sock, pgm->pos, pgm->frequency, pgm->pol, vtpids[0], &num_svc); if (NULL == vtsvc) { free (vtpids); return; } //TODO: allow selection of pid/service pgm->pid = vtpids[0]; pgm->svc_id = vtsvc[0]; free (vtpids); free (vtsvc); XtUnmapWidget (pgm->favlist_form); XtMapWidget (pgm->vt_form); vtDlgDisplay (pgm); }
/* MATTEW: Used to insure that hide-&-show within an event cycle works */ static void wxFrameMapProc( Widget frameShell, XtPointer clientData, XCrossingEvent* event ) { wxFrame *tli = (wxFrame*)clientData; XEvent *e = (XEvent *)event; if( e->xany.type == MapNotify ) { // Iconize fix XtVaSetValues( frameShell, XmNiconic, (Boolean)False, NULL ); if( !tli->GetVisibleStatus() ) { /* We really wanted this to be hidden! */ XtUnmapWidget( frameShell ); } } else if( e->xany.type == UnmapNotify ) // Iconize fix XtVaSetValues( frameShell, XmNiconic, (Boolean)True, NULL ); }
PRIVATE void DestroyLido () { int root_x, root_y; int x, y; unsigned int width, height, bw, depth; Window dummy; /* Remember the window's position */ XTranslateCoordinates (dpy, XtWindow (LidoTop), RootWindowOfScreen (XtScreen (LidoTop)), 0, 0, &root_x, &root_y, &dummy); XGetGeometry (dpy, XtWindow (LidoTop), &dummy, &x, &y, &width, &height, &bw, &depth); (void) sprintf (LidoGeometry, "%ux%u+%d+%d", width, height, root_x, root_y - Res.wm_push_down); /* Destroy the window */ XtUnmapWidget (LidoTop); XtDestroyWidget (LidoTop); LidoTop = (Widget) NULL; }
wxDialog::~wxDialog() { m_isBeingDeleted = true; delete m_eventLoop; if (m_mainWidget) { XtRemoveEventHandler((Widget) m_mainWidget, ExposureMask, False, wxUniversalRepaintProc, (XtPointer) this); } m_modalShowing = false; if (!wxUSE_INVISIBLE_RESIZE && m_mainWidget) { XtUnmapWidget((Widget) m_mainWidget); } PreDestroy(); DoDestroy(); }
void XtSetMappedWhenManaged( Widget widget, _XtBoolean mapped_when_managed) { Widget hookobj; WIDGET_TO_APPCON(widget); LOCK_APP(app); if (widget->core.mapped_when_managed == mapped_when_managed) { UNLOCK_APP(app); return; } widget->core.mapped_when_managed = mapped_when_managed; hookobj = XtHooksOfDisplay(XtDisplay(widget)); if (XtHasCallbacks(hookobj, XtNchangeHook) == XtCallbackHasSome) { XtChangeHookDataRec call_data; call_data.type = XtHsetMappedWhenManaged; call_data.widget = widget; call_data.event_data = (XtPointer) (unsigned long) mapped_when_managed; XtCallCallbackList(hookobj, ((HookObject)hookobj)->hooks.changehook_callbacks, (XtPointer)&call_data); } if (! XtIsManaged(widget)) { UNLOCK_APP(app); return; } if (mapped_when_managed) { /* Didn't used to be mapped when managed. */ if (XtIsRealized(widget)) XtMapWidget(widget); } else { /* Used to be mapped when managed. */ if (XtIsRealized(widget)) XtUnmapWidget(widget); } UNLOCK_APP(app); } /* XtSetMappedWhenManaged */
bool wxDialog::Show( bool show ) { if( !wxWindowBase::Show( show ) ) return false; m_isShown = show; if (show) { // this usually will result in TransferDataToWindow() being called // which will change the controls values so do it before showing as // otherwise we could have some flicker InitDialog(); } if (show) { if (!wxUSE_INVISIBLE_RESIZE) XtMapWidget(XtParent((Widget) m_mainWidget)); else XtManageChild((Widget)m_mainWidget) ; XRaiseWindow( XtDisplay( (Widget)m_mainWidget ), XtWindow( (Widget)m_mainWidget) ); } else { if (!wxUSE_INVISIBLE_RESIZE) XtUnmapWidget(XtParent((Widget) m_mainWidget)); else XtUnmanageChild((Widget)m_mainWidget) ; XFlush(XtDisplay((Widget)m_mainWidget)); XSync(XtDisplay((Widget)m_mainWidget), False); } return true; }
void ScrollBarOff(XtermWidget xw) { TScreen *screen = TScreenOf(xw); if (!screen->fullVwin.sb_info.width || IsIcon(screen)) return; TRACE(("ScrollBarOff\n")); if (XtIsRealized((Widget) xw)) { XtUnmapWidget(screen->scrollWidget); screen->fullVwin.sb_info.width = 0; DoResizeScreen(xw); update_scrollbar(); if (screen->visbuf) { xtermClear(xw); Redraw(); } } else { Bell(xw, XkbBI_MinorError, 0); } }
void iupdrvDialogSetVisible(Ihandle* ih, int visible) { if (visible) { XtMapWidget(ih->handle); XRaiseWindow(iupmot_display, XtWindow(ih->handle)); while (!iupdrvDialogIsVisible(ih)); /* waits until window get mapped */ } else { /* if iupdrvIsVisible reports hidden, then it should be minimized */ if (!iupdrvIsVisible(ih)) /* can NOT hide a minimized window, so map it first. */ { XtMapWidget(ih->handle); XRaiseWindow(iupmot_display, XtWindow(ih->handle)); while (!iupdrvDialogIsVisible(ih)); /* waits until window get mapped */ } XtUnmapWidget(ih->handle); while (iupdrvDialogIsVisible(ih)); /* waits until window gets unmapped */ } }