2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07: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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-06-10 16:44:50 -07:00
|
|
|
#ifndef mozilla_a11y_XULTabAccessible_h__
|
|
|
|
#define mozilla_a11y_XULTabAccessible_h__
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
// NOTE: alphabetically ordered
|
2012-06-10 16:44:50 -07:00
|
|
|
#include "XULMenuAccessible.h"
|
2000-12-31 16:12:15 -08:00
|
|
|
#include "XULSelectControlAccessible.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-06-10 16:44:50 -07:00
|
|
|
namespace mozilla {
|
|
|
|
namespace a11y {
|
|
|
|
|
2007-11-11 22:02:42 -08:00
|
|
|
/**
|
2010-05-14 02:55:00 -07:00
|
|
|
* An individual tab, xul:tab element.
|
2007-11-11 22:02:42 -08:00
|
|
|
*/
|
2012-06-10 16:44:50 -07:00
|
|
|
class XULTabAccessible : public AccessibleWrap
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum { eAction_Switch = 0 };
|
|
|
|
|
2012-06-10 16:44:50 -07:00
|
|
|
XULTabAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
2007-11-11 22:02:42 -08:00
|
|
|
|
2012-05-28 18:18:45 -07:00
|
|
|
// Accessible
|
2014-09-16 10:30:23 -07:00
|
|
|
virtual a11y::role NativeRole() MOZ_OVERRIDE;
|
|
|
|
virtual uint64_t NativeState() MOZ_OVERRIDE;
|
|
|
|
virtual uint64_t NativeInteractiveState() const MOZ_OVERRIDE;
|
2013-10-19 11:19:50 -07:00
|
|
|
virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
|
2011-06-05 12:35:43 -07:00
|
|
|
|
|
|
|
// ActionAccessible
|
2014-09-16 10:30:23 -07:00
|
|
|
virtual uint8_t ActionCount() MOZ_OVERRIDE;
|
|
|
|
virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
|
|
|
|
virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-11-11 22:02:42 -08:00
|
|
|
/**
|
2010-05-14 02:55:00 -07:00
|
|
|
* A container of tab objects, xul:tabs element.
|
2007-11-11 22:02:42 -08:00
|
|
|
*/
|
2012-06-10 16:44:50 -07:00
|
|
|
class XULTabsAccessible : public XULSelectControlAccessible
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
public:
|
2012-06-10 16:44:50 -07:00
|
|
|
XULTabsAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
2008-10-10 05:26:55 -07:00
|
|
|
|
2012-05-28 18:18:45 -07:00
|
|
|
// Accessible
|
2012-04-09 02:48:41 -07:00
|
|
|
virtual void Value(nsString& aValue);
|
2014-09-16 10:30:23 -07:00
|
|
|
virtual a11y::role NativeRole() MOZ_OVERRIDE;
|
2011-06-05 12:35:43 -07:00
|
|
|
|
|
|
|
// ActionAccessible
|
2014-09-16 10:30:23 -07:00
|
|
|
virtual uint8_t ActionCount() MOZ_OVERRIDE;
|
2012-10-13 21:18:39 -07:00
|
|
|
|
|
|
|
protected:
|
|
|
|
// Accessible
|
|
|
|
virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
2010-05-14 02:55:00 -07:00
|
|
|
|
2012-06-28 16:04:50 -07:00
|
|
|
/**
|
2010-05-14 02:55:00 -07:00
|
|
|
* A container of tab panels, xul:tabpanels element.
|
|
|
|
*/
|
2012-12-28 00:15:02 -08:00
|
|
|
class XULTabpanelsAccessible : public AccessibleWrap
|
2010-05-14 02:55:00 -07:00
|
|
|
{
|
|
|
|
public:
|
2012-12-28 00:15:02 -08:00
|
|
|
XULTabpanelsAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
2012-06-28 16:04:50 -07:00
|
|
|
AccessibleWrap(aContent, aDoc)
|
2012-12-28 00:15:02 -08:00
|
|
|
{ mType = eXULTabpanelsType; }
|
2010-05-14 02:55:00 -07:00
|
|
|
|
2012-05-28 18:18:45 -07:00
|
|
|
// Accessible
|
2014-09-16 10:30:23 -07:00
|
|
|
virtual a11y::role NativeRole() MOZ_OVERRIDE;
|
2010-05-14 02:55:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-11-11 22:02:42 -08:00
|
|
|
/**
|
2013-12-05 08:07:53 -08:00
|
|
|
* A tabpanel object, child elements of xul:tabpanels element.
|
2010-05-14 02:55:00 -07:00
|
|
|
*
|
|
|
|
* XXX: we need to move the class logic into generic class since
|
|
|
|
* for example we do not create instance of this class for XUL textbox used as
|
|
|
|
* a tabpanel.
|
2007-11-11 22:02:42 -08:00
|
|
|
*/
|
2012-06-10 16:44:50 -07:00
|
|
|
class XULTabpanelAccessible : public AccessibleWrap
|
2007-11-11 22:02:42 -08:00
|
|
|
{
|
|
|
|
public:
|
2012-06-10 16:44:50 -07:00
|
|
|
XULTabpanelAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
2007-11-11 22:02:42 -08:00
|
|
|
|
2012-05-28 18:18:45 -07:00
|
|
|
// Accessible
|
2014-09-16 10:30:23 -07:00
|
|
|
virtual a11y::role NativeRole() MOZ_OVERRIDE;
|
2013-10-19 11:19:50 -07:00
|
|
|
virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
|
2007-11-11 22:02:42 -08:00
|
|
|
};
|
|
|
|
|
2012-06-10 16:44:50 -07:00
|
|
|
} // namespace a11y
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2007-04-02 08:56:24 -07:00
|
|
|
#endif
|
2007-11-11 22:02:42 -08:00
|
|
|
|