LCOV - code coverage report
Current view: top level - accessible/xul - XULSliderAccessible.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 2 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 4 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
       2             : /* This Source Code Form is subject to the terms of the Mozilla Public
       3             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       4             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
       5             : 
       6             : #ifndef mozilla_a11y_XULSliderAccessible_h__
       7             : #define mozilla_a11y_XULSliderAccessible_h__
       8             : 
       9             : #include "AccessibleWrap.h"
      10             : 
      11             : #include "nsIDOMElement.h"
      12             : 
      13             : namespace mozilla {
      14             : namespace a11y {
      15             : 
      16             : /**
      17             :  * Used for XUL slider and scale elements.
      18             :  */
      19           0 : class XULSliderAccessible : public AccessibleWrap
      20             : {
      21             : public:
      22             :   XULSliderAccessible(nsIContent* aContent, DocAccessible* aDoc);
      23             : 
      24             :   // Accessible
      25             :   virtual void Value(nsString& aValue) override;
      26             :   virtual a11y::role NativeRole() override;
      27             :   virtual uint64_t NativeInteractiveState() const override;
      28             :   virtual bool NativelyUnavailable() const override;
      29             : 
      30             :   // Value
      31             :   virtual double MaxValue() const override;
      32             :   virtual double MinValue() const override;
      33             :   virtual double CurValue() const override;
      34             :   virtual double Step() const override;
      35             :   virtual bool SetCurValue(double aValue) override;
      36             : 
      37             :   // ActionAccessible
      38             :   virtual uint8_t ActionCount() override;
      39             :   virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
      40             :   virtual bool DoAction(uint8_t aIndex) override;
      41             : 
      42             : protected:
      43             :   /**
      44             :    * Return anonymous slider element.
      45             :    */
      46             :   nsIContent* GetSliderElement() const;
      47             : 
      48             :   nsresult GetSliderAttr(nsIAtom *aName, nsAString& aValue) const;
      49             :   nsresult SetSliderAttr(nsIAtom *aName, const nsAString& aValue);
      50             : 
      51             :   double GetSliderAttr(nsIAtom *aName) const;
      52             :   bool SetSliderAttr(nsIAtom *aName, double aValue);
      53             : 
      54             : private:
      55             :   mutable nsCOMPtr<nsIContent> mSliderNode;
      56             : };
      57             : 
      58             : 
      59             : /**
      60             :  * Used for slider's thumb element.
      61             :  */
      62           0 : class XULThumbAccessible : public AccessibleWrap
      63             : {
      64             : public:
      65             :   XULThumbAccessible(nsIContent* aContent, DocAccessible* aDoc);
      66             : 
      67             :   // Accessible
      68             :   virtual a11y::role NativeRole() override;
      69             : };
      70             : 
      71             : } // namespace a11y
      72             : } // namespace mozilla
      73             : 
      74             : #endif
      75             : 

Generated by: LCOV version 1.13