KiCad PCB EDA Suite
Loading...
Searching...
No Matches
hidpi_gl_3D_canvas.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2015-2016 Mario Luzeiro <[email protected]>
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
21#ifndef HIDPI_GL_3D_CANVAS_H
22#define HIDPI_GL_3D_CANVAS_H
23
24#include <gal/gal.h>
25#include <atomic>
26#include <gal/3d/camera.h>
27#include <gal/hidpi_gl_canvas.h>
28#include <wx/image.h>
29#include <wx/timer.h>
30
36{
37public:
38 // wxGLCanvas constructor
39
40 HIDPI_GL_3D_CANVAS( const KIGFX::VC_SETTINGS& aVcSettings, CAMERA& aCamera, wxWindow* parent,
41 const wxGLAttributes& aGLAttribs, wxWindowID id = wxID_ANY,
42 const wxPoint& pos = wxDefaultPosition,
43 const wxSize& size = wxDefaultSize, long style = 0,
44 const wxString& name = wxGLCanvasName,
45 const wxPalette& palette = wxNullPalette );
46
47 bool m_mouse_is_moving; // Mouse activity is in progress
49 bool m_camera_is_moving; // Camera animation is ongoing
50
52 static const float m_delta_move_step_factor; // Step factor to used with cursor on
53 // relation to the current zoom
54
58 CAMERA* GetCamera() { return &m_camera; }
59
60 void OnMouseMoveCamera( wxMouseEvent& event );
61 void OnMouseWheelCamera( wxMouseEvent& event, bool aPan );
62};
63
64
65#endif // HIDPI_GL_3D_CANVAS_H
const char * name
Define an abstract camera.
A class used to derive camera objects from.
Definition camera.h:99
static const float m_delta_move_step_factor
HIDPI_GL_3D_CANVAS(const KIGFX::VC_SETTINGS &aVcSettings, CAMERA &aCamera, wxWindow *parent, const wxGLAttributes &aGLAttribs, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxGLCanvasName, const wxPalette &palette=wxNullPalette)
CAMERA * GetCamera()
Get the canvas camera.
HIDPI_GL_CANVAS(const KIGFX::VC_SETTINGS &aSettings, wxWindow *aParent, const wxGLAttributes &aGLAttribs, wxWindowID aId=wxID_ANY, const wxPoint &aPos=wxDefaultPosition, const wxSize &aSize=wxDefaultSize, long aStyle=0, const wxString &aName=wxGLCanvasName, const wxPalette &aPalette=wxNullPalette)
#define GAL_API
Definition gal.h:27
Structure to keep VIEW_CONTROLS settings for easy store/restore operations.