Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:15:28

0001 /* 
0002  * Motif
0003  *
0004  * Copyright (c) 1987-2012, The Open Group. All rights reserved.
0005  *
0006  * These libraries and programs are free software; you can
0007  * redistribute them and/or modify them under the terms of the GNU
0008  * Lesser General Public License as published by the Free Software
0009  * Foundation; either version 2 of the License, or (at your option)
0010  * any later version.
0011  *
0012  * These libraries and programs are distributed in the hope that
0013  * they will be useful, but WITHOUT ANY WARRANTY; without even the
0014  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
0015  * PURPOSE. See the GNU Lesser General Public License for more
0016  * details.
0017  *
0018  * You should have received a copy of the GNU Lesser General Public
0019  * License along with these librararies and programs; if not, write
0020  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
0021  * Floor, Boston, MA 02110-1301 USA
0022 */ 
0023 #ifndef _XmScrolledWindowP_h
0024 #define _XmScrolledWindowP_h
0025 
0026 #include <Xm/ManagerP.h>
0027 #include <Xm/ScrolledW.h>
0028 
0029 #include <Xm/ScrollBar.h>
0030 #include <Xm/DrawingA.h>
0031 
0032 #include <Xm/ScrollFrameT.h>
0033 
0034 #ifdef __cplusplus
0035 extern "C" {
0036 #endif
0037 
0038 typedef void (*XmGetAutoDragRectsProc)(Widget, XRectangle **, Cardinal *) ;
0039 
0040 #define XmInheritGetAutoDragRectsProc ((XmGetAutoDragRectsProc) _XtInherit)
0041 
0042 #define XmScrolledWindowClassExtVersion 1L
0043 
0044 typedef struct _XmScrolledWindowClassExtRec{
0045     XtPointer           next_extension;
0046     XrmQuark            record_type;
0047     long                version;
0048     Cardinal            record_size;
0049     XmGetAutoDragRectsProc get_hor_rects;
0050     XmGetAutoDragRectsProc get_vert_rects;
0051 } XmScrolledWindowClassExtRec, *XmScrolledWindowClassExt;
0052 
0053 /* New fields for the ScrolledWindow widget class record */
0054 typedef struct {
0055      XtPointer extension;   /* extension to new class methods */
0056 } XmScrolledWindowClassPart;
0057 
0058 /****************
0059  *
0060  * Class record declaration
0061  *
0062  ****************/
0063 typedef struct _XmScrolledWindowClassRec {
0064     CoreClassPart   core_class;
0065     CompositeClassPart  composite_class;
0066     ConstraintClassPart constraint_class;
0067     XmManagerClassPart  manager_class;
0068     XmScrolledWindowClassPart   swindow_class;
0069 } XmScrolledWindowClassRec;
0070 
0071 externalref XmScrolledWindowClassRec xmScrolledWindowClassRec;
0072 
0073 /****************
0074  *
0075  * Scrolled Window instance structure.
0076  *
0077  ****************/
0078 typedef struct {
0079 
0080    int vmin;          /*  slider minimum coordinate position     */
0081    int vmax;          /*  slider maximum coordinate position     */
0082    int vOrigin;       /*  slider edge location                  */
0083    int vExtent;       /*  slider size                           */
0084 
0085    int hmin;          /*  Same as above for horizontal bar.     */
0086    int hmax;
0087    int hOrigin;
0088    int hExtent;
0089 
0090    Position hsbX,hsbY;
0091    Dimension hsbWidth,hsbHeight;    /* Dimensions for the horiz bar */
0092 
0093    Position vsbX,vsbY;
0094    Dimension vsbWidth,vsbHeight;    /* Dimensions for the vertical bar */
0095 
0096    Position    GivenHeight, GivenWidth;
0097    /* these 2 fields are now obsolete, we re-use them for
0098       a different purpose, to track the initial position
0099       of the scrollbars */
0100 #define sw_prev_x GivenWidth
0101 #define sw_prev_y GivenHeight
0102 
0103    Dimension    AreaWidth,AreaHeight;
0104    Dimension    WidthPad,HeightPad;
0105    Position XOffset, YOffset;
0106 
0107    Dimension    pad;
0108 
0109    Boolean  hasHSB;
0110    Boolean  hasVSB;
0111    Boolean  InInit;
0112    Boolean  FromResize;
0113 
0114    unsigned char    VisualPolicy;
0115    unsigned char    ScrollPolicy;
0116    unsigned char    ScrollBarPolicy;
0117    unsigned char    Placement;
0118    
0119    XmScrollBarWidget    hScrollBar;
0120    XmScrollBarWidget    vScrollBar;
0121    XmDrawingAreaWidget  ClipWindow;
0122    Widget               WorkWindow;
0123    
0124    XtCallbackList       traverseObscuredCallback;
0125 
0126    XtEnum       auto_drag_model;
0127    XtIntervalId auto_drag_timer; 
0128 
0129    Boolean scroll_frame_inited ;
0130    XmScrollFrameData scroll_frame_data ;
0131 
0132    XtPointer    auto_drag_rects;
0133    XtPointer    auto_drag_closure;
0134 } XmScrolledWindowPart;
0135 
0136 
0137 /************************************************************************
0138  *                                  *
0139  * Full instance record declaration                 *
0140  *                                  *
0141  ************************************************************************/
0142 
0143 typedef struct _XmScrolledWindowRec {
0144     CorePart        core;
0145     CompositePart   composite;
0146     ConstraintPart constraint;
0147     XmManagerPart   manager;
0148     XmScrolledWindowPart   swindow;
0149 } XmScrolledWindowRec;
0150 
0151 
0152 /*  Frame constraint records  */
0153 
0154 typedef struct _XmScrolledWindowConstraintPart
0155 {
0156    unsigned char child_type;
0157    Position orig_x;
0158    Position orig_y;
0159 } XmScrolledWindowConstraintPart, * XmScrolledWindowConstraint;
0160 
0161 typedef struct _XmScrolledWindowConstraintRec
0162 {
0163    XmManagerConstraintPart manager;
0164    XmScrolledWindowConstraintPart   swindow;
0165 } XmScrolledWindowConstraintRec, * XmScrolledWindowConstraintPtr;
0166 
0167 
0168 #define DEFAULT_HEIGHT  20
0169 #define DEFAULT_WIDTH   20
0170 
0171 #define RESOURCE_DEFAULT (-1)
0172 
0173 #define GetSWConstraint(w) \
0174         (&((XmScrolledWindowConstraintPtr) (w)->core.constraints)->swindow)
0175 
0176 
0177 #ifdef __cplusplus
0178 }  /* Close scope of 'extern "C"' declaration which encloses file. */
0179 #endif
0180 
0181 #endif /* _XmScrolledWindowP_h */
0182 /* DON'T ADD STUFF AFTER THIS #endif */