michael@0: /* -*- Mode: C++; tab-width: 3; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef nsTreeUtils_h__ michael@0: #define nsTreeUtils_h__ michael@0: michael@0: #include "nsError.h" michael@0: #include "nsString.h" michael@0: #include "nsTreeStyleCache.h" michael@0: michael@0: class nsIAtom; michael@0: class nsIContent; michael@0: michael@0: class nsTreeUtils michael@0: { michael@0: public: michael@0: /** michael@0: * Parse a whitespace separated list of properties into an array michael@0: * of atoms. michael@0: */ michael@0: static nsresult michael@0: TokenizeProperties(const nsAString& aProperties, AtomArray & aPropertiesArray); michael@0: michael@0: static nsIContent* michael@0: GetImmediateChild(nsIContent* aContainer, nsIAtom* aTag); michael@0: michael@0: static nsIContent* michael@0: GetDescendantChild(nsIContent* aContainer, nsIAtom* aTag); michael@0: michael@0: static nsresult michael@0: UpdateSortIndicators(nsIContent* aColumn, const nsAString& aDirection); michael@0: michael@0: static nsresult michael@0: GetColumnIndex(nsIContent* aColumn, int32_t* aResult); michael@0: }; michael@0: michael@0: #endif // nsTreeUtils_h__