KiCad PCB EDA Suite
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
display_footprints_frame.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 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
5 * Copyright The 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
28#ifndef DISPLAY_FOOTPRINTS_FRAME_H
29#define DISPLAY_FOOTPRINTS_FRAME_H
30
31#include <pcb_base_frame.h>
32#include <pcbnew_settings.h>
33
34class REPORTER;
35class COMPONENT;
36
37// The name (for wxWidgets) of the footprint viewer frame
38#define FOOTPRINTVIEWER_FRAME_NAME wxT( "FootprintViewerFrame" )
39
40
45{
46public:
47 DISPLAY_FOOTPRINTS_FRAME( KIWAY* aKiway, wxWindow* aParent );
49
56 void InitDisplay();
57
59 BOARD_ITEM_CONTAINER* GetModel() const override;
60
64 void updateView();
65
66 void LoadSettings( APP_SETTINGS_BASE* aCfg ) override;
67 void SaveSettings( APP_SETTINGS_BASE* aCfg ) override;
68
70
72
74
76 void UpdateMsgPanel() override;
77
78 COLOR_SETTINGS* GetColorSettings( bool aForceRefresh = false ) const override;
79
83 COLOR4D GetGridColor() override;
84
85 FOOTPRINT* GetFootprint( const wxString& aFootprintName, REPORTER& aReporter );
86
88
89 void ReloadFootprint( FOOTPRINT* aFootprint ) override;
90 DECLARE_EVENT_TABLE()
91
92protected:
93 void setupUIConditions() override;
94
95private:
98};
99
100#endif // DISPLAY_FOOTPRINTS_FRAME_H
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Definition: app_settings.h:92
Abstract interface for BOARD_ITEMs capable of storing other items inside.
Color settings are a bit different than most of the settings objects in that there can be more than o...
Store all of the related footprint information found in a netlist.
Definition: pcb_netlist.h:88
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
void InitDisplay()
Refresh the full display for this frame.
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
COLOR_SETTINGS * GetColorSettings(bool aForceRefresh=false) const override
Helper to retrieve the current color settings.
void setupUIConditions() override
Setup the UI conditions for the various actions and their controls in this frame.
WINDOW_SETTINGS * GetWindowSettings(APP_SETTINGS_BASE *aCfg) override
Return a pointer to the window settings for this frame.
void UpdateMsgPanel() override
Redraw the message panel.
SELECTION & GetCurrentSelection() override
Get the current selection from the canvas area.
void updateView()
Update the gal canvas (view, colors ...).
BOARD_ITEM_CONTAINER * GetModel() const override
MAGNETIC_SETTINGS * GetMagneticItemsSettings() override
PCB_VIEWERS_SETTINGS_BASE * GetViewerSettingsBase() const override
void ReloadFootprint(FOOTPRINT *aFootprint) override
Reload the footprint from the library.
FOOTPRINT * GetFootprint(const wxString &aFootprintName, REPORTER &aReporter)
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Definition: kiway.h:285
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:73
Store the common settings that are saved and loaded for each window / frame.
Definition: app_settings.h:74