1*3334a7e6SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*3334a7e6SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*3334a7e6SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*3334a7e6SAndrew Rist * distributed with this work for additional information 6*3334a7e6SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*3334a7e6SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*3334a7e6SAndrew Rist * "License"); you may not use this file except in compliance 9*3334a7e6SAndrew Rist * with the License. You may obtain a copy of the License at 10*3334a7e6SAndrew Rist * 11*3334a7e6SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*3334a7e6SAndrew Rist * 13*3334a7e6SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*3334a7e6SAndrew Rist * software distributed under the License is distributed on an 15*3334a7e6SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*3334a7e6SAndrew Rist * KIND, either express or implied. See the License for the 17*3334a7e6SAndrew Rist * specific language governing permissions and limitations 18*3334a7e6SAndrew Rist * under the License. 19*3334a7e6SAndrew Rist * 20*3334a7e6SAndrew Rist *************************************************************/ 21*3334a7e6SAndrew Rist 22*3334a7e6SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef SVX_FMSCRIPTINGENV_HXX 25cdf0e10cSrcweir #define SVX_FMSCRIPTINGENV_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir /** === begin UNO includes === **/ 28cdf0e10cSrcweir #include <com/sun/star/script/XEventAttacherManager.hpp> 29cdf0e10cSrcweir /** === end UNO includes === **/ 30cdf0e10cSrcweir #include <rtl/ref.hxx> 31cdf0e10cSrcweir 32cdf0e10cSrcweir class FmFormModel; 33cdf0e10cSrcweir //........................................................................ 34cdf0e10cSrcweir namespace svxform 35cdf0e10cSrcweir { 36cdf0e10cSrcweir //........................................................................ 37cdf0e10cSrcweir 38cdf0e10cSrcweir //==================================================================== 39cdf0e10cSrcweir //= IFormScriptingEnvironment 40cdf0e10cSrcweir //==================================================================== 41cdf0e10cSrcweir /** describes the interface implemented by a component which handles scripting requirements 42cdf0e10cSrcweir in a form/control environment. 43cdf0e10cSrcweir */ 44cdf0e10cSrcweir class SAL_NO_VTABLE IFormScriptingEnvironment : public ::rtl::IReference 45cdf0e10cSrcweir { 46cdf0e10cSrcweir public: 47cdf0e10cSrcweir /** registers an XEventAttacherManager whose events should be monitored and handled 48cdf0e10cSrcweir 49cdf0e10cSrcweir @param _rxManager 50cdf0e10cSrcweir the XEventAttacherManager to monitor. Must not be <NULL/>. 51cdf0e10cSrcweir 52cdf0e10cSrcweir @throws ::com::sun::star::lang::IllegalArgumentException 53cdf0e10cSrcweir if <arg>_rxManager</arg> is <NULL/> 54cdf0e10cSrcweir @throws ::com::sun::star::lang::DisposedException 55cdf0e10cSrcweir if the instance is already disposed 56cdf0e10cSrcweir @throws ::com::sun::star::uno::RuntimeException 57cdf0e10cSrcweir if attaching as script listener to the manager fails with a RuntimeException itself 58cdf0e10cSrcweir */ 59cdf0e10cSrcweir virtual void registerEventAttacherManager( 60cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager >& _rxManager ) = 0; 61cdf0e10cSrcweir 62cdf0e10cSrcweir /** registers an XEventAttacherManager whose events should not be monitored and handled anymore 63cdf0e10cSrcweir 64cdf0e10cSrcweir @param _rxManager 65cdf0e10cSrcweir the XEventAttacherManager which was previously registered. Must not ne <NULL/>. 66cdf0e10cSrcweir 67cdf0e10cSrcweir @throws ::com::sun::star::lang::IllegalArgumentException 68cdf0e10cSrcweir if <arg>_rxManager</arg> is <NULL/> 69cdf0e10cSrcweir @throws ::com::sun::star::lang::DisposedException 70cdf0e10cSrcweir if the instance is already disposed 71cdf0e10cSrcweir @throws ::com::sun::star::uno::RuntimeException 72cdf0e10cSrcweir if removing as script listener from the manager fails with a RuntimeException itself 73cdf0e10cSrcweir */ 74cdf0e10cSrcweir virtual void revokeEventAttacherManager( 75cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager >& _rxManager ) = 0; 76cdf0e10cSrcweir 77cdf0e10cSrcweir /** disposes the scripting environment instance 78cdf0e10cSrcweir */ 79cdf0e10cSrcweir virtual void dispose() = 0; 80cdf0e10cSrcweir 81cdf0e10cSrcweir virtual ~IFormScriptingEnvironment(); 82cdf0e10cSrcweir }; 83cdf0e10cSrcweir typedef ::rtl::Reference< IFormScriptingEnvironment > PFormScriptingEnvironment; 84cdf0e10cSrcweir 85cdf0e10cSrcweir //==================================================================== 86cdf0e10cSrcweir /** creates a default component implementing the IFormScriptingEnvironment interface 87cdf0e10cSrcweir */ 88cdf0e10cSrcweir PFormScriptingEnvironment createDefaultFormScriptingEnvironment( FmFormModel& _rFormModel ); 89cdf0e10cSrcweir 90cdf0e10cSrcweir //........................................................................ 91cdf0e10cSrcweir } // namespace svxform 92cdf0e10cSrcweir //........................................................................ 93cdf0e10cSrcweir 94cdf0e10cSrcweir #endif // SVX_FMSCRIPTINGENV_HXX 95cdf0e10cSrcweir 96