2001-09-25 00:48:50 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
2004-04-17 21:52:36 +00:00
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
2001-04-17 23:06:38 +00:00
|
|
|
*
|
2004-04-17 21:52:36 +00:00
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
2001-04-17 23:06:38 +00:00
|
|
|
*
|
2001-09-25 00:48:50 +00:00
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
2001-04-17 23:06:38 +00:00
|
|
|
*
|
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2004-04-17 21:52:36 +00:00
|
|
|
* The Initial Developer of the Original Code is
|
2001-09-25 00:48:50 +00:00
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
2001-04-17 23:06:38 +00:00
|
|
|
*
|
2001-09-25 00:48:50 +00:00
|
|
|
* Contributor(s):
|
2004-04-17 21:52:36 +00:00
|
|
|
* Author: Eric D Vaughan (evaughan@netscape.com)
|
2001-09-25 00:48:50 +00:00
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
2004-04-17 21:52:36 +00:00
|
|
|
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
|
|
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
2001-09-25 00:48:50 +00:00
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
2004-04-17 21:52:36 +00:00
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
2001-09-25 00:48:50 +00:00
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
2004-04-17 21:52:36 +00:00
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
2001-09-25 00:48:50 +00:00
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
2001-04-17 23:06:38 +00:00
|
|
|
|
|
|
|
#ifndef _nsHTMLFormControlAccessible_H_
|
|
|
|
#define _nsHTMLFormControlAccessible_H_
|
|
|
|
|
2001-11-07 00:12:16 +00:00
|
|
|
#include "nsFormControlAccessible.h"
|
2007-05-01 17:08:26 +00:00
|
|
|
#include "nsHyperTextAccessibleWrap.h"
|
2001-04-17 23:06:38 +00:00
|
|
|
|
2001-11-07 00:12:16 +00:00
|
|
|
class nsHTMLCheckboxAccessible : public nsFormControlAccessible
|
2001-04-17 23:06:38 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
2006-10-02 19:33:49 +00:00
|
|
|
enum { eAction_Click = 0 };
|
|
|
|
|
2001-06-30 00:25:09 +00:00
|
|
|
nsHTMLCheckboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
2003-07-31 08:09:39 +00:00
|
|
|
NS_IMETHOD GetRole(PRUint32 *_retval);
|
|
|
|
NS_IMETHOD GetNumActions(PRUint8 *_retval);
|
2007-02-25 03:43:20 +00:00
|
|
|
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
|
2003-07-31 08:09:39 +00:00
|
|
|
NS_IMETHOD DoAction(PRUint8 index);
|
2007-04-02 15:56:24 +00:00
|
|
|
NS_IMETHOD GetState(PRUint32 *aState, PRUint32 *aExtraState);
|
2001-04-17 23:06:38 +00:00
|
|
|
};
|
|
|
|
|
2001-11-07 00:12:16 +00:00
|
|
|
class nsHTMLRadioButtonAccessible : public nsRadioButtonAccessible
|
2001-04-17 23:06:38 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
2001-06-30 00:25:09 +00:00
|
|
|
nsHTMLRadioButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
2007-03-27 12:17:11 +00:00
|
|
|
|
2007-04-02 15:56:24 +00:00
|
|
|
NS_IMETHOD GetState(PRUint32 *aState, PRUint32 *aExtraState);
|
2007-04-07 09:07:24 +00:00
|
|
|
virtual nsresult GetAttributesInternal(nsIPersistentProperties *aAttributes);
|
2001-04-17 23:06:38 +00:00
|
|
|
};
|
|
|
|
|
2007-05-01 17:08:26 +00:00
|
|
|
class nsHTMLButtonAccessible : public nsHyperTextAccessibleWrap
|
2001-04-17 23:06:38 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
2006-10-02 19:33:49 +00:00
|
|
|
enum { eAction_Click = 0 };
|
|
|
|
|
2001-06-30 00:25:09 +00:00
|
|
|
nsHTMLButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
2008-10-10 12:26:55 +00:00
|
|
|
|
|
|
|
// nsIAccessible
|
2003-07-31 08:09:39 +00:00
|
|
|
NS_IMETHOD GetRole(PRUint32 *_retval);
|
2007-04-02 15:56:24 +00:00
|
|
|
NS_IMETHOD GetState(PRUint32 *aState, PRUint32 *aExtraState);
|
2003-07-31 08:09:39 +00:00
|
|
|
NS_IMETHOD GetNumActions(PRUint8 *_retval);
|
2007-02-25 03:43:20 +00:00
|
|
|
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
|
2003-07-31 08:09:39 +00:00
|
|
|
NS_IMETHOD DoAction(PRUint8 index);
|
2008-10-10 12:26:55 +00:00
|
|
|
|
|
|
|
// nsAccessible
|
|
|
|
virtual nsresult GetNameInternal(nsAString& aName);
|
2001-05-11 21:11:38 +00:00
|
|
|
};
|
|
|
|
|
2007-05-01 17:08:26 +00:00
|
|
|
class nsHTML4ButtonAccessible : public nsHyperTextAccessibleWrap
|
2001-05-11 21:11:38 +00:00
|
|
|
{
|
2001-04-17 23:06:38 +00:00
|
|
|
|
2001-05-11 21:11:38 +00:00
|
|
|
public:
|
2006-07-31 04:31:13 +00:00
|
|
|
enum { eAction_Click = 0 };
|
|
|
|
|
2001-06-30 00:25:09 +00:00
|
|
|
nsHTML4ButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
2008-10-10 12:26:55 +00:00
|
|
|
|
|
|
|
// nsIAccessible
|
2003-07-31 08:09:39 +00:00
|
|
|
NS_IMETHOD GetRole(PRUint32 *_retval);
|
2007-04-02 15:56:24 +00:00
|
|
|
NS_IMETHOD GetState(PRUint32 *aState, PRUint32 *aExtraState);
|
2003-07-31 08:09:39 +00:00
|
|
|
NS_IMETHOD GetNumActions(PRUint8 *_retval);
|
2007-02-25 03:43:20 +00:00
|
|
|
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
|
2003-07-31 08:09:39 +00:00
|
|
|
NS_IMETHOD DoAction(PRUint8 index);
|
2008-10-10 12:26:55 +00:00
|
|
|
|
|
|
|
// nsAccessible
|
|
|
|
virtual nsresult GetNameInternal(nsAString& aName)
|
|
|
|
{
|
|
|
|
return GetHTMLName(aName, PR_TRUE);
|
|
|
|
}
|
2001-05-11 21:11:38 +00:00
|
|
|
};
|
|
|
|
|
2007-05-01 17:08:26 +00:00
|
|
|
class nsHTMLTextFieldAccessible : public nsHyperTextAccessibleWrap
|
2001-05-11 21:11:38 +00:00
|
|
|
{
|
2003-04-15 08:45:55 +00:00
|
|
|
|
2001-05-11 21:11:38 +00:00
|
|
|
public:
|
2006-07-31 04:31:13 +00:00
|
|
|
enum { eAction_Click = 0 };
|
|
|
|
|
2001-06-30 00:25:09 +00:00
|
|
|
nsHTMLTextFieldAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
2003-03-25 09:12:39 +00:00
|
|
|
|
2007-11-09 19:27:07 +00:00
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
2008-10-10 12:26:55 +00:00
|
|
|
// nsIAccessible
|
2003-07-31 08:09:39 +00:00
|
|
|
NS_IMETHOD GetRole(PRUint32 *_retval);
|
2007-06-15 01:50:37 +00:00
|
|
|
NS_IMETHOD GetName(nsAString& aName);
|
2003-07-31 08:09:39 +00:00
|
|
|
NS_IMETHOD GetValue(nsAString& _retval);
|
2007-04-02 15:56:24 +00:00
|
|
|
NS_IMETHOD GetState(PRUint32 *aState, PRUint32 *aExtraState);
|
2004-06-01 05:25:00 +00:00
|
|
|
NS_IMETHOD GetNumActions(PRUint8 *_retval);
|
2007-02-25 03:43:20 +00:00
|
|
|
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
|
2004-06-01 05:25:00 +00:00
|
|
|
NS_IMETHOD DoAction(PRUint8 index);
|
2006-07-12 13:14:53 +00:00
|
|
|
|
2007-08-14 16:25:24 +00:00
|
|
|
// nsIAccessibleEditableText
|
|
|
|
NS_IMETHOD GetAssociatedEditor(nsIEditor **aEditor);
|
2001-04-17 23:06:38 +00:00
|
|
|
};
|
|
|
|
|
2007-06-30 20:06:13 +00:00
|
|
|
class nsHTMLGroupboxAccessible : public nsHyperTextAccessibleWrap
|
2002-02-16 01:34:42 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsHTMLGroupboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
2008-10-10 12:26:55 +00:00
|
|
|
|
|
|
|
// nsIAccessible
|
2007-06-30 20:06:13 +00:00
|
|
|
NS_IMETHOD GetRole(PRUint32 *aRole);
|
|
|
|
NS_IMETHOD GetAccessibleRelated(PRUint32 aRelationType, nsIAccessible **aRelated);
|
2008-10-10 12:26:55 +00:00
|
|
|
|
|
|
|
// nsAccessible
|
|
|
|
virtual nsresult GetNameInternal(nsAString& aName);
|
|
|
|
|
2007-06-30 20:06:13 +00:00
|
|
|
protected:
|
|
|
|
nsIContent* GetLegend();
|
|
|
|
};
|
|
|
|
|
|
|
|
class nsHTMLLegendAccessible : public nsHyperTextAccessibleWrap
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsHTMLLegendAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
|
|
|
NS_IMETHOD GetAccessibleRelated(PRUint32 aRelationType, nsIAccessible **aRelated);
|
|
|
|
NS_IMETHOD GetRole(PRUint32 *aRole) { *aRole = nsIAccessibleRole::ROLE_LABEL; return NS_OK; }
|
2002-02-16 01:34:42 +00:00
|
|
|
};
|
|
|
|
|
2001-04-17 23:06:38 +00:00
|
|
|
#endif
|