KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_zone_gal.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) 2023 Ethan Chien <[email protected]>
5 * Copyright (C) 2023 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
25
26#ifndef PANEL_ZONE_GAL_H
27#define PANEL_ZONE_GAL_H
28
29#include <board_item.h>
30#include <wx/gdicmn.h>
31#include <zone.h>
32#include <memory>
33#include <wx/string.h>
35#include "pcb_draw_panel_gal.h"
37
39{
40public:
41 PANEL_ZONE_GAL( BOARD* aPcb, wxWindow* aParentWindow, KIGFX::GAL_DISPLAY_OPTIONS& aOptions,
42 wxWindowID aWindowId = 0, const wxPoint& aPosition = wxDefaultPosition,
43 const wxSize& aSize = wxDefaultSize, GAL_TYPE aGalType = GAL_TYPE_OPENGL );
44 ~PANEL_ZONE_GAL() override;
45
46
47 const wxSize GetPageSizeIU() const;
48
49 void ZoomFitScreen();
50 BOX2I GetBoardBoundingBox( bool aBoardEdgesOnly ) const;
51
52 const BOX2I GetDocumentExtents( bool aIncludeAllVisible = true ) const;
53
60 bool OnLayerSelected( int aLayer );
61
62 int GetLayer() const { return m_layer; }
63
64 void ActivateSelectedZone( ZONE* aZone ) override;
65
66 ZONE* GetZone() const { return m_zone; }
67
68private:
71 std::unique_ptr<BOARD_EDGES_BOUNDING_ITEM> m_pcb_bounding_box;
73};
74
75#endif
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:290
@ GAL_TYPE_OPENGL
OpenGL implementation.
const BOX2I GetDocumentExtents(bool aIncludeAllVisible=true) const
void ActivateSelectedZone(ZONE *aZone) override
ZONE * GetZone() const
BOX2I GetBoardBoundingBox(bool aBoardEdgesOnly) const
int GetLayer() const
const wxSize GetPageSizeIU() const
std::unique_ptr< BOARD_EDGES_BOUNDING_ITEM > m_pcb_bounding_box
bool OnLayerSelected(int aLayer)
Show the zone painting on layer.
~PANEL_ZONE_GAL() override
Subscriber who is interested in the zone selection change.
Handle a list of polygons defining a copper zone.
Definition: zone.h:73