]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Selection.h
merge controllers/Makefile.am and controllers/tests/Makefile.am
[lyx.git] / src / frontends / Selection.h
index 81380d164a99dc1b6b615f746334d0889563c353..9f8af37f2d25b965e29cabe6ea522f451be84491 100644 (file)
@@ -27,7 +27,15 @@ class Selection
 public:
        virtual ~Selection() {}
 
-       /// Tell the window system whether we have a selection.
+       /**
+        * Tell the window system whether we set or cleared our selection.
+        * This is a noop on systems that don't have a selection.
+        * This should be called by the kernel whenever a selection is
+        * created, changed or cleared.
+        * \param own
+        * If true: Tell that we got a valid selection.
+        * If false: Tell that we cleared our selection.
+        */
        virtual void haveSelection(bool) = 0;
        /**
         * Get the X selection contents.
@@ -49,15 +57,17 @@ public:
         * from the kernel and push it to X with this method.
         */
        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;
+       /**
+        * Is the X selection empty?
+        * This does always return true on systems that don't have a real
+        * selection.
+        */
+       virtual bool empty() const = 0;
 };
 
 } // namespace frontend
 
-/// Implementation is in Application.C
+/// Implementation is in Application.cpp
 extern frontend::Selection & theSelection();
 
 } // namespace lyx