#ifndef __ListBox__
#define __ListBox__

#ifndef GUI_DLL 
    #ifdef GUI_BUILD
	    #define GUI_DLL __declspec(dllexport)
    #else
	    #define GUI_DLL __declspec(dllimport)
        #pragma comment(lib, "WindowManager.lib")
    #endif
#endif

#include "Window.h"

class GUI_DLL ListBox : public Window {
public:
    ListBox(Window* parent = 0);
    virtual ~ListBox();

    void addItem(const wchar_t* item);
    const wchar_t* getItem(int index);

    virtual void setSize(Size& size);

    int getSelection();
    void setSelection(int selection);

    virtual void enable(bool enabled);

protected:
    void onListBoxButtonLeftClick(Event& event);
    void onDropDownListLeftClick(Event& event);
    void onLeftClick(Event& event);

    class ListBoxButton;
    ListBoxButton* _button;

    class DropDownList;
    DropDownList* _list;

    int _selection;

    Texture* _normalTexture;
    Texture* _disabledTexture; 
};

#endif