2019-06-13 17:28:55 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2021-01-26 15:23:37 +00:00
|
|
|
* Copyright (C) 2019-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
2019-06-13 17:28:55 +00:00
|
|
|
*
|
|
|
|
* 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>
|
2020-10-14 01:06:53 +00:00
|
|
|
#include <eda_item.h>
|
2018-08-03 12:18:26 +00:00
|
|
|
#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
|
|
|
|
|
|
|
|
2021-06-10 18:51:46 +00:00
|
|
|
class LIB_SYMBOL;
|
2018-08-03 12:18:26 +00:00
|
|
|
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();
|
|
|
|
|
2021-06-14 18:00:08 +00:00
|
|
|
void DisplaySymbol( LIB_SYMBOL *aSymbol );
|
2020-12-20 18:44:13 +00:00
|
|
|
void DisplaySheet( 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;
|
|
|
|
|
2021-01-26 15:23:37 +00:00
|
|
|
///< @copydoc EDA_DRAW_PANEL_GAL::OnShow()
|
2019-12-10 15:47:13 +00:00
|
|
|
void OnShow() override;
|
|
|
|
|
2021-01-26 15:23:37 +00:00
|
|
|
void setDefaultLayerOrder(); ///< Reassign layer order to the initial settings.
|
|
|
|
void setDefaultLayerDeps(); ///< Set rendering targets & dependencies for layers.
|
2018-08-03 12:18:26 +00:00
|
|
|
};
|
|
|
|
|
2020-12-20 18:50:45 +00:00
|
|
|
#endif // __SCH_DRAW_PANEL_H
|