// ----------------------------------------------------------------------------
// Define a new frame type for the main frame
// ----------------------------------------------------------------------------
// Define a new frame type for the main frame
// but the bitmap format(s) are only supported for output
nFormats += m_dobjBitmap.GetFormatCount(dir);
// but the bitmap format(s) are only supported for output
nFormats += m_dobjBitmap.GetFormatCount(dir);
// don't assume that m_dobjBitmap has only 1 format
m_dobjMetaFile.GetAllFormats(&formats[1 +
m_dobjBitmap.GetFormatCount(dir)], dir);
// don't assume that m_dobjBitmap has only 1 format
m_dobjMetaFile.GetAllFormats(&formats[1 +
m_dobjBitmap.GetFormatCount(dir)], dir);
private:
// creates a bitmap and assigns it to m_dobjBitmap (also sets m_hasBitmap)
void CreateBitmap() const;
private:
// creates a bitmap and assigns it to m_dobjBitmap (also sets m_hasBitmap)
void CreateBitmap() const;
wxDataFormat m_formatShape; // our custom format
wxBitmapDataObject m_dobjBitmap; // it handles bitmaps
bool m_hasBitmap; // true if m_dobjBitmap has valid bitmap
wxDataFormat m_formatShape; // our custom format
wxBitmapDataObject m_dobjBitmap; // it handles bitmaps
bool m_hasBitmap; // true if m_dobjBitmap has valid bitmap
wxMetaFileDataObject m_dobjMetaFile;// handles metafiles
bool m_hasMetaFile; // true if we have valid metafile
wxMetaFileDataObject m_dobjMetaFile;// handles metafiles
bool m_hasMetaFile; // true if we have valid metafile
// ----------------------------------------------------------------------------
// IDs for the menu commands
// ----------------------------------------------------------------------------
// IDs for the menu commands
EVT_MENU(Menu_Paste, DnDFrame::OnPaste)
EVT_MENU(Menu_CopyBitmap, DnDFrame::OnCopyBitmap)
EVT_MENU(Menu_PasteBitmap,DnDFrame::OnPasteBitmap)
EVT_MENU(Menu_Paste, DnDFrame::OnPaste)
EVT_MENU(Menu_CopyBitmap, DnDFrame::OnCopyBitmap)
EVT_MENU(Menu_PasteBitmap,DnDFrame::OnPasteBitmap)
EVT_MENU(Menu_CopyFiles, DnDFrame::OnCopyFiles)
EVT_UPDATE_UI(Menu_DragMoveDef, DnDFrame::OnUpdateUIMoveByDefault)
EVT_MENU(Menu_CopyFiles, DnDFrame::OnCopyFiles)
EVT_UPDATE_UI(Menu_DragMoveDef, DnDFrame::OnUpdateUIMoveByDefault)
BEGIN_EVENT_TABLE(DnDCanvasMetafile, wxScrolledWindow)
EVT_PAINT(DnDCanvasMetafile::OnPaint)
END_EVENT_TABLE()
BEGIN_EVENT_TABLE(DnDCanvasMetafile, wxScrolledWindow)
EVT_PAINT(DnDCanvasMetafile::OnPaint)
END_EVENT_TABLE()
clip_menu->AppendSeparator();
clip_menu->Append(Menu_CopyBitmap, _T("Copy &bitmap\tCtrl-Shift-C"));
clip_menu->Append(Menu_PasteBitmap, _T("Paste b&itmap\tCtrl-Shift-V"));
clip_menu->AppendSeparator();
clip_menu->Append(Menu_CopyBitmap, _T("Copy &bitmap\tCtrl-Shift-C"));
clip_menu->Append(Menu_PasteBitmap, _T("Paste b&itmap\tCtrl-Shift-V"));
clip_menu->AppendSeparator();
clip_menu->Append(Menu_PasteMFile, _T("Paste &metafile\tCtrl-M"));
clip_menu->AppendSeparator();
clip_menu->Append(Menu_PasteMFile, _T("Paste &metafile\tCtrl-M"));
clip_menu->AppendSeparator();
clip_menu->Append(Menu_CopyFiles, _T("Copy &files\tCtrl-F"));
clip_menu->AppendSeparator();
clip_menu->Append(Menu_CopyFiles, _T("Copy &files\tCtrl-F"));