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"
|
2006-07-12 13:14:53 +00:00
|
|
|
#include "nsHyperTextAccessible.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:
|
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);
|
|
|
|
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
|
|
|
|
NS_IMETHOD DoAction(PRUint8 index);
|
2005-03-14 23:10:53 +00:00
|
|
|
NS_IMETHOD GetState(PRUint32 *aState);
|
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);
|
2003-07-31 08:09:39 +00:00
|
|
|
NS_IMETHOD DoAction(PRUint8 index);
|
|
|
|
NS_IMETHOD GetState(PRUint32 *_retval);
|
2001-04-17 23:06:38 +00:00
|
|
|
};
|
|
|
|
|
2001-11-07 00:12:16 +00:00
|
|
|
class nsHTMLButtonAccessible : public nsFormControlAccessible
|
2001-04-17 23:06:38 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
2001-06-30 00:25:09 +00:00
|
|
|
nsHTMLButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
2003-07-31 08:09:39 +00:00
|
|
|
NS_IMETHOD GetRole(PRUint32 *_retval);
|
|
|
|
NS_IMETHOD GetState(PRUint32 *_retval);
|
|
|
|
NS_IMETHOD GetName(nsAString& _retval);
|
|
|
|
NS_IMETHOD GetNumActions(PRUint8 *_retval);
|
|
|
|
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
|
|
|
|
NS_IMETHOD DoAction(PRUint8 index);
|
2001-05-11 21:11:38 +00:00
|
|
|
};
|
|
|
|
|
2002-03-01 07:27:33 +00:00
|
|
|
class nsHTML4ButtonAccessible : public nsLeafAccessible
|
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:
|
2001-06-30 00:25:09 +00:00
|
|
|
nsHTML4ButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
2003-07-31 08:09:39 +00:00
|
|
|
NS_IMETHOD GetRole(PRUint32 *_retval);
|
|
|
|
NS_IMETHOD GetState(PRUint32 *_retval);
|
2005-08-24 19:17:39 +00:00
|
|
|
NS_IMETHOD GetName(nsAString& aName) { aName.Truncate(); return GetHTMLName(aName, PR_TRUE); }
|
2003-07-31 08:09:39 +00:00
|
|
|
NS_IMETHOD GetNumActions(PRUint8 *_retval);
|
|
|
|
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
|
|
|
|
NS_IMETHOD DoAction(PRUint8 index);
|
2001-05-11 21:11:38 +00:00
|
|
|
};
|
|
|
|
|
2006-07-12 13:14:53 +00:00
|
|
|
class nsHTMLTextFieldAccessible : public nsHyperTextAccessible
|
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:
|
2002-06-12 05:27:37 +00:00
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
2001-06-30 00:25:09 +00:00
|
|
|
nsHTMLTextFieldAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
2003-03-25 09:12:39 +00:00
|
|
|
|
2006-07-12 13:14:53 +00:00
|
|
|
NS_IMETHOD Init();
|
|
|
|
NS_IMETHOD Shutdown();
|
2003-07-31 08:09:39 +00:00
|
|
|
NS_IMETHOD GetRole(PRUint32 *_retval);
|
|
|
|
NS_IMETHOD GetValue(nsAString& _retval);
|
|
|
|
NS_IMETHOD GetState(PRUint32 *_retval);
|
2004-06-01 05:25:00 +00:00
|
|
|
NS_IMETHOD GetNumActions(PRUint8 *_retval);
|
|
|
|
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
|
|
|
|
NS_IMETHOD DoAction(PRUint8 index);
|
2005-03-14 23:10:53 +00:00
|
|
|
NS_IMETHOD GetExtState(PRUint32 *aExtState);
|
2006-07-12 13:14:53 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
// Editor helpers, subclasses of nsHyperTextAccessible may have editor
|
|
|
|
virtual void SetEditor(nsIEditor *aEditor);
|
|
|
|
virtual already_AddRefed<nsIEditor> GetEditor() { nsIEditor *editor = mEditor; NS_IF_ADDREF(editor); return editor; }
|
|
|
|
void CheckForEditor();
|
|
|
|
nsCOMPtr<nsIEditor> mEditor;
|
2001-04-17 23:06:38 +00:00
|
|
|
};
|
|
|
|
|
2003-04-01 20:02:51 +00:00
|
|
|
class nsHTMLGroupboxAccessible : public nsAccessibleWrap
|
2002-02-16 01:34:42 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsHTMLGroupboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
2003-07-31 08:09:39 +00:00
|
|
|
NS_IMETHOD GetRole(PRUint32 *_retval);
|
2006-06-16 17:13:37 +00:00
|
|
|
NS_IMETHOD GetState(PRUint32 *_retval);
|
2003-07-31 08:09:39 +00:00
|
|
|
NS_IMETHOD GetName(nsAString& _retval);
|
2006-07-26 19:38:25 +00:00
|
|
|
void CacheChildren();
|
2002-02-16 01:34:42 +00:00
|
|
|
};
|
|
|
|
|
2001-04-17 23:06:38 +00:00
|
|
|
#endif
|