Bumping gaia.json for 2 gaia revision(s) a=gaia-bump
[gecko.git] / layout / xul / ListBoxObject.h
blobe250e251693f25fd095e7484773a533061d788ec
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
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_dom_ListBoxObject_h
8 #define mozilla_dom_ListBoxObject_h
10 #include "mozilla/dom/BoxObject.h"
11 #include "nsPIListBoxObject.h"
13 namespace mozilla {
14 namespace dom {
16 class ListBoxObject MOZ_FINAL : public BoxObject,
17 public nsPIListBoxObject
19 public:
20 NS_DECL_ISUPPORTS_INHERITED
21 NS_DECL_NSILISTBOXOBJECT
23 ListBoxObject();
25 virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
27 // nsPIListBoxObject
28 virtual nsListBoxBodyFrame* GetListBoxBody(bool aFlush) MOZ_OVERRIDE;
30 // nsPIBoxObject
31 virtual void Clear() MOZ_OVERRIDE;
32 virtual void ClearCachedValues() MOZ_OVERRIDE;
34 // ListBoxObject.webidl
35 int32_t GetRowCount();
36 int32_t GetNumberOfVisibleRows();
37 int32_t GetIndexOfFirstVisibleRow();
38 void EnsureIndexIsVisible(int32_t rowIndex);
39 void ScrollToIndex(int32_t rowIndex);
40 void ScrollByLines(int32_t numLines);
41 already_AddRefed<Element> GetItemAtIndex(int32_t index);
42 int32_t GetIndexOfItem(Element& item);
44 protected:
45 nsListBoxBodyFrame *mListBoxBody;
47 private:
48 ~ListBoxObject();
51 } // namespace dom
52 } // namespace mozilla
54 #endif // mozilla_dom_ListBoxObject_h