You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

633 lines
18 KiB

18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: plotps.cpp
  3. // Purpose:
  4. // Author: jean-pierre Charras
  5. // Modified by:
  6. // Created: 01/02/2006 08:37:24
  7. // RCS-ID:
  8. // Copyright: GNU License
  9. // Licence:
  10. /////////////////////////////////////////////////////////////////////////////
  11. // Generated by DialogBlocks (unregistered), 01/02/2006 08:37:24
  12. #if defined (__GNUG__) && !defined (NO_GCC_PRAGMA)
  13. #pragma implementation "plotps.h"
  14. #endif
  15. // For compilers that support precompilation, includes "wx/wx.h".
  16. #include "wx/wxprec.h"
  17. #ifdef __BORLANDC__
  18. #pragma hdrstop
  19. #endif
  20. #ifndef WX_PRECOMP
  21. #include "wx/wx.h"
  22. #endif
  23. #include "fctsys.h"
  24. #include "gr_basic.h"
  25. #include "common.h"
  26. #include "program.h"
  27. #include "libcmp.h"
  28. #include "general.h"
  29. #include "worksheet.h"
  30. #include "plot_common.h"
  31. #include "protos.h"
  32. #include "wx/defs.h"
  33. // coeff de conversion dim en 1 mil -> dim en unite PS:
  34. const double SCALE_PS = 0.001;
  35. extern void Move_Plume( wxPoint pos, int plume );
  36. extern void Plume( int plume );
  37. enum PageFormatReq {
  38. PAGE_SIZE_AUTO,
  39. PAGE_SIZE_A4,
  40. PAGE_SIZE_A
  41. };
  42. /* Variables locales : */
  43. static int PS_SizeSelect = PAGE_SIZE_AUTO;
  44. extern FILE* PlotOutput;
  45. static bool Plot_Sheet_Ref = TRUE;
  46. ////@begin includes
  47. ////@end includes
  48. #include "plotps.h"
  49. ////@begin XPM images
  50. ////@end XPM images
  51. /***********************************************************/
  52. void WinEDA_SchematicFrame::ToPlot_PS( wxCommandEvent& event )
  53. /***********************************************************/
  54. /* fonction relai de creation de la frame de dialogue pour trace Postscript
  55. */
  56. {
  57. wxPoint pos;
  58. pos = GetPosition();
  59. pos.x += 10;
  60. pos.y += 20;
  61. WinEDA_PlotPSFrame* Ps_frame = new WinEDA_PlotPSFrame( this );
  62. Ps_frame->ShowModal();
  63. Ps_frame->Destroy();
  64. }
  65. /*!
  66. * WinEDA_PlotPSFrame type definition
  67. */
  68. IMPLEMENT_DYNAMIC_CLASS( WinEDA_PlotPSFrame, wxDialog )
  69. /*!
  70. * WinEDA_PlotPSFrame event table definition
  71. */
  72. BEGIN_EVENT_TABLE( WinEDA_PlotPSFrame, wxDialog )
  73. ////@begin WinEDA_PlotPSFrame event table entries
  74. EVT_INIT_DIALOG( WinEDA_PlotPSFrame::OnInitDialog )
  75. EVT_BUTTON( ID_PLOT_PS_CURRENT_EXECUTE, WinEDA_PlotPSFrame::OnPlotPsCurrentExecuteClick )
  76. EVT_BUTTON( ID_PLOT_PS_ALL_EXECUTE, WinEDA_PlotPSFrame::OnPlotPsAllExecuteClick )
  77. EVT_BUTTON( wxID_CANCEL, WinEDA_PlotPSFrame::OnCancelClick )
  78. ////@end WinEDA_PlotPSFrame event table entries
  79. END_EVENT_TABLE()
  80. /*!
  81. * WinEDA_PlotPSFrame constructors
  82. */
  83. WinEDA_PlotPSFrame::WinEDA_PlotPSFrame()
  84. {
  85. }
  86. WinEDA_PlotPSFrame::WinEDA_PlotPSFrame( wxWindow* parent,
  87. wxWindowID id,
  88. const wxString& caption,
  89. const wxPoint& pos,
  90. const wxSize& size,
  91. long style )
  92. {
  93. Create( parent, id, caption, pos, size, style );
  94. }
  95. /*!
  96. * WinEDA_PlotPSFrame creator
  97. */
  98. bool WinEDA_PlotPSFrame::Create( wxWindow* parent,
  99. wxWindowID id,
  100. const wxString& caption,
  101. const wxPoint& pos,
  102. const wxSize& size,
  103. long style )
  104. {
  105. ////@begin WinEDA_PlotPSFrame member initialisation
  106. m_SizeOption = NULL;
  107. m_PlotPSColorOption = NULL;
  108. m_Plot_Sheet_Ref = NULL;
  109. m_btClose = NULL;
  110. m_DefaultLineSizeCtrlSizer = NULL;
  111. m_MsgBox = NULL;
  112. ////@end WinEDA_PlotPSFrame member initialisation
  113. ////@begin WinEDA_PlotPSFrame creation
  114. SetExtraStyle( wxWS_EX_BLOCK_EVENTS );
  115. wxDialog::Create( parent, id, caption, pos, size, style );
  116. CreateControls();
  117. if( GetSizer() )
  118. {
  119. GetSizer()->SetSizeHints( this );
  120. }
  121. Centre();
  122. ////@end WinEDA_PlotPSFrame creation
  123. return true;
  124. }
  125. /*!
  126. * Control creation for WinEDA_PlotPSFrame
  127. */
  128. void WinEDA_PlotPSFrame::CreateControls()
  129. {
  130. SetFont( *g_DialogFont );
  131. ////@begin WinEDA_PlotPSFrame content construction
  132. // Generated by DialogBlocks, 29/04/2008 21:12:22 (unregistered)
  133. WinEDA_PlotPSFrame* itemDialog1 = this;
  134. wxBoxSizer* itemBoxSizer2 = new wxBoxSizer( wxVERTICAL );
  135. itemDialog1->SetSizer( itemBoxSizer2 );
  136. wxBoxSizer* itemBoxSizer3 = new wxBoxSizer( wxHORIZONTAL );
  137. itemBoxSizer2->Add( itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 );
  138. wxArrayString m_SizeOptionStrings;
  139. m_SizeOptionStrings.Add( _( "Auto" ) );
  140. m_SizeOptionStrings.Add( _( "Page Size A4" ) );
  141. m_SizeOptionStrings.Add( _( "Page Size A" ) );
  142. m_SizeOption = new wxRadioBox( itemDialog1, ID_RADIOBOX1, _(
  143. "Plot page size:" ), wxDefaultPosition, wxDefaultSize,
  144. m_SizeOptionStrings, 1,
  145. wxRA_SPECIFY_COLS );
  146. m_SizeOption->SetSelection( 0 );
  147. itemBoxSizer3->Add( m_SizeOption, 0, wxGROW | wxALL, 5 );
  148. itemBoxSizer3->Add( 5, 5, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
  149. wxStaticBox* itemStaticBoxSizer6Static = new wxStaticBox( itemDialog1, wxID_ANY, _(
  150. "Plot Options:" ) );
  151. wxStaticBoxSizer* itemStaticBoxSizer6 = new wxStaticBoxSizer(
  152. itemStaticBoxSizer6Static,
  153. wxVERTICAL );
  154. itemBoxSizer3->Add( itemStaticBoxSizer6, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
  155. wxArrayString m_PlotPSColorOptionStrings;
  156. m_PlotPSColorOptionStrings.Add( _( "B/W" ) );
  157. m_PlotPSColorOptionStrings.Add( _( "Color" ) );
  158. m_PlotPSColorOption = new wxRadioBox( itemDialog1, ID_RADIOBOX, _(
  159. "Plot Color:" ), wxDefaultPosition, wxDefaultSize,
  160. m_PlotPSColorOptionStrings, 1,
  161. wxRA_SPECIFY_COLS );
  162. m_PlotPSColorOption->SetSelection( 0 );
  163. itemStaticBoxSizer6->Add( m_PlotPSColorOption, 0, wxGROW | wxALL, 5 );
  164. m_Plot_Sheet_Ref = new wxCheckBox( itemDialog1, ID_CHECKBOX, _(
  165. "Print Sheet Ref" ), wxDefaultPosition,
  166. wxDefaultSize, wxCHK_2STATE );
  167. m_Plot_Sheet_Ref->SetValue( false );
  168. itemStaticBoxSizer6->Add( m_Plot_Sheet_Ref, 0, wxGROW | wxALL, 5 );
  169. itemBoxSizer3->Add( 5, 5, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
  170. wxBoxSizer* itemBoxSizer10 = new wxBoxSizer( wxVERTICAL );
  171. itemBoxSizer3->Add( itemBoxSizer10, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
  172. wxButton* itemButton11 = new wxButton( itemDialog1, ID_PLOT_PS_CURRENT_EXECUTE, _(
  173. "&Plot CURRENT" ), wxDefaultPosition,
  174. wxDefaultSize, 0 );
  175. itemButton11->SetForegroundColour( wxColour( 0, 128, 0 ) );
  176. itemBoxSizer10->Add( itemButton11, 0, wxGROW | wxALL, 5 );
  177. wxButton* itemButton12 = new wxButton( itemDialog1, ID_PLOT_PS_ALL_EXECUTE, _(
  178. "Plot A&LL" ), wxDefaultPosition,
  179. wxDefaultSize, 0 );
  180. itemButton12->SetForegroundColour( wxColour( 179, 0, 0 ) );
  181. itemBoxSizer10->Add( itemButton12, 0, wxGROW | wxALL, 5 );
  182. m_btClose = new wxButton( itemDialog1, wxID_CANCEL, _(
  183. "Close" ), wxDefaultPosition, wxDefaultSize,
  184. 0 );
  185. m_btClose->SetDefault();
  186. m_btClose->SetForegroundColour( wxColour( 0, 0, 255 ) );
  187. itemBoxSizer10->Add( m_btClose, 0, wxGROW | wxALL, 5 );
  188. m_DefaultLineSizeCtrlSizer = new wxBoxSizer( wxVERTICAL );
  189. itemBoxSizer2->Add( m_DefaultLineSizeCtrlSizer, 0, wxGROW | wxALL, 5 );
  190. wxStaticText* itemStaticText15 = new wxStaticText( itemDialog1, wxID_STATIC, _(
  191. "Messages :" ), wxDefaultPosition,
  192. wxDefaultSize, 0 );
  193. itemBoxSizer2->Add( itemStaticText15,
  194. 0,
  195. wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE,
  196. 5 );
  197. m_MsgBox = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T(
  198. "" ), wxDefaultPosition, wxSize( -1,
  199. 200 ), wxTE_MULTILINE );
  200. itemBoxSizer2->Add( m_MsgBox, 0, wxGROW | wxALL | wxFIXED_MINSIZE, 5 );
  201. // Set validators
  202. m_SizeOption->SetValidator( wxGenericValidator( &PS_SizeSelect ) );
  203. m_PlotPSColorOption->SetValidator( wxGenericValidator( &g_PlotPSColorOpt ) );
  204. m_Plot_Sheet_Ref->SetValidator( wxGenericValidator( &Plot_Sheet_Ref ) );
  205. ////@end WinEDA_PlotPSFrame content construction
  206. m_btClose->SetFocus();
  207. m_DefaultLineSizeCtrl = new WinEDA_ValueCtrl( this, _(
  208. "Default Line Width" ),
  209. g_PlotPSMinimunLineWidth,
  210. g_UnitMetric, m_DefaultLineSizeCtrlSizer,
  211. EESCHEMA_INTERNAL_UNIT );
  212. }
  213. /*!
  214. * Should we show tooltips?
  215. */
  216. bool WinEDA_PlotPSFrame::ShowToolTips()
  217. {
  218. return true;
  219. }
  220. /*!
  221. * Get bitmap resources
  222. */
  223. wxBitmap WinEDA_PlotPSFrame::GetBitmapResource( const wxString& name )
  224. {
  225. // Bitmap retrieval
  226. ////@begin WinEDA_PlotPSFrame bitmap retrieval
  227. wxUnusedVar( name );
  228. return wxNullBitmap;
  229. ////@end WinEDA_PlotPSFrame bitmap retrieval
  230. }
  231. /*!
  232. * Get icon resources
  233. */
  234. wxIcon WinEDA_PlotPSFrame::GetIconResource( const wxString& name )
  235. {
  236. // Icon retrieval
  237. ////@begin WinEDA_PlotPSFrame icon retrieval
  238. wxUnusedVar( name );
  239. return wxNullIcon;
  240. ////@end WinEDA_PlotPSFrame icon retrieval
  241. }
  242. /*!
  243. * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON
  244. */
  245. void WinEDA_PlotPSFrame::OnPlotPsCurrentExecuteClick( wxCommandEvent& event )
  246. {
  247. int Select_PlotAll = FALSE;
  248. InitOptVars();
  249. CreatePSFile( Select_PlotAll, PS_SizeSelect );
  250. m_MsgBox->AppendText( wxT( "*****\n" ) );
  251. }
  252. /*!
  253. * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON1
  254. */
  255. void WinEDA_PlotPSFrame::OnPlotPsAllExecuteClick( wxCommandEvent& event )
  256. {
  257. int Select_PlotAll = TRUE;
  258. InitOptVars();
  259. CreatePSFile( Select_PlotAll, PS_SizeSelect );
  260. m_MsgBox->AppendText( wxT( "*****\n" ) );
  261. }
  262. /*!
  263. * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
  264. */
  265. void WinEDA_PlotPSFrame::OnCancelClick( wxCommandEvent& event )
  266. {
  267. InitOptVars();
  268. EndModal( 0 );
  269. }
  270. /*****************************************/
  271. void WinEDA_PlotPSFrame::InitOptVars()
  272. /*****************************************/
  273. {
  274. Plot_Sheet_Ref = m_Plot_Sheet_Ref->GetValue();
  275. g_PlotPSColorOpt = m_PlotPSColorOption->GetSelection();
  276. PS_SizeSelect = m_SizeOption->GetSelection();
  277. g_PlotPSMinimunLineWidth = m_DefaultLineSizeCtrl->GetValue();
  278. if( g_PlotPSMinimunLineWidth < 1 )
  279. g_PlotPSMinimunLineWidth = 1;
  280. }
  281. /*************************************************************/
  282. void WinEDA_PlotPSFrame::CreatePSFile( int AllPages, int pagesize )
  283. /*************************************************************/
  284. {
  285. wxString PlotFileName, ShortFileName;
  286. BASE_SCREEN* screen;
  287. Ki_PageDescr* PlotSheet, * RealSheet;
  288. int BBox[4];
  289. wxPoint plot_offset;
  290. g_PlotFormat = PLOT_FORMAT_POST;
  291. /* Build the screen list */
  292. EDA_ScreenList ScreenList;
  293. if( AllPages == TRUE )
  294. screen = ScreenList.GetFirst();
  295. else
  296. screen = ActiveScreen;
  297. for( ; screen != NULL; screen = ScreenList.GetNext() )
  298. {
  299. PlotSheet = screen->m_CurrentSheetDesc;
  300. RealSheet = &g_Sheet_A4;
  301. if( pagesize == PAGE_SIZE_AUTO )
  302. RealSheet = PlotSheet;
  303. else if( pagesize == PAGE_SIZE_A )
  304. RealSheet = &g_Sheet_A;
  305. /* Calcul des limites de trace en 1/1000 pouce */
  306. BBox[0] = BBox[1] = g_PlotMargin; // Plot margin in 1/1000 inch
  307. BBox[2] = RealSheet->m_Size.x - g_PlotMargin;
  308. BBox[3] = RealSheet->m_Size.y - g_PlotMargin;
  309. /* Calcul des echelles de conversion */
  310. g_PlotScaleX = SCALE_PS *
  311. (float) (BBox[2] - BBox[0]) /
  312. PlotSheet->m_Size.x;
  313. g_PlotScaleY = SCALE_PS *
  314. (float) (BBox[3] - BBox[1]) /
  315. PlotSheet->m_Size.y;
  316. plot_offset.x = 0;
  317. plot_offset.y = PlotSheet->m_Size.y;
  318. wxSplitPath( screen->m_FileName.GetData(), (wxString*) NULL,
  319. &ShortFileName, (wxString*) NULL );
  320. wxString dirbuf = wxGetCwd() + STRING_DIR_SEP;
  321. if( !ShortFileName.IsEmpty() )
  322. PlotFileName = MakeFileName( dirbuf, ShortFileName, wxT( ".ps" ) );
  323. else
  324. PlotFileName = MakeFileName( dirbuf, g_DefaultSchematicFileName, wxT( ".ps" ) );
  325. PlotOneSheetPS( PlotFileName, screen, RealSheet, BBox, plot_offset );
  326. screen = (BASE_SCREEN*) screen->Pnext;
  327. if( AllPages == FALSE )
  328. break;
  329. }
  330. }
  331. /*****************************************************************************************/
  332. void WinEDA_PlotPSFrame::PlotOneSheetPS( const wxString& FileName,
  333. BASE_SCREEN* screen,
  334. Ki_PageDescr* sheet,
  335. int BBox[4],
  336. wxPoint plot_offset )
  337. /*****************************************************************************************/
  338. /* Trace en format PS. d'une feuille de dessin
  339. */
  340. {
  341. wxString Line;
  342. SCH_ITEM* DrawList;
  343. SCH_COMPONENT* DrawLibItem;
  344. int layer;
  345. wxPoint StartPos, EndPos;
  346. PlotOutput = wxFopen( FileName, wxT( "wt" ) );
  347. if( PlotOutput == NULL )
  348. {
  349. Line = wxT( "\n** " );
  350. Line += _( "Unable to create " ) + FileName + wxT( " **\n\n" );
  351. m_MsgBox->AppendText( Line );
  352. wxBell();
  353. return;
  354. }
  355. SetLocaleTo_C_standard( );
  356. Line.Printf( _( "Plot: %s\n" ), FileName.GetData() );
  357. m_MsgBox->AppendText( Line );
  358. InitPlotParametresPS( plot_offset, sheet, g_PlotScaleX, g_PlotScaleY );
  359. SetDefaultLineWidthPS( g_PlotPSMinimunLineWidth );
  360. /* Init : */
  361. PrintHeaderPS( PlotOutput, wxT( "EESchema-PS" ), FileName, 1, BBox, wxLANDSCAPE );
  362. InitPlotParametresPS( plot_offset, sheet, 1.0, 1.0 );
  363. if( m_Plot_Sheet_Ref->GetValue() )
  364. {
  365. if( (g_PlotFormat == PLOT_FORMAT_POST) && g_PlotPSColorOpt )
  366. SetColorMapPS( BLACK );
  367. PlotWorkSheet( PLOT_FORMAT_POST, screen );
  368. }
  369. DrawList = screen->EEDrawList;
  370. while( DrawList ) /* tracage */
  371. {
  372. Plume( 'U' );
  373. layer = LAYER_NOTES;
  374. switch( DrawList->Type() )
  375. {
  376. case DRAW_BUSENTRY_STRUCT_TYPE: /* Struct Raccord et Segment sont identiques */
  377. #undef STRUCT
  378. #define STRUCT ( (DrawBusEntryStruct*) DrawList )
  379. StartPos = STRUCT->m_Pos;
  380. EndPos = STRUCT->m_End();
  381. layer = STRUCT->GetLayer();
  382. case DRAW_SEGMENT_STRUCT_TYPE:
  383. #undef STRUCT
  384. #define STRUCT ( (EDA_DrawLineStruct*) DrawList )
  385. if( DrawList->Type() == DRAW_SEGMENT_STRUCT_TYPE )
  386. {
  387. StartPos = STRUCT->m_Start;
  388. EndPos = STRUCT->m_End;
  389. layer = STRUCT->GetLayer();
  390. }
  391. if( g_PlotPSColorOpt )
  392. SetColorMapPS( ReturnLayerColor( layer ) );
  393. switch( layer )
  394. {
  395. case LAYER_NOTES: /* Trace en pointilles */
  396. SetCurrentLineWidth( -1 );
  397. fprintf( PlotOutput, "[50 50] 0 setdash\n" );
  398. Move_Plume( StartPos, 'U' );
  399. Move_Plume( EndPos, 'D' );
  400. fprintf( PlotOutput, "[] 0 setdash\n" );
  401. break;
  402. case LAYER_BUS: /* Trait large */
  403. {
  404. fprintf( PlotOutput, "%d setlinewidth\n", g_PlotPSMinimunLineWidth * 3 );
  405. Move_Plume( StartPos, 'U' );
  406. Move_Plume( EndPos, 'D' );
  407. fprintf( PlotOutput, "%d setlinewidth\n", g_PlotPSMinimunLineWidth );
  408. }
  409. break;
  410. default:
  411. SetCurrentLineWidth( -1 );
  412. Move_Plume( StartPos, 'U' );
  413. Move_Plume( EndPos, 'D' );
  414. break;
  415. }
  416. break;
  417. case DRAW_JUNCTION_STRUCT_TYPE:
  418. #undef STRUCT
  419. #define STRUCT ( (DrawJunctionStruct*) DrawList )
  420. if( g_PlotPSColorOpt )
  421. SetColorMapPS( ReturnLayerColor( STRUCT->GetLayer() ) );
  422. PlotCercle( STRUCT->m_Pos, DRAWJUNCTION_SIZE, 1 );
  423. break;
  424. case TYPE_SCH_TEXT:
  425. case TYPE_SCH_LABEL:
  426. case TYPE_SCH_GLOBALLABEL:
  427. case TYPE_SCH_HIERLABEL:
  428. PlotTextStruct( DrawList );
  429. break;
  430. case TYPE_SCH_COMPONENT:
  431. DrawLibItem = (SCH_COMPONENT*) DrawList;
  432. PlotLibPart( DrawLibItem );
  433. break;
  434. case DRAW_PICK_ITEM_STRUCT_TYPE:
  435. break;
  436. case DRAW_POLYLINE_STRUCT_TYPE:
  437. break;
  438. case DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE:
  439. break;
  440. case DRAW_MARKER_STRUCT_TYPE:
  441. break;
  442. case DRAW_SHEET_STRUCT_TYPE:
  443. #undef STRUCT
  444. #define STRUCT ( (DrawSheetStruct*) DrawList )
  445. PlotSheetStruct( STRUCT );
  446. break;
  447. case DRAW_NOCONNECT_STRUCT_TYPE:
  448. #undef STRUCT
  449. #define STRUCT ( (DrawNoConnectStruct*) DrawList )
  450. if( g_PlotPSColorOpt )
  451. SetColorMapPS( ReturnLayerColor( LAYER_NOCONNECT ) );
  452. PlotNoConnectStruct( STRUCT );
  453. break;
  454. default:
  455. break;
  456. }
  457. Plume( 'U' );
  458. DrawList = DrawList->Next();
  459. }
  460. /* fin */
  461. CloseFilePS( PlotOutput );
  462. SetLocaleTo_Default( );
  463. m_MsgBox->AppendText( wxT( "Ok\n" ) );
  464. }
  465. /*!
  466. * wxEVT_INIT_DIALOG event handler for ID_DIALOG
  467. */
  468. void WinEDA_PlotPSFrame::OnInitDialog( wxInitDialogEvent& event )
  469. {
  470. // make the ESC work
  471. m_SizeOption->SetFocus();
  472. ////@begin wxEVT_INIT_DIALOG event handler for ID_DIALOG in WinEDA_PlotPSFrame.
  473. // Before editing this code, remove the block markers.
  474. event.Skip();
  475. ////@end wxEVT_INIT_DIALOG event handler for ID_DIALOG in WinEDA_PlotPSFrame.
  476. }