Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
28bcad84
Commit
28bcad84
authored
May 27, 2012
by
Lorenzo Marcantonio
Committed by
Wayne Stambaugh
May 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename BASE_SCREEN member m_NumberOfScreen to m_NumberOfScreens.
parent
5e436255
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
34 additions
and
59 deletions
+34
-59
base_screen.cpp
common/base_screen.cpp
+4
-31
common_plot_functions.cpp
common/common_plot_functions.cpp
+3
-3
dialog_page_settings.cpp
common/dialogs/dialog_page_settings.cpp
+2
-2
drawpanel.cpp
common/drawpanel.cpp
+1
-1
worksheet.cpp
common/worksheet.cpp
+2
-2
load_one_schematic_file.cpp
eeschema/load_one_schematic_file.cpp
+1
-1
sch_screen.cpp
eeschema/sch_screen.cpp
+3
-3
schframe.cpp
eeschema/schframe.cpp
+1
-1
class_base_screen.h
include/class_base_screen.h
+16
-14
wxEeschemaStruct.h
include/wxEeschemaStruct.h
+1
-1
No files found.
common/base_screen.cpp
View file @
28bcad84
...
...
@@ -35,17 +35,13 @@
#include <id.h>
#include <base_units.h>
#define CURSOR_SIZE 12 /// size of the cross cursor.
BASE_SCREEN
::
BASE_SCREEN
(
KICAD_T
aType
)
:
EDA_ITEM
(
aType
)
{
m_UndoRedoCountMax
=
10
;
// undo/Redo command Max depth, 10 is a reasonable value
m_FirstRedraw
=
true
;
m_ScreenNumber
=
1
;
m_NumberOfScreen
=
1
;
// Hierarchy: Root: ScreenNumber = 1
m_NumberOfScreen
s
=
1
;
// Hierarchy: Root: ScreenNumber = 1
m_Zoom
=
32.0
;
m_Grid
.
m_Size
=
wxRealPoint
(
50
,
50
);
// Default grid size
m_Grid
.
m_Id
=
ID_POPUP_GRID_LEVEL_50
;
...
...
@@ -289,31 +285,8 @@ GRID_TYPE& BASE_SCREEN::GetGrid( size_t aIndex )
}
GRID_TYPE
BASE_SCREEN
::
GetGrid
()
{
return
m_Grid
;
}
const
wxPoint
&
BASE_SCREEN
::
GetGridOrigin
()
{
return
m_GridOrigin
;
}
wxRealPoint
BASE_SCREEN
::
GetGridSize
()
{
return
m_Grid
.
m_Size
;
}
int
BASE_SCREEN
::
GetGridId
()
{
return
m_Grid
.
m_Id
;
}
wxPoint
BASE_SCREEN
::
GetNearestGridPosition
(
const
wxPoint
&
aPosition
,
wxRealPoint
*
aGridSize
)
wxPoint
BASE_SCREEN
::
GetNearestGridPosition
(
const
wxPoint
&
aPosition
,
wxRealPoint
*
aGridSize
)
const
{
wxPoint
pt
;
wxRealPoint
gridSize
;
...
...
@@ -337,7 +310,7 @@ wxPoint BASE_SCREEN::GetNearestGridPosition( const wxPoint& aPosition, wxRealPoi
}
wxPoint
BASE_SCREEN
::
GetCursorPosition
(
bool
aOnGrid
,
wxRealPoint
*
aGridSize
)
wxPoint
BASE_SCREEN
::
GetCursorPosition
(
bool
aOnGrid
,
wxRealPoint
*
aGridSize
)
const
{
if
(
aOnGrid
)
return
GetNearestGridPosition
(
m_crossHairPosition
,
aGridSize
);
...
...
common/common_plot_functions.cpp
View file @
28bcad84
...
...
@@ -299,7 +299,7 @@ void EDA_DRAW_FRAME::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen )
case
WS_IDENTSHEET
:
if
(
WsItem
->
m_Legende
)
msg
=
WsItem
->
m_Legende
;
if
(
screen
->
m_NumberOfScreen
>
1
)
if
(
screen
->
m_NumberOfScreen
s
>
1
)
msg
<<
screen
->
m_ScreenNumber
;
plotter
->
Text
(
pos
,
color
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size
,
...
...
@@ -310,7 +310,7 @@ void EDA_DRAW_FRAME::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen )
case
WS_SHEETS
:
if
(
WsItem
->
m_Legende
)
msg
=
WsItem
->
m_Legende
;
msg
<<
screen
->
m_NumberOfScreen
;
msg
<<
screen
->
m_NumberOfScreen
s
;
plotter
->
Text
(
pos
,
color
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size
,
GR_TEXT_HJUSTIFY_LEFT
,
GR_TEXT_VJUSTIFY_CENTER
,
...
...
@@ -497,7 +497,7 @@ void EDA_DRAW_FRAME::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen )
case
WS_IDENTSHEET
:
msg
<<
screen
->
m_ScreenNumber
<<
wxT
(
"/"
)
<<
screen
->
m_NumberOfScreen
;
screen
->
m_NumberOfScreen
s
;
break
;
case
WS_FILENAME
:
...
...
common/dialogs/dialog_page_settings.cpp
View file @
28bcad84
...
...
@@ -132,7 +132,7 @@ void DIALOG_PAGES_SETTINGS::initDialog()
#ifdef EESCHEMA
// Init display value for sheet User size
wxString
format
=
m_TextSheetCount
->
GetLabel
();
msg
.
Printf
(
format
,
m_Screen
->
m_NumberOfScreen
);
msg
.
Printf
(
format
,
m_Screen
->
m_NumberOfScreen
s
);
m_TextSheetCount
->
SetLabel
(
msg
);
format
=
m_TextSheetNumber
->
GetLabel
();
...
...
@@ -644,7 +644,7 @@ void DIALOG_PAGES_SETTINGS::UpdatePageLayoutExample()
GRResetPenAndBrush
(
(
wxDC
*
)
&
memDC
);
m_Parent
->
TraceWorkSheet
(
(
wxDC
*
)
&
memDC
,
dummySize
,
pointLeftTop
,
pointRightBottom
,
emptyString
,
emptyString
,
m_tb
,
m_Screen
->
m_NumberOfScreen
,
emptyString
,
emptyString
,
m_tb
,
m_Screen
->
m_NumberOfScreen
s
,
m_Screen
->
m_ScreenNumber
,
1
,
appScale
,
LIGHTGRAY
,
RED
);
memDC
.
SelectObject
(
wxNullBitmap
);
...
...
common/drawpanel.cpp
View file @
28bcad84
...
...
@@ -39,7 +39,7 @@
#include <kicad_device_context.h>
#define CURSOR_SIZE 12 //
Cursor size in pixels
static
const
int
CURSOR_SIZE
=
12
;
///<
Cursor size in pixels
#define CLIP_BOX_PADDING 2
...
...
common/worksheet.cpp
View file @
28bcad84
...
...
@@ -1026,7 +1026,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* aDC, BASE_SCREEN* aScreen, int aLineW
wxString
paper
=
pageInfo
.
GetType
();
wxString
file
=
aScreen
->
GetFileName
();
TITLE_BLOCK
t_block
=
GetTitleBlock
();
int
number_of_screens
=
aScreen
->
m_NumberOfScreen
;
int
number_of_screens
=
aScreen
->
m_NumberOfScreen
s
;
int
screen_to_draw
=
aScreen
->
m_ScreenNumber
;
TraceWorkSheet
(
aDC
,
pageSize
,
margin_left_top
,
margin_right_bottom
,
...
...
@@ -1657,7 +1657,7 @@ wxString EDA_DRAW_FRAME::GetScreenDesc()
wxString
msg
;
msg
<<
GetScreen
()
->
m_ScreenNumber
<<
wxT
(
"/"
)
<<
GetScreen
()
->
m_NumberOfScreen
;
<<
GetScreen
()
->
m_NumberOfScreen
s
;
return
msg
;
}
...
...
eeschema/load_one_schematic_file.cpp
View file @
28bcad84
...
...
@@ -347,7 +347,7 @@ line %d,\nAbort reading file.\n" ),
if
(
strnicmp
(
line
,
"Sheet"
,
2
)
==
0
)
sscanf
(
line
+
5
,
" %d %d"
,
&
aScreen
->
m_ScreenNumber
,
&
aScreen
->
m_NumberOfScreen
);
&
aScreen
->
m_ScreenNumber
,
&
aScreen
->
m_NumberOfScreen
s
);
if
(
strnicmp
(
line
,
"Title"
,
2
)
==
0
)
{
...
...
eeschema/sch_screen.cpp
View file @
28bcad84
...
...
@@ -146,8 +146,8 @@ void SCH_SCREEN::Clear()
{
FreeDrawList
();
/
* Clear the project settings. */
m_ScreenNumber
=
m_NumberOfScreen
=
1
;
/
/ Clear the project settings
m_ScreenNumber
=
m_NumberOfScreen
s
=
1
;
m_titles
.
Clear
();
m_titles
.
SetDate
();
...
...
@@ -507,7 +507,7 @@ bool SCH_SCREEN::Save( FILE* aFile ) const
" portrait"
:
""
)
<
0
||
fprintf
(
aFile
,
"encoding utf-8
\n
"
)
<
0
||
fprintf
(
aFile
,
"Sheet %d %d
\n
"
,
m_ScreenNumber
,
m_NumberOfScreen
)
<
0
||
fprintf
(
aFile
,
"Sheet %d %d
\n
"
,
m_ScreenNumber
,
m_NumberOfScreen
s
)
<
0
||
fprintf
(
aFile
,
"Title %s
\n
"
,
EscapedUTF8
(
tb
.
GetTitle
()
).
c_str
()
)
<
0
||
fprintf
(
aFile
,
"Date %s
\n
"
,
EscapedUTF8
(
tb
.
GetDate
()
).
c_str
()
)
<
0
||
fprintf
(
aFile
,
"Rev %s
\n
"
,
EscapedUTF8
(
tb
.
GetRevision
()
).
c_str
()
)
<
0
...
...
eeschema/schframe.cpp
View file @
28bcad84
...
...
@@ -313,7 +313,7 @@ void SCH_EDIT_FRAME::SetSheetNumberAndCount()
for
(
screen
=
s_list
.
GetFirst
();
screen
!=
NULL
;
screen
=
s_list
.
GetNext
()
)
{
screen
->
m_NumberOfScreen
=
sheet_count
;
screen
->
m_NumberOfScreen
s
=
sheet_count
;
}
GetScreen
()
->
m_ScreenNumber
=
SheetNumber
;
...
...
include/class_base_screen.h
View file @
28bcad84
...
...
@@ -74,9 +74,9 @@ typedef std::vector< GRID_TYPE > GRIDS;
*/
class
BASE_SCREEN
:
public
EDA_ITEM
{
private
:
GRIDS
m_grids
;
///< List of valid grid sizes.
wxString
m_fileName
;
///< File used to load the screen.
char
m_FlagRefreshReq
;
///< Indicates that the screen should be redrawn.
bool
m_FlagModified
;
///< Indicates current drawing has been modified.
bool
m_FlagSave
;
///< Indicates automatic file save.
EDA_ITEM
*
m_CurrentItem
;
///< Currently selected object
...
...
@@ -131,9 +131,9 @@ public:
BLOCK_SELECTOR
m_BlockLocate
;
///< Block description for block commands
int
m_ScreenNumber
;
int
m_NumberOfScreen
;
int
m_NumberOfScreen
s
;
wxPoint
m_GridOrigin
;
wxPoint
m_GridOrigin
;
std
::
vector
<
double
>
m_ZoomList
;
///< standard zoom (i.e. scale) coefficients.
bool
m_IsPrinting
;
...
...
@@ -245,13 +245,13 @@ public:
*/
virtual
PICKED_ITEMS_LIST
*
PopCommandFromRedoList
();
int
GetUndoCommandCount
()
int
GetUndoCommandCount
()
const
{
return
m_UndoList
.
m_CommandsList
.
size
();
}
int
GetRedoCommandCount
()
int
GetRedoCommandCount
()
const
{
return
m_RedoList
.
m_CommandsList
.
size
();
}
...
...
@@ -261,8 +261,8 @@ public:
void
ClrModify
()
{
m_FlagModified
=
false
;;
}
void
SetSave
()
{
m_FlagSave
=
true
;
}
void
ClrSave
()
{
m_FlagSave
=
false
;
}
int
IsModify
()
{
return
m_FlagModified
;
}
int
IsSave
()
{
return
m_FlagSave
;
}
bool
IsModify
()
const
{
return
m_FlagModified
;
}
bool
IsSave
()
const
{
return
m_FlagSave
;
}
//----<zoom stuff>---------------------------------------------------------
...
...
@@ -336,23 +336,24 @@ public:
*
* @return int - Currently selected grid command ID.
*/
int
GetGridId
()
;
int
GetGridId
()
const
{
return
m_Grid
.
m_Id
;
}
/**
* Return the grid size of the currently selected grid.
*
* @return wxRealPoint - The currently selected grid size.
*/
wxRealPoint
GetGridSize
();
const
wxRealPoint
&
GetGridSize
()
const
{
return
m_Grid
.
m_Size
;
}
/**
* Return the grid object of the currently selected grid.
*
* @return GRID_TYPE - The currently selected grid.
*/
GRID_TYPE
GetGrid
();
const
GRID_TYPE
&
GetGrid
()
const
{
return
m_Grid
;
}
const
wxPoint
&
GetGridOrigin
()
const
{
return
m_GridOrigin
;
}
const
wxPoint
&
GetGridOrigin
();
void
SetGrid
(
const
wxRealPoint
&
size
);
/**
...
...
@@ -402,7 +403,7 @@ public:
* @return wxPoint - The reference point, either the mouse position or
* the cursor position.
*/
wxPoint
RefPos
(
bool
useMouse
)
wxPoint
RefPos
(
bool
useMouse
)
const
{
return
useMouse
?
m_MousePosition
:
m_crossHairPosition
;
}
...
...
@@ -415,7 +416,7 @@ public:
* if \a aOnGrid is true.
* @return The current cursor position.
*/
wxPoint
GetCursorPosition
(
bool
aOnGrid
,
wxRealPoint
*
aGridSize
=
NULL
);
wxPoint
GetCursorPosition
(
bool
aOnGrid
,
wxRealPoint
*
aGridSize
=
NULL
)
const
;
/**
* Function GetCursorScreenPosition
...
...
@@ -432,7 +433,8 @@ public:
* grid size is used.
* @return The nearst grid position.
*/
wxPoint
GetNearestGridPosition
(
const
wxPoint
&
aPosition
,
wxRealPoint
*
aGridSize
=
NULL
);
wxPoint
GetNearestGridPosition
(
const
wxPoint
&
aPosition
,
wxRealPoint
*
aGridSize
=
NULL
)
const
;
/**
* Function GetClass
...
...
include/wxEeschemaStruct.h
View file @
28bcad84
...
...
@@ -560,7 +560,7 @@ public:
/**
* Function SetSheetNumberAndCount
* Set the m_ScreenNumber and m_NumberOfScreen members for screens
* Set the m_ScreenNumber and m_NumberOfScreen
s
members for screens
* must be called after a delete or add sheet command, and when entering
* a sheet
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment