xref: /AOO41X/main/winaccessibility/inc/AccContainerEventListener.hxx (revision 4d7c9de063a797b8b4f3d45e3561e82ad1f8ef1f)
1*3a700b0aSSteve Yin /**************************************************************
25fdc4257SSteve Yin  *
3*3a700b0aSSteve Yin  * Licensed to the Apache Software Foundation (ASF) under one
4*3a700b0aSSteve Yin  * or more contributor license agreements.  See the NOTICE file
5*3a700b0aSSteve Yin  * distributed with this work for additional information
6*3a700b0aSSteve Yin  * regarding copyright ownership.  The ASF licenses this file
7*3a700b0aSSteve Yin  * to you under the Apache License, Version 2.0 (the
8*3a700b0aSSteve Yin  * "License"); you may not use this file except in compliance
9*3a700b0aSSteve Yin  * with the License.  You may obtain a copy of the License at
105fdc4257SSteve Yin  *
11*3a700b0aSSteve Yin  *   http://www.apache.org/licenses/LICENSE-2.0
125fdc4257SSteve Yin  *
13*3a700b0aSSteve Yin  * Unless required by applicable law or agreed to in writing,
14*3a700b0aSSteve Yin  * software distributed under the License is distributed on an
15*3a700b0aSSteve Yin  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*3a700b0aSSteve Yin  * KIND, either express or implied.  See the License for the
17*3a700b0aSSteve Yin  * specific language governing permissions and limitations
18*3a700b0aSSteve Yin  * under the License.
195fdc4257SSteve Yin  *
20*3a700b0aSSteve Yin  *************************************************************/
215fdc4257SSteve Yin 
225fdc4257SSteve Yin #ifndef __ACCCONTAINEREVENTLISTENERHXX
235fdc4257SSteve Yin #define __ACCCONTAINEREVENTLISTENERHXX
245fdc4257SSteve Yin 
255fdc4257SSteve Yin #include <stdio.h>
265fdc4257SSteve Yin #include "AccEventListener.hxx"
275fdc4257SSteve Yin #include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
285fdc4257SSteve Yin #include <com/sun/star/accessibility/XAccessible.hpp>
295fdc4257SSteve Yin 
305fdc4257SSteve Yin using namespace ::com::sun::star::uno;
315fdc4257SSteve Yin 
325fdc4257SSteve Yin /**
335fdc4257SSteve Yin  * AccContainerEventListener is inherited from AccEventListener. It handles the evnets
345fdc4257SSteve Yin  * generated by container controls. The accessible roles are: CANVAS, COMBO_BOX, DOCUMENT,
355fdc4257SSteve Yin  * EMBEDDED_OBJECT, END_NOTE, FILLER, FOOTNOTE, FOOTER, GRAPHIC, HEADER, LAYERED_PANE,
365fdc4257SSteve Yin  * MENU_BAR, POPUP_MENU, OPTION_PANE, PAGE_TAB, PAGE_TAB_LIST, PANEL, SCROLL_PANE, SPLIT_PANE,
375fdc4257SSteve Yin  * STATUS_BAR, TABLE_CELL, TEXT_FRAME, TOOL_BAR, VIEW_PORT.
385fdc4257SSteve Yin  * It defines the procedure of specific event handling related with containsers and provides
395fdc4257SSteve Yin  * the detailed support for some related methods.
405fdc4257SSteve Yin  */
415fdc4257SSteve Yin class AccContainerEventListener: public AccEventListener
425fdc4257SSteve Yin {
435fdc4257SSteve Yin public:
445fdc4257SSteve Yin     AccContainerEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent);
455fdc4257SSteve Yin     virtual ~AccContainerEventListener();
465fdc4257SSteve Yin 
475fdc4257SSteve Yin     //AccessibleEventListener
485fdc4257SSteve Yin     virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
495fdc4257SSteve Yin 
505fdc4257SSteve Yin     //for child changed event
515fdc4257SSteve Yin     virtual void SAL_CALL handleChildChangedEvent(Any oldValue, Any newValue);
525fdc4257SSteve Yin 
535fdc4257SSteve Yin     //for selection changed event
545fdc4257SSteve Yin     virtual void SAL_CALL handleSelectionChangedEvent(const Any &oldValue, const Any &newValue);
555fdc4257SSteve Yin 
565fdc4257SSteve Yin     //for all children changed event
575fdc4257SSteve Yin     virtual void SAL_CALL handleAllChildrenChangedEvent();
585fdc4257SSteve Yin 
595fdc4257SSteve Yin     //for text changed event
605fdc4257SSteve Yin     virtual void SAL_CALL handleTextChangedEvent(Any oldValue, Any newValue);
615fdc4257SSteve Yin     virtual void SAL_CALL handleStateChangedEvent(Any oldValue, Any newValue);
625fdc4257SSteve Yin 
635fdc4257SSteve Yin     //for visible data changed event
645fdc4257SSteve Yin     virtual void SAL_CALL handleVisibleDataChangedEvent();
655fdc4257SSteve Yin 
665fdc4257SSteve Yin     //for bound rect changed event
675fdc4257SSteve Yin     virtual void SAL_CALL handleBoundrectChangedEvent();
685fdc4257SSteve Yin 
695fdc4257SSteve Yin     //for value changed event
705fdc4257SSteve Yin     virtual void SAL_CALL handleValueChangedEvent(Any oldValue, Any newValue);
715fdc4257SSteve Yin 
725fdc4257SSteve Yin     //state changed
735fdc4257SSteve Yin     virtual void SAL_CALL setComponentState(short state, bool enable);
745fdc4257SSteve Yin     virtual void SAL_CALL fireStatePropertyChange(short state, bool set
755fdc4257SSteve Yin                                                      );
765fdc4257SSteve Yin     virtual void SAL_CALL fireStateFocusdChange(bool enable);
775fdc4257SSteve Yin     virtual bool SAL_CALL IsEditable(Reference<com::sun::star::accessibility::XAccessibleContext> xContext);
785fdc4257SSteve Yin 
795fdc4257SSteve Yin     // update all children's state
805fdc4257SSteve Yin     void SAL_CALL UpdateAllChildrenState( com::sun::star::accessibility::XAccessible* pXAccessible );
815fdc4257SSteve Yin 
825fdc4257SSteve Yin     bool NotifyChildEvent(short nWinEvent,const Any &Value);
835fdc4257SSteve Yin 
845fdc4257SSteve Yin     virtual void handleSelectionChangedAddEvent(const Any &oldValue, const Any &newValue);
855fdc4257SSteve Yin     virtual void handleSelectionChangedRemoveEvent(const Any &oldValue, const Any &newValue);
865fdc4257SSteve Yin     virtual void handleSelectionChangedWithinEvent(const Any &oldValue, const Any &newValue);
875fdc4257SSteve Yin 
885fdc4257SSteve Yin     virtual void handlePageChangedEvent (const Any &oldValue, const Any &newValue);
895fdc4257SSteve Yin 
905fdc4257SSteve Yin     virtual void handleSectionChangedEvent (const Any &oldValue, const Any &newValue);
915fdc4257SSteve Yin     virtual void handleColumnChangedEvent (const Any &oldValue, const Any &newValue);
925fdc4257SSteve Yin 	//for name changed event
935fdc4257SSteve Yin     virtual void SAL_CALL handleNameChangedEvent(Any name);
945fdc4257SSteve Yin };
955fdc4257SSteve Yin 
965fdc4257SSteve Yin #endif
97