layout/forms/nsIFormControlFrame.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/forms/nsIFormControlFrame.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,42 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef nsIFormControlFrame_h___
    1.10 +#define nsIFormControlFrame_h___
    1.11 +
    1.12 +#include "nsQueryFrame.h"
    1.13 +
    1.14 +class nsAString;
    1.15 +class nsIAtom;
    1.16 +
    1.17 +/** 
    1.18 +  * nsIFormControlFrame is the common interface for frames of form controls. It
    1.19 +  * provides a uniform way of creating widgets, resizing, and painting.
    1.20 +  * @see nsLeafFrame and its base classes for more info
    1.21 +  */
    1.22 +class nsIFormControlFrame : public nsQueryFrame
    1.23 +{
    1.24 +public:
    1.25 +  NS_DECL_QUERYFRAME_TARGET(nsIFormControlFrame)
    1.26 +
    1.27 +  /**
    1.28 +   * 
    1.29 +   * @param aOn
    1.30 +   * @param aRepaint
    1.31 +   */
    1.32 +  virtual void SetFocus(bool aOn = true, bool aRepaint = false) = 0;
    1.33 +
    1.34 +  /**
    1.35 +   * Set a property on the form control frame.
    1.36 +   *
    1.37 +   * @param aName name of the property to set
    1.38 +   * @param aValue value of the property
    1.39 +   * @returns NS_OK if the property name is valid, otherwise an error code
    1.40 +   */
    1.41 +  virtual nsresult SetFormProperty(nsIAtom* aName, const nsAString& aValue) = 0;
    1.42 +};
    1.43 +
    1.44 +#endif
    1.45 +

mercurial