2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef nsISelectControlFrame_h___
|
|
|
|
#define nsISelectControlFrame_h___
|
|
|
|
|
2009-01-12 11:20:59 -08:00
|
|
|
#include "nsQueryFrame.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* nsISelectControlFrame is the interface for combo boxes and listboxes
|
|
|
|
*/
|
2009-02-17 19:27:25 -08:00
|
|
|
class nsISelectControlFrame : public nsQueryFrame
|
2009-01-12 11:20:59 -08:00
|
|
|
{
|
2007-03-22 10:30:00 -07:00
|
|
|
public:
|
2009-09-12 09:49:24 -07:00
|
|
|
NS_DECL_QUERYFRAME_TARGET(nsISelectControlFrame)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Adds an option to the list at index
|
|
|
|
*/
|
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
NS_IMETHOD AddOption(int32_t index) = 0;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
2009-02-17 19:27:25 -08:00
|
|
|
* Removes the option at index. The caller must have a live script
|
|
|
|
* blocker while calling this method.
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
2012-08-22 08:56:38 -07:00
|
|
|
NS_IMETHOD RemoveOption(int32_t index) = 0;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets whether the parser is done adding children
|
|
|
|
* @param aIsDone whether the parser is done adding children
|
|
|
|
*/
|
2011-09-28 23:19:26 -07:00
|
|
|
NS_IMETHOD DoneAddingChildren(bool aIsDone) = 0;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Notify the frame when an option is selected
|
|
|
|
*/
|
2012-08-22 08:56:38 -07:00
|
|
|
NS_IMETHOD OnOptionSelected(int32_t aIndex, bool aSelected) = 0;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
2009-02-17 19:27:25 -08:00
|
|
|
* Notify the frame when selectedIndex was changed. This might
|
|
|
|
* destroy the frame.
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
2012-08-22 08:56:38 -07:00
|
|
|
NS_IMETHOD OnSetSelectedIndex(int32_t aOldIndex, int32_t aNewIndex) = 0;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|