]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiWorkArea_Private.h
Fix the warning about the unused msg parameter
[lyx.git] / src / frontends / qt4 / GuiWorkArea_Private.h
index 3058047f024016afafe98a2c833d1a869e1332e4..133a6cdbec8fd3ba257472f965c323a86f0e069b 100644 (file)
 #ifndef WORKAREA_PRIVATE_H
 #define WORKAREA_PRIVATE_H
 
+// Comment out to use QImage backend instead of QPixmap. This won't have any
+// effect on Windows, MacOSX and most X11 environment when running locally.
+// When running remotely on X11, this may have a big performance penalty.
+//#define USE_QIMAGE
+
 #include "FuncRequest.h"
 #include "qt_helpers.h"
 
 
 #include <QAbstractScrollArea>
 #include <QMouseEvent>
+#ifdef USE_QIMAGE
+#include <QImage>
+#else
 #include <QPixmap>
+#endif
 #include <QTimer>
 
 class QContextMenuEvent;
@@ -105,9 +114,6 @@ struct GuiWorkArea::Private
 
        /// hide the cursor
        virtual void removeCursor();
-
-       /// This function should be called to update the buffer readonly status.
-       void setReadOnly(bool);
        ///
        void dispatch(FuncRequest const & cmd0, KeyModifier = NoModifier);
        /// hide the visible cursor, if it is visible
@@ -120,6 +126,23 @@ struct GuiWorkArea::Private
        void updateCursorShape();
        ///
        void setCursorShape(Qt::CursorShape shape);
+
+#ifdef USE_QIMAGE
+       void resetScreen()
+       {
+               screen_ = QImage(p->viewport()->width(), p->viewport()->height(),
+                       QImage::Format_ARGB32_Premultiplied);
+       }
+
+       QImage screen_;
+#else
+       void resetScreen()
+       {
+               screen_ = QPixmap(p->viewport()->width(), p->viewport()->height());
+       }
+
+       QPixmap screen_;
+#endif
        ///
        GuiWorkArea * p;
 
@@ -142,8 +165,6 @@ struct GuiWorkArea::Private
        ///
        CursorWidget * cursor_;
        ///
-       QPixmap screen_;
-       ///
        bool need_resize_;
        ///
        bool schedule_redraw_;
@@ -160,7 +181,7 @@ struct GuiWorkArea::Private
        /// pressed. This is used to get the correct context menu 
        /// when the menu is actually shown (after releasing on Windows)
        /// and after the DEPM has done its job.
-       docstring context_menu_name_;
+       std::string context_menu_name_;
 }; // GuiWorkArea
 
 } // namespace frontend