2007-08-24 15:10:46 +00:00
|
|
|
/**********************************************************/
|
|
|
|
/* Routines d'affichage de parametres et caracteristiques */
|
|
|
|
/**********************************************************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-08-24 15:10:46 +00:00
|
|
|
/* Fichier AFFICHE.CPP */
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#include "fctsys.h"
|
|
|
|
#include "gr_basic.h"
|
|
|
|
#include "common.h"
|
|
|
|
#include "program.h"
|
|
|
|
#include "libcmp.h"
|
|
|
|
#include "general.h"
|
|
|
|
|
|
|
|
#include "protos.h"
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************/
|
2007-08-24 15:10:46 +00:00
|
|
|
void DrawSheetStruct::Display_Infos( WinEDA_DrawFrame* frame )
|
2007-06-05 12:10:51 +00:00
|
|
|
/************************************************************/
|
|
|
|
{
|
2007-08-24 15:10:46 +00:00
|
|
|
frame->MsgPanel->EraseMsgBox();
|
|
|
|
Affiche_1_Parametre( frame, 1, _( "Name" ), m_SheetName, CYAN );
|
|
|
|
Affiche_1_Parametre( frame, 30, _( "FileName" ), m_FileName, BROWN );
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
|
|
|
|
2007-08-24 15:10:46 +00:00
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
/***************************************************************/
|
2008-03-20 01:50:21 +00:00
|
|
|
void SCH_COMPONENT::Display_Infos( WinEDA_DrawFrame* frame )
|
2007-06-05 12:10:51 +00:00
|
|
|
/***************************************************************/
|
|
|
|
{
|
2007-08-24 15:10:46 +00:00
|
|
|
EDA_LibComponentStruct* Entry = FindLibPart( m_ChipName.GetData(), wxEmptyString, FIND_ROOT );;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-08-24 15:10:46 +00:00
|
|
|
wxString msg;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-08-24 15:10:46 +00:00
|
|
|
frame->MsgPanel->EraseMsgBox();
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-08-24 15:10:46 +00:00
|
|
|
Affiche_1_Parametre( frame, 1, _( "Ref" ),
|
2008-03-20 01:50:21 +00:00
|
|
|
GetRef(((WinEDA_SchematicFrame*)frame)->GetSheet()), DARKCYAN );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-08-24 15:10:46 +00:00
|
|
|
if( Entry && Entry->m_Options == ENTRY_POWER )
|
|
|
|
msg = _( "Pwr Symb" );
|
|
|
|
else
|
|
|
|
msg = _( "Val" );
|
2008-10-06 05:44:29 +00:00
|
|
|
|
|
|
|
Affiche_1_Parametre( frame, 10, msg, GetField(VALUE)->m_Text, DARKCYAN );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-08-24 15:10:46 +00:00
|
|
|
Affiche_1_Parametre( frame, 28, _( "RefLib" ), m_ChipName.GetData(), BROWN );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-08-24 15:10:46 +00:00
|
|
|
msg = FindLibName;
|
|
|
|
Affiche_1_Parametre( frame, 40, _( "Lib" ), msg, DARKRED );
|
|
|
|
|
|
|
|
if( Entry )
|
|
|
|
{
|
2008-04-17 08:33:27 +00:00
|
|
|
Affiche_1_Parametre( frame, 52, Entry->m_Doc, Entry->m_KeyWord, DARKCYAN );
|
2007-08-24 15:10:46 +00:00
|
|
|
}
|
|
|
|
}
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*******************************************************/
|
2007-08-24 15:10:46 +00:00
|
|
|
void LibDrawPin::Display_Infos( WinEDA_DrawFrame* frame )
|
2007-06-05 12:10:51 +00:00
|
|
|
/*******************************************************/
|
2007-08-24 15:10:46 +00:00
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
/* Affiche en bas d'ecran les caracteristiques de la pin
|
2007-08-24 15:10:46 +00:00
|
|
|
*/
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2007-08-24 15:10:46 +00:00
|
|
|
wxString Text;
|
|
|
|
int ii;
|
|
|
|
|
|
|
|
frame->MsgPanel->EraseMsgBox();
|
|
|
|
|
|
|
|
/* Affichage du nom */
|
2008-09-05 19:02:39 +00:00
|
|
|
Affiche_1_Parametre( frame, 30, _( "PinName" ), m_PinName, DARKCYAN );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-08-24 15:10:46 +00:00
|
|
|
/* Affichage du numero */
|
|
|
|
if( m_PinNum == 0 )
|
|
|
|
Text = wxT( "?" );
|
|
|
|
else
|
|
|
|
ReturnPinStringNum( Text );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2008-09-05 19:02:39 +00:00
|
|
|
Affiche_1_Parametre( frame, 38, _( "PinNum" ), Text, DARKCYAN );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-08-24 15:10:46 +00:00
|
|
|
/* Affichage du type */
|
|
|
|
ii = m_PinType;
|
2008-09-05 19:02:39 +00:00
|
|
|
Affiche_1_Parametre( frame, 44, _( "PinType" ), MsgPinElectricType[ii], RED );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-08-24 15:10:46 +00:00
|
|
|
/* Affichage de la visiblite */
|
|
|
|
ii = m_Attributs;
|
|
|
|
if( ii & 1 )
|
|
|
|
Text = _( "no" );
|
|
|
|
else
|
|
|
|
Text = _( "yes" );
|
2008-09-05 19:02:39 +00:00
|
|
|
Affiche_1_Parametre( frame, 50, _( "Display" ), Text, DARKGREEN );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2008-09-05 19:02:39 +00:00
|
|
|
/* Display pin length */
|
2008-09-09 11:32:21 +00:00
|
|
|
Text = ReturnStringFromValue( g_UnitMetric, m_PinLen, EESCHEMA_INTERNAL_UNIT, true );
|
2008-09-05 19:02:39 +00:00
|
|
|
Affiche_1_Parametre( frame, 56, _( "Length" ), Text, MAGENTA );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-08-24 15:10:46 +00:00
|
|
|
/* Affichage de l'orientation */
|
|
|
|
switch( m_Orient )
|
|
|
|
{
|
|
|
|
case PIN_UP:
|
|
|
|
Text = _( "Up" ); break;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-08-24 15:10:46 +00:00
|
|
|
case PIN_DOWN:
|
|
|
|
Text = _( "Down" ); break;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-08-24 15:10:46 +00:00
|
|
|
case PIN_LEFT:
|
|
|
|
Text = _( "Left" ); break;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-08-24 15:10:46 +00:00
|
|
|
case PIN_RIGHT:
|
|
|
|
Text = _( "Right" ); break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
Text = wxT( "??" ); break;
|
|
|
|
}
|
|
|
|
|
2008-09-05 19:02:39 +00:00
|
|
|
Affiche_1_Parametre( frame, 62, _( "Orient" ), Text, MAGENTA );
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************/
|
2007-08-24 15:10:46 +00:00
|
|
|
void LibEDA_BaseStruct::Display_Infos_DrawEntry( WinEDA_DrawFrame* frame )
|
2007-06-05 12:10:51 +00:00
|
|
|
/***********************************************************************/
|
2007-08-24 15:10:46 +00:00
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
/* Affiche en bas d'ecran les caracteristiques de l'element
|
2007-08-24 15:10:46 +00:00
|
|
|
*/
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2007-08-24 15:10:46 +00:00
|
|
|
wxString msg;
|
|
|
|
|
|
|
|
frame->MsgPanel->EraseMsgBox();
|
|
|
|
|
|
|
|
/* affichage du type */
|
|
|
|
msg = wxT( "??" );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-09-01 12:00:30 +00:00
|
|
|
switch( Type() )
|
2007-08-24 15:10:46 +00:00
|
|
|
{
|
|
|
|
case COMPONENT_ARC_DRAW_TYPE:
|
|
|
|
msg = wxT( "Arc" ); break;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-08-24 15:10:46 +00:00
|
|
|
case COMPONENT_CIRCLE_DRAW_TYPE:
|
|
|
|
msg = wxT( "Circle" ); break;
|
|
|
|
|
|
|
|
case COMPONENT_GRAPHIC_TEXT_DRAW_TYPE:
|
|
|
|
msg = wxT( "Text" ); break;
|
|
|
|
|
|
|
|
case COMPONENT_RECT_DRAW_TYPE:
|
|
|
|
msg = wxT( "Rect" ); break;
|
|
|
|
|
|
|
|
case COMPONENT_POLYLINE_DRAW_TYPE:
|
|
|
|
msg = wxT( "PolyLine" ); break;
|
|
|
|
|
|
|
|
case COMPONENT_LINE_DRAW_TYPE:
|
|
|
|
msg = wxT( "Segment" ); break;
|
|
|
|
|
|
|
|
case COMPONENT_PIN_DRAW_TYPE:
|
|
|
|
( (LibDrawPin*) this )->Display_Infos( frame );
|
|
|
|
msg = wxT( "Pin" );
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
;
|
|
|
|
}
|
|
|
|
|
|
|
|
Affiche_1_Parametre( frame, 1, wxT( "Type" ), msg, CYAN );
|
|
|
|
|
|
|
|
|
|
|
|
/* Affichage de l'appartenance */
|
|
|
|
if( m_Unit == 0 )
|
|
|
|
msg = _( "All" );
|
|
|
|
else
|
|
|
|
msg.Printf( wxT( "%d" ), m_Unit );
|
2008-09-05 19:02:39 +00:00
|
|
|
Affiche_1_Parametre( frame, 8, _( "Unit" ), msg, BROWN );
|
2007-08-24 15:10:46 +00:00
|
|
|
|
|
|
|
if( m_Convert == 0 )
|
|
|
|
msg = _( "All" );
|
|
|
|
else if( m_Convert == 1 )
|
|
|
|
msg = _( "no" );
|
|
|
|
else if( m_Convert == 2 )
|
|
|
|
msg = _( "yes" );
|
|
|
|
else
|
|
|
|
msg = wxT( "?" );
|
2008-09-05 19:02:39 +00:00
|
|
|
Affiche_1_Parametre( frame, 14, _( "Convert" ), msg, BROWN );
|
2007-08-24 15:10:46 +00:00
|
|
|
|
|
|
|
if( m_Width )
|
2008-09-09 11:32:21 +00:00
|
|
|
msg = ReturnStringFromValue( g_UnitMetric, m_Width, EESCHEMA_INTERNAL_UNIT, true );
|
2007-08-24 15:10:46 +00:00
|
|
|
else
|
|
|
|
msg = _( "default" );
|
2008-09-05 19:02:39 +00:00
|
|
|
Affiche_1_Parametre( frame, 20, _( "Width" ), msg, BLUE );
|
2007-08-24 15:10:46 +00:00
|
|
|
}
|