KiCad PCB EDA Suite
Loading...
Searching...
No Matches
base_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) 2015 Jean-Pierre Charras, [email protected]
5 * Copyright (C) 2011 Wayne Stambaugh <[email protected]>
6 * Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, you may find one here:
20 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21 * or you may search the http://www.gnu.org website for the version 2 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
31#ifndef BASE_SCREEN_H
32#define BASE_SCREEN_H
33
34#include <eda_item.h>
35
36
40class BASE_SCREEN : public EDA_ITEM
41{
42public:
43 BASE_SCREEN( EDA_ITEM* aParent, KICAD_T aType = SCREEN_T );
44
45 BASE_SCREEN( const VECTOR2I& aPageSizeIU, KICAD_T aType = SCREEN_T ) :
46 BASE_SCREEN( nullptr, aType )
47 {
48 InitDataPoints( aPageSizeIU );
49 }
50
52 BASE_SCREEN( nullptr, aType )
53 {}
54
55 ~BASE_SCREEN() override { }
56
57 void InitDataPoints( const VECTOR2I& aPageSizeInternalUnits );
58
59 void SetContentModified( bool aModified = true ) { m_flagModified = aModified; }
60 bool IsContentModified() const { return m_flagModified; }
61
67 virtual wxString GetClass() const override
68 {
69 return wxT( "BASE_SCREEN" );
70 }
71
72 int GetPageCount() const { return m_pageCount; }
73 void SetPageCount( int aPageCount );
74
76 void SetVirtualPageNumber( int aPageNumber ) { m_virtualPageNumber = aPageNumber; }
77
78 const wxString& GetPageNumber() const;
79 void SetPageNumber( const wxString& aPageNumber ) { m_pageNumber = aPageNumber; }
80
81#if defined(DEBUG)
82 void Show( int nestLevel, std::ostream& os ) const override;
83#endif
84
85 static wxString m_DrawingSheetFileName;
87
89
92
95
96 bool m_Center;
99
101
102protected:
112
120
129 wxString m_pageNumber;
130
131private:
133};
134
135#endif // BASE_SCREEN_H
Handles how to draw a screen (a board, a schematic ...)
Definition: base_screen.h:41
void SetPageCount(int aPageCount)
Definition: base_screen.cpp:63
void SetPageNumber(const wxString &aPageNumber)
Definition: base_screen.h:79
int m_virtualPageNumber
An integer based page number used for printing a range of pages.
Definition: base_screen.h:119
int GetPageCount() const
Definition: base_screen.h:72
bool IsContentModified() const
Definition: base_screen.h:60
int GetVirtualPageNumber() const
Definition: base_screen.h:75
bool m_Center
Center on screen.
Definition: base_screen.h:96
void SetVirtualPageNumber(int aPageNumber)
Definition: base_screen.h:76
VECTOR2I m_DrawOrg
offsets for drawing the circuit on the screen
Definition: base_screen.h:88
static wxString m_DrawingSheetFileName
the name of the drawing sheet file, or empty to use the default drawing sheet
Definition: base_screen.h:85
VECTOR2I m_StartVisu
Coordinates in drawing units of the current view position (upper left corner of device)
Definition: base_screen.h:93
~BASE_SCREEN() override
Definition: base_screen.h:55
virtual wxString GetClass() const override
Return the class name.
Definition: base_screen.h:67
int m_pageCount
The number of BASE_SCREEN objects in this design.
Definition: base_screen.h:111
const wxString & GetPageNumber() const
Definition: base_screen.cpp:71
wxString m_pageNumber
A user defined string page number used for printing and plotting.
Definition: base_screen.h:129
bool m_flagModified
Indicates current drawing has been modified.
Definition: base_screen.h:132
BASE_SCREEN(const VECTOR2I &aPageSizeIU, KICAD_T aType=SCREEN_T)
Definition: base_screen.h:45
VECTOR2D m_LocalOrigin
Relative Screen cursor coordinate (on grid) in user units.
Definition: base_screen.h:90
BASE_SCREEN(KICAD_T aType=SCREEN_T)
Definition: base_screen.h:51
VECTOR2D m_ScrollCenter
Current scroll center point in logical units.
Definition: base_screen.h:100
void SetContentModified(bool aModified=true)
Definition: base_screen.h:59
void InitDataPoints(const VECTOR2I &aPageSizeInternalUnits)
Definition: base_screen.cpp:46
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:88
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition: typeinfo.h:78
@ SCREEN_T
not really an item, used to identify a screen
Definition: typeinfo.h:83