2009-11-23 15:16:50 +00:00
|
|
|
|
/*****************/
|
|
|
|
|
/* WORKSHEET.CPP */
|
|
|
|
|
/*****************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
|
#include <fctsys.h>
|
|
|
|
|
#include <gr_basic.h>
|
|
|
|
|
#include <common.h>
|
|
|
|
|
#include <macros.h>
|
|
|
|
|
#include <class_drawpanel.h>
|
|
|
|
|
#include <class_base_screen.h>
|
|
|
|
|
#include <drawtxt.h>
|
|
|
|
|
#include <confirm.h>
|
|
|
|
|
#include <wxstruct.h>
|
|
|
|
|
#include <appl_wxstruct.h>
|
2012-04-01 20:51:56 +00:00
|
|
|
|
#include <kicad_string.h>
|
2012-01-23 04:33:36 +00:00
|
|
|
|
#include <worksheet.h>
|
|
|
|
|
#include <class_title_block.h>
|
|
|
|
|
|
|
|
|
|
#include <build_version.h>
|
2009-02-04 15:25:03 +00:00
|
|
|
|
|
2011-12-22 21:57:50 +00:00
|
|
|
|
// Must be defined in main applications:
|
2009-04-05 20:49:15 +00:00
|
|
|
|
|
|
|
|
|
#if defined(KICAD_GOST)
|
2013-03-27 20:38:20 +00:00
|
|
|
|
|
|
|
|
|
// Center - right bottom corner
|
|
|
|
|
|
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line1 =
|
|
|
|
|
{
|
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn1_Line2,
|
|
|
|
|
Mm2mils( 185 ), Mm2mils( 55 ),
|
|
|
|
|
0, Mm2mils( 55 ),
|
2009-05-30 16:06:01 +00:00
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line2 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn1_Line3,
|
|
|
|
|
Mm2mils( 120 ), Mm2mils( 40 ),
|
|
|
|
|
0, Mm2mils( 40 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line3 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn1_Line4,
|
|
|
|
|
Mm2mils( 185 ), Mm2mils( 35 ),
|
|
|
|
|
Mm2mils( 120 ), Mm2mils( 35 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line4 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn1_Line5,
|
|
|
|
|
Mm2mils( 50 ), Mm2mils( 35 ),
|
|
|
|
|
0, Mm2mils( 35 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
2013-03-27 20:38:20 +00:00
|
|
|
|
|
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line5 =
|
|
|
|
|
{
|
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn1_Line6,
|
|
|
|
|
Mm2mils( 185 ), Mm2mils( 30 ),
|
|
|
|
|
Mm2mils( 120 ), Mm2mils( 30 ),
|
|
|
|
|
NULL, NULL
|
2009-05-30 16:06:01 +00:00
|
|
|
|
};
|
2009-04-05 20:49:15 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line6 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn1_Line7,
|
|
|
|
|
Mm2mils( 50 ), Mm2mils( 20 ),
|
|
|
|
|
0, Mm2mils( 20 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line7 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn1_Line8,
|
|
|
|
|
Mm2mils( 120 ), Mm2mils( 15 ),
|
|
|
|
|
0, Mm2mils( 15 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line8 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn1_Line9,
|
|
|
|
|
Mm2mils( 185 ), Mm2mils( 55 ),
|
|
|
|
|
Mm2mils( 185 ), 0,
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line9 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn1_Line10,
|
|
|
|
|
Mm2mils( 178 ), Mm2mils( 55 ),
|
|
|
|
|
Mm2mils( 178 ), Mm2mils( 30 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line10 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn1_Line11,
|
|
|
|
|
Mm2mils( 168 ), Mm2mils( 55 ),
|
|
|
|
|
Mm2mils( 168 ), 0,
|
2009-05-30 16:06:01 +00:00
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line11 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn1_Line12,
|
|
|
|
|
Mm2mils( 145 ), Mm2mils( 55 ),
|
|
|
|
|
Mm2mils( 145 ), 0,
|
2009-05-30 16:06:01 +00:00
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line12 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn1_Line13,
|
|
|
|
|
Mm2mils( 130 ), Mm2mils( 55 ),
|
|
|
|
|
Mm2mils( 130 ), 0,
|
2009-05-30 16:06:01 +00:00
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line13 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn1_Line14,
|
|
|
|
|
Mm2mils( 120 ), Mm2mils( 55 ),
|
|
|
|
|
Mm2mils( 120 ), 0,
|
2009-05-30 16:06:01 +00:00
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line14 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn1_Line15,
|
|
|
|
|
Mm2mils( 50 ), Mm2mils( 40 ),
|
|
|
|
|
Mm2mils( 50 ), 0,
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line15 =
|
|
|
|
|
{
|
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn1_Line16,
|
|
|
|
|
Mm2mils( 35 ), Mm2mils( 40 ),
|
|
|
|
|
Mm2mils( 35 ), Mm2mils( 20 ),
|
|
|
|
|
NULL, NULL
|
|
|
|
|
};
|
2011-12-22 21:57:50 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line16 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn1_Line17,
|
|
|
|
|
Mm2mils( 30 ), Mm2mils( 20 ),
|
|
|
|
|
Mm2mils( 30 ), Mm2mils( 15 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line17 =
|
|
|
|
|
{
|
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn1_Line18,
|
|
|
|
|
Mm2mils( 18 ), Mm2mils( 40 ),
|
|
|
|
|
Mm2mils( 18 ), Mm2mils( 20 ),
|
|
|
|
|
NULL, NULL
|
|
|
|
|
};
|
2011-12-22 21:57:50 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line18 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TONK,
|
|
|
|
|
&WS_Osn1_Line19,
|
|
|
|
|
Mm2mils( 185 ), Mm2mils( 50 ),
|
|
|
|
|
Mm2mils( 120 ), Mm2mils( 50 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line19 =
|
|
|
|
|
{
|
|
|
|
|
WS_TONK,
|
|
|
|
|
&WS_Osn1_Line20,
|
|
|
|
|
Mm2mils( 185 ), Mm2mils( 45 ),
|
|
|
|
|
Mm2mils( 120 ), Mm2mils( 45 ),
|
|
|
|
|
NULL, NULL
|
|
|
|
|
};
|
2011-12-22 21:57:50 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line20 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TONK,
|
|
|
|
|
&WS_Osn1_Line21,
|
|
|
|
|
Mm2mils( 185 ), Mm2mils( 40 ),
|
|
|
|
|
Mm2mils( 120 ), Mm2mils( 40 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line21 =
|
|
|
|
|
{
|
|
|
|
|
WS_TONK,
|
|
|
|
|
&WS_Osn1_Line22,
|
|
|
|
|
Mm2mils( 185 ), Mm2mils( 25 ),
|
|
|
|
|
Mm2mils( 120 ), Mm2mils( 25 ),
|
|
|
|
|
NULL, NULL
|
|
|
|
|
};
|
2011-12-22 21:57:50 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line22 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TONK,
|
|
|
|
|
&WS_Osn1_Line23,
|
|
|
|
|
Mm2mils( 185 ), Mm2mils( 20 ),
|
|
|
|
|
Mm2mils( 120 ), Mm2mils( 20 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line23 =
|
|
|
|
|
{
|
|
|
|
|
WS_TONK,
|
|
|
|
|
&WS_Osn1_Line24,
|
|
|
|
|
Mm2mils( 185 ), Mm2mils( 15 ),
|
|
|
|
|
Mm2mils( 120 ), Mm2mils( 15 ),
|
|
|
|
|
NULL, NULL
|
|
|
|
|
};
|
2011-12-22 21:57:50 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line24 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TONK,
|
|
|
|
|
&WS_Osn1_Line25,
|
|
|
|
|
Mm2mils( 185 ), Mm2mils( 10 ),
|
|
|
|
|
Mm2mils( 120 ), Mm2mils( 10 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line25 =
|
|
|
|
|
{
|
|
|
|
|
WS_TONK,
|
|
|
|
|
&WS_Osn1_Line26,
|
|
|
|
|
Mm2mils( 185 ), Mm2mils( 5 ),
|
|
|
|
|
Mm2mils( 120 ), Mm2mils( 5 ),
|
|
|
|
|
NULL, NULL
|
|
|
|
|
};
|
2011-12-22 21:57:50 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line26 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TONK,
|
|
|
|
|
&WS_Osn1_Line27,
|
|
|
|
|
Mm2mils( 45 ), Mm2mils( 35 ),
|
|
|
|
|
Mm2mils( 45 ), Mm2mils( 20 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Line27 =
|
|
|
|
|
{
|
|
|
|
|
WS_TONK,
|
|
|
|
|
&WS_Osn1_Text1,
|
|
|
|
|
Mm2mils( 40 ), Mm2mils( 35 ),
|
|
|
|
|
Mm2mils( 40 ), Mm2mils( 20 ),
|
|
|
|
|
NULL, NULL
|
|
|
|
|
};
|
2011-12-22 21:57:50 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Text1 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXT,
|
|
|
|
|
&WS_Osn1_Text2,
|
|
|
|
|
Mm2mils( 181.5 ), Mm2mils( 32.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Изм." ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Text2 =
|
|
|
|
|
{
|
|
|
|
|
WS_TEXTL,
|
|
|
|
|
&WS_Osn1_Text3,
|
|
|
|
|
Mm2mils( 184 ), Mm2mils( 27.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Разраб." ), NULL
|
|
|
|
|
};
|
2011-12-22 21:57:50 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Text3 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXTL,
|
|
|
|
|
&WS_Osn1_Text4,
|
|
|
|
|
Mm2mils( 184 ), Mm2mils( 22.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Пров." ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Text4 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXTL,
|
|
|
|
|
&WS_Osn1_Text5,
|
|
|
|
|
Mm2mils( 184 ), Mm2mils( 17.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Т.контр." ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Text5 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXTL,
|
|
|
|
|
&WS_Osn1_Text6,
|
|
|
|
|
Mm2mils( 184 ), Mm2mils( 7.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Н.контр." ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Text6 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXTL,
|
|
|
|
|
&WS_Osn1_Text7,
|
|
|
|
|
Mm2mils( 184 ), Mm2mils( 2.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Утв." ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Text7 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXT,
|
|
|
|
|
&WS_Osn1_Text8,
|
|
|
|
|
Mm2mils( 173 ), Mm2mils( 32.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Лист" ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Text8 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXT,
|
|
|
|
|
&WS_Osn1_Text9,
|
|
|
|
|
Mm2mils( 156.5 ), Mm2mils( 32.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "N докум." ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Text9 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXT,
|
|
|
|
|
&WS_Osn1_Text10,
|
|
|
|
|
Mm2mils( 137.5 ), Mm2mils( 32.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Подп." ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Text10 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXT,
|
|
|
|
|
&WS_Osn1_Text11,
|
|
|
|
|
Mm2mils( 125 ), Mm2mils( 32.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Дата" ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Text11 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXT,
|
|
|
|
|
&WS_Osn1_Text12,
|
|
|
|
|
Mm2mils( 42.5 ), Mm2mils( 37.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Лит." ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Text12 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXT,
|
|
|
|
|
&WS_Osn1_Text13,
|
|
|
|
|
Mm2mils( 26.5 ), Mm2mils( 37.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Масса" ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Text13 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXT,
|
|
|
|
|
&WS_Osn1_Text14,
|
|
|
|
|
Mm2mils( 9 ), Mm2mils( 37.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Масштаб" ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Text14 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXTL,
|
|
|
|
|
&WS_Osn1_Text15,
|
|
|
|
|
Mm2mils( 49 ), Mm2mils( 17.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Лист" ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Text15 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXTL,
|
|
|
|
|
&WS_Osn1_Text16,
|
|
|
|
|
Mm2mils( 29 ), Mm2mils( 17.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Листов" ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Text16 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXTL,
|
|
|
|
|
&WS_Osn1_Text17,
|
|
|
|
|
Mm2mils( 40 ), -Mm2mils( 2.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Формат" ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn1_Text17 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXTL,
|
|
|
|
|
NULL,
|
|
|
|
|
Mm2mils( 110 ), -Mm2mils( 2.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Копировал" ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn2a_Line1 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn2a_Line2,
|
|
|
|
|
Mm2mils( 185 ), Mm2mils( 15 ),
|
|
|
|
|
0, Mm2mils( 15 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn2a_Line2 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn2a_Line3,
|
|
|
|
|
Mm2mils( 185 ), Mm2mils( 5 ),
|
|
|
|
|
Mm2mils( 120 ), Mm2mils( 5 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn2a_Line3 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn2a_Line4,
|
|
|
|
|
Mm2mils( 10 ), Mm2mils( 8 ),
|
|
|
|
|
0, Mm2mils( 8 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn2a_Line4 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn2a_Line5,
|
|
|
|
|
Mm2mils( 185 ), Mm2mils( 15 ),
|
|
|
|
|
Mm2mils( 185 ), 0,
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn2a_Line5 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn2a_Line6,
|
|
|
|
|
Mm2mils( 178 ), Mm2mils( 15 ),
|
|
|
|
|
Mm2mils( 178 ), 0,
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn2a_Line6 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn2a_Line7,
|
|
|
|
|
Mm2mils( 168 ), Mm2mils( 15 ),
|
|
|
|
|
Mm2mils( 168 ), 0,
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn2a_Line7 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn2a_Line8,
|
|
|
|
|
Mm2mils( 145 ), Mm2mils( 15 ),
|
|
|
|
|
Mm2mils( 145 ), 0,
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn2a_Line8 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn2a_Line9,
|
|
|
|
|
Mm2mils( 130 ), Mm2mils( 15 ),
|
|
|
|
|
Mm2mils( 130 ), 0,
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn2a_Line9 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn2a_Line10,
|
|
|
|
|
Mm2mils( 120 ), Mm2mils( 15 ),
|
|
|
|
|
Mm2mils( 120 ), 0,
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn2a_Line10 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_Osn2a_Line11,
|
|
|
|
|
Mm2mils( 10 ), Mm2mils( 15 ),
|
|
|
|
|
Mm2mils( 10 ), 0,
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn2a_Line11 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TONK,
|
|
|
|
|
&WS_Osn2a_Text1,
|
|
|
|
|
Mm2mils( 185 ), Mm2mils( 10 ),
|
|
|
|
|
Mm2mils( 120 ), Mm2mils( 10 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn2a_Text1 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXT,
|
|
|
|
|
&WS_Osn2a_Text2,
|
|
|
|
|
Mm2mils( 181.5 ), Mm2mils( 2.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Изм." ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn2a_Text2 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXT,
|
|
|
|
|
&WS_Osn2a_Text3,
|
|
|
|
|
Mm2mils( 173 ), Mm2mils( 2.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Лист" ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn2a_Text3 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXT,
|
|
|
|
|
&WS_Osn2a_Text4,
|
|
|
|
|
Mm2mils( 156.5 ), Mm2mils( 2.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "N докум." ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn2a_Text4 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXT,
|
|
|
|
|
&WS_Osn2a_Text5,
|
|
|
|
|
Mm2mils( 137.5 ), Mm2mils( 2.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Подп." ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn2a_Text5 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXT,
|
|
|
|
|
&WS_Osn2a_Text6,
|
|
|
|
|
Mm2mils( 125 ), Mm2mils( 2.5 ),
|
2009-05-30 16:06:01 +00:00
|
|
|
|
0, 0,
|
2013-03-27 20:38:20 +00:00
|
|
|
|
wxT( "Дата" ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn2a_Text6 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXT,
|
|
|
|
|
&WS_Osn2a_Text7,
|
|
|
|
|
Mm2mils( 5 ), Mm2mils( 11.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Лист" ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn2a_Text7 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXTL,
|
|
|
|
|
&WS_Osn2a_Text8,
|
|
|
|
|
Mm2mils( 40 ), -Mm2mils( 2.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Формат" ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Osn2a_Text8 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXTL,
|
2009-05-30 16:06:01 +00:00
|
|
|
|
NULL,
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Mm2mils( 110 ), -Mm2mils( 2.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Копировал" ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
// Center - left bottom corner
|
|
|
|
|
|
|
|
|
|
Ki_WorkSheetData WS_DopLeft_Line1 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_DopLeft_Line2,
|
|
|
|
|
Mm2mils( 12 ), Mm2mils( 145 ),
|
|
|
|
|
0, Mm2mils( 145 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_DopLeft_Line2 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_DopLeft_Line3,
|
|
|
|
|
Mm2mils( 12 ), Mm2mils( 110 ),
|
|
|
|
|
0, Mm2mils( 110 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_DopLeft_Line3 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_DopLeft_Line4,
|
|
|
|
|
Mm2mils( 12 ), Mm2mils( 85 ),
|
|
|
|
|
0, Mm2mils( 85 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_DopLeft_Line4 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_DopLeft_Line5,
|
|
|
|
|
Mm2mils( 12 ), Mm2mils( 60 ),
|
|
|
|
|
0, Mm2mils( 60 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_DopLeft_Line5 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_DopLeft_Line6,
|
|
|
|
|
Mm2mils( 12 ), Mm2mils( 25 ),
|
|
|
|
|
0, Mm2mils( 25 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_DopLeft_Line6 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_DopLeft_Line7,
|
|
|
|
|
Mm2mils( 12 ), 0,
|
|
|
|
|
0, 0,
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_DopLeft_Line7 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_DopLeft_Line8,
|
|
|
|
|
Mm2mils( 12 ), Mm2mils( 145 ),
|
|
|
|
|
Mm2mils( 12 ), 0,
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_DopLeft_Line8 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_DopLeft_Text1,
|
|
|
|
|
Mm2mils( 7 ), Mm2mils( 145 ),
|
|
|
|
|
Mm2mils( 7 ), 0,
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_DopLeft_Text1 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXT,
|
|
|
|
|
&WS_DopLeft_Text2,
|
|
|
|
|
Mm2mils( 9.5 ), Mm2mils( 12.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Инв.N подл." ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_DopLeft_Text2 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXT,
|
|
|
|
|
&WS_DopLeft_Text3,
|
|
|
|
|
Mm2mils( 9.5 ), Mm2mils( 42.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Подп. и дата" ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_DopLeft_Text3 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXT,
|
|
|
|
|
&WS_DopLeft_Text4,
|
|
|
|
|
Mm2mils( 9.5 ), Mm2mils( 72.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Взам.инв.N" ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_DopLeft_Text4 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXT,
|
|
|
|
|
&WS_DopLeft_Text5,
|
|
|
|
|
Mm2mils( 9.5 ), Mm2mils( 97.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Инв.N дубл." ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_DopLeft_Text5 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXT,
|
|
|
|
|
&WS_DopLeft_Line9,
|
|
|
|
|
Mm2mils( 9.5 ), Mm2mils( 127.5 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Подп. и дата" ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_DopLeft_Line9 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_DopLeft_Line10,
|
|
|
|
|
Mm2mils( 7 ), Mm2mils( 287 ),
|
|
|
|
|
Mm2mils( 7 ), Mm2mils( 167 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_DopLeft_Line10 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_DopLeft_Line11,
|
|
|
|
|
Mm2mils( 12 ), Mm2mils( 287 ),
|
|
|
|
|
Mm2mils( 12 ), Mm2mils( 167 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_DopLeft_Line11 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_DopLeft_Line12,
|
|
|
|
|
Mm2mils( 12 ), Mm2mils( 287 ),
|
|
|
|
|
Mm2mils( 12 ), Mm2mils( 167 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_DopLeft_Line12 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_DopLeft_Line13,
|
|
|
|
|
Mm2mils( 12 ), Mm2mils( 167 ),
|
|
|
|
|
0, Mm2mils( 167 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_DopLeft_Line13 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_DopLeft_Line14,
|
|
|
|
|
Mm2mils( 12 ), Mm2mils( 227 ),
|
|
|
|
|
0, Mm2mils( 227 ),
|
|
|
|
|
NULL, NULL
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Ki_WorkSheetData WS_DopLeft_Line14 =
|
|
|
|
|
{
|
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_DopLeft_Text6,
|
|
|
|
|
Mm2mils( 12 ), Mm2mils( 287 ),
|
|
|
|
|
0, Mm2mils( 287 ),
|
|
|
|
|
NULL, NULL
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Ki_WorkSheetData WS_DopLeft_Text6 =
|
|
|
|
|
{
|
|
|
|
|
WS_TEXT,
|
|
|
|
|
&WS_DopLeft_Text7,
|
|
|
|
|
Mm2mils( 9.5 ), Mm2mils( 197 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Справ. N" ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_DopLeft_Text7 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TEXT,
|
2009-05-30 16:06:01 +00:00
|
|
|
|
NULL,
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Mm2mils( 9.5 ), Mm2mils( 257 ),
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Перв. примен." ), NULL
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Center - left top corner
|
|
|
|
|
|
|
|
|
|
Ki_WorkSheetData WS_DopTop_Line1 =
|
|
|
|
|
{
|
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_DopTop_Line2,
|
|
|
|
|
Mm2mils( 70 ), 0,
|
|
|
|
|
Mm2mils( 70 ), Mm2mils( 14 ),
|
2009-05-30 16:06:01 +00:00
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_DopTop_Line2 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_DopTop_Line3,
|
|
|
|
|
Mm2mils( 70 ), Mm2mils( 14 ),
|
|
|
|
|
0, Mm2mils( 14 ),
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_DopTop_Line3 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_DopTop_Line4,
|
|
|
|
|
Mm2mils( 70 ), Mm2mils( 14 ),
|
|
|
|
|
Mm2mils( 137 ), Mm2mils( 14 ),
|
|
|
|
|
NULL, NULL
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Ki_WorkSheetData WS_DopTop_Line4 =
|
|
|
|
|
{
|
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_DopTop_Line5,
|
|
|
|
|
Mm2mils( 84 ), Mm2mils( 7 ),
|
|
|
|
|
Mm2mils( 137 ), Mm2mils( 7 ),
|
|
|
|
|
NULL, NULL
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Ki_WorkSheetData WS_DopTop_Line5 =
|
|
|
|
|
{
|
|
|
|
|
WS_OSN,
|
|
|
|
|
&WS_DopTop_Line6,
|
|
|
|
|
Mm2mils( 84 ), Mm2mils( 14 ),
|
|
|
|
|
Mm2mils( 84 ), 0,
|
|
|
|
|
NULL, NULL
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Ki_WorkSheetData WS_DopTop_Line6 =
|
|
|
|
|
{
|
|
|
|
|
WS_OSN,
|
|
|
|
|
NULL,
|
|
|
|
|
Mm2mils( 137 ), Mm2mils( 14 ),
|
|
|
|
|
Mm2mils( 137 ), 0,
|
|
|
|
|
NULL, NULL
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
|
|
Ki_WorkSheetData WS_Date =
|
|
|
|
|
{
|
|
|
|
|
WS_DATE,
|
|
|
|
|
&WS_Licence,
|
|
|
|
|
BLOCK_DATE_X, BLOCK_DATE_Y,
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Date: " ),NULL
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Ki_WorkSheetData WS_Licence =
|
|
|
|
|
{
|
|
|
|
|
WS_KICAD_VERSION,
|
|
|
|
|
&WS_Revision,
|
|
|
|
|
BLOCK_KICAD_VERSION_X,BLOCK_KICAD_VERSION_Y,
|
|
|
|
|
0, 0,
|
|
|
|
|
NULL, NULL
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Ki_WorkSheetData WS_Revision =
|
|
|
|
|
{
|
|
|
|
|
WS_REV,
|
|
|
|
|
&WS_SizeSheet,
|
|
|
|
|
BLOCK_REV_X, BLOCK_REV_Y,
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Rev: " ), NULL
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Ki_WorkSheetData WS_SizeSheet =
|
|
|
|
|
{
|
|
|
|
|
WS_SIZESHEET,
|
|
|
|
|
&WS_IdentSheet,
|
|
|
|
|
BLOCK_SIZE_SHEET_X, BLOCK_SIZE_SHEET_Y,
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Size: " ), NULL
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Ki_WorkSheetData WS_IdentSheet =
|
|
|
|
|
{
|
|
|
|
|
WS_IDENTSHEET,
|
|
|
|
|
&WS_Title,
|
|
|
|
|
BLOCK_ID_SHEET_X,BLOCK_ID_SHEET_Y,
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Id: " ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Title =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_TITLE,
|
|
|
|
|
&WS_SheetFilename,
|
|
|
|
|
BLOCK_TITLE_X, BLOCK_TITLE_Y,
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Title: " ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_SheetFilename =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_FILENAME,
|
|
|
|
|
&WS_FullSheetName,
|
|
|
|
|
BLOCK_FILENAME_X, BLOCK_FILENAME_Y,
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "File: " ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_FullSheetName =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_FULLSHEETNAME,
|
|
|
|
|
&WS_Company,
|
|
|
|
|
BLOCK_FULLSHEETNAME_X,BLOCK_FULLSHEETNAME_Y,
|
|
|
|
|
0, 0,
|
|
|
|
|
wxT( "Sheet: " ), NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Company =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_COMPANY_NAME,
|
|
|
|
|
&WS_Comment1,
|
|
|
|
|
BLOCK_COMMENT_X,BLOCK_COMPANY_Y,
|
|
|
|
|
0, 0,
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Comment1 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_COMMENT1,
|
|
|
|
|
&WS_Comment2,
|
|
|
|
|
BLOCK_COMMENT_X,BLOCK_COMMENT1_Y,
|
|
|
|
|
0, 0,
|
|
|
|
|
NULL, NULL
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Ki_WorkSheetData WS_Comment2 =
|
|
|
|
|
{
|
|
|
|
|
WS_COMMENT2,
|
|
|
|
|
&WS_Comment3,
|
|
|
|
|
BLOCK_COMMENT_X,BLOCK_COMMENT2_Y,
|
|
|
|
|
0, 0,
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Comment3 =
|
|
|
|
|
{
|
|
|
|
|
WS_COMMENT3,
|
|
|
|
|
&WS_Comment4,
|
|
|
|
|
BLOCK_COMMENT_X,BLOCK_COMMENT3_Y,
|
|
|
|
|
0, 0,
|
|
|
|
|
NULL, NULL
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Ki_WorkSheetData WS_Comment4 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_COMMENT4,
|
|
|
|
|
&WS_MostLeftLine,
|
|
|
|
|
BLOCK_COMMENT_X, BLOCK_COMMENT4_Y,
|
|
|
|
|
0, 0,
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2011-02-27 10:16:54 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
/// Left vertical segment
|
|
|
|
|
Ki_WorkSheetData WS_MostLeftLine =
|
2011-02-27 10:16:54 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_LEFT_SEGMENT,
|
|
|
|
|
&WS_SeparatorLine,
|
|
|
|
|
BLOCK_OX, SIZETEXT * 16,
|
|
|
|
|
BLOCK_OX, 0,
|
|
|
|
|
NULL, NULL
|
2011-02-27 10:16:54 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
/// horizontal segment between filename and comments
|
|
|
|
|
Ki_WorkSheetData WS_SeparatorLine =
|
2011-02-27 10:16:54 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_SEGMENT,
|
|
|
|
|
&WS_MostUpperLine,
|
|
|
|
|
BLOCK_OX, VARIABLE_BLOCK_START_POSITION,
|
|
|
|
|
0, VARIABLE_BLOCK_START_POSITION,
|
|
|
|
|
NULL, NULL
|
2011-02-27 10:16:54 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
/// superior horizontal segment
|
|
|
|
|
Ki_WorkSheetData WS_MostUpperLine =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_UPPER_SEGMENT,
|
|
|
|
|
&WS_Segm3,
|
|
|
|
|
BLOCK_OX, SIZETEXT * 16,
|
|
|
|
|
0, SIZETEXT * 16,
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
/// horizontal segment above COMPANY NAME
|
|
|
|
|
Ki_WorkSheetData WS_Segm3 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_SEGMENT,
|
|
|
|
|
&WS_Segm4,
|
|
|
|
|
BLOCK_OX, SIZETEXT * 6,
|
|
|
|
|
0, SIZETEXT * 6,
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
/// vertical segment of the left REV and SHEET
|
|
|
|
|
Ki_WorkSheetData WS_Segm4 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_SEGMENT,
|
|
|
|
|
&WS_Segm5,
|
|
|
|
|
BLOCK_REV_X + SIZETEXT,SIZETEXT * 4,
|
|
|
|
|
BLOCK_REV_X + SIZETEXT,0,
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2011-02-27 10:16:54 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Segm5 =
|
2011-02-27 10:16:54 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_SEGMENT,
|
|
|
|
|
&WS_Segm6,
|
|
|
|
|
BLOCK_OX, SIZETEXT * 2,
|
|
|
|
|
0, SIZETEXT * 2,
|
|
|
|
|
NULL, NULL
|
2011-02-27 10:16:54 +00:00
|
|
|
|
};
|
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Segm6 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_SEGMENT,
|
|
|
|
|
&WS_Segm7,
|
|
|
|
|
BLOCK_OX, SIZETEXT * 4,
|
|
|
|
|
0, SIZETEXT * 4,
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
Ki_WorkSheetData WS_Segm7 =
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
WS_SEGMENT,
|
2009-05-30 16:06:01 +00:00
|
|
|
|
NULL,
|
|
|
|
|
BLOCK_OX - (SIZETEXT * 11),SIZETEXT * 4,
|
|
|
|
|
BLOCK_OX - (SIZETEXT * 11),SIZETEXT * 2,
|
|
|
|
|
NULL, NULL
|
2009-04-05 20:49:15 +00:00
|
|
|
|
};
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
#endif
|
2008-03-04 14:27:48 +00:00
|
|
|
|
|
2012-04-16 01:25:26 +00:00
|
|
|
|
void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* aDC, BASE_SCREEN* aScreen, int aLineWidth,
|
2012-08-29 16:59:50 +00:00
|
|
|
|
double aScalar, const wxString &aFilename )
|
2007-06-05 12:10:51 +00:00
|
|
|
|
{
|
2011-12-14 20:03:15 +00:00
|
|
|
|
if( !m_showBorderAndTitleBlock )
|
2008-03-04 14:27:48 +00:00
|
|
|
|
return;
|
|
|
|
|
|
2011-12-22 21:57:50 +00:00
|
|
|
|
const PAGE_INFO& pageInfo = GetPageSettings();
|
|
|
|
|
wxSize pageSize = pageInfo.GetSizeMils();
|
|
|
|
|
|
2008-03-04 14:27:48 +00:00
|
|
|
|
// if not printing, draw the page limits:
|
2012-04-16 01:25:26 +00:00
|
|
|
|
if( !aScreen->m_IsPrinting && g_ShowPageLimits )
|
2008-03-04 14:27:48 +00:00
|
|
|
|
{
|
2012-04-16 01:25:26 +00:00
|
|
|
|
GRSetDrawMode( aDC, GR_COPY );
|
|
|
|
|
GRRect( m_canvas->GetClipBox(), aDC, 0, 0,
|
|
|
|
|
pageSize.x * aScalar, pageSize.y * aScalar, aLineWidth,
|
2009-04-05 20:49:15 +00:00
|
|
|
|
g_DrawBgColor == WHITE ? LIGHTGRAY : DARKDARKGRAY );
|
2008-03-04 14:27:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
2012-03-26 21:45:05 +00:00
|
|
|
|
wxPoint margin_left_top( pageInfo.GetLeftMarginMils(), pageInfo.GetTopMarginMils() );
|
|
|
|
|
wxPoint margin_right_bottom( pageInfo.GetRightMarginMils(), pageInfo.GetBottomMarginMils() );
|
|
|
|
|
wxString paper = pageInfo.GetType();
|
2012-08-29 16:59:50 +00:00
|
|
|
|
wxString file = aFilename;
|
2012-03-26 21:45:05 +00:00
|
|
|
|
TITLE_BLOCK t_block = GetTitleBlock();
|
2012-05-27 00:19:12 +00:00
|
|
|
|
int number_of_screens = aScreen->m_NumberOfScreens;
|
2012-04-16 01:25:26 +00:00
|
|
|
|
int screen_to_draw = aScreen->m_ScreenNumber;
|
2012-03-26 21:45:05 +00:00
|
|
|
|
|
2012-04-16 01:25:26 +00:00
|
|
|
|
TraceWorkSheet( aDC, pageSize, margin_left_top, margin_right_bottom,
|
|
|
|
|
paper, file, t_block, number_of_screens, screen_to_draw,
|
|
|
|
|
aLineWidth, aScalar );
|
2012-03-26 21:45:05 +00:00
|
|
|
|
}
|
2011-12-22 21:57:50 +00:00
|
|
|
|
|
2012-03-26 21:45:05 +00:00
|
|
|
|
|
|
|
|
|
void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* aDC, wxSize& aSz, wxPoint& aLT, wxPoint& aRB,
|
2012-04-16 01:25:26 +00:00
|
|
|
|
wxString& aType, wxString& aFlNm, TITLE_BLOCK& aTb,
|
|
|
|
|
int aNScr, int aScr, int aLnW, double aScalar,
|
|
|
|
|
EDA_COLOR_T aClr1, EDA_COLOR_T aClr2 )
|
2012-03-26 21:45:05 +00:00
|
|
|
|
{
|
|
|
|
|
wxPoint pos;
|
2013-03-27 20:38:20 +00:00
|
|
|
|
wxPoint end;
|
2012-03-26 21:45:05 +00:00
|
|
|
|
int refx, refy;
|
|
|
|
|
wxString Line;
|
|
|
|
|
Ki_WorkSheetData* WsItem;
|
2012-04-16 01:25:26 +00:00
|
|
|
|
wxSize size( SIZETEXT * aScalar, SIZETEXT * aScalar );
|
|
|
|
|
wxSize size_ref( SIZETEXT_REF * aScalar, SIZETEXT_REF * aScalar );
|
2012-03-26 21:45:05 +00:00
|
|
|
|
wxString msg;
|
|
|
|
|
|
|
|
|
|
GRSetDrawMode( aDC, GR_COPY );
|
2011-12-22 21:57:50 +00:00
|
|
|
|
|
|
|
|
|
// Upper left corner
|
2012-03-26 21:45:05 +00:00
|
|
|
|
refx = aLT.x;
|
|
|
|
|
refy = aLT.y;
|
2011-12-22 21:57:50 +00:00
|
|
|
|
|
|
|
|
|
// lower right corner
|
2012-03-26 21:45:05 +00:00
|
|
|
|
int xg, yg;
|
|
|
|
|
xg = aSz.x - aRB.x;
|
|
|
|
|
yg = aSz.y - aRB.y;
|
2008-03-04 14:27:48 +00:00
|
|
|
|
|
2008-11-05 11:41:15 +00:00
|
|
|
|
#if defined(KICAD_GOST)
|
2009-05-30 16:06:01 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
int lnMsg, ln;
|
|
|
|
|
int lnWosn = aLnW * 2;
|
|
|
|
|
int lnWtonk = aLnW;
|
|
|
|
|
wxSize sz;
|
|
|
|
|
wxSize size0_8( SIZETEXT * aScalar * 0.8, SIZETEXT * aScalar * 1 );
|
|
|
|
|
wxSize size1_5( SIZETEXT * aScalar * 1.5, SIZETEXT * aScalar * 1.5 );
|
|
|
|
|
wxSize size2( SIZETEXT * aScalar * 2, SIZETEXT * aScalar * 2 );
|
|
|
|
|
wxSize size3( SIZETEXT * aScalar * 3, SIZETEXT * aScalar * 3 );
|
2009-05-30 16:06:01 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
// Draw the border.
|
|
|
|
|
GRRect( m_canvas->GetClipBox(), aDC, refx * aScalar, refy * aScalar,
|
|
|
|
|
xg * aScalar, yg * aScalar, lnWosn, aClr1 );
|
2009-05-30 16:06:01 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
// Center - right bottom corner
|
2012-03-26 21:45:05 +00:00
|
|
|
|
refx = aSz.x - aRB.x;
|
|
|
|
|
refy = aSz.y - aRB.y;
|
2011-12-22 21:57:50 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
// First page
|
2012-03-26 21:45:05 +00:00
|
|
|
|
if( aScr == 1 )
|
2008-11-05 11:41:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
for( WsItem = &WS_Osn1_Line1; WsItem != NULL; WsItem = WsItem->Pnext )
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2012-04-16 01:25:26 +00:00
|
|
|
|
pos.x = (refx - WsItem->m_Posx) * aScalar;
|
|
|
|
|
pos.y = (refy - WsItem->m_Posy) * aScalar;
|
2013-03-27 20:38:20 +00:00
|
|
|
|
end.x = (refx - WsItem->m_Endx) * aScalar;
|
|
|
|
|
end.y = (refy - WsItem->m_Endy) * aScalar;
|
|
|
|
|
msg = WsItem->m_Legende;
|
2009-04-05 20:49:15 +00:00
|
|
|
|
switch( WsItem->m_Type )
|
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
case WS_OSN:
|
|
|
|
|
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y, end.x, end.y,
|
|
|
|
|
lnWosn, aClr1 );
|
2009-04-05 20:49:15 +00:00
|
|
|
|
break;
|
2009-05-30 16:06:01 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
case WS_TONK:
|
|
|
|
|
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y, end.x, end.y,
|
|
|
|
|
lnWtonk, aClr1 );
|
2009-04-05 20:49:15 +00:00
|
|
|
|
break;
|
2009-05-30 16:06:01 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
case WS_TEXT:
|
2009-12-02 13:06:55 +00:00
|
|
|
|
if( !msg.IsEmpty() )
|
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
if( WsItem == &WS_Osn1_Text1 )
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr1,
|
|
|
|
|
msg, TEXT_ORIENT_HORIZ, size0_8,
|
|
|
|
|
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
|
|
|
|
aLnW, false, false );
|
|
|
|
|
else
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr1,
|
|
|
|
|
msg, TEXT_ORIENT_HORIZ, size,
|
|
|
|
|
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
|
|
|
|
aLnW, false, false );
|
2009-12-02 13:06:55 +00:00
|
|
|
|
}
|
2009-04-05 20:49:15 +00:00
|
|
|
|
break;
|
2009-05-30 16:06:01 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
case WS_TEXTL:
|
2009-12-02 13:06:55 +00:00
|
|
|
|
if( !msg.IsEmpty() )
|
2013-03-27 20:38:20 +00:00
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr1,
|
|
|
|
|
msg, TEXT_ORIENT_HORIZ, size,
|
|
|
|
|
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
2012-03-26 21:45:05 +00:00
|
|
|
|
aLnW, false, false );
|
2009-04-05 20:49:15 +00:00
|
|
|
|
break;
|
2009-05-30 16:06:01 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Sheet number
|
|
|
|
|
if( aNScr > 1 )
|
|
|
|
|
{
|
|
|
|
|
pos.x = (refx - Mm2mils( 36 )) * aScalar;
|
|
|
|
|
pos.y = (refy - Mm2mils( 17.5 )) * aScalar;
|
|
|
|
|
msg.Empty();
|
|
|
|
|
msg << aScr;
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr1, msg,
|
|
|
|
|
TEXT_ORIENT_HORIZ, size, GR_TEXT_HJUSTIFY_CENTER,
|
|
|
|
|
GR_TEXT_VJUSTIFY_CENTER, aLnW, false, false );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Count of sheets
|
|
|
|
|
pos.x = (refx - Mm2mils( 10 )) * aScalar;
|
|
|
|
|
pos.y = (refy - Mm2mils( 17.5 )) * aScalar;
|
|
|
|
|
msg.Empty();
|
|
|
|
|
msg << aNScr;
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr1, msg,
|
|
|
|
|
TEXT_ORIENT_HORIZ, size, GR_TEXT_HJUSTIFY_LEFT,
|
|
|
|
|
GR_TEXT_VJUSTIFY_CENTER, aLnW, false, false );
|
|
|
|
|
|
|
|
|
|
// Company name
|
|
|
|
|
msg = aTb.GetCompany();
|
|
|
|
|
if( !msg.IsEmpty() )
|
|
|
|
|
{
|
|
|
|
|
sz = size1_5;
|
|
|
|
|
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / aScalar;
|
|
|
|
|
ln = Mm2mils( 49 );
|
|
|
|
|
if( lnMsg > ln )
|
|
|
|
|
sz.x *= float( ln ) / lnMsg;
|
|
|
|
|
pos.x = (refx - Mm2mils( 25 )) * aScalar;
|
|
|
|
|
pos.y = (refy - Mm2mils( 7.5 )) * aScalar;
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr2,
|
|
|
|
|
msg, TEXT_ORIENT_HORIZ, sz,
|
|
|
|
|
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
|
|
|
|
aLnW, false, false );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Title
|
|
|
|
|
msg = aTb.GetTitle();
|
|
|
|
|
if( !msg.IsEmpty() )
|
|
|
|
|
{
|
|
|
|
|
sz = size1_5;
|
|
|
|
|
wxArrayString lines;
|
|
|
|
|
int titleWidth = 0;
|
|
|
|
|
int titleHeight = (sz.y + sz.y * 0.5) / aScalar;
|
|
|
|
|
int titleFieldWidth = Mm2mils( 69 );
|
|
|
|
|
int titleFieldHeight = Mm2mils( 24 );
|
|
|
|
|
int index = 0;
|
|
|
|
|
wxString fullMsg = msg;
|
|
|
|
|
do // Reduce the height of wrapped title until the fit
|
|
|
|
|
{
|
|
|
|
|
do // Wrap the title
|
2009-12-02 13:06:55 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
titleWidth = ReturnGraphicTextWidth( msg, sz.x, false, false ) / aScalar;
|
|
|
|
|
if( titleWidth > titleFieldWidth )
|
|
|
|
|
{
|
|
|
|
|
index = 0;
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
msg = msg.Left( msg.Length() - 1 );
|
|
|
|
|
if( msg.Length() == 0 )
|
|
|
|
|
{
|
|
|
|
|
lines.Clear();
|
|
|
|
|
msg = fullMsg;
|
|
|
|
|
sz.x -= aScalar;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
index++;
|
|
|
|
|
titleWidth = ReturnGraphicTextWidth( msg, sz.x, false, false ) / aScalar;
|
|
|
|
|
|
|
|
|
|
wxString ch = wxString( msg.Last() );
|
|
|
|
|
if( titleWidth < titleFieldWidth && ch == wxT( " " ) )
|
|
|
|
|
{
|
|
|
|
|
// New sentence on a new line
|
|
|
|
|
int dot = msg.Index( wxT( ". " ) );
|
|
|
|
|
if( dot != wxNOT_FOUND )
|
|
|
|
|
{
|
|
|
|
|
index += msg.Length() - dot - 2;
|
|
|
|
|
msg = msg.Left( dot + 1 );
|
|
|
|
|
lines.Add( msg );
|
|
|
|
|
msg = fullMsg.Right( index );
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
msg = msg.Left( msg.Length() - 1 );
|
|
|
|
|
lines.Add( msg );
|
|
|
|
|
msg = fullMsg.Right( index );
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}while( 1 );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// New sentence on a new line
|
|
|
|
|
int dot = msg.Index( wxT( ". " ) );
|
|
|
|
|
if( dot != wxNOT_FOUND )
|
|
|
|
|
{
|
|
|
|
|
lines.Add( msg.Left( dot + 1 ) );
|
|
|
|
|
lines.Add( fullMsg.Right( msg.Length() - dot - 2 ) );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
lines.Add( msg );
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}while( 1 );
|
|
|
|
|
|
|
|
|
|
if( titleFieldHeight < titleHeight * lines.Count() )
|
|
|
|
|
{
|
|
|
|
|
sz.y -= aScalar;
|
|
|
|
|
sz.x -= aScalar;
|
|
|
|
|
msg = fullMsg;
|
|
|
|
|
lines.Clear();
|
2009-12-02 13:06:55 +00:00
|
|
|
|
}
|
2013-03-27 20:38:20 +00:00
|
|
|
|
else
|
|
|
|
|
break;
|
|
|
|
|
}while( 1 );
|
|
|
|
|
|
|
|
|
|
pos.x = (refx - Mm2mils( 85 )) * aScalar;
|
|
|
|
|
pos.y = (refy - Mm2mils( 27.5 ) - (titleHeight * (lines.Count() - 1) / 2)) * aScalar;
|
|
|
|
|
|
|
|
|
|
for( int curLn = 0; curLn < lines.Count(); curLn++ )
|
|
|
|
|
{
|
|
|
|
|
msg = lines[curLn];
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr2,
|
|
|
|
|
msg, TEXT_ORIENT_HORIZ, sz,
|
|
|
|
|
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
|
|
|
|
aLnW, false, false );
|
|
|
|
|
pos.y += titleHeight * aScalar;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Decimal number
|
|
|
|
|
msg = aTb.GetComment1();
|
|
|
|
|
if( !msg.IsEmpty() )
|
|
|
|
|
{
|
|
|
|
|
sz = size3;
|
|
|
|
|
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / aScalar;
|
|
|
|
|
ln = Mm2mils( 119 );
|
|
|
|
|
if( lnMsg > ln )
|
|
|
|
|
sz.x *= float( ln ) / lnMsg;
|
|
|
|
|
pos.x = (refx - Mm2mils( 60 )) * aScalar;
|
|
|
|
|
pos.y = (refy - Mm2mils( 47.5 )) * aScalar;
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr2,
|
|
|
|
|
msg, TEXT_ORIENT_HORIZ, sz,
|
|
|
|
|
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
|
|
|
|
aLnW, false, false );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Developer
|
|
|
|
|
msg = aTb.GetComment2();
|
|
|
|
|
if( !msg.IsEmpty() )
|
|
|
|
|
{
|
|
|
|
|
sz = size;
|
|
|
|
|
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / aScalar;
|
|
|
|
|
ln = Mm2mils( 22 );
|
|
|
|
|
if( lnMsg > ln )
|
|
|
|
|
sz.x *= float( ln ) / lnMsg;
|
|
|
|
|
pos.x = (refx - Mm2mils( 167.5 )) * aScalar;
|
|
|
|
|
pos.y = (refy - Mm2mils( 27.5 )) * aScalar;
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr2,
|
|
|
|
|
msg, TEXT_ORIENT_HORIZ, sz,
|
|
|
|
|
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
|
|
|
|
aLnW, false, false );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Verifier
|
|
|
|
|
msg = aTb.GetComment3();
|
|
|
|
|
if( !msg.IsEmpty() )
|
|
|
|
|
{
|
|
|
|
|
sz = size;
|
|
|
|
|
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / aScalar;
|
|
|
|
|
ln = Mm2mils( 22 );
|
|
|
|
|
if( lnMsg > ln )
|
|
|
|
|
sz.x *= float( ln ) / lnMsg;
|
|
|
|
|
pos.x = (refx - Mm2mils( 167 )) * aScalar;
|
|
|
|
|
pos.y = (refy - Mm2mils( 22.5 )) * aScalar;
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr2,
|
|
|
|
|
msg, TEXT_ORIENT_HORIZ, sz,
|
|
|
|
|
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
|
|
|
|
aLnW, false, false );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Approver
|
|
|
|
|
msg = aTb.GetComment4();
|
|
|
|
|
if( !msg.IsEmpty() )
|
|
|
|
|
{
|
|
|
|
|
sz = size;
|
|
|
|
|
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / aScalar;
|
|
|
|
|
ln = Mm2mils( 22 );
|
|
|
|
|
if( lnMsg > ln )
|
|
|
|
|
sz.x *= float( ln ) / lnMsg;
|
|
|
|
|
pos.x = (refx - Mm2mils( 167 )) * aScalar;
|
|
|
|
|
pos.y = (refy - Mm2mils( 2.5 )) * aScalar;
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr2,
|
|
|
|
|
msg, TEXT_ORIENT_HORIZ, sz,
|
|
|
|
|
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
|
|
|
|
aLnW, false, false );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else // other pages
|
|
|
|
|
{
|
|
|
|
|
for( WsItem = &WS_Osn2a_Line1; WsItem != NULL; WsItem = WsItem->Pnext )
|
|
|
|
|
{
|
|
|
|
|
pos.x = (refx - WsItem->m_Posx) * aScalar;
|
|
|
|
|
pos.y = (refy - WsItem->m_Posy) * aScalar;
|
|
|
|
|
end.x = (refx - WsItem->m_Endx) * aScalar;
|
|
|
|
|
end.y = (refy - WsItem->m_Endy) * aScalar;
|
|
|
|
|
msg = WsItem->m_Legende;
|
|
|
|
|
switch( WsItem->m_Type )
|
|
|
|
|
{
|
|
|
|
|
case WS_OSN:
|
|
|
|
|
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y, end.x, end.y,
|
|
|
|
|
lnWosn, aClr1 );
|
2009-04-05 20:49:15 +00:00
|
|
|
|
break;
|
2009-05-30 16:06:01 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
case WS_TONK:
|
|
|
|
|
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y, end.x, end.y,
|
|
|
|
|
lnWtonk, aClr1 );
|
2009-04-05 20:49:15 +00:00
|
|
|
|
break;
|
2009-05-30 16:06:01 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
case WS_TEXT:
|
2009-12-02 13:06:55 +00:00
|
|
|
|
if( !msg.IsEmpty() )
|
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
if( WsItem == &WS_Osn2a_Text1 )
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr1,
|
|
|
|
|
msg, TEXT_ORIENT_HORIZ, size0_8,
|
|
|
|
|
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
|
|
|
|
aLnW, false, false );
|
|
|
|
|
else
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr1,
|
|
|
|
|
msg, TEXT_ORIENT_HORIZ, size,
|
|
|
|
|
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
|
|
|
|
aLnW, false, false );
|
2009-12-02 13:06:55 +00:00
|
|
|
|
}
|
2009-04-05 20:49:15 +00:00
|
|
|
|
break;
|
2009-05-30 16:06:01 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
case WS_TEXTL:
|
2009-12-02 13:06:55 +00:00
|
|
|
|
if( !msg.IsEmpty() )
|
2013-03-27 20:38:20 +00:00
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr1,
|
2009-12-02 13:06:55 +00:00
|
|
|
|
msg, TEXT_ORIENT_HORIZ, size,
|
|
|
|
|
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
2012-03-26 21:45:05 +00:00
|
|
|
|
aLnW, false, false );
|
2009-04-05 20:49:15 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
2013-03-27 20:38:20 +00:00
|
|
|
|
|
|
|
|
|
// Sheet number
|
|
|
|
|
pos.x = (refx - Mm2mils( 5 )) * aScalar;
|
|
|
|
|
pos.y = (refy - Mm2mils( 4 )) * aScalar;
|
|
|
|
|
msg.Empty();
|
|
|
|
|
msg << aScr;
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr1, msg,
|
|
|
|
|
TEXT_ORIENT_HORIZ, size, GR_TEXT_HJUSTIFY_CENTER,
|
|
|
|
|
GR_TEXT_VJUSTIFY_CENTER, aLnW, false, false );
|
|
|
|
|
|
|
|
|
|
// Decimal number
|
|
|
|
|
msg = aTb.GetComment1();
|
|
|
|
|
if( !msg.IsEmpty() )
|
|
|
|
|
{
|
|
|
|
|
sz = size3;
|
|
|
|
|
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / aScalar;
|
|
|
|
|
ln = Mm2mils( 109 );
|
|
|
|
|
if( lnMsg > ln )
|
|
|
|
|
sz.x *= float( ln ) / lnMsg;
|
|
|
|
|
pos.x = (refx - Mm2mils( 65 )) * aScalar;
|
|
|
|
|
pos.y = (refy - Mm2mils( 7.5 )) * aScalar;
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr2,
|
|
|
|
|
msg, TEXT_ORIENT_HORIZ, sz,
|
|
|
|
|
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
|
|
|
|
aLnW, false, false );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Format
|
|
|
|
|
pos.x = (refx - Mm2mils( 23 )) * aScalar;
|
|
|
|
|
pos.y = (refy + Mm2mils( 2.5 )) * aScalar;
|
|
|
|
|
msg.Empty();
|
|
|
|
|
msg << aType;
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr1,
|
|
|
|
|
msg, TEXT_ORIENT_HORIZ, size,
|
|
|
|
|
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
|
|
|
|
aLnW, false, false );
|
|
|
|
|
|
|
|
|
|
// Center - left bottom corner
|
|
|
|
|
refx = aLT.x;
|
|
|
|
|
refy = aSz.y - aRB.y;
|
|
|
|
|
for( WsItem = &WS_DopLeft_Line1; WsItem != NULL; WsItem = WsItem->Pnext )
|
|
|
|
|
{
|
|
|
|
|
if( aScr > 1 && WsItem == &WS_DopLeft_Line9 ) // Some fields for first page only
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
pos.x = (refx - WsItem->m_Posx) * aScalar;
|
|
|
|
|
pos.y = (refy - WsItem->m_Posy) * aScalar;
|
|
|
|
|
end.x = (refx - WsItem->m_Endx) * aScalar;
|
|
|
|
|
end.y = (refy - WsItem->m_Endy) * aScalar;
|
|
|
|
|
msg = WsItem->m_Legende;
|
|
|
|
|
switch( WsItem->m_Type )
|
|
|
|
|
{
|
|
|
|
|
case WS_OSN:
|
|
|
|
|
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y, end.x, end.y,
|
|
|
|
|
lnWosn, aClr1 );
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case WS_TEXT:
|
|
|
|
|
if( !msg.IsEmpty() )
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr1,
|
|
|
|
|
msg, TEXT_ORIENT_VERT, size,
|
|
|
|
|
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
|
|
|
|
aLnW, false, false );
|
|
|
|
|
break;
|
|
|
|
|
}
|
2009-05-30 16:06:01 +00:00
|
|
|
|
}
|
2013-03-27 20:38:20 +00:00
|
|
|
|
|
|
|
|
|
if( aType == PAGE_INFO::A4 || aSz.x > aSz.y ) // A4 or Landscape
|
2009-05-30 16:06:01 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
// Center - left top corner
|
|
|
|
|
refx = aLT.x;
|
|
|
|
|
refy = aLT.y;
|
|
|
|
|
for( WsItem = &WS_DopTop_Line1; WsItem != NULL; WsItem = WsItem->Pnext )
|
2009-04-05 20:49:15 +00:00
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
if( aScr > 1 && WsItem == &WS_DopTop_Line3 ) // Some fields for first page only
|
|
|
|
|
break;
|
2011-12-22 21:57:50 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
pos.x = (refx + WsItem->m_Posx) * aScalar;
|
|
|
|
|
pos.y = (refy + WsItem->m_Posy) * aScalar;
|
|
|
|
|
end.x = (refx + WsItem->m_Endx) * aScalar;
|
|
|
|
|
end.y = (refy + WsItem->m_Endy) * aScalar;
|
|
|
|
|
msg = WsItem->m_Legende;
|
2009-04-05 20:49:15 +00:00
|
|
|
|
switch( WsItem->m_Type )
|
|
|
|
|
{
|
2013-03-27 20:38:20 +00:00
|
|
|
|
case WS_OSN:
|
|
|
|
|
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y, end.x, end.y,
|
|
|
|
|
lnWosn, aClr1 );
|
2009-12-02 13:06:55 +00:00
|
|
|
|
break;
|
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
case WS_TONK:
|
|
|
|
|
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y, end.x, end.y,
|
|
|
|
|
lnWtonk, aClr1 );
|
2009-04-05 20:49:15 +00:00
|
|
|
|
break;
|
2013-03-27 20:38:20 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2009-05-30 16:06:01 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
// Decimal number
|
|
|
|
|
msg = aTb.GetComment1();
|
|
|
|
|
if( !msg.IsEmpty() )
|
|
|
|
|
{
|
|
|
|
|
sz = size2;
|
|
|
|
|
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / aScalar;
|
|
|
|
|
ln = Mm2mils( 69 );
|
|
|
|
|
if( lnMsg > ln )
|
|
|
|
|
sz.x *= float( ln ) / lnMsg;
|
|
|
|
|
pos.x = (refx + Mm2mils( 35 )) * aScalar;
|
|
|
|
|
pos.y = (refy + Mm2mils( 7 )) * aScalar;
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr2,
|
|
|
|
|
msg, 1800, sz,
|
|
|
|
|
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
|
|
|
|
aLnW, false, false );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else // Portrait
|
|
|
|
|
{
|
|
|
|
|
// Center - right top corner
|
|
|
|
|
// Lines are used from the upper left corner by the change of coordinates
|
|
|
|
|
refx = aSz.x - aRB.x;
|
|
|
|
|
refy = aLT.y;
|
|
|
|
|
for( WsItem = &WS_DopTop_Line1; WsItem != NULL; WsItem = WsItem->Pnext )
|
|
|
|
|
{
|
|
|
|
|
if( aScr > 1 && WsItem == &WS_DopTop_Line3 ) // Some fields for first page only
|
2009-04-05 20:49:15 +00:00
|
|
|
|
break;
|
2009-05-30 16:06:01 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
pos.x = (refx - WsItem->m_Posy) * aScalar;
|
|
|
|
|
pos.y = (refy + WsItem->m_Posx) * aScalar;
|
|
|
|
|
end.x = (refx - WsItem->m_Endy) * aScalar;
|
|
|
|
|
end.y = (refy + WsItem->m_Endx) * aScalar;
|
|
|
|
|
msg = WsItem->m_Legende;
|
|
|
|
|
switch( WsItem->m_Type )
|
|
|
|
|
{
|
|
|
|
|
case WS_OSN:
|
|
|
|
|
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y, end.x, end.y,
|
|
|
|
|
lnWosn, aClr1 );
|
|
|
|
|
break;
|
2009-05-30 16:06:01 +00:00
|
|
|
|
|
2013-03-27 20:38:20 +00:00
|
|
|
|
case WS_TONK:
|
|
|
|
|
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y, end.x, end.y,
|
|
|
|
|
lnWtonk, aClr1 );
|
2009-04-05 20:49:15 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
2013-03-27 20:38:20 +00:00
|
|
|
|
|
|
|
|
|
// Decimal number
|
|
|
|
|
msg = aTb.GetComment1();
|
|
|
|
|
if( !msg.IsEmpty() )
|
|
|
|
|
{
|
|
|
|
|
sz = size2;
|
|
|
|
|
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / aScalar;
|
|
|
|
|
ln = Mm2mils( 69 );
|
|
|
|
|
if( lnMsg > ln )
|
|
|
|
|
sz.x *= float( ln ) / lnMsg;
|
|
|
|
|
pos.x = (refx - Mm2mils( 7 )) * aScalar;
|
|
|
|
|
pos.y = (refy + Mm2mils( 35 )) * aScalar;
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr2,
|
|
|
|
|
msg, TEXT_ORIENT_VERT, sz,
|
|
|
|
|
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
|
|
|
|
aLnW, false, false );
|
|
|
|
|
}
|
2008-11-05 11:41:15 +00:00
|
|
|
|
}
|
2011-12-22 21:57:50 +00:00
|
|
|
|
|
2008-11-05 11:41:15 +00:00
|
|
|
|
#else
|
2013-03-27 20:38:20 +00:00
|
|
|
|
|
2012-03-26 21:45:05 +00:00
|
|
|
|
// Draw the border.
|
|
|
|
|
int ii, jj, ipas, gxpas, gypas;
|
|
|
|
|
for( ii = 0; ii < 2; ii++ )
|
|
|
|
|
{
|
2012-04-16 01:25:26 +00:00
|
|
|
|
GRRect( m_canvas->GetClipBox(), aDC, refx * aScalar, refy * aScalar,
|
|
|
|
|
xg * aScalar, yg * aScalar, aLnW, aClr1 );
|
2012-03-26 21:45:05 +00:00
|
|
|
|
|
|
|
|
|
refx += GRID_REF_W; refy += GRID_REF_W;
|
|
|
|
|
xg -= GRID_REF_W; yg -= GRID_REF_W;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Upper left corner
|
|
|
|
|
refx = aLT.x;
|
|
|
|
|
refy = aLT.y;
|
|
|
|
|
|
|
|
|
|
// lower right corner
|
|
|
|
|
xg = aSz.x - aRB.x;
|
|
|
|
|
yg = aSz.y - aRB.y;
|
|
|
|
|
|
|
|
|
|
ipas = ( xg - refx ) / PAS_REF;
|
|
|
|
|
gxpas = ( xg - refx ) / ipas;
|
|
|
|
|
for( ii = refx + gxpas, jj = 1; ipas > 0; ii += gxpas, jj++, ipas-- )
|
|
|
|
|
{
|
|
|
|
|
Line.Printf( wxT( "%d" ), jj );
|
|
|
|
|
|
|
|
|
|
if( ii < xg - PAS_REF / 2 )
|
|
|
|
|
{
|
2012-04-16 01:25:26 +00:00
|
|
|
|
GRLine( m_canvas->GetClipBox(), aDC, ii * aScalar, refy * aScalar,
|
|
|
|
|
ii * aScalar, ( refy + GRID_REF_W ) * aScalar, aLnW, aClr1 );
|
2012-03-26 21:45:05 +00:00
|
|
|
|
}
|
|
|
|
|
DrawGraphicText( m_canvas, aDC,
|
2012-04-16 01:25:26 +00:00
|
|
|
|
wxPoint( ( ii - gxpas / 2 ) * aScalar,
|
|
|
|
|
( refy + GRID_REF_W / 2 ) * aScalar ),
|
2012-03-26 21:45:05 +00:00
|
|
|
|
aClr1, Line, TEXT_ORIENT_HORIZ, size_ref,
|
|
|
|
|
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
|
|
|
|
aLnW, false, false );
|
|
|
|
|
|
|
|
|
|
if( ii < xg - PAS_REF / 2 )
|
|
|
|
|
{
|
2012-04-16 01:25:26 +00:00
|
|
|
|
GRLine( m_canvas->GetClipBox(), aDC, ii * aScalar, yg * aScalar,
|
|
|
|
|
ii * aScalar, ( yg - GRID_REF_W ) * aScalar, aLnW, aClr1 );
|
2012-03-26 21:45:05 +00:00
|
|
|
|
}
|
|
|
|
|
DrawGraphicText( m_canvas, aDC,
|
2012-04-16 01:25:26 +00:00
|
|
|
|
wxPoint( ( ii - gxpas / 2 ) * aScalar,
|
|
|
|
|
( yg - GRID_REF_W / 2) * aScalar ),
|
2012-03-26 21:45:05 +00:00
|
|
|
|
aClr1, Line, TEXT_ORIENT_HORIZ, size_ref,
|
|
|
|
|
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
|
|
|
|
aLnW, false, false );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ipas = ( yg - refy ) / PAS_REF;
|
|
|
|
|
gypas = ( yg - refy ) / ipas;
|
|
|
|
|
|
|
|
|
|
for( ii = refy + gypas, jj = 0; ipas > 0; ii += gypas, jj++, ipas-- )
|
|
|
|
|
{
|
|
|
|
|
if( jj < 26 )
|
|
|
|
|
Line.Printf( wxT( "%c" ), jj + 'A' );
|
2012-04-01 20:51:56 +00:00
|
|
|
|
else // I hope 52 identifiers are enough...
|
2012-03-26 21:45:05 +00:00
|
|
|
|
Line.Printf( wxT( "%c" ), 'a' + jj - 26 );
|
|
|
|
|
|
|
|
|
|
if( ii < yg - PAS_REF / 2 )
|
|
|
|
|
{
|
2012-04-16 01:25:26 +00:00
|
|
|
|
GRLine( m_canvas->GetClipBox(), aDC, refx * aScalar, ii * aScalar,
|
|
|
|
|
( refx + GRID_REF_W ) * aScalar, ii * aScalar, aLnW, aClr1 );
|
2012-03-26 21:45:05 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DrawGraphicText( m_canvas, aDC,
|
2012-04-16 01:25:26 +00:00
|
|
|
|
wxPoint( ( refx + GRID_REF_W / 2 ) * aScalar,
|
|
|
|
|
( ii - gypas / 2 ) * aScalar ),
|
2012-03-26 21:45:05 +00:00
|
|
|
|
aClr1, Line, TEXT_ORIENT_HORIZ, size_ref,
|
|
|
|
|
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
|
|
|
|
aLnW, false, false );
|
|
|
|
|
|
|
|
|
|
if( ii < yg - PAS_REF / 2 )
|
|
|
|
|
{
|
2012-04-16 01:25:26 +00:00
|
|
|
|
GRLine( m_canvas->GetClipBox(), aDC, xg * aScalar, ii * aScalar,
|
|
|
|
|
( xg - GRID_REF_W ) * aScalar, ii * aScalar, aLnW, aClr1 );
|
2012-03-26 21:45:05 +00:00
|
|
|
|
}
|
|
|
|
|
DrawGraphicText( m_canvas, aDC,
|
2012-04-16 01:25:26 +00:00
|
|
|
|
wxPoint( ( xg - GRID_REF_W / 2 ) * aScalar,
|
|
|
|
|
( ii - gxpas / 2 ) * aScalar ),
|
2012-03-26 21:45:05 +00:00
|
|
|
|
aClr1, Line, TEXT_ORIENT_HORIZ, size_ref,
|
|
|
|
|
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
|
|
|
|
aLnW, false, false );
|
|
|
|
|
}
|
2011-12-22 21:57:50 +00:00
|
|
|
|
|
2012-03-26 21:45:05 +00:00
|
|
|
|
int UpperLimit = VARIABLE_BLOCK_START_POSITION;
|
|
|
|
|
refx = aSz.x - aRB.x - GRID_REF_W;
|
|
|
|
|
refy = aSz.y - aRB.y - GRID_REF_W;
|
2008-03-04 14:27:48 +00:00
|
|
|
|
|
|
|
|
|
for( WsItem = &WS_Date; WsItem != NULL; WsItem = WsItem->Pnext )
|
|
|
|
|
{
|
2012-04-16 01:25:26 +00:00
|
|
|
|
pos.x = (refx - WsItem->m_Posx) * aScalar;
|
|
|
|
|
pos.y = (refy - WsItem->m_Posy) * aScalar;
|
2008-03-04 14:27:48 +00:00
|
|
|
|
msg.Empty();
|
|
|
|
|
|
|
|
|
|
switch( WsItem->m_Type )
|
|
|
|
|
{
|
|
|
|
|
case WS_DATE:
|
|
|
|
|
if( WsItem->m_Legende )
|
|
|
|
|
msg = WsItem->m_Legende;
|
2012-03-26 21:45:05 +00:00
|
|
|
|
msg += aTb.GetDate();
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr1,
|
2009-04-05 20:49:15 +00:00
|
|
|
|
msg, TEXT_ORIENT_HORIZ, size,
|
2009-11-23 15:16:50 +00:00
|
|
|
|
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
2012-03-26 21:45:05 +00:00
|
|
|
|
aLnW, false, true );
|
2008-03-04 14:27:48 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case WS_REV:
|
|
|
|
|
if( WsItem->m_Legende )
|
2012-03-26 21:45:05 +00:00
|
|
|
|
{
|
2008-03-04 14:27:48 +00:00
|
|
|
|
msg = WsItem->m_Legende;
|
2012-03-26 21:45:05 +00:00
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr1, msg, TEXT_ORIENT_HORIZ, size,
|
|
|
|
|
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
2012-09-22 11:19:37 +00:00
|
|
|
|
GetPenSizeForBold( std::min( size.x, size.y ) ), false, true );
|
2012-03-26 21:45:05 +00:00
|
|
|
|
pos.x += ReturnGraphicTextWidth( msg, size.x, false, false );
|
|
|
|
|
}
|
|
|
|
|
msg = aTb.GetRevision();
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr2, msg, TEXT_ORIENT_HORIZ, size,
|
2009-05-30 16:06:01 +00:00
|
|
|
|
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
2012-09-22 11:19:37 +00:00
|
|
|
|
GetPenSizeForBold( std::min( size.x, size.y ) ), false, true );
|
2008-03-04 14:27:48 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case WS_KICAD_VERSION:
|
|
|
|
|
if( WsItem->m_Legende )
|
|
|
|
|
msg = WsItem->m_Legende;
|
2009-04-05 20:49:15 +00:00
|
|
|
|
msg += g_ProductName + wxGetApp().GetAppName();
|
2008-03-04 14:27:48 +00:00
|
|
|
|
msg += wxT( " " ) + GetBuildVersion();
|
2012-03-26 21:45:05 +00:00
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr1,
|
2009-04-05 20:49:15 +00:00
|
|
|
|
msg, TEXT_ORIENT_HORIZ, size,
|
2009-11-23 15:16:50 +00:00
|
|
|
|
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
2012-03-26 21:45:05 +00:00
|
|
|
|
aLnW, false, false );
|
2008-03-04 14:27:48 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case WS_SIZESHEET:
|
|
|
|
|
if( WsItem->m_Legende )
|
|
|
|
|
msg = WsItem->m_Legende;
|
2012-03-26 21:45:05 +00:00
|
|
|
|
msg += aType;
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr1,
|
2009-04-05 20:49:15 +00:00
|
|
|
|
msg, TEXT_ORIENT_HORIZ, size,
|
2009-11-23 15:16:50 +00:00
|
|
|
|
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
2012-03-26 21:45:05 +00:00
|
|
|
|
aLnW, false, false );
|
2008-03-04 14:27:48 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case WS_IDENTSHEET:
|
|
|
|
|
if( WsItem->m_Legende )
|
|
|
|
|
msg = WsItem->m_Legende;
|
2012-03-26 21:45:05 +00:00
|
|
|
|
msg << aScr << wxT( "/" ) << aNScr;
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr1,
|
2009-04-05 20:49:15 +00:00
|
|
|
|
msg, TEXT_ORIENT_HORIZ, size,
|
2009-11-23 15:16:50 +00:00
|
|
|
|
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
2012-03-26 21:45:05 +00:00
|
|
|
|
aLnW, false, false );
|
2008-03-04 14:27:48 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case WS_FILENAME:
|
2012-03-26 21:45:05 +00:00
|
|
|
|
{
|
2013-02-09 20:03:20 +00:00
|
|
|
|
wxFileName fn( aFlNm );
|
2011-01-20 16:34:57 +00:00
|
|
|
|
|
2012-03-26 21:45:05 +00:00
|
|
|
|
if( WsItem->m_Legende )
|
|
|
|
|
msg = WsItem->m_Legende;
|
2011-01-20 16:34:57 +00:00
|
|
|
|
|
2013-02-09 20:03:20 +00:00
|
|
|
|
msg << fn.GetFullName();
|
2012-03-26 21:45:05 +00:00
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr1,
|
|
|
|
|
msg, TEXT_ORIENT_HORIZ, size,
|
|
|
|
|
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
|
|
|
|
aLnW, false, false );
|
|
|
|
|
}
|
|
|
|
|
break;
|
2008-03-04 14:27:48 +00:00
|
|
|
|
|
|
|
|
|
case WS_FULLSHEETNAME:
|
|
|
|
|
if( WsItem->m_Legende )
|
|
|
|
|
msg = WsItem->m_Legende;
|
|
|
|
|
msg += GetScreenDesc();
|
2012-03-26 21:45:05 +00:00
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr1,
|
2009-04-05 20:49:15 +00:00
|
|
|
|
msg, TEXT_ORIENT_HORIZ, size,
|
2009-11-23 15:16:50 +00:00
|
|
|
|
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
2012-03-26 21:45:05 +00:00
|
|
|
|
aLnW, false, false );
|
2008-03-04 14:27:48 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case WS_COMPANY_NAME:
|
|
|
|
|
if( WsItem->m_Legende )
|
|
|
|
|
msg = WsItem->m_Legende;
|
2012-03-26 21:45:05 +00:00
|
|
|
|
msg += aTb.GetCompany();
|
2008-03-04 14:27:48 +00:00
|
|
|
|
if( !msg.IsEmpty() )
|
|
|
|
|
{
|
2012-03-26 21:45:05 +00:00
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr2,
|
2009-04-05 20:49:15 +00:00
|
|
|
|
msg, TEXT_ORIENT_HORIZ, size,
|
2009-05-30 16:06:01 +00:00
|
|
|
|
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
2012-09-22 11:19:37 +00:00
|
|
|
|
GetPenSizeForBold( std::min( size.x, size.y ) ),
|
2009-05-30 16:06:01 +00:00
|
|
|
|
false, true );
|
2012-09-22 11:19:37 +00:00
|
|
|
|
UpperLimit = std::max( UpperLimit, WsItem->m_Posy + SIZETEXT );
|
2008-03-04 14:27:48 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case WS_TITLE:
|
|
|
|
|
if( WsItem->m_Legende )
|
2012-03-26 21:45:05 +00:00
|
|
|
|
{
|
2008-03-04 14:27:48 +00:00
|
|
|
|
msg = WsItem->m_Legende;
|
2012-03-26 21:45:05 +00:00
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr1, msg, TEXT_ORIENT_HORIZ, size,
|
|
|
|
|
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
2012-09-22 11:19:37 +00:00
|
|
|
|
GetPenSizeForBold( std::min( size.x, size.y ) ), false, true );
|
2012-03-26 21:45:05 +00:00
|
|
|
|
pos.x += ReturnGraphicTextWidth( msg, size.x, false, false );
|
|
|
|
|
}
|
|
|
|
|
msg = aTb.GetTitle();
|
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr2, msg, TEXT_ORIENT_HORIZ, size,
|
2009-05-30 16:06:01 +00:00
|
|
|
|
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
2012-09-22 11:19:37 +00:00
|
|
|
|
GetPenSizeForBold( std::min( size.x, size.y ) ), false, true );
|
2008-03-04 14:27:48 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case WS_COMMENT1:
|
|
|
|
|
if( WsItem->m_Legende )
|
|
|
|
|
msg = WsItem->m_Legende;
|
2012-03-26 21:45:05 +00:00
|
|
|
|
msg += aTb.GetComment1();
|
2008-03-04 14:27:48 +00:00
|
|
|
|
if( !msg.IsEmpty() )
|
|
|
|
|
{
|
2012-03-26 21:45:05 +00:00
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr2,
|
2009-04-05 20:49:15 +00:00
|
|
|
|
msg, TEXT_ORIENT_HORIZ, size,
|
2009-11-23 15:16:50 +00:00
|
|
|
|
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
2012-03-26 21:45:05 +00:00
|
|
|
|
aLnW, false, false );
|
2012-09-22 11:19:37 +00:00
|
|
|
|
UpperLimit = std::max( UpperLimit, WsItem->m_Posy + SIZETEXT );
|
2008-03-04 14:27:48 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case WS_COMMENT2:
|
|
|
|
|
if( WsItem->m_Legende )
|
|
|
|
|
msg = WsItem->m_Legende;
|
2012-03-26 21:45:05 +00:00
|
|
|
|
msg += aTb.GetComment2();
|
2008-03-04 14:27:48 +00:00
|
|
|
|
if( !msg.IsEmpty() )
|
|
|
|
|
{
|
2012-03-26 21:45:05 +00:00
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr2,
|
2009-04-05 20:49:15 +00:00
|
|
|
|
msg, TEXT_ORIENT_HORIZ, size,
|
2009-11-23 15:16:50 +00:00
|
|
|
|
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
2012-03-26 21:45:05 +00:00
|
|
|
|
aLnW, false, false );
|
2012-09-22 11:19:37 +00:00
|
|
|
|
UpperLimit = std::max( UpperLimit, WsItem->m_Posy + SIZETEXT );
|
2008-03-04 14:27:48 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case WS_COMMENT3:
|
|
|
|
|
if( WsItem->m_Legende )
|
|
|
|
|
msg = WsItem->m_Legende;
|
2012-03-26 21:45:05 +00:00
|
|
|
|
msg += aTb.GetComment3();
|
2008-03-04 14:27:48 +00:00
|
|
|
|
if( !msg.IsEmpty() )
|
|
|
|
|
{
|
2012-03-26 21:45:05 +00:00
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr2,
|
2009-04-05 20:49:15 +00:00
|
|
|
|
msg, TEXT_ORIENT_HORIZ, size,
|
2009-11-23 15:16:50 +00:00
|
|
|
|
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
2012-03-26 21:45:05 +00:00
|
|
|
|
aLnW, false, false );
|
2012-09-22 11:19:37 +00:00
|
|
|
|
UpperLimit = std::max( UpperLimit, WsItem->m_Posy + SIZETEXT );
|
2008-03-04 14:27:48 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case WS_COMMENT4:
|
|
|
|
|
if( WsItem->m_Legende )
|
|
|
|
|
msg = WsItem->m_Legende;
|
2012-03-26 21:45:05 +00:00
|
|
|
|
msg += aTb.GetComment4();
|
2008-03-04 14:27:48 +00:00
|
|
|
|
if( !msg.IsEmpty() )
|
|
|
|
|
{
|
2012-03-26 21:45:05 +00:00
|
|
|
|
DrawGraphicText( m_canvas, aDC, pos, aClr2,
|
2009-04-05 20:49:15 +00:00
|
|
|
|
msg, TEXT_ORIENT_HORIZ, size,
|
2009-11-23 15:16:50 +00:00
|
|
|
|
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
2012-03-26 21:45:05 +00:00
|
|
|
|
aLnW, false, false );
|
2012-09-22 11:19:37 +00:00
|
|
|
|
UpperLimit = std::max( UpperLimit, WsItem->m_Posy + SIZETEXT );
|
2008-03-04 14:27:48 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case WS_UPPER_SEGMENT:
|
|
|
|
|
if( UpperLimit == 0 )
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case WS_LEFT_SEGMENT:
|
2009-05-30 16:06:01 +00:00
|
|
|
|
WS_MostUpperLine.m_Posy =
|
2008-03-04 14:27:48 +00:00
|
|
|
|
WS_MostUpperLine.m_Endy =
|
2009-05-30 16:06:01 +00:00
|
|
|
|
WS_MostLeftLine.m_Posy = UpperLimit;
|
2012-04-16 01:25:26 +00:00
|
|
|
|
pos.y = (refy - WsItem->m_Posy) * aScalar;
|
2008-03-04 14:27:48 +00:00
|
|
|
|
|
|
|
|
|
case WS_SEGMENT:
|
2012-03-26 21:45:05 +00:00
|
|
|
|
xg = aSz.x - GRID_REF_W - aRB.x - WsItem->m_Endx;
|
|
|
|
|
yg = aSz.y - GRID_REF_W - aRB.y - WsItem->m_Endy;
|
|
|
|
|
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y,
|
2012-04-16 01:25:26 +00:00
|
|
|
|
xg * aScalar, yg * aScalar, aLnW, aClr1 );
|
2008-03-04 14:27:48 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
2009-05-30 16:06:01 +00:00
|
|
|
|
|
2008-11-05 11:41:15 +00:00
|
|
|
|
#endif
|
2013-03-27 20:38:20 +00:00
|
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
|
}
|
2008-03-04 14:27:48 +00:00
|
|
|
|
|
|
|
|
|
|
2012-09-02 12:06:47 +00:00
|
|
|
|
const wxString EDA_DRAW_FRAME::GetXYSheetReferences( const wxPoint& aPosition ) const
|
2008-07-31 15:30:57 +00:00
|
|
|
|
{
|
2011-12-22 21:57:50 +00:00
|
|
|
|
const PAGE_INFO& pageInfo = GetPageSettings();
|
2008-07-31 15:30:57 +00:00
|
|
|
|
|
2011-12-22 21:57:50 +00:00
|
|
|
|
int ii;
|
|
|
|
|
int xg, yg;
|
|
|
|
|
int ipas;
|
|
|
|
|
int gxpas, gypas;
|
|
|
|
|
int refx, refy;
|
|
|
|
|
wxString msg;
|
|
|
|
|
|
|
|
|
|
// Upper left corner
|
|
|
|
|
refx = pageInfo.GetLeftMarginMils();
|
|
|
|
|
refy = pageInfo.GetTopMarginMils();
|
2008-07-31 15:30:57 +00:00
|
|
|
|
|
2011-12-22 21:57:50 +00:00
|
|
|
|
// lower right corner
|
|
|
|
|
xg = pageInfo.GetSizeMils().x - pageInfo.GetRightMarginMils();
|
|
|
|
|
yg = pageInfo.GetSizeMils().y - pageInfo.GetBottomMarginMils();
|
2008-07-31 15:30:57 +00:00
|
|
|
|
|
2011-12-22 21:57:50 +00:00
|
|
|
|
// Get the Y axis identifier (A symbol A ... Z)
|
2012-04-01 20:51:56 +00:00
|
|
|
|
if( aPosition.y < refy || aPosition.y > yg ) // Outside of Y limits
|
2008-07-31 15:30:57 +00:00
|
|
|
|
msg << wxT( "?" );
|
|
|
|
|
else
|
|
|
|
|
{
|
2011-12-22 21:57:50 +00:00
|
|
|
|
ipas = ( yg - refy ) / PAS_REF; // ipas = Y count sections
|
|
|
|
|
gypas = ( yg - refy ) / ipas; // gypas = Y section size
|
2009-11-23 15:16:50 +00:00
|
|
|
|
ii = ( aPosition.y - refy ) / gypas;
|
2008-07-31 15:30:57 +00:00
|
|
|
|
msg.Printf( wxT( "%c" ), 'A' + ii );
|
|
|
|
|
}
|
|
|
|
|
|
2011-12-22 21:57:50 +00:00
|
|
|
|
// Get the X axis identifier (A number 1 ... n)
|
2012-04-01 20:51:56 +00:00
|
|
|
|
if( aPosition.x < refx || aPosition.x > xg ) // Outside of X limits
|
2008-07-31 15:30:57 +00:00
|
|
|
|
msg << wxT( "?" );
|
|
|
|
|
else
|
|
|
|
|
{
|
2011-12-22 21:57:50 +00:00
|
|
|
|
ipas = ( xg - refx ) / PAS_REF; // ipas = X count sections
|
|
|
|
|
gxpas = ( xg - refx ) / ipas; // gxpas = X section size
|
2008-07-31 15:30:57 +00:00
|
|
|
|
|
2009-11-23 15:16:50 +00:00
|
|
|
|
ii = ( aPosition.x - refx ) / gxpas;
|
2008-07-31 15:30:57 +00:00
|
|
|
|
msg << ii + 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return msg;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2011-01-21 19:30:59 +00:00
|
|
|
|
wxString EDA_DRAW_FRAME::GetScreenDesc()
|
2008-02-12 21:12:46 +00:00
|
|
|
|
{
|
2008-03-04 14:27:48 +00:00
|
|
|
|
wxString msg;
|
|
|
|
|
|
2011-02-05 02:21:11 +00:00
|
|
|
|
msg << GetScreen()->m_ScreenNumber << wxT( "/" )
|
2012-05-27 00:19:12 +00:00
|
|
|
|
<< GetScreen()->m_NumberOfScreens;
|
2008-03-04 14:27:48 +00:00
|
|
|
|
return msg;
|
2008-02-12 21:12:46 +00:00
|
|
|
|
}
|
2012-04-01 20:51:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void TITLE_BLOCK::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aControlBits ) const
|
|
|
|
|
throw( IO_ERROR )
|
|
|
|
|
{
|
|
|
|
|
// Don't write the title block information if there is nothing to write.
|
2012-12-14 16:54:54 +00:00
|
|
|
|
if( !m_title.IsEmpty() || /* !m_date.IsEmpty() || */ !m_revision.IsEmpty()
|
2012-04-01 20:51:56 +00:00
|
|
|
|
|| !m_company.IsEmpty() || !m_comment1.IsEmpty() || !m_comment2.IsEmpty()
|
|
|
|
|
|| !m_comment3.IsEmpty() || !m_comment4.IsEmpty() )
|
|
|
|
|
{
|
2012-12-30 15:40:05 +00:00
|
|
|
|
aFormatter->Print( aNestLevel, "(title_block \n" );
|
2012-04-01 20:51:56 +00:00
|
|
|
|
|
|
|
|
|
if( !m_title.IsEmpty() )
|
2012-06-09 17:00:13 +00:00
|
|
|
|
aFormatter->Print( aNestLevel+1, "(title %s)\n",
|
|
|
|
|
aFormatter->Quotew( m_title ).c_str() );
|
2012-04-01 20:51:56 +00:00
|
|
|
|
|
2012-12-14 16:54:54 +00:00
|
|
|
|
/* version control users were complaining, see mailing list.
|
2012-04-01 20:51:56 +00:00
|
|
|
|
if( !m_date.IsEmpty() )
|
2012-06-09 17:00:13 +00:00
|
|
|
|
aFormatter->Print( aNestLevel+1, "(date %s)\n",
|
|
|
|
|
aFormatter->Quotew( m_date ).c_str() );
|
2012-12-14 16:54:54 +00:00
|
|
|
|
*/
|
2012-04-01 20:51:56 +00:00
|
|
|
|
|
|
|
|
|
if( !m_revision.IsEmpty() )
|
2012-06-09 17:00:13 +00:00
|
|
|
|
aFormatter->Print( aNestLevel+1, "(rev %s)\n",
|
|
|
|
|
aFormatter->Quotew( m_revision ).c_str() );
|
2012-04-01 20:51:56 +00:00
|
|
|
|
|
|
|
|
|
if( !m_company.IsEmpty() )
|
2012-06-09 17:00:13 +00:00
|
|
|
|
aFormatter->Print( aNestLevel+1, "(company %s)\n",
|
|
|
|
|
aFormatter->Quotew( m_company ).c_str() );
|
2012-04-01 20:51:56 +00:00
|
|
|
|
|
|
|
|
|
if( !m_comment1.IsEmpty() )
|
2012-06-09 17:00:13 +00:00
|
|
|
|
aFormatter->Print( aNestLevel+1, "(comment 1 %s)\n",
|
|
|
|
|
aFormatter->Quotew( m_comment1 ).c_str() );
|
2012-04-01 20:51:56 +00:00
|
|
|
|
|
|
|
|
|
if( !m_comment2.IsEmpty() )
|
2012-06-09 17:00:13 +00:00
|
|
|
|
aFormatter->Print( aNestLevel+1, "(comment 2 %s)\n",
|
|
|
|
|
aFormatter->Quotew( m_comment2 ).c_str() );
|
2012-04-01 20:51:56 +00:00
|
|
|
|
|
|
|
|
|
if( !m_comment3.IsEmpty() )
|
2012-06-09 17:00:13 +00:00
|
|
|
|
aFormatter->Print( aNestLevel+1, "(comment 3 %s)\n",
|
|
|
|
|
aFormatter->Quotew( m_comment3 ).c_str() );
|
2012-04-01 20:51:56 +00:00
|
|
|
|
|
|
|
|
|
if( !m_comment4.IsEmpty() )
|
2012-06-09 17:00:13 +00:00
|
|
|
|
aFormatter->Print( aNestLevel+1, "(comment 4 %s)\n",
|
|
|
|
|
aFormatter->Quotew( m_comment4 ).c_str() );
|
2012-04-01 20:51:56 +00:00
|
|
|
|
|
2012-04-07 18:05:56 +00:00
|
|
|
|
aFormatter->Print( aNestLevel, ")\n\n" );
|
2012-04-01 20:51:56 +00:00
|
|
|
|
}
|
|
|
|
|
}
|