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