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.

115 lines
3.5 KiB

  1. /**********************************************************/
  2. /* Routines d'affichage de parametres et caracteristiques */
  3. /**********************************************************/
  4. #include "fctsys.h"
  5. #include "gr_basic.h"
  6. #include "common.h"
  7. #include "gerbview.h"
  8. #include "pcbplot.h"
  9. #include "protos.h"
  10. /* Routines locales */
  11. /****************************************************************************/
  12. void Affiche_Infos_PCB_Texte( WinEDA_BasePcbFrame* frame, TEXTE_PCB* pt_texte )
  13. /****************************************************************************/
  14. /* Affiche en bas d'ecran les caract du texte sur PCB
  15. * Entree :
  16. * pointeur de la description du texte
  17. */
  18. {
  19. wxString Line;
  20. frame->MsgPanel->EraseMsgBox();
  21. if( pt_texte->Type() == TYPECOTATION )
  22. Affiche_1_Parametre( frame, 1, _( "COTATION" ), pt_texte->m_Text, DARKGREEN );
  23. else
  24. Affiche_1_Parametre( frame, 1, _( "PCB Text" ), pt_texte->m_Text, DARKGREEN );
  25. Line = _( "Layer " );
  26. Line << pt_texte->GetLayer() + 1;
  27. Affiche_1_Parametre( frame, 28, _( "Layer:" ), Line,
  28. g_DesignSettings.m_LayerColor[pt_texte->GetLayer()] );
  29. Affiche_1_Parametre( frame, 36, _( "Mirror" ), wxEmptyString, GREEN );
  30. if( (pt_texte->m_Miroir & 1) )
  31. Affiche_1_Parametre( frame, -1, wxEmptyString, _( "No" ), DARKGREEN );
  32. else
  33. Affiche_1_Parametre( frame, -1, wxEmptyString, _( "Yes" ), DARKGREEN );
  34. Line.Printf( wxT( "%.1f" ), (float) pt_texte->m_Orient / 10 );
  35. Affiche_1_Parametre( frame, 43, _( "Orient" ), Line, DARKGREEN );
  36. valeur_param( pt_texte->m_Width, Line );
  37. Affiche_1_Parametre( frame, 50, _( "Width" ), Line, MAGENTA );
  38. valeur_param( pt_texte->m_Size.x, Line );
  39. Affiche_1_Parametre( frame, 60, _( "H Size" ), Line, RED );
  40. valeur_param( pt_texte->m_Size.y, Line );
  41. Affiche_1_Parametre( frame, 70, _( "V Size" ), Line, RED );
  42. }
  43. /*********************************************************************/
  44. void Affiche_Infos_Piste( WinEDA_BasePcbFrame* frame, TRACK* pt_piste )
  45. /*********************************************************************/
  46. /* Affiche les caract principales d'un segment de piste en bas d'ecran */
  47. {
  48. int d_index, ii = -1;
  49. D_CODE* pt_D_code;
  50. int layer = ((PCB_SCREEN*)(frame->GetScreen()))->m_Active_Layer;
  51. wxString msg;
  52. frame->MsgPanel->EraseMsgBox();
  53. d_index = pt_piste->GetNet();
  54. pt_D_code = ReturnToolDescr( layer, d_index, &ii );
  55. switch( pt_piste->Type() )
  56. {
  57. case TYPETRACK:
  58. if( pt_piste->m_Shape < S_SPOT_CIRCLE )
  59. msg = wxT( "LINE" );
  60. else
  61. msg = wxT( "FLASH" );
  62. break;
  63. case TYPEZONE:
  64. msg = wxT( "ZONE" ); break;
  65. default:
  66. msg = wxT( "????" ); break;
  67. }
  68. Affiche_1_Parametre( frame, 1, _( "Type" ), msg, DARKCYAN );
  69. msg.Printf( wxT( "%d" ), ii + 1 );
  70. Affiche_1_Parametre( frame, 10, _( "Tool" ), msg, RED );
  71. if( pt_D_code )
  72. {
  73. msg.Printf( wxT( "D%d" ), d_index );
  74. Affiche_1_Parametre( frame, 20, _( "D CODE" ), msg, BLUE );
  75. Affiche_1_Parametre( frame, 30, _( "D type" ),
  76. pt_D_code ? g_GERBER_Tool_Type[pt_D_code->m_Shape] : _( "????" ),
  77. BLUE );
  78. }
  79. msg.Printf( wxT( "%d" ), pt_piste->GetLayer() + 1 );
  80. Affiche_1_Parametre( frame, 40, _( "Layer" ), msg, BROWN );
  81. /* Affiche Epaisseur */
  82. valeur_param( (unsigned) (pt_piste->m_Width), msg );
  83. Affiche_1_Parametre( frame, 50, _( "Width" ), msg, DARKCYAN );
  84. }