- /** Insert an inset into the buffer.
- Placie it in a layout of lout,
- if no_table make sure that it doesn't end up in a table.
- */
- //bool insertInset(Inset * inset, string const & lout = string(),
- // bool no_table = false);
- bool insertInset(Inset * inset, string const & lout = string());
- /** Inserts a lyx file at cursor position.
- \return #false# if it fails.
- */
- bool insertLyXFile(string const & file);
- ///
- bool lockInset(UpdatableInset * inset);
- ///
- void showLockedInsetCursor(int x, int y, int asc, int desc);
+
+ /// center the document view around the cursor.
+ void center();
+ /// scroll document by the given number of lines of default height.
+ void scroll(int lines);
+ /// Scroll the view by a number of pixels.
+ void scrollDocView(int pixels);
+ /// Set the cursor position based on the scrollbar one.
+ void setCursorFromScrollbar();
+
+ /// return the pixel width of the document view.
+ int workWidth() const;
+ /// return the pixel height of the document view.
+ int workHeight() const;
+
+ /// switch between primary and secondary keymaps for RTL entry.
+ void switchKeyMap();
+
+ /// return true for events that will handle.
+ FuncStatus getStatus(FuncRequest const & cmd);
+ /// execute the given function.
+ bool dispatch(FuncRequest const & argument);
+
+ /// request an X11 selection.
+ /// \return the selected string.
+ docstring const requestSelection();
+ /// clear the X11 selection.
+ void clearSelection();
+
+ /// resize method helper for \c WorkArea
+ /// \sa WorkArea
+ /// \sa resise
+ void workAreaResize(int width, int height);
+
+ /// dispatch method helper for \c WorkArea
+ /// \sa WorkArea
+ /// \retval true if a redraw is needed
+ bool workAreaDispatch(FuncRequest const & ev);
+
+ /// access to anchor.
+ pit_type anchor_ref() const;
+
+ /// access to full cursor.
+ LCursor & cursor();
+ /// access to full cursor.
+ LCursor const & cursor() const;
+ /// sets cursor.
+ /// This will also open all relevant collapsable insets.
+ void setCursor(DocIterator const &);
+ /// Check deleteEmptyParagraphMechanism and update metrics if needed.
+ /// \retval true if an update was needed.
+ bool checkDepm(LCursor & cur, LCursor & old);
+ /// sets cursor.
+ /// This is used when handling LFUN_MOUSE_PRESS.
+ bool mouseSetCursor(LCursor & cur);
+
+ /// sets the selection.
+ /* When \c backwards == false, set anchor
+ * to \c cur and cursor to \c cur + \c length. When \c
+ * backwards == true, set anchor to \c cur and cursor to \c
+ * cur + \c length.
+ */
+ void putSelectionAt(DocIterator const & cur,
+ int length, bool backwards);
+
+ /// return the internal \c ViewMetricsInfo.
+ /// This is used specifically by the \c Workrea.
+ /// \sa WorkArea
+ /// \sa ViewMetricsInfo
+ ViewMetricsInfo const & viewMetricsInfo();
+ /// update the internal \c ViewMetricsInfo.
+ /// \param singlepar indicates wether
+ void updateMetrics(bool singlepar = false);
+