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 //////////////////////////////////////////////////////////////////////
30 // AccComponentBase.h: interface for the CAccComponentBase class.
31 //////////////////////////////////////////////////////////////////////
32 
33 #if !defined(AFX_ACCCOMPONENTBASE_H__946BE230_1DCB_494B_ACF6_32A2E197DD2A__INCLUDED_)
34 #define AFX_ACCCOMPONENTBASE_H__946BE230_1DCB_494B_ACF6_32A2E197DD2A__INCLUDED_
35 
36 #if _MSC_VER > 1000
37 #pragma once
38 #endif // _MSC_VER > 1000
39 
40 #define WNT
41 
42 #include <com/sun/star/uno/reference.hxx>
43 #include <com/sun/star/accessibility/XAccessibleComponent.hpp>
44 #include "UNOXWrapper.h"
45 
46 class ATL_NO_VTABLE CAccComponentBase : public CUNOXWrapper
47 {
48 public:
49     CAccComponentBase();
50     virtual ~CAccComponentBase();
51     // IAccessibleComponent
52 public:
53     // IAccessibleComponent
54 
55     // Returns the location of the upper left corner of the object's bounding
56     // box relative to the parent.
57     STDMETHOD(get_locationInParent)(long *x, long *y);
58 
59     // Returns the location of the upper left corner of the object's bounding
60     // box in screen.
61     STDMETHOD(get_locationOnScreen)(long *x, long *y);
62 
63     // Grabs the focus to this object.
64     STDMETHOD(grabFocus)(boolean * success);
65 
66     // Returns the foreground color of this object.
67     STDMETHOD(get_foreground)(IA2Color * foreground);
68 
69     // Returns the background color of this object.
70     STDMETHOD(get_background)(IA2Color * background);
71 
72     // Overide of IUNOXWrapper.
73     STDMETHOD(put_XInterface)(long pXInterface);
74 
75 protected:
76 
77     com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleComponent> pRXComp;
78 
79     inline com::sun::star::accessibility::XAccessibleComponent* GetXInterface()
80     {
81         return pRXComp.get();
82     }
83 };
84 
85 #endif // !defined(AFX_ACCCOMPONENTBASE_H__946BE230_1DCB_494B_ACF6_32A2E197DD2A__INCLUDED_)
86