home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / amiga / gui / mui / mui14-dv.lha / MUI / Developer / Autodocs / MUI_String.doc < prev    next >
Encoding:
Text File  |  1993-10-28  |  5.1 KB  |  205 lines

  1. TABLE OF CONTENTS
  2.  
  3. String.mui/String.mui
  4. String.mui/MUIA_String_Accept
  5. String.mui/MUIA_String_Acknowledge
  6. String.mui/MUIA_String_AttachedList
  7. String.mui/MUIA_String_BufferPos
  8. String.mui/MUIA_String_Contents
  9. String.mui/MUIA_String_DisplayPos
  10. String.mui/MUIA_String_Format
  11. String.mui/MUIA_String_Integer
  12. String.mui/MUIA_String_MaxLen
  13. String.mui/MUIA_String_Reject
  14. String.mui/MUIA_String_Secret
  15. String.mui/String.mui
  16.  
  17.     String class generates standard string gadgets with
  18.     all editing facilities (clear, undo, etc.) enabled.
  19. String.mui/MUIA_String_Accept
  20.  
  21.     NAME
  22.     MUIA_String_Accept -- [ISG], STRPTR
  23.  
  24.     FUNCTION
  25.     A string containing characters allowed as input
  26.     for the string gadget. Whenever the user hits a
  27.     character not found in MUIA_String_Accept, he
  28.     will hear a beep and gadgets contents won't have 
  29.     changed.
  30.  
  31.     EXAMPLE
  32.     StringObject,
  33.        MUIA_String_Accept, "0123456789-",
  34.        End,
  35.  
  36.     SEE ALSO
  37.     MUIA_String_Reject
  38. String.mui/MUIA_String_Acknowledge
  39.  
  40.     NAME
  41.     MUIA_String_Acknowledge -- [..G], STRPTR
  42.  
  43.     FUNCTION
  44.     This attribute will be set to the contents of the
  45.     string whenever the user hits return in the gadget. 
  46.     An application can listen with notification and take
  47.     the appropriate action.
  48.  
  49.     Using the TAB key or a mouse click to deactivate the
  50.     gadget will not trigger MUIA_String_Acknowledge.
  51.  
  52.     EXAMPLE
  53.     /* two string gadgets str1 and str2, the second should
  54.     /* become active after a return in the first: */
  55.  
  56.     DoMethod(str1,MUIM_Notify,
  57.        MUIA_String_Acknowledge, MUIV_EveryTime,
  58.        windowobj, 3, MUIM_Set, MUIA_Window_ActiveObject, str2);
  59.  
  60.     SEE ALSO
  61.     MUIA_String_Contents
  62. String.mui/MUIA_String_AttachedList
  63.  
  64.     NAME
  65.     MUIA_String_AttachedList -- [I..], Object *
  66.  
  67.     FUNCTION
  68.     This special attribute can be set to point to
  69.     a valid MUI object of List or Listview class.
  70.     This enables controlling the lists cursor
  71.     from within the string gadget, all cursor key
  72.     events will be forwarded.
  73.  
  74.     SEE ALSO
  75.     MUIA_String_Contents, MUIA_List_Active
  76. String.mui/MUIA_String_BufferPos
  77.  
  78.     NAME
  79.     MUIA_String_BufferPos -- [.SG], LONG
  80.  
  81.     FUNCTION
  82.     MUIA_String_BufferPos can be used to get and set the
  83.     position of the cursor in the string gadget.
  84.     This attribute is probably not very interesting.
  85.  
  86.     SEE ALSO
  87.     MUIA_String_Contents, MUIA_String_DisplayPos
  88. String.mui/MUIA_String_Contents
  89.  
  90.     NAME
  91.     MUIA_String_Contents -- [ISG], STRPTR
  92.  
  93.     FUNCTION
  94.     Get and set a string gadgets contents. You may not
  95.     modify the returned string.
  96.  
  97.     MUIA_String_Contents gets updated every time when
  98.     the contents of the string gadget change. When you
  99.     set up a notification on this attribute, you will
  100.     hear about every keystroke.
  101.  
  102.     EXAMPLE
  103.  
  104.     /* The given hook will be called after every change */
  105.     /* in the string gadget. It receives a pointer to   */
  106.     /* a pointer to the current contents in register a1 */
  107.     /* (see MUIM_CallHook for details)                  */
  108.  
  109.     DoMethod(str,MUIM_Notify,
  110.        MUIA_String_Contents, MUIV_EveryTime,
  111.        str, 3, MUIM_CallHook, &hook, MUIV_TriggerValue);
  112.  
  113.     SEE ALSO
  114.     MUIA_String_Accept, MUIA_String_Reject, MUIA_String_MaxLen
  115. String.mui/MUIA_String_DisplayPos
  116.  
  117.     NAME
  118.     MUIA_String_DisplayPos -- [.SG], LONG
  119.  
  120.     FUNCTION
  121.     MUIA_String_DisplayPos can be used to get and set the
  122.     number of the first character of the string to be
  123.     displayed. This attribute is probably not very
  124.     interesting.
  125.  
  126.     SEE ALSO
  127.     MUIA_String_Contents, MUIA_String_BufferPos
  128. String.mui/MUIA_String_Format
  129.  
  130.     NAME
  131.     MUIA_String_Format -- [I.G], LONG
  132.  
  133.     SPECIAL INPUTS
  134.     MUIV_String_Format_Left
  135.     MUIV_String_Format_Center
  136.     MUIV_String_Format_Right
  137.  
  138.     FUNCTION
  139.     Used to adjust the alignment of the input string.
  140.  
  141.     SEE ALSO
  142.     MUIA_String_BufferPos, MUIA_String_DispPos, MUIA_String_Contents
  143. String.mui/MUIA_String_Integer
  144.  
  145.     NAME
  146.     MUIA_String_Integer -- [ISG], ULONG
  147.  
  148.     FUNCTION
  149.     Useful for turning a string gadget into an integer
  150.     gadget. Setting this attribute puts the value
  151.     with "%ld" into the gadget, getting it returns
  152.     a longword containing the string gadgets contents
  153.     as number.
  154.  
  155.     You should set MUIA_String_Accept to "0123456789"
  156.     or something like that to avoid wrong characters.
  157.  
  158.     EXAMPLE
  159.     StringObject,
  160.        MUIA_String_Accept , "0123456879",
  161.        MUIA_String_Integer, 42,
  162.        End;
  163. String.mui/MUIA_String_MaxLen
  164.  
  165.     NAME
  166.     MUIA_String_MaxLen -- [I..], LONG
  167.  
  168.     FUNCTION
  169.     Setup the maximum length for the string gadget.
  170.     This attribute is only valid at object creation time.
  171.  
  172.     Default maximum length is 80.
  173.  
  174.     NOTE: The maximum length includes the 0-byte at the end
  175.           of the string. To let the user enter e.g. 10 characters,
  176.           you would have to specify a maxlen of 11.
  177.  
  178.     SEE ALSO
  179.     MUIA_String_Contents
  180. String.mui/MUIA_String_Reject
  181.  
  182.     NAME
  183.     MUIA_String_Reject -- [ISG], STRPTR
  184.  
  185.     FUNCTION
  186.     A string containing characters that should not be
  187.     accepted as input for the string gadget. Whenever
  188.     the user hits such a char, he will hear a beep
  189.     and gadgets contents won't have changed.
  190.  
  191.     SEE ALSO
  192.     MUIA_String_Accept
  193. String.mui/MUIA_String_Secret
  194.  
  195.     NAME
  196.     MUIA_String_Secret -- [I.G], BOOL
  197.  
  198.     FUNCTION
  199.     This attribute causes the string gadget to display only
  200.     dots instead of the real contents. Useful for password
  201.     requesters.
  202.  
  203.     SEE ALSO
  204.     MUIA_String_Contents
  205.