From 272e57235cd60a2e65ac8258d96a02eb3939b687 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 25 Mar 2011 10:41:05 +0000 Subject: git update until 25 Mar 2011 xserver fontconfig glproto libXau libXft libXmu libfontenc libxcb mesa mkfontscale pixman randrproto xkeyboard-config xtrans xwininfo updated following packages: xproto-7.0.21 xineramaproto-1.2.1 libXt-1.1.1 libxkbfile-1.0.7 libXpm-3.5.9 libXfont-1.4.3 libXaw-1.0.9 bdftopcf-1.0.3 encodings-1.0.4 fixesproto-5.0 font-adobe-100dpi-1.0.3 font-adobe-75dpi-1.0.3 font-adobe-utopia-100dpi-1.0.4 font-adobe-utopia-75dpi-1.0.4 font-adobe-utopia-type1-1.0.4 font-alias-1.0.3 font-arabic-misc-1.0.3 font-bh-100dpi-1.0.3 font-bh-75dpi-1.0.3 font-bh-lucidatypewriter-100dpi-1.0.3 font-bh-lucidatypewriter-75dpi-1.0.3 font-bh-ttf-1.0.3 font-bh-type1-1.0.3 font-bitstream-100dpi-1.0.3 font-bitstream-75dpi-1.0.3 font-bitstream-speedo-1.0.2 font-bitstream-type1-1.0.3 font-cronyx-cyrillic-1.0.3 font-cursor-misc-1.0.3 font-daewoo-misc-1.0.3 font-dec-misc-1.0.3 font-ibm-type1-1.0.3 font-isas-misc-1.0.3 font-jis-misc-1.0.3 font-micro-misc-1.0.3 font-misc-cyrillic-1.0.3 font-misc-ethiopic-1.0.3 font-misc-meltho-1.0.3 font-misc-misc-1.1.2 font-mutt-misc-1.0.3 font-schumacher-misc-1.1.2 font-screen-cyrillic-1.0.4 font-sony-misc-1.0.3 font-sun-misc-1.0.3 font-util-1.2.0 font-winitzki-cyrillic-1.0.3 font-xfree86-type1-1.0.4 --- libXaw/specs/Dialog.xml | 692 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 692 insertions(+) create mode 100644 libXaw/specs/Dialog.xml (limited to 'libXaw/specs/Dialog.xml') diff --git a/libXaw/specs/Dialog.xml b/libXaw/specs/Dialog.xml new file mode 100644 index 000000000..f77006c6a --- /dev/null +++ b/libXaw/specs/Dialog.xml @@ -0,0 +1,692 @@ + +Dialog Widget + + + + + + + + + + +Application Header file <X11/Xaw/Dialog.h> + +Class Header file <X11/Xaw/DialogP.h> + +Class dialogWidgetClass + +Class Name Dialog + +Superclass Form + + + + + +The Dialog widget implements a commonly used interaction semantic to +prompt for auxiliary input from a user. For example, you can use a +Dialog widget when an application requires a small piece of information, +such as a filename, from the user. A Dialog widget, which is simply a +special case of the Form widget, provides a convenient way to create a +preconfigured form. + + + +The typical Dialog widget contains three areas. The first line +contains a description of the function of the Dialog widget, for +example, the string Filename:. The second line contains an area +into which the user types input. The third line can contain buttons +that let the user confirm or cancel the Dialog input. Any of these +areas may be omitted by the application. + + +Resources + + +When creating a Dialog widget instance, the following resources are +retrieved from the argument list or the resource database: + + + + + + + + + + + Name + Class + Type + Notes + Default Value + + + + + accelerators + Accelerators + AcceleratorTable + + NULL + + + ancestorSensitive + AncestorSensitive + Boolean + D + True + + + background + Background + Pixel + + XtDefaultBackground + + + backgroundPixmap + Pixmap + Pixmap + + XtUnspecifiedPixmap + + + borderColor + BorderColor + Pixel + + XtDefaultForeground + + + borderPixmap + Pixmap + Pixmap + + XtUnspecifiedPixmap + + + borderWidth + BorderWidth + Dimension + + 1 + + + children + ReadOnly + WidgetList + R + NULL + + + colormap + Colormap + Colormap + + Parent's Colormap + + + defaultDistance + Thickness + int + + 4 + + + depth + Depth + int + C + Parent's Depth + + + destroyCallback + Callback + XtCallbackList + + NULL + + + height + Height + Dimension + A + Enough space to contain all children + + + icon + Icon + Bitmap + + None + + + label + Label + String + + "label" + + + mappedWhenManaged + MappedWhenManaged + Boolean + + True + + + numChildren + ReadOnly + Cardinal + R + 0 + + + screen + Screen + Screen + R + Parent's Screen + + + sensitive + Sensitive + Boolean + + True + + + translations + Translations + TranslationTable + + NULL + + + value + Value + String + + no value widget + + + width + Width + Dimension + A + Enough space to contain all children + + + x + Position + Position + + 0 + + + y + Position + Position + + 0 + + + _ + + + + + + + + + + + + + + + + + + + + + icon + + + +A pixmap image to be displayed immediately to the left of the +Dialog widget's label. + + + + + + label + + + +A string to be displayed at the top of the Dialog widget. + + + + + + + + + + + value + + + +An initial value for the string field that the user will enter text +into. By default, no text entry field is available to the user. +Specifying an initial value for value activates the text entry +field. If string input is desired, but no initial value is to be +specified then set this resource to "" (empty string). + + + + + + + + +Constraint Resources + + + +Each child of the Dialog widget may request special layout resources +be applied to it. These constraint resources allow the Dialog +widget's children to specify individual layout requirements. + + + + + + + + + + + + + Name + Class + Type + Notes + Default Value + + + + + bottom + Edge + XawEdgeType + + XawRubber + + + fromHoriz + Widget + Widget + + NULL (left edge of Dialog) + + + fromVert + Widget + Widget + + NULL (top edge of Dialog) + + + horizDistance + Thickness + int + + defaultDistance resource + + + left + Edge + XawEdgeType + + XawRubber + + + resizable + Boolean + Boolean + + FALSE + + + right + Edge + XawEdgeType + + XawRubber + + + top + Edge + XawEdgeType + + XawRubber + + + vertDistance + Thickness + int + + defaultDistance resource + + + + + + +bottom +left +right +top What to do with this edge of the child when + the parent is resized. This resource may be + any edgeType. See Layout Semantics for + details. + +fromHoriz +fromVert Which widget this child should be placed + underneath (or to the right of). If a value + of NULL is specified then this widget will be + positioned relative to the edge of the par- + ent. + +horizDistance +vertDistance The amount of space, in pixels, between this + child and its left or upper neighbor. + +resizable If this resource is False then the parent + widget will ignore all geometry request made + by this child. The parent may still resize + this child itself, however. + + + + + + + + +Layout Semantics + + +The Dialog widget uses two different sets of layout seman- +tics. One is used when initially laying out the children. +The other is used when the Dialog is resized. + + +The first layout method uses the fromVert mand fromHoriz +resources to place the children of the Dialog. A single +pass is made through the Dialog widget's children in the +order that they were created. Each child is then placed in +the Dialog widget below or to the right of the widget speci- +fied by the fromVert mand fromHoriz mresources. The distance +the new child is placed from its left or upper neighbor is +determined by the horizDistance mand vertDistance mresources. +This implies some things about how the order of creation +affects the possible placement of the children. The Form +widget registers a string to widget converter which does not +postpone conversion and does not cache conversion results. + + + +The second layout method is used when the Dialog is resized. +It does not matter what causes this resize, and it is possi- +ble for a resize to happen before the widget becomes visible +(due to constraints imposed by the parent of the Dialog). +This layout method uses the bottom , +top , left , and +right +resources. These resources are used to determine what will +happen to each edge of the child when the Dialog is resized. +If a value of XawChain +<something> + is specified, the the edge +of the child will remain a fixed distance from the chain +edge of the Dialog. For example if XawChainLeft +mis specified for the right mresource of a child +then the right edge +of that child will remain a fixed distance from the left +edge of the Dialog widget. If a value of XawRubber mis spec- +ified, that edge will grow by the same percentage that the +Dialog grew. For instance if the Dialog grows by 50% the +left edge of the child (if specified as XawRubber mwill be +50% farther from the left edge of the Dialog). One must be +very careful when specifying these resources, for when they +are specified incorrectly children may overlap or completely +occlude other children when the Dialog widget is resized. + + + + + + + + + + + + Edge Type + Resource Name + Description + + + + + XawChainBottom + ChainBottom + Edge remains a fixed distance from bottom of Dialog + + + XawChainLeft + ChainLeft + Edge remains a fixed distance from left of Dialog + + + XawChainRight + ChainRight + Edge remains a fixed distance from right of Dialog + + + XawChainTop + ChainTop + Edge remains a fixed distance from top of Dialog + + + XawRubber + Rubber + Edges will move a proportional distance + + + + + + +Example + + +If you wish to force the Dialog to never resize one or more of its children +then set left and right to XawChainLeft and +top and bottom to XawChainTop. This will cause +the child to remain a fixed distance from the top and left +edges of the Dialog, and to never resize. + + + +Special Considerations + + + +The Dialog widget automatically sets the top and bottom +resources for all Children that are subclasses of the Command widget, +as well as the widget children that are used to contain the label, +value, and icon. This policy allows the buttons at the +bottom of the Dialog to interact correctly with the predefined children, +and makes it possible for a client to simply create and manage a new +Command button without having to specify its constraints. + + + +The Dialog will also set fromLeft to the last button in the + +Dialog for each new button added to the Dialog widget. + + + +The automatically added constraints cannot be overridden, as they are +policy decisions of the Dialog widget. If a more flexible Dialog is +desired, the application is free to use the Form widget to create its +own Dialog policy. + + + + +Automatically Created Children. + + + +The Dialog uses Label widgets to contain the label and icon. +These widgets are named label and icon respectively. The +Dialog value is contained in an AsciiText widget whose name is +value. Using XtNameToWidget the application can change + +those resources associated with each of these widgets that are not +available through the Dialog widget itself. + + + + + + +Convenience Routines + + +To return the character string in the text field, use + + + + + String XawDialogGetValueString + Widget w + + + + + + + w + + + +Specifies the Dialog widget. + + + + + + + +This function returns a copy of the value string of the Dialog +widget. This string is allocated by the AsciiText widget and will +remain valid and unchanged until another call to +XawDialogGetValueString or an XtGetValues call on the +value widget, when the string will be automatically freed, and +a new string is returned. This string may be freed earlier by calling +the function XawAsciiSourceFreeString. + + + + + +To add a new button to the Dialog widget use +XawDialogAddButton. + + + + void XawDialogAddButton + Widget w + String name + XtCallbackProc func + XtPointer client_data + + + + + + + w + + + +Specifies the Dialog widget. + + + + + + name + + + +Specifies the name of the new Command button to be added to the Dialog. + + + + + + func + + + +Specifies a callback function to be called when this button is activated. If +NULL is specified then no callback is added. + + + + + + client_data + + + +Specifies the client_data to be passed to the func. + + + + + + + +This function is merely a shorthand for the code sequence: + + + + + +{ + Widget button = XtCreateManagedWidget(name, commandWidgetClass, w, NULL, ZERO); + XtAddCallback(button, XtNcallback, func, client_data); +} + + + + + + + -- cgit v1.2.3