%---------------- Functions ------------

\chapter{String.mui/String.mui}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf FUNCTION]
String class generates standard string gadgets with
all editing facilities (clear, undo, etc.) enabled.
\end{deflist}


\subsection{String.mui/MUIA\_String\_Accept}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_String\_Accept]  -- (V4 ) [ISG], STRPTR
\end{description}

\item[\bf FUNCTION]
A string containing characters allowed as input
for the string gadget. Whenever the user hits a
character not found in MUIA\_String\_Accept, he
will hear a beep and gadgets contents won't have
changed.

\item[\bf EXAMPLE]
\begin{flushleft}
\begin{verbatim}
StringObject,
   MUIA_String_Accept, "0123456789-",
   End,
\end{verbatim}
\end{flushleft}
\item[\bf SEE ALSO]
MUIA\_String\_Reject
\end{deflist}


\subsection{String.mui/MUIA\_String\_Acknowledge}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_String\_Acknowledge]  -- (V4 ) [..G], STRPTR
\end{description}

\item[\bf FUNCTION]
This attribute will be set to the contents of the
string whenever the user hits return in the gadget.
An application can listen with notification and take
the appropriate action.

Using the TAB key or a mouse click to deactivate the
gadget will not trigger MUIA\_String\_Acknowledge.

\item[\bf EXAMPLE]
\begin{flushleft}
\begin{verbatim}
/* two string gadgets str1 and str2, the second should
/* become active after a return in the first: */

DoMethod(str1,MUIM_Notify,
   MUIA_String_Acknowledge, MUIV_EveryTime,
   windowobj, 3, MUIM_Set, MUIA_Window_ActiveObject, str2);
\end{verbatim}
\end{flushleft}
\item[\bf SEE ALSO]
MUIA\_String\_Contents
\end{deflist}


\subsection{String.mui/MUIA\_String\_AdvanceOnCR}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_String\_AdvanceOnCR]  -- (V11) [ISG], BOOL
\end{description}

\item[\bf FUNCTION]
Set this if you want carriages returns in string gadgets
behave like the TAB key, i.e. pressing CR will activate
the next/previous gadget in the cycle chain.

\item[\bf SEE ALSO]
Notify.mui/MUIA\_CycleChain
\end{deflist}


\subsection{String.mui/MUIA\_String\_AttachedList}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_String\_AttachedList]  -- (V4 ) [I..], Object *
\end{description}

\item[\bf FUNCTION]
This special attribute can be set to point to
a valid MUI object of List or Listview class.
This enables controlling the lists cursor
from within the string gadget, all cursor key
events will be forwarded.

\item[\bf SEE ALSO]
MUIA\_String\_Contents, MUIA\_List\_Active
\end{deflist}


\subsection{String.mui/MUIA\_String\_BufferPos}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_String\_BufferPos]  -- (V4 ) [.S.], LONG
\end{description}

\item[\bf FUNCTION]
MUIA\_String\_BufferPos can be used to get and set the
position of the cursor in the string gadget.
This attribute is probably not very interesting.

\item[\bf SEE ALSO]
MUIA\_String\_Contents, MUIA\_String\_DisplayPos
\end{deflist}


\subsection{String.mui/MUIA\_String\_Contents}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_String\_Contents]  -- (V4 ) [ISG], STRPTR
\end{description}

\item[\bf FUNCTION]
Get and set a string gadgets contents. You may not
modify the returned string.

MUIA\_String\_Contents gets updated every time when
the contents of the string gadget change. When you
set up a notification on this attribute, you will
hear about every keystroke.

\item[\bf EXAMPLE]
\begin{flushleft}
\begin{verbatim}
/* The given hook will be called after every change */
/* in the string gadget. It receives a pointer to   */
/* a pointer to the current contents in register a1 */
/* (see MUIM_CallHook for details)                  */

DoMethod(str,MUIM_Notify,
   MUIA_String_Contents, MUIV_EveryTime,
   str, 3, MUIM_CallHook, &hook, MUIV_TriggerValue);
\end{verbatim}
\end{flushleft}
\item[\bf SEE ALSO]
MUIA\_String\_Accept, MUIA\_String\_Reject, MUIA\_String\_MaxLen
\end{deflist}


\subsection{String.mui/MUIA\_String\_DisplayPos}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_String\_DisplayPos]  -- (V4 ) [.S.], LONG
\end{description}

\item[\bf FUNCTION]
MUIA\_String\_DisplayPos can be used to get and set the
number of the first character of the string to be
displayed. This attribute is probably not very
interesting.

\item[\bf SEE ALSO]
MUIA\_String\_Contents, MUIA\_String\_BufferPos
\end{deflist}


\subsection{String.mui/MUIA\_String\_EditHook}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_String\_EditHook]  -- (V7 ) [ISG], struct Hook *
\end{description}

\item[\bf FUNCTION]
When specified, MUI calls this hook as if it was a real
string edit hook in a real string gadget. It receives
a pointer to itself in A0, a pointer to a SGWork structure
in A2 and a pointer to the message in A1.

The hook will be called before MUI's private edit hook,
the result is unused.
\end{deflist}


\subsection{String.mui/MUIA\_String\_Format}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_String\_Format]  -- (V4 ) [I.G], LONG
\end{description}

\item[\bf SPECIAL INPUTS]
\begin{flushleft}
\begin{verbatim}
MUIV_String_Format_Left
MUIV_String_Format_Center
MUIV_String_Format_Right
\end{verbatim}
\end{flushleft}
\item[\bf FUNCTION]
Used to adjust the alignment of the input string.

\item[\bf SEE ALSO]
MUIA\_String\_BufferPos, MUIA\_String\_DispPos, MUIA\_String\_Contents
\end{deflist}


\subsection{String.mui/MUIA\_String\_Integer}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_String\_Integer]  -- (V4 ) [ISG], ULONG
\end{description}

\item[\bf FUNCTION]
Useful for turning a string gadget into an integer
gadget. Setting this attribute puts the value
with "'\%ld"' into the gadget, getting it returns
a longword containing the string gadgets contents
as number.

You should set MUIA\_String\_Accept to "'0123456789"'
or something like that to avoid wrong characters.

\item[\bf EXAMPLE]
\begin{flushleft}
\begin{verbatim}
StringObject,
   MUIA_String_Accept , "0123456879",
   MUIA_String_Integer, 42,
   End;
\end{verbatim}
\end{flushleft}
\end{deflist}


\subsection{String.mui/MUIA\_String\_LonelyEditHook}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_String\_LonelyEditHook]  -- (V11) [ISG], BOOL
\end{description}

\item[\bf FUNCTION]
If your string object has an edit hook, you can set
this to TRUE to skip MUI's private edit hook completely.
Otherwise, your hook will be executed and the MUIs.
\end{deflist}


\subsection{String.mui/MUIA\_String\_MaxLen}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_String\_MaxLen]  -- (V4 ) [I.G], LONG
\end{description}

\item[\bf FUNCTION]
Setup the maximum length for the string gadget.
This attribute is only valid at object creation time.

Default maximum length is 80.

NOTE: The maximum length includes the 0-byte at the end
      of the string. To let the user enter e.g. 10 characters,
      you would have to specify a maxlen of 11.

\item[\bf SEE ALSO]
MUIA\_String\_Contents
\end{deflist}


\subsection{String.mui/MUIA\_String\_Reject}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_String\_Reject]  -- (V4 ) [ISG], STRPTR
\end{description}

\item[\bf FUNCTION]
A string containing characters that should not be
accepted as input for the string gadget. Whenever
the user hits such a char, he will hear a beep
and gadgets contents won't have changed.

\item[\bf SEE ALSO]
MUIA\_String\_Accept
\end{deflist}


\subsection{String.mui/MUIA\_String\_Secret}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_String\_Secret]  -- (V4 ) [I.G], BOOL
\end{description}

\item[\bf FUNCTION]
This attribute causes the string gadget to display only
dots instead of the real contents. Useful for password
requesters.

\item[\bf SEE ALSO]
MUIA\_String\_Contents
\end{deflist}


%---------------- End of File ----------
