NOTICE WIDGET(3W) MISC. REFERENCE MANUAL PAGES NOTICE WIDGET(3W)
WIDGET CLASS NAME
NoticeShell
SYNOPSIS
#include <Intrinsic.h>
#include <StringDefs.h>
#include <OpenLook.h>
#include <Notice.h>
static Widget notice, textarea, controlarea, w;
Arg args[2];
notice = XtCreatePopupShell(name, noticeShellWidgetClass, ...);
XtSetArg(args[0], XtNtextArea, &textarea);
XtSetArg(args[1], XtNcontrolArea, &controlarea);
XtGetValues(notice, args, 2);
w = XtCreateWidget(name, widget-class, controlarea, ...);
.
.
.
XtPopup(notice, XtGrabExclusive);
DESCRIPTION
Notice Components The Notice widget has three components: a
Text Area where the message to the end user is displayed; a
Control Area containing one or more widgets that the end
user uses to control how to continue with an application;
and a Default Button. Another important element is the
Emanate Widget, which is typically the control activated by
the end user that requires immediate attention. The appli-
cation identifies the Emanate Widget to the Notice widget.
Figure 1. Notice Widget
Sub-class of the Shell Widget The Notice widget is a sub-
class of the Shell widget. Therefore, as the SYNOPSIS
shows, the XtCreatePopupShell() routine is used to create a
notice instead of the normal XtCreateWidget().
Popping the Notice Up/Down The application controls when the
Notice widget is to be displayed or popped up. As shown in
the SYNOPSIS, the XtPopup() routine can be used for this.
However, the application does not need to control when the
Notice widget is to be popped down. The widget itself
detects when to pop down: the end user clicks SELECT on an
OblongButton widget in the Control Area. This behavior
requires that there be at least one OblongButton widget in
the Control Area. If other types of controls are used
instead, the application can "manually" pop the notice down
using a routine such as XtPopdown().
Busy Button, Busy Application When the Notice pops up, it
"freezes" the entire application except the Notice to
prevent the end user from interacting with any other part of
the application. As feedback of this to the user, the
Amiga Unix Last change: 1
NOTICE WIDGET(3W) MISC. REFERENCE MANUAL PAGES NOTICE WIDGET(3W)
Notice causes the headers of all the base windows and pop-up
windows to be stippled in the "busy" pattern, and causes a
stipple pattern in the Emanate Widget. The latter stipple
pattern is caused by setting the XtNbusy resource to TRUE in
the Emanate Widget. If the widget does not recognize this
resource, nothing will happen. On popping down, the Notice
widget clears all stipple patterns and "unfreezes" the
application.
Text and Control Areas The Text and Control Areas are han-
dled by separate widget interfaces. The SYNOPSIS shows how
the widget IDs of the Text Area (textarea) and the Control
Area (controlarea) are obtained from the Notice widget. The
Text and Control Areas abut so that there is no space
between the two. An application can control the distance
between the text and the controls by setting margins in the
Control Area.
Notice Coloration Figure 2 illustrates the resources that
affect the coloration of the Notice widget.
Figure 2. Notice Coloration
SUBSTRUCTURE
Control Area component
Name: controlarea
Class: ControlArea
___________________________________________________________________
____________________Application_Resources\*(cO_____________________
Name Class Type Default Access
___________________________________________________________________
Amiga Unix Last change: 2
() MISC. REFERENCE MANUAL PAGES ()
___________________________________________________________________
_XtNhPad_________XtCHPad_________Dimension___0______________I______
XtNhSpace XtCHSpace Dimension 4 I
___________________________________________________________________
_XtNlayoutType___XtCLayoutType___OllDefine___OLFIXEDROWS___I______
XtNmeasure XtCMeasure int 1 I
___________________________________________________________________
_XtNsameSize_____XtCSameSize_____OlDefine____OLCOLUMNS_____I______
XtNvPad XtCVPad Dimension 0 I
___________________________________________________________________
_XtNvSpace_______XtCVSpace_______Dimension___4______________I______
|See the ControlArea widget for| the descri
|ptions of the
|se |
|resources. | | | | |
| | | | | |
|Text Area component | | | |
|Name: textarea| | | | |
|Class: StaticTe
|xt | | | |
|______________|_______________|___________|______________|________|______
|______________|________Applicat
|ion_Resource
|s\*(cO________|________|______
| Name | Class |Type | Default | Access
|______________|_______________|___________|______________|________|______
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | |
Amiga Unix Last change: 1
() MISC. REFERENCE MANUAL PAGES ()
_________________________________________________________________________
_XtNalignment___XtCAlignment___int_____________OLLEFT____________I______
XtNfont XtCFont XFontStruct * (OPEN LOOK font) SI
_________________________________________________________________________
_XtNfontColor___XtCFontColor___Pixel___________Black*_____________SGI____
XtNlineSpace XtCLineSpace int 0 I
_________________________________________________________________________
_XtNstring______XtCString______String__________NULL_______________I______
XtNstrip XtCStrip Boolean TRUE I
_________________________________________________________________________
_XtNwrap________XtCWrap________Boolean_________TRUE_______________I______
|See the StaticText widget fo
|r the descript
|ions of these | |
|resources. | | | | |
| | | | | |
| | | | | |
RESOURCES | | | | |
|_____________|______________|_______________|__________________|________|_________________________
|_____________|______________|__________Notice
|_Resource_Set_____|________|________________________|
| Name | | Class | | Type | | Default | Access|
||||||
| XtNallowShellResize | XtCAllowShellResize | Boolean | TRUE | SGI |
|________________________|_________________________|________________________|____________|________|
|_XtNancestorSensitive___|__XtCSenstitive__________|__Boolean_______________|__TRUE______|__G*____|
| XtNbackground | XtCBackground | Pixel | White | SGI† |
|________________________|_________________________|________________________|____________|________|
|_XtNbackgroundPixmap____|__XtCPixmap______________|__Pixmap________________|__(none)____|__SGI†__|
| XtNborderColor | XtCBorderColor | Pixel | White | SGI† |
|________________________|_________________________|________________________|____________|________|
|_XtNborderPixmap________|__XtCPixmap______________|__Pixmap________________|__(none)____|__SGI†__|
| XtNcontrolArea | XtCControlArea | Widget | (none) | G |
|________________________|_________________________|________________________|____________|________|
|_XtNcreatePopupChildProc|__XtCCreatePopupChildProc|__XtCreatePopupChildProc|__NULL______|__SGI___|
| XtNdepth | XtCDepth | int | (parent's)| GI |
|________________________|_________________________|________________________|____________|________|
|_XtNdestroyCallback_____|__XtCCallback____________|__XtCallbackList________|__NULL______|__SI____|
| XtNemanateWidget | XtCEmanateWidget | Widget | (parent's)| SGI |
|________________________|_________________________|________________________|____________|________|
|_XtNgeometry____________|__XtCGeometry____________|__String________________|__NULL______|__GI____|
Amiga Unix Last change: 1
() MISC. REFERENCE MANUAL PAGES ()
____________________________________________________________________________
|____________________________Notice_Resource_Set____________________________|
| Name | Class | Type | Default | Access|
||||||
| XtNheight | XtCHeight | Dimension | (calculated)| SGI |
|___________________|______________|________________|______________|________|
|_XtNpopdownCallback|__XtCCallback_|__XtCallbackList|__NULL________|__SI____|
| XtNpopupCallback | XtCCallback | XtCallbackList| NULL | SI |
|___________________|______________|________________|______________|________|
|_XtNsaveUnder______|__XtCSaveUnder|__Boolean_______|__FALSE_______|__SGI___|
| XtNsensitive | XtCSensitive| Boolean | TRUE | GI* |
|___________________|______________|________________|______________|________|
|_XtNtextArea_______|__XtCTextArea_|__Widget________|__(none)______|__G_____|
| XtNuserData | XtCUserData | XtPointer | NULL | SGI |
|___________________|______________|________________|______________|________|
|_XtNwidth__________|__XtCWidth____|__Dimension_____|__(calculated)|__SGI___|
| XtNx | XtCPosition | Position | 0 | SGI |
|___________________|______________|________________|______________|________|
|_XtNy______________|__XtCPosition_|__Position______|__0___________|__SGI___|
XtNcontrolArea This is the widget ID of the ControlArea
class composite child widget where controls can be attached;
its value is available once the Notice widget has been
created. Any widgets of the class OblongButton added to the
Control Area are assumed to be window disposition controls;
that is, when the end user activates one of them, the Notice
widget pops itself down.
XtNemanateWidget
Range of Values:
(ID of existing widget)
This resource identifies the Emanate Widget. On popping up,
the Notice widget attempts to set this widget to be busy, by
making its XtNbusy resource TRUE; if the widget doesn't
recognize the resource, nothing happens. On popping down,
the Notice widget clears the XtNbusy resource. When the
Notice widget pops up, it tries not to cover this widget;
this may fail depending on its location and the size of the
Notice widget. The default for this resource is the parent.
The parent, however, cannot be a Gadget (OblongButtonGadget,
for instance). To emanate a Notice from a Gadget, specify
another widget as the parent and set XtNemanateWidget to the
Gadget.
XtNtextArea This is the widget ID of the StaticText class
child widget that controls the Text Area; its value is
available once the Notice widget has been created.
Amiga Unix Last change: 2