2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
2004-04-18 18:30:37 +04:00
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
1999-01-22 21:14:23 +03:00
|
|
|
*
|
2004-04-18 18:30:37 +04: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 21:14:23 +03:00
|
|
|
*
|
2001-09-29 00:14:13 +04: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 21:14:23 +03:00
|
|
|
*
|
1999-11-06 06:40:37 +03:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2004-04-18 18:30:37 +04:00
|
|
|
* The Initial Developer of the Original Code is
|
2001-09-29 00:14:13 +04:00
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
1999-11-06 06:40:37 +03:00
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
2004-04-18 18:30:37 +04: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-29 00:14:13 +04: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 18:30:37 +04:00
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
2001-09-29 00:14:13 +04: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 18:30:37 +04:00
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
2001-09-29 00:14:13 +04:00
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
1999-01-22 21:14:23 +03:00
|
|
|
|
|
|
|
#ifndef nsIFormControlFrame_h___
|
|
|
|
#define nsIFormControlFrame_h___
|
|
|
|
|
2009-01-12 22:20:59 +03:00
|
|
|
#include "nsQueryFrame.h"
|
2001-11-02 10:40:01 +03:00
|
|
|
class nsAString;
|
1999-01-22 22:10:10 +03:00
|
|
|
class nsIContent;
|
2002-07-25 22:31:10 +04:00
|
|
|
class nsIAtom;
|
2005-12-13 02:53:06 +03:00
|
|
|
struct nsSize;
|
1999-01-22 21:14:23 +03: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 22:20:59 +03:00
|
|
|
class nsIFormControlFrame : public nsQueryFrame
|
|
|
|
{
|
1999-01-22 21:14:23 +03:00
|
|
|
public:
|
2009-09-12 20:49:24 +04:00
|
|
|
NS_DECL_QUERYFRAME_TARGET(nsIFormControlFrame)
|
1999-01-22 21:14:23 +03: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-15 02:00:24 +04:00
|
|
|
/**
|
2005-12-13 02:53:06 +03: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-15 02:00:24 +04:00
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual void SetFocus(bool aOn = true, bool aRepaint = false) = 0;
|
1999-01-22 22:10:10 +03:00
|
|
|
|
1999-01-26 01:16:27 +03:00
|
|
|
/**
|
1999-05-14 03:45:40 +04:00
|
|
|
* Set a property on the form control frame.
|
|
|
|
*
|
1999-01-26 01:16:27 +03: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-13 02:53:06 +03:00
|
|
|
virtual nsresult SetFormProperty(nsIAtom* aName, const nsAString& aValue) = 0;
|
1999-01-26 01:16:27 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get a property from the form control frame
|
1999-05-14 03:45:40 +04:00
|
|
|
*
|
2005-12-13 02:53:06 +03: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 10:40:01 +03:00
|
|
|
*/
|
1999-03-06 22:43:13 +03:00
|
|
|
|
2005-12-13 02:53:06 +03:00
|
|
|
virtual nsresult GetFormProperty(nsIAtom* aName, nsAString& aValue) const = 0;
|
1999-01-22 21:14:23 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|