Commit b1a8a074 authored by charras's avatar charras
Browse files

All: better look when displaying items info on messages panel

parent ccbce931
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -327,7 +327,7 @@ void LIB_TEXT::DisplayInfo( WinEDA_DrawFrame* frame )
    msg = ReturnStringFromValue( g_UnitMetric, m_Width,
    msg = ReturnStringFromValue( g_UnitMetric, m_Width,
                                 EESCHEMA_INTERNAL_UNIT, true );
                                 EESCHEMA_INTERNAL_UNIT, true );


    frame->MsgPanel->Affiche_1_Parametre( 20, _( "Line width" ), msg, BLUE );
    frame->MsgPanel->AppendMessage( _( "Line width" ), msg, BLUE );
}
}




+4 −3
Original line number Original line Diff line number Diff line
@@ -698,9 +698,10 @@ bool DrawSheetStruct::ChangeFileName( WinEDA_SchematicFrame* aFrame,
/***********************************************************/
/***********************************************************/
void DrawSheetStruct::DisplayInfo( WinEDA_DrawFrame* frame )
void DrawSheetStruct::DisplayInfo( WinEDA_DrawFrame* frame )
{
{
    frame->MsgPanel->EraseMsgBox();
    WinEDA_MsgPanel *msgpanel = frame->MsgPanel;
    Affiche_1_Parametre( frame, 1, _( "Name" ), m_SheetName, CYAN );
    msgpanel->EraseMsgBox();
    Affiche_1_Parametre( frame, 30, _( "FileName" ), m_FileName, BROWN );
    msgpanel->AppendMessage( _( "Name" ), m_SheetName, CYAN );
    msgpanel->AppendMessage( _( "FileName" ), m_FileName, BROWN );
}
}




+2 −2
Original line number Original line Diff line number Diff line
@@ -274,7 +274,7 @@ void WinEDA_LibeditFrame::SaveActiveLibrary( wxCommandEvent& event )
    {
    {
        msg = _( "Error while saving library file \"" ) + fn.GetFullPath() +
        msg = _( "Error while saving library file \"" ) + fn.GetFullPath() +
              _( "\"." );
              _( "\"." );
        MsgPanel->Affiche_1_Parametre( 1, wxT( "*** ERROR: ***" ), msg, RED );
        MsgPanel->AppendMessage( wxT( "*** ERROR: ***" ), msg, RED );
        DisplayError( this, msg );
        DisplayError( this, msg );
    }
    }
    else
    else
@@ -283,7 +283,7 @@ void WinEDA_LibeditFrame::SaveActiveLibrary( wxCommandEvent& event )
        fn.SetExt( DOC_EXT );
        fn.SetExt( DOC_EXT );
        wxString msg1 = _( "Document file \"" ) + fn.GetFullPath() +
        wxString msg1 = _( "Document file \"" ) + fn.GetFullPath() +
                        wxT( "\" Ok" );
                        wxT( "\" Ok" );
        MsgPanel->Affiche_1_Parametre( 1, msg, msg1, BLUE );
        MsgPanel->AppendMessage( msg, msg1, BLUE );
    }
    }
}
}


+11 −17
Original line number Original line Diff line number Diff line
@@ -572,19 +572,13 @@ bool BOARD::ComputeBoundaryBox()
// virtual, see pcbstruct.h
// virtual, see pcbstruct.h
void BOARD::DisplayInfo( WinEDA_DrawFrame* frame )
void BOARD::DisplayInfo( WinEDA_DrawFrame* frame )
{
{
/* Affiche l'etat du PCB : nb de pads, nets , connexions.. */
    /* Display board statistics: pads, nets, connections.. count
#define POS_AFF_NBPADS      1
    */
#define POS_AFF_NBVIAS      8
#define POS_AFF_NBNODES     16
#define POS_AFF_NBNETS      24
#define POS_AFF_NBLINKS     32
#define POS_AFF_NBCONNECT   40
#define POS_AFF_NBNOCONNECT 48


    wxString txt;
    wxString txt;


    frame->MsgPanel->EraseMsgBox();
    WinEDA_MsgPanel *msgpanel = frame->MsgPanel;

    msgpanel->EraseMsgBox();


    int viasCount = 0;
    int viasCount = 0;
    for( BOARD_ITEM* item = m_Track;  item;  item = item->Next() )
    for( BOARD_ITEM* item = m_Track;  item;  item = item->Next() )
@@ -594,16 +588,16 @@ void BOARD::DisplayInfo( WinEDA_DrawFrame* frame )
    }
    }


    txt.Printf( wxT( "%d" ), GetPadsCount() );
    txt.Printf( wxT( "%d" ), GetPadsCount() );
    Affiche_1_Parametre( frame, POS_AFF_NBPADS, _( "Pads" ), txt, DARKGREEN );
    msgpanel->AppendMessage( _( "Pads" ), txt, DARKGREEN );


    txt.Printf( wxT( "%d" ), viasCount );
    txt.Printf( wxT( "%d" ), viasCount );
    Affiche_1_Parametre( frame, POS_AFF_NBVIAS, _( "Vias" ), txt, DARKGREEN );
    msgpanel->AppendMessage( _( "Vias" ), txt, DARKGREEN );


    txt.Printf( wxT( "%d" ), GetNodesCount() );
    txt.Printf( wxT( "%d" ), GetNodesCount() );
    Affiche_1_Parametre( frame, POS_AFF_NBNODES, _( "Nodes" ), txt, DARKCYAN );
    msgpanel->AppendMessage( _( "Nodes" ), txt, DARKCYAN );


    txt.Printf( wxT( "%d" ), m_NetInfo->GetCount() );
    txt.Printf( wxT( "%d" ), m_NetInfo->GetCount() );
    Affiche_1_Parametre( frame, POS_AFF_NBNETS, _( "Nets" ), txt, RED );
    msgpanel->AppendMessage( _( "Nets" ), txt, RED );


    /* These parameters are known only if the full ratsnest is available,
    /* These parameters are known only if the full ratsnest is available,
     *  so, display them only if this is the case
     *  so, display them only if this is the case
@@ -611,13 +605,13 @@ void BOARD::DisplayInfo( WinEDA_DrawFrame* frame )
    if( (m_Status_Pcb & NET_CODES_OK) )
    if( (m_Status_Pcb & NET_CODES_OK) )
    {
    {
        txt.Printf( wxT( "%d" ), GetRatsnestsCount() );
        txt.Printf( wxT( "%d" ), GetRatsnestsCount() );
        Affiche_1_Parametre( frame, POS_AFF_NBLINKS, _( "Links" ), txt, DARKGREEN );
        msgpanel->AppendMessage( _( "Links" ), txt, DARKGREEN );


        txt.Printf( wxT( "%d" ), GetRatsnestsCount() - GetNoconnectCount() );
        txt.Printf( wxT( "%d" ), GetRatsnestsCount() - GetNoconnectCount() );
        Affiche_1_Parametre( frame, POS_AFF_NBCONNECT, _( "Connect" ), txt, DARKGREEN );
        msgpanel->AppendMessage( _( "Connect" ), txt, DARKGREEN );


        txt.Printf( wxT( "%d" ), GetNoconnectCount() );
        txt.Printf( wxT( "%d" ), GetNoconnectCount() );
        Affiche_1_Parametre( frame, POS_AFF_NBNOCONNECT, _( "NoConn" ), txt, BLUE );
        msgpanel->AppendMessage( _( "NoConn" ), txt, BLUE );
    }
    }
}
}


+13 −13
Original line number Original line Diff line number Diff line
@@ -362,33 +362,34 @@ void DRAWSEGMENT::DisplayInfo( WinEDA_DrawFrame* frame )
    BOARD*   board = (BOARD*) m_Parent;
    BOARD*   board = (BOARD*) m_Parent;
    wxASSERT( board );
    wxASSERT( board );


    frame->MsgPanel->EraseMsgBox();
    WinEDA_MsgPanel *msgpanel = frame->MsgPanel;
    msgpanel->EraseMsgBox();


    itype = m_Type & 0x0F;
    itype = m_Type & 0x0F;


    msg = wxT( "DRAWING" );
    msg = wxT( "DRAWING" );


    Affiche_1_Parametre( frame, 1, _( "Type" ), msg, DARKCYAN );
    msgpanel->AppendMessage( _( "Type" ), msg, DARKCYAN );


    wxString    shape = _( "Shape" );
    wxString    shape = _( "Shape" );


    switch( m_Shape ) {
    switch( m_Shape ) {
        case S_CIRCLE:
        case S_CIRCLE:
            Affiche_1_Parametre( frame, 10, shape, _( "Circle" ), RED );
            msgpanel->AppendMessage( shape, _( "Circle" ), RED );
            break;
            break;


        case S_ARC:
        case S_ARC:
            Affiche_1_Parametre( frame, 10, shape, _( "Arc" ), RED );
            msgpanel->AppendMessage( shape, _( "Arc" ), RED );


            msg.Printf( wxT( "%d.%d" ), m_Angle/10, m_Angle % 10 );
            msg.Printf( wxT( "%1." ), (float)m_Angle/10 );
            Affiche_1_Parametre( frame, 18, _("Angle"), msg, RED );
            msgpanel->AppendMessage( _("Angle"), msg, RED );
            break;
            break;
        case S_CURVE:
        case S_CURVE:
            Affiche_1_Parametre( frame, 10, shape, _( "Curve" ), RED );
            msgpanel->AppendMessage( shape, _( "Curve" ), RED );
            break;
            break;


        default:
        default:
            Affiche_1_Parametre( frame, 10, shape, _( "Segment" ), RED );
            msgpanel->AppendMessage( shape, _( "Segment" ), RED );
    }
    }
    wxString start;
    wxString start;
    start << GetStart();
    start << GetStart();
@@ -396,14 +397,13 @@ void DRAWSEGMENT::DisplayInfo( WinEDA_DrawFrame* frame )
    wxString end;
    wxString end;
    end << GetEnd();
    end << GetEnd();


    Affiche_1_Parametre( frame, 22, start, end, BLACK );
    msgpanel->AppendMessage( start, end, DARKGREEN );


    Affiche_1_Parametre( frame, 36, _( "Layer" ),
    msgpanel->AppendMessage( _( "Layer" ),
                         board->GetLayerName( m_Layer ), BROWN );
                         board->GetLayerName( m_Layer ), DARKBROWN );


    valeur_param( (unsigned) m_Width, msg );
    valeur_param( (unsigned) m_Width, msg );

    msgpanel->AppendMessage( _( "Width" ), msg, DARKCYAN );
    Affiche_1_Parametre( frame, 50, _( "Width" ), msg, DARKCYAN );
}
}




Loading