12.07.2015 Views

Athena Widget Set - C Language Interface - X Consortium ... - X.Org

Athena Widget Set - C Language Interface - X Consortium ... - X.Org

Athena Widget Set - C Language Interface - X Consortium ... - X.Org

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Simple <strong>Widget</strong>sresizeSpecifies a Boolean value that if True indicates that the Listwidget 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 isactually changed. The list is used in place, and must remain usable for the lifetimeof the List widget, or until list has been changed again with this function or withXt<strong>Set</strong>Values.Highlighting an ItemTo highlight an item in the list, use XawListHighlight .void XawListHighlight( w, item);witemSpecifies the List widget.Specifies an index into the current list that indicates the itemto be highlighted.Only one item can be highlighted at a time. If an item is already highlighted whenXawListHighlight is called, the highlighted item is unhighlighted before the newitem is highlighted.Unhighlighting an ItemTo unhighlight the currently highlighted item in the list, use XawListUnhighlight .void XawListUnhighlight( w);wSpecifies the List widget.Retrieving the Currently Selected ItemTo retrieve the list element that is currently set, use XawListShowCurrent .XawListReturnStruct *XawListShowCurrent( w);wSpecifies the List widget.XawListShowCurrent returns a pointer to an XawListReturnStruct structure,containing the currently highlighted item. If the value of the index member isXAW_LIST_NONE, the string member is undefined, and no item is currently selected.RestrictionsMany programmers create a ``scrolled list'' by putting a List widget with manyentries as a child of a Viewport widget. The List continues to create a window asbig as its contents, but that big window is only visible where it intersects the parentViewport's window. (I.e., it is ``clipped.'')While this is a useful technique, there is a serious drawback. X does not supportwindows above 32,767 pixels in width or height, but this height limit will be exceededby a List's window when the List has many entries (i.e., with a 12 point font,about 3000 entries would be too many.)34

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!