2001-09-28 20:14:13 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
2004-04-18 14:30:37 +00:00
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
1999-01-22 18:14:23 +00:00
|
|
|
*
|
2004-04-18 14:30:37 +00:00
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
1999-01-22 18:14:23 +00:00
|
|
|
*
|
2001-09-28 20:14:13 +00:00
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
1999-01-22 18:14:23 +00:00
|
|
|
*
|
1999-11-06 03:40:37 +00:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2004-04-18 14:30:37 +00:00
|
|
|
* The Initial Developer of the Original Code is
|
2001-09-28 20:14:13 +00:00
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
1999-11-06 03:40:37 +00:00
|
|
|
*
|
2001-09-28 20:14:13 +00:00
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
2004-04-18 14:30:37 +00:00
|
|
|
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
|
|
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
2001-09-28 20:14:13 +00:00
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
2004-04-18 14:30:37 +00:00
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
2001-09-28 20:14:13 +00:00
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
2004-04-18 14:30:37 +00:00
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
2001-09-28 20:14:13 +00:00
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
1999-01-22 18:14:23 +00:00
|
|
|
|
|
|
|
#ifndef nsIFormControlFrame_h___
|
|
|
|
#define nsIFormControlFrame_h___
|
|
|
|
|
2009-01-12 19:20:59 +00:00
|
|
|
#include "nsQueryFrame.h"
|
2001-11-02 07:40:01 +00:00
|
|
|
class nsAString;
|
1999-01-22 19:10:10 +00:00
|
|
|
class nsIContent;
|
2002-07-25 18:31:10 +00:00
|
|
|
class nsIAtom;
|
2005-12-12 23:53:06 +00:00
|
|
|
struct nsSize;
|
1999-01-22 18:14:23 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* nsIFormControlFrame is the common interface for frames of form controls. It
|
|
|
|
* provides a uniform way of creating widgets, resizing, and painting.
|
|
|
|
* @see nsLeafFrame and its base classes for more info
|
|
|
|
*/
|
2009-01-12 19:20:59 +00:00
|
|
|
class nsIFormControlFrame : public nsQueryFrame
|
|
|
|
{
|
1999-01-22 18:14:23 +00:00
|
|
|
public:
|
2009-09-12 16:49:24 +00:00
|
|
|
NS_DECL_QUERYFRAME_TARGET(nsIFormControlFrame)
|
1999-01-22 18:14:23 +00:00
|
|
|
|
fixed bugs #6303, #6753, #6756, #6759
Re-wrote nsComboboxFrame.
removed the obsolete nsHTMLAtoms: comboText,comoTextSelected,comTextSelectedFocus,dropDownVisible,
dropdownHidden, dropDownBtnOut, dropDownBtnPressed,
Added nsHTMLAtoms::combobox, nsLayoutAtoms::popupList
Renamed dropDownList to dropDownListPseudo
Added "arrow.gif" as to be used the background-image for the combobox button
ua.css - added rules for select to differentiate between comboboxes and listboxes.
Added style rules to more closely match the XPTOOLKIT XPWidgets look.
removed the following :-moz-combobox-text, -moz-combobox-textselected
nsIFormControlFrame.h - Added SetSuggestedSize method.
nsButtonControlFrame - Implemented SetSuggestedSize.
nsCSSFrameConstructor.cpp - Rewrote ConstructSelectFrame.
nsIWidget.h -Added GetAbsoluteBounds method.
nsWindow.cpp - Implemented GetAbsoluteBounds.
1999-07-14 22:00:24 +00:00
|
|
|
/**
|
2005-12-12 23:53:06 +00:00
|
|
|
*
|
|
|
|
* @param aOn
|
|
|
|
* @param aRepaint
|
fixed bugs #6303, #6753, #6756, #6759
Re-wrote nsComboboxFrame.
removed the obsolete nsHTMLAtoms: comboText,comoTextSelected,comTextSelectedFocus,dropDownVisible,
dropdownHidden, dropDownBtnOut, dropDownBtnPressed,
Added nsHTMLAtoms::combobox, nsLayoutAtoms::popupList
Renamed dropDownList to dropDownListPseudo
Added "arrow.gif" as to be used the background-image for the combobox button
ua.css - added rules for select to differentiate between comboboxes and listboxes.
Added style rules to more closely match the XPTOOLKIT XPWidgets look.
removed the following :-moz-combobox-text, -moz-combobox-textselected
nsIFormControlFrame.h - Added SetSuggestedSize method.
nsButtonControlFrame - Implemented SetSuggestedSize.
nsCSSFrameConstructor.cpp - Rewrote ConstructSelectFrame.
nsIWidget.h -Added GetAbsoluteBounds method.
nsWindow.cpp - Implemented GetAbsoluteBounds.
1999-07-14 22:00:24 +00:00
|
|
|
*/
|
2005-12-12 23:53:06 +00:00
|
|
|
virtual void SetFocus(PRBool aOn = PR_TRUE, PRBool aRepaint = PR_FALSE) = 0;
|
1999-01-22 19:10:10 +00:00
|
|
|
|
1999-01-25 22:16:27 +00:00
|
|
|
/**
|
1999-05-13 23:45:40 +00:00
|
|
|
* Set a property on the form control frame.
|
|
|
|
*
|
1999-01-25 22:16:27 +00:00
|
|
|
* @param aName name of the property to set
|
|
|
|
* @param aValue value of the property
|
|
|
|
* @returns NS_OK if the property name is valid, otherwise an error code
|
|
|
|
*/
|
2005-12-12 23:53:06 +00:00
|
|
|
virtual nsresult SetFormProperty(nsIAtom* aName, const nsAString& aValue) = 0;
|
1999-01-25 22:16:27 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get a property from the form control frame
|
1999-05-13 23:45:40 +00:00
|
|
|
*
|
2005-12-12 23:53:06 +00:00
|
|
|
* @param aName name of the property to get.
|
|
|
|
* @param aValue Value to set.
|
|
|
|
* @returns NS_OK if the property name is valid, otherwise an error code.
|
2001-11-02 07:40:01 +00:00
|
|
|
*/
|
1999-03-06 19:43:13 +00:00
|
|
|
|
2005-12-12 23:53:06 +00:00
|
|
|
virtual nsresult GetFormProperty(nsIAtom* aName, nsAString& aValue) const = 0;
|
1999-01-22 18:14:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|