29#include <wx/html/htmlwin.h>
31#include <wx/textctrl.h>
38class CopyableText :
public wxTextCtrl {
40 CopyableText(wxWindow* parent,
const char* text);
74extern int OCPNMessageBox(wxWindow* parent,
const wxString& message,
75 const wxString& caption =
"Message",
int style = wxOK,
76 int timout_sec = -1,
int x = -1,
int y = -1);
78class OCPNMessageDialog :
public wxDialog {
80 OCPNMessageDialog(wxWindow* parent,
const wxString& message,
81 const wxString& caption = wxMessageBoxCaptionStr,
82 long style = wxOK | wxCENTRE,
83 const wxPoint& pos = wxDefaultPosition);
85 void OnYes(wxCommandEvent& event);
86 void OnNo(wxCommandEvent& event);
87 void OnCancel(wxCommandEvent& event);
88 void OnClose(wxCloseEvent& event);
95class TimedMessageBox :
public wxEvtHandler {
97 TimedMessageBox(wxWindow* parent,
const wxString& message,
98 const wxString& caption =
"Message box",
99 long style = wxOK | wxCANCEL,
int timeout_sec = -1,
100 const wxPoint& pos = wxDefaultPosition);
102 int GetRetVal(
void) {
return ret_val; }
103 void OnTimer(wxTimerEvent& evt);
109 DECLARE_EVENT_TABLE()
117class TimedPopupWin :
public wxWindow {
119 TimedPopupWin(wxWindow* parent,
int timeout = -1);
122 void OnPaint(wxPaintEvent& event);
124 void SetBitmap(wxBitmap& bmp);
125 wxBitmap* GetBitmap() {
return m_pbm; }
126 void OnTimer(wxTimerEvent& event);
127 bool IsActive() {
return isActive; }
128 void IsActive(
bool state) { isActive = state; }
132 wxTimer m_timer_timeout;
136 DECLARE_EVENT_TABLE()
146class InfoButton :
public wxButton {
148 InfoButton(wxWindow* parent,
bool touch,
const char* header,
Small monochrome SVG icon scaled to the height of a char.
wxFont * GetOCPNScaledFont(wxString item, int default_size=0)
Retrieves a font from FontMgr, optionally scaled for physical readability.
wxFont GetOCPNGUIScaledFont(wxString item)
Retrieves a font optimized for touch and high-resolution interfaces.
Class StdIcon, typically a small monochrome svg icon.