resizers and titlebars r:hyatt a:hyatt

This commit is contained in:
ericb%neoplanet.com 2000-07-11 23:34:44 +00:00
Родитель 6deb8dfc16
Коммит 614b09c2ff
10 изменённых файлов: 173 добавлений и 0 удалений

Просмотреть файл

@ -177,3 +177,7 @@ XUL_ATOM(textarea, "textarea")
XUL_ATOM(listbox, "listbox")
XUL_ATOM(blankrow, "blankrow")
XUL_ATOM(titlebar, "titlebar")
XUL_ATOM(resizer, "resizer")
XUL_ATOM(dir, "dir")

Просмотреть файл

@ -58,6 +58,15 @@ public:
NS_IMETHOD GetRootCommandDispatcher (
nsIDocument * aDoc,
nsIDOMXULCommandDispatcher ** aDispatcher)=0;
/* from nsIBaseWindow
/* void setPositionAndSize (in long x, in long y, in long cx, in long cy, in boolean fRepaint); */
NS_IMETHOD SetPositionAndSize(PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy, PRBool fRepaint) = 0;
/* void getPositionAndSize (out long x, out long y, out long cx, out long cy); */
NS_IMETHOD GetPositionAndSize(PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy) = 0;
};
#endif // nsPIDOMWindow_h__

Просмотреть файл

@ -2635,6 +2635,26 @@ NS_IMETHODIMP GlobalWindowImpl::GetRootCommandDispatcher (
return NS_OK;
}
NS_IMETHODIMP GlobalWindowImpl::SetPositionAndSize(PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy, PRBool fRepaint)
{
nsCOMPtr<nsIBaseWindow> treeOwnerAsWin;
GetTreeOwner(getter_AddRefs(treeOwnerAsWin));
NS_ENSURE_TRUE(treeOwnerAsWin, NS_ERROR_FAILURE);
return treeOwnerAsWin->SetPositionAndSize(x,y,cx,cy,fRepaint);
}
NS_IMETHODIMP GlobalWindowImpl::GetPositionAndSize(PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy)
{
nsCOMPtr<nsIBaseWindow> treeOwnerAsWin;
GetTreeOwner(getter_AddRefs(treeOwnerAsWin));
NS_ENSURE_TRUE(treeOwnerAsWin, NS_ERROR_FAILURE);
return treeOwnerAsWin->GetPositionAndSize(x,y,cx,cy);
}
//*****************************************************************************
// GlobalWindowImpl::nsIDOMViewCSS
//*****************************************************************************

Просмотреть файл

@ -155,6 +155,10 @@ public:
nsIDocument * aDoc,
nsIDOMXULCommandDispatcher ** aDispatcher);
NS_IMETHOD SetPositionAndSize(PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy, PRBool fRepaint);
NS_IMETHOD GetPositionAndSize(PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy);
// nsIDOMViewCSS
NS_DECL_IDOMVIEWCSS

Просмотреть файл

@ -274,6 +274,13 @@ NS_NewBulletinBoardLayout ( nsIPresShell* aPresShell, nsCOMPtr<nsIBoxLayout>& aN
// end grid
nsresult
NS_NewTitleBarFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame);
nsresult
NS_NewResizerFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame);
#endif
//static NS_DEFINE_IID(kIStyleRuleIID, NS_ISTYLE_RULE_IID);
@ -5700,6 +5707,62 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell,
}
} // End of BUTTON CONSTRUCTION logic
// TITLEBAR CONSTRUCTION
else if (aTag == nsXULAtoms::titlebar) {
processChildren = PR_TRUE;
isReplaced = PR_TRUE;
rv = NS_NewTitleBarFrame(aPresShell, &newFrame);
const nsStyleDisplay* display = (const nsStyleDisplay*)
aStyleContext->GetStyleData(eStyleStruct_Display);
// Boxes can scroll.
if (IsScrollable(aPresContext, display)) {
// set the top to be the newly created scrollframe
BuildScrollFrame(aPresShell, aPresContext, aState, aContent, aStyleContext, newFrame, aParentFrame,
topFrame, aStyleContext);
// we have a scrollframe so the parent becomes the scroll frame.
newFrame->GetParent(&aParentFrame);
primaryFrameSet = PR_TRUE;
frameHasBeenInitialized = PR_TRUE;
}
} // End of TITLEBAR CONSTRUCTION logic
// RESIZER CONSTRUCTION
else if (aTag == nsXULAtoms::resizer) {
processChildren = PR_TRUE;
isReplaced = PR_TRUE;
rv = NS_NewResizerFrame(aPresShell, &newFrame);
const nsStyleDisplay* display = (const nsStyleDisplay*)
aStyleContext->GetStyleData(eStyleStruct_Display);
// Boxes can scroll.
if (IsScrollable(aPresContext, display)) {
// set the top to be the newly created scrollframe
BuildScrollFrame(aPresShell, aPresContext, aState, aContent, aStyleContext, newFrame, aParentFrame,
topFrame, aStyleContext);
// we have a scrollframe so the parent becomes the scroll frame.
newFrame->GetParent(&aParentFrame);
primaryFrameSet = PR_TRUE;
frameHasBeenInitialized = PR_TRUE;
}
} // End of RESIZER CONSTRUCTION logic
// TITLED BUTTON CONSTRUCTION
else if (aTag == nsXULAtoms::titledbutton) {

Просмотреть файл

@ -274,6 +274,13 @@ NS_NewBulletinBoardLayout ( nsIPresShell* aPresShell, nsCOMPtr<nsIBoxLayout>& aN
// end grid
nsresult
NS_NewTitleBarFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame);
nsresult
NS_NewResizerFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame);
#endif
//static NS_DEFINE_IID(kIStyleRuleIID, NS_ISTYLE_RULE_IID);
@ -5700,6 +5707,62 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell,
}
} // End of BUTTON CONSTRUCTION logic
// TITLEBAR CONSTRUCTION
else if (aTag == nsXULAtoms::titlebar) {
processChildren = PR_TRUE;
isReplaced = PR_TRUE;
rv = NS_NewTitleBarFrame(aPresShell, &newFrame);
const nsStyleDisplay* display = (const nsStyleDisplay*)
aStyleContext->GetStyleData(eStyleStruct_Display);
// Boxes can scroll.
if (IsScrollable(aPresContext, display)) {
// set the top to be the newly created scrollframe
BuildScrollFrame(aPresShell, aPresContext, aState, aContent, aStyleContext, newFrame, aParentFrame,
topFrame, aStyleContext);
// we have a scrollframe so the parent becomes the scroll frame.
newFrame->GetParent(&aParentFrame);
primaryFrameSet = PR_TRUE;
frameHasBeenInitialized = PR_TRUE;
}
} // End of TITLEBAR CONSTRUCTION logic
// RESIZER CONSTRUCTION
else if (aTag == nsXULAtoms::resizer) {
processChildren = PR_TRUE;
isReplaced = PR_TRUE;
rv = NS_NewResizerFrame(aPresShell, &newFrame);
const nsStyleDisplay* display = (const nsStyleDisplay*)
aStyleContext->GetStyleData(eStyleStruct_Display);
// Boxes can scroll.
if (IsScrollable(aPresContext, display)) {
// set the top to be the newly created scrollframe
BuildScrollFrame(aPresShell, aPresContext, aState, aContent, aStyleContext, newFrame, aParentFrame,
topFrame, aStyleContext);
// we have a scrollframe so the parent becomes the scroll frame.
newFrame->GetParent(&aParentFrame);
primaryFrameSet = PR_TRUE;
frameHasBeenInitialized = PR_TRUE;
}
} // End of RESIZER CONSTRUCTION logic
// TITLED BUTTON CONSTRUCTION
else if (aTag == nsXULAtoms::titledbutton) {

Двоичные данные
layout/macbuild/layout.mcp

Двоичный файл не отображается.

Просмотреть файл

@ -98,6 +98,8 @@ CPPSRCS = \
nsMenuDismissalListener.cpp \
nsPopupSetFrame.cpp \
nsRepeatService.cpp \
nsTitleBarFrame.cpp \
nsResizerFrame.cpp \
$(NULL)
include $(topsrcdir)/config/config.mk

Просмотреть файл

@ -95,6 +95,8 @@ CPPSRCS= \
nsMenuListener.cpp \
nsMenuDismissalListener.cpp \
nsPopupSetFrame.cpp \
nsTitleBarFrame.cpp \
nsResizerFrame.cpp \
$(NULL)
CPP_OBJS= \
@ -166,6 +168,8 @@ CPP_OBJS= \
.\$(OBJDIR)\nsMenuBarListener.obj \
.\$(OBJDIR)\nsMenuListener.obj \
.\$(OBJDIR)\nsMenuDismissalListener.obj \
.\$(OBJDIR)\nsTitleBarFrame.obj \
.\$(OBJDIR)\nsResizerFrame.obj \
$(NULL)
EXPORTS = \

Просмотреть файл

@ -177,3 +177,7 @@ XUL_ATOM(textarea, "textarea")
XUL_ATOM(listbox, "listbox")
XUL_ATOM(blankrow, "blankrow")
XUL_ATOM(titlebar, "titlebar")
XUL_ATOM(resizer, "resizer")
XUL_ATOM(dir, "dir")