layout/forms/nsGfxCheckboxControlFrame.h
author Jim Mathies <jmathies@mozilla.com>
Tue, 30 Oct 2012 06:23:51 -0500
changeset 113771 7d89cb78c6df02fb238db0ff9e0566c405ff56bb
parent 110709 2307541f08fb750abca9db1662a0d7d9776dbb3d
child 114922 8e24562328a9c6286f8fbc2c5c5c4c8c2220df04
permissions -rw-r--r--
Bug 798821 - On Windows, restrict enabling of W3C touch interfaces to devices that support touch input. Also convert touch pref to 3-state value. r=bsmedberg, a=bajaj

/* -*- 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 nsGfxCheckboxControlFrame_h___
#define nsGfxCheckboxControlFrame_h___

#include "mozilla/Attributes.h"
#include "nsFormControlFrame.h"

#ifdef ACCESSIBILITY
class nsIAccessible;
#endif

class nsGfxCheckboxControlFrame : public nsFormControlFrame
{
public:
  NS_DECL_FRAMEARENA_HELPERS

  nsGfxCheckboxControlFrame(nsStyleContext* aContext);
  virtual ~nsGfxCheckboxControlFrame();

#ifdef DEBUG
  NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE {
    return MakeFrameName(NS_LITERAL_STRING("CheckboxControl"), aResult);
  }
#endif

  NS_IMETHOD BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                              const nsRect&           aDirtyRect,
                              const nsDisplayListSet& aLists) MOZ_OVERRIDE;

#ifdef ACCESSIBILITY
  virtual already_AddRefed<Accessible> CreateAccessible() MOZ_OVERRIDE;
#endif

protected:

  bool IsChecked();
  bool IsIndeterminate();
};

#endif