xpcAccessibleSelectable.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef mozilla_a11y_xpcAccessibleSelectable_h_
  6. #define mozilla_a11y_xpcAccessibleSelectable_h_
  7. #include "nsIAccessibleSelectable.h"
  8. class nsIAccessible;
  9. class nsIArray;
  10. namespace mozilla {
  11. namespace a11y {
  12. class Accessible;
  13. /**
  14. * XPCOM nsIAccessibleSelectable inteface implementation, used by
  15. * xpcAccessibleGeneric class.
  16. */
  17. class xpcAccessibleSelectable : public nsIAccessibleSelectable
  18. {
  19. public:
  20. // nsIAccessibleSelectable
  21. NS_IMETHOD GetSelectedItems(nsIArray** aSelectedItems) final override;
  22. NS_IMETHOD GetSelectedItemCount(uint32_t* aSelectedItemCount)
  23. final override;
  24. NS_IMETHOD GetSelectedItemAt(uint32_t aIndex, nsIAccessible** aItem)
  25. final override;
  26. NS_IMETHOD IsItemSelected(uint32_t aIndex, bool* aIsSelected)
  27. final override;
  28. NS_IMETHOD AddItemToSelection(uint32_t aIndex) final override;
  29. NS_IMETHOD RemoveItemFromSelection(uint32_t aIndex) final override;
  30. NS_IMETHOD SelectAll(bool* aIsMultiSelect) final override;
  31. NS_IMETHOD UnselectAll() final override;
  32. protected:
  33. xpcAccessibleSelectable() { }
  34. virtual ~xpcAccessibleSelectable() {}
  35. private:
  36. xpcAccessibleSelectable(const xpcAccessibleSelectable&) = delete;
  37. xpcAccessibleSelectable& operator =(const xpcAccessibleSelectable&) = delete;
  38. Accessible* Intl();
  39. };
  40. } // namespace a11y
  41. } // namespace mozilla
  42. #endif