1*b1cdbd2cSJim Jagielski<?xml version="1.0" encoding="UTF-8"?>
2*b1cdbd2cSJim Jagielski<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
3*b1cdbd2cSJim Jagielski<script:module xmlns:script="http://openoffice.org/2000/script" script:name="awt_XWindow" script:language="StarBasic">
4*b1cdbd2cSJim Jagielski
5*b1cdbd2cSJim Jagielski
6*b1cdbd2cSJim Jagielski'*************************************************************************
7*b1cdbd2cSJim Jagielski'
8*b1cdbd2cSJim Jagielski'  Licensed to the Apache Software Foundation (ASF) under one
9*b1cdbd2cSJim Jagielski'  or more contributor license agreements.  See the NOTICE file
10*b1cdbd2cSJim Jagielski'  distributed with this work for additional information
11*b1cdbd2cSJim Jagielski'  regarding copyright ownership.  The ASF licenses this file
12*b1cdbd2cSJim Jagielski'  to you under the Apache License, Version 2.0 (the
13*b1cdbd2cSJim Jagielski'  "License"); you may not use this file except in compliance
14*b1cdbd2cSJim Jagielski'  with the License.  You may obtain a copy of the License at
15*b1cdbd2cSJim Jagielski'
16*b1cdbd2cSJim Jagielski'    http://www.apache.org/licenses/LICENSE-2.0
17*b1cdbd2cSJim Jagielski'
18*b1cdbd2cSJim Jagielski'  Unless required by applicable law or agreed to in writing,
19*b1cdbd2cSJim Jagielski'  software distributed under the License is distributed on an
20*b1cdbd2cSJim Jagielski'  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21*b1cdbd2cSJim Jagielski'  KIND, either express or implied.  See the License for the
22*b1cdbd2cSJim Jagielski'  specific language governing permissions and limitations
23*b1cdbd2cSJim Jagielski'  under the License.
24*b1cdbd2cSJim Jagielski'
25*b1cdbd2cSJim Jagielski'*************************************************************************
26*b1cdbd2cSJim Jagielski
27*b1cdbd2cSJim Jagielski
28*b1cdbd2cSJim Jagielski
29*b1cdbd2cSJim Jagielski
30*b1cdbd2cSJim Jagielski
31*b1cdbd2cSJim Jagielski' Be sure that all variables are dimensioned:
32*b1cdbd2cSJim Jagielskioption explicit
33*b1cdbd2cSJim Jagielski
34*b1cdbd2cSJim Jagielski'*************************************************************************
35*b1cdbd2cSJim Jagielski' This Interface/Service test depends on the following GLOBAL variables,
36*b1cdbd2cSJim Jagielski' which must be specified in the object creation:
37*b1cdbd2cSJim Jagielski
38*b1cdbd2cSJim Jagielski
39*b1cdbd2cSJim Jagielski'*************************************************************************
40*b1cdbd2cSJim Jagielski'       Global oXWindow as Object
41*b1cdbd2cSJim Jagielski'       Global oCtrlShape as Variant (could be NULL)
42*b1cdbd2cSJim Jagielski
43*b1cdbd2cSJim Jagielski
44*b1cdbd2cSJim JagielskiDim bCB1_windowResized As Boolean
45*b1cdbd2cSJim JagielskiDim bCB2_windowResized As Boolean
46*b1cdbd2cSJim JagielskiDim bCB1_windowMoved As Boolean
47*b1cdbd2cSJim JagielskiDim bCB2_windowMoved As Boolean
48*b1cdbd2cSJim JagielskiDim bCB1_windowHidden As Boolean
49*b1cdbd2cSJim JagielskiDim bCB2_windowHidden As Boolean
50*b1cdbd2cSJim JagielskiDim bCB1_windowShown As Boolean
51*b1cdbd2cSJim JagielskiDim bCB2_windowShown As Boolean
52*b1cdbd2cSJim JagielskiDim bCB1_disposing As Boolean
53*b1cdbd2cSJim JagielskiDim bCB2_disposing As Boolean
54*b1cdbd2cSJim JagielskiDim bCB3_focusGained As Boolean
55*b1cdbd2cSJim JagielskiDim bCB4_focusGained As Boolean
56*b1cdbd2cSJim JagielskiDim bCB3_focusLost As Boolean
57*b1cdbd2cSJim JagielskiDim bCB4_focusLost As Boolean
58*b1cdbd2cSJim Jagielski
59*b1cdbd2cSJim Jagielski
60*b1cdbd2cSJim JagielskiSub RunTest()
61*b1cdbd2cSJim Jagielski
62*b1cdbd2cSJim Jagielski'*************************************************************************
63*b1cdbd2cSJim Jagielski' INTERFACE:
64*b1cdbd2cSJim Jagielski' com.sun.star.awt.XWindow
65*b1cdbd2cSJim Jagielski'*************************************************************************
66*b1cdbd2cSJim JagielskiOn Error Goto ErrHndl
67*b1cdbd2cSJim Jagielski    Dim bOK As Boolean
68*b1cdbd2cSJim Jagielski
69*b1cdbd2cSJim Jagielski    If isNull(oXWindow) Then
70*b1cdbd2cSJim Jagielski		Out.Log("Could not get relation 'oXWindow' !")
71*b1cdbd2cSJim Jagielski    End If
72*b1cdbd2cSJim Jagielski    Dim oListener1 As Object, oListener2 As Object
73*b1cdbd2cSJim Jagielski    Dim oListener3 As Object, oListener4 As Object
74*b1cdbd2cSJim Jagielski    Dim oListener5 As Object, oListener6 As Object
75*b1cdbd2cSJim Jagielski    Dim oListener7 As Object, oListener8 As Object
76*b1cdbd2cSJim Jagielski    Dim oListener9 As Object, oListener10 As Object
77*b1cdbd2cSJim Jagielski    Dim oListener11 As Object, oListener12 As Object
78*b1cdbd2cSJim Jagielski    Dim size As Variant, pos As Variant
79*b1cdbd2cSJim Jagielski
80*b1cdbd2cSJim Jagielski    bCB1_windowResized = false
81*b1cdbd2cSJim Jagielski    bCB2_windowResized = false
82*b1cdbd2cSJim Jagielski    bCB1_windowMoved = false
83*b1cdbd2cSJim Jagielski    bCB2_windowMoved = false
84*b1cdbd2cSJim Jagielski    bCB1_windowHidden = false
85*b1cdbd2cSJim Jagielski    bCB2_windowHidden = false
86*b1cdbd2cSJim Jagielski    bCB1_windowShown = false
87*b1cdbd2cSJim Jagielski    bCB2_windowShown = false
88*b1cdbd2cSJim Jagielski    bCB1_disposing = false
89*b1cdbd2cSJim Jagielski    bCB2_disposing = false
90*b1cdbd2cSJim Jagielski    bCB3_focusGained = false
91*b1cdbd2cSJim Jagielski    bCB4_focusLost = false
92*b1cdbd2cSJim Jagielski    bCB3_focusGained = false
93*b1cdbd2cSJim Jagielski    bCB4_focusLost = false
94*b1cdbd2cSJim Jagielski
95*b1cdbd2cSJim Jagielski    Out.Log("create two com.sun.star.awt.XWindowListener")
96*b1cdbd2cSJim Jagielski    oListener1 = createUNOListener("CB1_", "com.sun.star.awt.XWindowListener")
97*b1cdbd2cSJim Jagielski    oListener2 = createUNOListener("CB2_", "com.sun.star.awt.XWindowListener")
98*b1cdbd2cSJim Jagielski    Out.Log("create two  com.sun.star.awt.XFocusListener")
99*b1cdbd2cSJim Jagielski    oListener3 = createUNOListener("CB3_", "com.sun.star.awt.XFocusListener")
100*b1cdbd2cSJim Jagielski    oListener4 = createUNOListener("CB4_", "com.sun.star.awt.XFocusListener")
101*b1cdbd2cSJim Jagielski    Out.Log("create two com.sun.star.awt.XKeyListener")
102*b1cdbd2cSJim Jagielski    oListener5 = createUNOListener("CB5_", "com.sun.star.awt.XKeyListener")
103*b1cdbd2cSJim Jagielski    oListener6 = createUNOListener("CB6_", "com.sun.star.awt.XKeyListener")
104*b1cdbd2cSJim Jagielski    Out.Log("create two com.sun.star.awt.XMouseListener")
105*b1cdbd2cSJim Jagielski    oListener7 = createUNOListener("CB7_", "com.sun.star.awt.XMouseListener")
106*b1cdbd2cSJim Jagielski    oListener8 = createUNOListener("CB8_", "com.sun.star.awt.XMouseListener")
107*b1cdbd2cSJim Jagielski    Out.Log("create two com.sun.star.awt.XMouseMotionListener")
108*b1cdbd2cSJim Jagielski    oListener9 = createUNOListener("CB9_", "com.sun.star.awt.XMouseMotinListener")
109*b1cdbd2cSJim Jagielski    oListener10 = createUNOListener("CB10_", "com.sun.star.awt.XMouseMotinListener")
110*b1cdbd2cSJim Jagielski    Out.Log("create two com.sun.star.awt.XPaintListener")
111*b1cdbd2cSJim Jagielski    oListener11 = createUNOListener("CB11_", "com.sun.star.awt.XPaintListener")
112*b1cdbd2cSJim Jagielski    oListener12 = createUNOListener("CB12_", "com.sun.star.awt.XPaintListener")
113*b1cdbd2cSJim Jagielski
114*b1cdbd2cSJim Jagielski    Test.StartMethod("setPosSize()")
115*b1cdbd2cSJim Jagielski    bOK = true
116*b1cdbd2cSJim Jagielski    oObj.setPosSize(250,250,250,250,com.sun.star.awt.PosSize.POSSIZE)
117*b1cdbd2cSJim Jagielski    Out.Log("oObj.setPosSize(250,250,250,250,com.sun.star.awt.PosSize.POSSIZE")
118*b1cdbd2cSJim Jagielski    Test.StartMethod("getPosSize()")
119*b1cdbd2cSJim Jagielski    Dim vRectangle As Variant
120*b1cdbd2cSJim Jagielski    vRectangle = oObj.getPosSize()
121*b1cdbd2cSJim Jagielski    Out.Log("Returned Values: X=" + vRectangle.X + " Y=" + vRectangle.Y _
122*b1cdbd2cSJim Jagielski           + " WIDTH=" + vRectangle.WIDTH + " HEIGTH=" + vRectangle.HEIGHT
123*b1cdbd2cSJim Jagielski    bOK = bOK AND vRectangle.X = 250
124*b1cdbd2cSJim Jagielski    bOK = bOK AND vRectangle.Y = 250
125*b1cdbd2cSJim Jagielski    bOK = bOK AND vRectangle.Width = 250
126*b1cdbd2cSJim Jagielski    bOK = bOK AND vRectangle.Height = 250
127*b1cdbd2cSJim Jagielski    Test.MethodTested("setPosSize()", bOK)
128*b1cdbd2cSJim Jagielski    Test.MethodTested("getPosSize()", bOK)
129*b1cdbd2cSJim Jagielski
130*b1cdbd2cSJim Jagielski    Test.StartMethod("setVisible()")
131*b1cdbd2cSJim Jagielski    bOK = true
132*b1cdbd2cSJim Jagielski    oObj.setVisible(false)
133*b1cdbd2cSJim Jagielski    oObj.setVisible(true)
134*b1cdbd2cSJim Jagielski    Test.MethodTested("setVisible()", bOK)
135*b1cdbd2cSJim Jagielski
136*b1cdbd2cSJim Jagielski    Test.StartMethod("setEnable()")
137*b1cdbd2cSJim Jagielski    bOK = true
138*b1cdbd2cSJim Jagielski    oObj.setEnable(false)
139*b1cdbd2cSJim Jagielski    oObj.setEnable(true)
140*b1cdbd2cSJim Jagielski    Test.MethodTested("setEnable()", bOK)
141*b1cdbd2cSJim Jagielski
142*b1cdbd2cSJim Jagielski    Test.StartMethod("setFocus()")
143*b1cdbd2cSJim Jagielski    bOK = true
144*b1cdbd2cSJim Jagielski    oObj.setFocus()
145*b1cdbd2cSJim Jagielski    oXWindow.setFocus()
146*b1cdbd2cSJim Jagielski    oObj.setFocus()
147*b1cdbd2cSJim Jagielski    Test.MethodTested("setFocus()", bOK)
148*b1cdbd2cSJim Jagielski
149*b1cdbd2cSJim Jagielski    Test.StartMethod("addWindowListener()")
150*b1cdbd2cSJim Jagielski    bOK = true
151*b1cdbd2cSJim Jagielski    oObj.addWindowListener(oListener1)
152*b1cdbd2cSJim Jagielski    oObj.addWindowListener(oListener2)
153*b1cdbd2cSJim Jagielski    oObj.setVisible(false)
154*b1cdbd2cSJim Jagielski    oObj.setVisible(true)
155*b1cdbd2cSJim Jagielski    if NOT isNull(oCtrlShape) then
156*b1cdbd2cSJim Jagielski        size = oCtrlShape.Size
157*b1cdbd2cSJim Jagielski        size.Width = size.Width + 100
158*b1cdbd2cSJim Jagielski        size.Height = size.Height + 100
159*b1cdbd2cSJim Jagielski        oCtrlShape.Size = size
160*b1cdbd2cSJim Jagielski
161*b1cdbd2cSJim Jagielski        pos = oCtrlShape.Position
162*b1cdbd2cSJim Jagielski        pos.X = pos.X + 100
163*b1cdbd2cSJim Jagielski        pos.Y = pos.Y + 100
164*b1cdbd2cSJim Jagielski        oCtrlShape.Position = pos
165*b1cdbd2cSJim Jagielski    else
166*b1cdbd2cSJim Jagielski        Out.Log("oObj.setPosSize(300,300,300,300,com.sun.star.awt.PosSize.POSSIZE)")
167*b1cdbd2cSJim Jagielski        oObj.setPosSize(300,300,300,300,com.sun.star.awt.PosSize.POSSIZE)
168*b1cdbd2cSJim Jagielski    end if
169*b1cdbd2cSJim Jagielski    wait(1000)
170*b1cdbd2cSJim Jagielski    bOK = bOK AND bCB1_windowResized AND bCB2_windowResized AND bCB1_windowMoved AND _
171*b1cdbd2cSJim Jagielski          bCB2_windowMoved AND bCB1_windowHidden AND bCB2_windowHidden AND _
172*b1cdbd2cSJim Jagielski          bCB1_windowShown AND bCB2_windowShown AND NOT bCB1_disposing AND NOT _
173*b1cdbd2cSJim Jagielski          bCB2_disposing
174*b1cdbd2cSJim Jagielski    Test.MethodTested("addWindowListener()", bOK)
175*b1cdbd2cSJim Jagielski
176*b1cdbd2cSJim Jagielski    Test.StartMethod("removeWindowListener()")
177*b1cdbd2cSJim Jagielski    bOK = true
178*b1cdbd2cSJim Jagielski    bCB1_windowResized = false
179*b1cdbd2cSJim Jagielski    bCB2_windowResized = false
180*b1cdbd2cSJim Jagielski    bCB1_windowMoved = false
181*b1cdbd2cSJim Jagielski    bCB2_windowMoved = false
182*b1cdbd2cSJim Jagielski    bCB1_windowHidden = false
183*b1cdbd2cSJim Jagielski    bCB2_windowHidden = false
184*b1cdbd2cSJim Jagielski    bCB1_windowShown = false
185*b1cdbd2cSJim Jagielski    bCB2_windowShown = false
186*b1cdbd2cSJim Jagielski    bCB1_disposing = false
187*b1cdbd2cSJim Jagielski    bCB2_disposing = false
188*b1cdbd2cSJim Jagielski    oObj.removeWindowListener(oListener2)
189*b1cdbd2cSJim Jagielski    oObj.setVisible(false)
190*b1cdbd2cSJim Jagielski    oObj.setVisible(true)
191*b1cdbd2cSJim Jagielski    oObj.setVisible(false)
192*b1cdbd2cSJim Jagielski    oObj.setVisible(true)
193*b1cdbd2cSJim Jagielski    if NOT isNull(oCtrlShape) then
194*b1cdbd2cSJim Jagielski        size = oCtrlShape.Size
195*b1cdbd2cSJim Jagielski        size.Width = size.Width + 100
196*b1cdbd2cSJim Jagielski        size.Height = size.Height + 100
197*b1cdbd2cSJim Jagielski        oCtrlShape.Size = size
198*b1cdbd2cSJim Jagielski
199*b1cdbd2cSJim Jagielski        pos = oCtrlShape.Position
200*b1cdbd2cSJim Jagielski        pos.X = pos.X + 100
201*b1cdbd2cSJim Jagielski        pos.Y = pos.Y + 100
202*b1cdbd2cSJim Jagielski        oCtrlShape.Position = pos
203*b1cdbd2cSJim Jagielski    else
204*b1cdbd2cSJim Jagielski        Out.Log("oObj.setPosSize(300,300,300,300,com.sun.star.awt.PosSize.POSSIZE)")
205*b1cdbd2cSJim Jagielski        oObj.setPosSize(301,301,301,301,com.sun.star.awt.PosSize.POSSIZE)
206*b1cdbd2cSJim Jagielski    end if
207*b1cdbd2cSJim Jagielski    wait(200)
208*b1cdbd2cSJim Jagielski    bOK = bOK AND bCB1_windowResized AND NOT bCB2_windowResized AND bCB1_windowMoved AND NOT _
209*b1cdbd2cSJim Jagielski          bCB2_windowMoved AND bCB1_windowHidden AND NOT bCB2_windowHidden AND _
210*b1cdbd2cSJim Jagielski          bCB1_windowShown AND NOT bCB2_windowShown AND NOT bCB1_disposing AND NOT _
211*b1cdbd2cSJim Jagielski          bCB2_disposing
212*b1cdbd2cSJim Jagielski    oObj.removeWindowListener(oListener1)
213*b1cdbd2cSJim Jagielski    Test.MethodTested("removeWindowListener()", bOK)
214*b1cdbd2cSJim Jagielski
215*b1cdbd2cSJim Jagielski    Test.StartMethod("addFocusListener()")
216*b1cdbd2cSJim Jagielski    bOK = true
217*b1cdbd2cSJim Jagielski    oObj.addFocusListener(oListener3)
218*b1cdbd2cSJim Jagielski    oObj.addFocusListener(oListener4)
219*b1cdbd2cSJim Jagielski    oObj.setFocus()
220*b1cdbd2cSJim Jagielski    wait(200)
221*b1cdbd2cSJim Jagielski    oXWindow.setFocus()
222*b1cdbd2cSJim Jagielski    wait(200)
223*b1cdbd2cSJim Jagielski    oObj.setFocus()
224*b1cdbd2cSJim Jagielski    wait(200)
225*b1cdbd2cSJim Jagielski    bOK = bOK AND bCB3_focusGained AND bCB4_focusLost AND bCB3_focusGained AND bCB4_focusLost
226*b1cdbd2cSJim Jagielski    Test.MethodTested("addFocusListener()", bOK)
227*b1cdbd2cSJim Jagielski
228*b1cdbd2cSJim Jagielski    Test.StartMethod("removeFocusListener()")
229*b1cdbd2cSJim Jagielski    bOK = true
230*b1cdbd2cSJim Jagielski    bCB3_focusGained = false
231*b1cdbd2cSJim Jagielski    bCB4_focusLost = false
232*b1cdbd2cSJim Jagielski    bCB3_focusGained = false
233*b1cdbd2cSJim Jagielski    bCB4_focusLost = false
234*b1cdbd2cSJim Jagielski    oObj.removeFocusListener(oListener4)
235*b1cdbd2cSJim Jagielski    oObj.setFocus()
236*b1cdbd2cSJim Jagielski    wait(200)
237*b1cdbd2cSJim Jagielski    oXWindow.setFocus()
238*b1cdbd2cSJim Jagielski    wait(200)
239*b1cdbd2cSJim Jagielski    oObj.setFocus()
240*b1cdbd2cSJim Jagielski    wait(200)
241*b1cdbd2cSJim Jagielski    bOK = bOK AND bCB3_focusGained AND NOT bCB4_focusLost AND bCB3_focusGained AND NOT bCB4_focusLost
242*b1cdbd2cSJim Jagielski    oObj.removeFocusListener(oListener3)
243*b1cdbd2cSJim Jagielski    Test.MethodTested("removeFocusListener()", bOK)
244*b1cdbd2cSJim Jagielski
245*b1cdbd2cSJim Jagielski'***************************************************************************************
246*b1cdbd2cSJim Jagielski'* LISTENERS which needs interactions                                                  *
247*b1cdbd2cSJim Jagielski'***************************************************************************************
248*b1cdbd2cSJim Jagielski'*
249*b1cdbd2cSJim Jagielski'* The following listener tests need interactions. That means i.e. a
250*b1cdbd2cSJim Jagielski'* com.sun.star.awt.XKeyListener needs action from the keyboard. This is not possible in
251*b1cdbd2cSJim Jagielski'* the automatic API-Testing. To test the listener you can set a breakpoint at the
252*b1cdbd2cSJim Jagielski'* specific function call. Then do interaction which should call the listener. It must be
253*b1cdbd2cSJim Jagielski'* pop up a message box.
254*b1cdbd2cSJim Jagielski'*
255*b1cdbd2cSJim Jagielski'***************************************************************************************
256*b1cdbd2cSJim Jagielski
257*b1cdbd2cSJim Jagielski    Test.StartMethod("addKeyListener()")
258*b1cdbd2cSJim Jagielski    bOK = true
259*b1cdbd2cSJim Jagielski    Out.Log("Not realy tested! Please see comments in Basic-Source.")
260*b1cdbd2cSJim Jagielski    oObj.addKeyListener(oListener5)
261*b1cdbd2cSJim Jagielski    oObj.addKeyListener(oListener6)
262*b1cdbd2cSJim Jagielski    bOK = bOK AND true
263*b1cdbd2cSJim Jagielski    Test.MethodTested("addKeyListener()", bOK)
264*b1cdbd2cSJim Jagielski
265*b1cdbd2cSJim Jagielski    Test.StartMethod("removeKeyListener()")
266*b1cdbd2cSJim Jagielski    bOK = true
267*b1cdbd2cSJim Jagielski    Out.Log("Not realy tested! Please see comments in Basic-Source.")
268*b1cdbd2cSJim Jagielski    oObj.removeKeyListener(oListener5)
269*b1cdbd2cSJim Jagielski    bOK = bOK AND true
270*b1cdbd2cSJim Jagielski    oObj.removeKeyListener(oListener6)
271*b1cdbd2cSJim Jagielski    Test.MethodTested("removeKeyListener()", bOK)
272*b1cdbd2cSJim Jagielski
273*b1cdbd2cSJim Jagielski    Test.StartMethod("addMouseListener()")
274*b1cdbd2cSJim Jagielski    bOK = true
275*b1cdbd2cSJim Jagielski    Out.Log("Not realy tested! Please see comments in Basic-Source.")
276*b1cdbd2cSJim Jagielski    oObj.addMouseListener(oListener7)
277*b1cdbd2cSJim Jagielski    oObj.addMouseListener(oListener8)
278*b1cdbd2cSJim Jagielski    bOK = bOK AND true
279*b1cdbd2cSJim Jagielski    Test.MethodTested("addMouseListener()", bOK)
280*b1cdbd2cSJim Jagielski
281*b1cdbd2cSJim Jagielski    Test.StartMethod("removeMouseListener()")
282*b1cdbd2cSJim Jagielski    bOK = true
283*b1cdbd2cSJim Jagielski    Out.Log("Not realy tested! Please see comments in Basic-Source.")
284*b1cdbd2cSJim Jagielski    oObj.removeMouseListener(oListener7)
285*b1cdbd2cSJim Jagielski    bOK = bOK AND true
286*b1cdbd2cSJim Jagielski    oObj.removeMouseListener(oListener8)
287*b1cdbd2cSJim Jagielski    Test.MethodTested("removeMouseListener()", bOK)
288*b1cdbd2cSJim Jagielski
289*b1cdbd2cSJim Jagielski    Test.StartMethod("addMouseMotionListener()")
290*b1cdbd2cSJim Jagielski    bOK = true
291*b1cdbd2cSJim Jagielski    Out.Log("Not realy tested! Please see comments in Basic-Source.")
292*b1cdbd2cSJim Jagielski    oObj.addMouseMotionListener(oListener9)
293*b1cdbd2cSJim Jagielski    oObj.addMouseMotionListener(oListener10)
294*b1cdbd2cSJim Jagielski    bOK = bOK AND true
295*b1cdbd2cSJim Jagielski    Test.MethodTested("addMouseMotionListener()", bOK)
296*b1cdbd2cSJim Jagielski
297*b1cdbd2cSJim Jagielski    Test.StartMethod("removeMouseMotionListener()")
298*b1cdbd2cSJim Jagielski    bOK = true
299*b1cdbd2cSJim Jagielski    Out.Log("Not realy tested! Please see comments in Basic-Source.")
300*b1cdbd2cSJim Jagielski    oObj.removeMouseMotionListener(oListener9)
301*b1cdbd2cSJim Jagielski    bOK = bOK AND true
302*b1cdbd2cSJim Jagielski    oObj.removeMouseMotionListener(oListener10)
303*b1cdbd2cSJim Jagielski    Test.MethodTested("removeMouseMotionListener()", bOK)
304*b1cdbd2cSJim Jagielski
305*b1cdbd2cSJim Jagielski    Test.StartMethod("addPaintListener()")
306*b1cdbd2cSJim Jagielski    bOK = true
307*b1cdbd2cSJim Jagielski    Out.Log("Not realy tested! Please see comments in Basic-Source.")
308*b1cdbd2cSJim Jagielski    oObj.addPaintListener(oListener11)
309*b1cdbd2cSJim Jagielski    oObj.addPaintListener(oListener12)
310*b1cdbd2cSJim Jagielski    bOK = bOK AND true
311*b1cdbd2cSJim Jagielski    Test.MethodTested("addPaintListener()", bOK)
312*b1cdbd2cSJim Jagielski
313*b1cdbd2cSJim Jagielski    Test.StartMethod("removePaintListener()")
314*b1cdbd2cSJim Jagielski    bOK = true
315*b1cdbd2cSJim Jagielski    Out.Log("Not realy tested! Please see comments in Basic-Source.")
316*b1cdbd2cSJim Jagielski    oObj.removePaintListener(oListener11)
317*b1cdbd2cSJim Jagielski    bOK = bOK AND true
318*b1cdbd2cSJim Jagielski    oObj.removePaintListener(oListener12)
319*b1cdbd2cSJim Jagielski    Test.MethodTested("removePaintListener()", bOK)
320*b1cdbd2cSJim Jagielski
321*b1cdbd2cSJim JagielskiExit Sub
322*b1cdbd2cSJim JagielskiErrHndl:
323*b1cdbd2cSJim Jagielski    Test.Exception()
324*b1cdbd2cSJim Jagielski    bOK = false
325*b1cdbd2cSJim Jagielski    resume next
326*b1cdbd2cSJim JagielskiEnd Sub
327*b1cdbd2cSJim Jagielski
328*b1cdbd2cSJim Jagielski' Listener call backs for com.sun.star.awt.XWindowListener
329*b1cdbd2cSJim JagielskiSub CB1_windowResized
330*b1cdbd2cSJim Jagielski    Out.Log("CallBack for Listener1 windowResized was called.")
331*b1cdbd2cSJim Jagielski    bCB1_windowResized = true
332*b1cdbd2cSJim JagielskiEnd Sub
333*b1cdbd2cSJim JagielskiSub CB2_windowResized
334*b1cdbd2cSJim Jagielski    Out.Log("CallBack for Listener2 windowResized was called.")
335*b1cdbd2cSJim Jagielski    bCB2_windowResized = true
336*b1cdbd2cSJim JagielskiEnd Sub
337*b1cdbd2cSJim JagielskiSub CB1_windowMoved
338*b1cdbd2cSJim Jagielski    Out.Log("CallBack for Listener1 windowMoved was called.")
339*b1cdbd2cSJim Jagielski    bCB1_windowMoved = true
340*b1cdbd2cSJim JagielskiEnd Sub
341*b1cdbd2cSJim JagielskiSub CB2_windowMoved
342*b1cdbd2cSJim Jagielski    Out.Log("CallBack for Listener2 windowMoved was called.")
343*b1cdbd2cSJim Jagielski    bCB2_windowMoved = true
344*b1cdbd2cSJim JagielskiEnd Sub
345*b1cdbd2cSJim JagielskiSub CB1_windowHidden
346*b1cdbd2cSJim Jagielski    Out.Log("CallBack for Listener1 windowHidden was called.")
347*b1cdbd2cSJim Jagielski    bCB1_windowHidden = true
348*b1cdbd2cSJim JagielskiEnd Sub
349*b1cdbd2cSJim JagielskiSub CB2_windowHidden
350*b1cdbd2cSJim Jagielski    Out.Log("CallBack for Listener2 windowHidden was called.")
351*b1cdbd2cSJim Jagielski    bCB2_windowHidden = true
352*b1cdbd2cSJim JagielskiEnd Sub
353*b1cdbd2cSJim JagielskiSub CB1_windowShown
354*b1cdbd2cSJim Jagielski    Out.Log("CallBack for Listener1 windowShown was called.")
355*b1cdbd2cSJim Jagielski    bCB1_windowShown = true
356*b1cdbd2cSJim JagielskiEnd Sub
357*b1cdbd2cSJim JagielskiSub CB2_windowShown
358*b1cdbd2cSJim Jagielski    Out.Log("CallBack for Listener2 windowShown was called.")
359*b1cdbd2cSJim Jagielski    bCB2_windowShown = true
360*b1cdbd2cSJim JagielskiEnd Sub
361*b1cdbd2cSJim JagielskiSub CB1_disposing
362*b1cdbd2cSJim Jagielski    Out.Log("CallBack for Listener1 disposing was called")
363*b1cdbd2cSJim Jagielski    bCB1_disposing = true
364*b1cdbd2cSJim JagielskiEnd Sub
365*b1cdbd2cSJim JagielskiSub CB2_disposing
366*b1cdbd2cSJim Jagielski    Out.Log("CallBack for Listener2 disposing was called")
367*b1cdbd2cSJim Jagielski    bCB2_disposing = true
368*b1cdbd2cSJim JagielskiEnd Sub
369*b1cdbd2cSJim Jagielski
370*b1cdbd2cSJim Jagielski' Listener call backs for com.sun.star.awt.XFocusListener
371*b1cdbd2cSJim JagielskiSub CB3_focusGained
372*b1cdbd2cSJim Jagielski    Out.Log("CallBack for Listener3 'focusGained' was called")
373*b1cdbd2cSJim Jagielski    bCB3_focusGained = true
374*b1cdbd2cSJim JagielskiEnd Sub
375*b1cdbd2cSJim JagielskiSub CB4_focusGained
376*b1cdbd2cSJim Jagielski    Out.Log("CallBack for Listener4 'focusGained' was called")
377*b1cdbd2cSJim Jagielski    bCB4_focusGained = true
378*b1cdbd2cSJim JagielskiEnd Sub
379*b1cdbd2cSJim JagielskiSub CB3_focusLost
380*b1cdbd2cSJim Jagielski    Out.Log("CallBack for Listener3 'focusLost' was called")
381*b1cdbd2cSJim Jagielski    bCB3_focusLost = true
382*b1cdbd2cSJim JagielskiEnd Sub
383*b1cdbd2cSJim JagielskiSub CB4_focusLost
384*b1cdbd2cSJim Jagielski    Out.Log("CallBack for Listener4 'focusLost' was called")
385*b1cdbd2cSJim Jagielski    bCB4_focusLost = true
386*b1cdbd2cSJim JagielskiEnd Sub
387*b1cdbd2cSJim JagielskiSub CB3_disposing
388*b1cdbd2cSJim JagielskiEnd Sub
389*b1cdbd2cSJim JagielskiSub CB4_disposing
390*b1cdbd2cSJim JagielskiEnd Sub
391*b1cdbd2cSJim Jagielski
392*b1cdbd2cSJim Jagielski' Listener call backs for com.sun.star.awt.XKeyListener
393*b1cdbd2cSJim Jagielski' They will never be called beause of no interaction in API-Testing
394*b1cdbd2cSJim JagielskiSub CB5_keyPressed
395*b1cdbd2cSJim Jagielski  MsgBox("CallBack for Listener5 'keyPressed' was called")
396*b1cdbd2cSJim JagielskiEnd Sub
397*b1cdbd2cSJim JagielskiSub CB6_keyPressed
398*b1cdbd2cSJim Jagielski  MsgBox("CallBack for Listener6 'keyPressed' was called")
399*b1cdbd2cSJim JagielskiEnd Sub
400*b1cdbd2cSJim JagielskiSub CB5_keyReleased
401*b1cdbd2cSJim Jagielski  MsgBox("CallBack for Listener5 'keyReleased' was called")
402*b1cdbd2cSJim JagielskiEnd Sub
403*b1cdbd2cSJim JagielskiSub CB6_keyReleased
404*b1cdbd2cSJim Jagielski  MsgBox("CallBack for Listener6 'keyReleased' was called")
405*b1cdbd2cSJim JagielskiEnd Sub
406*b1cdbd2cSJim JagielskiSub CB5_disposing
407*b1cdbd2cSJim JagielskiEnd Sub
408*b1cdbd2cSJim JagielskiSub CB6_disposing
409*b1cdbd2cSJim JagielskiEnd Sub
410*b1cdbd2cSJim Jagielski
411*b1cdbd2cSJim Jagielski
412*b1cdbd2cSJim Jagielski' Listener call backs for com.sun.star.awt.XMouseListener
413*b1cdbd2cSJim Jagielski' They will never be called beause of no interaction in API-Testing
414*b1cdbd2cSJim JagielskiSub CB7_mousePressed
415*b1cdbd2cSJim Jagielski  MsgBox("CallBack for Listener7 'mousePressed' was called")
416*b1cdbd2cSJim JagielskiEnd Sub
417*b1cdbd2cSJim JagielskiSub CB8_mousePressed
418*b1cdbd2cSJim Jagielski  MsgBox("CallBack for Listener8 'mousePressed' was called")
419*b1cdbd2cSJim JagielskiEnd Sub
420*b1cdbd2cSJim JagielskiSub CB7_mouseReleased
421*b1cdbd2cSJim Jagielski  MsgBox("CallBack for Listener8 'mouseReleased' was called")
422*b1cdbd2cSJim JagielskiEnd Sub
423*b1cdbd2cSJim JagielskiSub CB8_mouseReleased
424*b1cdbd2cSJim Jagielski  MsgBox("CallBack for Listener8 'mouseReleased' was called")
425*b1cdbd2cSJim JagielskiEnd Sub
426*b1cdbd2cSJim JagielskiSub CB7_mouseEntered
427*b1cdbd2cSJim Jagielski  MsgBox("CallBack for Listener7 'mouseEntered' was called")
428*b1cdbd2cSJim JagielskiEnd Sub
429*b1cdbd2cSJim JagielskiSub CB8_mouseEntered
430*b1cdbd2cSJim Jagielski  MsgBox("CallBack for Listener8 'mouseEntered' was called")
431*b1cdbd2cSJim JagielskiEnd Sub
432*b1cdbd2cSJim JagielskiSub CB7_mouseExited
433*b1cdbd2cSJim Jagielski  MsgBox("CallBack for Listener7 'mouseExited' was called")
434*b1cdbd2cSJim JagielskiEnd Sub
435*b1cdbd2cSJim JagielskiSub CB8_mouseExited
436*b1cdbd2cSJim Jagielski  MsgBox("CallBack for Listener8 'mouseExited' was called")
437*b1cdbd2cSJim JagielskiEnd Sub
438*b1cdbd2cSJim JagielskiSub CB7_disposing
439*b1cdbd2cSJim JagielskiEnd Sub
440*b1cdbd2cSJim JagielskiSub CB8_disposing
441*b1cdbd2cSJim JagielskiEnd Sub
442*b1cdbd2cSJim Jagielski
443*b1cdbd2cSJim Jagielski
444*b1cdbd2cSJim Jagielski' Listener call backs for com.sun.star.awt.XMouseMotionListener
445*b1cdbd2cSJim Jagielski' They will never be called beause of no interaction in API-Testing
446*b1cdbd2cSJim JagielskiSub CB9_mouseDragged
447*b1cdbd2cSJim Jagielski  MsgBox("CallBack for Listener9 'mouseDragged' was called")
448*b1cdbd2cSJim JagielskiEnd Sub
449*b1cdbd2cSJim JagielskiSub CB10_mouseDragged
450*b1cdbd2cSJim Jagielski  MsgBox("CallBack for Listener10 'mouseDragged' was called")
451*b1cdbd2cSJim JagielskiEnd Sub
452*b1cdbd2cSJim JagielskiSub CB9_mouseMoved
453*b1cdbd2cSJim Jagielski  MsgBox("CallBack for Listener9 'mouseMoved' was called")
454*b1cdbd2cSJim JagielskiEnd Sub
455*b1cdbd2cSJim JagielskiSub CB10_mouseMoved
456*b1cdbd2cSJim Jagielski  MsgBox("CallBack for Listener10 'mouseMoved' was called")
457*b1cdbd2cSJim JagielskiEnd Sub
458*b1cdbd2cSJim JagielskiSub CB9_disposing
459*b1cdbd2cSJim JagielskiEnd Sub
460*b1cdbd2cSJim JagielskiSub CB10_disposing
461*b1cdbd2cSJim JagielskiEnd Sub
462*b1cdbd2cSJim Jagielski
463*b1cdbd2cSJim Jagielski
464*b1cdbd2cSJim Jagielski' Listener call backs for com.sun.star.awt.XMouseMotionListener
465*b1cdbd2cSJim Jagielski' They will never be called beause of no interaction in API-Testing
466*b1cdbd2cSJim JagielskiSub CB11_windowPaint
467*b1cdbd2cSJim Jagielski  MsgBox("CallBack for Listener11 'windowPaint' was called")
468*b1cdbd2cSJim JagielskiEnd Sub
469*b1cdbd2cSJim JagielskiSub CB12_windowPaint
470*b1cdbd2cSJim Jagielski  MsgBox("CallBack for Listener12 'windowPaint' was called")
471*b1cdbd2cSJim JagielskiEnd Sub
472*b1cdbd2cSJim JagielskiSub CB11_disposing
473*b1cdbd2cSJim JagielskiEnd Sub
474*b1cdbd2cSJim JagielskiSub CB12_disposing
475*b1cdbd2cSJim JagielskiEnd Sub
476*b1cdbd2cSJim Jagielski
477*b1cdbd2cSJim Jagielski</script:module>
478