//
// Okzoniom::RPG
// Copyright (C) 2010 - 2013
// 
//  - Louis SCHNELLBACH
//

$hfile "../UI/Widget.h"
$hfile "../UI/TextBase.h"
$hfile "../UI/Text2D.h"

class Widget
{
    Widget(const string& id, Widget* parent=NULL) ;

    string getID() const;
    void callback(string);

    Widget* getParent();
    void addChild(Widget* w);
    void removeChild(Widget* w);
    Widget* getRootParent();

    void visible(bool b);
    bool isVisible() const;

    void focus(bool b);
    void focusable(bool);
    bool isFocused() const;
    bool isKeepingFocus() const;
    bool isFocusable() const;

    void movable(bool);
    bool isMovable() const;

    void setSize(TVertex<float>);
    TVertex<float> getSize() const;
    void setOffset(TVertex<float>);
    TVertex<float> getOffset() const;
    void setPosition(TVertex<float>);
    TVertex<float> getPosition() const;

    bool contains(float x, float y) const;
};