class QKeyEvent;
class QWheelEvent;
class QPaintEvent;
+class QToolButton;
class QWidget;
#ifdef CursorShape
bool restart_timeout;
int x_old;
int y_old;
- double scrollbar_value_old;
+ int min_scrollbar_old;
+ int max_scrollbar_old;
};
///
~GuiWorkArea();
+ ///
+ void init();
///
void setBuffer(Buffer &);
///
void setGuiView(GuiView &);
- /// Dummy methods for Designer.
- void setWidgetResizable(bool) {}
- void setWidget(QWidget *) {}
///
void setFullScreen(bool full_screen);
/// is LyXView in fullscreen mode?
///
void resizeBufferView();
- bool inDialogMode() { return dialog_mode_; }
+ bool inDialogMode() const { return dialog_mode_; }
void setDialogMode(bool mode) { dialog_mode_ = mode; }
///
private:
friend class GuiCompleter;
- ///
- void init();
/// update the passed area.
void update(int x, int y, int w, int h);
}; // GuiWorkArea
+class EmbeddedWorkArea : public GuiWorkArea
+{
+ Q_OBJECT
+public:
+ ///
+ EmbeddedWorkArea(QWidget *);
+ ~EmbeddedWorkArea();
+
+ /// Dummy methods for Designer.
+ void setWidgetResizable(bool) {}
+ void setWidget(QWidget *) {}
+
+ ///
+ void disable();
+
+protected:
+ ///
+ void closeEvent(QCloseEvent * ev);
+ ///
+ void hideEvent(QHideEvent *ev);
+
+private:
+ /// Embedded Buffer.
+ Buffer * buffer_;
+}; // EmbeddedWorkArea
+
+
/// A tabbed set of GuiWorkAreas.
class TabWorkArea : public QTabWidget
{
void moveTab(int fromIndex, int toIndex);
private:
+ ///
int clicked_tab_;
+ ///
+ QToolButton * closeBufferButton;
}; // TabWorkArea