* 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
* 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
* 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
QClipboard::Clipboard);
}
+
+bool GuiClipboard::isInternal() const
+{
+ return qApp->clipboard()->ownsClipboard();
+}
+
} // namespace frontend
} // namespace lyx
//@{
docstring const get() const;
void put(docstring const & str);
+ bool isInternal() const;
//@}
};
QClipboard::Selection);
}
+
+bool GuiSelection::isInternal() const
+{
+ return qApp->clipboard()->ownsSelection();
+}
+
} // namespace frontend
} // namespace lyx
void haveSelection(bool own);
docstring const get() const;
void put(docstring const & str);
+ bool isInternal() const;
//@}
};