[BACK]Return to gui_at_sb.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / vim

Annotation of src/usr.bin/vim/gui_at_sb.h, Revision 1.1

1.1     ! downsj      1: /*     $OpenBSD$       */
        !             2: /* vi:set ts=8 sw=4: */
        !             3: /* MODIFIED ATHENA SCROLLBAR (USING ARROWHEADS AT ENDS OF TRAVEL) */
        !             4: /* Modifications Copyright 1992 by Mitch Trachtenberg             */
        !             5: /* Rights, permissions, and disclaimer of warranty are as in the  */
        !             6: /* DEC and MIT notice below.  See usage warning in .c file.       */
        !             7: /*
        !             8:  * $XConsortium: ScrollbarP.h,v 1.3 94/04/17 20:12:42 jim Exp $
        !             9:  */
        !            10:
        !            11:
        !            12: /***********************************************************
        !            13:
        !            14: Copyright (c) 1987, 1988  X Consortium
        !            15:
        !            16: Permission is hereby granted, free of charge, to any person obtaining a copy
        !            17: of this software and associated documentation files (the "Software"), to deal
        !            18: in the Software without restriction, including without limitation the rights
        !            19: to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        !            20: copies of the Software, and to permit persons to whom the Software is
        !            21: furnished to do so, subject to the following conditions:
        !            22:
        !            23: The above copyright notice and this permission notice shall be included in
        !            24: all copies or substantial portions of the Software.
        !            25:
        !            26: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        !            27: IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        !            28: FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
        !            29: X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
        !            30: AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
        !            31: CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
        !            32:
        !            33: Except as contained in this notice, the name of the X Consortium shall not be
        !            34: used in advertising or otherwise to promote the sale, use or other dealings
        !            35: in this Software without prior written authorization from the X Consortium.
        !            36:
        !            37:
        !            38: Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
        !            39:
        !            40:                         All Rights Reserved
        !            41:
        !            42: Permission to use, copy, modify, and distribute this software and its
        !            43: documentation for any purpose and without fee is hereby granted,
        !            44: provided that the above copyright notice appear in all copies and that
        !            45: both that copyright notice and this permission notice appear in
        !            46: supporting documentation, and that the name of Digital not be
        !            47: used in advertising or publicity pertaining to distribution of the
        !            48: software without specific, written prior permission.
        !            49:
        !            50: DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
        !            51: ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
        !            52: DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
        !            53: ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
        !            54: WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
        !            55: ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
        !            56: SOFTWARE.
        !            57:
        !            58: ******************************************************************/
        !            59:
        !            60: #ifndef _Scrollbar_h
        !            61: #define _Scrollbar_h
        !            62:
        !            63: /****************************************************************
        !            64:  *
        !            65:  * Scrollbar Widget
        !            66:  *
        !            67:  ****************************************************************/
        !            68:
        !            69: #include <X11/IntrinsicP.h>
        !            70: #include <X11/Xaw/SimpleP.h>
        !            71: #include <X11/Xmu/Converters.h>
        !            72:
        !            73: /*
        !            74:  * Most things we need are in StringDefs.h
        !            75:  */
        !            76: #define XtCMinimumThumb                "MinimumThumb"
        !            77: #define XtCShown               "Shown"
        !            78: #define XtCTopOfThumb          "TopOfThumb"
        !            79: #define XtCMaxOfThumb          "MaxOfThumb"
        !            80: #define XtCShadowWidth         "ShadowWidth"
        !            81: #define XtCTopShadowPixel      "TopShadowPixel"
        !            82: #define XtCBottomShadowPixel   "BottomShadowPixel"
        !            83:
        !            84: #define XtNminimumThumb                "minimumThumb"
        !            85: #define XtNtopOfThumb          "topOfThumb"
        !            86: #define XtNmaxOfThumb          "maxOfThumb"
        !            87: #define XtNshadowWidth         "shadowWidth"
        !            88: #define XtNtopShadowPixel      "topShadowPixel"
        !            89: #define XtNbottomShadowPixel   "bottomShadowPixel"
        !            90:
        !            91: typedef struct _ScrollbarRec     *ScrollbarWidget;
        !            92: typedef struct _ScrollbarClassRec *ScrollbarWidgetClass;
        !            93:
        !            94: extern WidgetClass vim_scrollbarWidgetClass;
        !            95:
        !            96: #if NeedWidePrototypes
        !            97: extern void vim_XawScrollbarSetThumb __ARGS((Widget, double, double, double));
        !            98: #else
        !            99: extern void vim_XawScrollbarSetThumb __ARGS((Widget, float, float, float));
        !           100: #endif
        !           101:
        !           102: typedef struct
        !           103: {
        !           104:      /* public */
        !           105:     Pixel        foreground;   /* thumb foreground color */
        !           106:     XtOrientation orientation; /* horizontal or vertical */
        !           107:     XtCallbackList scrollProc; /* proportional scroll */
        !           108:     XtCallbackList thumbProc;  /* jump (to position) scroll */
        !           109:     XtCallbackList jumpProc;   /* same as thumbProc but pass data by ref */
        !           110:     Pixmap       thumb;        /* thumb color */
        !           111:     float        top;          /* What percent is above the win's top */
        !           112:     float        shown;        /* What percent is shown in the win */
        !           113:     float        max;          /* Maximum value for top */
        !           114:     Dimension    length;       /* either height or width */
        !           115:     Dimension    thickness;    /* either width or height */
        !           116:     Dimension    min_thumb;    /* minium size for the thumb. */
        !           117:
        !           118:      /* private */
        !           119:     XtIntervalId  timer_id;     /* autorepeat timer; remove on destruction */
        !           120:     char         scroll_mode;  /* see below */
        !           121:     float        scroll_off;   /* offset from event to top of thumb */
        !           122:     GC           gc;           /* a (shared) gc */
        !           123:     Position     topLoc;       /* Pixel that corresponds to top */
        !           124:     Dimension    shownLength;  /* Num pixels corresponding to shown */
        !           125:
        !           126:     /* From 3d widget */
        !           127:     Dimension  shadow_width;
        !           128:     Pixel      top_shadow_pixel;
        !           129:     Pixel      bot_shadow_pixel;
        !           130:     int                top_shadow_contrast;
        !           131:     int                bot_shadow_contrast;
        !           132:     GC         top_shadow_GC;
        !           133:     GC         bot_shadow_GC;
        !           134: } ScrollbarPart;
        !           135:
        !           136: #define SMODE_NONE             0
        !           137: #define SMODE_CONT             1
        !           138: #define SMODE_PAGE_UP          2
        !           139: #define SMODE_PAGE_DOWN                3
        !           140: #define SMODE_LINE_UP          4
        !           141: #define SMODE_LINE_DOWN                5
        !           142:
        !           143: #define ONE_LINE_DATA          1
        !           144: #define ONE_PAGE_DATA          10
        !           145: #define END_PAGE_DATA          9999
        !           146:
        !           147: typedef struct _ScrollbarRec {
        !           148:     CorePart           core;
        !           149:     SimplePart         simple;
        !           150:     ScrollbarPart      scrollbar;
        !           151: } ScrollbarRec;
        !           152:
        !           153: typedef struct {int empty;} ScrollbarClassPart;
        !           154:
        !           155: typedef struct _ScrollbarClassRec {
        !           156:     CoreClassPart              core_class;
        !           157:     SimpleClassPart            simple_class;
        !           158:     ScrollbarClassPart         scrollbar_class;
        !           159: } ScrollbarClassRec;
        !           160:
        !           161: extern ScrollbarClassRec vim_scrollbarClassRec;
        !           162:
        !           163: #endif /* _Scrollbar_h */