1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
24 #if !defined WIN32_LEAN_AND_MEAN
25 # define WIN32_LEAN_AND_MEAN
30 #include <rtl/ref.hxx>
32 #include <com/sun/star/accessibility/XAccessible.hpp>
33 #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
34 #include <com/sun/star/accessibility/XAccessibleAction.hpp>
36 #include "accHelper.hxx"
39 class AccEventListener
;
40 class AccObjectManagerAgent
;
43 typedef std::vector
<AccObject
*> IAccChildList
;
53 IMAccessible
* m_pIMAcc
;
54 AccObject
* m_pParentObj
;
55 IAccChildList m_childrenList
;
56 ::rtl::Reference
<AccEventListener
> m_pListener
;
58 css::uno::Reference
< css::accessibility::XAccessible
> m_xAccRef
;
59 css::uno::Reference
< css::accessibility::XAccessibleAction
> m_xAccActionRef
;
60 css::uno::Reference
< css::accessibility::XAccessibleContext
> m_xAccContextRef
;
62 void ImplInitializeCreateObj();//create COM object
64 void UpdateActionDesc();
67 DWORD
GetMSAAStateFromUNO(sal_Int64 xState
);//translate state from UNO to MSAA value
68 css::accessibility::XAccessibleSelection
* GetXAccessibleSelection();
69 void GetExpandedState(sal_Bool
* isExpandable
, sal_Bool
* isExpanded
);
70 OUString
GetMAccessibleValueFromAny(css::uno::Any pAny
);
74 AccObject ( css::accessibility::XAccessible
* pXAcc
= nullptr,AccObjectManagerAgent
* pAgent
= nullptr ,AccEventListener
* accListener
=nullptr);
77 bool UpdateAccessibleInfoFromUnoToMSAA( ); //implement accessible information mapping
78 void UpdateDefaultAction();
80 IMAccessible
* GetIMAccessible(); //return COM interface in acc object
81 css::uno::Reference
<css::accessibility::XAccessible
> const& GetXAccessible();
83 void SetResID(long id
);//ResID means ChildID in MSAA
87 void SetParentHWND(HWND hWnd
);//need to set top window handle when send event to AT
90 void SetListener(::rtl::Reference
<AccEventListener
> const& pListener
);
91 AccEventListener
* getListener();
93 void SetParentObj(AccObject
* pParentAccObj
);
94 AccObject
* GetParentObj();
96 void InsertChild( AccObject
* pChild
,short pos
= LAST_CHILD
);
97 void DeleteChild( AccObject
* pChild
);
98 AccObject
* NextChild();
100 void NotifyDestroy();
102 void DecreaseState( sal_Int64 xState
);//call COM interface DecreaseState method
103 void IncreaseState( sal_Int64 xState
);//call COM interface IncreaseState method
105 void SetName( css::uno::Any newName
);
106 void SetValue( css::uno::Any pAny
);
108 short GetRole() const;
114 void UpdateValidWindow();
119 void setLocalizedResourceString();
122 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */