accessible/src/xul/XULSelectControlAccessible.h

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* vim: set ts=2 et sw=2 tw=80: */
     3 /* This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #ifndef mozilla_a11y_XULSelectControlAccessible_h__
     8 #define mozilla_a11y_XULSelectControlAccessible_h__
    10 #include "AccessibleWrap.h"
    11 #include "nsIDOMXULSelectCntrlEl.h"
    13 namespace mozilla {
    14 namespace a11y {
    16 /**
    17  * The basic implementation of accessible selection for XUL select controls.
    18  */
    19 class XULSelectControlAccessible : public AccessibleWrap
    20 {
    21 public:
    22   XULSelectControlAccessible(nsIContent* aContent, DocAccessible* aDoc);
    23   virtual ~XULSelectControlAccessible() {}
    25   // Accessible
    26   virtual void Shutdown();
    28   // SelectAccessible
    29   virtual already_AddRefed<nsIArray> SelectedItems();
    30   virtual uint32_t SelectedItemCount();
    31   virtual Accessible* GetSelectedItem(uint32_t aIndex);
    32   virtual bool IsItemSelected(uint32_t aIndex);
    33   virtual bool AddItemToSelection(uint32_t aIndex);
    34   virtual bool RemoveItemFromSelection(uint32_t aIndex);
    35   virtual bool SelectAll();
    36   virtual bool UnselectAll();
    38   // Widgets
    39   virtual Accessible* CurrentItem();
    40   virtual void SetCurrentItem(Accessible* aItem);
    42 protected:
    43   // nsIDOMXULMultiSelectControlElement inherits from this, so we'll always have
    44   // one of these if the widget is valid and not defunct
    45   nsCOMPtr<nsIDOMXULSelectControlElement> mSelectControl;
    46 };
    48 } // namespace a11y
    49 } // namespace mozilla
    51 #endif

mercurial