update dev300-m58
[ooovba.git] / svx / source / inc / fmscriptingenv.hxx
blob56b5c0e1e3daee586003da1942f9b8bce8f5bffa
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: fmscriptingenv.hxx,v $
10 * $Revision: 1.3 $
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 ************************************************************************/
31 #ifndef SVX_FMSCRIPTINGENV_HXX
32 #define SVX_FMSCRIPTINGENV_HXX
34 /** === begin UNO includes === **/
35 #include <com/sun/star/script/XEventAttacherManager.hpp>
36 /** === end UNO includes === **/
37 #include <rtl/ref.hxx>
39 class FmFormModel;
40 //........................................................................
41 namespace svxform
43 //........................................................................
45 //====================================================================
46 //= IFormScriptingEnvironment
47 //====================================================================
48 /** describes the interface implemented by a component which handles scripting requirements
49 in a form/control environment.
51 class SAL_NO_VTABLE IFormScriptingEnvironment : public ::rtl::IReference
53 public:
54 /** registers an XEventAttacherManager whose events should be monitored and handled
56 @param _rxManager
57 the XEventAttacherManager to monitor. Must not be <NULL/>.
59 @throws ::com::sun::star::lang::IllegalArgumentException
60 if <arg>_rxManager</arg> is <NULL/>
61 @throws ::com::sun::star::lang::DisposedException
62 if the instance is already disposed
63 @throws ::com::sun::star::uno::RuntimeException
64 if attaching as script listener to the manager fails with a RuntimeException itself
66 virtual void registerEventAttacherManager(
67 const ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager >& _rxManager ) = 0;
69 /** registers an XEventAttacherManager whose events should not be monitored and handled anymore
71 @param _rxManager
72 the XEventAttacherManager which was previously registered. Must not ne <NULL/>.
74 @throws ::com::sun::star::lang::IllegalArgumentException
75 if <arg>_rxManager</arg> is <NULL/>
76 @throws ::com::sun::star::lang::DisposedException
77 if the instance is already disposed
78 @throws ::com::sun::star::uno::RuntimeException
79 if removing as script listener from the manager fails with a RuntimeException itself
81 virtual void revokeEventAttacherManager(
82 const ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager >& _rxManager ) = 0;
84 /** disposes the scripting environment instance
86 virtual void dispose() = 0;
88 virtual ~IFormScriptingEnvironment();
90 typedef ::rtl::Reference< IFormScriptingEnvironment > PFormScriptingEnvironment;
92 //====================================================================
93 /** creates a default component implementing the IFormScriptingEnvironment interface
95 PFormScriptingEnvironment createDefaultFormScriptingEnvironment( FmFormModel& _rFormModel );
97 //........................................................................
98 } // namespace svxform
99 //........................................................................
101 #endif // SVX_FMSCRIPTINGENV_HXX