1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright IBM Corporation 2010. 6 * Copyright 2000, 2010 Oracle and/or its affiliates. 7 * 8 * OpenOffice.org - a multi-platform office productivity suite 9 * 10 * This file is part of OpenOffice.org. 11 * 12 * OpenOffice.org is free software: you can redistribute it and/or modify 13 * it under the terms of the GNU Lesser General Public License version 3 14 * only, as published by the Free Software Foundation. 15 * 16 * OpenOffice.org is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU Lesser General Public License version 3 for more details 20 * (a copy is included in the LICENSE file that accompanied this code). 21 * 22 * You should have received a copy of the GNU Lesser General Public License 23 * version 3 along with OpenOffice.org. If not, see 24 * <http://www.openoffice.org/license.html> 25 * for a copy of the LGPLv3 License. 26 * 27 ************************************************************************/ 28 29 #ifndef __ACCCOMPONENTEVENTLISTENER_HXX 30 #define __ACCCOMPONENTEVENTLISTENER_HXX 31 32 #include <stdio.h> 33 #include "AccEventListener.hxx" 34 #include <com/sun/star/accessibility/XAccessibleEventListener.hpp> 35 #include <com/sun/star/accessibility/XAccessible.hpp> 36 37 using namespace ::com::sun::star::uno; 38 /** 39 * AccComponentEventListener is inherited from AccEventListener. It handles the evnets 40 * generated by component controls. The accessible roles are: CHECK_BOX, ICON, LABEL, 41 * MENU_ITEM, PUSH_BUTTON, RADIO_BUTTON, SCROLL_BAR, SEPARATOR, TOGGLE_BUTTON, TOOL_TIP, SPIN_BOX. 42 * It defines the procedure of specific event handling related with components and provides 43 * the detailed support for some related methods. 44 */ 45 class AccComponentEventListener: public AccEventListener 46 { 47 private: 48 static FILE *output, *output2, *output3, *outacc;//used for debugging 49 public: 50 AccComponentEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent); 51 virtual ~AccComponentEventListener(); 52 53 //AccessibleEventListener 54 virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException); 55 56 //for value changed event 57 virtual void SAL_CALL handleValueChangedEvent(Any oldValue, Any newValue); 58 59 //for action changed event 60 virtual void SAL_CALL handleActionChangedEvent(); 61 62 //for text changed event 63 virtual void SAL_CALL handleTextChangedEvent(Any oldValue, Any newValue); 64 65 //for caret changed event 66 virtual void SAL_CALL handleCaretChangedEvent(Any oldValue, Any newValue); 67 68 //for visible data changed event 69 virtual void SAL_CALL handleVisibleDataChangedEvent(); 70 71 //for bound rect changed event 72 virtual void SAL_CALL handleBoundrectChangedEvent(); 73 74 virtual void SAL_CALL setComponentState(short state, bool enable); 75 virtual void SAL_CALL fireStatePropertyChange(short state, bool set 76 ); 77 virtual void SAL_CALL fireStateFocusdChange(bool enable); 78 79 void handleSelectionChangedEvent(); 80 81 //add TEXT_SELECTION_CHANGED event 82 void handleTextSelectionChangedEvent(); 83 }; 84 85 #endif 86