OSDN Git Service

b2284e791dd942c2f0cc366fff75925c9b4e2b20
[moflib/moflib.git] / saisei-1.0 / rpg / rpg / oldcode / Menu.hpp~
1 #pragma once\r
2 #include <boost/function/function0.hpp>\r
3 #include <boost/shared_ptr.hpp>\r
4 #include "mof/MenuView.hpp"\r
5 #include "mof/MenuItemInfo.hpp"\r
6 \r
7 namespace mof{\r
8 \r
9         class LayoutManager;\r
10         class WidgetView;\r
11 \r
12         class Menu : boost::noncopyable{\r
13                 struct Impl;\r
14                 boost::scoped_ptr<Impl> m_pImpl;\r
15         public:\r
16                 \r
17                 typedef boost::function0<void> Action;\r
18                 struct MenuItem{\r
19                         MenuView* pView;\r
20                         Action action;\r
21                 };\r
22 \r
23                 Menu( \r
24                         mof::WidgetView* pBackgroundView ,\r
25                         const tstring& front , const tstring& back , \r
26                 );\r
27                 ~Menu();\r
28                 FrameNumber show(bool imidiately = false);\r
29                 FrameNumber hide(bool imidiately = false);\r
30                 void up();\r
31                 void down();\r
32                 void left();\r
33                 void right();\r
34                 void performAction() const;\r
35                 void draw() const;\r
36                 void update();\r
37 \r
38         };\r
39 }\r