| 1 |
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
| 2 |
/* |
| 3 |
* This file is part of the LibreOffice project. |
| 4 |
* |
| 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/. |
| 8 |
* |
| 9 |
* This file incorporates work covered by the following license notice: |
| 10 |
* |
| 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 . |
| 18 |
*/ |
| 19 |
#pragma once |
| 20 |
|
| 21 |
#include <AccessibleBase.hxx> |
| 22 |
|
| 23 |
namespace chart |
| 24 |
{ |
| 25 |
class AccessibleTextHelper; |
| 26 |
|
| 27 |
/** Base class for all Chart Accessibility objects except the root node (see AccessibleChartView) |
| 28 |
|
| 29 |
This class contains a reference to the ChartModel, thus, components can easily access all core functionality. |
| 30 |
|
| 31 |
Usage Instructions: |
| 32 |
|
| 33 |
<ul> |
| 34 |
<li>define the getAccessibleName() method of XAccessibleContext</li> |
| 35 |
<li>set the ChartModel using SetChartModel() for the first node before |
| 36 |
creating any children</li> |
| 37 |
<li>override UpdateChildren()</li> |
| 38 |
</ul> |
| 39 |
*/ |
| 40 |
|
| 41 |
class AccessibleChartElement : public AccessibleBase |
| 42 |
{ |
| 43 |
public: |
| 44 |
AccessibleChartElement( const AccessibleElementInfo & rAccInfo, |
| 45 |
bool bMayHaveChildren ); |
| 46 |
virtual ~AccessibleChartElement() override; |
| 47 |
|
| 48 |
// ________ AccessibleBase ________ |
| 49 |
virtual bool ImplUpdateChildren() override; |
| 50 |
virtual css::uno::Reference< css::accessibility::XAccessible > |
| 51 |
ImplGetAccessibleChildById( sal_Int64 i ) const override; |
| 52 |
virtual sal_Int64 ImplGetAccessibleChildCount() const override; |
| 53 |
|
| 54 |
// ________ XAccessibleContext ________ |
| 55 |
virtual OUString SAL_CALL getAccessibleName() override; |
| 56 |
virtual OUString SAL_CALL getAccessibleDescription() override; |
| 57 |
|
| 58 |
// ________ XAccessibleExtendedComponent ________ |
| 59 |
virtual OUString SAL_CALL getToolTipText() override; |
| 60 |
|
| 61 |
private: |
| 62 |
bool m_bHasText; |
| 63 |
rtl::Reference< ::chart::AccessibleTextHelper > |
| 64 |
m_xTextHelper; |
| 65 |
|
| 66 |
void InitTextEdit(); |
| 67 |
}; |
| 68 |
|
| 69 |
} // namespace chart |
| 70 |
|
| 71 |
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |