/*----------------------------------------------------------------------*/ /* extern */ void _XfePrimitiveLeave(Widget w,XEvent * event,char ** params,Cardinal * nparams) { /* Make sure the pointer is indeed inside for this action */ if (!_XfePointerInside(w)) { return; } _XfePointerInside(w) = False; /* Make sure we are not pretending to be insensitive */ if (!_XfeIsSensitive(w)) { return; } /* Call the XmPrimitive Leave() action */ _XmPrimitiveLeave(w,event,params,nparams); /* Undefine the cursor if needed */ if (_XfeCursorGood(_XfeCursor(w))) { XfeCursorUndefine(w); } /* Call leave callbacks */ _XfeInvokeCallbacks(w,_XfeLeaveCallbacks(w),XmCR_LEAVE,event,False); }
static void Leave( Widget wid, XEvent *event, String *params, Cardinal *num_params ) { XmArrowButtonWidget aw = (XmArrowButtonWidget) wid; _XmPrimitiveLeave (wid, event, params, num_params); if (aw->arrowbutton.selected && XtIsSensitive(wid)) DrawArrow(aw, aw->primitive.top_shadow_GC, aw->primitive.bottom_shadow_GC, NULL); }
static void LeaveWindow(Widget w, XEvent *event, String *params, Cardinal *num_params) { _XmPrimitiveLeave(w, event, NULL, NULL); if (DB_PushButtonEnabled(w) && XtSensitive(w) && DB_Armed(w) && XtIsRealized(w)) { _XmDrawShadows(XtDisplay(w), XtWindow(w), Prim_TopShadowGC(w), Prim_BottomShadowGC(w), Prim_HighlightThickness(w), Prim_HighlightThickness(w), XtWidth(w) - 2 * Prim_HighlightThickness(w), XtHeight(w) - 2 * Prim_HighlightThickness(w), Prim_ShadowThickness(w), XmSHADOW_OUT); } }
/*ARGSUSED*/ static void Leave(Widget wid, XEvent *event, String *params, Cardinal *num_params) { XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget)wid; XmPushButtonCallbackStruct call_value; if (Lab_IsMenupane(eb)) { #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) XmDisplay dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(wid)); Boolean etched_in = dpy->display.enable_etched_in_menu; #else Boolean etched_in = False; #endif if (_XmGetInDragMode((Widget)eb) && eb->pushbutton.armed && ( /* !ActiveTearOff || */ event->xcrossing.mode == NotifyNormal)) { eb->pushbutton.armed = FALSE; ((XmManagerWidget) XtParent(wid))->manager.active_child = NULL; if (etched_in && !XmIsTearOffButton(eb)) { XFillRectangle(XtDisplay(eb), XtWindow(eb), eb->pushbutton.background_gc, 0, 0, eb->core.width, eb->core.height); draw_label(eb, event, NULL); draw_pixmap(eb, event, NULL); } else XmeClearBorder (XtDisplay(eb), XtWindow(eb), eb->primitive.highlight_thickness, eb->primitive.highlight_thickness, eb->core.width - 2 * eb->primitive.highlight_thickness, eb->core.height - 2 * eb->primitive.highlight_thickness, eb->primitive.shadow_thickness); if (eb->pushbutton.disarm_callback) { XFlush(XtDisplay(eb)); call_value.reason = (int)XmCR_DISARM; call_value.event = event; XtCallCallbackList((Widget) eb, eb->pushbutton.disarm_callback, &call_value); } } } else { _XmPrimitiveLeave((Widget) eb, event, NULL, NULL); if (eb->pushbutton.armed == TRUE) { XtExposeProc expose; eb->pushbutton.armed = FALSE; XtProcessLock(); expose = XtClass(eb)->core_class.expose; XtProcessUnlock(); (*expose) (wid, event, (Region)NULL); draw_unhighlight(eb); draw_pixmap(eb, event, NULL); eb->pushbutton.armed = TRUE; } else { draw_unhighlight(eb); draw_pixmap(eb, event, NULL); } } }