Bug 853360 - Implement the coneGain part of the AudioPannerNode. r=roc
[gecko.git] / layout / forms / nsIListControlFrame.h
blob654c71eccf0459c062427c6e2b157db4c2cd3402
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/. */
6 #ifndef nsIListControlFrame_h___
7 #define nsIListControlFrame_h___
9 #include "nsQueryFrame.h"
10 #include "nsFont.h"
12 class nsAString;
13 class nsIContent;
15 /**
16 * nsIListControlFrame is the interface for frame-based listboxes.
18 class nsIListControlFrame : public nsQueryFrame
20 public:
21 NS_DECL_QUERYFRAME_TARGET(nsIListControlFrame)
23 /**
24 * Sets the ComboBoxFrame
27 virtual void SetComboboxFrame(nsIFrame* aComboboxFrame) = 0;
29 /**
30 * Get the display string for an item
32 virtual void GetOptionText(int32_t aIndex, nsAString & aStr) = 0;
34 /**
35 * Get the Selected Item's index
38 virtual int32_t GetSelectedIndex() = 0;
40 /**
41 * Return current option. The current option is the option displaying
42 * the focus ring when the listbox is focused.
44 virtual already_AddRefed<nsIContent> GetCurrentOption() = 0;
46 /**
47 * Initiates mouse capture for the listbox
50 virtual void CaptureMouseEvents(bool aGrabMouseEvents) = 0;
52 /**
53 * Returns the height of a single row in the list. This is the
54 * maximum of the heights of all the options/optgroups.
56 virtual nscoord GetHeightOfARow() = 0;
58 /**
59 * Returns the number of options in the listbox
62 virtual uint32_t GetNumberOfOptions() = 0;
64 /**
65 * Called by combobox when it's about to drop down
67 virtual void AboutToDropDown() = 0;
69 /**
70 * Called by combobox when it's about to roll up
72 virtual void AboutToRollup() = 0;
74 /**
75 * Fire on change (used by combobox)
77 virtual void FireOnChange() = 0;
79 /**
80 * Tell the selected list to roll up and ensure that the proper index is
81 * selected, possibly firing onChange if the index has changed
83 * @param aIndex the index to actually select
85 virtual void ComboboxFinish(int32_t aIndex) = 0;
87 /**
88 * Notification that the content has been reset
90 virtual void OnContentReset() = 0;
93 #endif