home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 18 / amigaformatcd18.iso / mui / mui_developer / autodocs / mui_floattext.doc < prev    next >
Text File  |  1997-03-10  |  3KB  |  109 lines

  1. TABLE OF CONTENTS
  2.  
  3. Floattext.mui/Floattext.mui
  4. Floattext.mui/MUIA_Floattext_Justify
  5. Floattext.mui/MUIA_Floattext_SkipChars
  6. Floattext.mui/MUIA_Floattext_TabSize
  7. Floattext.mui/MUIA_Floattext_Text
  8. Floattext.mui/Floattext.mui
  9.  
  10.     Floattext class is a subclass of list class that takes
  11.     a big text string as input and splits it up into several
  12.     lines to be dislayed. Formatting capabilities include
  13.     paragraphs an justified text with word wrap.
  14. Floattext.mui/MUIA_Floattext_Justify
  15.  
  16.     NAME
  17.     MUIA_Floattext_Justify -- (V4 ) [ISG], BOOL
  18.  
  19.     FUNCTION
  20.     Indicate whether you want your the text aligned
  21.     to the left and right border. MUI will try to
  22.     insert spaces between words to reach this goal.
  23.  
  24.     If you want right aligned or centered text,
  25.     use the MUIA_List_Format attribute.
  26.  
  27.     SEE ALSO
  28.     MUIA_Floattext_Text, MUIA_List_Format
  29. Floattext.mui/MUIA_Floattext_SkipChars
  30.  
  31.     NAME
  32.     MUIA_Floattext_SkipChars -- (V4 ) [IS.], STRPTR
  33.  
  34.     FUNCTION
  35.     Defines an array of characters that shall be skipped
  36.     when displaying the text. If you e.g. want to
  37.     display a fido message and know it has some CTRL-A
  38.     control characters in it, you could set this
  39.     attrinbute to "\1" to prevent floattext class
  40.     from displaying unreadable crap.
  41.  
  42.     SEE ALSO
  43.     MUIA_Floattext_Text
  44. Floattext.mui/MUIA_Floattext_TabSize
  45.  
  46.     NAME
  47.     MUIA_Floattext_TabSize -- (V4 ) [IS.], LONG
  48.  
  49.     FUNCTION
  50.     Adjust the tab size for a text. The tab size is measured
  51.     in spaces, so if you plan to use tabs not only at the
  52.     beginning of a paragraph, you should consider using
  53.     the fixed width font.
  54.  
  55.     Tab size defaults to 8.
  56.  
  57.     SEE ALSO
  58.     MUIA_Floattext_Text
  59. Floattext.mui/MUIA_Floattext_Text
  60.  
  61.     NAME
  62.     MUIA_Floattext_Text -- (V4 ) [ISG], STRPTR
  63.  
  64.     FUNCTION
  65.     String of characters to be displayed as floattext.
  66.     This string may contain linefeeds to mark the end
  67.     of paragraphs or tab characters for indention.
  68.  
  69.     MUI will automatically format the text according
  70.     to the width of the floattext object. If a word
  71.     won't fit into the current line, it will be wrapped.
  72.  
  73.     If you plan to use tabs not only at the beginning
  74.     of a line you should consider using the configured
  75.     fixed width font.
  76.  
  77.     MUI copies the complete string into a private buffer,
  78.     you won't need to keep your text in memory. If memory
  79.     is low, nothing will be displayed. Thats why you always
  80.     have to be prepared for handling a NULL pointer when
  81.     getting back MUIA_Floattext_Text.
  82.  
  83.     Setting MUIA_Floattext_Text to NULL means to clear
  84.     the current text.
  85.  
  86.     Please note that justification and word wrap with
  87.     proportional fonts is a complicated operation and
  88.     may take a considerable amount of time, especially
  89.     with long texts on slow machines.
  90.  
  91.     EXAMPLE
  92.  
  93.     char *text = AllocVec(filesize,MEMF_ANY);
  94.  
  95.     Read(file,text,filesize);
  96.  
  97.     fto = FloattextObject,
  98.        MUIA_Floattext_Text,text,
  99.        End;
  100.  
  101.     FreeVec(text);
  102.  
  103.     /* ... if you need your text later, you can get it   */
  104.     /* with a simple get(fto,MUIA_Floattext_Text,&text); */
  105.  
  106.     SEE ALSO
  107.     MUIA_Floattext_Justify, MUIA_Floattext_TabSize,
  108.     MUIA_Floattext_SkipChars
  109.