1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef __com_sun_star_script_vba_VBAScriptEventId_idl__
25 #define __com_sun_star_script_vba_VBAScriptEventId_idl__
26 
27 //=============================================================================
28 
29 module com {  module sun {  module star { module script { module vba {
30 
31 //=============================================================================
32 
33 /** Identifies a VBA script event fired via <member>XVBACompatibility::
34     broadcastVBAScriptEvent</member>, and received by <member>
35     XVBAScriptListener::notifyVBAScriptEvent</member>.
36 
37     @see VBAScriptEvent
38     @see XVBACompatibility
39     @see XVBAScriptListener
40  */
41 constants VBAScriptEventId
42 {
43     //-------------------------------------------------------------------------
44     /** This event is fired when a VBA script in the current document has been
45         started.
46 
47         <p>Several scripts may run simultaneously, e.g. when a running script
48         triggers a document event that starts another script.</p>
49 
50         <p>The number of running scripts can be obtained via <member>
51         XVBACompatibility::RunningVBAScripts</member>. The number returned
52         there will already contain the new script notified with this event.</p>
53 
54         <p>The member <member>VBAScriptEvent::ModuleName</member> of the event
55         object will contain the name of the code module that contains the
56         started script.</p>
57      */
58     const long SCRIPT_STARTED = 0;
59 
60     //-------------------------------------------------------------------------
61     /** This event is fired when a VBA script in the current document stops
62         running.
63 
64         <p>Several scripts may run simultaneously, e.g. when a running script
65         triggers a document event that starts another script.</p>
66 
67         <p>The number of scripts still running can be obtained via <member>
68         XVBACompatibility::RunningVBAScripts</member>. The number returned
69         there will not contain the stopped script notified with this event
70         anymore.</p>
71 
72         <p>The member <member>VBAScriptEvent::ModuleName</member> of the event
73         object will contain the name of the code module that contains the
74         script that has been stopped.</p>
75      */
76     const long SCRIPT_STOPPED = 1;
77 
78     //-------------------------------------------------------------------------
79     /** This event is fired when a VBA script in the current document tries to
80         instanciate a userform.
81 
82         <p>The member <member>VBAScriptEvent::ModuleName</member> of the event
83         object will contain the name of the userform module.</p>
84      */
85     const long INITIALIZE_USERFORM = 2;
86 
87     //-------------------------------------------------------------------------
88 };
89 
90 //=============================================================================
91 
92 }; }; }; }; };
93 
94 //=============================================================================
95 
96 #endif
97