This is a combination of running clang-tidy with modernize-use-nullptr check for some ports (GTK, X11, OSX) and manual changes to the ports for which it couldn't be used easily (MSW, DFB) and also manually updating the docs. Also replace NULL with null or nullptr in the comments as this is more consistent with the use of nullptr in the code and makes it simpler to grep for the remaining occurrences of NULL itself. And also use null in the assert messages. Only a few occurrences of "NULL" are still left in non-C files, mostly corresponding to unclear comments or string output which it might not be safe to change.
54 lines
1.5 KiB
C++
54 lines
1.5 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: wx/qt/dnd.h
|
|
// Author: Peter Most
|
|
// Copyright: (c) Peter Most
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _WX_QT_DND_H_
|
|
#define _WX_QT_DND_H_
|
|
|
|
#define wxDROP_ICON(name) wxCursor(name##_xpm)
|
|
|
|
class WXDLLIMPEXP_CORE wxDropTarget : public wxDropTargetBase
|
|
{
|
|
public:
|
|
wxDropTarget(wxDataObject *dataObject = nullptr);
|
|
virtual ~wxDropTarget();
|
|
|
|
virtual bool OnDrop(wxCoord x, wxCoord y) override;
|
|
virtual wxDragResult OnData(wxCoord x,
|
|
wxCoord y,
|
|
wxDragResult def) override;
|
|
virtual bool GetData() override;
|
|
|
|
wxDataFormat GetMatchingPair();
|
|
|
|
void ConnectTo(QWidget* widget);
|
|
void Disconnect();
|
|
|
|
private:
|
|
class Impl;
|
|
Impl* m_pImpl;
|
|
};
|
|
|
|
class WXDLLIMPEXP_CORE wxDropSource: public wxDropSourceBase
|
|
{
|
|
public:
|
|
wxDropSource(wxWindow *win = nullptr,
|
|
const wxCursor © = wxNullCursor,
|
|
const wxCursor &move = wxNullCursor,
|
|
const wxCursor &none = wxNullCursor);
|
|
|
|
wxDropSource(wxDataObject& data,
|
|
wxWindow *win,
|
|
const wxCursor © = wxNullCursor,
|
|
const wxCursor &move = wxNullCursor,
|
|
const wxCursor &none = wxNullCursor);
|
|
|
|
virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly) override;
|
|
|
|
private:
|
|
wxWindow* m_parentWindow;
|
|
};
|
|
#endif // _WX_QT_DND_H_
|