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