/* $XConsortium: Dialog.c,v 1.48 94/04/17 20:12:02 kaleb Exp $ */
/***********************************************************
Copyright (c) 1987, 1988, 1994 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the X Consortium.
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/* NOTE: THIS IS NOT A WIDGET! Rather, this is an interface to a widget.
It implements policy, and gives a (hopefully) easier-to-use interface
than just directly making your own form. */
#include <X11/IntrinsicP.h>
#include <X11/StringDefs.h>
/*
* After we have set the string in the value widget we set the
* string to a magic value. So that when a SetValues request is made
* on the dialog value we will notice it, and reset the string.
*/
};
{ /* core_class fields */
/* class_name */ "Dialog",
/* widget_size */ sizeof(DialogRec),
/* class_initialize */ XawInitializeWidgetSet,
/* class_part init */ NULL,
/* class_inited */ FALSE,
/* initialize */ Initialize,
/* initialize_hook */ NULL,
/* realize */ XtInheritRealize,
/* actions */ NULL,
/* num_actions */ 0,
/* resources */ resources,
/* xrm_class */ NULLQUARK,
/* compress_motion */ TRUE,
/* compress_exposure */ TRUE,
/* compress_enterleave*/ TRUE,
/* visible_interest */ FALSE,
/* destroy */ NULL,
/* resize */ XtInheritResize,
/* expose */ XtInheritExpose,
/* set_values */ SetValues,
/* set_values_hook */ NULL,
/* set_values_almost */ XtInheritSetValuesAlmost,
/* get_values_hook */ GetValuesHook,
/* accept_focus */ NULL,
/* version */ XtVersion,
/* callback_private */ NULL,
/* tm_table */ NULL,
/* query_geometry */ XtInheritQueryGeometry,
/* display_accelerator*/ XtInheritDisplayAccelerator,
/* extension */ NULL
},
{ /* composite_class fields */
/* geometry_manager */ XtInheritGeometryManager,
/* change_managed */ XtInheritChangeManaged,
/* insert_child */ XtInheritInsertChild,
/* delete_child */ XtInheritDeleteChild,
/* extension */ NULL
},
{ /* constraint_class fields */
/* subresourses */ NULL,
/* subresource_count */ 0,
/* constraint_size */ sizeof(DialogConstraintsRec),
/* initialize */ ConstraintInitialize,
/* destroy */ NULL,
/* set_values */ NULL,
/* extension */ NULL
},
{ /* form_class fields */
/* layout */ XtInheritLayout
},
{ /* dialog_class fields */
/* empty */ 0
}
};
/* ARGSUSED */
{
arg_cnt = 2;
}
else
}
/* ARGSUSED */
{
return; /* then just use defaults */
else
break;
if (XtIsManaged(*childP) &&
break;
}
}
}
}
#define ICON 0
/* ARGSUSED */
{
int i;
for (i = 0; i < NUM_CHECKS; i++)
for (i = 0; i < *in_num_args; i++) {
}
} else {
}
}
}
num_args = 0;
num_args++;
}
}
wasn't NULL before. */
#ifdef notdef
/* this would be correct if Form had the same semantics on Resize
* as on MakeGeometryRequest. Unfortunately, Form botched it, so
* any subclasses will currently have to deal with the fact that
* we're about to change our real size.
*/
CreateDialogValueWidget( (Widget) w);
#else /*notdef*/
CreateDialogValueWidget( (Widget) w);
#endif /*notdef*/
}
else { /* Widget ok, just change string. */
}
}
return False;
}
/* Function Name: GetValuesHook
* Description: This is a get values hook routine that gets the
* values in the dialog.
* Arguments: w - the Text Widget.
* args - the argument list.
* num_args - the number of args.
* Returns: none.
*/
static void
Widget w;
{
Arg a[1];
String s;
int i;
for (i=0; i < *num_args; i++)
}
}
/* Function Name: CreateDialogValueWidget
* Description: Creates the dialog widgets value widget.
* Arguments: w - the dialog widget.
* Returns: none.
*
* must be called only when w->dialog.value is non-nil.
*/
static void
Widget w;
{
#ifdef notdef
#endif /*notdef*/
/* if the value widget is being added after buttons,
* then the buttons need new layout constraints.
*/
continue;
if (XtIsManaged(*childP) &&
}
}
}
/*
* Value widget gets the keyboard focus.
*/
}
void
#else
#endif
{
/*
* Correct Constraints are all set in ConstraintInitialize().
*/
}
char *
#else
Widget w;
#endif
{
char * value;
return(value);
}