1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/xul/tree/nsTreeUtils.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,39 @@ 1.4 +/* -*- Mode: C++; tab-width: 3; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.5 + * This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef nsTreeUtils_h__ 1.10 +#define nsTreeUtils_h__ 1.11 + 1.12 +#include "nsError.h" 1.13 +#include "nsString.h" 1.14 +#include "nsTreeStyleCache.h" 1.15 + 1.16 +class nsIAtom; 1.17 +class nsIContent; 1.18 + 1.19 +class nsTreeUtils 1.20 +{ 1.21 + public: 1.22 + /** 1.23 + * Parse a whitespace separated list of properties into an array 1.24 + * of atoms. 1.25 + */ 1.26 + static nsresult 1.27 + TokenizeProperties(const nsAString& aProperties, AtomArray & aPropertiesArray); 1.28 + 1.29 + static nsIContent* 1.30 + GetImmediateChild(nsIContent* aContainer, nsIAtom* aTag); 1.31 + 1.32 + static nsIContent* 1.33 + GetDescendantChild(nsIContent* aContainer, nsIAtom* aTag); 1.34 + 1.35 + static nsresult 1.36 + UpdateSortIndicators(nsIContent* aColumn, const nsAString& aDirection); 1.37 + 1.38 + static nsresult 1.39 + GetColumnIndex(nsIContent* aColumn, int32_t* aResult); 1.40 +}; 1.41 + 1.42 +#endif // nsTreeUtils_h__