Blame lib/Xm/ListP.h

Packit b099d7
/* 
Packit b099d7
 * Motif
Packit b099d7
 *
Packit b099d7
 * Copyright (c) 1987-2012, The Open Group. All rights reserved.
Packit b099d7
 *
Packit b099d7
 * These libraries and programs are free software; you can
Packit b099d7
 * redistribute them and/or modify them under the terms of the GNU
Packit b099d7
 * Lesser General Public License as published by the Free Software
Packit b099d7
 * Foundation; either version 2 of the License, or (at your option)
Packit b099d7
 * any later version.
Packit b099d7
 *
Packit b099d7
 * These libraries and programs are distributed in the hope that
Packit b099d7
 * they will be useful, but WITHOUT ANY WARRANTY; without even the
Packit b099d7
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
Packit b099d7
 * PURPOSE. See the GNU Lesser General Public License for more
Packit b099d7
 * details.
Packit b099d7
 *
Packit b099d7
 * You should have received a copy of the GNU Lesser General Public
Packit b099d7
 * License along with these librararies and programs; if not, write
Packit b099d7
 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
Packit b099d7
 * Floor, Boston, MA 02110-1301 USA
Packit b099d7
*/ 
Packit b099d7
/* 
Packit b099d7
 * HISTORY
Packit b099d7
*/ 
Packit b099d7
/* $XConsortium: ListP.h /main/12 1995/09/19 23:04:39 cde-sun $ */
Packit b099d7
/* (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
Packit b099d7
#ifndef _XmListP_h
Packit b099d7
#define _XmListP_h
Packit b099d7
Packit b099d7
#include <Xm/List.h>
Packit b099d7
#include <Xm/PrimitiveP.h>
Packit b099d7
#include <Xm/ScrollBar.h>
Packit b099d7
#include <Xm/ScrolledW.h>
Packit b099d7
#include <Xm/XmosP.h>
Packit b099d7
Packit b099d7
#ifdef __cplusplus
Packit b099d7
extern "C" {
Packit b099d7
#endif
Packit b099d7
Packit b099d7
/* List struct passed to Convert proc for drag and drop */
Packit b099d7
typedef struct _XmListDragConvertStruct
Packit b099d7
{
Packit b099d7
  Widget    w;
Packit b099d7
  XmString *strings;
Packit b099d7
  int       num_strings;
Packit b099d7
} XmListDragConvertStruct;
Packit b099d7
Packit b099d7
/* List class structure */
Packit b099d7
typedef struct _XmListClassPart
Packit b099d7
{
Packit b099d7
  XtPointer extension;		/* Pointer to extension record */
Packit b099d7
} XmListClassPart;
Packit b099d7
Packit b099d7
Packit b099d7
/* Full class record declaration for List class */
Packit b099d7
typedef struct _XmListClassRec
Packit b099d7
{
Packit b099d7
  CoreClassPart        core_class;
Packit b099d7
  XmPrimitiveClassPart primitive_class;
Packit b099d7
  XmListClassPart      list_class;
Packit b099d7
} XmListClassRec;
Packit b099d7
Packit b099d7
externalref XmListClassRec xmListClassRec;
Packit b099d7
Packit b099d7
/* Internal form of the list elements. */
Packit b099d7
typedef	struct {
Packit b099d7
  Dimension	 height;
Packit b099d7
  Dimension	 width;
Packit b099d7
  Boolean	 selected;
Packit b099d7
  Boolean	 last_selected;
Packit b099d7
  Boolean	 LastTimeDrawn;
Packit b099d7
  int		 length;
Packit b099d7
  wchar_t	 first_char;
Packit b099d7
} Element, *ElementPtr;
Packit b099d7
Packit b099d7
/* The List instance record */
Packit b099d7
typedef struct _XmListPart
Packit b099d7
{
Packit b099d7
  Dimension	    spacing;
Packit b099d7
  short             ItemSpacing;
Packit b099d7
  Dimension         margin_width;
Packit b099d7
  Dimension    	    margin_height;
Packit b099d7
  XmFontList 	    font;
Packit b099d7
  XmString	   *items;
Packit b099d7
  int		    itemCount;
Packit b099d7
  XmString	   *selectedItems;
Packit b099d7
  int              *selectedPositions;	/* "selectedIndices" in Motif 1.2 */
Packit b099d7
  int		    selectedItemCount;
Packit b099d7
  int 		    visibleItemCount;
Packit b099d7
  int 		    LastSetVizCount;
Packit b099d7
  unsigned char	    SelectionPolicy;
Packit b099d7
  unsigned char	    ScrollBarDisplayPolicy;
Packit b099d7
  unsigned char	    SizePolicy;
Packit b099d7
  XmStringDirection StrDir;
Packit b099d7
Packit b099d7
  XtEnum	    AutoSelect;
Packit b099d7
  Boolean	    DidSelection;
Packit b099d7
  Boolean	    FromSetSB;
Packit b099d7
  Boolean	    FromSetNewSize;
Packit b099d7
  unsigned char	    SelectionMode;	/* "Boolean AddMode" in Motif 1.2 */
Packit b099d7
  unsigned char	    LeaveDir;
Packit b099d7
  unsigned char	    HighlightThickness;
Packit b099d7
  int 		    ClickInterval;
Packit b099d7
  XtIntervalId	    DragID;
Packit b099d7
  XtCallbackList    SingleCallback;
Packit b099d7
  XtCallbackList    MultipleCallback;
Packit b099d7
  XtCallbackList    ExtendCallback;
Packit b099d7
  XtCallbackList    BrowseCallback;
Packit b099d7
  XtCallbackList    DefaultCallback;
Packit b099d7
  
Packit b099d7
  
Packit b099d7
  GC		NormalGC;	
Packit b099d7
  GC		InverseGC;
Packit b099d7
  GC		HighlightGC;
Packit b099d7
  Pixmap        DashTile;	/* unused in Motif 1.2 */
Packit b099d7
  ElementPtr   *InternalList;
Packit b099d7
  int		LastItem;	/* position of last item in list */
Packit b099d7
  int		FontHeight;	/* unused in Motif 1.2 */
Packit b099d7
  int		top_position;
Packit b099d7
  char		Event;
Packit b099d7
  int		LastHLItem;
Packit b099d7
Packit b099d7
  /* These fields specify the boundaries of the selection (i.e.
Packit b099d7
   * the current selection) as specified by the "selected" field
Packit b099d7
   * of the InternalList elements and the boundaries of the 
Packit b099d7
   * last_selected selection (i.e. the previous selection) as
Packit b099d7
   * specified by the "last_selected" field of the InternalList
Packit b099d7
   * elements.
Packit b099d7
   */
Packit b099d7
  int		StartItem;
Packit b099d7
  int		OldStartItem;
Packit b099d7
  int		EndItem;
Packit b099d7
  int		OldEndItem;
Packit b099d7
Packit b099d7
  Position	BaseX;
Packit b099d7
  Position	BaseY;
Packit b099d7
Packit b099d7
  /* MouseMoved: unused resource from Motif1.2, used now in the
Packit b099d7
   * CheckSetRenderTable default proc (see List.c). 
Packit b099d7
   */
Packit b099d7
  Boolean	MouseMoved;
Packit b099d7
Packit b099d7
  Boolean	AppendInProgress;
Packit b099d7
  Boolean	Traversing;
Packit b099d7
  Boolean	KbdSelection;
Packit b099d7
  short		DownCount;
Packit b099d7
  Time		DownTime;
Packit b099d7
  int		CurrentKbdItem;	/* position of location cursor */
Packit b099d7
  unsigned char	SelectionType;
Packit b099d7
  GC		InsensitiveGC;
Packit b099d7
  
Packit b099d7
  int vmin;			/* unused in Motif 1.2 */
Packit b099d7
  int vmax;			/* unused in Motif 2.0 */
Packit b099d7
  int vOrigin;			/* unused in Motif 2.0 */
Packit b099d7
  int vExtent;			/* unused in Motif 2.0 */
Packit b099d7
  
Packit b099d7
  int hmin;			/* slider minimum coordiate position */
Packit b099d7
  int hmax;			/* slider maximum coordiate position */
Packit b099d7
  int hOrigin;			/* slider edge location              */
Packit b099d7
  int hExtent;			/* slider size                       */
Packit b099d7
Packit b099d7
  Dimension	MaxWidth;
Packit b099d7
  Dimension	CharWidth;	/* unused in Motif 1.2 */
Packit b099d7
  Position	XOrigin;
Packit b099d7
	
Packit b099d7
  XmScrollBarWidget	  hScrollBar;
Packit b099d7
  XmScrollBarWidget	  vScrollBar;
Packit b099d7
  XmScrolledWindowWidget  Mom;
Packit b099d7
  Dimension		  MaxItemHeight;
Packit b099d7
Packit b099d7
  /*--- New fields in Motif 2.0. ---*/
Packit b099d7
  int		selectedPositionCount;
Packit b099d7
Packit b099d7
  unsigned char	matchBehavior;
Packit b099d7
Packit b099d7
  /* The AutoSelectionType is used to designate where in the selection
Packit b099d7
   * process the user currently is when auto select is enabled. For
Packit b099d7
   * instance, during an extended select, there is a beginning to
Packit b099d7
   * the selection, possible mouse motions and finally a button release
Packit b099d7
   * resulting in either a selection identical to what was selected
Packit b099d7
   * before the beginning or to a selection that is different.
Packit b099d7
   */
Packit b099d7
  unsigned char	AutoSelectionType;
Packit b099d7
Packit b099d7
  /* PrimaryOwnership is used to describe how the list show take
Packit b099d7
   * ownership of the primary selection when the user selects list
Packit b099d7
   * items, with a possible value of NEVER.
Packit b099d7
   */
Packit b099d7
  unsigned char	PrimaryOwnership;
Packit b099d7
Packit b099d7
  XtCallbackList DestinationCallback;
Packit b099d7
Packit b099d7
  /* Selection rendition fields */
Packit b099d7
  XmRendition	scratchRend;
Packit b099d7
  Pixel		selectColor;
Packit b099d7
Packit b099d7
  /* This field is used to house the top position of the list before a
Packit b099d7
   * scrolling action begins. If the scrolling action is cancelled, then
Packit b099d7
   * we restore the list top position by using this field. When scrolling
Packit b099d7
   * by directly using the scroll bar, we don't need this field since the
Packit b099d7
   * scroll frame trait handles the reset. When scrolling by selecting
Packit b099d7
   * items and dragging off the edge of the list, we need to use this
Packit b099d7
   * field to reset the list position when a user presses the cancel key.
Packit b099d7
   */
Packit b099d7
  int		previous_top_position;
Packit b099d7
Packit b099d7
  XtIntervalId	drag_start_timer;
Packit b099d7
  char *	drag_abort_action;
Packit b099d7
  XEvent	drag_event;
Packit b099d7
  XmListDragConvertStruct *drag_conv;
Packit b099d7
} XmListPart;
Packit b099d7
Packit b099d7
Packit b099d7
/* Full instance record declaration */
Packit b099d7
typedef struct _XmListRec
Packit b099d7
{
Packit b099d7
  CorePart	  core;
Packit b099d7
  XmPrimitivePart primitive;
Packit b099d7
  XmListPart	  list;
Packit b099d7
} XmListRec;
Packit b099d7
Packit b099d7
Packit b099d7
#ifdef __cplusplus
Packit b099d7
}  /* Close scope of 'extern "C"' declaration which encloses file. */
Packit b099d7
#endif
Packit b099d7
Packit b099d7
#endif /* _XmListP_h */
Packit b099d7
/* DON'T ADD ANYTHING AFTER THIS #endif */