MT Showcase SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
ContentMenuWidget.hpp
1 #ifndef CONTENTMENUWIDGET_HPP
2 #define CONTENTMENUWIDGET_HPP
3 
4 #include "Export.hpp"
5 
6 #include <MultiWidgets/Widget.hpp>
7 
8 namespace Showcase
9 {
11  class SHOWCASE_API ContentMenuWidget : public MultiWidgets::Widget
12  {
13  public:
14  typedef uint64_t MenuNodeId;
15  typedef std::pair<MenuNodeId, MultiWidgets::WidgetPtr> MenuNode;
16 
18  virtual ~ContentMenuWidget() {}
19 
22  virtual void setMenuHost(MultiWidgets::WidgetPtr host) = 0;
23 
26  virtual MenuNode createRootItem(const Nimble::Vector2f & loc, float rotation = 0) = 0;
27 
32  virtual MenuNode createTeaser(const Nimble::Vector2f & loc, bool open) = 0;
33 
36  virtual void removeItem(MenuNodeId id) = 0;
37 
39  virtual MultiWidgets::WidgetPtr getNode(MenuNodeId id) = 0;
40 
42  virtual void clear() = 0;
43  };
44  INTRUSIVE_PTR_TYPEDEF(ContentMenuWidget);
45 }
46 
47 #endif // CONTENTMENUWIDGET_HPP