1999-08-06 09:13:07 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
1999-11-06 06:40:37 +03:00
|
|
|
* The contents of this file are subject to the Netscape 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/NPL/
|
1999-08-06 09:13:07 +04:00
|
|
|
*
|
1999-11-06 06:40:37 +03: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-08-06 09:13:07 +04:00
|
|
|
*
|
1999-11-06 06:40:37 +03:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Netscape
|
1999-08-06 09:13:07 +04:00
|
|
|
* Communications Corporation. Portions created by Netscape are
|
1999-11-06 06:40:37 +03:00
|
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
* Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
1999-08-06 09:13:07 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef nsGfxButtonControlFrame_h___
|
|
|
|
#define nsGfxButtonControlFrame_h___
|
|
|
|
|
1999-08-10 23:13:57 +04:00
|
|
|
#include "nsFormControlFrame.h"
|
|
|
|
#include "nsHTMLButtonControlFrame.h"
|
1999-08-06 09:13:07 +04:00
|
|
|
|
1999-08-10 23:13:57 +04:00
|
|
|
// Class which implements the input[type=button, reset, submit] and
|
|
|
|
// browse button for input[type=file].
|
|
|
|
// The label for button is specified through generated content
|
|
|
|
// in the ua.css file.
|
1999-08-06 09:13:07 +04:00
|
|
|
|
1999-08-10 23:13:57 +04:00
|
|
|
class nsGfxButtonControlFrame : public nsHTMLButtonControlFrame {
|
1999-08-06 09:13:07 +04:00
|
|
|
public:
|
|
|
|
nsGfxButtonControlFrame();
|
|
|
|
|
1999-08-10 23:13:57 +04:00
|
|
|
//nsIFrame
|
|
|
|
NS_IMETHOD Reflow(nsIPresContext& aCX,
|
1999-08-06 09:13:07 +04:00
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
|
|
|
nsReflowStatus& aStatus);
|
1999-08-10 23:13:57 +04:00
|
|
|
virtual const nsIID& GetCID();
|
|
|
|
virtual const nsIID& GetIID();
|
1999-08-06 09:13:07 +04:00
|
|
|
|
1999-08-10 23:13:57 +04:00
|
|
|
NS_IMETHOD HandleEvent(nsIPresContext& aPresContext,
|
1999-08-06 09:13:07 +04:00
|
|
|
nsGUIEvent* aEvent,
|
|
|
|
nsEventStatus& aEventStatus);
|
|
|
|
|
1999-08-10 23:13:57 +04:00
|
|
|
|
|
|
|
// nsFormControlFrame
|
|
|
|
NS_IMETHOD SetSuggestedSize(nscoord aWidth, nscoord aHeight);
|
1999-11-02 01:12:45 +03:00
|
|
|
#ifdef DEBUG
|
1999-08-10 23:13:57 +04:00
|
|
|
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
1999-11-02 01:12:45 +03:00
|
|
|
#endif
|
1999-08-10 23:13:57 +04:00
|
|
|
PRBool IsSuccessful(nsIFormControlFrame* aSubmitter);
|
|
|
|
virtual PRInt32 GetMaxNumValues();
|
|
|
|
virtual PRBool GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumValues,
|
|
|
|
nsString* aValues, nsString* aNames);
|
1999-09-14 00:40:59 +04:00
|
|
|
|
1999-08-31 17:03:38 +04:00
|
|
|
protected:
|
|
|
|
NS_IMETHOD AddComputedBorderPaddingToDesiredSize(nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aSuggestedReflowState);
|
1999-09-14 00:40:59 +04:00
|
|
|
virtual PRBool IsReset(PRInt32 type);
|
|
|
|
virtual PRBool IsSubmit(PRInt32 type);
|
1999-08-10 23:13:57 +04:00
|
|
|
private:
|
|
|
|
NS_IMETHOD_(nsrefcnt) AddRef() { return NS_OK; }
|
|
|
|
NS_IMETHOD_(nsrefcnt) Release() { return NS_OK; }
|
|
|
|
|
|
|
|
nscoord mSuggestedWidth;
|
|
|
|
nscoord mSuggestedHeight;
|
1999-08-06 09:13:07 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|