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
|
|
|
|
|
|
|
// nsIAccessible
|
2012-08-22 08:56:38 -07:00
|
|
|
NS_IMETHOD GetActionName(uint8_t aIndex, nsAString& aName);
|
|
|
|
NS_IMETHOD DoAction(uint8_t index);
|
2007-11-11 22:02:42 -08:00
|
|
|
|
2012-05-28 18:18:45 -07:00
|
|
|
// Accessible
|
2012-06-10 16:44:50 -07:00
|
|
|
virtual a11y::role NativeRole();
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual uint64_t NativeState();
|
|
|
|
virtual uint64_t NativeInteractiveState() const;
|
|
|
|
virtual Relation RelationByType(uint32_t aType);
|
2011-06-05 12:35:43 -07:00
|
|
|
|
|
|
|
// ActionAccessible
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual uint8_t ActionCount();
|
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);
|
2012-06-10 16:44:50 -07:00
|
|
|
virtual a11y::role NativeRole();
|
2011-06-05 12:35:43 -07:00
|
|
|
|
|
|
|
// ActionAccessible
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual uint8_t ActionCount();
|
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-06-28 16:04:50 -07:00
|
|
|
class XULDeckAccessible : public AccessibleWrap
|
2010-05-14 02:55:00 -07:00
|
|
|
{
|
|
|
|
public:
|
2012-06-28 16:04:50 -07:00
|
|
|
XULDeckAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
|
|
|
AccessibleWrap(aContent, aDoc)
|
2012-12-17 21:22:26 -08:00
|
|
|
{ mType = eXULDeckType; }
|
2010-05-14 02:55:00 -07:00
|
|
|
|
2012-05-28 18:18:45 -07:00
|
|
|
// Accessible
|
2012-06-10 16:44:50 -07:00
|
|
|
virtual a11y::role NativeRole();
|
2010-05-14 02:55:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-11-11 22:02:42 -08:00
|
|
|
/**
|
|
|
|
* A tabpanel object, child elements of xul:tabpanels element. Note,the object
|
|
|
|
* is created from nsAccessibilityService::GetAccessibleForDeckChildren()
|
|
|
|
* method and we do not use nsIAccessibleProvider interface here because
|
|
|
|
* all children of xul:tabpanels element acts as xul:tabpanel 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
|
2012-06-10 16:44:50 -07:00
|
|
|
virtual a11y::role NativeRole();
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual Relation RelationByType(uint32_t aType);
|
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
|
|
|
|