|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: S T
Length: 8371 (0x20b3) Types: TextFile Names: »ScrollList.h«
└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89 └─⟦e10a7c8ba⟧ »./UNRELEASED/xgdb.tar.Z« └─⟦ae30648b5⟧ └─⟦this⟧ »./ScrollList.h«
\f /* $Header: ScrollList.h,v 1.1 89/07/05 15:35:34 hubbard Exp $ */ /* This is the scrollList widget. It's basically a modification of * Chris Peterson's List widget that allows the list to be viewed * with a scrollbar and to optionally keep the highlighted region * visible. The second feature was what made the modification necessary. * * Jordan Hubbard * * Based on List widget by: * Chris D. Peterson * MIT - Project Athena * * $Log: ScrollList.h,v $ * Revision 1.1 89/07/05 15:35:34 hubbard * Initial revision * * */ /*********************************************************** Copyright 1988 by Digital Equipment Corporation, Maynard, Massachusetts, and the Massachusetts Institute of Technology, Cambridge, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the names of Digital or MIT not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL AND MIT DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ #ifndef _XtScrollList_h #define _XtScrollList_h /*********************************************************************** * * Scrolling List Widget * * ***********************************************************************/ #include "Simple.h" /* Resources: Name Class RepType Default Value ---- ----- ------- ------------- background Background Pixel XtDefaultBackground border BorderColor Pixel XtDefaultForeground borderWidth BorderWidth Dimension 1 callback Callback XtCallbackList NULL **6 columnSpacing Spacing Dimension 6 cursor Cursor Cursor left_ptr defaultColumns Columns int 2 **5 destroyCallback Callback Pointer NULL font Font XFontStruct* XtDefaultFont forceColumns Columns Boolean False **5 foreground Foreground Pixel XtDefaultForeground height Height Dimension 0 **1 insensitiveBorder Insensitive Pixmap Gray internalHeight Height Dimension 2 internalWidth Width Dimension 4 list List String * NULL **2 longest Longest int 0 **3 **4 mappedWhenManaged MappedWhenManaged Boolean True numberStrings NumberStrings int 0 **4 pasteBuffer Boolean Boolean False rowSpacing Spacing Dimension 4 sensitive Sensitive Boolean True verticalList Boolean Boolean False repositionOnHilite Boolean Boolean False scrollVertical Boolean Boolean False width Width Dimension 0 **1 x Position Position 0 y Position Position 0 **1 - If the Width or Height of the list widget is zero (0) then the value is set to the minimum size necessay to fit the entire list. If both Width and Height are zero then they are adjusted to fit the entire list that is created width the number of default columns specified in the defaultColumns resource. **2 - This is an array of strings the specify elements of the list. This resource must be specified. (What good is a list widget without a list?? :-) **3 - Longest is the length of the widest string in pixels. **4 - If either of these values are zero (0) then the list widget calculates the correct value. (This allows you to make startup faster if you already have this information calculated) NOTE: If the numberStrings value is zero the list must be NULL terminated. **5 - By setting the List.Columns resource you can force the application to have a given number of columns. **6 - This returns the name and index of the item selected in an XtScrollListReturnStruct that is pointed to by the client_data in the CallbackProc. */ #define XtCList "List" #define XtCSpacing "Spacing" #define XtCColumns "Columns" #define XtCLongest "Longest" #define XtCNumberStrings "NumberStrings" #define XtNpasteBuffer "pasteBuffer" #define XtNcolumnSpacing "columnSpacing" #define XtNrowSpacing "rowSpacing" #define XtNverticalList "verticalList" #define XtNforceColumns "forceColumns" #define XtNnumberStrings "numberStrings" #define XtNlongest "longest" #define XtNdefaultColumns "defaultColumns" #define XtNrepositionOnHilite "repositionOnHilite" #define XtNscrollVertical "scrollVertical" #define XtNforeground "foreground" #define XtNfont "font" #define XtNlist "list" /* Class record constants */ extern WidgetClass scrollListWidgetClass; typedef struct _ScrollListClassRec *ScrollListWidgetClass; typedef struct _ScrollListRec *ScrollListWidget; /* The list return structure. */ typedef struct _XtScrollListReturnStruct { String string; int list_index; } XtScrollListReturnStruct; /****************************************************************** * * Exported Functions. Had to change the names of all of them * to avoid conflict with List, but the user can basically assume * that everything is used exactly the same as the list widget with * the only difference being the spelling. * *****************************************************************/ /* Function Name: XtScrollListChange. * Description: Changes the list being used and shown. * Arguments: w - the list widget. * list - the new list. * nitems - the number of items in the list. * longest - the length (in Pixels) of the longest element * in the list. * resize - if TRUE the the list widget will * try to resize itself. * Returns: none. * NOTE: If nitems of longest are <= 0 then they will be caluculated. * If nitems is <= 0 then the list needs to be NULL terminated. */ extern void XtScrollListChange(); /* w, list, nitems, longest, resize */ /* Function Name: XtScrollListUnhighlight * Description: unlights the current highlighted element. * Arguments: w - the widget. * Returns: none. */ extern void XtScrollListUnhighlight(); /* w */ /* Function Name: XtScrollListHighlight * Description: Highlights the given item. * Arguments: w - the list widget. * item - the item to hightlight. * Returns: none. */ extern void XtScrollListHighlight(); /* w, item */ /* Function Name: XtScrollListStipple(); * Description: Stipples the given item. * Arguments: w - the list widget. * item - the item to stipple. * Returns: none. */ extern void XtScrollListStipple(); /* w, item */ /* Function Name: XtScrollListUnStipple(); * Description: UnStipples the given item. * Arguments: w - the list widget. * item - the item to unstipple. * Returns: none. */ extern void XtScrollListUnStipple(); /* w, item */ /* Function Name: XtScrollListShowCurrent * Description: returns the currently highlighted object. * Arguments: w - the list widget. * Returns: the info about the currently highlighted object. */ extern XtScrollListReturnStruct * XtScrollListShowCurrent(); /* w */ /* * Value returned when there are no highlighted objects. */ #define XT_LIST_NONE -1 #endif /* _XtScrollList_h */ /* DON'T ADD STUFF AFTER THIS #endif */