OpenCPN Partial API docs
Loading...
Searching...
No Matches
s57_query_dlg.h
Go to the documentation of this file.
1/***************************************************************************
2 * Copyright (C) 2013 by David S. Register *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, see <https://www.gnu.org/licenses/>. *
16 **************************************************************************/
17
24#ifndef S57QUERYDIALOG_H_
25#define S57QUERYDIALOG_H_
26
27#include <wx/button.h>
28#include <wx/frame.h>
29#include <wx/html/htmlwin.h>
30#include <wx/string.h>
31
32class S57QueryDialog; // forward
34
40class S57QueryDialog : public wxFrame {
41 DECLARE_CLASS(S57QueryDialog)
42 DECLARE_EVENT_TABLE()
43public:
45
47 S57QueryDialog(wxWindow* parent, wxWindowID id = wxID_ANY,
48 const wxString& caption = _("Object Query"),
49 const wxPoint& pos = wxDefaultPosition,
50 const wxSize& size = wxDefaultSize,
51 long style = wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU);
52
54 void Init();
55
56 bool Create(wxWindow* parent, wxWindowID id = wxID_ANY,
57 const wxString& caption = _("Object Query"),
58 const wxPoint& pos = wxDefaultPosition,
59 const wxSize& size = wxDefaultSize,
60 long style = wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU);
61
62 void SetColorScheme();
63
64 void CreateControls();
65 void OnSize(wxSizeEvent& event);
66 void RecalculateSize();
67
68 void OnClose(wxCloseEvent& event);
69 void OnHtmlLinkClicked(wxHtmlLinkEvent& event);
70
71 void OnOKClick(wxCommandEvent& event) { Close(); }
72 void OnKey(wxKeyEvent& ke);
73
74 // Overrides
75 void OnPaint(wxPaintEvent& event);
76
77 void SetHTMLPage(wxString& page);
78
79 // Data
80 wxHtmlWindow* m_phtml;
81 wxSize m_createsize;
82
83 wxButton* m_btnOK;
84};
85
92 DECLARE_CLASS(S57ExtraQueryInfoDlg)
93 DECLARE_EVENT_TABLE()
94public:
96
98 S57ExtraQueryInfoDlg(wxWindow* parent, wxWindowID id = wxID_ANY,
99 const wxString& caption = _("Extra Object Info"),
100 const wxPoint& pos = wxDefaultPosition,
101 const wxSize& size = wxDefaultSize,
102 long style = wxCAPTION | wxRESIZE_BORDER |
103 wxSYSTEM_MENU);
104 bool Create(wxWindow* parent, wxWindowID id = wxID_ANY,
105 const wxString& caption = _("Extra Object Info"),
106 const wxPoint& pos = wxDefaultPosition,
107 const wxSize& size = wxDefaultSize,
108 long style = wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU);
109
111 void OnClose(wxCloseEvent& event);
112 void OnSize(wxSizeEvent& event);
113 void RecalculateSize();
114
115private:
116 wxButton* m_btnOK;
117};
118
119#endif
Dialog for displaying extra query information for S57 objects.
S57ExtraQueryInfoDlg()
Constructors.
Dialog for displaying query results of S57 objects.
S57QueryDialog()
Constructors.
S57QueryDialog * g_pObjectQueryDialog
Global instance.