/* ui/menu.h This file is part of the Osirion project and is distributed under the terms of the GNU General Public License version 2 */ #ifndef __INCLUDED_UI_MENU_H__ #define __INCLUDED_UI_MENU_H__ #include "ui/bitmap.h" #include "ui/container.h" #include "ui/button.h" #include "ui/label.h" #include "ui/window.h" namespace ui { /// a menu container class Menu : public Window { public: /// create a new menu Menu(Window *parent, const char * label = 0); ~Menu(); /// set the background bitmap void set_background_texture(const char *texture); /// set the background bitmap void set_background_texture(const std::string &texture); /// add a label Label *add_label(char const * text=0); /// add a button with a command Button *add_button(char const *text=0, char const *command=0); protected: /// resize event virtual void resize(); /// keypress event virtual bool on_keypress(const int key, const unsigned int modifier); private: Bitmap *menu_background; Container *menu_container; }; } #endif // __INCLUDED_UI_MENU_H__