2019-06-13 17:28:55 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2019 KiCad Developers, see AUTHORS.txt for contributors.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2018-08-03 12:18:26 +00:00
|
|
|
#ifndef __SCH_DRAW_PANEL_H
|
|
|
|
#define __SCH_DRAW_PANEL_H
|
|
|
|
|
|
|
|
#include <class_draw_panel_gal.h>
|
|
|
|
#include <base_struct.h>
|
|
|
|
#include <gr_basic.h>
|
|
|
|
#include <eda_rect.h>
|
2019-06-13 17:28:55 +00:00
|
|
|
#include <sch_view.h>
|
2018-08-03 12:18:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
class LIB_PART;
|
|
|
|
class SCH_SCREEN;
|
|
|
|
|
2018-08-28 13:27:13 +00:00
|
|
|
|
2019-05-31 17:37:07 +00:00
|
|
|
class SCH_DRAW_PANEL : public EDA_DRAW_PANEL_GAL
|
2018-08-03 12:18:26 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
SCH_DRAW_PANEL( wxWindow* aParentWindow, wxWindowID aWindowId, const wxPoint& aPosition,
|
2018-08-28 13:27:13 +00:00
|
|
|
const wxSize& aSize, KIGFX::GAL_DISPLAY_OPTIONS& aOptions,
|
|
|
|
GAL_TYPE aGalType = GAL_TYPE_OPENGL );
|
2018-08-03 12:18:26 +00:00
|
|
|
|
|
|
|
~SCH_DRAW_PANEL();
|
|
|
|
|
2019-04-17 19:09:48 +00:00
|
|
|
void DisplayComponent( const LIB_PART *aComponent );
|
|
|
|
void DisplaySheet( const SCH_SCREEN *aScreen );
|
2018-08-03 12:18:26 +00:00
|
|
|
|
|
|
|
bool SwitchBackend( GAL_TYPE aGalType ) override;
|
|
|
|
|
2019-06-13 17:28:55 +00:00
|
|
|
KIGFX::SCH_VIEW* GetView() const override;
|
2018-08-03 12:18:26 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void onPaint( wxPaintEvent& WXUNUSED( aEvent ) ) override;
|
|
|
|
|
2019-12-10 15:47:13 +00:00
|
|
|
///> @copydoc EDA_DRAW_PANEL_GAL::OnShow()
|
|
|
|
void OnShow() override;
|
|
|
|
|
2019-04-17 19:09:48 +00:00
|
|
|
void setDefaultLayerOrder(); ///> Reassigns layer order to the initial settings.
|
|
|
|
void setDefaultLayerDeps(); ///> Sets rendering targets & dependencies for layers.
|
2018-08-03 12:18:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|