2000-12-31 16:12:15 -08:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=2 et sw=2 tw=80: */
|
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/. */
|
2000-12-31 16:12:15 -08:00
|
|
|
|
|
|
|
#ifndef _XULSelectControlAccessible_H_
|
|
|
|
#define _XULSelectControlAccessible_H_
|
|
|
|
|
|
|
|
#include "nsAccessibleWrap.h"
|
|
|
|
#include "nsIDOMXULSelectCntrlEl.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The basic implementation of accessible selection for XUL select controls.
|
|
|
|
*/
|
|
|
|
class XULSelectControlAccessible : public nsAccessibleWrap
|
|
|
|
{
|
|
|
|
public:
|
2012-02-07 14:38:54 -08:00
|
|
|
XULSelectControlAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
2000-12-31 16:12:15 -08:00
|
|
|
virtual ~XULSelectControlAccessible() {}
|
|
|
|
|
|
|
|
// nsAccessNode
|
|
|
|
virtual void Shutdown();
|
|
|
|
|
|
|
|
// SelectAccessible
|
|
|
|
virtual bool IsSelect();
|
|
|
|
virtual already_AddRefed<nsIArray> SelectedItems();
|
|
|
|
virtual PRUint32 SelectedItemCount();
|
|
|
|
virtual nsAccessible* GetSelectedItem(PRUint32 aIndex);
|
|
|
|
virtual bool IsItemSelected(PRUint32 aIndex);
|
|
|
|
virtual bool AddItemToSelection(PRUint32 aIndex);
|
|
|
|
virtual bool RemoveItemFromSelection(PRUint32 aIndex);
|
|
|
|
virtual bool SelectAll();
|
|
|
|
virtual bool UnselectAll();
|
|
|
|
|
|
|
|
// Widgets
|
|
|
|
virtual nsAccessible* CurrentItem();
|
|
|
|
virtual void SetCurrentItem(nsAccessible* aItem);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// nsIDOMXULMultiSelectControlElement inherits from this, so we'll always have
|
|
|
|
// one of these if the widget is valid and not defunct
|
|
|
|
nsCOMPtr<nsIDOMXULSelectControlElement> mSelectControl;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|