michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef nsISelectControlFrame_h___ michael@0: #define nsISelectControlFrame_h___ michael@0: michael@0: #include "nsQueryFrame.h" michael@0: michael@0: /** michael@0: * nsISelectControlFrame is the interface for combo boxes and listboxes michael@0: */ michael@0: class nsISelectControlFrame : public nsQueryFrame michael@0: { michael@0: public: michael@0: NS_DECL_QUERYFRAME_TARGET(nsISelectControlFrame) michael@0: michael@0: /** michael@0: * Adds an option to the list at index michael@0: */ michael@0: michael@0: NS_IMETHOD AddOption(int32_t index) = 0; michael@0: michael@0: /** michael@0: * Removes the option at index. The caller must have a live script michael@0: * blocker while calling this method. michael@0: */ michael@0: NS_IMETHOD RemoveOption(int32_t index) = 0; michael@0: michael@0: /** michael@0: * Sets whether the parser is done adding children michael@0: * @param aIsDone whether the parser is done adding children michael@0: */ michael@0: NS_IMETHOD DoneAddingChildren(bool aIsDone) = 0; michael@0: michael@0: /** michael@0: * Notify the frame when an option is selected michael@0: */ michael@0: NS_IMETHOD OnOptionSelected(int32_t aIndex, bool aSelected) = 0; michael@0: michael@0: /** michael@0: * Notify the frame when selectedIndex was changed. This might michael@0: * destroy the frame. michael@0: */ michael@0: NS_IMETHOD OnSetSelectedIndex(int32_t aOldIndex, int32_t aNewIndex) = 0; michael@0: michael@0: }; michael@0: michael@0: #endif