KiCad PCB EDA Suite
c3d_render_base.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 <mrluzeiro@ua.pt>
5  * Copyright (C) 1992-2016 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, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
30 #ifndef C3D_RENDER_BASE_H
31 #define C3D_RENDER_BASE_H
32 
33 
34 #include <wxBasePcbFrame.h>
35 #include "../3d_canvas/cinfo3d_visu.h"
36 #include <reporter.h>
37 
42 {
43 
44 
45  // Operations
46 public:
47 
48  explicit C3D_RENDER_BASE( CINFO3D_VISU &aSettings );
49 
50  virtual ~C3D_RENDER_BASE() = 0;
51 
58  virtual void SetCurWindowSize( const wxSize &aSize ) = 0;
59 
67  virtual bool Redraw( bool aIsMoving, REPORTER *aStatusTextReporter = NULL ) = 0;
68 
73  void ReloadRequest() { m_reloadRequested = true; }
74 
79  bool IsReloadRequestPending() const { return m_reloadRequested; }
80 
87  virtual int GetWaitForEditingTimeOut() = 0;
88 
89  // Attributes
90 
91 protected:
92 
95 
98 
101 
103  wxSize m_windowSize;
104 
111  static const wxChar *m_logTrace;
112 };
113 
114 #endif // C3D_RENDER_BASE_H
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
virtual int GetWaitForEditingTimeOut()=0
GetWaitForEditingTimeOut - Give the interface the time (in ms) that it should wait for editing or mov...
CINFO3D_VISU & m_settings
settings refrence in use for this render
Classes used in Pcbnew, CvPcb and GerbView.
virtual ~C3D_RENDER_BASE()=0
bool m_is_opengl_initialized
flag if the opengl specific for this render was already initialized
C3D_RENDER_BASE(CINFO3D_VISU &aSettings)
Class CINFO3D_VISU Helper class to handle information needed to display 3D board. ...
Definition: cinfo3d_visu.h:70
bool IsReloadRequestPending() const
IsReloadRequestPending - Query if there is a pending reload request.
wxSize m_windowSize
The window size that this camera is working.
virtual bool Redraw(bool aIsMoving, REPORTER *aStatusTextReporter=NULL)=0
Redraw - Ask to redraw the view.
bool m_reloadRequested
!TODO: this must be reviewed in order to flag change types
virtual void SetCurWindowSize(const wxSize &aSize)=0
SetCurWindowSize - Before each render, the canvas will tell the render what is the size of its window...
void ReloadRequest()
ReloadRequest - !TODO: this must be reviewed to add flags to improve specific render.
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
This is a base class to hold data and functions for render targets.