"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Plugins/Qt/QTMScrollView.cpp" between
TeXmacs-1.99.4-src.tar.gz and TeXmacs-1.99.5-src.tar.gz

About: GNU TeXmacs is a what-you-see-is-what-you-get scientific text editor, which was both inspired by TeX and GNU Emacs.

QTMScrollView.cpp  (TeXmacs-1.99.4-src):QTMScrollView.cpp  (TeXmacs-1.99.5-src)
skipping to change at line 23 skipping to change at line 23
#include "QTMScrollView.hpp" #include "QTMScrollView.hpp"
#include "QTMApplication.hpp" #include "QTMApplication.hpp"
#include <QScrollBar> #include <QScrollBar>
#include <QPainter> #include <QPainter>
#include <QBoxLayout> #include <QBoxLayout>
#include <QPaintEvent> #include <QPaintEvent>
#include <QStyle> #include <QStyle>
/*! Provide automatic centering of the working area inside the viewport.
The only purpose of this widget is to provide this centering. To support this
we "un-wired" the event redirection built-in in QAbstractScrollArea (from the
viewport widget to the QAbstractScrollArea) and re-wired event redirection
from the surface to the QTMScrollView (see event())
All relevant events like resize, I/O events and the like which are sent to the
surface are resent QTMScrollView::surfaceEvent() for handling. This allows to
concentrate all the logic in only one object.
*/
class QTMSurface : public QWidget {
QTMScrollView* sv;
public:
QTMSurface(QWidget* p, QTMScrollView* _sv) : QWidget (p), sv (_sv) { }
protected:
virtual bool event(QEvent *event) {
return sv->surfaceEvent(event) ? true : QWidget::event(event);
}
};
/*! Constructor. /*! Constructor.
NOTE: NOTE:
We tell the p_surface to use all available space by default (this is needed by We tell the p_surface to use all available space by default (this is needed by
embedded widgets) by setting the SizePolicy to (Expanding, Expanding). embedded widgets) by setting the SizePolicy to (Expanding, Expanding).
In order to draw the vertical margins around the working area use a horizontal In order to draw the vertical margins around the working area use a horizontal
policy of Fixedl, as in qt_tm_widget_rep (see SLOT_SCROLLABLE there) policy of Fixedl, as in qt_tm_widget_rep (see SLOT_SCROLLABLE there)
NOTE: NOTE:
Don't try to disable double buffering even if we do our own: the flag Don't try to disable double buffering even if we do our own: the flag
 End of changes. 1 change blocks. 
0 lines changed or deleted 23 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS