Layout.h

Go to the documentation of this file.
00001 /*
00002  * $XConsortium: Layout.h,v 1.2 92/01/22 18:03:05 keith Exp $
00003  *
00004  * Copyright 1991 Massachusetts Institute of Technology
00005  *
00006  * Permission to use, copy, modify, distribute, and sell this software and its
00007  * documentation for any purpose is hereby granted without fee, provided that
00008  * the above copyright notice appear in all copies and that both that
00009  * copyright notice and this permission notice appear in supporting
00010  * documentation, and that the name of M.I.T. not be used in advertising or
00011  * publicity pertaining to distribution of the software without specific,
00012  * written prior permission.  M.I.T. makes no representations about the
00013  * suitability of this software for any purpose.  It is provided "as is"
00014  * without express or implied warranty.
00015  *
00016  * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
00017  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
00018  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
00019  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
00020  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
00021  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
00022  *
00023  * Author:  Keith Packard, MIT X Consortium
00024  */
00025 
00026 
00027 #ifndef _XawLayout_h
00028 #define _XawLayout_h
00029 
00030 #include <X11/Constraint.h>
00031 #include <X11/Xfuncproto.h>
00032 
00033 /****************************************************************
00034  *
00035  * Layout Widget (SubClass of CompositeClass)
00036  *
00037  ****************************************************************/
00038 
00039 /* RESOURCES:
00040 
00041  Name                    Class             RepType          Default Value
00042  ----                    -----             -------          -------------
00043  background              Background        Pixel            XtDefaultBackground
00044  border                  BorderColor       Pixel            XtDefaultForeground
00045  borderWidth             BorderWidth       Dimension        1
00046  cursor                  Cursor            Cursor           None
00047  destroyCallback         Callback          Pointer          NULL
00048  height                  Height            Dimension        0
00049  mappedWhenManaged       MappedWhenManaged Boolean          True
00050  sensitive               Sensitive         Boolean          True
00051  width                   Width             Dimension        0
00052  x                       Position          Position         0
00053  y                       Position          Position         0
00054  layout                  Layout            Layout           NULL
00055 
00056 */
00057 
00058 /*
00059  * Syntax of layout resource
00060  *
00061  *  *layout:\
00062  *      <widget-name>.<edge>,<widget-name>.<edge>: distance + stretch-factor\n\
00063  *      ...
00064  *  where the null widget-name is taken to be the Layout widget
00065  *
00066  * e.g:
00067  *
00068  *  *label-1.hStretch: 0
00069  *  *label-2.vStretch: 1
00070  *  *layout:\
00071  *      .left,          label-1.left:   10 + 0\n\
00072  *      label-1.right,  label-2.left:   10 + 1\n\
00073  *      label-2.right,  .right:         10 + 0
00074  *
00075  * This layout causes label-1 to be set 10 pixels from the left edge
00076  * and be whatever size the label widget requests, while label-2 will
00077  * be set 10 pixels from the right edge, and take up half of the remaining
00078  * space to 10 pixels from the right edge of label-1.
00079  */
00080  
00081 /* New Fields */
00082 #define XtNlayout "layout"
00083 #define XtCLayout "Layout"
00084 #define XtRLayout "Layout"
00085 #define XtNdebug  "debug"
00086 
00087 /* Class record constant */
00088 
00089 extern WidgetClass layoutWidgetClass;
00090 
00091 typedef struct _LayoutClassRec  *LayoutWidgetClass;
00092 typedef struct _LayoutRec       *LayoutWidget;
00093 
00094 #endif /* _Layout_h */

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