### ----------------------------------------------------
### -- Qt::QtWidgets
### -- Licenses: GPL-3.0-or-later
### -- Authors: Yves Guillemot <yc.guillemot@wanadoo.fr>
### -- File: lib/Qt/QtWidgets/QGridLayout.rakumod
### ----------------------------------------------------

# 
# This file has been automatically generated by RaQt_maker V0.0.7.
# To modify and regenerate it, see the source code available here: 
#         https://github.com/yguillemot/RaQt_maker
# 

use NativeCall;
use Qt::QtWidgets:ver<0.0.7>:auth<zef:yguillemot>:api<2>;
use Qt::QtWidgets::QtHelpers:ver<0.0.7>:auth<zef:yguillemot>:api<2>;
use Qt::QtWidgets::QtWrappers:ver<0.0.7>:auth<zef:yguillemot>:api<2>;
use Qt::QtWidgets::QLayout:ver<0.0.7>:auth<zef:yguillemot>:api<2>;
use Qt::QtWidgets::QRect:ver<0.0.7>:auth<zef:yguillemot>:api<2>;
use Qt::QtWidgets::Qt:ver<0.0.7>:auth<zef:yguillemot>:api<2>;
use Qt::QtWidgets::QtBase:ver<0.0.7>:auth<zef:yguillemot>:api<2>;
use Qt::QtWidgets::RQGridLayout:ver<0.0.7>:auth<zef:yguillemot>:api<2>;
use Qt::QtWidgets::RQWidget:ver<0.0.7>:auth<zef:yguillemot>:api<2>;



class QGridLayout:ver<0.0.7>:auth<zef:yguillemot>:api<2>
    is QLayout
    is QtObject
    does RQGridLayout
    is export {

    multi sub ctor(QtBase $this, RQWidget $parent) {
        my $a1 = ?$parent ?? $parent.address !! QWInt2Pointer(0);
        $this.address = QWQGridLayoutCtor_1($a1);
        $this.ownedByRaku = True;
    }

    multi sub subClassCtor(QtBase $this, RQWidget $parent) {
        my $a1 = ?$parent ?? $parent.address !! QWInt2Pointer(0);
        $this.address = SCWQGridLayoutCtor_1($a1);
        $this.ownedByRaku = True;
    }

    method validateCB(Str $m) {
        QWvalidateCB_QGridLayout(self.address, self.id, $m);
    }

    multi sub ctor(QtBase $this) {
        $this.address = QWQGridLayoutCtor_2();
        $this.ownedByRaku = True;
    }

    multi sub subClassCtor(QtBase $this) {
        $this.address = SCWQGridLayoutCtor_2();
        $this.ownedByRaku = True;
    }

    multi sub ctor(QtBase $this, NativeCall::Types::Pointer $p, Bool :$obr = False) {
        # Get access to a preexisting Qt object
        $this.address = $p;
        $this.ownedByRaku = $obr;
    }

    multi sub ctor(|capture) {
        note "QtWidgets ", ::?CLASS.^name,
             " ctor called with unsupported args";
        die "Bad args";
    }

    submethod new(|capture) {
        my QGridLayout $rObj = self.bless;
        ctor($rObj, |capture);
        return $rObj;
    }

    multi sub subClassCtor(|capture) {
        note "QtWidgets subclass ", ::?CLASS.^name,
             " ctor called with unsupported args";
        die "Bad args";
    }

    submethod subClass(|capture) {
        subClassCtor(self, |capture);
        self.validateCallBacks();
    }

    submethod DESTROY {
        if self.ownedByRaku {
            QWQGridLayoutDtor(self.address);
            self.ownedByRaku = False;
        }
    }

    method setHorizontalSpacing(Int $spacing)
    {
        QWQGridLayoutsetHorizontalSpacing(self.address, $spacing);
    }

    method horizontalSpacing( --> Int)
    {
        my $result = QWQGridLayouthorizontalSpacing(self.address);
        return $result;
    }

    method setVerticalSpacing(Int $spacing)
    {
        QWQGridLayoutsetVerticalSpacing(self.address, $spacing);
    }

    method verticalSpacing( --> Int)
    {
        my $result = QWQGridLayoutverticalSpacing(self.address);
        return $result;
    }

    method setSpacing(Int $spacing)
    {
        QWQGridLayoutsetSpacing(self.address, $spacing);
    }

    method spacing( --> Int)
    {
        my $result = QWQGridLayoutspacing(self.address);
        return $result;
    }

    method setRowStretch(Int $row, Int $stretch)
    {
        QWQGridLayoutsetRowStretch(self.address, $row, $stretch);
    }

    method setColumnStretch(Int $column, Int $stretch)
    {
        QWQGridLayoutsetColumnStretch(self.address, $column, $stretch);
    }

    method rowStretch(Int $row --> Int)
    {
        my $result = QWQGridLayoutrowStretch(self.address, $row);
        return $result;
    }

    method columnStretch(Int $column --> Int)
    {
        my $result = QWQGridLayoutcolumnStretch(self.address, $column);
        return $result;
    }

    method setRowMinimumHeight(Int $row, Int $minSize)
    {
        QWQGridLayoutsetRowMinimumHeight(self.address, $row, $minSize);
    }

    method setColumnMinimumWidth(Int $column, Int $minSize)
    {
        QWQGridLayoutsetColumnMinimumWidth(self.address, $column, $minSize);
    }

    method rowMinimumHeight(Int $row --> Int)
    {
        my $result = QWQGridLayoutrowMinimumHeight(self.address, $row);
        return $result;
    }

    method columnMinimumWidth(Int $column --> Int)
    {
        my $result = QWQGridLayoutcolumnMinimumWidth(self.address, $column);
        return $result;
    }

    method columnCount( --> Int)
    {
        my $result = QWQGridLayoutcolumnCount(self.address);
        return $result;
    }

    method rowCount( --> Int)
    {
        my $result = QWQGridLayoutrowCount(self.address);
        return $result;
    }

    method cellRect(Int $row, Int $column --> QRect)
    {
        my $result = QWQGridLayoutcellRect(self.address, $row, $column);
        my $result1 = QRect.new($result, obr => True);
        return $result1;
    }

    multi method addWidget(RQWidget $arg1, Int $row, Int $column, Int $arg4 = Qt::Alignment())
    {
        my $a1 = ?$arg1 ?? $arg1.address !! QWInt2Pointer(0);
        QWQGridLayoutaddWidget_2(self.address, $a1, $row, $column, $arg4);
    }

    multi method addWidget(RQWidget $arg1, Int $row, Int $column, Int $rowSpan, Int $columnSpan, Int $arg6 = Qt::Alignment())
    {
        my $a1 = ?$arg1 ?? $arg1.address !! QWInt2Pointer(0);
        QWQGridLayoutaddWidget_3(self.address, $a1, $row, $column, $rowSpan, $columnSpan, $arg6);
    }

    multi method addLayout(QLayout $arg1, Int $row, Int $column, Int $arg4 = Qt::Alignment())
    {
        my $a1 = ?$arg1 ?? $arg1.address !! QWInt2Pointer(0);
        QWQGridLayoutaddLayout_1(self.address, $a1, $row, $column, $arg4);
    }

    multi method addLayout(QLayout $arg1, Int $row, Int $column, Int $rowSpan, Int $columnSpan, Int $arg6 = Qt::Alignment())
    {
        my $a1 = ?$arg1 ?? $arg1.address !! QWInt2Pointer(0);
        QWQGridLayoutaddLayout_2(self.address, $a1, $row, $column, $rowSpan, $columnSpan, $arg6);
    }

}


sub QWQGridLayoutCtor_1(Pointer)
    returns Pointer is native(&libwrapper) { * }

sub SCWQGridLayoutCtor_1(Pointer)
    returns Pointer is native(&libwrapper) { * }

sub QWvalidateCB_QGridLayout(Pointer, int32, Str)
    is native(&libwrapper) { * }

sub QWQGridLayoutCtor_2()
    returns Pointer is native(&libwrapper) { * }

sub SCWQGridLayoutCtor_2()
    returns Pointer is native(&libwrapper) { * }

sub QWQGridLayoutDtor(Pointer)
    is native(&libwrapper) { * }

sub QWQGridLayoutsetHorizontalSpacing(Pointer, int32)
    is native(&libwrapper) { * }

sub QWQGridLayouthorizontalSpacing(Pointer)
    returns int32 is native(&libwrapper) { * }

sub QWQGridLayoutsetVerticalSpacing(Pointer, int32)
    is native(&libwrapper) { * }

sub QWQGridLayoutverticalSpacing(Pointer)
    returns int32 is native(&libwrapper) { * }

sub QWQGridLayoutsetSpacing(Pointer, int32)
    is native(&libwrapper) { * }

sub QWQGridLayoutspacing(Pointer)
    returns int32 is native(&libwrapper) { * }

sub QWQGridLayoutsetRowStretch(Pointer, int32, int32)
    is native(&libwrapper) { * }

sub QWQGridLayoutsetColumnStretch(Pointer, int32, int32)
    is native(&libwrapper) { * }

sub QWQGridLayoutrowStretch(Pointer, int32)
    returns int32 is native(&libwrapper) { * }

sub QWQGridLayoutcolumnStretch(Pointer, int32)
    returns int32 is native(&libwrapper) { * }

sub QWQGridLayoutsetRowMinimumHeight(Pointer, int32, int32)
    is native(&libwrapper) { * }

sub QWQGridLayoutsetColumnMinimumWidth(Pointer, int32, int32)
    is native(&libwrapper) { * }

sub QWQGridLayoutrowMinimumHeight(Pointer, int32)
    returns int32 is native(&libwrapper) { * }

sub QWQGridLayoutcolumnMinimumWidth(Pointer, int32)
    returns int32 is native(&libwrapper) { * }

sub QWQGridLayoutcolumnCount(Pointer)
    returns int32 is native(&libwrapper) { * }

sub QWQGridLayoutrowCount(Pointer)
    returns int32 is native(&libwrapper) { * }

sub QWQGridLayoutcellRect(Pointer, int32, int32)
    returns Pointer is native(&libwrapper) { * }

sub QWQGridLayoutaddWidget_2(Pointer, Pointer, int32, int32, int32)
    is native(&libwrapper) { * }

sub QWQGridLayoutaddWidget_3(Pointer, Pointer, int32, int32, int32, int32, int32)
    is native(&libwrapper) { * }

sub QWQGridLayoutaddLayout_1(Pointer, Pointer, int32, int32, int32)
    is native(&libwrapper) { * }

sub QWQGridLayoutaddLayout_2(Pointer, Pointer, int32, int32, int32, int32, int32)
    is native(&libwrapper) { * }



