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