diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-06-10 00:50:37 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-06-20 20:09:15 +0200 |
| commit | 9946c7aabecbb578dcbcb37f27973a98616956ce (patch) | |
| tree | 2a3029fee1bdb43cd31bf9169bc8dd440d6f6c4c /src/wx/wx_help.h | |
| parent | 2d9ad1b7bb17ae209aab7f85eb9d850bfead265f (diff) | |
First hacks on OOBE help.
Diffstat (limited to 'src/wx/wx_help.h')
| -rw-r--r-- | src/wx/wx_help.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/src/wx/wx_help.h b/src/wx/wx_help.h new file mode 100644 index 000000000..0d566346d --- /dev/null +++ b/src/wx/wx_help.h @@ -0,0 +1,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; +}; + + |
