#ifndef WIDGET_H_INCLUDED
#define WIDGET_H_INCLUDED

#include "graphics.hpp"

/// Ős widget osztály

class widget
{
protected:
    float x,y;
    float width, height;
public:
    bool tabStop;
    bool focus;

    widget(float x0, float y0, float width0, float height0);

    virtual void onClick(float posX, float posY, char button) {}
    virtual void onMouseUp(float posX, float posY, char button) {}
    virtual void onMouseMove(float posX, float posY) {}
    virtual void onKeyPress(int keyCode) {}
    virtual void onKeyUp(int keyCode) {}
    virtual void onTick() {}
    virtual void onGetFocus() {}
    virtual void onLostFocus() {}

    virtual bool event (genv::event &ev);
    virtual void draw() const {}
};

#endif // WIDGET_H_INCLUDED
