PanedP.h

Go to the documentation of this file.
00001 /***********************************************************
00002 
00003   $XConsortium: PanedP.h,v 1.6 94/04/17 20:12:30 gildea Exp $
00004 
00005 
00006 Copyright (c) 1987, 1988  X Consortium
00007 
00008 Permission is hereby granted, free of charge, to any person obtaining a copy
00009 of this software and associated documentation files (the "Software"), to deal
00010 in the Software without restriction, including without limitation the rights
00011 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00012 copies of the Software, and to permit persons to whom the Software is
00013 furnished to do so, subject to the following conditions:
00014 
00015 The above copyright notice and this permission notice shall be included in
00016 all copies or substantial portions of the Software.
00017 
00018 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00019 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00020 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
00021 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
00022 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00023 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00024 
00025 Except as contained in this notice, the name of the X Consortium shall not be
00026 used in advertising or otherwise to promote the sale, use or other dealings
00027 in this Software without prior written authorization from the X Consortium.
00028 
00029 
00030 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
00031 
00032                         All Rights Reserved
00033 
00034 Permission to use, copy, modify, and distribute this software and its 
00035 documentation for any purpose and without fee is hereby granted, 
00036 provided that the above copyright notice appear in all copies and that
00037 both that copyright notice and this permission notice appear in 
00038 supporting documentation, and that the name of Digital not be
00039 used in advertising or publicity pertaining to distribution of the
00040 software without specific, written prior permission.  
00041 
00042 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
00043 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
00044 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
00045 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
00046 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
00047 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
00048 SOFTWARE.
00049 
00050 ******************************************************************/
00051 
00052 /*
00053  * PanedP.h - Paned Composite Widget's private header file.
00054  *
00055  * Updated and significantly modified from the Athena VPaned Widget.
00056  *
00057  * Date:    March 1, 1989
00058  *
00059  * By:      Chris D. Peterson
00060  *          MIT X Consortium
00061  *          kit@expo.lcs.mit.edu
00062  */
00063 
00064 #ifndef _XawPanedP_h
00065 #define _XawPanedP_h
00066 
00067 #include <X11/Xaw3d/Paned.h>
00068 
00069 /*********************************************************************
00070  *
00071  * Paned Widget Private Data
00072  *
00073  *********************************************************************/
00074 
00075 /* New fields for the Paned widget class record */
00076 
00077 typedef struct _PanedClassPart {
00078     int foo;                    /* keep compiler happy. */
00079 } PanedClassPart;
00080 
00081 /* Full Class record declaration */
00082 typedef struct _PanedClassRec {
00083     CoreClassPart       core_class;
00084     CompositeClassPart  composite_class;
00085     ConstraintClassPart constraint_class;
00086     PanedClassPart     paned_class;
00087 } PanedClassRec;
00088 
00089 extern PanedClassRec panedClassRec;
00090 
00091 /* Paned constraint record */
00092 typedef struct _PanedConstraintsPart {
00093   /* Resources. */
00094     Dimension   min;            /* Minimum height */
00095     Dimension   max;            /* Maximum height */
00096     Boolean     allow_resize;   /* TRUE iff child resize requests are ok */
00097     Boolean     show_grip;      /* TRUE iff child will have grip below it,
00098                                    when it is not the bottom pane. */
00099     Boolean     skip_adjust;    /* TRUE iff child's height should not be */
00100                                 /* changed without explicit user action. */
00101     int         position;       /* position location in Paned (relative to
00102                                    other children) ** NIY ** */
00103     Dimension   preferred_size; /* The Preferred size of the pane.
00104                                    Iff this is zero then ask child for size.*/
00105     Boolean     resize_to_pref; /* resize this pane to its preferred size
00106                                    on a resize or change managed after 
00107                                    realize. */
00108 
00109   /* Private state. */
00110     Position    delta;          /* Desired Location */
00111     Position    olddelta;       /* The last value of dy. */
00112     Boolean     paned_adjusted_me; /* Has the vpaned adjusted this widget w/o
00113                                      user interaction to make things fit? */
00114     Dimension   wp_size;        /* widget's preferred size */ 
00115     int         size;           /* the size the widget will actually get. */
00116     Widget      grip;           /* The grip for this child */
00117 
00118 } PanedConstraintsPart, *Pane;
00119 
00120 typedef struct _PanedConstraintsRec {
00121     PanedConstraintsPart paned;
00122 } PanedConstraintsRec, *PanedConstraints;
00123 
00124 /*
00125  * The Pane Stack Structure.
00126  */
00127 
00128 typedef struct _PaneStack {
00129     struct _PaneStack * next;   /* The next element on the stack. */
00130     Pane pane;                  /* The pane in this element on the stack. */
00131     int start_size;             /* The size of this element when it was pushed
00132                                    onto the stack. */
00133 } PaneStack;
00134 
00135 /* New Fields for the Paned widget record */
00136 typedef struct {
00137     /* resources */
00138     Position    grip_indent;               /* Location of grips (offset 
00139                                               from right margin) */
00140     Boolean     refiguremode;              /* Whether to refigure changes 
00141                                               right now */
00142     XtTranslations grip_translations;      /* grip translation table */
00143     Pixel       internal_bp;               /* color of internal borders. */
00144     Dimension   internal_bw;               /* internal border width. */
00145     XtOrientation orientation;             /* Orientation of paned widget. */
00146 
00147     Cursor      cursor;                    /* Cursor for paned window */
00148     Cursor      grip_cursor;               /* inactive grip cursor */
00149     Cursor      v_grip_cursor;             /* inactive vert grip cursor */
00150     Cursor      h_grip_cursor;             /* inactive horiz grip cursor */
00151     Cursor      adjust_this_cursor;        /* active grip cursor: T */
00152     Cursor      v_adjust_this_cursor;      /* active vert grip cursor: T */
00153     Cursor      h_adjust_this_cursor;      /* active horiz grip cursor: T */
00154 
00155                                           /* vertical. */
00156     Cursor      adjust_upper_cursor;      /* active grip cursor: U */
00157     Cursor      adjust_lower_cursor;      /* active grip cursor: D */
00158 
00159                                           /* horizontal. */
00160     Cursor      adjust_left_cursor;       /* active grip cursor: U */
00161     Cursor      adjust_right_cursor;      /* active grip cursor: D */
00162 
00163     /* private */
00164     Boolean     recursively_called;        /* for ChangeManaged */
00165     Boolean     resize_children_to_pref;   /* override constrain resources
00166                                               and resize all children to
00167                                               preferred size. */
00168     int         start_loc;                 /* mouse origin when adjusting */
00169     Widget      whichadd;                  /* Which pane to add changes to */
00170     Widget      whichsub;                  /* Which pane to sub changes from */
00171     GC          normgc;                    /* GC to use when drawing borders */
00172     GC          invgc;                     /* GC to use when erasing borders */
00173     GC          flipgc;                    /* GC to use when animating
00174                                               borders */
00175     int         num_panes;                 /* count of managed panes */
00176     PaneStack * stack;                     /* The pane stack for this widget.*/
00177 } PanedPart;
00178 
00179 /**************************************************************************
00180  *
00181  * Full instance record declaration
00182  *
00183  **************************************************************************/
00184 
00185 typedef struct _PanedRec {
00186     CorePart       core;
00187     CompositePart  composite;
00188     ConstraintPart constraint;
00189     PanedPart     paned;
00190 } PanedRec;
00191 
00192 #endif /* _XawPanedP_h */
00193 /* DON'T ADD STUFF AFTER THIS #endif */

Generated on Sun Mar 4 15:03:55 2007 for Scilab [trunk] by  doxygen 1.5.1