Import from 1.9a8 tarball
[mozilla-extra.git] / extensions / xforms / nsIXFormsItemElement.idl
blobef8d9a3dbe4f1fc4fb4a4e18c964b61cd9a575d4
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
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/
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.
15 * The Original Code is Mozilla XForms support.
17 * The Initial Developer of the Original Code is
18 * Olli Pettay.
19 * Portions created by the Initial Developer are Copyright (C) 2005
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
23 * Olli Pettay <Olli.Pettay@helsinki.fi> (original author)
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.
37 * ***** END LICENSE BLOCK ***** */
39 #include "nsISupports.idl"
40 #include "nsIDOMNode.idl"
41 #include "nsIXFormsDelegate.idl"
43 /**
44 * Interface implemented by the item element.
46 [scriptable, uuid(0acdfa92-0b0a-4c7a-bcd8-7256ec04673c)]
47 interface nsIXFormsItemElement : nsISupports
49 /**
50 * The text value of the \<label\> child element of the item.
52 readonly attribute AString labelText;
54 /**
55 * The value of the item element.
57 readonly attribute AString value;
59 /**
60 * Marks item active. In current implementation '_moz_active' attribute is
61 * set to the element if aActive is true. The attribute can be used when
62 * styling the element.
64 void setActive(in boolean aActive);
66 /**
67 * Indicates whether the item element contains a value child or a copy
68 * child. We'll assume that if the item is NOT a copy item, then it must
69 * be a value item. Which means that it must contain a XForms value element
70 * child.
72 attribute boolean isCopyItem;
75 * returns the node that the contained copy element is bound to
77 readonly attribute nsIDOMNode copyNode;
79 /**
80 * Compare given DOM node and copy node (i.e. node that the contained copy
81 * element is bound to.
83 * @param nsIDOMNode aNode - given DOM node to compare with copy node
85 * @return boolean - return true if given node equals in copy node
87 boolean copyNodeEquals(in nsIDOMNode aNode);