mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 23:23:33 +00:00
Added new Clipboard and D&D files
This commit is contained in:
parent
6bd731402f
commit
3cb9559b8f
@ -45,8 +45,18 @@
|
||||
#include "nsImageButton.h"
|
||||
#include "nsMenuButton.h"
|
||||
#include "nsAppShell.h"
|
||||
#include "DataObj.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
||||
// Drag & Drop, Clipboard
|
||||
#include "nsClipboard.h"
|
||||
#include "nsTransferable.h"
|
||||
#include "nsDataFlavor.h"
|
||||
#include "nsDragService.h"
|
||||
#include "nsDragSource.h"
|
||||
#include "nsDragTarget.h"
|
||||
#include "nsDraggedObject.h"
|
||||
|
||||
static NS_DEFINE_IID(kCWindow, NS_WINDOW_CID);
|
||||
static NS_DEFINE_IID(kCChild, NS_CHILD_CID);
|
||||
static NS_DEFINE_IID(kCButton, NS_BUTTON_CID);
|
||||
@ -71,7 +81,17 @@ static NS_DEFINE_IID(kCMenu, NS_MENU_CID);
|
||||
static NS_DEFINE_IID(kCMenuItem, NS_MENUITEM_CID);
|
||||
static NS_DEFINE_IID(kCImageButton, NS_IMAGEBUTTON_CID);
|
||||
static NS_DEFINE_IID(kCPopUpMenu, NS_POPUPMENU_CID);
|
||||
static NS_DEFINE_IID(kCMenuButton, NS_MENUBUTTON_CID);
|
||||
static NS_DEFINE_IID(kCMenuButton, NS_MENUBUTTON_CID);
|
||||
|
||||
// Drag & Drop, Clipboard
|
||||
static NS_DEFINE_IID(kCDataObj, NS_DATAOBJ_CID);
|
||||
static NS_DEFINE_IID(kCClipboard, NS_CLIPBOARD_CID);
|
||||
static NS_DEFINE_IID(kCTransferable, NS_TRANSFERABLE_CID);
|
||||
static NS_DEFINE_IID(kCDataFlavor, NS_DATAFLAVOR_CID);
|
||||
static NS_DEFINE_IID(kCDragService, NS_DRAGSERVICE_CID);
|
||||
static NS_DEFINE_IID(kCDragSource, NS_DRAGSOURCE_CID);
|
||||
static NS_DEFINE_IID(kCDragTarget, NS_DRAGTARGET_CID);
|
||||
static NS_DEFINE_IID(kCDraggedObject, NS_DRAGGEDOBJECT_CID);
|
||||
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
|
||||
@ -224,6 +244,32 @@ nsresult nsWidgetFactory::CreateInstance( nsISupports* aOuter,
|
||||
else if (mClassID.Equals(kCPopUpMenu)) {
|
||||
inst = (nsISupports*)new nsPopUpMenu();
|
||||
}
|
||||
else if (mClassID.Equals(kCDataFlavor)) {
|
||||
inst = (nsISupports*)new nsDataFlavor();
|
||||
}
|
||||
else if (mClassID.Equals(kCTransferable)) {
|
||||
inst = (nsISupports*)new nsTransferable();
|
||||
}
|
||||
else if (mClassID.Equals(kCClipboard)) {
|
||||
inst = (nsISupports*)new nsClipboard();
|
||||
}
|
||||
else if (mClassID.Equals(kCDragService)) {
|
||||
inst = (nsISupports*)new nsDragService();
|
||||
}
|
||||
else if (mClassID.Equals(kCDragSource)) {
|
||||
inst = (nsISupports*)new nsDragSource();
|
||||
}
|
||||
else if (mClassID.Equals(kCDragTarget)) {
|
||||
inst = (nsISupports*)new nsDragTarget();
|
||||
}
|
||||
else if (mClassID.Equals(kCDraggedObject)) {
|
||||
inst = (nsISupports*)new nsDraggedObject();
|
||||
}
|
||||
#ifdef DRAG_DROP
|
||||
else if (mClassID.Equals(kCDataObj)) {
|
||||
inst = (nsISupports*)new CfDataObj();
|
||||
}
|
||||
#endif
|
||||
/* */
|
||||
|
||||
if (inst == NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user