зеркало из https://github.com/mozilla/pjs.git
The method nsIView::CreateView has parameter that indicates whether D&D for the widget
should be turned on or not. This make it configurable from the outside, it is needed for the editor
This commit is contained in:
Родитель
af70448f86
Коммит
d222c86771
|
@ -395,7 +395,8 @@ public:
|
|||
*/
|
||||
NS_IMETHOD CreateWidget(const nsIID &aWindowIID,
|
||||
nsWidgetInitData *aWidgetInitData = nsnull,
|
||||
nsNativeWidget aNative = nsnull) = 0;
|
||||
nsNativeWidget aNative = nsnull,
|
||||
PRBool aEnableDragDrop = PR_TRUE) = 0;
|
||||
|
||||
/**
|
||||
* Set the widget associated with this view.
|
||||
|
|
|
@ -1209,7 +1209,8 @@ NS_IMETHODIMP nsView :: GetClientData(void *&aData) const
|
|||
|
||||
NS_IMETHODIMP nsView :: CreateWidget(const nsIID &aWindowIID,
|
||||
nsWidgetInitData *aWidgetInitData,
|
||||
nsNativeWidget aNative)
|
||||
nsNativeWidget aNative,
|
||||
PRBool aEnableDragDrop)
|
||||
{
|
||||
nsIDeviceContext *dx;
|
||||
nsRect trect = mBounds;
|
||||
|
@ -1239,6 +1240,9 @@ NS_IMETHODIMP nsView :: CreateWidget(const nsIID &aWindowIID,
|
|||
mWindow->Create(parent, trect, ::HandleEvent, dx, nsnull, nsnull, aWidgetInitData);
|
||||
NS_IF_RELEASE(parent);
|
||||
}
|
||||
if (aEnableDragDrop) {
|
||||
mWindow->EnableDragDrop(PR_TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -89,7 +89,8 @@ public:
|
|||
NS_IMETHOD SetDirtyRegion(nsIRegion* aRegion);
|
||||
NS_IMETHOD CreateWidget(const nsIID &aWindowIID,
|
||||
nsWidgetInitData *aWidgetInitData = nsnull,
|
||||
nsNativeWidget aNative = nsnull);
|
||||
nsNativeWidget aNative = nsnull,
|
||||
PRBool aEnableDragDrop = PR_TRUE);
|
||||
NS_IMETHOD SetWidget(nsIWidget *aWidget);
|
||||
NS_IMETHOD GetWidget(nsIWidget *&aWidget) const;
|
||||
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
|
||||
|
|
Загрузка…
Ссылка в новой задаче