1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 This sort service is used to sort content by attribute.
10 #ifndef nsXULSortService_h
11 #define nsXULSortService_h
13 #include "nsAString.h"
23 * Sort the contents of the widget containing <code>aNode</code>
24 * using <code>aSortKey</code> as the comparison key, and
25 * <code>aSortDirection</code> as the direction.
27 * @param aNode A node in the XUL widget whose children are to be sorted.
28 * @param aSortKey The value to be used as the comparison key.
29 * @param aSortHints One or more hints as to how to sort:
31 * ascending: to sort the contents in ascending order
32 * descending: to sort the contents in descending order
33 * comparecase: perform case sensitive comparisons
34 * integer: treat values as integers, non-integers are compared as strings
35 * twostate: don't allow the natural (unordered state)
37 nsresult
XULWidgetSort(dom::Element
* aNode
, const nsAString
& aSortKey
,
38 const nsAString
& aSortHints
);
40 } // namespace mozilla
42 #endif // nsXULSortService_h