25#ifndef _N0183_DLG_CTX_FACTORY_H__
26#define _N0183_DLG_CTX_FACTORY_H__
33#include "SendToGpsDlg.h"
34#include "model/comm_n0183_output.h"
36static bool ConfirmOverwrite() {
38 OCPNMessageBox(NULL, _(
"Overwrite Garmin device route number 1?"),
39 _(
"OpenCPN Message"), wxOK | wxCANCEL | wxICON_QUESTION);
45 dlg_ctx.set_value = [dialog](
int v) {
46 if (!dialog || !dialog->GetProgressGauge())
return;
47 dialog->GetProgressGauge()->SetValue(v);
48 dialog->GetProgressGauge()->Refresh();
49 dialog->GetProgressGauge()->Update();
51 dlg_ctx.set_range = [dialog](
int r) {
52 if (!dialog || !dialog->GetProgressGauge())
return;
53 dialog->GetProgressGauge()->SetRange(r);
55 dlg_ctx.pulse = [dialog](void) {
56 if (!dialog || !dialog->GetProgressGauge())
return;
57 dialog->GetProgressGauge()->Pulse();
59 dlg_ctx.set_message = [dialog](
const std::string& s) {
60 dialog->SetMessage(wxString(s));
62 dlg_ctx.confirm_overwrite = []() {
return ConfirmOverwrite(); };
Dialog for sending routes/waypoints to a GPS device.
General purpose GUI support.