OpenCPN Partial API docs
Loading...
Searching...
No Matches
abstract_chart_canv.h
Go to the documentation of this file.
1/**************************************************************************
2 * Copyright (C) 2026 Alec Leamas *
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 AbsTraCT_ChArt_canV_h
25#define AbsTraCT_ChArt_canV_h
26
27#include <wx/bitmap.h>
28#include <wx/gdicmn.h>
29#include <wx/window.h>
30
32class AbstractChartCanvas : public wxWindow {
33public:
34 AbstractChartCanvas(wxWindow* parent, wxPoint point, wxSize size, int flags)
35 : wxWindow(parent, wxID_ANY, point, size, flags) {}
36 virtual void ReloadVP(bool b_adjust = true) = 0;
37
38 virtual float GetVPScale() = 0;
39
40 virtual bool Show(bool show = true) = 0;
41
42 virtual double GetCanvasRangeMeters() = 0;
43
44 virtual int GetENCDisplayCategory() = 0;
45 virtual void SetCanvasRangeMeters(double range) = 0;
46 virtual wxBitmap* GetScratchBitmap() const = 0;
47 virtual void ResetGridFont() = 0;
48 virtual void ResetGlGridFont() = 0;
49 virtual void EnablePaint(bool b_enable) = 0;
50 virtual bool CanAccelerateGlPanning() = 0;
51 virtual void SetupGlCompression() = 0;
52 virtual void TriggerDeferredFocus() = 0;
53 virtual void Refresh(bool eraseBackground = true,
54 const wxRect* rect = nullptr) = 0;
55 virtual wxWindow* GetWindow() = 0;
56 virtual double GetScaleValue() = 0;
57};
58
59#endif
Minimal ChartCAnvas interface with very little dependencies.