1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XFormController.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_form_XFormController_idl__
31 #define __com_sun_star_form_XFormController_idl__
33 #ifndef __com_sun_star_awt_XTabController_idl__
34 #include
<com
/sun
/star
/awt
/XTabController.idl
>
37 #ifndef __com_sun_star_awt_XControl_idl__
38 #include
<com
/sun
/star
/awt
/XControl.idl
>
41 #ifndef __com_sun_star_form_XFormControllerListener_idl__
42 #include
<com
/sun
/star
/form
/XFormControllerListener.idl
>
46 //=============================================================================
48 module com
{ module sun
{ module star
{ module form
{
50 //=============================================================================
52 /** provides functionality to control the activation of forms controls.
54 <p>There is a duality of forms (<type scope="com::sun::star::form::component">DataForm</type>)
55 and form controllers. In a document view, for every loaded form there is a form controller which is
56 responsible for exactly the controls which's models are direct children of the form.<br/>
58 In some sense, a form controller is the view representation of a form, like a <em>form control</em> is the
59 view representation of a <em>form control model</em>.<br/>
61 This is also reflected in this interface: If you call
62 <method scope="com::sun::star::awt">XTabController::getModel</method> on a form controller, the form which
63 the controller is responsible for will be returned.<br/>
65 As always in the model-view-paradigm, there is no way from a model to its controller, mostly, because for
66 <em>one</em> given form, there is one controller for <em>every</em> view of the document.</p>
68 <p>A controller is called <em>active</em> if one of the controls it is responsible for has the focus,
69 else inactive. To be notified whenever this activation state of a given controller changes, you can
72 @see com::sun::star::form::component::Form
74 published
interface XFormController
: com
::sun
::star
::awt
::XTabController
76 //-------------------------------------------------------------------------
78 /** access to the currently active control
81 the currently active control, or <NULL/> if there is no such control
83 com
::sun
::star
::awt
::XControl getCurrentControl
();
85 //-------------------------------------------------------------------------
87 /** adds the specified listener to receive notifications whenever the activation state of
88 the controller changes.
93 [oneway
] void addActivateListener
( [in] com
::sun
::star
::form
::XFormControllerListener l
);
95 //-------------------------------------------------------------------------
97 /** removes the specified listener
100 the listener to remove.
102 [oneway
] void removeActivateListener
( [in] com
::sun
::star
::form
::XFormControllerListener l
);
106 //=============================================================================
110 /*=============================================================================
112 =============================================================================*/