about summary refs log tree commit diff stats
path: root/src/tracker_frame.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tracker_frame.h')
-rw-r--r--src/tracker_frame.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/tracker_frame.h b/src/tracker_frame.h index 9d18dc7..e9fec17 100644 --- a/src/tracker_frame.h +++ b/src/tracker_frame.h
@@ -13,10 +13,34 @@ class TrackerPanel;
13class wxBookCtrlEvent; 13class wxBookCtrlEvent;
14class wxNotebook; 14class wxNotebook;
15 15
16class ApConnectEvent : public wxEvent {
17 public:
18 ApConnectEvent(wxEventType eventType, int winid, std::string server,
19 std::string user, std::string pass)
20 : wxEvent(winid, eventType),
21 ap_server_(std::move(server)),
22 ap_user_(std::move(user)),
23 ap_pass_(std::move(pass)) {}
24
25 const std::string &GetServer() const { return ap_server_; }
26
27 const std::string &GetUser() const { return ap_user_; }
28
29 const std::string &GetPass() const { return ap_pass_; }
30
31 virtual wxEvent *Clone() const { return new ApConnectEvent(*this); }
32
33 private:
34 std::string ap_server_;
35 std::string ap_user_;
36 std::string ap_pass_;
37};
38
16wxDECLARE_EVENT(STATE_RESET, wxCommandEvent); 39wxDECLARE_EVENT(STATE_RESET, wxCommandEvent);
17wxDECLARE_EVENT(STATE_CHANGED, wxCommandEvent); 40wxDECLARE_EVENT(STATE_CHANGED, wxCommandEvent);
18wxDECLARE_EVENT(STATUS_CHANGED, wxCommandEvent); 41wxDECLARE_EVENT(STATUS_CHANGED, wxCommandEvent);
19wxDECLARE_EVENT(REDRAW_POSITION, wxCommandEvent); 42wxDECLARE_EVENT(REDRAW_POSITION, wxCommandEvent);
43wxDECLARE_EVENT(CONNECT_TO_AP, ApConnectEvent);
20 44
21enum UpdateIndicatorsMode { 45enum UpdateIndicatorsMode {
22 kUPDATE_ALL_INDICATORS = 0, 46 kUPDATE_ALL_INDICATORS = 0,
@@ -27,6 +51,7 @@ class TrackerFrame : public wxFrame {
27 public: 51 public:
28 TrackerFrame(); 52 TrackerFrame();
29 53
54 void ConnectToAp(std::string server, std::string user, std::string pass);
30 void UpdateStatusMessage(); 55 void UpdateStatusMessage();
31 56
32 void ResetIndicators(); 57 void ResetIndicators();
@@ -36,7 +61,8 @@ class TrackerFrame : public wxFrame {
36 private: 61 private:
37 void OnExit(wxCommandEvent &event); 62 void OnExit(wxCommandEvent &event);
38 void OnAbout(wxCommandEvent &event); 63 void OnAbout(wxCommandEvent &event);
39 void OnConnect(wxCommandEvent &event); 64 void OnApConnect(wxCommandEvent &event);
65 void OnIpcConnect(wxCommandEvent &event);
40 void OnSettings(wxCommandEvent &event); 66 void OnSettings(wxCommandEvent &event);
41 void OnCheckForUpdates(wxCommandEvent &event); 67 void OnCheckForUpdates(wxCommandEvent &event);
42 void OnZoomIn(wxCommandEvent &event); 68 void OnZoomIn(wxCommandEvent &event);
@@ -48,6 +74,7 @@ class TrackerFrame : public wxFrame {
48 void OnStateChanged(wxCommandEvent &event); 74 void OnStateChanged(wxCommandEvent &event);
49 void OnStatusChanged(wxCommandEvent &event); 75 void OnStatusChanged(wxCommandEvent &event);
50 void OnRedrawPosition(wxCommandEvent &event); 76 void OnRedrawPosition(wxCommandEvent &event);
77 void OnConnectToAp(ApConnectEvent &event);
51 78
52 void CheckForUpdates(bool manual); 79 void CheckForUpdates(bool manual);
53 80