1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_a11y_xpcAccessibleHyperText_h_
8 #define mozilla_a11y_xpcAccessibleHyperText_h_
10 #include "nsIAccessibleText.h"
11 #include "nsIAccessibleHyperText.h"
12 #include "nsIAccessibleEditableText.h"
14 #include "HyperTextAccessible.h"
15 #include "xpcAccessibleGeneric.h"
20 class xpcAccessibleHyperText
: public xpcAccessibleGeneric
,
21 public nsIAccessibleText
,
22 public nsIAccessibleEditableText
,
23 public nsIAccessibleHyperText
{
25 explicit xpcAccessibleHyperText(Accessible
* aIntl
)
26 : xpcAccessibleGeneric(aIntl
) {
27 if (aIntl
->IsHyperText() && aIntl
->IsTextRole()) mSupportedIfaces
|= eText
;
30 NS_DECL_ISUPPORTS_INHERITED
32 NS_DECL_NSIACCESSIBLETEXT
33 NS_DECL_NSIACCESSIBLEHYPERTEXT
34 NS_DECL_NSIACCESSIBLEEDITABLETEXT
37 virtual ~xpcAccessibleHyperText() {}
40 HyperTextAccessibleBase
* Intl() { return mIntl
->AsHyperTextBase(); }
42 HyperTextAccessible
* IntlLocal() {
43 if (LocalAccessible
* acc
= mIntl
->AsLocal()) {
44 return acc
->AsHyperText();
50 xpcAccessibleHyperText(const xpcAccessibleHyperText
&) = delete;
51 xpcAccessibleHyperText
& operator=(const xpcAccessibleHyperText
&) = delete;
55 } // namespace mozilla
57 #endif // mozilla_a11y_xpcAccessibleHyperText_h_