1 /**************************************************************************** 2 ** 3 ** DQt - D bindings for the Qt Toolkit 4 ** 5 ** GNU Lesser General Public License Usage 6 ** This file may be used under the terms of the GNU Lesser 7 ** General Public License version 3 as published by the Free Software 8 ** Foundation and appearing in the file LICENSE.LGPL3 included in the 9 ** packaging of this file. Please review the following information to 10 ** ensure the GNU Lesser General Public License version 3 requirements 11 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. 12 ** 13 ****************************************************************************/ 14 module qt.widgets.scrollbar; 15 extern(C++): 16 17 import qt.config; 18 import qt.core.coreevent; 19 import qt.core.namespace; 20 import qt.core.size; 21 import qt.gui.event; 22 import qt.helpers; 23 import qt.widgets.abstractslider; 24 import qt.widgets.styleoption; 25 import qt.widgets.widget; 26 27 /+ QT_REQUIRE_CONFIG(scrollbar); +/ 28 29 30 extern(C++, class) struct QScrollBarPrivate; 31 /+ class QStyleOptionSlider; +/ 32 33 class /+ Q_WIDGETS_EXPORT +/ QScrollBar : QAbstractSlider 34 { 35 mixin(Q_OBJECT); 36 public: 37 /+ explicit +/this(QWidget parent = null); 38 /+ explicit +/this(/+ Qt:: +/qt.core.namespace.Orientation, QWidget parent = null); 39 ~this(); 40 41 override QSize sizeHint() const; 42 override bool event(QEvent event); 43 44 protected: 45 /+ #if QT_CONFIG(wheelevent) +/ 46 override void wheelEvent(QWheelEvent ); 47 /+ #endif +/ 48 override void paintEvent(QPaintEvent ); 49 override void mousePressEvent(QMouseEvent ); 50 override void mouseReleaseEvent(QMouseEvent ); 51 override void mouseMoveEvent(QMouseEvent ); 52 override void hideEvent(QHideEvent); 53 override void sliderChange(SliderChange change); 54 version(QT_NO_CONTEXTMENU){}else 55 { 56 override void contextMenuEvent(QContextMenuEvent ); 57 } 58 final void initStyleOption(QStyleOptionSlider* option) const; 59 60 61 private: 62 /+ friend class QAbstractScrollAreaPrivate; +/ 63 /+ friend Q_WIDGETS_EXPORT QStyleOptionSlider qt_qscrollbarStyleOption(QScrollBar *scrollBar); +/ 64 65 /+ Q_DISABLE_COPY(QScrollBar) +/ 66 /+ Q_DECLARE_PRIVATE(QScrollBar) +/ 67 /+ #if QT_CONFIG(itemviews) +/ 68 /+ friend class QTableView; +/ 69 /+ friend class QTreeViewPrivate; +/ 70 /+ friend class QCommonListViewBase; +/ 71 /+ friend class QListModeViewBase; +/ 72 /+ friend class QAbstractItemView; +/ 73 /+ #endif +/ 74 } 75