#ifndef CHECKBOX_H_INCLUDED
#define CHECKBOX_H_INCLUDED

#include "widget.h"
#include "label.h"

/// Kipipálós mezõ

class checkBox : public widget
{
private:
    static int cnt; // Objektumszámláló

    // Pipálható terület paraméterei
    const unsigned int boxX = 5, boxY = 5;
    const unsigned int boxW = 20, boxH = 20;

protected:
    label *myLabel;

public:
    /// ---- Mezők ----
    bool checked;

    /// ---- Konstruktor
    checkBox(int x0, int y0, unsigned int width0, unsigned int height0);
    /// ---- Destruktor ----
    ~checkBox() {}

    /// ---- Események ----
    virtual void onClick(int posX, int posY, char button);
    virtual void onMouseUp(int posX, int posY, char button) {}
    virtual void onMouseMove(int posX, int posY) {}
    virtual void onKeyPress(char keyCode);
    virtual void onKeyUp(char keyCode) {}
    virtual void onTick() {}

    /// --- Get/Set ----
    void setText(std::string txt);
    std::string getText() const;

    /// ---- Kirajzolás ----
    void draw() const;
};

#endif // CHECKBOX_H_INCLUDED
