KiCad PCB EDA Suite
size_menu.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) 2015 CERN
5  * @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
6  * @author Maciej Suminski <maciej.suminski@cern.ch>
7  *
8  * This program is free software: you can redistribute it and/or modify it
9  * under the terms of the GNU General Public License as published by the
10  * Free Software Foundation, either version 3 of the License, or (at your
11  * option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #include <tool/context_menu.h>
23 
24 class BOARD;
25 
31 {
32 public:
38  TRACK_VIA_SIZE_MENU( bool aTrackSizes, bool aViaSizes );
39 
40  virtual ~TRACK_VIA_SIZE_MENU() {}
41 
47  virtual void AppendSizes( const BOARD* aBoard );
48 
49  virtual CONTEXT_MENU* create() const override
50  {
51  return new TRACK_VIA_SIZE_MENU( m_tracks, m_vias );
52  }
53 
54 protected:
56  bool m_tracks;
57 
59  bool m_vias;
60 };
Context menu that displays track and/or via sizes basing on the board design settings of a BOARD obje...
Definition: size_menu.h:30
TRACK_VIA_SIZE_MENU(bool aTrackSizes, bool aViaSizes)
Constructor.
Definition: size_menu.cpp:29
Class CONTEXT_MENU.
Definition: context_menu.h:44
virtual void AppendSizes(const BOARD *aBoard)
Function AppendSizes() Appends the list of tracks/vias (depending on the parameters passed to the con...
Definition: size_menu.cpp:36
virtual CONTEXT_MENU * create() const override
Returns an instance of this class. It has to be overridden in inheriting classes. ...
Definition: size_menu.h:49
bool m_vias
Whether the generated menu should contain via sizes.
Definition: size_menu.h:59
bool m_tracks
Whether the generated menu should contain track sizes.
Definition: size_menu.h:56
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:169
virtual ~TRACK_VIA_SIZE_MENU()
Definition: size_menu.h:40