2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 3; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
2012-05-21 04:12:37 -07:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef nsTreeUtils_h__
|
|
|
|
#define nsTreeUtils_h__
|
|
|
|
|
|
|
|
#include "nsString.h"
|
2013-03-19 08:46:20 -07:00
|
|
|
#include "nsTreeStyleCache.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsIContent.h"
|
|
|
|
|
|
|
|
class nsTreeUtils
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* Parse a whitespace separated list of properties into an array
|
|
|
|
* of atoms.
|
|
|
|
*/
|
|
|
|
static nsresult
|
2013-03-19 08:46:20 -07:00
|
|
|
TokenizeProperties(const nsAString& aProperties, AtomArray & aPropertiesArray);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2009-02-19 08:55:07 -08:00
|
|
|
static nsIContent*
|
|
|
|
GetImmediateChild(nsIContent* aContainer, nsIAtom* aTag);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2009-02-19 08:55:07 -08:00
|
|
|
static nsIContent*
|
|
|
|
GetDescendantChild(nsIContent* aContainer, nsIAtom* aTag);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
static nsresult
|
|
|
|
UpdateSortIndicators(nsIContent* aColumn, const nsAString& aDirection);
|
|
|
|
|
|
|
|
static nsresult
|
2012-08-22 08:56:38 -07:00
|
|
|
GetColumnIndex(nsIContent* aColumn, int32_t* aResult);
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsTreeUtils_h__
|