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/List.xml | 872 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 872 insertions(+) create mode 100644 libXaw/specs/List.xml (limited to 'libXaw/specs/List.xml') diff --git a/libXaw/specs/List.xml b/libXaw/specs/List.xml new file mode 100644 index 000000000..0bad43dde --- /dev/null +++ b/libXaw/specs/List.xml @@ -0,0 +1,872 @@ + +List Widget + + + + + + + + + + +Application header file <X11/Xaw/List.h> + +Class header file <X11/Xaw/ListP.h> + +Class listWidgetClass + +Class Name List + +Superclass Simple + + + + + + +The List widget contains a list of strings formatted into rows and +columns. When one of the strings is selected, it is highlighted, and the +List widget's Notify action is invoked, calling all routines on +its callback list. Only one string may be selected at a time. + + +Resources + + +When creating a List widget instance, the following resources are +retrieved from the argument list or from 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 + + + callback + Callback + Callback + + NULL + + + colormap + Colormap + Colormap + + Parent's Colormap + + + columnSpacing + Spacing + Dimension + + 6 + + + cursor + Cursor + Cursor + + XC_left_ptr + + + cursorName + Cursor + String + + NULL + + + defaultColumns + Columns + int + + 2 + + + depth + Depth + int + C + Parent's Depth + + + destroyCallback + Callback + XtCallbackList + + NULL + + + font + Font + FontStruct + + XtDefaultFont + + + fontSet + FontSet + XFontSet + + XtDefaultFontSet + + + forceColumns + Columns + Boolean + + False + + + foreground + Foreground + Pixel + + XtDefaultForeground + + + height + Height + Dimension + A + Enough space to contain the list + + + insensitiveBorder + Insensitive + Pixmap + + GreyPixmap + + + internalHeight + Height + Dimension + + 2 + + + internalWidth + Width + Dimension + + 4 + + + international + International + Boolean + C + False + + + list + List + Pointer + + name of widget + + + longest + Longest + int + A + 0 + + + mappedWhenManaged + MappedWhenManaged + Boolean + + True + + + numberStrings + NumberStrings + int + A + computed for NULL terminated list + + + pasteBuffer + Boolean + Boolean + + False + + + pointerColor + Foreground + Pixel + + XtDefaultForeground + + + pointerColorBackground + Background + Pixel + + XtDefaultBackground + + + rowSpacing + Spacing + Dimension + + 2 + + + screen + Screen + Screen + R + Parent's Screen + + + sensitive + Sensitive + Boolean + + True + + + translations + Translations + TranslationTable + + See below + + + verticalList + Boolean + Boolean + + False + + + width + Width + Dimension + A + Enough space to contain the list + + + x + Position + Position + + 0 + + + y + Position + Position + + 0 + + + _ + + + + + + + + + + + + + + + callback + + + +All functions on this list are called whenever the notify action is +invoked. The call_data argument contains information about the element +selected and is described in detail in the List Callbacks section. + + + + + + + columnSpacing + + + + + + + + + + + rowSpacing + + + +The amount of space, in pixels, between each of the rows and columns +in the list. + + + + + + + + defaultColumns + + + +The default number of columns. This value is used when neither the +width nor the height of the List widget is specified or when +forceColumns is True. + + + + + + + + font + + + +The text font to use when displaying the list, when the +international resource is false. + + + + + + fontSet + + + +The text font set to use when displaying the list, when the +international resource is true. + + + + + + forceColumns + + + +Forces the default number of columns to be used regardless of the +List widget's current size. + + + + + + foreground + + + +A pixel value which indexes the widget's colormap to derive the color +used to paint the text of the list elements. + + + + + + + + \fPinternalHeight\fP + + + + + + + + + + + \fPinternalWidth\fP + + + +The margin, in pixels, between the edges of the list and the +corresponding edge of the List widget's window. + + + + + + list + + + +An array of text strings displayed in the List widget. If +numberStrings is zero (the default) then the list must be +NULL terminated. If a value is not specified for the list, then +numberStrings is set to 1, and the name of the widget is used as +the list, and longest is set to the length of the name of the +widget. The list is used in place, and must be available +to the List widget for the lifetime of this widget, or until it is +changed with XtSetValues or XawListChange. + + + + + + + longest + + + +Specifies the width, in pixels, of the longest string in the current +list. The List widget will compute this value if zero (the default) +is specified. If this resource is set by hand, entries longer than this +will be clipped to fit. + + + + + + + numberStrings + + + +The number of strings in the current list. If a value of zero (the +default) is specified, the List widget will compute it. When computing +the number of strings the List widget assumes that the list is NULL +terminated. + + + + + + pasteBuffer + + + +If this resource is set to True then the name of the currently +selected list element will be put into CUT_BUFFER_0. + + + + + + + + + + + verticalList + + + +If this resource is set to True then the list elements will be +presented in column major order. + + + + + + + + +List Actions + + + +The List widget supports the following actions: + + + + +Highlighting and unhighlighting the list element under the +pointer with Set and Unset + + + + +Processing application callbacks with Notify + + + + + +The following is the default translation table used by the List Widget: + + + + + + + +<Btn1Down>,<Btn1Up>: Set(\|) Notify(\|) + + + + + +The full list of actions supported by List widget is: + + + + Set(\|) + + + +Sets the list element that is currently under the pointer. To +inform the user that this element is currently set, it is drawn with +foreground and background colors reversed. If this action is called when +there is no list element under the cursor, the currently set +element will be unset. + + + + + + Unset(\|) + + + +Cancels the set state of the element under the pointer, +and redraws it with normal foreground and background colors. + + + + + + Notify(\|) + + + +Calls all callbacks on the List widget's callback list. Information +about the currently selected list element is passed in the +call_data argument (see List Callbacks below). + + + + + + + +List Callbacks + + + +All procedures on the List widget's callback list will have a +XawListReturnStruct passed to them as call_data. The +structure is defined in the List widget's application header file. + + + + + + +typedef struct _XawListReturnStruct { + String string; /* string shown in the list. */ + int list_index; /* index of the item selected. */ +} XawListReturnStruct; + + + + +The list_index item used to be called simply index. +Unfortunately, this name collided with a global name defined on some +operating systems, and had to be changed. + + + + +Changing the List + + +To change the list that is displayed, use +XawListChange . + + + + void XawListChange + Widget w + String* list + intnitems, longest + Boolean resize + + + + + + + w + + + +Specifies the List widget. + + + + + + list + + + +Specifies the new list for the List widget to display. + + + + + + nitems + + + +Specifies the number of items in the list. If a value less than 1 +is specified, list must be NULL terminated, and the number of +items will be calculated by the List widget. + + + + + + longest + + + +Specifies the length of the longest item in the list in pixels. +If a value less than 1 is specified, the List widget will calculate the +value. + + + + + + resize + + + +Specifies a Boolean value that if True indicates that the +List widget should try to resize itself after making the change. +The constraints of the List widget's parent are always enforced, +regardless of the value specified here. + + + + + + + +XawListChange +will unset all list elements that are currently set before +the list is actually changed. The list is used in place, and must +remain usable for the lifetime of the List widget, or until list +has been changed again with this function or with XtSetValues. + + + +Highlighting an Item + + +To highlight an item in the list, use +XawListHighlight . + + + + void XawListHighlight + Widget w + int item + + + + + + + w + + + +Specifies the List widget. + + + + + + item + + + +Specifies an index into the current list that indicates the item to be +highlighted. + + + + + + + +Only one item can be highlighted at a time. +If an item is already highlighted when +XawListHighlight +is called, +the highlighted item is unhighlighted before the new item is highlighted. + + + +Unhighlighting an Item + + +To unhighlight the currently highlighted item in the list, use +XawListUnhighlight . + + + + void XawListUnhighlight + Widget w + + + + + + + w + + + +Specifies the List widget. + + + + + + + +Retrieving the Currently Selected Item + + +To retrieve the list element that is currently set, use +XawListShowCurrent . + + + + XawListReturnStruct *XawListShowCurrent + Widget w + + + + + + + w + + + +Specifies the List widget. + + + + + + + +XawListShowCurrent +returns a pointer to an +XawListReturnStruct +structure, +containing the currently highlighted item. +If the value of the index member is XAW_LIST_NONE, + +the string member is undefined, and no item is currently selected. + + + +Restrictions + + +Many programmers create a ``scrolled list'' by putting a List +widget with many entries as a child of a Viewport widget. The +List continues to create a window as big as its contents, but +that big window is only visible where it intersects the parent +Viewport's window. (I.e., it is ``clipped.'') + + + +While this is a useful technique, there is a serious drawback. +X does not support windows above 32,767 pixels in width or +height, but this height limit will be exceeded by a List's +window when the List has many entries (i.e., with a 12 point +font, about 3000 entries would be too many.) + + + + + + + -- cgit v1.2.3