Commit 7080828f authored by jean-pierre charras's avatar jean-pierre charras

More about worksheet code.

parent 26f2c04f
...@@ -26,6 +26,12 @@ set(COMMON_ABOUT_DLG_SRCS ...@@ -26,6 +26,12 @@ set(COMMON_ABOUT_DLG_SRCS
dialogs/dialog_page_settings_base.cpp dialogs/dialog_page_settings_base.cpp
) )
if(KICAD_GOST)
set( TITLE_BLOCK_SHAPES title_block_shapes_gost )
else()
set( TITLE_BLOCK_SHAPES title_block_shapes )
endif()
set(COMMON_SRCS set(COMMON_SRCS
${COMMON_ABOUT_DLG_SRCS} ${COMMON_ABOUT_DLG_SRCS}
base_struct.cpp base_struct.cpp
...@@ -76,6 +82,7 @@ set(COMMON_SRCS ...@@ -76,6 +82,7 @@ set(COMMON_SRCS
richio.cpp richio.cpp
selcolor.cpp selcolor.cpp
string.cpp string.cpp
${TITLE_BLOCK_SHAPES}.cpp
trigo.cpp trigo.cpp
wildcards_and_files_ext.cpp wildcards_and_files_ext.cpp
worksheet.cpp worksheet.cpp
......
...@@ -90,17 +90,16 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock, ...@@ -90,17 +90,16 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH ); plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
WS_DRAW_ITEM_LIST drawList; WS_DRAW_ITEM_LIST drawList;
// Initialize plot parameters // Prepare plot parameters
drawList.SetMargins( LTmargin, RBmargin); drawList.SetMargins( LTmargin, RBmargin);
drawList.SetPenSize(PLOTTER::DEFAULT_LINE_WIDTH ); drawList.SetPenSize(PLOTTER::DEFAULT_LINE_WIDTH );
drawList.SetMilsToIUfactor( iusPerMil ); drawList.SetMilsToIUfactor( iusPerMil );
drawList.SetPageSize( pageSize ); drawList.SetPageSize( pageSize );
drawList.SetSheetNumber( aSheetNumber );
drawList.SetSheetCount( aNumberOfSheets );
drawList.BuildWorkSheetGraphicList( drawList.BuildWorkSheetGraphicList( aPageInfo.GetType(), aFilename,
aPageInfo.GetType(), aFilename, aSheetDesc, aTitleBlock, plotColor, plotColor );
aSheetDesc,
aTitleBlock, aNumberOfSheets, aSheetNumber,
plotColor, plotColor );
// Draw item list // Draw item list
for( WS_DRAW_ITEM_BASE* item = drawList.GetFirst(); item; for( WS_DRAW_ITEM_BASE* item = drawList.GetFirst(); item;
......
/** /**
* @file title_block_shape.h * @file title_block_shape.cpp
* @brief description of graphic items and texts to build a title block * @brief description of graphic items and texts to build a title block
*/ */
/* /*
* This file should be included only in worksheet.cpp * This file creates a lot of structures which define the shape of a title block
* This is not an usual .h file, it is more a .cpp file
* it creates a lot of structures which define the shape of a title block
* and frame references * and frame references
*/ */
...@@ -35,22 +33,29 @@ ...@@ -35,22 +33,29 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <fctsys.h>
#include <drawtxt.h>
#include <appl_wxstruct.h>
#include <worksheet.h>
#include <class_title_block.h>
#include <build_version.h>
#include <worksheet_shape_builder.h>
#define GRID_REF_W 70 // height of the band reference grid #define GRID_REF_W Mm2mils( 1.8 ) // height of the band reference grid
#define TEXTSIZE 60 // worksheet text size #define TEXTSIZE Mm2mils( 1.5 ) // worksheet text size
#define FRMREF_TXTSIZE 50 // worksheet frame reference text size #define FRMREF_TXTSIZE Mm2mils( 1.3 ) // worksheet frame reference text size
#define VARIABLE_BLOCK_START_POSITION (TEXTSIZE * 10) #define VARIABLE_BLOCK_START_POSITION (TEXTSIZE * 10)
// The coordinates below are relative to the bottom right corner of page and // The coordinates below are relative to the bottom right corner of page and
// will be subtracted from this origin. // will be subtracted from this origin.
#define BLOCK_OX 4200 #define BLOCK_OX Mm2mils( 106 )
#define BLOCK_KICAD_VERSION_X BLOCK_OX - TEXTSIZE #define BLOCK_KICAD_VERSION_X BLOCK_OX - TEXTSIZE
#define BLOCK_KICAD_VERSION_Y TEXTSIZE #define BLOCK_KICAD_VERSION_Y TEXTSIZE
#define BLOCK_REV_X 820 #define BLOCK_REV_X Mm2mils( 22 )
#define BLOCK_REV_Y (TEXTSIZE * 3) #define BLOCK_REV_Y (TEXTSIZE * 3)
#define BLOCK_DATE_X BLOCK_OX - (TEXTSIZE * 15) #define BLOCK_DATE_X BLOCK_OX - (TEXTSIZE * 15)
#define BLOCK_DATE_Y (TEXTSIZE * 3) #define BLOCK_DATE_Y (TEXTSIZE * 3)
#define BLOCK_ID_SHEET_X 820 #define BLOCK_ID_SHEET_X Mm2mils( 22 )
#define BLOCK_ID_SHEET_Y TEXTSIZE #define BLOCK_ID_SHEET_Y TEXTSIZE
#define BLOCK_SIZE_SHEET_X BLOCK_OX - TEXTSIZE #define BLOCK_SIZE_SHEET_X BLOCK_OX - TEXTSIZE
#define BLOCK_SIZE_SHEET_Y (TEXTSIZE * 3) #define BLOCK_SIZE_SHEET_Y (TEXTSIZE * 3)
...@@ -67,25 +72,40 @@ ...@@ -67,25 +72,40 @@
#define BLOCK_COMMENT3_Y (TEXTSIZE * 17) #define BLOCK_COMMENT3_Y (TEXTSIZE * 17)
#define BLOCK_COMMENT4_Y (TEXTSIZE * 19) #define BLOCK_COMMENT4_Y (TEXTSIZE * 19)
/*
* Basic texts in Ki_WorkSheetData struct use format "C" type to
* identify the user text which should be shown, at runtime.
* Currently formats are % and a letter , or 2 letters
*
* %% = replaced by %
* %K = Kicad version
* %Z = paper format name (A4, USLetter)
* %N = company name
* %D = date
* %R = revision
* %S = sheet number
* %N = number of sheets
* %Cx = comment (x = 0 to 9 to identify the comment)
* %F = filename
* %P = sheet path or sheet full name
* %T = title
* Other fields like Developer, Verifier, Approver could use %Cx
* and are seen as comments for format
*/
// Text attributes set in m_Flags (ORed bits)
#define USE_BOLD 1 // has meaning for texts
#define USE_THICK_LINE 1 // equivalent to bold for lines
#define USE_ITALIC 2 // has meaning for texts
#define USE_TEXT_COLOR 4
#define SET_UPPER_LIMIT 8 // Flag used to calculate variable position items
// Work sheet structure type definitions. // Work sheet structure type definitions.
enum TypeKi_WorkSheetData { enum TypeKi_WorkSheetData {
WS_DATE, WS_TEXT,
WS_REV,
WS_KICAD_VERSION,
WS_SIZESHEET,
WS_IDENTSHEET,
WS_TITLE,
WS_FILENAME,
WS_FULLSHEETNAME,
WS_COMPANY_NAME,
WS_COMMENT1,
WS_COMMENT2,
WS_COMMENT3,
WS_COMMENT4,
WS_SEGMENT, WS_SEGMENT,
WS_UPPER_SEGMENT, WS_UPPER_SEGMENT,
WS_LEFT_SEGMENT, WS_LEFT_SEGMENT
WS_CADRE
}; };
...@@ -97,7 +117,7 @@ Ki_WorkSheetData WS_MostUpperLine = ...@@ -97,7 +117,7 @@ Ki_WorkSheetData WS_MostUpperLine =
NULL, NULL,
BLOCK_OX, TEXTSIZE * 16, BLOCK_OX, TEXTSIZE * 16,
0, TEXTSIZE * 16, 0, TEXTSIZE * 16,
NULL, NULL NULL
}; };
// Left vertical segment: should be after comments // Left vertical segment: should be after comments
...@@ -108,7 +128,7 @@ Ki_WorkSheetData WS_MostLeftLine = ...@@ -108,7 +128,7 @@ Ki_WorkSheetData WS_MostLeftLine =
&WS_MostUpperLine, &WS_MostUpperLine,
BLOCK_OX, TEXTSIZE * 16, BLOCK_OX, TEXTSIZE * 16,
BLOCK_OX, 0, BLOCK_OX, 0,
NULL, NULL NULL
}; };
// horizontal segment between filename and comments // horizontal segment between filename and comments
...@@ -118,126 +138,133 @@ Ki_WorkSheetData WS_SeparatorLine = ...@@ -118,126 +138,133 @@ Ki_WorkSheetData WS_SeparatorLine =
&WS_MostLeftLine, &WS_MostLeftLine,
BLOCK_OX, VARIABLE_BLOCK_START_POSITION, BLOCK_OX, VARIABLE_BLOCK_START_POSITION,
0, VARIABLE_BLOCK_START_POSITION, 0, VARIABLE_BLOCK_START_POSITION,
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Date = Ki_WorkSheetData WS_Date =
{ {
WS_DATE, WS_TEXT,
&WS_SeparatorLine, &WS_SeparatorLine,
BLOCK_DATE_X, BLOCK_DATE_Y, BLOCK_DATE_X, BLOCK_DATE_Y,
0, 0, 0, 0,
wxT( "Date: " ),NULL wxT( "Date: %D" )
}; };
Ki_WorkSheetData WS_Licence = Ki_WorkSheetData WS_Licence =
{ {
WS_KICAD_VERSION, WS_TEXT,
&WS_Date, &WS_Date,
BLOCK_KICAD_VERSION_X,BLOCK_KICAD_VERSION_Y, BLOCK_KICAD_VERSION_X,BLOCK_KICAD_VERSION_Y,
0, 0,
0, 0,
NULL, NULL wxT("%K") // Kicad version
}; };
Ki_WorkSheetData WS_Revision = Ki_WorkSheetData WS_Revision =
{ {
WS_REV, WS_TEXT,
&WS_Licence, &WS_Licence,
BLOCK_REV_X, BLOCK_REV_Y, BLOCK_REV_X, BLOCK_REV_Y,
0, 0, 0, 0,
wxT( "Rev: " ),NULL wxT( "Rev: %R" ),
USE_BOLD
}; };
Ki_WorkSheetData WS_SizeSheet = Ki_WorkSheetData WS_SizeSheet =
{ {
WS_SIZESHEET, WS_TEXT,
&WS_Revision, &WS_Revision,
BLOCK_SIZE_SHEET_X,BLOCK_SIZE_SHEET_Y, BLOCK_SIZE_SHEET_X,BLOCK_SIZE_SHEET_Y,
0, 0, 0, 0,
wxT( "Size: " ), NULL wxT( "Size: %Z" ) // Paper format name
}; };
Ki_WorkSheetData WS_IdentSheet = Ki_WorkSheetData WS_IdentSheet =
{ {
WS_IDENTSHEET, WS_TEXT,
&WS_SizeSheet, &WS_SizeSheet,
BLOCK_ID_SHEET_X,BLOCK_ID_SHEET_Y, BLOCK_ID_SHEET_X,BLOCK_ID_SHEET_Y,
0, 0, 0, 0,
wxT( "Id: " ), NULL wxT( "Id: %S/%N" )
}; };
Ki_WorkSheetData WS_Title = Ki_WorkSheetData WS_Title =
{ {
WS_TITLE, WS_TEXT,
&WS_IdentSheet, &WS_IdentSheet,
BLOCK_TITLE_X, BLOCK_TITLE_Y, BLOCK_TITLE_X, BLOCK_TITLE_Y,
0, 0, 0, 0,
wxT( "Title: " ), NULL wxT( "Title: %T" ),
USE_BOLD
}; };
Ki_WorkSheetData WS_SheetFilename = Ki_WorkSheetData WS_SheetFilename =
{ {
WS_FILENAME, WS_TEXT,
&WS_Title, &WS_Title,
BLOCK_FILENAME_X, BLOCK_FILENAME_Y, BLOCK_FILENAME_X, BLOCK_FILENAME_Y,
0, 0, 0, 0,
wxT( "File: " ), NULL wxT( "File: %F" )
}; };
Ki_WorkSheetData WS_FullSheetName = Ki_WorkSheetData WS_FullSheetName =
{ {
WS_FULLSHEETNAME, WS_TEXT,
&WS_SheetFilename, &WS_SheetFilename,
BLOCK_FULLSHEETNAME_X,BLOCK_FULLSHEETNAME_Y, BLOCK_FULLSHEETNAME_X,BLOCK_FULLSHEETNAME_Y,
0, 0,
0, 0,
wxT( "Sheet: " ), NULL wxT( "Sheet: %P" ) // Full sheet name (sheet path)
}; };
Ki_WorkSheetData WS_Company = Ki_WorkSheetData WS_Company =
{ {
WS_COMPANY_NAME, WS_TEXT,
&WS_FullSheetName, &WS_FullSheetName,
BLOCK_COMMENT_X,BLOCK_COMPANY_Y, BLOCK_COMMENT_X,BLOCK_COMPANY_Y,
0, 0, 0, 0,
NULL, NULL wxT("%N"), // Company name
USE_BOLD | SET_UPPER_LIMIT | USE_TEXT_COLOR
}; };
Ki_WorkSheetData WS_Comment1 = Ki_WorkSheetData WS_Comment1 =
{ {
WS_COMMENT1, WS_TEXT,
&WS_Company, &WS_Company,
BLOCK_COMMENT_X,BLOCK_COMMENT1_Y, BLOCK_COMMENT_X,BLOCK_COMMENT1_Y,
0, 0, 0, 0,
NULL, NULL wxT("%C1"), // Comment 1
SET_UPPER_LIMIT | USE_TEXT_COLOR
}; };
Ki_WorkSheetData WS_Comment2 = Ki_WorkSheetData WS_Comment2 =
{ {
WS_COMMENT2, WS_TEXT,
&WS_Comment1, &WS_Comment1,
BLOCK_COMMENT_X,BLOCK_COMMENT2_Y, BLOCK_COMMENT_X,BLOCK_COMMENT2_Y,
0, 0, 0, 0,
NULL, NULL wxT("%C2"), // Comment 2
SET_UPPER_LIMIT | USE_TEXT_COLOR
}; };
Ki_WorkSheetData WS_Comment3 = Ki_WorkSheetData WS_Comment3 =
{ {
WS_COMMENT3, WS_TEXT,
&WS_Comment2, &WS_Comment2,
BLOCK_COMMENT_X,BLOCK_COMMENT3_Y, BLOCK_COMMENT_X,BLOCK_COMMENT3_Y,
0, 0, 0, 0,
NULL, NULL wxT("%C3"), // Comment 3
SET_UPPER_LIMIT | USE_TEXT_COLOR
}; };
Ki_WorkSheetData WS_Comment4 = Ki_WorkSheetData WS_Comment4 =
{ {
WS_COMMENT4, WS_TEXT,
&WS_Comment3, &WS_Comment3,
BLOCK_COMMENT_X, BLOCK_COMMENT4_Y, BLOCK_COMMENT_X, BLOCK_COMMENT4_Y,
0, 0, 0, 0,
NULL, NULL wxT("%C4"), // Comment 4
SET_UPPER_LIMIT | USE_TEXT_COLOR
}; };
...@@ -248,7 +275,7 @@ Ki_WorkSheetData WS_Segm3 = ...@@ -248,7 +275,7 @@ Ki_WorkSheetData WS_Segm3 =
&WS_Comment4, &WS_Comment4,
BLOCK_OX, TEXTSIZE * 6, BLOCK_OX, TEXTSIZE * 6,
0, TEXTSIZE * 6, 0, TEXTSIZE * 6,
NULL, NULL NULL
}; };
...@@ -259,7 +286,7 @@ Ki_WorkSheetData WS_Segm4 = ...@@ -259,7 +286,7 @@ Ki_WorkSheetData WS_Segm4 =
&WS_Segm3, &WS_Segm3,
BLOCK_REV_X + TEXTSIZE,TEXTSIZE * 4, BLOCK_REV_X + TEXTSIZE,TEXTSIZE * 4,
BLOCK_REV_X + TEXTSIZE, 0, BLOCK_REV_X + TEXTSIZE, 0,
NULL, NULL NULL
}; };
...@@ -269,7 +296,7 @@ Ki_WorkSheetData WS_Segm5 = ...@@ -269,7 +296,7 @@ Ki_WorkSheetData WS_Segm5 =
&WS_Segm4, &WS_Segm4,
BLOCK_OX, TEXTSIZE * 2, BLOCK_OX, TEXTSIZE * 2,
0, TEXTSIZE * 2, 0, TEXTSIZE * 2,
NULL, NULL NULL
}; };
...@@ -279,7 +306,7 @@ Ki_WorkSheetData WS_Segm6 = ...@@ -279,7 +306,7 @@ Ki_WorkSheetData WS_Segm6 =
&WS_Segm5, &WS_Segm5,
BLOCK_OX, TEXTSIZE * 4, BLOCK_OX, TEXTSIZE * 4,
0, TEXTSIZE * 4, 0, TEXTSIZE * 4,
NULL, NULL NULL
}; };
...@@ -289,13 +316,14 @@ Ki_WorkSheetData WS_Segm7 = ...@@ -289,13 +316,14 @@ Ki_WorkSheetData WS_Segm7 =
&WS_Segm6, &WS_Segm6,
BLOCK_OX - (TEXTSIZE * 11),TEXTSIZE * 4, BLOCK_OX - (TEXTSIZE * 11),TEXTSIZE * 4,
BLOCK_OX - (TEXTSIZE * 11),TEXTSIZE * 2, BLOCK_OX - (TEXTSIZE * 11),TEXTSIZE * 2,
NULL, NULL NULL
}; };
#include <worksheet_shape_builder.h> #include <worksheet_shape_builder.h>
// Helper function which returns the text corresponding to the aIdent identifier // Helper function which returns the text corresponding to the aIdent identifier
static wxString FindUserText( int aIdent, const TITLE_BLOCK& aTitleBlock, static wxString BuildFullText( const wxString& aTextbase,
const TITLE_BLOCK& aTitleBlock,
const wxString& aPaperFormat, const wxString& aPaperFormat,
const wxString& aFileName, const wxString& aFileName,
const wxString& aSheetPathHumanReadable, const wxString& aSheetPathHumanReadable,
...@@ -307,209 +335,184 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( ...@@ -307,209 +335,184 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
const wxString& aFileName, const wxString& aFileName,
const wxString& aSheetPathHumanReadable, const wxString& aSheetPathHumanReadable,
const TITLE_BLOCK& aTitleBlock, const TITLE_BLOCK& aTitleBlock,
int aSheetCount, int aSheetNumber,
EDA_COLOR_T aLineColor, EDA_COLOR_T aTextColor ) EDA_COLOR_T aLineColor, EDA_COLOR_T aTextColor )
{ {
wxPoint pos;
wxSize textsize( TEXTSIZE * m_milsToIu, TEXTSIZE * m_milsToIu ); wxSize textsize( TEXTSIZE * m_milsToIu, TEXTSIZE * m_milsToIu );
wxSize size_ref( FRMREF_TXTSIZE * m_milsToIu, wxSize size_ref( FRMREF_TXTSIZE * m_milsToIu,
FRMREF_TXTSIZE * m_milsToIu ); FRMREF_TXTSIZE * m_milsToIu );
wxString msg; wxString msg;
// Upper left corner // Left top corner position
int refx = m_LTmargin.x; wxPoint lt_corner;
int refy = m_LTmargin.y; lt_corner.x = m_LTmargin.x;
lt_corner.y = m_LTmargin.y;
// lower right corner // Right bottom corner position
wxPoint currpos; wxPoint rb_corner;
currpos.x = m_pageSize.x - m_RBmargin.x; rb_corner.x = m_pageSize.x - m_RBmargin.x;
currpos.y = m_pageSize.y - m_RBmargin.y; rb_corner.y = m_pageSize.y - m_RBmargin.y;
// Draw the border. // Draw the border.
int ii, jj, ipas, gxpas, gypas; int ii, jj, ipas, gxpas, gypas;
wxPoint pos = lt_corner;
wxPoint end = rb_corner;
for( ii = 0; ii < 2; ii++ ) for( ii = 0; ii < 2; ii++ )
{ {
Append( new WS_DRAW_ITEM_RECT( Append( new WS_DRAW_ITEM_RECT(
wxPoint( refx * m_milsToIu, refy * m_milsToIu ), wxPoint( pos.x * m_milsToIu, pos.y * m_milsToIu ),
wxPoint( currpos.x * m_milsToIu, currpos.y * m_milsToIu ), wxPoint( end.x * m_milsToIu, end.y * m_milsToIu ),
m_penSize, aLineColor ) ); m_penSize, aLineColor ) );
refx += GRID_REF_W; pos.x += GRID_REF_W;
refy += GRID_REF_W; pos.y += GRID_REF_W;
currpos.x -= GRID_REF_W; end.x -= GRID_REF_W;
currpos.y -= GRID_REF_W; end.y -= GRID_REF_W;
} }
// Upper left corner ipas = ( rb_corner.x - lt_corner.x ) / PAS_REF;
refx = m_LTmargin.x; gxpas = ( rb_corner.x - lt_corner.x ) / ipas;
refy = m_LTmargin.y;
// lower right corner
currpos.x = m_pageSize.x - m_RBmargin.x;
currpos.y = m_pageSize.y - m_RBmargin.y;
ipas = ( currpos.x - refx ) / PAS_REF;
gxpas = ( currpos.x - refx ) / ipas;
for( ii = refx + gxpas, jj = 1; ipas > 0; ii += gxpas, jj++, ipas-- ) for( ii = lt_corner.x + gxpas, jj = 1; ipas > 0; ii += gxpas, jj++, ipas-- )
{ {
msg.Printf( wxT( "%d" ), jj ); msg.Printf( wxT( "%d" ), jj );
if( ii < currpos.x - PAS_REF / 2 ) if( ii < rb_corner.x - PAS_REF / 2 )
{ {
Append( new WS_DRAW_ITEM_LINE( Append( new WS_DRAW_ITEM_LINE(
wxPoint( ii * m_milsToIu, refy * m_milsToIu ), wxPoint( ii * m_milsToIu, lt_corner.y * m_milsToIu ),
wxPoint( ii * m_milsToIu, ( refy + GRID_REF_W ) * m_milsToIu ), wxPoint( ii * m_milsToIu, ( lt_corner.y + GRID_REF_W ) * m_milsToIu ),
m_penSize, aLineColor ) ); m_penSize, aLineColor ) );
} }
Append( new WS_DRAW_ITEM_TEXT( msg, Append( new WS_DRAW_ITEM_TEXT( msg,
wxPoint( ( ii - gxpas / 2 ) * m_milsToIu, wxPoint( ( ii - gxpas / 2 ) * m_milsToIu,
( refy + GRID_REF_W / 2 ) * m_milsToIu ), ( lt_corner.y + GRID_REF_W / 2 ) * m_milsToIu ),
size_ref, m_penSize, aLineColor ) ); size_ref, m_penSize, aLineColor ) );
if( ii < currpos.x - PAS_REF / 2 ) if( ii < rb_corner.x - PAS_REF / 2 )
{ {
Append( new WS_DRAW_ITEM_LINE( Append( new WS_DRAW_ITEM_LINE(
wxPoint( ii * m_milsToIu, currpos.y * m_milsToIu ), wxPoint( ii * m_milsToIu, rb_corner.y * m_milsToIu ),
wxPoint( ii * m_milsToIu, (currpos.y - GRID_REF_W ) * m_milsToIu ), wxPoint( ii * m_milsToIu, (rb_corner.y - GRID_REF_W ) * m_milsToIu ),
m_penSize, aLineColor ) ); m_penSize, aLineColor ) );
} }
Append( new WS_DRAW_ITEM_TEXT( msg, Append( new WS_DRAW_ITEM_TEXT( msg,
wxPoint( ( ii - gxpas / 2 ) * m_milsToIu, wxPoint( ( ii - gxpas / 2 ) * m_milsToIu,
( currpos.y - GRID_REF_W / 2) * m_milsToIu ), ( rb_corner.y - GRID_REF_W / 2) * m_milsToIu ),
size_ref, m_penSize, aLineColor ) ); size_ref, m_penSize, aLineColor ) );
} }
ipas = ( currpos.y - refy ) / PAS_REF; ipas = ( rb_corner.y - lt_corner.y ) / PAS_REF;
gypas = ( currpos.y - refy ) / ipas; gypas = ( rb_corner.y - lt_corner.y ) / ipas;
for( ii = refy + gypas, jj = 0; ipas > 0; ii += gypas, jj++, ipas-- ) for( ii = lt_corner.y + gypas, jj = 0; ipas > 0; ii += gypas, jj++, ipas-- )
{ {
if( jj < 26 ) if( jj < 26 )
msg.Printf( wxT( "%c" ), jj + 'A' ); msg.Printf( wxT( "%c" ), jj + 'A' );
else // I hope 52 identifiers are enough... else // I hope 52 identifiers are enough...
msg.Printf( wxT( "%c" ), 'a' + jj - 26 ); msg.Printf( wxT( "%c" ), 'a' + jj - 26 );
if( ii < currpos.y - PAS_REF / 2 ) if( ii < rb_corner.y - PAS_REF / 2 )
{ {
Append( new WS_DRAW_ITEM_LINE( Append( new WS_DRAW_ITEM_LINE(
wxPoint( refx * m_milsToIu, ii * m_milsToIu ), wxPoint( lt_corner.x * m_milsToIu, ii * m_milsToIu ),
wxPoint( ( refx + GRID_REF_W ) * m_milsToIu, ii * m_milsToIu ), wxPoint( ( lt_corner.x + GRID_REF_W ) * m_milsToIu, ii * m_milsToIu ),
m_penSize, aLineColor ) ); m_penSize, aLineColor ) );
} }
Append( new WS_DRAW_ITEM_TEXT( msg, Append( new WS_DRAW_ITEM_TEXT( msg,
wxPoint( ( refx + GRID_REF_W / 2 ) * m_milsToIu, wxPoint( ( lt_corner.x + GRID_REF_W / 2 ) * m_milsToIu,
( ii - gypas / 2 ) * m_milsToIu ), ( ii - gypas / 2 ) * m_milsToIu ),
size_ref, m_penSize, aLineColor ) ); size_ref, m_penSize, aLineColor ) );
if( ii < currpos.y - PAS_REF / 2 ) if( ii < rb_corner.y - PAS_REF / 2 )
{ {
Append( new WS_DRAW_ITEM_LINE( Append( new WS_DRAW_ITEM_LINE(
wxPoint( currpos.x * m_milsToIu, ii * m_milsToIu ), wxPoint( rb_corner.x * m_milsToIu, ii * m_milsToIu ),
wxPoint( ( currpos.x - GRID_REF_W ) * m_milsToIu, ii * m_milsToIu ), wxPoint( ( rb_corner.x - GRID_REF_W ) * m_milsToIu, ii * m_milsToIu ),
m_penSize, aLineColor ) ); m_penSize, aLineColor ) );
} }
Append( new WS_DRAW_ITEM_TEXT( msg, Append( new WS_DRAW_ITEM_TEXT( msg,
wxPoint( ( currpos.x - GRID_REF_W / 2 ) * m_milsToIu, wxPoint( ( rb_corner.x - GRID_REF_W / 2 ) * m_milsToIu,
( ii - gxpas / 2 ) * m_milsToIu ), ( ii - gxpas / 2 ) * m_milsToIu ),
size_ref, m_penSize, aLineColor ) ); size_ref, m_penSize, aLineColor ) );
} }
int UpperLimit = VARIABLE_BLOCK_START_POSITION; int upperLimit = VARIABLE_BLOCK_START_POSITION;
refx = m_pageSize.x - m_RBmargin.x - GRID_REF_W; rb_corner.x -= GRID_REF_W;
refy = m_pageSize.y - m_RBmargin.y - GRID_REF_W; rb_corner.y -= GRID_REF_W;
WS_DRAW_ITEM_TEXT* gtext; WS_DRAW_ITEM_TEXT* gtext;
Ki_WorkSheetData* WsItem; Ki_WorkSheetData* WsItem;
int boldPenSize; int pensize;
bool bold;
bool italic = false;
EDA_COLOR_T color;
for( WsItem = &WS_Segm7; WsItem != NULL; WsItem = WsItem->Pnext ) for( WsItem = &WS_Segm7; WsItem != NULL; WsItem = WsItem->Pnext )
{ {
pos.x = (refx - WsItem->m_Posx) * m_milsToIu; pos.x = (rb_corner.x - WsItem->m_Posx) * m_milsToIu;
pos.y = (refy - WsItem->m_Posy) * m_milsToIu; pos.y = (rb_corner.y - WsItem->m_Posy) * m_milsToIu;
msg.Empty(); msg.Empty();
if( WsItem->m_Legende ) if( WsItem->m_Type == WS_TEXT && WsItem->m_TextBase )
msg = WsItem->m_Legende; msg = BuildFullText( WsItem->m_TextBase, aTitleBlock, aPaperFormat, aFileName,
msg += FindUserText( WsItem->m_Type, aTitleBlock, aPaperFormat, aFileName, aSheetPathHumanReadable, m_sheetCount, m_sheetNumber );
aSheetPathHumanReadable, aSheetCount, aSheetNumber );
switch( WsItem->m_Type ) switch( WsItem->m_Type )
{ {
case WS_REV: case WS_TEXT:
case WS_TITLE: if( msg.IsEmpty() )
boldPenSize = GetPenSizeForBold( std::min( textsize.x, textsize.y ) );
Append( gtext = new WS_DRAW_ITEM_TEXT( msg, pos, textsize, boldPenSize,
aTextColor, false, true ) );
gtext->SetHorizJustify( GR_TEXT_HJUSTIFY_LEFT );
break; break;
bold = false;
pensize = m_penSize;
color = aLineColor;
if( WsItem->m_Flags & USE_TEXT_COLOR )
color = aTextColor;
case WS_KICAD_VERSION: if( WsItem->m_Flags & USE_BOLD )
case WS_SIZESHEET:
case WS_IDENTSHEET:
case WS_FILENAME:
case WS_FULLSHEETNAME:
case WS_DATE:
Append( gtext = new WS_DRAW_ITEM_TEXT( msg, pos, textsize,
m_penSize, aLineColor ) );
gtext->SetHorizJustify( GR_TEXT_HJUSTIFY_LEFT );
break;
case WS_COMPANY_NAME:
if( !msg.IsEmpty() )
{ {
boldPenSize = GetPenSizeForBold( std::min( textsize.x, textsize.y ) ); bold = true;
Append( gtext = new WS_DRAW_ITEM_TEXT( msg, pos, textsize ,boldPenSize, pensize = GetPenSizeForBold( std::min( textsize.x, textsize.y ) );
aTextColor, false, true ) );
gtext->SetHorizJustify( GR_TEXT_HJUSTIFY_LEFT );
UpperLimit = std::max( UpperLimit, WsItem->m_Posy + TEXTSIZE );
} }
break;
case WS_COMMENT1:
case WS_COMMENT2:
case WS_COMMENT3:
case WS_COMMENT4:
if( !msg.IsEmpty() )
{
Append( gtext = new WS_DRAW_ITEM_TEXT( msg, pos, textsize, Append( gtext = new WS_DRAW_ITEM_TEXT( msg, pos, textsize,
m_penSize, aTextColor ) ); pensize, color, italic, bold ) );
gtext->SetHorizJustify( GR_TEXT_HJUSTIFY_LEFT ); gtext->SetHorizJustify( GR_TEXT_HJUSTIFY_LEFT );
UpperLimit = std::max( UpperLimit, WsItem->m_Posy + TEXTSIZE );
}
if( WsItem->m_Flags & SET_UPPER_LIMIT )
upperLimit = std::max( upperLimit, WsItem->m_Posy + TEXTSIZE );
break; break;
case WS_UPPER_SEGMENT: case WS_UPPER_SEGMENT:
if( UpperLimit == 0 ) if( upperLimit == 0 )
break; break;
case WS_LEFT_SEGMENT: case WS_LEFT_SEGMENT:
WS_MostUpperLine.m_Posy = WS_MostUpperLine.m_Endy = WS_MostUpperLine.m_Posy = upperLimit;
WS_MostLeftLine.m_Posy = UpperLimit; WS_MostUpperLine.m_Endy = upperLimit;
pos.y = (refy - WsItem->m_Posy) * m_milsToIu; WS_MostLeftLine.m_Posy = upperLimit;
pos.y = (rb_corner.y - WsItem->m_Posy) * m_milsToIu;
case WS_SEGMENT: case WS_SEGMENT:
currpos.x = m_pageSize.x - GRID_REF_W - m_RBmargin.x - WsItem->m_Endx; end.x = rb_corner.x - WsItem->m_Endx;
currpos.y = m_pageSize.y - GRID_REF_W - m_RBmargin.y - WsItem->m_Endy; end.y = rb_corner.y - WsItem->m_Endy;
Append( new WS_DRAW_ITEM_LINE( pos, Append( new WS_DRAW_ITEM_LINE( pos,
wxPoint( currpos.x * m_milsToIu, currpos.y * m_milsToIu ), wxPoint( end.x * m_milsToIu, end.y * m_milsToIu ),
m_penSize, aLineColor ) ); m_penSize, aLineColor ) );
break; break;
} }
} }
} }
// returns the text corresponding to the aIdent identifier // returns the full text corresponding to the aTextbase,
wxString FindUserText( int aIdent, const TITLE_BLOCK& aTitleBlock, // after replacing format symbols by the corresponding value
wxString BuildFullText( const wxString& aTextbase,
const TITLE_BLOCK& aTitleBlock,
const wxString& aPaperFormat, const wxString& aPaperFormat,
const wxString& aFileName, const wxString& aFileName,
const wxString& aSheetPathHumanReadable, const wxString& aSheetPathHumanReadable,
...@@ -517,68 +520,108 @@ wxString FindUserText( int aIdent, const TITLE_BLOCK& aTitleBlock, ...@@ -517,68 +520,108 @@ wxString FindUserText( int aIdent, const TITLE_BLOCK& aTitleBlock,
{ {
wxString msg; wxString msg;
switch( aIdent ) /* Known formats
* %% = replaced by %
* %K = Kicad version
* %Z = paper format name (A4, USLetter)
* %N = company name
* %D = date
* %R = revision
* %S = sheet number
* %N = number of sheets
* %Cx = comment (x = 0 to 9 to identify the comment)
* %F = filename
* %P = sheet path or sheet full name
* %T = title
*/
for( unsigned ii = 0; ii < aTextbase.Len(); ii++ )
{
if( aTextbase[ii] != '%' )
{ {
case WS_DATE: msg << aTextbase[ii];
msg = aTitleBlock.GetDate(); continue;
}
ii++;
if( ii >= aTextbase.Len() )
break; break;
case WS_REV: wxChar format = aTextbase[ii++];
msg = aTitleBlock.GetRevision(); switch( format )
{
case '%':
msg += '%';
break; break;
case WS_KICAD_VERSION: case 'D':
msg = g_ProductName + wxGetApp().GetAppName(); msg += aTitleBlock.GetDate();
break;
case 'R':
msg += aTitleBlock.GetRevision();
break;
case 'K':
msg += g_ProductName + wxGetApp().GetAppName();
msg += wxT( " " ) + GetBuildVersion(); msg += wxT( " " ) + GetBuildVersion();
break; break;
case WS_SIZESHEET: case 'Z':
msg = aPaperFormat; msg += aPaperFormat;
break; break;
case WS_IDENTSHEET: case 'S':
msg << aSheetNumber << wxT( "/" ) << aSheetCount; msg << aSheetNumber;
break; break;
case WS_FILENAME: case 'F':
{ {
wxFileName fn( aFileName ); wxFileName fn( aFileName );
msg = fn.GetFullName(); msg += fn.GetFullName();
} }
break; break;
case WS_FULLSHEETNAME: case 'P':
msg = aSheetPathHumanReadable; msg += aSheetPathHumanReadable;
break; break;
case WS_COMPANY_NAME: case 'N':
msg = aTitleBlock.GetCompany(); msg = aTitleBlock.GetCompany();
break; break;
case WS_TITLE: case 'T':
msg = aTitleBlock.GetTitle(); msg += aTitleBlock.GetTitle();
break; break;
case WS_COMMENT1: case 'C':
msg = aTitleBlock.GetComment1(); format = aTextbase[ii++];
switch( format )
{
case '1':
msg += aTitleBlock.GetComment1();
break; break;
case WS_COMMENT2: case '2':
msg = aTitleBlock.GetComment2(); msg += aTitleBlock.GetComment2();
break; break;
case WS_COMMENT3: case '3':
msg = aTitleBlock.GetComment3(); msg += aTitleBlock.GetComment3();
break; break;
case WS_COMMENT4: case '4':
msg = aTitleBlock.GetComment4(); msg += aTitleBlock.GetComment4();
break; break;
default: default:
break; break;
} }
default:
break;
}
}
return msg; return msg;
} }
...@@ -5,9 +5,7 @@ ...@@ -5,9 +5,7 @@
*/ */
/* /*
* This file should be included only in worksheet.cpp * This file creates a lot of structures to define the shape of a title block
* This is not an usual .h file, it is more a .cpp file
* it creates a lot of structures to define the shape of a title block
* and frame references * and frame references
*/ */
...@@ -35,6 +33,14 @@ ...@@ -35,6 +33,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <fctsys.h>
#include <drawtxt.h>
#include <appl_wxstruct.h>
#include <worksheet.h>
#include <class_title_block.h>
#include <build_version.h>
#include <worksheet_shape_builder.h>
#define TEXTSIZE 100 // worksheet text size #define TEXTSIZE 100 // worksheet text size
// Work sheet structure type definitions. // Work sheet structure type definitions.
...@@ -150,7 +156,7 @@ Ki_WorkSheetData WS_Osn1_Line1 = ...@@ -150,7 +156,7 @@ Ki_WorkSheetData WS_Osn1_Line1 =
&WS_Osn1_Line2, &WS_Osn1_Line2,
Mm2mils( 185 ),Mm2mils( 55 ), Mm2mils( 185 ),Mm2mils( 55 ),
0, Mm2mils( 55 ), 0, Mm2mils( 55 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line2 = Ki_WorkSheetData WS_Osn1_Line2 =
...@@ -159,7 +165,7 @@ Ki_WorkSheetData WS_Osn1_Line2 = ...@@ -159,7 +165,7 @@ Ki_WorkSheetData WS_Osn1_Line2 =
&WS_Osn1_Line3, &WS_Osn1_Line3,
Mm2mils( 120 ),Mm2mils( 40 ), Mm2mils( 120 ),Mm2mils( 40 ),
0, Mm2mils( 40 ), 0, Mm2mils( 40 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line3 = Ki_WorkSheetData WS_Osn1_Line3 =
...@@ -168,7 +174,7 @@ Ki_WorkSheetData WS_Osn1_Line3 = ...@@ -168,7 +174,7 @@ Ki_WorkSheetData WS_Osn1_Line3 =
&WS_Osn1_Line4, &WS_Osn1_Line4,
Mm2mils( 185 ),Mm2mils( 35 ), Mm2mils( 185 ),Mm2mils( 35 ),
Mm2mils( 120 ),Mm2mils( 35 ), Mm2mils( 120 ),Mm2mils( 35 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line4 = Ki_WorkSheetData WS_Osn1_Line4 =
...@@ -177,7 +183,7 @@ Ki_WorkSheetData WS_Osn1_Line4 = ...@@ -177,7 +183,7 @@ Ki_WorkSheetData WS_Osn1_Line4 =
&WS_Osn1_Line5, &WS_Osn1_Line5,
Mm2mils( 50 ), Mm2mils( 35 ), Mm2mils( 50 ), Mm2mils( 35 ),
0, Mm2mils( 35 ), 0, Mm2mils( 35 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line5 = Ki_WorkSheetData WS_Osn1_Line5 =
...@@ -186,7 +192,7 @@ Ki_WorkSheetData WS_Osn1_Line5 = ...@@ -186,7 +192,7 @@ Ki_WorkSheetData WS_Osn1_Line5 =
&WS_Osn1_Line6, &WS_Osn1_Line6,
Mm2mils( 185 ),Mm2mils( 30 ), Mm2mils( 185 ),Mm2mils( 30 ),
Mm2mils( 120 ),Mm2mils( 30 ), Mm2mils( 120 ),Mm2mils( 30 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line6 = Ki_WorkSheetData WS_Osn1_Line6 =
...@@ -195,7 +201,7 @@ Ki_WorkSheetData WS_Osn1_Line6 = ...@@ -195,7 +201,7 @@ Ki_WorkSheetData WS_Osn1_Line6 =
&WS_Osn1_Line7, &WS_Osn1_Line7,
Mm2mils( 50 ), Mm2mils( 20 ), Mm2mils( 50 ), Mm2mils( 20 ),
0, Mm2mils( 20 ), 0, Mm2mils( 20 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line7 = Ki_WorkSheetData WS_Osn1_Line7 =
...@@ -204,7 +210,7 @@ Ki_WorkSheetData WS_Osn1_Line7 = ...@@ -204,7 +210,7 @@ Ki_WorkSheetData WS_Osn1_Line7 =
&WS_Osn1_Line8, &WS_Osn1_Line8,
Mm2mils( 120 ),Mm2mils( 15 ), Mm2mils( 120 ),Mm2mils( 15 ),
0, Mm2mils( 15 ), 0, Mm2mils( 15 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line8 = Ki_WorkSheetData WS_Osn1_Line8 =
...@@ -213,7 +219,7 @@ Ki_WorkSheetData WS_Osn1_Line8 = ...@@ -213,7 +219,7 @@ Ki_WorkSheetData WS_Osn1_Line8 =
&WS_Osn1_Line9, &WS_Osn1_Line9,
Mm2mils( 185 ),Mm2mils( 55 ), Mm2mils( 185 ),Mm2mils( 55 ),
Mm2mils( 185 ), 0, Mm2mils( 185 ), 0,
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line9 = Ki_WorkSheetData WS_Osn1_Line9 =
...@@ -222,7 +228,7 @@ Ki_WorkSheetData WS_Osn1_Line9 = ...@@ -222,7 +228,7 @@ Ki_WorkSheetData WS_Osn1_Line9 =
&WS_Osn1_Line10, &WS_Osn1_Line10,
Mm2mils( 178 ), Mm2mils( 55 ), Mm2mils( 178 ), Mm2mils( 55 ),
Mm2mils( 178 ), Mm2mils( 30 ), Mm2mils( 178 ), Mm2mils( 30 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line10 = Ki_WorkSheetData WS_Osn1_Line10 =
...@@ -231,7 +237,7 @@ Ki_WorkSheetData WS_Osn1_Line10 = ...@@ -231,7 +237,7 @@ Ki_WorkSheetData WS_Osn1_Line10 =
&WS_Osn1_Line11, &WS_Osn1_Line11,
Mm2mils( 168 ), Mm2mils( 55 ), Mm2mils( 168 ), Mm2mils( 55 ),
Mm2mils( 168 ), 0, Mm2mils( 168 ), 0,
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line11 = Ki_WorkSheetData WS_Osn1_Line11 =
...@@ -240,7 +246,7 @@ Ki_WorkSheetData WS_Osn1_Line11 = ...@@ -240,7 +246,7 @@ Ki_WorkSheetData WS_Osn1_Line11 =
&WS_Osn1_Line12, &WS_Osn1_Line12,
Mm2mils( 145 ), Mm2mils( 55 ), Mm2mils( 145 ), Mm2mils( 55 ),
Mm2mils( 145 ), 0, Mm2mils( 145 ), 0,
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line12 = Ki_WorkSheetData WS_Osn1_Line12 =
...@@ -249,7 +255,7 @@ Ki_WorkSheetData WS_Osn1_Line12 = ...@@ -249,7 +255,7 @@ Ki_WorkSheetData WS_Osn1_Line12 =
&WS_Osn1_Line13, &WS_Osn1_Line13,
Mm2mils( 130 ), Mm2mils( 55 ), Mm2mils( 130 ), Mm2mils( 55 ),
Mm2mils( 130 ), 0, Mm2mils( 130 ), 0,
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line13 = Ki_WorkSheetData WS_Osn1_Line13 =
...@@ -258,7 +264,7 @@ Ki_WorkSheetData WS_Osn1_Line13 = ...@@ -258,7 +264,7 @@ Ki_WorkSheetData WS_Osn1_Line13 =
&WS_Osn1_Line14, &WS_Osn1_Line14,
Mm2mils( 120 ), Mm2mils( 55 ), Mm2mils( 120 ), Mm2mils( 55 ),
Mm2mils( 120 ), 0, Mm2mils( 120 ), 0,
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line14 = Ki_WorkSheetData WS_Osn1_Line14 =
...@@ -267,7 +273,7 @@ Ki_WorkSheetData WS_Osn1_Line14 = ...@@ -267,7 +273,7 @@ Ki_WorkSheetData WS_Osn1_Line14 =
&WS_Osn1_Line15, &WS_Osn1_Line15,
Mm2mils( 50 ), Mm2mils( 40 ), Mm2mils( 50 ), Mm2mils( 40 ),
Mm2mils( 50 ), 0, Mm2mils( 50 ), 0,
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line15 = Ki_WorkSheetData WS_Osn1_Line15 =
...@@ -276,7 +282,7 @@ Ki_WorkSheetData WS_Osn1_Line15 = ...@@ -276,7 +282,7 @@ Ki_WorkSheetData WS_Osn1_Line15 =
&WS_Osn1_Line16, &WS_Osn1_Line16,
Mm2mils( 35 ), Mm2mils( 40 ), Mm2mils( 35 ), Mm2mils( 40 ),
Mm2mils( 35 ), Mm2mils( 20 ), Mm2mils( 35 ), Mm2mils( 20 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line16 = Ki_WorkSheetData WS_Osn1_Line16 =
...@@ -285,7 +291,7 @@ Ki_WorkSheetData WS_Osn1_Line16 = ...@@ -285,7 +291,7 @@ Ki_WorkSheetData WS_Osn1_Line16 =
&WS_Osn1_Line17, &WS_Osn1_Line17,
Mm2mils( 30 ), Mm2mils( 20 ), Mm2mils( 30 ), Mm2mils( 20 ),
Mm2mils( 30 ), Mm2mils( 15 ), Mm2mils( 30 ), Mm2mils( 15 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line17 = Ki_WorkSheetData WS_Osn1_Line17 =
...@@ -294,7 +300,7 @@ Ki_WorkSheetData WS_Osn1_Line17 = ...@@ -294,7 +300,7 @@ Ki_WorkSheetData WS_Osn1_Line17 =
&WS_Osn1_Line18, &WS_Osn1_Line18,
Mm2mils( 18 ), Mm2mils( 40 ), Mm2mils( 18 ), Mm2mils( 40 ),
Mm2mils( 18 ), Mm2mils( 20 ), Mm2mils( 18 ), Mm2mils( 20 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line18 = Ki_WorkSheetData WS_Osn1_Line18 =
...@@ -303,7 +309,7 @@ Ki_WorkSheetData WS_Osn1_Line18 = ...@@ -303,7 +309,7 @@ Ki_WorkSheetData WS_Osn1_Line18 =
&WS_Osn1_Line19, &WS_Osn1_Line19,
Mm2mils( 185 ), Mm2mils( 50 ), Mm2mils( 185 ), Mm2mils( 50 ),
Mm2mils( 120 ), Mm2mils( 50 ), Mm2mils( 120 ), Mm2mils( 50 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line19 = Ki_WorkSheetData WS_Osn1_Line19 =
...@@ -312,7 +318,7 @@ Ki_WorkSheetData WS_Osn1_Line19 = ...@@ -312,7 +318,7 @@ Ki_WorkSheetData WS_Osn1_Line19 =
&WS_Osn1_Line20, &WS_Osn1_Line20,
Mm2mils( 185 ), Mm2mils( 45 ), Mm2mils( 185 ), Mm2mils( 45 ),
Mm2mils( 120 ), Mm2mils( 45 ), Mm2mils( 120 ), Mm2mils( 45 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line20 = Ki_WorkSheetData WS_Osn1_Line20 =
...@@ -321,7 +327,7 @@ Ki_WorkSheetData WS_Osn1_Line20 = ...@@ -321,7 +327,7 @@ Ki_WorkSheetData WS_Osn1_Line20 =
&WS_Osn1_Line21, &WS_Osn1_Line21,
Mm2mils( 185 ), Mm2mils( 40 ), Mm2mils( 185 ), Mm2mils( 40 ),
Mm2mils( 120 ), Mm2mils( 40 ), Mm2mils( 120 ), Mm2mils( 40 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line21 = Ki_WorkSheetData WS_Osn1_Line21 =
...@@ -330,7 +336,7 @@ Ki_WorkSheetData WS_Osn1_Line21 = ...@@ -330,7 +336,7 @@ Ki_WorkSheetData WS_Osn1_Line21 =
&WS_Osn1_Line22, &WS_Osn1_Line22,
Mm2mils( 185 ), Mm2mils( 25 ), Mm2mils( 185 ), Mm2mils( 25 ),
Mm2mils( 120 ), Mm2mils( 25 ), Mm2mils( 120 ), Mm2mils( 25 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line22 = Ki_WorkSheetData WS_Osn1_Line22 =
...@@ -339,7 +345,7 @@ Ki_WorkSheetData WS_Osn1_Line22 = ...@@ -339,7 +345,7 @@ Ki_WorkSheetData WS_Osn1_Line22 =
&WS_Osn1_Line23, &WS_Osn1_Line23,
Mm2mils( 185 ), Mm2mils( 20 ), Mm2mils( 185 ), Mm2mils( 20 ),
Mm2mils( 120 ), Mm2mils( 20 ), Mm2mils( 120 ), Mm2mils( 20 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line23 = Ki_WorkSheetData WS_Osn1_Line23 =
...@@ -348,7 +354,7 @@ Ki_WorkSheetData WS_Osn1_Line23 = ...@@ -348,7 +354,7 @@ Ki_WorkSheetData WS_Osn1_Line23 =
&WS_Osn1_Line24, &WS_Osn1_Line24,
Mm2mils( 185 ), Mm2mils( 15 ), Mm2mils( 185 ), Mm2mils( 15 ),
Mm2mils( 120 ), Mm2mils( 15 ), Mm2mils( 120 ), Mm2mils( 15 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line24 = Ki_WorkSheetData WS_Osn1_Line24 =
...@@ -357,7 +363,7 @@ Ki_WorkSheetData WS_Osn1_Line24 = ...@@ -357,7 +363,7 @@ Ki_WorkSheetData WS_Osn1_Line24 =
&WS_Osn1_Line25, &WS_Osn1_Line25,
Mm2mils( 185 ), Mm2mils( 10 ), Mm2mils( 185 ), Mm2mils( 10 ),
Mm2mils( 120 ), Mm2mils( 10 ), Mm2mils( 120 ), Mm2mils( 10 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line25 = Ki_WorkSheetData WS_Osn1_Line25 =
...@@ -366,7 +372,7 @@ Ki_WorkSheetData WS_Osn1_Line25 = ...@@ -366,7 +372,7 @@ Ki_WorkSheetData WS_Osn1_Line25 =
&WS_Osn1_Line26, &WS_Osn1_Line26,
Mm2mils( 185 ), Mm2mils( 5 ), Mm2mils( 185 ), Mm2mils( 5 ),
Mm2mils( 120 ), Mm2mils( 5 ), Mm2mils( 120 ), Mm2mils( 5 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line26 = Ki_WorkSheetData WS_Osn1_Line26 =
...@@ -375,7 +381,7 @@ Ki_WorkSheetData WS_Osn1_Line26 = ...@@ -375,7 +381,7 @@ Ki_WorkSheetData WS_Osn1_Line26 =
&WS_Osn1_Line27, &WS_Osn1_Line27,
Mm2mils( 45 ), Mm2mils( 35 ), Mm2mils( 45 ), Mm2mils( 35 ),
Mm2mils( 45 ), Mm2mils( 20 ), Mm2mils( 45 ), Mm2mils( 20 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Line27 = Ki_WorkSheetData WS_Osn1_Line27 =
...@@ -384,7 +390,7 @@ Ki_WorkSheetData WS_Osn1_Line27 = ...@@ -384,7 +390,7 @@ Ki_WorkSheetData WS_Osn1_Line27 =
&WS_Osn1_Text1, &WS_Osn1_Text1,
Mm2mils( 40 ), Mm2mils( 35 ), Mm2mils( 40 ), Mm2mils( 35 ),
Mm2mils( 40 ), Mm2mils( 20 ), Mm2mils( 40 ), Mm2mils( 20 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn1_Text1 = Ki_WorkSheetData WS_Osn1_Text1 =
...@@ -393,7 +399,7 @@ Ki_WorkSheetData WS_Osn1_Text1 = ...@@ -393,7 +399,7 @@ Ki_WorkSheetData WS_Osn1_Text1 =
&WS_Osn1_Text2, &WS_Osn1_Text2,
Mm2mils( 181.5 ),Mm2mils( 32.5 ), Mm2mils( 181.5 ),Mm2mils( 32.5 ),
0, 0, 0, 0,
wxT( "Изм." ), NULL wxT( "Изм." )
}; };
Ki_WorkSheetData WS_Osn1_Text2 = Ki_WorkSheetData WS_Osn1_Text2 =
...@@ -402,7 +408,7 @@ Ki_WorkSheetData WS_Osn1_Text2 = ...@@ -402,7 +408,7 @@ Ki_WorkSheetData WS_Osn1_Text2 =
&WS_Osn1_Text3, &WS_Osn1_Text3,
Mm2mils( 184 ), Mm2mils( 27.5 ), Mm2mils( 184 ), Mm2mils( 27.5 ),
0, 0, 0, 0,
wxT( "Разраб." ),NULL wxT( "Разраб." )
}; };
Ki_WorkSheetData WS_Osn1_Text3 = Ki_WorkSheetData WS_Osn1_Text3 =
...@@ -411,7 +417,7 @@ Ki_WorkSheetData WS_Osn1_Text3 = ...@@ -411,7 +417,7 @@ Ki_WorkSheetData WS_Osn1_Text3 =
&WS_Osn1_Text4, &WS_Osn1_Text4,
Mm2mils( 184 ),Mm2mils( 22.5 ), Mm2mils( 184 ),Mm2mils( 22.5 ),
0, 0, 0, 0,
wxT( "Пров." ),NULL wxT( "Пров." )
}; };
Ki_WorkSheetData WS_Osn1_Text4 = Ki_WorkSheetData WS_Osn1_Text4 =
...@@ -420,7 +426,7 @@ Ki_WorkSheetData WS_Osn1_Text4 = ...@@ -420,7 +426,7 @@ Ki_WorkSheetData WS_Osn1_Text4 =
&WS_Osn1_Text5, &WS_Osn1_Text5,
Mm2mils( 184 ), Mm2mils( 17.5 ), Mm2mils( 184 ), Mm2mils( 17.5 ),
0, 0, 0, 0,
wxT( "Т.контр." ),NULL wxT( "Т.контр." )
}; };
Ki_WorkSheetData WS_Osn1_Text5 = Ki_WorkSheetData WS_Osn1_Text5 =
...@@ -429,7 +435,7 @@ Ki_WorkSheetData WS_Osn1_Text5 = ...@@ -429,7 +435,7 @@ Ki_WorkSheetData WS_Osn1_Text5 =
&WS_Osn1_Text6, &WS_Osn1_Text6,
Mm2mils( 184 ), Mm2mils( 7.5 ), Mm2mils( 184 ), Mm2mils( 7.5 ),
0, 0, 0, 0,
wxT( "Н.контр." ),NULL wxT( "Н.контр." )
}; };
Ki_WorkSheetData WS_Osn1_Text6 = Ki_WorkSheetData WS_Osn1_Text6 =
...@@ -438,7 +444,7 @@ Ki_WorkSheetData WS_Osn1_Text6 = ...@@ -438,7 +444,7 @@ Ki_WorkSheetData WS_Osn1_Text6 =
&WS_Osn1_Text7, &WS_Osn1_Text7,
Mm2mils( 184 ),Mm2mils( 2.5 ), Mm2mils( 184 ),Mm2mils( 2.5 ),
0, 0, 0, 0,
wxT( "Утв." ), NULL wxT( "Утв." )
}; };
Ki_WorkSheetData WS_Osn1_Text7 = Ki_WorkSheetData WS_Osn1_Text7 =
...@@ -447,7 +453,7 @@ Ki_WorkSheetData WS_Osn1_Text7 = ...@@ -447,7 +453,7 @@ Ki_WorkSheetData WS_Osn1_Text7 =
&WS_Osn1_Text8, &WS_Osn1_Text8,
Mm2mils( 173 ),Mm2mils( 32.5 ), Mm2mils( 173 ),Mm2mils( 32.5 ),
0, 0, 0, 0,
wxT( "Лист" ), NULL wxT( "Лист" )
}; };
Ki_WorkSheetData WS_Osn1_Text8 = Ki_WorkSheetData WS_Osn1_Text8 =
...@@ -456,7 +462,7 @@ Ki_WorkSheetData WS_Osn1_Text8 = ...@@ -456,7 +462,7 @@ Ki_WorkSheetData WS_Osn1_Text8 =
&WS_Osn1_Text9, &WS_Osn1_Text9,
Mm2mils( 156.5 ), Mm2mils( 32.5 ), Mm2mils( 156.5 ), Mm2mils( 32.5 ),
0, 0, 0, 0,
wxT( "N докум." ),NULL wxT( "N докум." )
}; };
Ki_WorkSheetData WS_Osn1_Text9 = Ki_WorkSheetData WS_Osn1_Text9 =
...@@ -465,7 +471,7 @@ Ki_WorkSheetData WS_Osn1_Text9 = ...@@ -465,7 +471,7 @@ Ki_WorkSheetData WS_Osn1_Text9 =
&WS_Osn1_Text10, &WS_Osn1_Text10,
Mm2mils( 137.5 ),Mm2mils( 32.5 ), Mm2mils( 137.5 ),Mm2mils( 32.5 ),
0, 0, 0, 0,
wxT( "Подп." ), NULL wxT( "Подп." )
}; };
Ki_WorkSheetData WS_Osn1_Text10 = Ki_WorkSheetData WS_Osn1_Text10 =
...@@ -474,7 +480,7 @@ Ki_WorkSheetData WS_Osn1_Text10 = ...@@ -474,7 +480,7 @@ Ki_WorkSheetData WS_Osn1_Text10 =
&WS_Osn1_Text11, &WS_Osn1_Text11,
Mm2mils( 125 ), Mm2mils( 32.5 ), Mm2mils( 125 ), Mm2mils( 32.5 ),
0, 0, 0, 0,
wxT( "Дата" ), NULL wxT( "Дата" )
}; };
Ki_WorkSheetData WS_Osn1_Text11 = Ki_WorkSheetData WS_Osn1_Text11 =
...@@ -483,7 +489,7 @@ Ki_WorkSheetData WS_Osn1_Text11 = ...@@ -483,7 +489,7 @@ Ki_WorkSheetData WS_Osn1_Text11 =
&WS_Osn1_Text12, &WS_Osn1_Text12,
Mm2mils( 42.5 ),Mm2mils( 37.5 ), Mm2mils( 42.5 ),Mm2mils( 37.5 ),
0, 0, 0, 0,
wxT( "Лит." ), NULL wxT( "Лит." )
}; };
Ki_WorkSheetData WS_Osn1_Text12 = Ki_WorkSheetData WS_Osn1_Text12 =
...@@ -492,7 +498,7 @@ Ki_WorkSheetData WS_Osn1_Text12 = ...@@ -492,7 +498,7 @@ Ki_WorkSheetData WS_Osn1_Text12 =
&WS_Osn1_Text13, &WS_Osn1_Text13,
Mm2mils( 26.5 ),Mm2mils( 37.5 ), Mm2mils( 26.5 ),Mm2mils( 37.5 ),
0, 0, 0, 0,
wxT( "Масса" ), NULL wxT( "Масса" )
}; };
Ki_WorkSheetData WS_Osn1_Text13 = Ki_WorkSheetData WS_Osn1_Text13 =
...@@ -501,7 +507,7 @@ Ki_WorkSheetData WS_Osn1_Text13 = ...@@ -501,7 +507,7 @@ Ki_WorkSheetData WS_Osn1_Text13 =
&WS_Osn1_Text14, &WS_Osn1_Text14,
Mm2mils( 9 ), Mm2mils( 37.5 ), Mm2mils( 9 ), Mm2mils( 37.5 ),
0, 0, 0, 0,
wxT( "Масштаб" ),NULL wxT( "Масштаб" )
}; };
Ki_WorkSheetData WS_Osn1_Text14 = Ki_WorkSheetData WS_Osn1_Text14 =
...@@ -510,7 +516,7 @@ Ki_WorkSheetData WS_Osn1_Text14 = ...@@ -510,7 +516,7 @@ Ki_WorkSheetData WS_Osn1_Text14 =
&WS_Osn1_Text15, &WS_Osn1_Text15,
Mm2mils( 49 ), Mm2mils( 17.5 ), Mm2mils( 49 ), Mm2mils( 17.5 ),
0, 0, 0, 0,
wxT( "Лист" ), NULL wxT( "Лист" )
}; };
Ki_WorkSheetData WS_Osn1_Text15 = Ki_WorkSheetData WS_Osn1_Text15 =
...@@ -519,7 +525,7 @@ Ki_WorkSheetData WS_Osn1_Text15 = ...@@ -519,7 +525,7 @@ Ki_WorkSheetData WS_Osn1_Text15 =
&WS_Osn1_Text16, &WS_Osn1_Text16,
Mm2mils( 29 ), Mm2mils( 17.5 ), Mm2mils( 29 ), Mm2mils( 17.5 ),
0, 0, 0, 0,
wxT( "Листов" ),NULL wxT( "Листов" )
}; };
Ki_WorkSheetData WS_Osn1_Text16 = Ki_WorkSheetData WS_Osn1_Text16 =
...@@ -528,7 +534,7 @@ Ki_WorkSheetData WS_Osn1_Text16 = ...@@ -528,7 +534,7 @@ Ki_WorkSheetData WS_Osn1_Text16 =
&WS_Osn1_Text17, &WS_Osn1_Text17,
Mm2mils( 40 ), -Mm2mils( 2.5 ), Mm2mils( 40 ), -Mm2mils( 2.5 ),
0, 0, 0, 0,
wxT( "Формат" ),NULL wxT( "Формат" )
}; };
Ki_WorkSheetData WS_Osn1_Text17 = Ki_WorkSheetData WS_Osn1_Text17 =
...@@ -537,7 +543,7 @@ Ki_WorkSheetData WS_Osn1_Text17 = ...@@ -537,7 +543,7 @@ Ki_WorkSheetData WS_Osn1_Text17 =
NULL, NULL,
Mm2mils( 110 ), -Mm2mils( 2.5 ), Mm2mils( 110 ), -Mm2mils( 2.5 ),
0, 0, 0, 0,
wxT( "Копировал" ),NULL wxT( "Копировал" )
}; };
Ki_WorkSheetData WS_Osn2a_Line1 = Ki_WorkSheetData WS_Osn2a_Line1 =
...@@ -546,7 +552,7 @@ Ki_WorkSheetData WS_Osn2a_Line1 = ...@@ -546,7 +552,7 @@ Ki_WorkSheetData WS_Osn2a_Line1 =
&WS_Osn2a_Line2, &WS_Osn2a_Line2,
Mm2mils( 185 ), Mm2mils( 15 ), Mm2mils( 185 ), Mm2mils( 15 ),
0, Mm2mils( 15 ), 0, Mm2mils( 15 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn2a_Line2 = Ki_WorkSheetData WS_Osn2a_Line2 =
...@@ -555,7 +561,7 @@ Ki_WorkSheetData WS_Osn2a_Line2 = ...@@ -555,7 +561,7 @@ Ki_WorkSheetData WS_Osn2a_Line2 =
&WS_Osn2a_Line3, &WS_Osn2a_Line3,
Mm2mils( 185 ), Mm2mils( 5 ), Mm2mils( 185 ), Mm2mils( 5 ),
Mm2mils( 120 ), Mm2mils( 5 ), Mm2mils( 120 ), Mm2mils( 5 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn2a_Line3 = Ki_WorkSheetData WS_Osn2a_Line3 =
...@@ -564,7 +570,7 @@ Ki_WorkSheetData WS_Osn2a_Line3 = ...@@ -564,7 +570,7 @@ Ki_WorkSheetData WS_Osn2a_Line3 =
&WS_Osn2a_Line4, &WS_Osn2a_Line4,
Mm2mils( 10 ), Mm2mils( 8 ), Mm2mils( 10 ), Mm2mils( 8 ),
0, Mm2mils( 8 ), 0, Mm2mils( 8 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn2a_Line4 = Ki_WorkSheetData WS_Osn2a_Line4 =
...@@ -573,7 +579,7 @@ Ki_WorkSheetData WS_Osn2a_Line4 = ...@@ -573,7 +579,7 @@ Ki_WorkSheetData WS_Osn2a_Line4 =
&WS_Osn2a_Line5, &WS_Osn2a_Line5,
Mm2mils( 185 ), Mm2mils( 15 ), Mm2mils( 185 ), Mm2mils( 15 ),
Mm2mils( 185 ), 0, Mm2mils( 185 ), 0,
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn2a_Line5 = Ki_WorkSheetData WS_Osn2a_Line5 =
...@@ -582,7 +588,7 @@ Ki_WorkSheetData WS_Osn2a_Line5 = ...@@ -582,7 +588,7 @@ Ki_WorkSheetData WS_Osn2a_Line5 =
&WS_Osn2a_Line6, &WS_Osn2a_Line6,
Mm2mils( 178 ), Mm2mils( 15 ), Mm2mils( 178 ), Mm2mils( 15 ),
Mm2mils( 178 ), 0, Mm2mils( 178 ), 0,
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn2a_Line6 = Ki_WorkSheetData WS_Osn2a_Line6 =
...@@ -591,7 +597,7 @@ Ki_WorkSheetData WS_Osn2a_Line6 = ...@@ -591,7 +597,7 @@ Ki_WorkSheetData WS_Osn2a_Line6 =
&WS_Osn2a_Line7, &WS_Osn2a_Line7,
Mm2mils( 168 ), Mm2mils( 15 ), Mm2mils( 168 ), Mm2mils( 15 ),
Mm2mils( 168 ), 0, Mm2mils( 168 ), 0,
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn2a_Line7 = Ki_WorkSheetData WS_Osn2a_Line7 =
...@@ -600,7 +606,7 @@ Ki_WorkSheetData WS_Osn2a_Line7 = ...@@ -600,7 +606,7 @@ Ki_WorkSheetData WS_Osn2a_Line7 =
&WS_Osn2a_Line8, &WS_Osn2a_Line8,
Mm2mils( 145 ), Mm2mils( 15 ), Mm2mils( 145 ), Mm2mils( 15 ),
Mm2mils( 145 ), 0, Mm2mils( 145 ), 0,
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn2a_Line8 = Ki_WorkSheetData WS_Osn2a_Line8 =
...@@ -609,7 +615,7 @@ Ki_WorkSheetData WS_Osn2a_Line8 = ...@@ -609,7 +615,7 @@ Ki_WorkSheetData WS_Osn2a_Line8 =
&WS_Osn2a_Line9, &WS_Osn2a_Line9,
Mm2mils( 130 ), Mm2mils( 15 ), Mm2mils( 130 ), Mm2mils( 15 ),
Mm2mils( 130 ), 0, Mm2mils( 130 ), 0,
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn2a_Line9 = Ki_WorkSheetData WS_Osn2a_Line9 =
...@@ -618,7 +624,7 @@ Ki_WorkSheetData WS_Osn2a_Line9 = ...@@ -618,7 +624,7 @@ Ki_WorkSheetData WS_Osn2a_Line9 =
&WS_Osn2a_Line10, &WS_Osn2a_Line10,
Mm2mils( 120 ), Mm2mils( 15 ), Mm2mils( 120 ), Mm2mils( 15 ),
Mm2mils( 120 ), 0, Mm2mils( 120 ), 0,
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn2a_Line10 = Ki_WorkSheetData WS_Osn2a_Line10 =
...@@ -627,7 +633,7 @@ Ki_WorkSheetData WS_Osn2a_Line10 = ...@@ -627,7 +633,7 @@ Ki_WorkSheetData WS_Osn2a_Line10 =
&WS_Osn2a_Line11, &WS_Osn2a_Line11,
Mm2mils( 10 ), Mm2mils( 15 ), Mm2mils( 10 ), Mm2mils( 15 ),
Mm2mils( 10 ), 0, Mm2mils( 10 ), 0,
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn2a_Line11 = Ki_WorkSheetData WS_Osn2a_Line11 =
...@@ -636,7 +642,7 @@ Ki_WorkSheetData WS_Osn2a_Line11 = ...@@ -636,7 +642,7 @@ Ki_WorkSheetData WS_Osn2a_Line11 =
&WS_Osn2a_Text1, &WS_Osn2a_Text1,
Mm2mils( 185 ), Mm2mils( 10 ), Mm2mils( 185 ), Mm2mils( 10 ),
Mm2mils( 120 ), Mm2mils( 10 ), Mm2mils( 120 ), Mm2mils( 10 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_Osn2a_Text1 = Ki_WorkSheetData WS_Osn2a_Text1 =
...@@ -645,7 +651,7 @@ Ki_WorkSheetData WS_Osn2a_Text1 = ...@@ -645,7 +651,7 @@ Ki_WorkSheetData WS_Osn2a_Text1 =
&WS_Osn2a_Text2, &WS_Osn2a_Text2,
Mm2mils( 181.5 ),Mm2mils( 2.5 ), Mm2mils( 181.5 ),Mm2mils( 2.5 ),
0, 0, 0, 0,
wxT( "Изм." ), NULL wxT( "Изм." )
}; };
Ki_WorkSheetData WS_Osn2a_Text2 = Ki_WorkSheetData WS_Osn2a_Text2 =
...@@ -654,7 +660,7 @@ Ki_WorkSheetData WS_Osn2a_Text2 = ...@@ -654,7 +660,7 @@ Ki_WorkSheetData WS_Osn2a_Text2 =
&WS_Osn2a_Text3, &WS_Osn2a_Text3,
Mm2mils( 173 ), Mm2mils( 2.5 ), Mm2mils( 173 ), Mm2mils( 2.5 ),
0, 0, 0, 0,
wxT( "Лист" ), NULL wxT( "Лист" )
}; };
Ki_WorkSheetData WS_Osn2a_Text3 = Ki_WorkSheetData WS_Osn2a_Text3 =
...@@ -663,7 +669,7 @@ Ki_WorkSheetData WS_Osn2a_Text3 = ...@@ -663,7 +669,7 @@ Ki_WorkSheetData WS_Osn2a_Text3 =
&WS_Osn2a_Text4, &WS_Osn2a_Text4,
Mm2mils( 156.5 ), Mm2mils( 2.5 ), Mm2mils( 156.5 ), Mm2mils( 2.5 ),
0, 0, 0, 0,
wxT( "N докум." ),NULL wxT( "N докум." )
}; };
Ki_WorkSheetData WS_Osn2a_Text4 = Ki_WorkSheetData WS_Osn2a_Text4 =
...@@ -672,7 +678,7 @@ Ki_WorkSheetData WS_Osn2a_Text4 = ...@@ -672,7 +678,7 @@ Ki_WorkSheetData WS_Osn2a_Text4 =
&WS_Osn2a_Text5, &WS_Osn2a_Text5,
Mm2mils( 137.5 ),Mm2mils( 2.5 ), Mm2mils( 137.5 ),Mm2mils( 2.5 ),
0, 0, 0, 0,
wxT( "Подп." ), NULL wxT( "Подп." )
}; };
Ki_WorkSheetData WS_Osn2a_Text5 = Ki_WorkSheetData WS_Osn2a_Text5 =
...@@ -681,7 +687,7 @@ Ki_WorkSheetData WS_Osn2a_Text5 = ...@@ -681,7 +687,7 @@ Ki_WorkSheetData WS_Osn2a_Text5 =
&WS_Osn2a_Text6, &WS_Osn2a_Text6,
Mm2mils( 125 ), Mm2mils( 2.5 ), Mm2mils( 125 ), Mm2mils( 2.5 ),
0, 0, 0, 0,
wxT( "Дата" ), NULL wxT( "Дата" )
}; };
Ki_WorkSheetData WS_Osn2a_Text6 = Ki_WorkSheetData WS_Osn2a_Text6 =
...@@ -690,7 +696,7 @@ Ki_WorkSheetData WS_Osn2a_Text6 = ...@@ -690,7 +696,7 @@ Ki_WorkSheetData WS_Osn2a_Text6 =
&WS_Osn2a_Text7, &WS_Osn2a_Text7,
Mm2mils( 5 ), Mm2mils( 11.5 ), Mm2mils( 5 ), Mm2mils( 11.5 ),
0, 0, 0, 0,
wxT( "Лист" ), NULL wxT( "Лист" )
}; };
Ki_WorkSheetData WS_Osn2a_Text7 = Ki_WorkSheetData WS_Osn2a_Text7 =
...@@ -699,7 +705,7 @@ Ki_WorkSheetData WS_Osn2a_Text7 = ...@@ -699,7 +705,7 @@ Ki_WorkSheetData WS_Osn2a_Text7 =
&WS_Osn2a_Text8, &WS_Osn2a_Text8,
Mm2mils( 40 ), -Mm2mils( 2.5 ), Mm2mils( 40 ), -Mm2mils( 2.5 ),
0, 0, 0, 0,
wxT( "Формат" ),NULL wxT( "Формат" )
}; };
Ki_WorkSheetData WS_Osn2a_Text8 = Ki_WorkSheetData WS_Osn2a_Text8 =
...@@ -708,7 +714,7 @@ Ki_WorkSheetData WS_Osn2a_Text8 = ...@@ -708,7 +714,7 @@ Ki_WorkSheetData WS_Osn2a_Text8 =
NULL, NULL,
Mm2mils( 110 ), -Mm2mils( 2.5 ), Mm2mils( 110 ), -Mm2mils( 2.5 ),
0, 0, 0, 0,
wxT( "Копировал" ),NULL wxT( "Копировал" )
}; };
// Center - left bottom corner // Center - left bottom corner
...@@ -719,7 +725,7 @@ Ki_WorkSheetData WS_DopLeft_Line1 = ...@@ -719,7 +725,7 @@ Ki_WorkSheetData WS_DopLeft_Line1 =
&WS_DopLeft_Line2, &WS_DopLeft_Line2,
Mm2mils( 12 ), Mm2mils( 145 ), Mm2mils( 12 ), Mm2mils( 145 ),
0, Mm2mils( 145 ), 0, Mm2mils( 145 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_DopLeft_Line2 = Ki_WorkSheetData WS_DopLeft_Line2 =
...@@ -728,7 +734,7 @@ Ki_WorkSheetData WS_DopLeft_Line2 = ...@@ -728,7 +734,7 @@ Ki_WorkSheetData WS_DopLeft_Line2 =
&WS_DopLeft_Line3, &WS_DopLeft_Line3,
Mm2mils( 12 ), Mm2mils( 110 ), Mm2mils( 12 ), Mm2mils( 110 ),
0, Mm2mils( 110 ), 0, Mm2mils( 110 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_DopLeft_Line3 = Ki_WorkSheetData WS_DopLeft_Line3 =
...@@ -737,7 +743,7 @@ Ki_WorkSheetData WS_DopLeft_Line3 = ...@@ -737,7 +743,7 @@ Ki_WorkSheetData WS_DopLeft_Line3 =
&WS_DopLeft_Line4, &WS_DopLeft_Line4,
Mm2mils( 12 ), Mm2mils( 85 ), Mm2mils( 12 ), Mm2mils( 85 ),
0, Mm2mils( 85 ), 0, Mm2mils( 85 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_DopLeft_Line4 = Ki_WorkSheetData WS_DopLeft_Line4 =
...@@ -746,7 +752,7 @@ Ki_WorkSheetData WS_DopLeft_Line4 = ...@@ -746,7 +752,7 @@ Ki_WorkSheetData WS_DopLeft_Line4 =
&WS_DopLeft_Line5, &WS_DopLeft_Line5,
Mm2mils( 12 ), Mm2mils( 60 ), Mm2mils( 12 ), Mm2mils( 60 ),
0, Mm2mils( 60 ), 0, Mm2mils( 60 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_DopLeft_Line5 = Ki_WorkSheetData WS_DopLeft_Line5 =
...@@ -755,7 +761,7 @@ Ki_WorkSheetData WS_DopLeft_Line5 = ...@@ -755,7 +761,7 @@ Ki_WorkSheetData WS_DopLeft_Line5 =
&WS_DopLeft_Line6, &WS_DopLeft_Line6,
Mm2mils( 12 ), Mm2mils( 25 ), Mm2mils( 12 ), Mm2mils( 25 ),
0, Mm2mils( 25 ), 0, Mm2mils( 25 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_DopLeft_Line6 = Ki_WorkSheetData WS_DopLeft_Line6 =
...@@ -764,7 +770,7 @@ Ki_WorkSheetData WS_DopLeft_Line6 = ...@@ -764,7 +770,7 @@ Ki_WorkSheetData WS_DopLeft_Line6 =
&WS_DopLeft_Line7, &WS_DopLeft_Line7,
Mm2mils( 12 ), 0, Mm2mils( 12 ), 0,
0, 0, 0, 0,
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_DopLeft_Line7 = Ki_WorkSheetData WS_DopLeft_Line7 =
...@@ -773,7 +779,7 @@ Ki_WorkSheetData WS_DopLeft_Line7 = ...@@ -773,7 +779,7 @@ Ki_WorkSheetData WS_DopLeft_Line7 =
&WS_DopLeft_Line8, &WS_DopLeft_Line8,
Mm2mils( 12 ), Mm2mils( 145 ), Mm2mils( 12 ), Mm2mils( 145 ),
Mm2mils( 12 ), 0, Mm2mils( 12 ), 0,
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_DopLeft_Line8 = Ki_WorkSheetData WS_DopLeft_Line8 =
...@@ -782,7 +788,7 @@ Ki_WorkSheetData WS_DopLeft_Line8 = ...@@ -782,7 +788,7 @@ Ki_WorkSheetData WS_DopLeft_Line8 =
&WS_DopLeft_Text1, &WS_DopLeft_Text1,
Mm2mils( 7 ), Mm2mils( 145 ), Mm2mils( 7 ), Mm2mils( 145 ),
Mm2mils( 7 ), 0, Mm2mils( 7 ), 0,
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_DopLeft_Text1 = Ki_WorkSheetData WS_DopLeft_Text1 =
...@@ -791,7 +797,7 @@ Ki_WorkSheetData WS_DopLeft_Text1 = ...@@ -791,7 +797,7 @@ Ki_WorkSheetData WS_DopLeft_Text1 =
&WS_DopLeft_Text2, &WS_DopLeft_Text2,
Mm2mils( 9.5 ), Mm2mils( 12.5 ), Mm2mils( 9.5 ), Mm2mils( 12.5 ),
0, 0, 0, 0,
wxT( "Инв.N подл." ),NULL wxT( "Инв.N подл." )
}; };
Ki_WorkSheetData WS_DopLeft_Text2 = Ki_WorkSheetData WS_DopLeft_Text2 =
...@@ -800,7 +806,7 @@ Ki_WorkSheetData WS_DopLeft_Text2 = ...@@ -800,7 +806,7 @@ Ki_WorkSheetData WS_DopLeft_Text2 =
&WS_DopLeft_Text3, &WS_DopLeft_Text3,
Mm2mils( 9.5 ), Mm2mils( 42.5 ), Mm2mils( 9.5 ), Mm2mils( 42.5 ),
0, 0, 0, 0,
wxT( "Подп. и дата" ),NULL wxT( "Подп. и дата" )
}; };
Ki_WorkSheetData WS_DopLeft_Text3 = Ki_WorkSheetData WS_DopLeft_Text3 =
...@@ -809,7 +815,7 @@ Ki_WorkSheetData WS_DopLeft_Text3 = ...@@ -809,7 +815,7 @@ Ki_WorkSheetData WS_DopLeft_Text3 =
&WS_DopLeft_Text4, &WS_DopLeft_Text4,
Mm2mils( 9.5 ), Mm2mils( 72.5 ), Mm2mils( 9.5 ), Mm2mils( 72.5 ),
0, 0, 0, 0,
wxT( "Взам.инв.N" ),NULL wxT( "Взам.инв.N" )
}; };
Ki_WorkSheetData WS_DopLeft_Text4 = Ki_WorkSheetData WS_DopLeft_Text4 =
...@@ -818,7 +824,7 @@ Ki_WorkSheetData WS_DopLeft_Text4 = ...@@ -818,7 +824,7 @@ Ki_WorkSheetData WS_DopLeft_Text4 =
&WS_DopLeft_Text5, &WS_DopLeft_Text5,
Mm2mils( 9.5 ), Mm2mils( 97.5 ), Mm2mils( 9.5 ), Mm2mils( 97.5 ),
0, 0, 0, 0,
wxT( "Инв.N дубл." ),NULL wxT( "Инв.N дубл." )
}; };
Ki_WorkSheetData WS_DopLeft_Text5 = Ki_WorkSheetData WS_DopLeft_Text5 =
...@@ -827,7 +833,7 @@ Ki_WorkSheetData WS_DopLeft_Text5 = ...@@ -827,7 +833,7 @@ Ki_WorkSheetData WS_DopLeft_Text5 =
&WS_DopLeft_Line9, &WS_DopLeft_Line9,
Mm2mils( 9.5 ), Mm2mils( 127.5 ), Mm2mils( 9.5 ), Mm2mils( 127.5 ),
0, 0, 0, 0,
wxT( "Подп. и дата" ),NULL wxT( "Подп. и дата" )
}; };
Ki_WorkSheetData WS_DopLeft_Line9 = Ki_WorkSheetData WS_DopLeft_Line9 =
...@@ -836,7 +842,7 @@ Ki_WorkSheetData WS_DopLeft_Line9 = ...@@ -836,7 +842,7 @@ Ki_WorkSheetData WS_DopLeft_Line9 =
&WS_DopLeft_Line10, &WS_DopLeft_Line10,
Mm2mils( 7 ), Mm2mils( 287 ), Mm2mils( 7 ), Mm2mils( 287 ),
Mm2mils( 7 ), Mm2mils( 167 ), Mm2mils( 7 ), Mm2mils( 167 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_DopLeft_Line10 = Ki_WorkSheetData WS_DopLeft_Line10 =
...@@ -845,7 +851,7 @@ Ki_WorkSheetData WS_DopLeft_Line10 = ...@@ -845,7 +851,7 @@ Ki_WorkSheetData WS_DopLeft_Line10 =
&WS_DopLeft_Line11, &WS_DopLeft_Line11,
Mm2mils( 12 ), Mm2mils( 287 ), Mm2mils( 12 ), Mm2mils( 287 ),
Mm2mils( 12 ), Mm2mils( 167 ), Mm2mils( 12 ), Mm2mils( 167 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_DopLeft_Line11 = Ki_WorkSheetData WS_DopLeft_Line11 =
...@@ -854,7 +860,7 @@ Ki_WorkSheetData WS_DopLeft_Line11 = ...@@ -854,7 +860,7 @@ Ki_WorkSheetData WS_DopLeft_Line11 =
&WS_DopLeft_Line12, &WS_DopLeft_Line12,
Mm2mils( 12 ), Mm2mils( 287 ), Mm2mils( 12 ), Mm2mils( 287 ),
Mm2mils( 12 ), Mm2mils( 167 ), Mm2mils( 12 ), Mm2mils( 167 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_DopLeft_Line12 = Ki_WorkSheetData WS_DopLeft_Line12 =
...@@ -863,7 +869,7 @@ Ki_WorkSheetData WS_DopLeft_Line12 = ...@@ -863,7 +869,7 @@ Ki_WorkSheetData WS_DopLeft_Line12 =
&WS_DopLeft_Line13, &WS_DopLeft_Line13,
Mm2mils( 12 ), Mm2mils( 167 ), Mm2mils( 12 ), Mm2mils( 167 ),
0, Mm2mils( 167 ), 0, Mm2mils( 167 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_DopLeft_Line13 = Ki_WorkSheetData WS_DopLeft_Line13 =
...@@ -872,7 +878,7 @@ Ki_WorkSheetData WS_DopLeft_Line13 = ...@@ -872,7 +878,7 @@ Ki_WorkSheetData WS_DopLeft_Line13 =
&WS_DopLeft_Line14, &WS_DopLeft_Line14,
Mm2mils( 12 ), Mm2mils( 227 ), Mm2mils( 12 ), Mm2mils( 227 ),
0, Mm2mils( 227 ), 0, Mm2mils( 227 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_DopLeft_Line14 = Ki_WorkSheetData WS_DopLeft_Line14 =
...@@ -881,7 +887,7 @@ Ki_WorkSheetData WS_DopLeft_Line14 = ...@@ -881,7 +887,7 @@ Ki_WorkSheetData WS_DopLeft_Line14 =
&WS_DopLeft_Text6, &WS_DopLeft_Text6,
Mm2mils( 12 ), Mm2mils( 287 ), Mm2mils( 12 ), Mm2mils( 287 ),
0, Mm2mils( 287 ), 0, Mm2mils( 287 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_DopLeft_Text6 = Ki_WorkSheetData WS_DopLeft_Text6 =
...@@ -890,7 +896,7 @@ Ki_WorkSheetData WS_DopLeft_Text6 = ...@@ -890,7 +896,7 @@ Ki_WorkSheetData WS_DopLeft_Text6 =
&WS_DopLeft_Text7, &WS_DopLeft_Text7,
Mm2mils( 9.5 ), Mm2mils( 197 ), Mm2mils( 9.5 ), Mm2mils( 197 ),
0, 0, 0, 0,
wxT( "Справ. N" ),NULL wxT( "Справ. N" )
}; };
Ki_WorkSheetData WS_DopLeft_Text7 = Ki_WorkSheetData WS_DopLeft_Text7 =
...@@ -899,7 +905,7 @@ Ki_WorkSheetData WS_DopLeft_Text7 = ...@@ -899,7 +905,7 @@ Ki_WorkSheetData WS_DopLeft_Text7 =
NULL, NULL,
Mm2mils( 9.5 ), Mm2mils( 257 ), Mm2mils( 9.5 ), Mm2mils( 257 ),
0, 0, 0, 0,
wxT( "Перв. примен." ),NULL wxT( "Перв. примен." )
}; };
// Center - left top corner // Center - left top corner
...@@ -910,7 +916,7 @@ Ki_WorkSheetData WS_DopTop_Line1 = ...@@ -910,7 +916,7 @@ Ki_WorkSheetData WS_DopTop_Line1 =
&WS_DopTop_Line2, &WS_DopTop_Line2,
Mm2mils( 70 ), 0, Mm2mils( 70 ), 0,
Mm2mils( 70 ), Mm2mils( 14 ), Mm2mils( 70 ), Mm2mils( 14 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_DopTop_Line2 = Ki_WorkSheetData WS_DopTop_Line2 =
...@@ -919,7 +925,7 @@ Ki_WorkSheetData WS_DopTop_Line2 = ...@@ -919,7 +925,7 @@ Ki_WorkSheetData WS_DopTop_Line2 =
&WS_DopTop_Line3, &WS_DopTop_Line3,
Mm2mils( 70 ), Mm2mils( 14 ), Mm2mils( 70 ), Mm2mils( 14 ),
0, Mm2mils( 14 ), 0, Mm2mils( 14 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_DopTop_Line3 = Ki_WorkSheetData WS_DopTop_Line3 =
...@@ -928,7 +934,7 @@ Ki_WorkSheetData WS_DopTop_Line3 = ...@@ -928,7 +934,7 @@ Ki_WorkSheetData WS_DopTop_Line3 =
&WS_DopTop_Line4, &WS_DopTop_Line4,
Mm2mils( 70 ), Mm2mils( 14 ), Mm2mils( 70 ), Mm2mils( 14 ),
Mm2mils( 137 ), Mm2mils( 14 ), Mm2mils( 137 ), Mm2mils( 14 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_DopTop_Line4 = Ki_WorkSheetData WS_DopTop_Line4 =
...@@ -937,7 +943,7 @@ Ki_WorkSheetData WS_DopTop_Line4 = ...@@ -937,7 +943,7 @@ Ki_WorkSheetData WS_DopTop_Line4 =
&WS_DopTop_Line5, &WS_DopTop_Line5,
Mm2mils( 84 ), Mm2mils( 7 ), Mm2mils( 84 ), Mm2mils( 7 ),
Mm2mils( 137 ), Mm2mils( 7 ), Mm2mils( 137 ), Mm2mils( 7 ),
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_DopTop_Line5 = Ki_WorkSheetData WS_DopTop_Line5 =
...@@ -946,7 +952,7 @@ Ki_WorkSheetData WS_DopTop_Line5 = ...@@ -946,7 +952,7 @@ Ki_WorkSheetData WS_DopTop_Line5 =
&WS_DopTop_Line6, &WS_DopTop_Line6,
Mm2mils( 84 ), Mm2mils( 14 ), Mm2mils( 84 ), Mm2mils( 14 ),
Mm2mils( 84 ), 0, Mm2mils( 84 ), 0,
NULL, NULL NULL
}; };
Ki_WorkSheetData WS_DopTop_Line6 = Ki_WorkSheetData WS_DopTop_Line6 =
...@@ -955,7 +961,7 @@ Ki_WorkSheetData WS_DopTop_Line6 = ...@@ -955,7 +961,7 @@ Ki_WorkSheetData WS_DopTop_Line6 =
NULL, NULL,
Mm2mils( 137 ),Mm2mils( 14 ), Mm2mils( 137 ),Mm2mils( 14 ),
Mm2mils( 137 ), 0, Mm2mils( 137 ), 0,
NULL, NULL NULL
}; };
#include <worksheet_shape_builder.h> #include <worksheet_shape_builder.h>
...@@ -965,7 +971,6 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( ...@@ -965,7 +971,6 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
const wxString& aFileName, const wxString& aFileName,
const wxString& aSheetPathHumanReadable, const wxString& aSheetPathHumanReadable,
const TITLE_BLOCK& aTitleBlock, const TITLE_BLOCK& aTitleBlock,
int aSheetCount, int aSheetNumber,
EDA_COLOR_T aLineColor, EDA_COLOR_T aTextColor ) EDA_COLOR_T aLineColor, EDA_COLOR_T aTextColor )
{ {
wxPoint pos; wxPoint pos;
...@@ -1005,7 +1010,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( ...@@ -1005,7 +1010,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
refy = m_pageSize.y - m_RBmargin.y; refy = m_pageSize.y - m_RBmargin.y;
// First page // First page
if( aSheetNumber == 1 ) if( m_sheetNumber == 1 )
{ {
for( WsItem = &WS_Osn1_Line1; WsItem != NULL; WsItem = WsItem->Pnext ) for( WsItem = &WS_Osn1_Line1; WsItem != NULL; WsItem = WsItem->Pnext )
{ {
...@@ -1013,7 +1018,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( ...@@ -1013,7 +1018,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
pos.y = (refy - WsItem->m_Posy) * m_milsToIu; pos.y = (refy - WsItem->m_Posy) * m_milsToIu;
end.x = (refx - WsItem->m_Endx) * m_milsToIu; end.x = (refx - WsItem->m_Endx) * m_milsToIu;
end.y = (refy - WsItem->m_Endy) * m_milsToIu; end.y = (refy - WsItem->m_Endy) * m_milsToIu;
msg = WsItem->m_Legende; msg = WsItem->m_TextBase;
switch( WsItem->m_Type ) switch( WsItem->m_Type )
{ {
...@@ -1056,12 +1061,12 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( ...@@ -1056,12 +1061,12 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
} }
// Sheet number // Sheet number
if( aSheetCount > 1 ) if( m_sheetCount > 1 )
{ {
pos.x = ( refx - Mm2mils( 36 ) ) * m_milsToIu; pos.x = ( refx - Mm2mils( 36 ) ) * m_milsToIu;
pos.y = ( refy - Mm2mils( 17.5 ) ) * m_milsToIu; pos.y = ( refy - Mm2mils( 17.5 ) ) * m_milsToIu;
msg.Empty(); msg.Empty();
msg << aSheetNumber; msg << m_sheetNumber;
Append( new WS_DRAW_ITEM_TEXT( msg, pos, Append( new WS_DRAW_ITEM_TEXT( msg, pos,
size, m_penSize, aLineColor ) ); size, m_penSize, aLineColor ) );
} }
...@@ -1070,7 +1075,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( ...@@ -1070,7 +1075,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
pos.x = ( refx - Mm2mils( 10 ) ) * m_milsToIu; pos.x = ( refx - Mm2mils( 10 ) ) * m_milsToIu;
pos.y = ( refy - Mm2mils( 17.5 ) ) * m_milsToIu; pos.y = ( refy - Mm2mils( 17.5 ) ) * m_milsToIu;
msg.Empty(); msg.Empty();
msg << aSheetCount; msg << m_sheetCount;
Append( gtext = new WS_DRAW_ITEM_TEXT( msg, pos, Append( gtext = new WS_DRAW_ITEM_TEXT( msg, pos,
size, m_penSize, aLineColor ) ); size, m_penSize, aLineColor ) );
gtext->SetHorizJustify( GR_TEXT_HJUSTIFY_LEFT ); gtext->SetHorizJustify( GR_TEXT_HJUSTIFY_LEFT );
...@@ -1284,7 +1289,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( ...@@ -1284,7 +1289,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
pos.y = (refy - WsItem->m_Posy) * m_milsToIu; pos.y = (refy - WsItem->m_Posy) * m_milsToIu;
end.x = (refx - WsItem->m_Endx) * m_milsToIu; end.x = (refx - WsItem->m_Endx) * m_milsToIu;
end.y = (refy - WsItem->m_Endy) * m_milsToIu; end.y = (refy - WsItem->m_Endy) * m_milsToIu;
msg = WsItem->m_Legende; msg = WsItem->m_TextBase;
switch( WsItem->m_Type ) switch( WsItem->m_Type )
{ {
...@@ -1331,7 +1336,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( ...@@ -1331,7 +1336,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
pos.x = ( refx - Mm2mils( 5 ) ) * m_milsToIu; pos.x = ( refx - Mm2mils( 5 ) ) * m_milsToIu;
pos.y = ( refy - Mm2mils( 4 ) ) * m_milsToIu; pos.y = ( refy - Mm2mils( 4 ) ) * m_milsToIu;
msg.Empty(); msg.Empty();
msg << aSheetNumber; msg << m_sheetNumber;
Append( gtext = new WS_DRAW_ITEM_TEXT( msg, pos, Append( gtext = new WS_DRAW_ITEM_TEXT( msg, pos,
size, m_penSize, aLineColor ) ); size, m_penSize, aLineColor ) );
...@@ -1369,14 +1374,14 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( ...@@ -1369,14 +1374,14 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
for( WsItem = &WS_DopLeft_Line1; WsItem != NULL; WsItem = WsItem->Pnext ) for( WsItem = &WS_DopLeft_Line1; WsItem != NULL; WsItem = WsItem->Pnext )
{ {
if( aSheetNumber > 1 && WsItem == &WS_DopLeft_Line9 ) // Some fields for first page only if( m_sheetNumber > 1 && WsItem == &WS_DopLeft_Line9 ) // Some fields for first page only
break; break;
pos.x = (refx - WsItem->m_Posx) * m_milsToIu; pos.x = (refx - WsItem->m_Posx) * m_milsToIu;
pos.y = (refy - WsItem->m_Posy) * m_milsToIu; pos.y = (refy - WsItem->m_Posy) * m_milsToIu;
end.x = (refx - WsItem->m_Endx) * m_milsToIu; end.x = (refx - WsItem->m_Endx) * m_milsToIu;
end.y = (refy - WsItem->m_Endy) * m_milsToIu; end.y = (refy - WsItem->m_Endy) * m_milsToIu;
msg = WsItem->m_Legende; msg = WsItem->m_TextBase;
switch( WsItem->m_Type ) switch( WsItem->m_Type )
{ {
...@@ -1406,14 +1411,14 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( ...@@ -1406,14 +1411,14 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
for( WsItem = &WS_DopTop_Line1; WsItem != NULL; WsItem = WsItem->Pnext ) for( WsItem = &WS_DopTop_Line1; WsItem != NULL; WsItem = WsItem->Pnext )
{ {
if( aSheetNumber > 1 && WsItem == &WS_DopTop_Line3 ) // Some fields for first page only if( m_sheetNumber > 1 && WsItem == &WS_DopTop_Line3 ) // Some fields for first page only
break; break;
pos.x = (refx + WsItem->m_Posx) * m_milsToIu; pos.x = (refx + WsItem->m_Posx) * m_milsToIu;
pos.y = (refy + WsItem->m_Posy) * m_milsToIu; pos.y = (refy + WsItem->m_Posy) * m_milsToIu;
end.x = (refx + WsItem->m_Endx) * m_milsToIu; end.x = (refx + WsItem->m_Endx) * m_milsToIu;
end.y = (refy + WsItem->m_Endy) * m_milsToIu; end.y = (refy + WsItem->m_Endy) * m_milsToIu;
msg = WsItem->m_Legende; msg = WsItem->m_TextBase;
switch( WsItem->m_Type ) switch( WsItem->m_Type )
{ {
...@@ -1457,14 +1462,14 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( ...@@ -1457,14 +1462,14 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
for( WsItem = &WS_DopTop_Line1; WsItem != NULL; WsItem = WsItem->Pnext ) for( WsItem = &WS_DopTop_Line1; WsItem != NULL; WsItem = WsItem->Pnext )
{ {
if( aSheetNumber > 1 && WsItem == &WS_DopTop_Line3 ) // Some fields for first page only if( m_sheetNumber > 1 && WsItem == &WS_DopTop_Line3 ) // Some fields for first page only
break; break;
pos.x = (refx - WsItem->m_Posy) * m_milsToIu; pos.x = (refx - WsItem->m_Posy) * m_milsToIu;
pos.y = (refy + WsItem->m_Posx) * m_milsToIu; pos.y = (refy + WsItem->m_Posx) * m_milsToIu;
end.x = (refx - WsItem->m_Endy) * m_milsToIu; end.x = (refx - WsItem->m_Endy) * m_milsToIu;
end.y = (refy + WsItem->m_Endx) * m_milsToIu; end.y = (refy + WsItem->m_Endx) * m_milsToIu;
msg = WsItem->m_Legende; msg = WsItem->m_TextBase;
switch( WsItem->m_Type ) switch( WsItem->m_Type )
{ {
......
...@@ -33,28 +33,15 @@ ...@@ -33,28 +33,15 @@
#include <fctsys.h> #include <fctsys.h>
#include <gr_basic.h> #include <gr_basic.h>
#include <common.h> #include <common.h>
#include <macros.h>
#include <class_drawpanel.h> #include <class_drawpanel.h>
#include <class_base_screen.h> #include <class_base_screen.h>
#include <drawtxt.h> #include <drawtxt.h>
#include <confirm.h>
#include <wxstruct.h> #include <wxstruct.h>
#include <appl_wxstruct.h>
#include <kicad_string.h>
#include <worksheet.h> #include <worksheet.h>
#include <class_title_block.h> #include <class_title_block.h>
#include <build_version.h>
// include data which defines the shape of a title block
// and frame references
#include <worksheet_shape_builder.h> #include <worksheet_shape_builder.h>
#if defined(KICAD_GOST)
#include "title_block_shapes_gost.h"
#else
#include "title_block_shapes.h"
#endif
void DrawPageLayout( wxDC* aDC, EDA_DRAW_PANEL * aCanvas, void DrawPageLayout( wxDC* aDC, EDA_DRAW_PANEL * aCanvas,
const PAGE_INFO& aPageInfo, const PAGE_INFO& aPageInfo,
const wxString& aPaperFormat, const wxString& aPaperFormat,
...@@ -76,11 +63,12 @@ void DrawPageLayout( wxDC* aDC, EDA_DRAW_PANEL * aCanvas, ...@@ -76,11 +63,12 @@ void DrawPageLayout( wxDC* aDC, EDA_DRAW_PANEL * aCanvas,
drawList.SetPenSize( aPenWidth ); drawList.SetPenSize( aPenWidth );
drawList.SetMilsToIUfactor( aScalar ); drawList.SetMilsToIUfactor( aScalar );
drawList.SetPageSize( pagesize ); drawList.SetPageSize( pagesize );
drawList.SetSheetNumber( aSheetNumber );
drawList.SetSheetCount( aSheetCount );
drawList.BuildWorkSheetGraphicList( drawList.BuildWorkSheetGraphicList(
aPaperFormat, aFullSheetName, aFileName, aPaperFormat, aFullSheetName, aFileName,
aTitleBlock, aSheetCount, aSheetNumber, aTitleBlock, aLineColor, aTextColor );
aLineColor, aTextColor );
// Draw item list // Draw item list
for( WS_DRAW_ITEM_BASE* item = drawList.GetFirst(); item; for( WS_DRAW_ITEM_BASE* item = drawList.GetFirst(); item;
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#include <sch_junction.h> #include <sch_junction.h>
int SCH_JUNCTION::m_symbolSize = 50; // Default diameter of the junction symbol int SCH_JUNCTION::m_symbolSize = 40; // Default diameter of the junction symbol
SCH_JUNCTION::SCH_JUNCTION( const wxPoint& pos ) : SCH_JUNCTION::SCH_JUNCTION( const wxPoint& pos ) :
SCH_ITEM( NULL, SCH_JUNCTION_T ) SCH_ITEM( NULL, SCH_JUNCTION_T )
......
...@@ -21,8 +21,8 @@ public: ...@@ -21,8 +21,8 @@ public:
Ki_WorkSheetData* Pnext; Ki_WorkSheetData* Pnext;
int m_Posx, m_Posy; int m_Posx, m_Posy;
int m_Endx, m_Endy; int m_Endx, m_Endy;
const wxChar* m_Legende; const wxChar* m_TextBase;
const wxChar* m_Text; int m_Flags;
}; };
/** /**
......
...@@ -46,6 +46,7 @@ class WS_DRAW_ITEM_LINE : public WS_DRAW_ITEM_BASE ...@@ -46,6 +46,7 @@ class WS_DRAW_ITEM_LINE : public WS_DRAW_ITEM_BASE
wxPoint m_start; // start point of line/rect wxPoint m_start; // start point of line/rect
wxPoint m_end; // end point wxPoint m_end; // end point
int m_penWidth; int m_penWidth;
public: public:
WS_DRAW_ITEM_LINE( wxPoint aStart, wxPoint aEnd, WS_DRAW_ITEM_LINE( wxPoint aStart, wxPoint aEnd,
int aPenWidth, EDA_COLOR_T aColor ) : int aPenWidth, EDA_COLOR_T aColor ) :
...@@ -118,8 +119,10 @@ public: ...@@ -118,8 +119,10 @@ public:
}; };
/* /*
* this class stores the list of graphic items to draw/plot * this class stores the list of graphic items:
* the title block and frame references * rect, lines, polygons and texts to draw/plot
* the title block and frame references, and parameters to
* draw/plot them
*/ */
class WS_DRAW_ITEM_LIST class WS_DRAW_ITEM_LIST
{ {
...@@ -131,6 +134,9 @@ class WS_DRAW_ITEM_LIST ...@@ -131,6 +134,9 @@ class WS_DRAW_ITEM_LIST
double m_milsToIu; // the scalar to convert pages units ( mils) double m_milsToIu; // the scalar to convert pages units ( mils)
// to draw/plot units. // to draw/plot units.
int m_penSize; // The line width for drawings. int m_penSize; // The line width for drawings.
int m_sheetNumber; // the value of the sheet number, for basic inscriptions
int m_sheetCount; // the value of the number of sheets, in schematic
// for basic inscriptions, in schematic
public: public:
WS_DRAW_ITEM_LIST() WS_DRAW_ITEM_LIST()
...@@ -138,6 +144,8 @@ public: ...@@ -138,6 +144,8 @@ public:
m_idx = 0; m_idx = 0;
m_milsToIu = 1.0; m_milsToIu = 1.0;
m_penSize = 1; m_penSize = 1;
m_sheetNumber = 1;
m_sheetCount = 1;
} }
~WS_DRAW_ITEM_LIST() ~WS_DRAW_ITEM_LIST()
...@@ -173,6 +181,26 @@ public: ...@@ -173,6 +181,26 @@ public:
m_pageSize = aPageSize; m_pageSize = aPageSize;
} }
/**
* Function SetSheetNumber
* Set the value of the sheet number, for basic inscriptions
* @param aSheetNumber the number to display.
*/
void SetSheetNumber( int aSheetNumber )
{
m_sheetNumber = aSheetNumber;
}
/**
* Function SetSheetCount
* Set the value of the count of sheets, for basic inscriptions
* @param aSheetCount the number of esheets to display.
*/
void SetSheetCount( int aSheetCount )
{
m_sheetCount = aSheetCount;
}
/* Function SetMargins /* Function SetMargins
* Set the left top margin and the right bottom margin * Set the left top margin and the right bottom margin
* of the page layout * of the page layout
...@@ -220,8 +248,6 @@ public: ...@@ -220,8 +248,6 @@ public:
* @param aPaperFormat The paper size type, for basic inscriptions. * @param aPaperFormat The paper size type, for basic inscriptions.
* @param aFileName The file name, for basic inscriptions. * @param aFileName The file name, for basic inscriptions.
* @param aTitleBlock The sheet title block, for basic inscriptions. * @param aTitleBlock The sheet title block, for basic inscriptions.
* @param aSheetCount The number of sheets (for basic inscriptions).
* @param aSheetNumber The sheet number (for basic inscriptions).
* @param aLineColor The color for drawing and fixed text. * @param aLineColor The color for drawing and fixed text.
* @param aTextColor The color for user inscriptions. * @param aTextColor The color for user inscriptions.
*/ */
...@@ -229,7 +255,6 @@ public: ...@@ -229,7 +255,6 @@ public:
const wxString& aFileName, const wxString& aFileName,
const wxString& aSheetPathHumanReadable, const wxString& aSheetPathHumanReadable,
const TITLE_BLOCK& aTitleBlock, const TITLE_BLOCK& aTitleBlock,
int aSheetCount, int aSheetNumber,
EDA_COLOR_T aLineColor, EDA_COLOR_T aTextColor ); EDA_COLOR_T aLineColor, EDA_COLOR_T aTextColor );
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment