home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 15 / AACD15.ISO / AACD / Programming / BGUI / bgui_e / sources / emodules / bgui / bgui_image.e < prev    next >
Encoding:
Text File  |  1998-11-28  |  13.3 KB  |  321 lines

  1. OPT MODULE
  2. OPT EXPORT
  3. OPT PREPROCESS
  4.  
  5. /*
  6.  * $VER: bgui/image.e 41.10 (28.11.96)
  7.  *
  8.  * Image classes structures and constants.
  9.  *
  10.  * (C) Copyright 1998 Manuel Lemos.
  11.  * (C) Copyright 1996-1997 Ian J. Einman.
  12.  * (C) Copyright 1993-1996 Jaba Development.
  13.  * (C) Copyright 1993-1996 Jan van den Baard.
  14.  * (C) Copyright 1996-1998 Dominique Dutoit.
  15.  * All Rights Reserved.
  16.  *
  17.  */
  18.  
  19. MODULE  'intuition/imageclass',
  20.         'libraries/bgui',
  21.         'graphics/gfx',
  22.         'graphics/rastport',
  23.         'intuition/screens',
  24.         'intuition/intuition'
  25.  
  26. /*****************************************************************************
  27.  *
  28.  *  "frameclass" - BOOPSI framing image.
  29.  *
  30.  *  Tags: 1 - 80    Methods: 1 - 40
  31.  */
  32. CONST   FRM_TAGSTART                    = BGUI_TB+1,
  33.         FRM_Type                        = BGUI_TB+1,     /* ISG-- */
  34.         FRM_CustomHook                  = BGUI_TB+2,     /* ISG-- */
  35.         FRM_BackFillHook                = BGUI_TB+3,     /* ISG-- */
  36.         FRM_Title                       = BGUI_TB+4,     /* ISG-- */
  37.         FRM_TextAttr                    = BGUI_TB+5,     /* ISG-- */
  38.         FRM_Flags                       = BGUI_TB+6,     /* ISG-- */
  39.         FRM_FrameWidth                  = BGUI_TB+7,     /* ISG-- */
  40.         FRM_FrameHeight                 = BGUI_TB+8,     /* ISG-- */
  41.         FRM_BackFill                    = BGUI_TB+9,     /* ISG-- */
  42.         FRM_EdgesOnly                   = BGUI_TB+10,    /* ISG-- */
  43.         FRM_Recessed                    = BGUI_TB+11,    /* ISG-- */
  44.         FRM_CenterTitle                 = BGUI_TB+12,    /* ISG-- */
  45.         FRM_HighlightTitle              = BGUI_TB+13,    /* ISG-- */
  46.         FRM_ThinFrame                   = BGUI_TB+14,    /* ISG-- */
  47.         FRM_BackPen                     = BGUI_TB+15,    /* ISG-- */  /* V39 */
  48.         FRM_SelectedBackPen             = BGUI_TB+16,    /* ISG-- */  /* V39 */
  49.         FRM_BackDriPen                  = BGUI_TB+17,    /* ISG-- */  /* V39 */
  50.         FRM_SelectedBackDriPen          = BGUI_TB+18,    /* ISG-- */  /* V39 */
  51.         FRM_TitleLeft                   = BGUI_TB+19,    /* ISG-- */  /* V40 */
  52.         FRM_TitleRight                  = BGUI_TB+20,    /* ISG-- */  /* V40 */
  53.         FRM_BackRasterPen               = BGUI_TB+21,    /* ISG-- */  /* V41 */
  54.         FRM_BackRasterDriPen            = BGUI_TB+22,    /* ISG-- */  /* V41 */
  55.         FRM_SelectedBackRasterPen       = BGUI_TB+23,    /* ISG-- */  /* V41 */
  56.         FRM_SelectedBackRasterDriPen    = BGUI_TB+24,    /* ISG-- */  /* V41 */
  57.         FRM_Template                    = BGUI_TB+25,    /* IS--- */  /* V41 */
  58.         FRM_TitleID                     = BGUI_TB+26,    /* ISG-- */  /* V41 */
  59.         FRM_FillPattern                 = BGUI_TB+27,    /* ISG-- */  /* V41 */
  60.         FRM_SelectedFillPattern         = BGUI_TB+28,    /* ISG-- */  /* V41 */
  61.         FRM_OuterOffsetLeft             = BGUI_TB+31,    /* ISG-- */  /* V41 */
  62.         FRM_OuterOffsetRight            = BGUI_TB+32,    /* ISG-- */  /* V41 */
  63.         FRM_OuterOffsetTop              = BGUI_TB+33,    /* ISG-- */  /* V41 */
  64.         FRM_OuterOffsetBottom           = BGUI_TB+34,    /* ISG-- */  /* V41 */
  65.         FRM_InnerOffsetLeft             = BGUI_TB+35,    /* ISG-- */  /* V41 */
  66.         FRM_InnerOffsetRight            = BGUI_TB+36,    /* ISG-- */  /* V41 */
  67.         FRM_InnerOffsetTop              = BGUI_TB+37,    /* ISG-- */  /* V41 */
  68.         FRM_InnerOffsetBottom           = BGUI_TB+38,    /* ISG-- */  /* V41 */
  69.         FRM_TAGDONE                     = BGUI_TB+80,
  70.  
  71. /* Back fill types */
  72.         STANDARD_FILL                   = 0,
  73.         SHINE_RASTER                    = 1,
  74.         SHADOW_RASTER                   = 2,
  75.         SHINE_SHADOW_RASTER             = 3,
  76.         FILL_RASTER                     = 4,
  77.         SHINE_FILL_RASTER               = 5,
  78.         SHADOW_FILL_RASTER              = 6,
  79.         SHINE_BLOCK                     = 7,
  80.         SHADOW_BLOCK                    = 8,
  81.         FILL_BLOCK                      = 9,        /* V41 */
  82.  
  83. /* Flags */
  84.         FRF_EDGES_ONLY                  = 1,
  85.         FRF_RECESSED                    = 2,
  86.         FRF_CENTER_TITLE                = 4,
  87.         FRF_HIGHLIGHT_TITLE             = 8,
  88.         FRF_THIN_FRAME                  = 16,
  89.         FRF_TITLE_LEFT                  = 32,         /* V40 */
  90.         FRF_TITLE_RIGHT                 = 64          /* V40 */
  91.  
  92. ENUM    FRB_EDGES_ONLY,
  93.         FRB_RECESSED,
  94.         FRB_CENTER_TITLE,
  95.         FRB_HIGHLIGHT_TITLE,
  96.         FRB_THIN_FRAME,
  97.         FRB_TITLE_LEFT,         /* V40 */
  98.         FRB_TITLE_RIGHT         /* V40 */
  99.  
  100. /* Frame types */
  101. CONST   FRTYPE_CUSTOM                   = 0,
  102.         FRTYPE_BUTTON                   = 1,
  103.         FRTYPE_RIDGE                    = 2,
  104.         FRTYPE_DROPBOX                  = 3,
  105.         FRTYPE_NEXT                     = 4,
  106.         FRTYPE_RADIOBUTTON              = 5,
  107.         FRTYPE_XEN_BUTTON               = 6,
  108.         FRTYPE_TAB_ABOVE                = 7,    /* V40 */
  109.         FRTYPE_TAB_BELOW                = 8,    /* V40 */
  110.         FRTYPE_BORDER                   = 9,    /* V40 */
  111.         FRTYPE_NONE                     = 10,   /* V40 */
  112.         FRTYPE_FUZZ_BUTTON              = 11,   /* V41 */
  113.         FRTYPE_FUZZ_RIDGE               = 12,   /* V41 */
  114.         FRTYPE_TAB_TOP                  = 13,   /* V41.8 */
  115.         FRTYPE_TAB_BOTTOM               = 14,
  116.         FRTYPE_TAB_LEFT                 = 15,
  117.         FRTYPE_TAB_RIGHT                = 16,
  118.  
  119.         FRTYPE_DEFAULT                  = -1,   /* 41.8 */
  120.  
  121.         FRAMEM_BACKFILL                 = BGUI_MB+21
  122.  
  123. /* Backfill a specific rectangle with the backfill hook. */
  124. OBJECT fmBackfill
  125.         methodID:LONG             /* FRM_RENDER                     */
  126.         bInfo:PTR TO baseInfo     /* BaseInfo ready for rendering   */
  127.         bounds:PTR TO rectangle   /* Rendering bounds.              */
  128.         state:LONG                /* See "intuition/imageclass.h"   */
  129. ENDOBJECT
  130.  
  131. /*
  132.  *  FRM_RENDER:
  133.  *
  134.  *  The message packet sent to both the FRM_CustomHook
  135.  *  and FRM_BackFillHook routines. Note that this
  136.  *  structure is READ-ONLY!
  137.  *
  138.  */
  139. CONST   FRM_RENDER                      = 1 /* Render yourself           */
  140.  
  141. OBJECT frameDrawMsg
  142.     methodID:LONG               -> FRM_RENDER
  143.     rPort:PTR TO rastport       -> RastPort ready for rendering
  144.     drawInfo:PTR TO drawinfo    -> All you need to render
  145.     bounds:PTR TO rectangle     -> Rendering bounds
  146.     state:INT                   -> See "intuition/imageclass.h"
  147.     horizontal:CHAR             -> Horizontal thickness
  148.     vertical:CHAR               -> Vertical thickness
  149. ENDOBJECT
  150.  
  151. /*
  152.  *  FRM_THICKNESS:
  153.  *
  154.  *  The message packet sent to the FRM_Custom hook.
  155.  */
  156. CONST   FRM_THICKNESS   = 2 /* Give the default frame thickness. */
  157.  
  158. OBJECT thicknessMsg
  159.     methodID:LONG                       -> FRM_THICKNESS
  160.     thicknessHorizontal:PTR TO CHAR     -> Storage for horizontal
  161.     thicknessVertical:PTR TO CHAR       -> Storage for vertical
  162.     thin:INT                            -> Added in V38!
  163. ENDOBJECT
  164.  
  165. /* Possible hook return codes. */
  166. CONST   FRC_OK              = 0,             /* OK        */
  167.         FRC_UNKNOWN         = 1,             /* Unknow method */
  168.  
  169. /*****************************************************************************
  170.  *
  171.  *  "labelclass" - BOOPSI labeling image.
  172.  *
  173.  *  Tags: 81 - 160      Methods: 1 - 40
  174.  */
  175.         LAB_TAGSTART        = BGUI_TB+81,
  176.         LAB_TextAttr        = BGUI_TB+81,    /* ISG-- */
  177.         LAB_Style           = BGUI_TB+82,    /* ISG-- */
  178.         LAB_Underscore      = BGUI_TB+83,    /* ISG-- */
  179.         LAB_Place           = BGUI_TB+84,    /* ISG-- */
  180.         LAB_Label           = BGUI_TB+85,    /* ISG-- */
  181.         LAB_Flags           = BGUI_TB+86,    /* ISG-- */
  182.         LAB_Highlight       = BGUI_TB+87,    /* ISG-- */
  183.         LAB_HighUScore      = BGUI_TB+88,    /* ISG-- */
  184.         LAB_Pen             = BGUI_TB+89,    /* ISG-- */
  185.         LAB_SelectedPen     = BGUI_TB+90,    /* ISG-- */
  186.         LAB_DriPen          = BGUI_TB+91,    /* ISG-- */
  187.         LAB_SelectedDriPen  = BGUI_TB+92,    /* ISG-- */
  188.         LAB_LabelID         = BGUI_TB+93,    /* ISG-- */ /* V41 */
  189.         LAB_Template        = BGUI_TB+94,    /* IS--- */ /* V41 */
  190.         LAB_NoPlaceIn       = BGUI_TB+95,    /* ISG-- */     /* V41.7 */
  191.         LAB_SelectedStyle   = BGUI_TB+96,    /* ISG-- */     /* V41.7 */
  192.         LAB_FlipX           = BGUI_TB+97,    /* ISG-- */     /* V41.7 */
  193.         LAB_FlipY           = BGUI_TB+98,    /* ISG-- */     /* V41.7 */
  194.         LAB_FlipXY          = BGUI_TB+99,    /* ISG-- */     /* V41.7 */
  195.         LAB_TAGDONE         = BGUI_TB+160,
  196.  
  197. /* Flags */
  198.         LABF_HIGHLIGHT      = 1, /* Highlight label    */
  199.         LABF_HIGH_USCORE    = 2, /* Highlight underscoring */
  200.         LABF_FLIP_X         = 4, /* Flip across x axis     */
  201.         LABF_FLIP_Y         = 8, /* Flip across y axis     */
  202.         LABF_FLIP_XY        = 16,/* Flip across x = y      */
  203.  
  204.         LABB_HIGHTLIGHT     = 0, /* Highlight label    */
  205.         LABB_HIGH_USCORE    = 1, /* Highlight underscoring */
  206.         LABB_FLIP_X         = 2, /* Flip across x axis     */
  207.         LABB_FLIP_Y         = 3, /* Flip across y axis     */
  208.         LABB_FLIP_XY        = 4, /* Flip across x = y      */
  209.  
  210. /* Label placement */
  211.         PLACE_IN            = 0,
  212.         PLACE_LEFT          = 1,
  213.         PLACE_RIGHT         = 2,
  214.         PLACE_ABOVE         = 3,
  215.         PLACE_BELOW         = 4,
  216.  
  217. /* New methods */
  218. /*
  219.  *  The IM_EXTENT method is used to find out how many
  220.  *  pixels the label extents the relative hitbox in
  221.  *  either direction. Normally this method is called
  222.  *  by the baseclass.
  223.  */
  224.         IM_EXTENT           = BGUI_MB+1
  225.  
  226. OBJECT impExtent
  227.     methodID:LONG           /* IM_EXTENT            */
  228.     rPort:PTR TO rastport           /* RastPort         */
  229.     extent:PTR TO ibox              /* Storage for extentions.  */
  230.     labelSizeWidth:PTR TO INT       /* Storage width in pixels  */
  231.     labelSizeHeight:PTR TO INT      /* Storage height in pixels */
  232.     flags:INT                       /* See below.           */
  233. ENDOBJECT
  234.  
  235. CONST   EXTF_MAXIMUM        = 1, /* Request maximum extensions. */
  236.  
  237. /*****************************************************************************
  238.  *
  239.  *  "vectorclass" - BOOPSI scalable vector image.
  240.  *
  241.  *  Tags: 161 - 240
  242.  *
  243.  *  Based on an idea found in the ObjectiveGadTools.library
  244.  *  by Davide Massarenti.
  245.  */
  246.         VIT_TAGSTART        = BGUI_TB+161,
  247.         VIT_VectorArray     = BGUI_TB+161,   /* ISG-- */
  248.         VIT_BuiltIn         = BGUI_TB+162,   /* ISG-- */
  249.         VIT_Pen             = BGUI_TB+163,   /* ISG-- */
  250.         VIT_DriPen          = BGUI_TB+164,   /* ISG-- */
  251.         VIT_ScaleWidth      = BGUI_TB+165,   /* --G-- */ /* V41 */
  252.         VIT_ScaleHeight     = BGUI_TB+166,   /* --G-- */ /* V41 */
  253.         VIT_TAGDONE         = BGUI_TB+240
  254.  
  255. /*
  256.  *  Command structure which can contain
  257.  *  coordinates, data and command flags.
  258.  */
  259. OBJECT vectorItem
  260.     x:INT        /* X coordinate or data */
  261.     y:INT        /* Y coordinate         */
  262.     flags:LONG   /* See below        */
  263. ENDOBJECT
  264.  
  265. /* Flags */
  266. SET     VIF_MOVE,           /* Move to x, y           */
  267.         VIF_DRAW,           /* Draw to x, y           */
  268.         VIF_AREASTART,      /* Start AreaFill at x, y     */
  269.         VIF_AREAEND,        /* End AreaFill at x, y       */
  270.         VIF_XRELRIGHT,      /* x relative to right edge      */
  271.         VIF_YRELBOTTOM,     /* y relative to bottom edge     */
  272.         VIF_SHADOWPEN,      /* switch to SHADOWPEN, Move/Draw   */
  273.         VIF_SHINEPEN,       /* switch to SHINEPEN, Move/Draw    */
  274.         VIF_FILLPEN,        /* switch to FILLPEN, Move/Draw     */
  275.         VIF_TEXTPEN,        /* switch to TEXTPEN, Move/Draw     */
  276.         VIF_COLOR,          /* switch to color in x      */
  277.         VIF_LASTITEM,       /* last element of the element list */
  278.         VIF_SCALE,          /* X & Y are design width & height  */
  279.         VIF_DRIPEN,         /* switch to dripen x        */
  280.         VIF_AOLPEN,         /* set area outline pen x        */
  281.         VIF_AOLDRIPEN,      /* set area outline dripen x     */
  282.         VIF_ENDOPEN,        /* end area outline pen             */
  283.         VIF_MINSIZE,        /* X & Y are minimum size            */  /* V41.8 */
  284.         VIF_LINEPATTERN,    /* Use line pattern in vc_x          */
  285.         VIF_BPEN,           /* Interpret vc_y as bpen            */
  286.         VIF_DRAWMODE        /* Draw mode                         */
  287.  
  288.  
  289. /* Built-in images. */
  290. ENUM    BUILTIN_GETPATH = 1,
  291.         BUILTIN_GETFILE,
  292.         BUILTIN_CHECKMARK,
  293.         BUILTIN_POPUP,
  294.         BUILTIN_ARROW_UP,
  295.         BUILTIN_ARROW_DOWN,
  296.         BUILTIN_ARROW_LEFT,
  297.         BUILTIN_ARROW_RIGHT,
  298.         BUILTIN_CYCLE,          /* V41 */
  299.         BUILTIN_CYCLE2,         /* V41 */
  300.         BUILTIN_RADIOBUTTON,    /* V41 */
  301.         BUILTIN_GETFONT,        /* V41.9 */
  302.         BUILTIN_GETSCREEN       /* V41.9 */
  303.  
  304. /* Design width and heights of the built-in images. */
  305. CONST   GETPATH_WIDTH       = 20,
  306.         GETPATH_HEIGHT      = 14,
  307.         GETFILE_WIDTH       = 20,
  308.         GETFILE_HEIGHT      = 14,
  309.         CHECKMARK_WIDTH     = 24,
  310.         CHECKMARK_HEIGHT    = 11,
  311.         POPUP_WIDTH         = 15,
  312.         POPUP_HEIGHT        = 13,
  313.         ARROW_UP_WIDTH      = 16,
  314.         ARROW_UP_HEIGHT     = 9,
  315.         ARROW_DOWN_WIDTH    = 16,
  316.         ARROW_DOWN_HEIGHT   = 9,
  317.         ARROW_LEFT_WIDTH    = 10,
  318.         ARROW_LEFT_HEIGHT   = 12,
  319.         ARROW_RIGHT_WIDTH   = 10,
  320.         ARROW_RIGHT_HEIGHT  = 12
  321.