home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 029.lha / StructureBrowser / sbIntuiText.c < prev    next >
C/C++ Source or Header  |  1987-04-02  |  1KB  |  41 lines

  1. /* module written by G. Gagnon, Mar 24, 1987 */
  2.  
  3. #include "sb:sb.h"
  4.  
  5. extern int level;
  6.  
  7.  
  8. void PrIntuiText(string, intuitext) char *string; struct IntuiText *intuitext;
  9. {
  10. static struct StructData structdata[] = {
  11.      { "-FrontPen",     "UBYTE",                     3, BYTESIZE },
  12.      { "-BackPen",      "UBYTE",                     3, BYTESIZE },
  13.      { "-DrawMode",     "UBYTE",                     3, INTSIZE  },
  14.      { "-LeftEdge",     "SHORT",                     2, INTSIZE  },
  15.      { "-TopEdge",      "SHORT",                     2, INTSIZE  },
  16.      { " ITextFont",    "struct TextAttr *",         5, PTRSIZE  },
  17.      { " IText",        "UBYTE *",                   4, PTRSIZE  },
  18.      { " NextText",     "struct IntuiText *",        5, PTRSIZE  }
  19.   };
  20. int sum, choice = -1;
  21.   level++;
  22.   while (choice) {
  23.     sum = SetOptionText(string, structdata, (APTR)intuitext, DATASIZE, 0);
  24.     switch (choice = GetChoice(DATASIZE)) {
  25.       case 6:
  26.         if (intuitext->ITextFont)
  27.           PrTextAttr("Structure TextAttr",intuitext->ITextFont);
  28.           break;
  29.       case 7:
  30.         PrString("The text pointed to by IText", intuitext->IText);
  31.         break;
  32.       case 8:
  33.         if (intuitext->NextText)
  34.           PrIntuiText("The next IntuiText in Intuition's list",
  35.                       intuitext->NextText);
  36.         break;
  37.     }
  38.   }
  39.   level--;
  40. }
  41.