OpenCPN Partial API docs
Loading...
Searching...
No Matches
canvasMenu.h
1/***************************************************************************
2 *
3 * Project: OpenCPN
4 * Purpose: CanvasMenuHandler
5 * Author: David Register
6 *
7 ***************************************************************************
8 * Copyright (C) 2015 by David S. Register *
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 * This program is distributed in the hope that it will be useful, *
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 * GNU General Public License for more details. *
19 * *
20 * You should have received a copy of the GNU General Public License *
21 * along with this program; if not, write to the *
22 * Free Software Foundation, Inc., *
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
24 **************************************************************************/
25
26#ifndef __CANVASMENU_H__
27#define __CANVASMENU_H__
28
29#include "bbox.h"
30
31#include <wx/datetime.h>
32#include <wx/treectrl.h>
33#include <wx/dirctrl.h>
34#include <wx/sound.h>
35#include <wx/grid.h>
36#include <wx/wxhtml.h>
37
38#include "ocpndc.h"
39#include "undo.h"
40
41#include "ocpCursor.h"
42#include "S57QueryDialog.h"
43#include "GoToPositionDialog.h"
44#include "DetailSlider.h"
45#include "RolloverWin.h"
46#include "AISTargetQueryDialog.h"
47#include "timers.h"
48#include "emboss_data.h"
49
50
51class wxGLContext;
52class GSHHSChart;
53class IDX_entry;
54
55//----------------------------------------------------------------------------
56// Forward Declarations
57//----------------------------------------------------------------------------
58class Route;
59class TCWin;
60class RoutePoint;
61class SelectItem;
62class BoundingBox;
63class ocpnBitmap;
64class WVSChart;
65class MyFrame;
66class ChartBaseBSB;
67class ChartBase;
68class AisTargetData;
69class S57ObjectTree;
70class S57ObjectDesc;
71class RolloverWin;
72class Quilt;
73class PixelCache;
74class ChInfoWin;
75class glChartCanvas;
76class Track;
77
78//----------------------------------------------------------------------------
79// CanvasMenuHandler
80//----------------------------------------------------------------------------
81class CanvasMenuHandler : public wxEvtHandler {
82public:
83 CanvasMenuHandler(ChartCanvas *parentCanvas, Route *selectedRoute,
84 Track *selectedTrack, RoutePoint *selectedPoint,
85 int selectedAIS_MMSI, void *selectedTCIndex);
86
88
89 void CanvasPopupMenu(int x, int y, int seltype);
90 void PopupMenuHandler(wxCommandEvent &event);
91 static int GetNextContextMenuId();
92 void PrepareMenuItem( wxMenuItem *item );
93 void MenuPrepend1(wxMenu *menu, int id, wxString label);
94 void MenuAppend1(wxMenu *menu, int id, wxString label);
95 void SetMenuItemFont1(wxMenuItem *item);
96
97 static wxFont m_scaledFont;
98
99private:
100 int popx, popy;
101 ChartCanvas *parent;
102 Route *m_pSelectedRoute;
103 Track *m_pSelectedTrack;
104 RoutePoint *m_pFoundRoutePoint;
105 Route *m_pHead; // for split function
106 Route *m_pTail;
107 int m_SelectedIdx;
108 int m_FoundAIS_MMSI;
109 void *m_pIDXCandidate;
110 double m_DIPFactor;
111};
112
113#endif
Definition: IDX_entry.h:41
Definition: Quilt.h:84
Definition: route.h:70
Definition: TCWin.h:46
Definition: track.h:79