Added m_isOpened variable to simulate opening/closing

the clipboard on wxMSW


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-05-02 17:48:17 +00:00
parent dec2b82453
commit a36d790a7b
2 changed files with 5 additions and 1 deletions

View File

@@ -94,6 +94,7 @@ public:
private:
bool m_clearOnExit;
bool m_isOpened;
};
#endif // wxUSE_CLIPBOARD

View File

@@ -539,6 +539,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject)
wxClipboard::wxClipboard()
{
m_clearOnExit = FALSE;
m_isOpened = FALSE;
}
wxClipboard::~wxClipboard()
@@ -582,6 +583,7 @@ bool wxClipboard::Flush()
bool wxClipboard::Open()
{
// OLE opens clipboard for us
m_isOpened = TRUE;
#if wxUSE_OLE_CLIPBOARD
return TRUE;
#else
@@ -592,7 +594,7 @@ bool wxClipboard::Open()
bool wxClipboard::IsOpened() const
{
#if wxUSE_OLE_CLIPBOARD
return TRUE;
return m_isOpened;
#else
return wxIsClipboardOpened();
#endif
@@ -696,6 +698,7 @@ bool wxClipboard::AddData( wxDataObject *data )
void wxClipboard::Close()
{
m_isOpened = FALSE;
// OLE closes clipboard for us
#if !wxUSE_OLE_CLIPBOARD
wxCloseClipboard();