### ----------------------------------------------------
### -- Qt::QtWidgets
### -- Licenses: GPL-3.0-or-later
### -- Authors: Yves Guillemot <yc.guillemot@wanadoo.fr>
### -- File: lib/Qt/QtWidgets/QBoxLayout.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::RQBoxLayout:ver<0.0.7>:auth<zef:yguillemot>:api<2>;
use Qt::QtWidgets::RQWidget:ver<0.0.7>:auth<zef:yguillemot>:api<2>;



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

    submethod new(|capture) is hidden-from-backtrace {
        unimplementedCtor("QBoxLayout");
    }

    method addLayout(QLayout $layout, Int $stretch = 0)
    {
        my $a1 = ?$layout ?? $layout.address !! QWInt2Pointer(0);
        QWQBoxLayoutaddLayout(self.address, $a1, $stretch);
    }

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

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

    multi method setStretchFactor(RQWidget $w, Int $stretch --> Bool)
    {
        my $a1 = ?$w ?? $w.address !! QWInt2Pointer(0);
        my $result = QWQBoxLayoutsetStretchFactor_1(self.address, $a1, $stretch);
        my $result1 = ?$result;
        return $result1;
    }

    multi method setStretchFactor(QLayout $l, Int $stretch --> Bool)
    {
        my $a1 = ?$l ?? $l.address !! QWInt2Pointer(0);
        my $result = QWQBoxLayoutsetStretchFactor_2(self.address, $a1, $stretch);
        my $result1 = ?$result;
        return $result1;
    }

    method setStretch(Int $index, Int $stretch)
    {
        QWQBoxLayoutsetStretch(self.address, $index, $stretch);
    }

    method stretch(Int $index --> Int)
    {
        my $result = QWQBoxLayoutstretch(self.address, $index);
        return $result;
    }

}


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

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

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

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

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

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

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



