1 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* ***** BEGIN LICENSE BLOCK *****
3 : * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 : *
5 : * The contents of this file are subject to the Mozilla Public License Version
6 : * 1.1 (the "License"); you may not use this file except in compliance with
7 : * the License. You may obtain a copy of the License at
8 : * http://www.mozilla.org/MPL/
9 : *
10 : * Software distributed under the License is distributed on an "AS IS" basis,
11 : * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 : * for the specific language governing rights and limitations under the
13 : * License.
14 : *
15 : * The Original Code is mozilla.org code.
16 : *
17 : * The Initial Developer of the Original Code is
18 : * Mozilla Foundation.
19 : * Portions created by the Initial Developer are Copyright (C) 2006
20 : * the Initial Developer. All Rights Reserved.
21 : *
22 : * Contributor(s):
23 : * Alexander Surkov <surkov.alexander@gmail.com> (original author)
24 : *
25 : * Alternatively, the contents of this file may be used under the terms of
26 : * either of the GNU General Public License Version 2 or later (the "GPL"),
27 : * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 : * in which case the provisions of the GPL or the LGPL are applicable instead
29 : * of those above. If you wish to allow use of your version of this file only
30 : * under the terms of either the GPL or the LGPL, and not to allow others to
31 : * use your version of this file under the terms of the MPL, indicate your
32 : * decision by deleting the provisions above and replace them with the notice
33 : * and other provisions required by the GPL or the LGPL. If you do not delete
34 : * the provisions above, a recipient may use your version of this file under
35 : * the terms of any one of the MPL, the GPL or the LGPL.
36 : *
37 : * ***** END LICENSE BLOCK ***** */
38 :
39 : #ifndef _nsXFormsWidgetsAccessible_H_
40 : #define _nsXFormsWidgetsAccessible_H_
41 :
42 : #include "nsXFormsAccessible.h"
43 : #include "nsBaseWidgetAccessible.h"
44 :
45 : /**
46 : * Accessible object for dropmarker widget that is used inside xforms elements
47 : * of combobox representation. For example, these are xforms:select1,
48 : * xforms:input[type="xsd:date"].
49 : */
50 : class nsXFormsDropmarkerWidgetAccessible : public nsLeafAccessible,
51 : public nsXFormsAccessibleBase
52 0 : {
53 : public:
54 : nsXFormsDropmarkerWidgetAccessible(nsIContent* aContent,
55 : nsDocAccessible* aDoc);
56 :
57 : // nsIAccessible
58 : NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
59 : NS_IMETHOD DoAction(PRUint8 aIndex);
60 :
61 : // nsAccessible
62 : virtual mozilla::a11y::role NativeRole();
63 : virtual PRUint64 NativeState();
64 :
65 : // ActionAccessible
66 : virtual PRUint8 ActionCount();
67 : };
68 :
69 :
70 : /**
71 : * Accessible object for calendar widget. It is used by xforms:input[xsd:date].
72 : */
73 : class nsXFormsCalendarWidgetAccessible : public nsAccessibleWrap
74 0 : {
75 : public:
76 : nsXFormsCalendarWidgetAccessible(nsIContent* aContent,
77 : nsDocAccessible* aDoc);
78 :
79 : // nsAccessible
80 : virtual mozilla::a11y::role NativeRole();
81 : };
82 :
83 :
84 : /**
85 : * Accessible object for popup menu of minimal xforms select1 element that is
86 : * represented by combobox.
87 : */
88 : class nsXFormsComboboxPopupWidgetAccessible : public nsXFormsAccessible
89 0 : {
90 : public:
91 : nsXFormsComboboxPopupWidgetAccessible(nsIContent* aContent,
92 : nsDocAccessible* aDoc);
93 :
94 : // nsIAccessible
95 : NS_IMETHOD GetValue(nsAString& aValue);
96 :
97 : // nsAccessible
98 : virtual void Description(nsString& aDescription);
99 : virtual nsresult GetNameInternal(nsAString& aName);
100 : virtual mozilla::a11y::role NativeRole();
101 : virtual PRUint64 NativeState();
102 :
103 : protected:
104 : // nsAccessible
105 : virtual void CacheChildren();
106 : };
107 :
108 : #endif
|