+docstring BufferView::toolTip(int x, int y) const
+{
+ // Get inset under mouse, if there is one.
+ Inset const * covering_inset = getCoveringInset(buffer_.text(), x, y);
+ if (!covering_inset)
+ // No inset, no tooltip...
+ return docstring();
+ return covering_inset->toolTip(*this, x, y);
+}
+
+
+docstring BufferView::contextMenu(int x, int y) const
+{
+ // Get inset under mouse, if there is one.
+ Inset const * covering_inset = getCoveringInset(buffer_.text(), x, y);
+ if (covering_inset)
+ return covering_inset->contextMenu(*this, x, y);
+
+ // FIXME: Do something more elaborate here.
+ return from_ascii("edit");
+}
+
+