/******************************************************************************
 * QSkinny - Copyright (C) The authors
 *           SPDX-License-Identifier: BSD-3-Clause
 *****************************************************************************/

#pragma once

#include <QskSkinlet.h>

class MyToggleButton;

class MyToggleButtonSkinlet : public QskSkinlet
{
    Q_GADGET

    using Inherited = QskSkinlet;

  public:
    enum NodeRole
    {
        PanelRole,
        CursorRole,

        CheckedLabelRole,
        CheckedGraphicRole,

        UncheckedLabelRole,
        UncheckedGraphicRole
    };

    Q_INVOKABLE MyToggleButtonSkinlet( QskSkin* = nullptr );
    ~MyToggleButtonSkinlet() override = default;

    QRectF subControlRect( const QskSkinnable*,
        const QRectF&, QskAspect::Subcontrol ) const override;

    QSizeF sizeHint( const QskSkinnable*,
        Qt::SizeHint, const QSizeF& ) const override;

  protected:
    QSGNode* updateSubNode( const QskSkinnable*,
        quint8 nodeRole, QSGNode* ) const override;
};
