/*Copyright (C) 2010-2012 Duncan Deveaux

This file is part of Hikou no mizu.

Hikou no mizu is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Hikou no mizu is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Hikou no mizu.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef DEF_TAB
#define DEF_TAB

#include "Widget.hpp"

#include "Graphics/Drawable/Text.hpp"
#include <vector>

class Tab : public Widget
{
    public:
        Tab();
        void draw();
        
        virtual bool mouseClick(const Vector &mouseCoords) = 0;
        virtual bool mouseMove(const Vector &mouseCoords) = 0;
        
        void setLabelFont(Font &font);
        const Font *getLabelFont() const;
        
        float getWidth() const;
        float getHeight() const;
    
    protected:
        bool addWidget(const std::string &label, Widget &widget, float space);
        
        std::vector< std::pair<Text, Widget*> > m_widgetsList;
        Font *m_labelFont;
        
        float m_horizontalSpace;
};

#endif
