Example #1
0
/*----------------------------------------------------------------------*/
static Widget
ShellCreate(Widget w)
{
	Widget		shell = NULL;
	Widget		frame_shell;

	/* Look for a XfeFrameShell ancestor */
	frame_shell = XfeAncestorFindByClass(w,
										 xfeFrameShellWidgetClass,
										 XfeFIND_ANY);

	/* If found, use it */
	if (_XfeIsAlive(frame_shell))
	{
		shell = XfeFrameShellGetBypassShell(frame_shell);
	}
	else
	{
		shell = XfeCreateBypassShell(w,SHELL_NAME,NULL,0);

		XtRealizeWidget(shell);
	}

	assert( _XfeIsAlive(shell) );


	if (!_XfeIsRealized(shell))
	{
		XtRealizeWidget(shell);
	}

	return shell;
}
Example #2
0
/*----------------------------------------------------------------------*/
static void
DrawHighlight(Widget w,XEvent * event,Region region,XRectangle * clip_rect)
{
    XfeComboBoxPart *	cp = _XfeComboBoxPart(w);

	/* Make sure the highlight is needed */
	if (!cp->highlight_thickness || !_XfeIsRealized(w))
	{
		return;
	}

	if (cp->highlighted)
	{
		_XmDrawSimpleHighlight(XtDisplay(w),
							   _XfeWindow(w), 
							   _XfemHighlightGC(w),
							   0,0, 
							   _XfeWidth(w),_XfeHeight(w),
							   cp->highlight_thickness);
	}
	else
	{
		assert( XmIsManager(_XfeParent(w)) );

		_XmDrawSimpleHighlight(XtDisplay(w),
							   _XfeWindow(w), 
							   _XfemBackgroundGC(_XfeParent(w)),
							   0,0, 
							   _XfeWidth(w),_XfeHeight(w),
							   cp->highlight_thickness);
	}
}
Example #3
0
/*----------------------------------------------------------------------*/
/* extern */ Boolean
XfeShellIsPoppedUp(Widget shell)
{
    assert( XtIsShell(shell) );

	if (!_XfeIsAlive(shell) || !_XfeIsRealized(shell))
	{
		return False;
	}

	return ((ShellWidget) shell)->shell.popped_up;
}