projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use wxString::t_str() in calls to Windows API functions in wxMSW.
[wxWidgets.git]
/
interface
/
wx
/
clipbrd.h
diff --git
a/interface/wx/clipbrd.h
b/interface/wx/clipbrd.h
index 1af79ac1f12857d95150154535e22f203b78f62a..4064abfc7d084057262ec851cc7ae34fcac51820 100644
(file)
--- a/
interface/wx/clipbrd.h
+++ b/
interface/wx/clipbrd.h
@@
-3,7
+3,7
@@
// Purpose: interface of wxClipboard
// Author: wxWidgets team
// RCS-ID: $Id$
// Purpose: interface of wxClipboard
// Author: wxWidgets team
// RCS-ID: $Id$
-// Licence: wxWindows licen
s
e
+// Licence: wxWindows licen
c
e
/////////////////////////////////////////////////////////////////////////////
/**
/////////////////////////////////////////////////////////////////////////////
/**
@@
-35,7
+35,7
@@
// Write some text to the clipboard
if (wxTheClipboard->Open())
{
// Write some text to the clipboard
if (wxTheClipboard->Open())
{
- // This data objects are held by the clipboard,
+ // This data objects are held by the clipboard,
// so do not delete them in the app.
wxTheClipboard->SetData( new wxTextDataObject("Some text") );
wxTheClipboard->Close();
// so do not delete them in the app.
wxTheClipboard->SetData( new wxTextDataObject("Some text") );
wxTheClipboard->Close();
@@
-49,7
+49,7
@@
wxTextDataObject data;
wxTheClipboard->GetData( data );
wxMessageBox( data.GetText() );
wxTextDataObject data;
wxTheClipboard->GetData( data );
wxMessageBox( data.GetText() );
- }
+ }
wxTheClipboard->Close();
}
@endcode
wxTheClipboard->Close();
}
@endcode
@@
-70,7
+70,7
@@
public:
/**
Destructor.
*/
/**
Destructor.
*/
- ~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. You may
@@
-82,19
+82,19
@@
public:
@see SetData()
*/
@see SetData()
*/
- bool AddData(wxDataObject* data);
+
virtual
bool AddData(wxDataObject* data);
/**
Clears the global clipboard object and the system's clipboard if
possible.
*/
/**
Clears the global clipboard object and the system's clipboard if
possible.
*/
- void Clear();
+ v
irtual v
oid Clear();
/**
Call this function to close the clipboard, having opened it with
Open().
*/
/**
Call this function to close the clipboard, having opened it with
Open().
*/
- void Close();
+ v
irtual v
oid Close();
/**
Flushes the clipboard: this means that the data which is currently on
/**
Flushes the clipboard: this means that the data which is currently on
@@
-102,20
+102,23
@@
public:
(possibly eating memory), otherwise the clipboard will be emptied on
exit.
(possibly eating memory), otherwise the clipboard will be emptied on
exit.
+ Currently this method is not implemented in X11-based ports, i.e.
+ wxGTK, wxX11 and wxMotif and always returns @false there.
+
@return @false if the operation is unsuccessful for any reason.
*/
@return @false if the operation is unsuccessful for any reason.
*/
- bool Flush();
+
virtual
bool Flush();
/**
Call this function to fill @a data with data on the clipboard, if
available in the required format. Returns @true on success.
*/
/**
Call this function to fill @a data with data on the clipboard, if
available in the required format. Returns @true on success.
*/
- bool GetData(wxDataObject& data);
+
virtual
bool GetData(wxDataObject& data);
/**
Returns @true if the clipboard has been opened.
*/
/**
Returns @true if the clipboard has been opened.
*/
- bool IsOpened() const;
+
virtual
bool IsOpened() const;
/**
Returns @true if there is data which matches the data format of the
/**
Returns @true if there is data which matches the data format of the
@@
-124,7
+127,7
@@
public:
@todo The name of this function is misleading. This should be renamed
to something that more accurately indicates what it does.
*/
@todo The name of this function is misleading. This should be renamed
to something that more accurately indicates what it does.
*/
- bool IsSupported(const wxDataFormat& format);
+
virtual
bool IsSupported(const wxDataFormat& format);
/**
Returns @true if we are using the primary selection, @false if
/**
Returns @true if we are using the primary selection, @false if
@@
-144,7
+147,7
@@
public:
@return @true on success. This should be tested (as in the sample
shown above).
*/
@return @true on success. This should be tested (as in the sample
shown above).
*/
- 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. This
@@
-156,7
+159,7
@@
public:
@see AddData()
*/
@see AddData()
*/
- bool SetData(wxDataObject* data);
+
virtual
bool SetData(wxDataObject* data);
/**
On platforms supporting it (all X11-based ports), wxClipboard uses the
/**
On platforms supporting it (all X11-based ports), wxClipboard uses the
@@
-173,6
+176,12
@@
public:
normal clipboard contents with the currently selected text on the other
platforms.
*/
normal clipboard contents with the currently selected text on the other
platforms.
*/
- void UsePrimarySelection(bool primary = true);
+ virtual void UsePrimarySelection(bool primary = false);
+
+ /**
+ Returns the global instance (wxTheClipboard) of the clipboard object.
+ */
+ static wxClipboard *Get();
+
};
};