UNPKG

@nodegui/nodegui

Version:

A cross-platform library to build native desktop apps.

49 lines (42 loc) 1.98 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.QAbstractScrollArea = void 0; const QFrame_1 = require("./QFrame"); const WrapperCache_1 = require("../core/WrapperCache"); /** > Abstract class to add functionalities common to all scrollarea based widgets. **This class implements all methods, properties of Qt's [QAbstractScrollArea class](https://doc.qt.io/qt-6/qabstractscrollarea.html) so that it can be inherited by all scroll based widgets** `QAbstractScrollArea` is an abstract class and hence no instances of the same should be created. It exists so that we can add similar functionalities to all scrollable widget's easily. If you wish to create a scrollarea use QScrollArea instead. **QAbstractScrollArea is the base class for all widgets.** QAbstractScrollArea will list all methods and properties that are common to all scrollable widgets in the NodeGui world. */ class QAbstractScrollArea extends QFrame_1.QFrame { horizontalScrollBar() { return WrapperCache_1.wrapperCache.getWrapper(this.native.horizontalScrollBar()); } maximumViewportSize() { return this.native.maximumViewportSize(); } setHorizontalScrollBar(scrollBar) { this.native.setHorizontalScrollBar(scrollBar.native); } setHorizontalScrollBarPolicy(policy) { this.native.setProperty('horizontalScrollBarPolicy', policy); } setViewport(widget) { this.native.setViewport(widget.native); } setVerticalScrollBar(scrollBar) { this.native.setVerticalScrollBar(scrollBar.native); } setVerticalScrollBarPolicy(policy) { this.native.setProperty('verticalScrollBarPolicy', policy); } verticalScrollBar() { return WrapperCache_1.wrapperCache.getWrapper(this.native.verticalScrollBar()); } viewport() { return WrapperCache_1.wrapperCache.getWrapper(this.native.viewport()); } } exports.QAbstractScrollArea = QAbstractScrollArea;