home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 2 / DATAFILE_PDCD2.iso / utilities2 / desklib / Docs / QuickRefs / IconData < prev    next >
Text File  |  1993-06-28  |  6KB  |  110 lines

  1. Icon block data structures Quick-Reference guide
  2. ================================================
  3.  
  4. (version 1.01, 29/6/93 - Jason Williams)
  5.  
  6. This details the data structure naming used to access all the data in the
  7. icon structures used by DeskLib/Wimp.
  8. Note that some of the data presented here are actually unions, so where you
  9. see (e.g.) "flagword.data." and "flagword.value", they are not two seperate
  10. items... The main purpose of this is to give you the naming structure to
  11. save you thrashing through the header files to figure it out for yourself.
  12.  
  13. ---
  14.  
  15. Wimp_CreateIcon(&icondef, &icon);
  16. input:  icon_createblock
  17. output: icon_handle
  18.                    
  19.   icondef->window
  20.   icondef->icondata. ... (see below)
  21.  
  22. ---
  23.  
  24. Wimp_GetIconState(window, icon, &icondata);
  25. input:  window and icon handles
  26. output: icon state data.
  27.  
  28.   icondata->workarearect.min.x         ; Pos/size of icon relative to window
  29.                         .min.y         ; top left corner (workarea coords)
  30.                         .max.x
  31.                         .max.y
  32.  
  33.           ->data.                      ; text/sprite data
  34.                 .text                  ; 12-char text string
  35.                 .spritename            ; 12-char sprite name
  36.  
  37.                 .indirecttext.buffer       ; ptr to text buffer
  38.                 .indirecttext.validstring  ; ptr to validation string
  39.                                            ; (-1 == none)
  40.                 .indirecttext.bufflen      ; length of buffer (including
  41.                                            ; terminating character)
  42.  
  43.                 .indirectsprite.name       ; ptr to sprite-name/sprite-data
  44.                 .indirectsprite.spritearea ; ptr to sprite area sprite in
  45.                 .indirectsprite.nameisname ; flag: TRUE means "name" points to
  46.                                            ; string, FALSE means it points to
  47.                                            ; the actual sprite data.
  48.  
  49.           ->flags.value                ; value of the flag word
  50.           ->flags.data.                ; individual fields of the flagword
  51.                       .text            ;   flag: is a text-icon
  52.                       .sprite          ;   flag: is a sprite-icon
  53.                       .border          ;   flag: has border
  54.                       .hcentre         ;   flag: horizontally centered
  55.                       .vcentre         ;   flag: vertically centered
  56.                       .filled          ;   flag: background is filled
  57.                       .font            ;   flag: uses outline font
  58.                       .needshelp       ;   flag: needs help to be redrawn
  59.                       .indirected      ;   flag: text/sprite data indirected
  60.                       .rightjustify    ;   flag: text is right justified
  61.                       .allowadjust     ;   flag: Allow multiple-selection
  62.                                               of icon in ESG if adjust-clicked
  63.                       .halfsize        ;   flag: sprite is scaled to 1/2 size
  64.  
  65.                       .buttontype      ;   int (0..15) button type, one of:
  66.                                                iconbtype_NEVER            0
  67.                                                iconbtype_ALWAYS           1
  68.                                                iconbtype_AUTOREPEAT       2
  69.                                                iconbtype_CLICK            3
  70.                                                iconbtype_RELEASE          4
  71.                                                iconbtype_DOUBLECLICK      5
  72.                                                iconbtype_CLICKDRAG        6
  73.                                                iconbtype_RELEASEDRAG      7
  74.                                                iconbtype_DOUBLEDRAG       8
  75.                                                iconbtype_MENU             9
  76.                                                iconbtype_DOUBLECLICKDRAG 10
  77.                                                iconbtype_RADIO           11
  78.                                                iconbtype_RESERVED1       12
  79.                                                iconbtype_RESERVED2       13
  80.                                                iconbtype_WRITECLICKDRAG  14
  81.                                                iconbtype_WRITABLE        15
  82.  
  83.                       .esg             ;   int (0..31) ESG number
  84.                       .selected        ;   flag: icon is selected/highlighted
  85.                       .shaded          ;   flag: icon is shaded (unselectable)
  86.                       .deleted         ;   flag: icon has been deleted
  87.  
  88.                       .foreground      ;   int (0..15): foreground colour,
  89.                       .background      ;   int (0..15): background colour of:
  90.                                                colour_WHITE        0
  91.                                                colour_GREY0        0
  92.                                                colour_GREY1        1
  93.                                                colour_GREY2        2
  94.                                                colour_GREY3        3
  95.                                                colour_GREY4        4
  96.                                                colour_GREY5        5
  97.                                                colour_GREY6        6
  98.                                                colour_GREY7        7
  99.                                                colour_BLACK        7
  100.                                                colour_DARK_BLUE    8
  101.                                                colour_YELLOW       9
  102.                                                colour_GREEN       10
  103.                                                colour_RED         11
  104.                                                colour_CREAM       12
  105.                                                colour_ARMY_GREEN  13
  106.                                                colour_ORANGE      14
  107.                                                colour_LIGHT_BLUE  15
  108.           ->flags.font.font            ;   flag: uses outline font (as above)
  109.                  .font.handle          ;   The font handle (if flag == TRUE)
  110.