2001-01-01 03:12:15 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2001-01-01 03:12:15 +03:00
|
|
|
|
2012-06-11 02:18:27 +04:00
|
|
|
#ifndef mozilla_a11y_XULSelectControlAccessible_h__
|
|
|
|
#define mozilla_a11y_XULSelectControlAccessible_h__
|
2001-01-01 03:12:15 +03:00
|
|
|
|
2012-05-29 05:18:45 +04:00
|
|
|
#include "AccessibleWrap.h"
|
2001-01-01 03:12:15 +03:00
|
|
|
|
2012-06-11 02:18:27 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace a11y {
|
|
|
|
|
2001-01-01 03:12:15 +03:00
|
|
|
/**
|
|
|
|
* The basic implementation of accessible selection for XUL select controls.
|
|
|
|
*/
|
2012-05-29 05:18:45 +04:00
|
|
|
class XULSelectControlAccessible : public AccessibleWrap {
|
2001-01-01 03:12:15 +03:00
|
|
|
public:
|
2012-05-27 13:01:40 +04:00
|
|
|
XULSelectControlAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
2001-01-01 03:12:15 +03:00
|
|
|
virtual ~XULSelectControlAccessible() {}
|
|
|
|
|
2013-10-29 07:30:55 +04:00
|
|
|
// Accessible
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void Shutdown() override;
|
2001-01-01 03:12:15 +03:00
|
|
|
|
|
|
|
// SelectAccessible
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void SelectedItems(nsTArray<Accessible*>* aItems) override;
|
|
|
|
virtual uint32_t SelectedItemCount() override;
|
|
|
|
virtual Accessible* GetSelectedItem(uint32_t aIndex) override;
|
|
|
|
virtual bool IsItemSelected(uint32_t aIndex) override;
|
|
|
|
virtual bool AddItemToSelection(uint32_t aIndex) override;
|
|
|
|
virtual bool RemoveItemFromSelection(uint32_t aIndex) override;
|
|
|
|
virtual bool SelectAll() override;
|
|
|
|
virtual bool UnselectAll() override;
|
2001-01-01 03:12:15 +03:00
|
|
|
|
|
|
|
// Widgets
|
2018-05-13 12:26:02 +03:00
|
|
|
virtual Accessible* CurrentItem() const override;
|
2018-05-13 13:14:55 +03:00
|
|
|
virtual void SetCurrentItem(const Accessible* aItem) override;
|
2001-01-01 03:12:15 +03:00
|
|
|
|
|
|
|
protected:
|
2019-11-29 23:39:36 +03:00
|
|
|
RefPtr<dom::Element> mSelectControl;
|
2001-01-01 03:12:15 +03:00
|
|
|
};
|
|
|
|
|
2012-06-11 02:18:27 +04:00
|
|
|
} // namespace a11y
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2001-01-01 03:12:15 +03:00
|
|
|
#endif
|