mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 02:49:46 +00:00
457b334926
* src/frontends/gtk/GWorkArea.[Ch] (getClipboard): Move to GuiClipboard.[Ch] (putClipboard): ditto * src/frontends/gtk/Makefile.am: add GuiClipboard.C * src/frontends/gtk/GuiClipboard.C: new file * src/frontends/gtk/GuiClipboard.h (get, put): only declare * src/frontends/qt3/Makefile.am: add GuiClipboard.C * src/frontends/qt3/QWorkArea.[Ch] (getClipboard): Move to GuiClipboard.[Ch] (putClipboard): ditto * src/frontends/qt3/GuiClipboard.C: new file * src/frontends/qt3/GuiClipboard.h (get, put): only declare * src/frontends/qt4/GuiClipboard.C: remove unneeded include (GuiClipboard::get): adjust debug output (GuiClipboard::put): ditto git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14378 a592a061-630c-0410-9148-cb99ea01b6c8
87 lines
1.8 KiB
C++
87 lines
1.8 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file QWorkArea.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author unknown
|
|
* \author John Levon
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef QWORKAREA_H
|
|
#define QWORKAREA_H
|
|
|
|
#include "QLPainter.h"
|
|
#include "QContentPane.h"
|
|
|
|
#include <qscrollbar.h>
|
|
|
|
class LyXView;
|
|
class QPixmap;
|
|
class QWidget;
|
|
|
|
namespace lyx {
|
|
namespace frontend {
|
|
|
|
|
|
/**
|
|
* Qt-specific implementation of the work area
|
|
* (buffer view GUI)
|
|
*
|
|
* It consists of a content pane widget, and a scrollbar.
|
|
* Hopefully soon we can just use QScrollView ...
|
|
*/
|
|
class QWorkArea : public QWidget {
|
|
public:
|
|
friend class QContentPane;
|
|
|
|
QWorkArea(LyXView & owner, int w, int h);
|
|
|
|
virtual ~QWorkArea();
|
|
/// return this widget's painter
|
|
virtual lyx::frontend::Painter & getPainter() { return painter_; }
|
|
/// return the width of the content pane
|
|
virtual int workWidth() const { return content_->width(); }
|
|
/// return the height of the content pane
|
|
virtual int workHeight() const { return content_->height(); }
|
|
///
|
|
virtual void setScrollbarParams(int height, int pos, int line_height);
|
|
|
|
/// a selection exists
|
|
virtual void haveSelection(bool);
|
|
///
|
|
virtual void dragEnterEvent(QDragEnterEvent * event);
|
|
///
|
|
virtual void dropEvent(QDropEvent* event);
|
|
|
|
/// get the pixmap we paint on to
|
|
QPixmap * getPixmap() const { return content_->pixmap(); }
|
|
|
|
/// get the content pane widget
|
|
QWidget * getContent() const { return content_; }
|
|
///
|
|
LyXView & view()
|
|
{
|
|
return owner_;
|
|
}
|
|
private:
|
|
/// The owning LyXView
|
|
LyXView & owner_;
|
|
|
|
/// scroll bar
|
|
QScrollBar * scrollbar_;
|
|
/// content
|
|
QContentPane * content_;
|
|
|
|
/// our painter
|
|
QLPainter painter_;
|
|
};
|
|
|
|
|
|
} // namespace frontend
|
|
} // namespace lyx
|
|
|
|
#endif // QWORKAREA_H
|