OpenCPN Partial API docs
Loading...
Searching...
No Matches
thumbwin.h
1/******************************************************************************
2 *
3 * Project: OpenCPN
4 * Purpose: Chart Thumbnail Object
5 * Author: David Register
6 *
7 ***************************************************************************
8 * Copyright (C) 2010 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 */
27
28//
29
30#ifndef __thumbwin_H__
31#define __thumbwin_H__
32
33// Include wxWindows' headers
34
35#include <wx/wxprec.h>
36
37#ifndef WX_PRECOMP
38#include <wx/wx.h>
39#endif // precompiled headers
40
41// #include "ocpn_pixel.h"
42
43//----------------------------------------------------------------------------
44// constants
45//----------------------------------------------------------------------------
46
47//----------------------------------------------------------------------------
48// Fwd declarations
49//----------------------------------------------------------------------------
50
51class ChartBase;
52
53class ThumbWin; // forward
54extern ThumbWin *pthumbwin;
55
59class ThumbWin : public wxWindow {
60public:
61 ThumbWin();
62 ThumbWin(wxWindow *parent);
63 virtual ~ThumbWin();
64
65 void Resize(void);
66 void SetMaxSize(wxSize const &max_size);
67 const wxBitmap &GetBitmap(void);
68
69 wxBitmap m_bitmap;
70 ChartBase *pThumbChart;
71
72private:
73 void OnPaint(wxPaintEvent &event);
74
75 wxSize m_max_size;
76
77 DECLARE_EVENT_TABLE()
78};
79
80#endif
Base class for all chart types.
Definition chartbase.h:125
Window for displaying chart thumbnails.
Definition thumbwin.h:59