Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #ifndef nsIListControlFrame_h___ |
michael@0 | 7 | #define nsIListControlFrame_h___ |
michael@0 | 8 | |
michael@0 | 9 | #include "nsQueryFrame.h" |
michael@0 | 10 | |
michael@0 | 11 | class nsAString; |
michael@0 | 12 | |
michael@0 | 13 | namespace mozilla { |
michael@0 | 14 | namespace dom { |
michael@0 | 15 | class HTMLOptionElement; |
michael@0 | 16 | } // namespace dom |
michael@0 | 17 | } // namespace mozilla |
michael@0 | 18 | |
michael@0 | 19 | /** |
michael@0 | 20 | * nsIListControlFrame is the interface for frame-based listboxes. |
michael@0 | 21 | */ |
michael@0 | 22 | class nsIListControlFrame : public nsQueryFrame |
michael@0 | 23 | { |
michael@0 | 24 | public: |
michael@0 | 25 | NS_DECL_QUERYFRAME_TARGET(nsIListControlFrame) |
michael@0 | 26 | |
michael@0 | 27 | /** |
michael@0 | 28 | * Sets the ComboBoxFrame |
michael@0 | 29 | * |
michael@0 | 30 | */ |
michael@0 | 31 | virtual void SetComboboxFrame(nsIFrame* aComboboxFrame) = 0; |
michael@0 | 32 | |
michael@0 | 33 | /** |
michael@0 | 34 | * Get the display string for an item |
michael@0 | 35 | */ |
michael@0 | 36 | virtual void GetOptionText(uint32_t aIndex, nsAString& aStr) = 0; |
michael@0 | 37 | |
michael@0 | 38 | /** |
michael@0 | 39 | * Get the Selected Item's index |
michael@0 | 40 | * |
michael@0 | 41 | */ |
michael@0 | 42 | virtual int32_t GetSelectedIndex() = 0; |
michael@0 | 43 | |
michael@0 | 44 | /** |
michael@0 | 45 | * Return current option. The current option is the option displaying |
michael@0 | 46 | * the focus ring when the listbox is focused. |
michael@0 | 47 | */ |
michael@0 | 48 | virtual mozilla::dom::HTMLOptionElement* GetCurrentOption() = 0; |
michael@0 | 49 | |
michael@0 | 50 | /** |
michael@0 | 51 | * Initiates mouse capture for the listbox |
michael@0 | 52 | * |
michael@0 | 53 | */ |
michael@0 | 54 | virtual void CaptureMouseEvents(bool aGrabMouseEvents) = 0; |
michael@0 | 55 | |
michael@0 | 56 | /** |
michael@0 | 57 | * Returns the height of a single row in the list. This is the |
michael@0 | 58 | * maximum of the heights of all the options/optgroups. |
michael@0 | 59 | */ |
michael@0 | 60 | virtual nscoord GetHeightOfARow() = 0; |
michael@0 | 61 | |
michael@0 | 62 | /** |
michael@0 | 63 | * Returns the number of options in the listbox |
michael@0 | 64 | */ |
michael@0 | 65 | |
michael@0 | 66 | virtual uint32_t GetNumberOfOptions() = 0; |
michael@0 | 67 | |
michael@0 | 68 | /** |
michael@0 | 69 | * Called by combobox when it's about to drop down |
michael@0 | 70 | */ |
michael@0 | 71 | virtual void AboutToDropDown() = 0; |
michael@0 | 72 | |
michael@0 | 73 | /** |
michael@0 | 74 | * Called by combobox when it's about to roll up |
michael@0 | 75 | */ |
michael@0 | 76 | virtual void AboutToRollup() = 0; |
michael@0 | 77 | |
michael@0 | 78 | /** |
michael@0 | 79 | * Fire on change (used by combobox) |
michael@0 | 80 | */ |
michael@0 | 81 | virtual void FireOnChange() = 0; |
michael@0 | 82 | |
michael@0 | 83 | /** |
michael@0 | 84 | * Tell the selected list to roll up and ensure that the proper index is |
michael@0 | 85 | * selected, possibly firing onChange if the index has changed |
michael@0 | 86 | * |
michael@0 | 87 | * @param aIndex the index to actually select |
michael@0 | 88 | */ |
michael@0 | 89 | virtual void ComboboxFinish(int32_t aIndex) = 0; |
michael@0 | 90 | |
michael@0 | 91 | /** |
michael@0 | 92 | * Notification that the content has been reset |
michael@0 | 93 | */ |
michael@0 | 94 | virtual void OnContentReset() = 0; |
michael@0 | 95 | }; |
michael@0 | 96 | |
michael@0 | 97 | #endif |
michael@0 | 98 |