Prepare for external/internal clipboard merging.

* Clipboard.h: new isInternal() pure virtual method
* Selection.h: new isInternal() pure virtual method

* GuiClipboard, GuiSelection: implement new method.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16476 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-01-03 08:53:54 +00:00
parent 61f7ebd4a9
commit 6fcb3fe6a2
6 changed files with 22 additions and 0 deletions

View File

@ -39,6 +39,10 @@ public:
* the clipboard.
*/
virtual void put(docstring const &) = 0;
/// state of clipboard.
/// \retval true if the system clipboard has been set within LyX.
virtual bool isInternal() const = 0;
};
} // namespace frontend

View File

@ -43,6 +43,10 @@ public:
* This should be called whenever some text is highlighted.
*/
virtual void put(docstring const &) = 0;
/// state of clipboard.
/// \retval true if the system clipboard has been set within LyX.
virtual bool isInternal() const = 0;
};
} // namespace frontend

View File

@ -50,5 +50,11 @@ void GuiClipboard::put(docstring const & str)
QClipboard::Clipboard);
}
bool GuiClipboard::isInternal() const
{
return qApp->clipboard()->ownsClipboard();
}
} // namespace frontend
} // namespace lyx

View File

@ -32,6 +32,7 @@ public:
//@{
docstring const get() const;
void put(docstring const & str);
bool isInternal() const;
//@}
};

View File

@ -62,5 +62,11 @@ void GuiSelection::put(docstring const & str)
QClipboard::Selection);
}
bool GuiSelection::isInternal() const
{
return qApp->clipboard()->ownsSelection();
}
} // namespace frontend
} // namespace lyx

View File

@ -33,6 +33,7 @@ public:
void haveSelection(bool own);
docstring const get() const;
void put(docstring const & str);
bool isInternal() const;
//@}
};