home *** CD-ROM | disk | FTP | other *** search
- IFND DFUNC_I
- DFUNC_I SET 1
- ** $VER: gadgets.i 2.2 (25.9.95)
- ** Include Release 1.1
- **
- ** Descriptions of Digital Surface Gadgets.
- ** For use with dfunc.library ver. 37.8 or higher.
- **
- ** NOTE: This include is still under developement and be aware of that
- ** it is subject to change for improving the library. The only safe
- ** structure to use is the gadget stucture and its flags. Do not use any
- ** of the other structures. They are incomplete or not functioning.
- **
- ** Copyright © 1994,1995 by Digital Surface.
- ** All rights reserved
-
- IFND EXEC_TYPES_I
- INCLUDE "exec/types.i"
- ENDC
-
- ; This is the structure of Digital Surface Gadgets (DG_). Remember that if
- ; you are specifying another gadgetkind than ButtonKind which is default,
- ; the appropriate structure has to be used cause the values don't necessary
- ; fit.
-
- STRUCTURE ButtonGadgets,0 ;size: 42 bytes
-
- WORD dg_Left ; x position of gadget
- WORD dg_Top ; y position of gadget
- WORD dg_Width ; width of gadget
- WORD dg_Height ; height of gadget
- WORD dg_ID ; your personal ID for this gadget
- APTR dg_Title1 ; title in unpressed state/cycle text or visable lines
- APTR dg_Title2 ; title in pressed state (optional)/ or real length
- APTR dg_Image1 ; pointer to an image structure/cycle images or top position
- APTR dg_Image2 ; image in pressed state (optional)
- LONG dg_ColorPacket ; color packet describing colors of elements in gad.
- LONG dg_Flags ; flags for gadget (see below)
- APTR dg_Font ; pointer to a TextAttr (optional)
- APTR dg_Link ; pointer to another gadget group
- LABEL dg_SIZEOF
-
- ; For scaling gadgets these structures are needed internally for the scale
- ; function. Do NOT alter these structures:
-
- STRUCTURE GadScale,0
-
- LONG sca_Size
- LONG sca_Window
- LONG sca_GadList
- WORD sca_OldX
- WORD sca_OldY
- LABEL sca_SIZEOF
-
- ;This body structure is used internally by the ScaleInit()/ScaleGads()
-
- ;## Private:
-
- STRUCTURE ScaleBody,0
-
- WORD sca_Top
- WORD sca_Left
- WORD sca_Width
- WORD sca_Height
- LONG sca_Font
- LABEL scb_SIZEOF
-
- ** NOTE: These structures are subject to change in future.
-
- ;Here is the structure for using the SliderKind gadget:
-
- ** NOTE: Yet not final!! DO NOT USE THIS STRUCTURE!!
-
- ;## Private:
-
- STRUCTURE DSLIDER,0 ;size: 40 bytes
-
- WORD dgsl_Left ; x position of gadget
- WORD dgsl_Top ; y position of gadget
- WORD dgsl_Width ; width of gadget
- WORD dgsl_Height ; height of gadget
- WORD dgsl_ArrowW ; width of arrow field
- WORD dgsl_ArrowH ; height of arrow field
- APTR dgsl_List ; pointer to pointertable of text
- LONG dgsl_reserved1
- LONG dgsl_reserved2
- LONG dgsl_ColorPacket ;colors of slider text, borders, back etc.
- LONG dgsl_Flags ; see below for flag definitions
- APTR dgsl_Font ; pointer to a TextAttr (optional)
- LONG dgsl_reserved3
- LABEL dgs_SIZEOF
-
- ; Here are the FLAG definitions of the gadgets:
-
- DG_PRESSED EQU $1 ;if you want the gadget to be selected
- DG_INPRESSABLE EQU $2 ;can't press this gadget down
- DG_INVISABLE EQU $4 ;you can't see this one, but it works
- DG_INSCALABLE EQU $8 ;keep same size if a window resize
- DG_NOBORDER EQU $10 ;no border around the gadget
- DG_NOBACK EQU $20 ;make back transperant (overlay on pics etc.)
- DG_TEXTLEFT EQU $40 ;draw text in gadget from left
- DG_TEXTRIGHT EQU $80 ;draw text from right
- DG_TEXTSHADOW EQU $100 ;make shadow on text
- DG_HOTKEY EQU $200 ;respond to hotkeys (see below)
- DG_INSENSITIVE EQU $400 ;don't care about char. case if a hotkey
- DG_SHADOWRIGHT EQU $800 ;shadow on the right side of gadget
- DG_SHADOWBOTTOM EQU $1000 ;shadow below gadget
- DG_SHADOWCORNER EQU $2000 ;shadow right/below of gadget (if matrix')
- DG_IMAGECENTER EQU $4000 ;put image in center of gadget
- DG_IMAGERIGHT EQU $8000 ;draw image from right
- DG_GHOSTED EQU $10000 ;ghosted look and inpressable
-
- DG_CYCLEKIND EQU $20000 ;make us a cycle gadget
- DG_SLIDERKIND EQU $40000 ;a listview kind of style gadget
- DG_PROCESSKIND EQU $80000 ;start a task or jump to a code when pressed
- DG_TEXTKIND EQU $100000 ;text input
- DG_NUMERICKIND EQU $200000 ;numeric input
-
- DG_MASK EQU $400000 ;Mask map
- DG_PROCTASK EQU $800000 ;CreateProc -- SUB call (Code--RTS) is default
-
- DG_DBLBORDERV EQU $1000000 ;for different resolutions you can select
- DG_DBLBORDERH EQU $2000000 ;which border shall be double. This is
- ;necessary cause we don't use DisplayInfo.
- DG_RESERVED2 EQU $4000000
-
- DG_MOVABLE EQU $8000000
- DG_PICTURE EQU $10000000
- DG_TEXTEMBOSS EQU $20000000 ;make emboss effect on text. Only useful
- ;with bigger fonts.
- DG_RESERVED3 EQU $40000000
-
- DG_EXTENDED EQU $80000000 ;enable use of dg_Link field for more flags.
- ;Unfunctional, DO NOT use this flag yet!
-
- ;Flag macros:
-
- DG_DBLBORDERS EQU DG_DBLBORDERH!DG_DBLBORDERV
- DG_SHADOW EQU DG_SHADOWRIGHT!DG_SHADOWBOTTOM
- DG_HOTKEYS EQU DG_HOTKEY!DG_INSENSITIVE
-
- * Flags of the future:
- *
- * DG_PATTERN - Set image in patters in the gadget box (dots, squares etc.)
-
- ;* Slider kind: DO NOT use this structure!
-
- DG_SLIDERLEFT EQU $40 ;slider on left side of screen
- DG_SLIDERBOTTOM EQU $1000 ;slider in bottom of screen
- DG_SLIDERTOP EQU $800 ;slider on top of screen
- DG_OUTPUTBOX EQU $20
- DG_KEYS EQU $200 ;if you want to use the arrow-keys
-
- ;you can also use the DG_HOTKEY flag
-
- ** BIT definition of FLAGS of DigitalGadgets:
-
- DGB_PRESSED EQU 0
- DGB_INPRESSABLE EQU 1
- DGB_INVISABLE EQU 2
- DGB_INSCALABLE EQU 3
- DGB_NOBORDER EQU 4
- DGB_NOBACK EQU 5
- DGB_TEXTLEFT EQU 6
- DGB_TEXTRIGHT EQU 7
- DGB_TEXTSHADOW EQU 8
- DGB_HOTKEY EQU 9
- DGB_INSENSITIVE EQU 10
- DGB_SHADOWRIGHT EQU 11
- DGB_SHADOWBOTTOM EQU 12
- DGB_SHADOWCORNER EQU 13
- DGB_IMAGECENTER EQU 14
- DGB_IMAGERIGHT EQU 15
- DGB_GHOSTED EQU 16
- DGB_CYCLEKIND EQU 17
- DGB_SLIDERKIND EQU 18
- DGB_PROCESSKIND EQU 19
- DGB_TEXTKIND EQU 20
- DGB_NUMERICKIND EQU 21
- DGB_MASK EQU 22
- DGB_PROCTASK EQU 23
- DGB_DBLBORDERV EQU 24
- DGB_DBLBORDERH EQU 25
-
- DGB_RESERVED2 EQU 26 ;res2
-
- DGB_MOVABLE EQU 27
- DGB_PICTURE EQU 28
- DGB_TEXTEMBOSS EQU 29
-
- DGB_RESERVED3 EQU 30 ;res3
-
- DGB_EXTENDED EQU 31 ;set flag and use link field for more
- ;flags (32 bits wide).
-
- ;Flag bit macros:
-
- DGB_DBLBORDERS EQU DGB_DBLBORDERH!DGB_DBLBORDERV
- DGB_SHADOW EQU DGB_SHADOWRIGHT!DGB_SHADOWBOTTOM
- DGB_HOTKEYS EQU DGB_HOTKEY!DGB_INSENSITIVE
-
- ;DO NOT USE THESE FLAGS:
-
- ;## Private:
-
- DGB_SLIDERLEFT EQU 4
- DGB_SLIDERRIGHT EQU 5
- DGB_SLIDERTOP EQU 10
- DGB_SLIDERBOTTOM EQU 11
- DGB_KEYS EQU 16
-
- ;PrintText() Flags
-
- DGPT_CENTER EQU $1
- DGPT_SHADOW EQU $2
-
- DGPTB_CENTER EQU 0
- DGPTB_SHADOW EQU 1
-
- ;SetFont() Flags
-
- DGF_CHECK EQU $0
- DGF_FORCE EQU $1
-
- DGFB_CHECK EQU 0
- DGFB_FORCE EQU 1
-
- ;ClrWindow() Flags
-
- CLR_NORMAL EQU $0
- CLR_GHOSTED EQU $1
-
- CLRB_NORMAL EQU 0
- CLRB_GHOSTED EQU 1
-
- ; This structure is used when you are gonna dump windows to printer:
-
- STRUCTURE PrintWindow,0
-
- WORD prt_Top ;x start position of print
- WORD prt_Left ;y start position
- WORD prt_Width ;width of window to be printed
- WORD prt_Height ;height of window to be printed
- WORD prt_AspectX ;horizontal aspect of print
- WORD prt_AspectY ;vertical aspect of print
- LABEL prt_SIZEOF
-
- ; This structure is used to define the height, width and zoom position
- ; of a sample:
-
- STRUCTURE DrawSample,0
-
- LONG samp_Sample ;pointer to sample buffer (public,chip)
- WORD samp_Left ;x position of drawing area
- WORD samp_Top ;y position of drawing area
- WORD samp_Width ;width of drawing area
- WORD samp_Height ;heigth of drawing area
- WORD samp_ZoomPos ;start show sample from this position
- WORD samp_ZoomSize ;used as length of visable sample
- LABEL samp_SIZEOF
-
-
- ;DFAllocList() allows you to allocate a memory pool by a list.
-
- STRUCTURE DF_PoolList,0
-
- LONG dmeml_Size
- LONG dmeml_Attr
- LABEL dmeml_SIZEOF
-
- DF_IDCMP = $8!$10!$200000 ;MouseMove!MouseButtons!VanillaKey
- DF_IDCMPRAW = 0 ;not yet available, DO NOT use this one!
-
- ENDC ; DFUNC_I
-