/*************************************************************************
 *
 *  OpenOffice.org - a multi-platform office productivity suite
 *
 *  $RCSfile: FormController.idl,v $
 *
 *  $Revision: 1.10 $
 *
 *  last change: $Author: rt $ $Date: 2005-09-08 00:19:59 $
 *
 *  The Contents of this file are made available subject to
 *  the terms of GNU Lesser General Public License Version 2.1.
 *
 *
 *    GNU Lesser General Public License Version 2.1
 *    =============================================
 *    Copyright 2005 by Sun Microsystems, Inc.
 *    901 San Antonio Road, Palo Alto, CA 94303, USA
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License version 2.1, as published by the Free Software Foundation.
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    Lesser General Public License for more details.
 *
 *    You should have received a copy of the GNU Lesser General Public
 *    License along with this library; if not, write to the Free Software
 *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *    MA  02111-1307  USA
 *
 ************************************************************************/
#ifndef __com_sun_star_form_FormController_idl__
#define __com_sun_star_form_FormController_idl__

#ifndef __com_sun_star_form_XFormController_idl__
#include <com/sun/star/form/XFormController.idl>
#endif

#ifndef __com_sun_star_awt_XTabController_idl__
#include <com/sun/star/awt/XTabController.idl>
#endif

#ifndef __com_sun_star_container_XChild_idl__
#include <com/sun/star/container/XChild.idl>
#endif

#ifndef __com_sun_star_lang_XComponent_idl__
#include <com/sun/star/lang/XComponent.idl>
#endif

#ifndef __com_sun_star_container_XEnumerationAccess_idl__
#include <com/sun/star/container/XEnumerationAccess.idl>
#endif

#ifndef __com_sun_star_util_XModifyBroadcaster_idl__
#include <com/sun/star/util/XModifyBroadcaster.idl>
#endif

#ifndef __com_sun_star_form_XConfirmDeleteBroadcaster_idl__
#include <com/sun/star/form/XConfirmDeleteBroadcaster.idl>
#endif

#ifndef __com_sun_star_sdb_XSQLErrorBroadcaster_idl__
#include <com/sun/star/sdb/XSQLErrorBroadcaster.idl>
#endif

#ifndef __com_sun_star_sdb_XRowSetApproveBroadcaster_idl__
#include <com/sun/star/sdb/XRowSetApproveBroadcaster.idl>
#endif

#ifndef __com_sun_star_form_XDatabaseParameterBroadcaster_idl__
#include <com/sun/star/form/XDatabaseParameterBroadcaster.idl>
#endif

#ifndef __com_sun_star_form_FormControllerDispatcher_idl__
#include <com/sun/star/form/FormControllerDispatcher.idl>
#endif

//=============================================================================

 module com {  module sun {  module star {  module form {

//=============================================================================

/** specifies a component controlling the interaction between the user and form functionality.

    <p>As soon as a form (containing controls) is to be presented to the user,
    there is a need for an instance controlling the user interaction.<br/>
    Such a <type>FormController</type> is responsible for dialog processing,
    like controlling the tab order and the grouping of controls.</p>

    <p>As a form may contain one or many subforms, a <type>FormController</type> may
    contain one or more other <type>FormController</type>s, so the form model structure or hierarchy
    is reflected in the structure of <type>FormController</type>s.</p>

    <p>A <type>FormController</type> is responsible for a <type scope="com::sun::star::awt">UnoControlContainer</type>,
    and all controls therein.</p>

    @see com::sun::star::form::component:Form
    @see com::sun::star::awt::XTabController
 */
published service FormController
{
    /** allows delegating form controller functionality to the component

        <p>If a control which the controller is responsible for supports the <type scope="com::sun::star::frame">XDispatchProviderInterception</type>
        interface, the controller registers a dispatch interceptor. Then, the control can try to delegate part of its
        functionality to the controller by querying the dispatch interceptor for it.</p>
    */
    [optional] service FormControllerDispatcher;

    /** is used for notifying the (de)activation of the controller.
     */
    interface com::sun::star::form::XFormController;


    /** is used for tab controlling and grouping of the controls.
     */
    interface com::sun::star::awt::XTabController;


    /** A FormController may have a parent controller, such as when the related form is a subform.
     */
    interface com::sun::star::container::XChild;


    /** A FormController must be disposable.
     */
    interface com::sun::star::lang::XComponent;


    /** A FormController must provide access to its sub controllers.
     */
    interface com::sun::star::container::XEnumerationAccess;


    /** A FormController must communicate if any of its children (means sub controllers) or contained
        controls have been modified.
     */
    interface com::sun::star::util::XModifyBroadcaster;

    /** used to notify deletions of data in the form before they happen.

        <p>A form controller listens for deletion events at the form it is responsible for.<br/>
        If and only if no <type>XConfirmDeleteListener</type> is registered at
        the controller, it uses an own dialog to ask the user for confirmation.</p>

        <p>You may use this interface to integrate your own confirmation dialogs.</p>
    */
    interface com::sun::star::form::XConfirmDeleteBroadcaster;

    /** used to notify errors which happen in the form the controller is responsible for.

        <p>A form controller listens for error events at the form it is responsible for.<br/>
        If and only if no <type scope="com::sun::star::sdb">XSQLErrorListener</type> is registered at the controller, it
        uses an own dialog to notify the user of the error.</p>

    */
    interface com::sun::star::sdb::XSQLErrorBroadcaster;

    /** is used for multiplexing row set events happening on the form which the controller is responsible for.
    */
    interface com::sun::star::sdb::XRowSetApproveBroadcaster;

    /** is used broadcasting parameter events in the form.

        <p>A form controller listens for parameter events at the form it is responsible for.<br/>
        If and only if no <type>XDatabaseParameterListener</type> is registered at the controller, it
        uses an own dialog to ask the user for parameter values.</p>
    */
    interface com::sun::star::form::XDatabaseParameterBroadcaster;
};

//=============================================================================

}; }; }; };

/*=============================================================================

=============================================================================*/
#endif
