static void Enter( Widget wid, XEvent *event, String *params, Cardinal *num_params ) { XmArrowButtonWidget aw = (XmArrowButtonWidget) wid; _XmPrimitiveEnter (wid, event, params, num_params); if (aw->arrowbutton.selected && XtIsSensitive(wid)) DrawArrow(aw, aw->primitive.bottom_shadow_GC, aw->primitive.top_shadow_GC, NULL); }
static void EnterWindow(Widget w, XEvent *event, String *params, Cardinal *num_params) { _XmPrimitiveEnter(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_IN); } }
/*----------------------------------------------------------------------*/ /* extern */ void _XfePrimitiveEnter(Widget w,XEvent * event,char ** params,Cardinal * nparams) { _XfePointerInside(w) = True; /* Make sure we are not pretending to be insensitive */ if (!_XfeIsSensitive(w)) { return; } /* Call the XmPrimitive Enter() action */ _XmPrimitiveEnter(w,event,params,nparams); /* Define the cursor if needed */ if (_XfeCursorGood(_XfeCursor(w))) { XfeCursorDefine(w,_XfeCursor(w)); } /* Call enter callbacks */ _XfeInvokeCallbacks(w,_XfeEnterCallbacks(w),XmCR_ENTER,event,False); }
/*ARGSUSED*/ static void Enter(Widget wid, XEvent *event, String *params, Cardinal *num_params) { XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget) wid; XmPushButtonCallbackStruct call_value; if (Lab_IsMenupane(eb)) { if ((((ShellWidget) XtParent(XtParent(eb)))->shell.popped_up) && _XmGetInDragMode((Widget) 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 (eb->pushbutton.armed) return; /* ...so KHelp event is delivered correctly. */ _XmSetFocusFlag(XtParent(XtParent(eb)), XmFOCUS_IGNORE, TRUE); XtSetKeyboardFocus(XtParent(XtParent(eb)), (Widget) eb); _XmSetFocusFlag(XtParent(XtParent(eb)), XmFOCUS_IGNORE, FALSE); eb->pushbutton.armed = TRUE; ((XmManagerWidget) XtParent(wid))->manager.active_child = wid; /* etched in menu button */ if (etched_in && !XmIsTearOffButton(eb)) { XFillRectangle(XtDisplay(eb), XtWindow(eb), eb->pushbutton.fill_gc, 0, 0, eb->core.width, eb->core.height); draw_label(eb, event, NULL); draw_pixmap(eb, event, NULL); } if ((eb->core.width > 2 * eb->primitive.highlight_thickness) && (eb->core.height > 2 * eb->primitive.highlight_thickness)) { XmeDrawShadows(XtDisplay(eb), XtWindow(eb), eb->primitive.top_shadow_GC, eb->primitive.bottom_shadow_GC, 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, (unsigned)(etched_in ? XmSHADOW_IN : XmSHADOW_OUT)); } if (eb->pushbutton.arm_callback) { XFlush(XtDisplay(eb)); call_value.reason = (int)XmCR_ARM; call_value.event = event; XtCallCallbackList((Widget) eb, eb->pushbutton.arm_callback, &call_value); } } } else { XtExposeProc expose; _XmPrimitiveEnter((Widget) eb, event, NULL, NULL); if (eb->pushbutton.armed == TRUE) { XtProcessLock(); expose = XtClass(eb)->core_class.expose; XtProcessUnlock(); (*expose) (wid, event, (Region) NULL); } draw_highlight(eb); draw_shadows(eb); draw_pixmap(eb, event, NULL); } }