1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 ////////////////////////////////////////////////////////////////////// 23 // AccComponentBase.h: interface for the CAccComponentBase class. 24 ////////////////////////////////////////////////////////////////////// 25 26 #if !defined(AFX_ACCCOMPONENTBASE_H__946BE230_1DCB_494B_ACF6_32A2E197DD2A__INCLUDED_) 27 #define AFX_ACCCOMPONENTBASE_H__946BE230_1DCB_494B_ACF6_32A2E197DD2A__INCLUDED_ 28 29 #if _MSC_VER > 1000 30 #pragma once 31 #endif // _MSC_VER > 1000 32 33 #define WNT 34 35 #include <com/sun/star/uno/reference.hxx> 36 #include <com/sun/star/accessibility/XAccessibleComponent.hpp> 37 #include "UNOXWrapper.h" 38 39 class ATL_NO_VTABLE CAccComponentBase : public CUNOXWrapper 40 { 41 public: 42 CAccComponentBase(); 43 virtual ~CAccComponentBase(); 44 // IAccessibleComponent 45 public: 46 // IAccessibleComponent 47 48 // Returns the location of the upper left corner of the object's bounding 49 // box relative to the parent. 50 STDMETHOD(get_locationInParent)(long *x, long *y); 51 52 // Returns the location of the upper left corner of the object's bounding 53 // box in screen. 54 STDMETHOD(get_locationOnScreen)(long *x, long *y); 55 56 // Grabs the focus to this object. 57 STDMETHOD(grabFocus)(boolean * success); 58 59 // Returns the foreground color of this object. 60 STDMETHOD(get_foreground)(IA2Color * foreground); 61 62 // Returns the background color of this object. 63 STDMETHOD(get_background)(IA2Color * background); 64 65 // Overide of IUNOXWrapper. 66 STDMETHOD(put_XInterface)(long pXInterface); 67 68 protected: 69 70 com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleComponent> pRXComp; 71 GetXInterface()72 inline com::sun::star::accessibility::XAccessibleComponent* GetXInterface() 73 { 74 return pRXComp.get(); 75 } 76 }; 77 78 #endif // !defined(AFX_ACCCOMPONENTBASE_H__946BE230_1DCB_494B_ACF6_32A2E197DD2A__INCLUDED_) 79