749N/A/* $XConsortium: List.h,v 1.22 94/04/17 20:12:17 kaleb Exp $ */ 749N/ACopyright (c) 1989, 1994 X Consortium 749N/APermission is hereby granted, free of charge, to any person obtaining a copy 749N/Aof this software and associated documentation files (the "Software"), to deal 749N/Ain the Software without restriction, including without limitation the rights 749N/Ato use, copy, modify, merge, publish, distribute, sublicense, and/or sell 749N/Acopies of the Software, and to permit persons to whom the Software is 749N/Afurnished to do so, subject to the following conditions: 749N/AThe above copyright notice and this permission notice shall be included in 749N/Aall copies or substantial portions of the Software. 749N/ATHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 749N/AIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 749N/AFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 749N/AX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 749N/AAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 749N/ACONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 749N/AExcept as contained in this notice, the name of the X Consortium shall not be 749N/Aused in advertising or otherwise to promote the sale, use or other dealings 749N/Ain this Software without prior written authorization from the X Consortium. 749N/A/* This is the List widget, it is useful to display a list, without the 749N/A * overhead of having a widget for each item in the list. It allows 749N/A * the user to select an item in a list and notifies the application through 749N/A * By: Chris D. Peterson 749N/A/*********************************************************************** 749N/A ***********************************************************************/ 749N/A Name Class RepType Default Value 749N/A ---- ----- ------- ------------- 749N/A background Background Pixel XtDefaultBackground 749N/A border BorderColor Pixel XtDefaultForeground 749N/A borderWidth BorderWidth Dimension 1 749N/A callback Callback XtCallbackList NULL **6 749N/A columnSpacing Spacing Dimension 6 749N/A cursor Cursor Cursor left_ptr 749N/A cursorName Cursor String NULL 749N/A defaultColumns Columns int 2 **5 749N/A destroyCallback Callback Pointer NULL 749N/A font Font XFontStruct* XtDefaultFont 749N/A forceColumns Columns Boolean False **5 749N/A foreground Foreground Pixel XtDefaultForeground 749N/A height Height Dimension 0 **1 749N/A insensitiveBorder Insensitive Pixmap Gray 749N/A internalHeight Height Dimension 2 749N/A internalWidth Width Dimension 4 749N/A list List String * NULL **2 749N/A longest Longest int 0 **3 **4 749N/A mappedWhenManaged MappedWhenManaged Boolean True 749N/A numberStrings NumberStrings int 0 **4 749N/A pasteBuffer Boolean Boolean False 749N/A pointerColor Foreground Pixel XtDefaultForeground 749N/A pointerColorBackground Background Pixel XtDefaultBackground 749N/A rowSpacing Spacing Dimension 4 749N/A sensitive Sensitive Boolean True 749N/A verticalList Boolean Boolean False 749N/A width Width Dimension 0 **1 749N/A **1 - If the Width or Height of the list widget is zero (0) then the value 749N/A is set to the minimum size necessay to fit the entire list. 749N/A If both Width and Height are zero then they are adjusted to fit the 749N/A entire list that is created width the number of default columns 749N/A specified in the defaultColumns resource. 749N/A **2 - This is an array of strings the specify elements of the list. 749N/A This resource must be specified. 749N/A (What good is a list widget without a list?? :-) 749N/A **3 - Longest is the length of the widest string in pixels. 749N/A **4 - If either of these values are zero (0) then the list widget calculates 749N/A (This allows you to make startup faster if you already have 749N/A this information calculated) 749N/A NOTE: If the numberStrings value is zero the list must 749N/A **5 - By setting the List.Columns resource you can force the application to 749N/A have a given number of columns. 749N/A **6 - This returns the name and index of the item selected in an 749N/A XawListReturnStruct that is pointed to by the client_data 749N/A * Value returned when there are no highlighted objects. 749N/A/* Class record constants */ 749N/A/* The list return structure. */ 749N/A/****************************************************************** 749N/A *****************************************************************/ 749N/A/* Function Name: XawListChange. 749N/A * Description: Changes the list being used and shown. 749N/A * Arguments: w - the list widget. 749N/A * nitems - the number of items in the list. 749N/A * longest - the length (in Pixels) of the longest element 749N/A * resize - if TRUE the the list widget will 749N/A * try to resize itself. 749N/A * NOTE: If nitems of longest are <= 0 then they will be caluculated. 749N/A * If nitems is <= 0 then the list needs to be NULL terminated. 749N/A /* Boolean */ int /* resize */ 749N/A/* Function Name: XawListUnhighlight 749N/A * Description: unlights the current highlighted element. 749N/A * Arguments: w - the widget. 749N/A/* Function Name: XawListHighlight 749N/A * Description: Highlights the given item. 749N/A * Arguments: w - the list widget. 749N/A * item - the item to highlight. 749N/A/* Function Name: XawListShowCurrent 749N/A * Description: returns the currently highlighted object. 749N/A * Arguments: w - the list widget. 749N/A * Returns: the info about the currently highlighted object.