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 nsIFormControlFrame_h___ michael@0: #define nsIFormControlFrame_h___ michael@0: michael@0: #include "nsQueryFrame.h" michael@0: michael@0: class nsAString; michael@0: class nsIAtom; michael@0: michael@0: /** michael@0: * nsIFormControlFrame is the common interface for frames of form controls. It michael@0: * provides a uniform way of creating widgets, resizing, and painting. michael@0: * @see nsLeafFrame and its base classes for more info michael@0: */ michael@0: class nsIFormControlFrame : public nsQueryFrame michael@0: { michael@0: public: michael@0: NS_DECL_QUERYFRAME_TARGET(nsIFormControlFrame) michael@0: michael@0: /** michael@0: * michael@0: * @param aOn michael@0: * @param aRepaint michael@0: */ michael@0: virtual void SetFocus(bool aOn = true, bool aRepaint = false) = 0; michael@0: michael@0: /** michael@0: * Set a property on the form control frame. michael@0: * michael@0: * @param aName name of the property to set michael@0: * @param aValue value of the property michael@0: * @returns NS_OK if the property name is valid, otherwise an error code michael@0: */ michael@0: virtual nsresult SetFormProperty(nsIAtom* aName, const nsAString& aValue) = 0; michael@0: }; michael@0: michael@0: #endif michael@0: