#include "QLPainter.h"
#include "LyXView.h"
-#include "funcrequest.h"\r
-#include "frontends/Timeout.h"\r
-\r
+#include "funcrequest.h"
+#include "frontends/Timeout.h"
+
#include <QAbstractScrollArea>
#include <QMouseEvent>
#include <QWheelEvent>
#include <QKeyEvent>
#include <QPaintEvent>
#include <QTimer>
-#include <QImage>\r
-#include <QPixmap>\r
+#include <QImage>
+#include <QPixmap>
#include <queue>
///
virtual std::string const getClipboard() const;
-
+
///
virtual void putClipboard(std::string const &) const;
-
+
///
virtual void dragEnterEvent(QDragEnterEvent * event);
-
+
///
virtual void dropEvent(QDropEvent* event);
-
+
/// return the widget's painter
virtual Painter & getPainter() { return (Painter &) painter_; }
/// return the backing pixmap
QPaintDevice * paintDevice() { return &paint_device_; }
-\r
+
/// update the passed area.
- void update(int x, int y, int w, int h);\r
+ void update(int x, int y, int w, int h);
- /// return a screen copy of the defined area.\r
+ /// return a screen copy of the defined area.
QPixmap copyScreen(int x, int y, int w, int h) const;
- /// Draw a pixmap onto the backing pixmap.\r
- /**\r
- QPixmap is implicitely shared so no need to pass by reference.\r
- */\r
- void drawScreen(int x, int y, QPixmap pixmap);\r
-\r
+ /// Draw a pixmap onto the backing pixmap.
+ /**
+ QPixmap is implicitely shared so no need to pass by reference.
+ */
+ void drawScreen(int x, int y, QPixmap pixmap);
+
+ LyXView & view()
+ {
+ return view_;
+ }
protected:
/// repaint part of the widget
#if USE_INPUT_METHODS
protected:
/// IM events
- void QWorkArea::inputMethodEvent(QInputMethodEvent * e)
+ void QWorkArea::inputMethodEvent(QInputMethodEvent * e)
#endif
public slots:
-\r
- /// Timeout event Slot for keyboard bufferring.\r
+
+ /// Timeout event Slot for keyboard bufferring.
/// \todo This is not used currently in the code, remove?
- void keyeventTimeout();\r
-\r
- /// Adjust the LyX buffer view with the position of the scrollbar.\r
- /**\r
- * The action argument is not used in the the code, it is there\r
- * only for the connection to the vertical srollbar signal which \r
- * emits an 'int' action.\r
+ void keyeventTimeout();
+
+ /// Adjust the LyX buffer view with the position of the scrollbar.
+ /**
+ * The action argument is not used in the the code, it is there
+ * only for the connection to the vertical srollbar signal which
+ * emits an 'int' action.
*/
void adjustViewWithScrollBar(int action = 0);
private:
-
+ ///
+ LyXView & view_;
+
/// Buffer view width.
int workWidth_;
-\r
- /// Buffer view height.\r
+
+ /// Buffer view height.
int workHeight_;
/// Our painter.
/// The slot connected to SyntheticMouseEvent::timeout.
void generateSyntheticMouseEvent();
- ///\r
+ ///
SyntheticMouseEvent synthetic_mouse_event_;
/// Our client side painting device.
QImage paint_device_;
- /// Our server side painting device.\r
- QPixmap screen_device_;\r
-\r
- /// \todo remove\r
+ /// Our server side painting device.
+ QPixmap screen_device_;
+
+ /// \todo remove
QTimer step_timer_;
-\r
- /// \todo remove\r
+
+ /// \todo remove
std::queue<boost::shared_ptr<QKeyEvent> > keyeventQueue_;
double_click dc_event_;