home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 18 / amigaformatcd18.iso / mui / mui_developer / autodocs / mui_string.doc < prev    next >
Text File  |  1997-03-10  |  7KB  |  247 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_AdvanceOnCR
  7. String.mui/MUIA_String_AttachedList
  8. String.mui/MUIA_String_BufferPos
  9. String.mui/MUIA_String_Contents
  10. String.mui/MUIA_String_DisplayPos
  11. String.mui/MUIA_String_EditHook
  12. String.mui/MUIA_String_Format
  13. String.mui/MUIA_String_Integer
  14. String.mui/MUIA_String_LonelyEditHook
  15. String.mui/MUIA_String_MaxLen
  16. String.mui/MUIA_String_Reject
  17. String.mui/MUIA_String_Secret
  18. String.mui/String.mui
  19.  
  20.     String class generates standard string gadgets with
  21.     all editing facilities (clear, undo, etc.) enabled.
  22. String.mui/MUIA_String_Accept
  23.  
  24.     NAME
  25.     MUIA_String_Accept -- (V4 ) [ISG], STRPTR
  26.  
  27.     FUNCTION
  28.     A string containing characters allowed as input
  29.     for the string gadget. Whenever the user hits a
  30.     character not found in MUIA_String_Accept, he
  31.     will hear a beep and gadgets contents won't have 
  32.     changed.
  33.  
  34.     EXAMPLE
  35.     StringObject,
  36.        MUIA_String_Accept, "0123456789-",
  37.        End,
  38.  
  39.     SEE ALSO
  40.     MUIA_String_Reject
  41. String.mui/MUIA_String_Acknowledge
  42.  
  43.     NAME
  44.     MUIA_String_Acknowledge -- (V4 ) [..G], STRPTR
  45.  
  46.     FUNCTION
  47.     This attribute will be set to the contents of the
  48.     string whenever the user hits return in the gadget. 
  49.     An application can listen with notification and take
  50.     the appropriate action.
  51.  
  52.     Using the TAB key or a mouse click to deactivate the
  53.     gadget will not trigger MUIA_String_Acknowledge.
  54.  
  55.     EXAMPLE
  56.     /* two string gadgets str1 and str2, the second should
  57.     /* become active after a return in the first: */
  58.  
  59.     DoMethod(str1,MUIM_Notify,
  60.        MUIA_String_Acknowledge, MUIV_EveryTime,
  61.        windowobj, 3, MUIM_Set, MUIA_Window_ActiveObject, str2);
  62.  
  63.     SEE ALSO
  64.     MUIA_String_Contents
  65. String.mui/MUIA_String_AdvanceOnCR
  66.  
  67.     NAME
  68.     MUIA_String_AdvanceOnCR -- (V11) [ISG], BOOL
  69.  
  70.     FUNCTION
  71.     Set this if you want carriages returns in string gadgets
  72.     behave like the TAB key, i.e. pressing CR will activate
  73.     the next/previous gadget in the cycle chain.
  74.  
  75.     SEE ALSO
  76.     Notify.mui/MUIA_CycleChain
  77. String.mui/MUIA_String_AttachedList
  78.  
  79.     NAME
  80.     MUIA_String_AttachedList -- (V4 ) [ISG], Object *
  81.  
  82.     FUNCTION
  83.     This special attribute can be set to point to
  84.     a valid MUI object of Listview class.
  85.     This enables controlling the lists cursor
  86.     from within the string gadget, all cursor key
  87.     events will be forwarded.
  88.  
  89.     SEE ALSO
  90.     MUIA_String_Contents, list.mui/MUIA_List_Active
  91. String.mui/MUIA_String_BufferPos
  92.  
  93.     NAME
  94.     MUIA_String_BufferPos -- (V4 ) [.SG], LONG
  95.  
  96.     FUNCTION
  97.     MUIA_String_BufferPos can be used to get and set the
  98.     position of the cursor in the string gadget.
  99.     This attribute is probably not very interesting.
  100.  
  101.     SEE ALSO
  102.     MUIA_String_Contents, MUIA_String_DisplayPos
  103. String.mui/MUIA_String_Contents
  104.  
  105.     NAME
  106.     MUIA_String_Contents -- (V4 ) [ISG], STRPTR
  107.  
  108.     FUNCTION
  109.     Get and set a string gadgets contents. You may not
  110.     modify the returned string.
  111.  
  112.     MUIA_String_Contents gets updated every time when
  113.     the contents of the string gadget change. When you
  114.     set up a notification on this attribute, you will
  115.     hear about every keystroke.
  116.  
  117.     NOTE
  118.     If you try to set contents to something larger
  119.     than MUIA_String_MaxLen (including the 0-byte!),
  120.     MUI will silently strip the additional characters.
  121.  
  122.     EXAMPLE
  123.  
  124.     /* The given hook will be called after every change */
  125.     /* in the string gadget. It receives a pointer to   */
  126.     /* a pointer to the current contents in register a1 */
  127.     /* (see MUIM_CallHook for details)                  */
  128.  
  129.     DoMethod(str,MUIM_Notify,
  130.        MUIA_String_Contents, MUIV_EveryTime,
  131.        str, 3, MUIM_CallHook, &hook, MUIV_TriggerValue);
  132.  
  133.     SEE ALSO
  134.     MUIA_String_Accept, MUIA_String_Reject, MUIA_String_MaxLen
  135. String.mui/MUIA_String_DisplayPos
  136.  
  137.     NAME
  138.     MUIA_String_DisplayPos -- (V4 ) [.SG], LONG
  139.  
  140.     FUNCTION
  141.     MUIA_String_DisplayPos can be used to get and set the
  142.     number of the first character of the string to be
  143.     displayed. This attribute is probably not very
  144.     interesting.
  145.  
  146.     SEE ALSO
  147.     MUIA_String_Contents, MUIA_String_BufferPos
  148. String.mui/MUIA_String_EditHook
  149.  
  150.     NAME
  151.     MUIA_String_EditHook -- (V7 ) [ISG], struct Hook *
  152.  
  153.     FUNCTION
  154.     When specified, MUI calls this hook as if it was a real
  155.     string edit hook in a real string gadget. It receives
  156.     a pointer to itself in A0, a pointer to a SGWork structure
  157.     in A2 and a pointer to the message in A1.
  158.  
  159.     The hook will be called before MUI's private edit hook,
  160.     the result is unused.
  161. String.mui/MUIA_String_Format
  162.  
  163.     NAME
  164.     MUIA_String_Format -- (V4 ) [I.G], LONG
  165.  
  166.     SPECIAL INPUTS
  167.     MUIV_String_Format_Left
  168.     MUIV_String_Format_Center
  169.     MUIV_String_Format_Right
  170.  
  171.     FUNCTION
  172.     Used to adjust the alignment of the input string.
  173.  
  174.     SEE ALSO
  175.     MUIA_String_BufferPos, MUIA_String_DisplayPos, MUIA_String_Contents
  176. String.mui/MUIA_String_Integer
  177.  
  178.     NAME
  179.     MUIA_String_Integer -- (V4 ) [ISG], ULONG
  180.  
  181.     FUNCTION
  182.     Useful for turning a string gadget into an integer
  183.     gadget. Setting this attribute puts the value
  184.     with "%ld" into the gadget, getting it returns
  185.     a longword containing the string gadgets contents
  186.     as number.
  187.  
  188.     You should set MUIA_String_Accept to "0123456789"
  189.     or something like that to avoid wrong characters.
  190.  
  191.     EXAMPLE
  192.     StringObject,
  193.        MUIA_String_Accept , "0123456879",
  194.        MUIA_String_Integer, 42,
  195.        End;
  196. String.mui/MUIA_String_LonelyEditHook
  197.  
  198.     NAME
  199.     MUIA_String_LonelyEditHook -- (V11) [ISG], BOOL
  200.  
  201.     FUNCTION
  202.     If your string object has an edit hook, you can set
  203.     this to TRUE to skip MUI's private edit hook completely.
  204.     Otherwise, your hook will be executed and the MUIs.
  205. String.mui/MUIA_String_MaxLen
  206.  
  207.     NAME
  208.     MUIA_String_MaxLen -- (V4 ) [I.G], LONG
  209.  
  210.     FUNCTION
  211.     Setup the maximum length for the string gadget.
  212.     This attribute is only valid at object creation time.
  213.  
  214.     Default maximum length is 80.
  215.  
  216.     NOTE: The maximum length includes the 0-byte at the end
  217.           of the string. To let the user enter e.g. 10 characters,
  218.           you would have to specify a maxlen of 11.
  219.  
  220.     SEE ALSO
  221.     MUIA_String_Contents
  222. String.mui/MUIA_String_Reject
  223.  
  224.     NAME
  225.     MUIA_String_Reject -- (V4 ) [ISG], STRPTR
  226.  
  227.     FUNCTION
  228.     A string containing characters that should not be
  229.     accepted as input for the string gadget. Whenever
  230.     the user hits such a char, he will hear a beep
  231.     and gadgets contents won't have changed.
  232.  
  233.     SEE ALSO
  234.     MUIA_String_Accept
  235. String.mui/MUIA_String_Secret
  236.  
  237.     NAME
  238.     MUIA_String_Secret -- (V4 ) [I.G], BOOL
  239.  
  240.     FUNCTION
  241.     This attribute causes the string gadget to display only
  242.     dots instead of the real contents. Useful for password
  243.     requesters.
  244.  
  245.     SEE ALSO
  246.     MUIA_String_Contents
  247.