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.

191 lines
4.9 KiB

  1. /**********************************************************/
  2. /* Routines d'affichage de parametres et caracteristiques */
  3. /**********************************************************/
  4. /* Fichier AFFICHE.CPP */
  5. #include "fctsys.h"
  6. #include "gr_basic.h"
  7. #include "common.h"
  8. #include "program.h"
  9. #include "libcmp.h"
  10. #include "general.h"
  11. #include "protos.h"
  12. #include "schframe.h"
  13. /***********************************************************/
  14. void DrawSheetStruct::Display_Infos( WinEDA_DrawFrame* frame )
  15. /************************************************************/
  16. {
  17. frame->MsgPanel->EraseMsgBox();
  18. Affiche_1_Parametre( frame, 1, _( "Name" ), m_SheetName, CYAN );
  19. Affiche_1_Parametre( frame, 30, _( "FileName" ), m_FileName, BROWN );
  20. }
  21. /***************************************************************/
  22. void EDA_SchComponentStruct::Display_Infos( WinEDA_DrawFrame* frame )
  23. /***************************************************************/
  24. {
  25. EDA_LibComponentStruct* Entry = FindLibPart( m_ChipName.GetData(), wxEmptyString, FIND_ROOT );;
  26. wxString msg;
  27. frame->MsgPanel->EraseMsgBox();
  28. Affiche_1_Parametre( frame, 1, _( "Ref" ),
  29. GetRef(((WinEDA_SchematicFrame*)frame)->GetSheet()), DARKCYAN );
  30. if( Entry && Entry->m_Options == ENTRY_POWER )
  31. msg = _( "Pwr Symb" );
  32. else
  33. msg = _( "Val" );
  34. Affiche_1_Parametre( frame, 10, msg, m_Field[VALUE].m_Text, DARKCYAN );
  35. Affiche_1_Parametre( frame, 28, _( "RefLib" ), m_ChipName.GetData(), BROWN );
  36. msg = FindLibName;
  37. Affiche_1_Parametre( frame, 40, _( "Lib" ), msg, DARKRED );
  38. if( Entry )
  39. {
  40. Affiche_1_Parametre( frame, 52, Entry->m_Doc, wxEmptyString, DARKCYAN );
  41. Affiche_1_Parametre( frame, 52, wxEmptyString, Entry->m_KeyWord, DARKGREEN );
  42. }
  43. }
  44. /*******************************************************/
  45. void LibDrawPin::Display_Infos( WinEDA_DrawFrame* frame )
  46. /*******************************************************/
  47. /* Affiche en bas d'ecran les caracteristiques de la pin
  48. */
  49. {
  50. wxString Text;
  51. int ii;
  52. frame->MsgPanel->EraseMsgBox();
  53. /* Affichage du nom */
  54. Affiche_1_Parametre( frame, 24, _( "PinName" ), m_PinName, DARKCYAN );
  55. /* Affichage du numero */
  56. if( m_PinNum == 0 )
  57. Text = wxT( "?" );
  58. else
  59. ReturnPinStringNum( Text );
  60. Affiche_1_Parametre( frame, 40, _( "PinNum" ), Text, DARKCYAN );
  61. /* Affichage du type */
  62. ii = m_PinType;
  63. Affiche_1_Parametre( frame, 48, _( "PinType" ), MsgPinElectricType[ii], RED );
  64. /* Affichage de la visiblite */
  65. ii = m_Attributs;
  66. if( ii & 1 )
  67. Text = _( "no" );
  68. else
  69. Text = _( "yes" );
  70. Affiche_1_Parametre( frame, 58, _( "Display" ), Text, DARKGREEN );
  71. /* Affichage de la longueur */
  72. Text.Printf( wxT( "%d" ), m_PinLen );
  73. Affiche_1_Parametre( frame, 66, _( "Lengh" ), Text, MAGENTA );
  74. /* Affichage de l'orientation */
  75. switch( m_Orient )
  76. {
  77. case PIN_UP:
  78. Text = _( "Up" ); break;
  79. case PIN_DOWN:
  80. Text = _( "Down" ); break;
  81. case PIN_LEFT:
  82. Text = _( "Left" ); break;
  83. case PIN_RIGHT:
  84. Text = _( "Right" ); break;
  85. default:
  86. Text = wxT( "??" ); break;
  87. }
  88. Affiche_1_Parametre( frame, 72, _( "Orient" ), Text, MAGENTA );
  89. }
  90. /***********************************************************************/
  91. void LibEDA_BaseStruct::Display_Infos_DrawEntry( WinEDA_DrawFrame* frame )
  92. /***********************************************************************/
  93. /* Affiche en bas d'ecran les caracteristiques de l'element
  94. */
  95. {
  96. wxString msg;
  97. frame->MsgPanel->EraseMsgBox();
  98. /* affichage du type */
  99. msg = wxT( "??" );
  100. switch( Type() )
  101. {
  102. case COMPONENT_ARC_DRAW_TYPE:
  103. msg = wxT( "Arc" ); break;
  104. case COMPONENT_CIRCLE_DRAW_TYPE:
  105. msg = wxT( "Circle" ); break;
  106. case COMPONENT_GRAPHIC_TEXT_DRAW_TYPE:
  107. msg = wxT( "Text" ); break;
  108. case COMPONENT_RECT_DRAW_TYPE:
  109. msg = wxT( "Rect" ); break;
  110. case COMPONENT_POLYLINE_DRAW_TYPE:
  111. msg = wxT( "PolyLine" ); break;
  112. case COMPONENT_LINE_DRAW_TYPE:
  113. msg = wxT( "Segment" ); break;
  114. case COMPONENT_PIN_DRAW_TYPE:
  115. ( (LibDrawPin*) this )->Display_Infos( frame );
  116. msg = wxT( "Pin" );
  117. break;
  118. default:
  119. ;
  120. }
  121. Affiche_1_Parametre( frame, 1, wxT( "Type" ), msg, CYAN );
  122. /* Affichage de l'appartenance */
  123. if( m_Unit == 0 )
  124. msg = _( "All" );
  125. else
  126. msg.Printf( wxT( "%d" ), m_Unit );
  127. Affiche_1_Parametre( frame, 10, _( "Unit" ), msg, BROWN );
  128. if( m_Convert == 0 )
  129. msg = _( "All" );
  130. else if( m_Convert == 1 )
  131. msg = _( "no" );
  132. else if( m_Convert == 2 )
  133. msg = _( "yes" );
  134. else
  135. msg = wxT( "?" );
  136. Affiche_1_Parametre( frame, 16, _( "Convert" ), msg, BROWN );
  137. if( m_Width )
  138. valeur_param( m_Width, msg );
  139. else
  140. msg = _( "default" );
  141. Affiche_1_Parametre( frame, 24, _( "Width" ), msg, BLUE );
  142. }