From 0a2dfc7959305be706658f21c9590c8c633c68f0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 2 Jan 2018 17:06:58 +0100 Subject: [PATCH] Document wxClipboard::AddData() as synonym for SetData() Don't pretend that AddData() allows to add multiple objects to the clipboard because it doesn't work like this by default under any platform and only MSW possibly supports this in the non-default build with wxUSE_OLE==0 -- but mentioning it in the documentation would arguably be more confusing than helpful. See #17925. --- interface/wx/clipbrd.h | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/interface/wx/clipbrd.h b/interface/wx/clipbrd.h index 3b1ca4d83e..14593e27cc 100644 --- a/interface/wx/clipbrd.h +++ b/interface/wx/clipbrd.h @@ -72,14 +72,9 @@ public: virtual ~wxClipboard(); /** - Call this function to add the data object to the clipboard. You may - call this function repeatedly after having cleared the clipboard using - Clear(). + Call this function to add the data object to the clipboard. - After this function has been called, the clipboard owns the data, so do - not delete the data explicitly. - - @see SetData() + This is an obsolete synonym for SetData(). */ virtual bool AddData(wxDataObject* data); @@ -149,14 +144,17 @@ public: virtual bool Open(); /** - Call this function to set the data object to the clipboard. This - function will clear all previous contents in the clipboard, so calling - it several times does not make any sense. + Call this function to set the data object to the clipboard. + + The new data object replaces any previously set one, so if the + application wants to provide clipboard data in several different + formats, it must use a composite data object supporting all of the + formats instead of calling this function several times with different + data objects as this would only leave data from the last one in the + clipboard. After this function has been called, the clipboard owns the data, so do not delete the data explicitly. - - @see AddData() */ virtual bool SetData(wxDataObject* data);