KiCad PCB EDA Suite
pcb_view.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) 2013-2016 CERN
5  * @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
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 #ifndef __PCB_VIEW_H
26 #define __PCB_VIEW_H
27 
29 #include <view/view.h>
30 #include <class_board_item.h>
31 
33 
34 namespace KIGFX {
35 
36 class PCB_VIEW : public VIEW
37 {
38 public:
39  PCB_VIEW( bool aIsDynamic = true );
40  virtual ~PCB_VIEW();
41 
43  virtual void Add( VIEW_ITEM* aItem, int aDrawPriority = -1 ) override;
45 
46  virtual void Remove( VIEW_ITEM* aItem ) override;
47 
49  virtual void Update( VIEW_ITEM* aItem, int aUpdateFlags ) override;
50 
52  virtual void Update( VIEW_ITEM* aItem ) override;
53 
54  void UpdateDisplayOptions( PCB_DISPLAY_OPTIONS* aOptions );
55 };
56 
57 }
58 
59 #endif
Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer.
Definition: class_module.h:58
virtual void Update(VIEW_ITEM *aItem, int aUpdateFlags) override
For dynamic VIEWs, informs the associated VIEW that the graphical representation of this item has cha...
Definition: pcb_view.cpp:81
Classes BOARD_ITEM and BOARD_CONNECTED_ITEM.
Class VIEW_ITEM - is an abstract base class for deriving all objects that can be added to a VIEW...
Definition: view_item.h:84
virtual void Remove(VIEW_ITEM *aItem) override
Function Remove() Removes a VIEW_ITEM from the view.
Definition: pcb_view.cpp:64
Class PCB_DISPLAY_OPTIONS handles display options like enable/disable some optional drawings...
void UpdateDisplayOptions(PCB_DISPLAY_OPTIONS *aOptions)
Definition: pcb_view.cpp:103
Board layer functions and definitions.
virtual ~PCB_VIEW()
Definition: pcb_view.cpp:43
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1) override
Function Add() Adds a VIEW_ITEM to the view.
Definition: pcb_view.cpp:48
PCB_VIEW(bool aIsDynamic=true)
Definition: pcb_view.cpp:37
Class VIEW.
Definition: view.h:61