KiCad PCB EDA Suite
class_pcb_screen.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) 2009-2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 1992-2014 KiCad Developers, see CHANGELOG.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 
29 #ifndef CLASS_PCB_SCREEN_H_
30 #define CLASS_PCB_SCREEN_H_
31 
32 
33 #include <class_base_screen.h>
34 #include <class_board_item.h>
35 
36 
38 
39 
40 /* Handle info to display a board */
41 class PCB_SCREEN : public BASE_SCREEN
42 {
43 public:
47 
48 public:
49 
54  PCB_SCREEN( const wxSize& aPageSizeIU );
55 
56  ~PCB_SCREEN();
57 
58  PCB_SCREEN* Next() const { return static_cast<PCB_SCREEN*>( Pnext ); }
59 
60  void SetNextZoom();
61  void SetPreviousZoom();
62  void SetLastZoom();
63 
64  virtual int MilsToIuScalar() override;
65 
73  {
75  }
76 
82  void SetCurItem( BOARD_ITEM* aItem ) { BASE_SCREEN::SetCurItem( (EDA_ITEM*)aItem ); }
83 
84  /* full undo redo management : */
85 
86  // use BASE_SCREEN::ClearUndoRedoList()
87  // use BASE_SCREEN::PushCommandToUndoList( PICKED_ITEMS_LIST* aItem )
88  // use BASE_SCREEN::PushCommandToRedoList( PICKED_ITEMS_LIST* aItem )
89 
102  void ClearUndoORRedoList( UNDO_REDO_CONTAINER& aList, int aItemCount = -1 ) override;
103 };
104 
105 #endif // CLASS_PCB_SCREEN_H_
void SetCurItem(EDA_ITEM *aItem)
Function SetCurItem sets the currently selected object, m_CurrentItem.
void SetCurItem(BOARD_ITEM *aItem)
Function SetCurItem sets the currently selected object, m_CurrentItem.
EDA_ITEM * GetCurItem() const
Class BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class...
Classes BOARD_ITEM and BOARD_CONNECTED_ITEM.
PCB_SCREEN(const wxSize &aPageSizeIU)
Constructor.
Definition: classpcb.cpp:166
PCB_LAYER_ID m_Active_Layer
Class UNDO_REDO_CONTAINER is a holder to handle alist of undo (or redo) command.
PCB_LAYER_ID
A quick note on layer IDs:
BOARD_ITEM * GetCurItem() const
Function GetCurItem returns the currently selected BOARD_ITEM, overriding BASE_SCREEN::GetCurItem().
Class BASE_SCREEN handles how to draw a screen (a board, a schematic ...)
PCB_SCREEN * Next() const
PCB_LAYER_ID m_Route_Layer_BOTTOM
virtual int MilsToIuScalar() override
Function MilsToIuScalar returns the scalar required to convert mils to internal units.
Definition: classpcb.cpp:197
BASE_SCREEN class implementation.
void SetLastZoom()
void SetPreviousZoom()
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:151
void ClearUndoORRedoList(UNDO_REDO_CONTAINER &aList, int aItemCount=-1) override
Function ClearUndoORRedoList free the undo or redo list from List element Wrappers are deleted...
Definition: undo_redo.cpp:634
EDA_ITEM * Pnext
next in linked list
Definition: base_struct.h:164
PCB_LAYER_ID m_Route_Layer_TOP
void SetNextZoom()