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.
This commit is contained in:
Vadim Zeitlin
2018-01-02 17:06:58 +01:00
parent 32fc7c368f
commit 0a2dfc7959

View File

@@ -72,14 +72,9 @@ public:
virtual ~wxClipboard(); virtual ~wxClipboard();
/** /**
Call this function to add the data object to the clipboard. You may Call this function to add the data object to the clipboard.
call this function repeatedly after having cleared the clipboard using
Clear().
After this function has been called, the clipboard owns the data, so do This is an obsolete synonym for SetData().
not delete the data explicitly.
@see SetData()
*/ */
virtual bool AddData(wxDataObject* data); virtual bool AddData(wxDataObject* data);
@@ -149,14 +144,17 @@ public:
virtual bool Open(); virtual bool Open();
/** /**
Call this function to set the data object to the clipboard. This Call this function to set the data object to the clipboard.
function will clear all previous contents in the clipboard, so calling
it several times does not make any sense. 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 After this function has been called, the clipboard owns the data, so do
not delete the data explicitly. not delete the data explicitly.
@see AddData()
*/ */
virtual bool SetData(wxDataObject* data); virtual bool SetData(wxDataObject* data);