1999-01-18 18:14:00 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Netscape Public License
|
|
|
|
* Version 1.0 (the "NPL"); you may not use this file except in
|
|
|
|
* compliance with the NPL. You may obtain a copy of the NPL at
|
|
|
|
* http://www.mozilla.org/NPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* NPL.
|
|
|
|
*
|
|
|
|
* The Initial Developer of this code under the NPL is Netscape
|
|
|
|
* Communications Corporation. Portions created by Netscape are
|
|
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
|
|
|
* Reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef nsComboboxControlFrame_h___
|
|
|
|
#define nsComboboxControlFrame_h___
|
|
|
|
|
1999-04-13 02:14:31 +04: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
|
|
|
#include "nsAreaFrame.h"
|
1999-01-18 18:14:00 +03:00
|
|
|
#include "nsIFormControlFrame.h"
|
|
|
|
#include "nsIComboboxControlFrame.h"
|
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
|
|
|
#include "nsIDOMMouseListener.h"
|
|
|
|
#include "nsVoidArray.h"
|
|
|
|
#include "nsIAnonymousContentCreator.h"
|
1999-08-26 18:54:07 +04:00
|
|
|
#include "nsISelectControlFrame.h"
|
1999-09-15 09:31:31 +04:00
|
|
|
#include "nsIStatefulFrame.h"
|
1999-09-22 01:20:50 +04:00
|
|
|
#include "nsIRollupListener.h"
|
1999-01-18 18:14:00 +03:00
|
|
|
|
|
|
|
class nsButtonControlFrame;
|
|
|
|
class nsTextControlFrame;
|
|
|
|
class nsFormFrame;
|
|
|
|
class nsIView;
|
|
|
|
class nsStyleContext;
|
|
|
|
class nsIHTMLContent;
|
|
|
|
class nsIListControlFrame;
|
|
|
|
|
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
|
|
|
/**
|
|
|
|
* Child list name indices
|
|
|
|
* @see #GetAdditionalChildListName()
|
|
|
|
*/
|
|
|
|
#define NS_COMBO_FRAME_POPUP_LIST_INDEX (NS_AREA_FRAME_ABSOLUTE_LIST_INDEX + 1)
|
|
|
|
|
|
|
|
class nsComboboxControlFrame : public nsAreaFrame,
|
1999-01-18 18:14:00 +03:00
|
|
|
public nsIFormControlFrame,
|
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
|
|
|
public nsIComboboxControlFrame,
|
|
|
|
public nsIDOMMouseListener,
|
1999-08-26 18:54:07 +04:00
|
|
|
public nsIAnonymousContentCreator,
|
1999-09-15 09:31:31 +04:00
|
|
|
public nsISelectControlFrame,
|
1999-09-22 01:20:50 +04:00
|
|
|
public nsIStatefulFrame,
|
|
|
|
public nsIRollupListener
|
1999-01-18 18:14:00 +03:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsComboboxControlFrame();
|
|
|
|
~nsComboboxControlFrame();
|
|
|
|
|
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
|
|
|
// nsISupports
|
1999-01-18 18:14:00 +03:00
|
|
|
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);
|
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
|
|
|
|
|
|
|
// nsIAnonymousContentCreator
|
|
|
|
NS_IMETHOD CreateAnonymousContent(nsISupportsArray& aChildList);
|
|
|
|
|
|
|
|
// nsIFrame
|
|
|
|
NS_IMETHOD Init(nsIPresContext& aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aContext,
|
|
|
|
nsIFrame* aPrevInFlow);
|
1999-01-18 18:14:00 +03:00
|
|
|
|
|
|
|
NS_IMETHOD Reflow(nsIPresContext& aCX,
|
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
|
|
|
nsReflowStatus& aStatus);
|
|
|
|
|
1999-07-29 01:38:08 +04:00
|
|
|
NS_IMETHOD HandleEvent(nsIPresContext& aPresContext,
|
|
|
|
nsGUIEvent* aEvent,
|
|
|
|
nsEventStatus& aEventStatus);
|
|
|
|
|
1999-01-18 18:14:00 +03:00
|
|
|
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
1999-07-22 06:24:52 +04:00
|
|
|
NS_IMETHOD Destroy(nsIPresContext& aPresContext);
|
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
|
|
|
NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame** aFirstChild) const;
|
|
|
|
NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aChildList);
|
|
|
|
NS_IMETHOD GetAdditionalChildListName(PRInt32 aIndex,
|
|
|
|
nsIAtom** aListName) const;
|
|
|
|
|
1999-08-10 23:25:22 +04:00
|
|
|
NS_IMETHOD GetFrameForPoint(const nsPoint& aPoint, nsIFrame** aFrame);
|
|
|
|
|
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
|
|
|
// nsIFormControlFrame
|
|
|
|
NS_IMETHOD SetSuggestedSize(nscoord aWidth, nscoord aHeight);
|
|
|
|
NS_IMETHOD GetName(nsString* aName);
|
|
|
|
NS_IMETHOD GetType(PRInt32* aType) const;
|
1999-01-26 01:16:27 +03:00
|
|
|
NS_IMETHOD SetProperty(nsIAtom* aName, const nsString& aValue);
|
|
|
|
NS_IMETHOD GetProperty(nsIAtom* aName, nsString& aValue);
|
1999-05-14 03:45:40 +04:00
|
|
|
void SetFocus(PRBool aOn, PRBool aRepaint);
|
1999-08-21 04:09:24 +04:00
|
|
|
void ScrollIntoView(nsIPresContext* aPresContext);
|
1999-04-13 02:14:31 +04:00
|
|
|
virtual void PostCreateWidget(nsIPresContext* aPresContext,
|
|
|
|
nscoord& aWidth,
|
|
|
|
nscoord& aHeight);
|
1999-01-18 18:14:00 +03:00
|
|
|
virtual PRBool IsSuccessful(nsIFormControlFrame* aSubmitter);
|
|
|
|
virtual void SetFormFrame(nsFormFrame* aFormFrame) { mFormFrame = aFormFrame; }
|
|
|
|
virtual void Reset();
|
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
|
|
|
virtual PRInt32 GetMaxNumValues();
|
|
|
|
virtual PRBool GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumValues,
|
|
|
|
nsString* aValues, nsString* aNames);
|
1999-01-18 18:14:00 +03:00
|
|
|
NS_IMETHOD GetFont(nsIPresContext* aPresContext,
|
|
|
|
nsFont& aFont);
|
|
|
|
NS_IMETHOD GetFormContent(nsIContent*& aContent) const;
|
|
|
|
virtual nscoord GetVerticalBorderWidth(float aPixToTwip) const;
|
|
|
|
virtual nscoord GetHorizontalBorderWidth(float aPixToTwip) const;
|
1999-09-30 15:36:32 +04:00
|
|
|
virtual nscoord GetVerticalInsidePadding(nsIPresContext& aPresContext,
|
|
|
|
float aPixToTwip,
|
1999-01-18 18:14:00 +03:00
|
|
|
nscoord aInnerHeight) const;
|
|
|
|
virtual nscoord GetHorizontalInsidePadding(nsIPresContext& aPresContext,
|
|
|
|
float aPixToTwip,
|
|
|
|
nscoord aInnerWidth,
|
|
|
|
nscoord aCharWidth) const;
|
1999-03-06 22:43:13 +03:00
|
|
|
virtual nsresult RequiresWidget(PRBool &aRequiresWidget);
|
|
|
|
|
1999-10-06 03:43:06 +04:00
|
|
|
NS_IMETHOD SelectionChanged();// Called when the selection has changed.
|
1999-08-26 18:54:07 +04:00
|
|
|
// If the the same item in the list is selected
|
|
|
|
// it is NOT called.
|
|
|
|
|
1999-01-18 18:14:00 +03:00
|
|
|
// nsIFormMouseListener
|
|
|
|
virtual void MouseClicked(nsIPresContext* aPresContext);
|
|
|
|
|
|
|
|
//nsIComboboxControlFrame
|
1999-08-26 18:54:07 +04:00
|
|
|
NS_IMETHOD IsDroppedDown(PRBool * aDoDropDown) { *aDoDropDown = mDroppedDown; return NS_OK; }
|
|
|
|
NS_IMETHOD ShowDropDown(PRBool aDoDropDown);
|
1999-08-23 18:05:37 +04:00
|
|
|
NS_IMETHOD GetDropDown(nsIFrame** aDropDownFrame);
|
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
|
|
|
NS_IMETHOD SetDropDown(nsIFrame* aDropDownFrame);
|
1999-01-18 18:14:00 +03:00
|
|
|
NS_IMETHOD ListWasSelected(nsIPresContext* aPresContext);
|
1999-08-26 18:54:07 +04:00
|
|
|
NS_IMETHOD UpdateSelection(PRBool aDoDispatchEvent, PRBool aForceUpdate, PRInt32 aNewIndex);
|
1999-08-31 17:22:40 +04:00
|
|
|
NS_IMETHOD AbsolutelyPositionDropDown();
|
1999-09-14 03:20:50 +04:00
|
|
|
NS_IMETHOD GetAbsoluteRect(nsRect* aRect);
|
1999-08-26 18:54:07 +04:00
|
|
|
|
|
|
|
// nsISelectControlFrame
|
|
|
|
NS_IMETHOD AddOption(PRInt32 index);
|
1999-08-27 07:58:13 +04:00
|
|
|
NS_IMETHOD RemoveOption(PRInt32 index);
|
|
|
|
NS_IMETHOD SetOptionSelected(PRInt32 aIndex, PRBool aValue);
|
1999-09-15 09:31:31 +04:00
|
|
|
NS_IMETHOD GetOptionSelected(PRInt32 aIndex, PRBool* aValue);
|
1999-01-18 18:14:00 +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
|
|
|
//nsIDOMEventListener
|
|
|
|
virtual nsresult MouseDown(nsIDOMEvent* aMouseEvent);
|
1999-08-26 18:54:07 +04:00
|
|
|
virtual nsresult MouseUp(nsIDOMEvent* aMouseEvent) { return NS_OK; }
|
|
|
|
virtual nsresult MouseClick(nsIDOMEvent* aMouseEvent) { return NS_OK; }
|
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
|
|
|
virtual nsresult MouseDblClick(nsIDOMEvent* aMouseEvent) { return NS_OK; }
|
1999-08-26 18:54:07 +04:00
|
|
|
virtual nsresult MouseOver(nsIDOMEvent* aMouseEvent) { return NS_OK; }
|
|
|
|
virtual nsresult MouseOut(nsIDOMEvent* aMouseEvent) { return NS_OK; }
|
|
|
|
virtual nsresult HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; }
|
1999-01-18 18:14:00 +03:00
|
|
|
|
1999-09-15 09:31:31 +04:00
|
|
|
//nsIStatefulFrame
|
|
|
|
NS_IMETHOD GetStateType(StateType* aStateType);
|
|
|
|
NS_IMETHOD SaveState(nsISupports** aState);
|
|
|
|
NS_IMETHOD RestoreState(nsISupports* aState);
|
|
|
|
|
1999-09-22 01:20:50 +04:00
|
|
|
//nsIRollupListener
|
|
|
|
NS_IMETHOD Rollup();
|
|
|
|
|
|
|
|
|
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
|
|
|
protected:
|
|
|
|
|
|
|
|
// nsHTMLContainerFrame
|
1999-01-18 18:14:00 +03:00
|
|
|
virtual PRIntn GetSkipSides() const;
|
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
|
|
|
|
|
|
|
// Utilities
|
|
|
|
nsresult ReflowComboChildFrame(nsIFrame* aFrame,
|
|
|
|
nsIPresContext& aPresContext,
|
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
|
|
|
nsReflowStatus& aStatus,
|
|
|
|
nscoord aAvailableWidth,
|
|
|
|
nscoord aAvailableHeight);
|
|
|
|
|
|
|
|
nsresult GetScreenHeight(nsIPresContext& aPresContext, nscoord& aHeight);
|
1999-08-31 17:22:40 +04:00
|
|
|
public:
|
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
|
|
|
nsresult PositionDropdown(nsIPresContext& aPresContext,
|
|
|
|
nscoord aHeight,
|
|
|
|
nsRect aAbsoluteTwipsRect,
|
|
|
|
nsRect aAbsolutePixelRect);
|
|
|
|
nsresult GetAbsoluteFramePosition(nsIPresContext& aPresContext,
|
|
|
|
nsIFrame *aFrame,
|
|
|
|
nsRect& aAbsoluteTwipsRect,
|
|
|
|
nsRect& aAbsolutePixelRect);
|
1999-08-31 17:22:40 +04:00
|
|
|
nsIFrame* GetDisplayFrame(nsIPresContext& aPresContext);
|
|
|
|
protected:
|
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
|
|
|
void ShowPopup(PRBool aShowPopup);
|
|
|
|
void ShowList(nsIPresContext* aPresContext, PRBool aShowList);
|
|
|
|
void SetChildFrameSize(nsIFrame* aFrame, nscoord aWidth, nscoord aHeight);
|
|
|
|
void InitTextStr(PRBool aUpdate);
|
|
|
|
nsresult GetPrimaryComboFrame(nsIPresContext& aPresContext, nsIContent* aContent, nsIFrame** aFrame);
|
|
|
|
nsIFrame* GetButtonFrame(nsIPresContext& aPresContext);
|
|
|
|
nsIFrame* GetDropdownFrame();
|
1999-08-26 18:54:07 +04:00
|
|
|
NS_IMETHOD ToggleList(nsIPresContext* aPresContext);
|
1999-10-12 12:47:29 +04:00
|
|
|
nsresult MakeSureSomethingIsSelected(); // Default to option 0
|
1999-01-18 18:14:00 +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
|
|
|
nsFrameList mPopupFrames; // additional named child list
|
|
|
|
nsIPresContext* mPresContext; // XXX: Remove the need to cache the pres context.
|
1999-01-18 18:14:00 +03:00
|
|
|
nsFormFrame* mFormFrame; // Parent Form Frame
|
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
|
|
|
nsString mTextStr; // Current Combo box selection
|
1999-08-19 18:11:59 +04:00
|
|
|
PRInt32 mSelectedIndex; // current selected index
|
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
|
|
|
nsIHTMLContent* mDisplayContent; // Anonymous content used to display the current selection
|
|
|
|
nsIHTMLContent* mButtonContent; // Anonymous content used to popup the dropdown list
|
|
|
|
PRBool mDroppedDown; // Current state of the dropdown list, PR_TRUE is dropped down
|
|
|
|
nsIFrame* mDisplayFrame; // frame to display selection
|
|
|
|
nsIFrame* mButtonFrame; // button frame
|
|
|
|
nsIFrame* mDropdownFrame; // dropdown list frame
|
|
|
|
nsIListControlFrame * mListControlFrame; // ListControl Interface for the dropdown frame
|
1999-08-06 18:13:20 +04:00
|
|
|
PRBool mIgnoreFocus; // Tells the combo to ignore all focus notifications
|
1999-01-18 18:14:00 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
NS_IMETHOD_(nsrefcnt) AddRef() { return NS_OK; }
|
|
|
|
NS_IMETHOD_(nsrefcnt) Release() { return NS_OK; }
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|