1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
#include "lib/help.h"
#include <wx/wx.h>
#include <boost/optional.hpp>
#include <map>
#include <string>
#include <vector>
class HelpGUI
{
public:
static HelpGUI* instance ();
void start ();
enum Landmark {
ADD_FOLDER_BUTTON,
PLAY_BUTTON
};
void landmark (wxWindow* landmark, Landmark id);
private:
class Message
{
public:
Message (std::string id_, wxPoint anchor_, Help::EventType next_trigger_)
: id (id_)
, anchor_point (anchor_)
, next_trigger (next_trigger_)
{}
Message (std::string id_, Landmark anchor_, wxSize offset_)
: id (id_)
, anchor_landmark (anchor_)
, offset (offset_)
{}
Message (std::string id_, Landmark anchor_, wxSize offset_, Help::EventType next_trigger_)
: id (id_)
, anchor_landmark (anchor_)
, offset (offset_)
, next_trigger (next_trigger_)
{}
std::string id;
boost::optional<wxPoint> anchor_point;
boost::optional<Landmark> anchor_landmark;
wxSize offset;
boost::optional<Help::EventType> next_trigger;
};
HelpGUI ();
void event (Help::EventType e);
void show (int index);
void next ();
void stop ();
static HelpGUI* _instance;
int _current_index;
wxFrame* _current_frame;
std::vector<Message> _messages;
std::map<Landmark, wxWindow*> _landmarks;
};
|