accessible/src/xul/XULColorPickerAccessible.h
author Mike Hommey <mh+mozilla@glandium.org>
Sat, 04 Aug 2012 20:26:44 +0200
changeset 104557 162130598df094e19b044610902abecd403278d3
parent 99070 75b67011b798fb0ab754da5ced223dd0d0eb996a
child 106112 a16372ce30b5f6b747246b01fcd215a4bf3b6342
child 109891 3f2823d467bfae54c95cc2242194ab2357e6934f
permissions -rw-r--r--
Bug 774032 bonus - Use @DEPTH@ and @relativesrcdir@ in Makefile.in. r=ted

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/. */

#ifndef mozilla_a11y_XULColorPickerAccessible_h__
#define mozilla_a11y_XULColorPickerAccessible_h__

#include "AccessibleWrap.h"

namespace mozilla {
namespace a11y {

/**
 * Used for color button in colorpicker palette.
 */
class XULColorPickerTileAccessible : public AccessibleWrap
{
public:
  XULColorPickerTileAccessible(nsIContent* aContent,
                               DocAccessible* aDoc);

  // Accessible
  virtual void Value(nsString& aValue);
  virtual a11y::role NativeRole();
  virtual PRUint64 NativeState();
  virtual PRUint64 NativeInteractiveState() const;

  // Widgets
  virtual Accessible* ContainerWidget() const;
};


/**
 * Used for colorpicker button (xul:colorpicker@type="button").
 */
class XULColorPickerAccessible : public XULColorPickerTileAccessible
{
public:
  XULColorPickerAccessible(nsIContent* aContent, DocAccessible* aDoc);

  // Accessible
  virtual a11y::role NativeRole();
  virtual PRUint64 NativeState();

  // Widgets
  virtual bool IsWidget() const;
  virtual bool IsActiveWidget() const;
  virtual bool AreItemsOperable() const;

protected:

  // Accessible
  virtual void CacheChildren();
};

} // namespace a11y
} // namespace mozilla

#endif