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 The 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, see <https://www.gnu.org/licenses/>.
20 */
21
26
27#ifndef BASE_SCREEN_H
28#define BASE_SCREEN_H
29
30#include <eda_item.h>
31
32
36class BASE_SCREEN : public EDA_ITEM
37{
38public:
39 BASE_SCREEN( EDA_ITEM* aParent, KICAD_T aType = SCREEN_T );
40
41 BASE_SCREEN( const VECTOR2I& aPageSizeIU, KICAD_T aType = SCREEN_T ) :
42 BASE_SCREEN( nullptr, aType )
43 {
44 InitDataPoints( aPageSizeIU );
45 }
46
48 BASE_SCREEN( nullptr, aType )
49 {}
50
51 ~BASE_SCREEN() override { }
52
53 void InitDataPoints( const VECTOR2I& aPageSizeInternalUnits );
54
55 void SetContentModified( bool aModified = true ) { m_flagModified = aModified; }
56 bool IsContentModified() const { return m_flagModified; }
57
63 virtual wxString GetClass() const override
64 {
65 return wxT( "BASE_SCREEN" );
66 }
67
68 int GetPageCount() const { return m_pageCount; }
69 void SetPageCount( int aPageCount );
70
72 void SetVirtualPageNumber( int aPageNumber ) { m_virtualPageNumber = aPageNumber; }
73
74 const wxString& GetPageNumber() const;
75 void SetPageNumber( const wxString& aPageNumber ) { m_pageNumber = aPageNumber; }
76
77#if defined(DEBUG)
78 void Show( int nestLevel, std::ostream& os ) const override;
79#endif
80
81 static wxString m_DrawingSheetFileName;
83
85
88
91
92 bool m_Center;
95
97
98protected:
108
116
125 wxString m_pageNumber;
126
127private:
129};
130
131#endif // BASE_SCREEN_H
void SetPageCount(int aPageCount)
void SetPageNumber(const wxString &aPageNumber)
Definition base_screen.h:75
int m_virtualPageNumber
An integer based page number used for printing a range of pages.
int GetPageCount() const
Definition base_screen.h:68
bool IsContentModified() const
Definition base_screen.h:56
int GetVirtualPageNumber() const
Definition base_screen.h:71
bool m_Center
Center on screen.
Definition base_screen.h:92
void SetVirtualPageNumber(int aPageNumber)
Definition base_screen.h:72
VECTOR2I m_DrawOrg
offsets for drawing the circuit on the screen
Definition base_screen.h:84
static wxString m_DrawingSheetFileName
the name of the drawing sheet file, or empty to use the default drawing sheet
Definition base_screen.h:81
VECTOR2I m_StartVisu
Coordinates in drawing units of the current view position (upper left corner of device)
Definition base_screen.h:89
~BASE_SCREEN() override
Definition base_screen.h:51
virtual wxString GetClass() const override
Return the class name.
Definition base_screen.h:63
int m_pageCount
The number of BASE_SCREEN objects in this design.
const wxString & GetPageNumber() const
wxString m_pageNumber
A user defined string page number used for printing and plotting.
bool m_flagModified
Indicates current drawing has been modified.
BASE_SCREEN(const VECTOR2I &aPageSizeIU, KICAD_T aType=SCREEN_T)
Definition base_screen.h:41
VECTOR2D m_LocalOrigin
Relative Screen cursor coordinate (on grid) in user units.
Definition base_screen.h:86
BASE_SCREEN(EDA_ITEM *aParent, KICAD_T aType=SCREEN_T)
BASE_SCREEN(KICAD_T aType=SCREEN_T)
Definition base_screen.h:47
VECTOR2D m_ScrollCenter
Current scroll center point in logical units.
Definition base_screen.h:96
void SetContentModified(bool aModified=true)
Definition base_screen.h:55
void InitDataPoints(const VECTOR2I &aPageSizeInternalUnits)
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
Definition eda_item.cpp:37
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition typeinfo.h:71
@ SCREEN_T
not really an item, used to identify a screen
Definition typeinfo.h:76
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:683
VECTOR2< double > VECTOR2D
Definition vector2d.h:682