#pragma once

#include "pvapp.h"

static const std::string STYLE_BKG =
"border-width:1 1 1 1px;"
"border-style:outset solid;"
"border-color:rgba(180,180,180,255);"
"background-color:rgba(80,80,80,80);";

class MaskMain : public PvMask
{
public:
    struct {
        int bkg = PV_ID_NUL;
        int widgetMenu = PV_ID_NUL;
        int datetime = PV_ID_NUL;
    } ui;

    std::map<int, std::pair<std::string, EPvCode>> mapMenuInfo_;

    EPvCode pvcode_;
    std::shared_ptr<PvMask> maskPage_;

    MaskMain(PARAM* p, EPvCode pvcode) : PvMask(p), pvcode_(pvcode) {}

    int initUI();

    std::shared_ptr<PvMask> createSubPage(int pvid);

    EPvCode onEventNull(int pvid) override;
    EPvCode onEventButton(int pvid) override;

};