class LyXText;
class LyXView;
class ParIterator;
-
-namespace lyx {
-namespace frontend {
-class Painter;
-}
-}
+class ViewMetricsInfo;
namespace Update {
enum flags {
} // namespace
+/// Scrollbar Parameters
+struct ScrollbarParameters
+{
+ void reset(int h = 0, int p = 0, int l = 0)
+ {
+ height = h;
+ position = p;
+ lineScrollHeight = l;
+ }
+
+ /// The total document height in pixels
+ int height;
+ /// The current position in the document, in pixels
+ int position;
+ /// the line-scroll amount, in pixels
+ int lineScrollHeight;
+};
/**
* A buffer view encapsulates a view onto a particular
* Create a view with the given owner main window,
* of the given dimensions.
*/
- BufferView(LyXView * owner, int w, int h);
+ BufferView(LyXView * owner);
~BufferView();
/// return the buffer being viewed
Buffer * buffer() const;
- /// return the painter object for drawing onto the view
- lyx::frontend::Painter & painter() const;
-
/// return the owning main view
LyXView * owner() const;
bool fitCursor();
/// reset the scrollbar to reflect current view position
void updateScrollbar();
+ /// return the Scrollbar Parameters
+ ScrollbarParameters const & scrollbarParameters() const;
/// FIXME
bool available() const;
/// switch between primary and secondary keymaps for RTL entry
void switchKeyMap();
- /// get the contents of the window system clipboard
- std::string const getClipboard() const;
- /// fill the window system clipboard
- void stuffClipboard(std::string const &) const;
- /// tell the window system we have a selection
- void haveSelection(bool sel);
-
/// return true for events that will handle
FuncStatus getStatus(FuncRequest const & cmd);
/// execute the given function
void selectionLost();
///
- void workAreaResize();
+ void workAreaResize(int width, int height);
- /// Receive a keypress
- void workAreaKeyPress(LyXKeySymPtr key, key_modifier::state state);
+ /// Receive a keypress
+ void workAreaKeyPress(LyXKeySymPtr key, key_modifier::state state);
/// a function should be executed from the workarea
bool workAreaDispatch(FuncRequest const & ev);
*/
void putSelectionAt(DocIterator const & cur,
int length, bool backwards);
- ///
- bool const repaintAll() const;
- ///
- void const repaintAll(bool r) const;
+ ///
+ ViewMetricsInfo const & viewMetricsInfo();
private:
///
class Pimpl;