|
1 /* -*- Mode: C++; tab-width: 3; 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/. */ |
|
5 |
|
6 #ifndef nsTreeUtils_h__ |
|
7 #define nsTreeUtils_h__ |
|
8 |
|
9 #include "nsError.h" |
|
10 #include "nsString.h" |
|
11 #include "nsTreeStyleCache.h" |
|
12 |
|
13 class nsIAtom; |
|
14 class nsIContent; |
|
15 |
|
16 class nsTreeUtils |
|
17 { |
|
18 public: |
|
19 /** |
|
20 * Parse a whitespace separated list of properties into an array |
|
21 * of atoms. |
|
22 */ |
|
23 static nsresult |
|
24 TokenizeProperties(const nsAString& aProperties, AtomArray & aPropertiesArray); |
|
25 |
|
26 static nsIContent* |
|
27 GetImmediateChild(nsIContent* aContainer, nsIAtom* aTag); |
|
28 |
|
29 static nsIContent* |
|
30 GetDescendantChild(nsIContent* aContainer, nsIAtom* aTag); |
|
31 |
|
32 static nsresult |
|
33 UpdateSortIndicators(nsIContent* aColumn, const nsAString& aDirection); |
|
34 |
|
35 static nsresult |
|
36 GetColumnIndex(nsIContent* aColumn, int32_t* aResult); |
|
37 }; |
|
38 |
|
39 #endif // nsTreeUtils_h__ |