#pragma once #include "Cevo/CevoButtonBase.h" namespace Cevo { // TButtonB equivalent: a 25x25 button whose sprite is cut out with a mask // (SRCAND) and painted in (SRCPAINT) over the background, selected by // ButtonIndex from a 12-columns-wide grid. class ButtonB : public ButtonBase { Q_OBJECT public: explicit ButtonB(QWidget *parent = nullptr); Dpi::Bitmap *mask() const { return m_mask; } void setMask(Dpi::Bitmap *value) { m_mask = value; } int buttonIndex() const { return m_index; } void setButtonIndex(int value); protected: void paint(Dpi::Canvas &canvas) override; private: Dpi::Bitmap *m_mask = nullptr; int m_index = -1; Dpi::Bitmap m_buffer; }; } // namespace Cevo