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.scrollarea;
15 extern(C++):
16 
17 import qt.config;
18 import qt.core.coreevent;
19 import qt.core.namespace;
20 import qt.core.object;
21 import qt.core.size;
22 import qt.gui.event;
23 import qt.helpers;
24 import qt.widgets.abstractscrollarea;
25 import qt.widgets.widget;
26 
27 /+ QT_REQUIRE_CONFIG(scrollarea); +/
28 
29 
30 extern(C++, class) struct QScrollAreaPrivate;
31 
32 class /+ Q_WIDGETS_EXPORT +/ QScrollArea : QAbstractScrollArea
33 {
34     mixin(Q_OBJECT);
35     /+ Q_PROPERTY(bool widgetResizable READ widgetResizable WRITE setWidgetResizable)
36     Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment) +/
37 
38 public:
39     /+ explicit +/this(QWidget parent = null);
40     ~this();
41 
42     final QWidget widget() const;
43     final void setWidget(QWidget widget);
44     final QWidget takeWidget();
45 
46     final bool widgetResizable() const;
47     final void setWidgetResizable(bool resizable);
48 
49     override QSize sizeHint() const;
50 
51     override bool focusNextPrevChild(bool next);
52 
53     final /+ Qt:: +/qt.core.namespace.Alignment alignment() const;
54     final void setAlignment(/+ Qt:: +/qt.core.namespace.Alignment);
55 
56     final void ensureVisible(int x, int y, int xmargin = 50, int ymargin = 50);
57     final void ensureWidgetVisible(QWidget childWidget, int xmargin = 50, int ymargin = 50);
58 
59 protected:
60     this(ref QScrollAreaPrivate dd, QWidget parent = null);
61     override bool event(QEvent );
62     override bool eventFilter(QObject , QEvent );
63     override void resizeEvent(QResizeEvent );
64     override void scrollContentsBy(int dx, int dy);
65 
66     override QSize viewportSizeHint() const;
67 
68 private:
69     /+ Q_DECLARE_PRIVATE(QScrollArea) +/
70     /+ Q_DISABLE_COPY(QScrollArea) +/
71 }
72