4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * \author Abdelrazak Younes
11 * Full author contact details are available in file CREDITS.
14 #ifndef BASE_SELECTION_H
15 #define BASE_SELECTION_H
17 #include "support/docstring.h"
23 * A Selection class manages the selection.
28 virtual ~Selection() {}
30 /// Tell the window system whether we have a selection.
31 virtual void haveSelection(bool) = 0;
33 * Get the X selection contents.
34 * This is a noop on systems that don't have a selection.
35 * The format is plain text.
36 * This should be called when the user presses the middle mouse
39 virtual docstring const get() const = 0;
41 * Fill the X selection.
42 * Does nothing on systems that don't have a selection.
43 * This should be called whenever some text is highlighted.
45 virtual void put(docstring const &) = 0;
48 } // namespace frontend
50 /// Implementation is in Application.C
51 extern frontend::Selection & theSelection();
56 #endif // BASE_SELECTION_H