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



class QFrame:ver<0.0.7>:auth<zef:yguillemot>:api<2>
    is QWidget
    is QtObject
    does RQFrame
    is export {

    enum Shadow (
        Plain => 16,
        Raised => 32,
        Sunken => 48,
    );

    enum Shape (
        NoFrame => 0,
        Box => 1,
        Panel => 2,
        WinPanel => 3,
        HLine => 4,
        VLine => 5,
        StyledPanel => 6,
    );

    multi sub ctor(QtBase $this, QWidget $parent = (QWidget), Int $f = Qt::WindowFlags()) {
        my $a1 = ?$parent ?? $parent.address !! QWInt2Pointer(0);
        $this.address = QWQFrameCtor($a1, $f);
        $this.ownedByRaku = True;
    }

    multi sub subClassCtor(QtBase $this, QWidget $parent = (QWidget), Int $f = Qt::WindowFlags()) {
        my $a1 = ?$parent ?? $parent.address !! QWInt2Pointer(0);
        $this.address = SCWQFrameCtor($a1, $f);
        $this.ownedByRaku = True;
    }

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

    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 QFrame $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 {
            QWQFrameDtor(self.address);
            self.ownedByRaku = False;
        }
    }

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

    method setFrameStyle(Int $arg1)
    {
        QWQFramesetFrameStyle(self.address, $arg1);
    }

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

    method sizeHint( --> QSize)
    {
        my $result = QWQFramesizeHint(self.address);
        my $result1 = QSize.new($result, obr => True);
        return $result1;
    }

    method frameShape( --> QFrame::Shape)
    {
        my $result = QWQFrameframeShape(self.address);
        my $result1 = QFrame::Shape($result);
        return $result1;
    }

    method setFrameShape(QFrame::Shape $arg1)
    {
        QWQFramesetFrameShape(self.address, $arg1);
    }

    method frameShadow( --> QFrame::Shadow)
    {
        my $result = QWQFrameframeShadow(self.address);
        my $result1 = QFrame::Shadow($result);
        return $result1;
    }

    method setFrameShadow(QFrame::Shadow $arg1)
    {
        QWQFramesetFrameShadow(self.address, $arg1);
    }

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

    method setLineWidth(Int $arg1)
    {
        QWQFramesetLineWidth(self.address, $arg1);
    }

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

    method setMidLineWidth(Int $arg1)
    {
        QWQFramesetMidLineWidth(self.address, $arg1);
    }

    method frameRect( --> QRect)
    {
        my $result = QWQFrameframeRect(self.address);
        my $result1 = QRect.new($result, obr => True);
        return $result1;
    }

    method setFrameRect(QRect $arg1)
    {
        my $a1 = $arg1.address;
        QWQFramesetFrameRect(self.address, $a1);
    }

}


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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



