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:
rods%netscape.com 1999-08-26 14:41:18 +00:00
Родитель af70448f86
Коммит d222c86771
3 изменённых файлов: 9 добавлений и 3 удалений

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

@ -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;