Type: info
         Title: Ease of use: Awt toolkit message box
     Posted by: [EMAIL PROTECTED]
      Affected: toolkit
Effective from: CWS fwk52


*Summary*
--------
+ com.sun.star.awt.XMessageBoxFactory
+ com.sun.star.awt.MessageBoxButtons

*Description*
-------------
We want to ease the use of the UNO awt toolkit. Therefore a new
interface called com.sun.star.awt.XMessageBoxFactory has been
introduced. The interface is available at the toolkit service
"com.sun.star.awt.Toolkit".c It makes it much easier to create message
boxes as the generic createWindow function. The old way via
createWindow is still supported.

This is the IDL documentation of XMessageBoxFactory:

published interface XMessageBoxFactory : com::sun::star::uno::XInterface
{
        
//-------------------------------------------------------------------------
    
        /** creates a message box.

        @returns 
                the created message box or a null reference if it cannot be
        created.

                @param aParent
                a valid XWindowPeer reference which is used as a parent. This 
parameter 
        must not be null.
                
                @param aPosSize
        a rectangle which defines the position and size of the message
        box in pixel.
        
        @param aType
        a string which determines the message box type.
        The following strings are defined.
        <ul>
            <li><b>infobox</b>A message box to inform the user about a
certain event.</li>
            <li><b>warningbox</b>A message to warn the user about a
certain problem.</li>
            <li><b>errorbox</b>A message box to provide an error
message to the user.</li>
            <li><b>querybox</b>A message box to query information from
the user.</li>
            <li><b>messbox</b>A normal message box.</li>
        </ul>         

        @param aButtons
                specifies which buttons should be available on the
        message box. A combination of
        <type scope="com::sun::star::awt::MessageBoxButtons</type>. An
<b>infobox</b>
        ignores this paramter and always use button "OK".
                
                @param aTitle
                specifies the title of the message box.

        @param aMessage
        specifies text which will be shown by the message box. 
        Line-breaks must be added using 'CR' or 'CR+LF'.
        */
    XMessageBox createMessageBox( [in]
com::sun::star::awt::XWindowPeer aParent, [in]
com::sun::star::awt::Rectangle aPosSize, [in] string aType, [in] long
aButtons, [in] string aTitle, [in] string aMessage );
};



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to