#ifndef __USERFACE_H__
#define __USERFACE_H__

#include <gtkmm/drawingarea.h>
#include "StateImage.h"
#include <sigc++/sigc++.h>

class UserFace : public Gtk::DrawingArea {
public:
    explicit UserFace();
    virtual ~UserFace();

    void setStateImage(const StateImage& stImage);

private:
    bool onUserFaceRealDraw(const ::Cairo::RefPtr<::Cairo::Context>& cr);
    bool onEventReceived(GdkEvent* event);
    bool checkPointInside(int x, int y);

private:
    StateImage m_stImage;
    StateImage::State m_currentSt;
    sigc::signal<bool, GdkEvent*> m_userFacePressed;

    sigc::connection m_sigDrawIter;
    sigc::connection m_sigEventIter;
};

#endif  // __CF_USERFACE_H__