KiCad PCB EDA Suite
Loading...
Searching...
No Matches
design_block_preview_widget.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) 2018-2024 KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef DESIGN_BLOCK_PREVIEW_WIDGET_H
21#define DESIGN_BLOCK_PREVIEW_WIDGET_H
22
23#include <wx/panel.h>
24#include <kiway.h>
27
28
29class LIB_ID;
30class DESIGN_BLOCK;
31class SCHEMATIC;
32class SCH_SHEET;
33class wxStaticText;
34class wxSizer;
35
36
37class DESIGN_BLOCK_PREVIEW_WIDGET : public wxPanel
38{
39public:
46 DESIGN_BLOCK_PREVIEW_WIDGET( wxWindow* aParent, bool aIncludeStatus,
47 EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType );
48
50
54 void SetStatusText( const wxString& aText );
55
59 void DisplayDesignBlock( DESIGN_BLOCK* aDesignBlock );
60
61protected:
62 void onSize( wxSizeEvent& aEvent );
63
64 void fitOnDrawArea(); // set the view scale to fit the item on screen and center
65
68
69 wxStaticText* m_status;
70 wxPanel* m_statusPanel;
71 wxSizer* m_statusSizer;
72 wxSizer* m_outerSizer;
73
75
78};
79
80
81#endif // DESIGN_BLOCK_PREVIEW_WIDGET_H
BOX2I m_itemBBox
The bounding box of the current item.
void DisplayDesignBlock(DESIGN_BLOCK *aDesignBlock)
Set the currently displayed symbol.
GAL_DISPLAY_OPTIONS_IMPL m_galDisplayOptions
void SetStatusText(const wxString &aText)
Set the contents of the status label and display it.
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:49
Holds all the data relating to one schematic.
Definition: schematic.h:77
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:57