示例#1
0
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);
}
示例#2
0
文件: SelFile.c 项目: ellert/graphviz
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");
    }
}
示例#3
0
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);
}
示例#4
0
文件: motif.c 项目: E-LLP/QuIP
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
}
示例#5
0
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);
}
示例#6
0
文件: vidmode.c 项目: aosm/X11
void
VideoModeConfigureEnd(void)
{
    XtUnmapWidget(vtune);
    if (vidtune != NULL) {
	XF86VidModeLockModeSwitch(XtDisplay(toplevel), vidtune->screen, False);
	XSetErrorHandler(XtErrorFunc);
    }
    vidtune = NULL;
}
示例#7
0
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);
}
示例#8
0
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);
}
示例#9
0
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);
}
示例#10
0
文件: action.c 项目: dyninst/paradyn
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;
}
示例#11
0
文件: motif.c 项目: E-LLP/QuIP
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 */
}
示例#12
0
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 ();
    }
}
示例#13
0
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);
}   
示例#14
0
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;
}
示例#15
0
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);
        }
}
示例#16
0
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);
  }
}
示例#17
0
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; 
}
示例#18
0
文件: Container.C 项目: juddy/edcde
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);
}
示例#19
0
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;
  }
}
示例#20
0
文件: x11.c 项目: amarnathmhn/ngspice
/* 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);
}
示例#21
0
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 ();
    }
}
示例#22
0
文件: bcat.c 项目: oeli/yafra
/*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);
}
示例#23
0
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);
}
示例#24
0
文件: frame.cpp 项目: hgwells/tive
/* 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 );
}
示例#25
0
文件: Lido.c 项目: LukeMeszar/CAS
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;
}
示例#26
0
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();
}
示例#27
0
文件: Manage.c 项目: aosm/X11libs
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 */
示例#28
0
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;
}
示例#29
0
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);
    }
}
示例#30
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 */
  }
}