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.

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