Loading change_log.txt +3 −0 Original line number Original line Diff line number Diff line Loading @@ -13,6 +13,9 @@ email address. added EDA_BaseStruct::DeleteStructList() added EDA_BaseStruct::DeleteStructList() deleted gerbview/struct.cpp, pcbnew/struct.cpp, deleted gerbview/struct.cpp, pcbnew/struct.cpp, BOARD::~BOARD() now deletes objects that it owns. BOARD::~BOARD() now deletes objects that it owns. Collectors now finds MARQUEURs also added MARQUEURS::Display_Infos() added MARQUEURS::HitTest() 2007-Oct-2 UPDATE Dick Hollenbeck <dick@softplc.com> 2007-Oct-2 UPDATE Dick Hollenbeck <dick@softplc.com> Loading common/base_screen.cpp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -190,6 +190,7 @@ void BASE_SCREEN::SetZoomList( int* zoomlist ) // Init liste // Init liste if( m_ZoomList ) if( m_ZoomList ) free( m_ZoomList ); free( m_ZoomList ); m_ZoomList = (int*) MyZMalloc( nbitems * sizeof( int) ); m_ZoomList = (int*) MyZMalloc( nbitems * sizeof( int) ); for( ii = 0, zoom = zoomlist; ii < nbitems; zoom++, ii++ ) for( ii = 0, zoom = zoomlist; ii < nbitems; zoom++, ii++ ) Loading common/msgpanel.cpp +92 −91 Original line number Original line Diff line number Diff line Loading @@ -19,7 +19,6 @@ BEGIN_EVENT_TABLE(WinEDA_MsgPanel, wxPanel) END_EVENT_TABLE() END_EVENT_TABLE() /***********************************************************/ /***********************************************************/ /* Fonctions de base de WinEDA_MsgPanel: l'ecran de messages */ /* Fonctions de base de WinEDA_MsgPanel: l'ecran de messages */ /***********************************************************/ /***********************************************************/ Loading @@ -33,13 +32,11 @@ WinEDA_MsgPanel::WinEDA_MsgPanel(WinEDA_DrawFrame *parent, int id, } } WinEDA_MsgPanel::~WinEDA_MsgPanel() WinEDA_MsgPanel::~WinEDA_MsgPanel() { { } } /*************************************************/ /*************************************************/ void WinEDA_MsgPanel::OnPaint( wxPaintEvent& event ) void WinEDA_MsgPanel::OnPaint( wxPaintEvent& event ) /*************************************************/ /*************************************************/ Loading @@ -50,33 +47,34 @@ wxPaintDC dc(this); } } /*****************************************************************************/ /*****************************************************************************/ void WinEDA_MsgPanel::Affiche_1_Parametre( int pos_X, const wxString& texte_H, void WinEDA_MsgPanel::Affiche_1_Parametre( int pos_X, const wxString& texte_H, const wxString& texte_L, int color ) const wxString& texte_L, int color ) /*****************************************************************************/ /*****************************************************************************/ /* /* Routine d'affichage d'un parametre. * Routine d'affichage d'un parametre. pos_X = cadrage horizontal * pos_X = cadrage horizontal si pos_X < 0 : la position horizontale est la derniere * si pos_X < 0 : la position horizontale est la derniere valeur demandee >= 0 * valeur demandee >= 0 texte_H = texte a afficher en ligne superieure. * texte_H = texte a afficher en ligne superieure. si "", par d'affichage sur cette ligne * si "", par d'affichage sur cette ligne texte_L = texte a afficher en ligne inferieure. * texte_L = texte a afficher en ligne inferieure. si "", par d'affichage sur cette ligne * si "", par d'affichage sur cette ligne color = couleur d'affichage * color = couleur d'affichage */ */ { { static int old_pos_X; static int old_pos_X; wxPoint pos; wxPoint pos; wxSize FontSizeInPixels, DrawSize; wxSize FontSizeInPixels, DrawSize; wxClientDC dc( this ); wxClientDC dc( this ); DrawSize = GetClientSize(); DrawSize = GetClientSize(); dc.SetBackground( *wxBLACK_BRUSH ); dc.SetBackground( *wxBLACK_BRUSH ); dc.SetBackgroundMode( wxSOLID ); dc.SetBackgroundMode( wxSOLID ); // dc.SetBackgroundMode(wxTRANSPARENT); // dc.SetBackgroundMode(wxTRANSPARENT); dc.SetTextBackground( GetBackgroundColour() ); dc.SetTextBackground( GetBackgroundColour() ); dc.SetFont( *g_MsgFont ); dc.SetFont( *g_MsgFont ); Loading @@ -94,14 +92,15 @@ wxClientDC dc(this); { { old_pos_X = pos.x = pos_X * (FontSizeInPixels.x + 2); old_pos_X = pos.x = pos_X * (FontSizeInPixels.x + 2); } } else pos.x = old_pos_X; else pos.x = old_pos_X; if( !texte_H.IsEmpty() ) if( !texte_H.IsEmpty() ) { { pos.y = (DrawSize.y / 2) - FontSizeInPixels.y;; pos.y = (DrawSize.y / 2) - FontSizeInPixels.y;; dc.DrawText( texte_H.GetData(), pos.x, pos.y ); dc.DrawText( texte_H.GetData(), pos.x, pos.y ); } } if( !texte_L.IsEmpty() ) if( !texte_L.IsEmpty() ) { { pos.y = DrawSize.y - FontSizeInPixels.y; pos.y = DrawSize.y - FontSizeInPixels.y; Loading @@ -109,16 +108,20 @@ wxClientDC dc(this); } } } } /****************************************/ /****************************************/ void WinEDA_MsgPanel::EraseMsgBox() void WinEDA_MsgPanel::EraseMsgBox() /****************************************/ /****************************************/ /* Effacement de la fenetre d'affichage des messages de bas d'ecran /* Effacement de la fenetre d'affichage des messages de bas d'ecran */ */ { { wxClientDC dc( this ); wxClientDC dc( this ); EraseMsgBox( &dc ); EraseMsgBox( &dc ); } } /*******************************************/ /*******************************************/ void WinEDA_MsgPanel::EraseMsgBox( wxDC* DC ) void WinEDA_MsgPanel::EraseMsgBox( wxDC* DC ) /*******************************************/ /*******************************************/ Loading @@ -140,5 +143,3 @@ wxBrush brush; DC->SetBrush( wxNullBrush ); DC->SetBrush( wxNullBrush ); DC->SetPen( wxNullPen ); DC->SetPen( wxNullPen ); } } include/pcbstruct.h +17 −0 Original line number Original line Diff line number Diff line Loading @@ -448,6 +448,23 @@ public: ~MARQUEUR(); ~MARQUEUR(); void UnLink(); void UnLink(); void Draw( WinEDA_DrawPanel* panel, wxDC* DC, int DrawMode ); void Draw( WinEDA_DrawPanel* panel, wxDC* DC, int DrawMode ); /** * Function Display_Infos * has knowledge about the frame and how and where to put status information * about this object into the frame's message panel. * @param frame A WinEDA_DrawFrame in which to print status information. */ void Display_Infos( WinEDA_DrawFrame* frame ); /** * Function HitTest * tests if the given wxPoint is within the bounds of this object. * @param ref_pos A wxPoint to test * @return bool - true if a hit, else false */ bool HitTest( const wxPoint& ref_pos ); }; }; Loading pcbnew/class_board_item.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -179,7 +179,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const break; break; case TYPEMARQUEUR: case TYPEMARQUEUR: text << _( "Marker" ); text << _( "Marker" ) << wxT( " @(" ) << ((MARQUEUR*)item)->m_Pos.x << wxT(",") << ((MARQUEUR*)item)->m_Pos.y << wxT(")"); break; break; case TYPECOTATION: case TYPECOTATION: Loading Loading
change_log.txt +3 −0 Original line number Original line Diff line number Diff line Loading @@ -13,6 +13,9 @@ email address. added EDA_BaseStruct::DeleteStructList() added EDA_BaseStruct::DeleteStructList() deleted gerbview/struct.cpp, pcbnew/struct.cpp, deleted gerbview/struct.cpp, pcbnew/struct.cpp, BOARD::~BOARD() now deletes objects that it owns. BOARD::~BOARD() now deletes objects that it owns. Collectors now finds MARQUEURs also added MARQUEURS::Display_Infos() added MARQUEURS::HitTest() 2007-Oct-2 UPDATE Dick Hollenbeck <dick@softplc.com> 2007-Oct-2 UPDATE Dick Hollenbeck <dick@softplc.com> Loading
common/base_screen.cpp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -190,6 +190,7 @@ void BASE_SCREEN::SetZoomList( int* zoomlist ) // Init liste // Init liste if( m_ZoomList ) if( m_ZoomList ) free( m_ZoomList ); free( m_ZoomList ); m_ZoomList = (int*) MyZMalloc( nbitems * sizeof( int) ); m_ZoomList = (int*) MyZMalloc( nbitems * sizeof( int) ); for( ii = 0, zoom = zoomlist; ii < nbitems; zoom++, ii++ ) for( ii = 0, zoom = zoomlist; ii < nbitems; zoom++, ii++ ) Loading
common/msgpanel.cpp +92 −91 Original line number Original line Diff line number Diff line Loading @@ -19,7 +19,6 @@ BEGIN_EVENT_TABLE(WinEDA_MsgPanel, wxPanel) END_EVENT_TABLE() END_EVENT_TABLE() /***********************************************************/ /***********************************************************/ /* Fonctions de base de WinEDA_MsgPanel: l'ecran de messages */ /* Fonctions de base de WinEDA_MsgPanel: l'ecran de messages */ /***********************************************************/ /***********************************************************/ Loading @@ -33,13 +32,11 @@ WinEDA_MsgPanel::WinEDA_MsgPanel(WinEDA_DrawFrame *parent, int id, } } WinEDA_MsgPanel::~WinEDA_MsgPanel() WinEDA_MsgPanel::~WinEDA_MsgPanel() { { } } /*************************************************/ /*************************************************/ void WinEDA_MsgPanel::OnPaint( wxPaintEvent& event ) void WinEDA_MsgPanel::OnPaint( wxPaintEvent& event ) /*************************************************/ /*************************************************/ Loading @@ -50,33 +47,34 @@ wxPaintDC dc(this); } } /*****************************************************************************/ /*****************************************************************************/ void WinEDA_MsgPanel::Affiche_1_Parametre( int pos_X, const wxString& texte_H, void WinEDA_MsgPanel::Affiche_1_Parametre( int pos_X, const wxString& texte_H, const wxString& texte_L, int color ) const wxString& texte_L, int color ) /*****************************************************************************/ /*****************************************************************************/ /* /* Routine d'affichage d'un parametre. * Routine d'affichage d'un parametre. pos_X = cadrage horizontal * pos_X = cadrage horizontal si pos_X < 0 : la position horizontale est la derniere * si pos_X < 0 : la position horizontale est la derniere valeur demandee >= 0 * valeur demandee >= 0 texte_H = texte a afficher en ligne superieure. * texte_H = texte a afficher en ligne superieure. si "", par d'affichage sur cette ligne * si "", par d'affichage sur cette ligne texte_L = texte a afficher en ligne inferieure. * texte_L = texte a afficher en ligne inferieure. si "", par d'affichage sur cette ligne * si "", par d'affichage sur cette ligne color = couleur d'affichage * color = couleur d'affichage */ */ { { static int old_pos_X; static int old_pos_X; wxPoint pos; wxPoint pos; wxSize FontSizeInPixels, DrawSize; wxSize FontSizeInPixels, DrawSize; wxClientDC dc( this ); wxClientDC dc( this ); DrawSize = GetClientSize(); DrawSize = GetClientSize(); dc.SetBackground( *wxBLACK_BRUSH ); dc.SetBackground( *wxBLACK_BRUSH ); dc.SetBackgroundMode( wxSOLID ); dc.SetBackgroundMode( wxSOLID ); // dc.SetBackgroundMode(wxTRANSPARENT); // dc.SetBackgroundMode(wxTRANSPARENT); dc.SetTextBackground( GetBackgroundColour() ); dc.SetTextBackground( GetBackgroundColour() ); dc.SetFont( *g_MsgFont ); dc.SetFont( *g_MsgFont ); Loading @@ -94,14 +92,15 @@ wxClientDC dc(this); { { old_pos_X = pos.x = pos_X * (FontSizeInPixels.x + 2); old_pos_X = pos.x = pos_X * (FontSizeInPixels.x + 2); } } else pos.x = old_pos_X; else pos.x = old_pos_X; if( !texte_H.IsEmpty() ) if( !texte_H.IsEmpty() ) { { pos.y = (DrawSize.y / 2) - FontSizeInPixels.y;; pos.y = (DrawSize.y / 2) - FontSizeInPixels.y;; dc.DrawText( texte_H.GetData(), pos.x, pos.y ); dc.DrawText( texte_H.GetData(), pos.x, pos.y ); } } if( !texte_L.IsEmpty() ) if( !texte_L.IsEmpty() ) { { pos.y = DrawSize.y - FontSizeInPixels.y; pos.y = DrawSize.y - FontSizeInPixels.y; Loading @@ -109,16 +108,20 @@ wxClientDC dc(this); } } } } /****************************************/ /****************************************/ void WinEDA_MsgPanel::EraseMsgBox() void WinEDA_MsgPanel::EraseMsgBox() /****************************************/ /****************************************/ /* Effacement de la fenetre d'affichage des messages de bas d'ecran /* Effacement de la fenetre d'affichage des messages de bas d'ecran */ */ { { wxClientDC dc( this ); wxClientDC dc( this ); EraseMsgBox( &dc ); EraseMsgBox( &dc ); } } /*******************************************/ /*******************************************/ void WinEDA_MsgPanel::EraseMsgBox( wxDC* DC ) void WinEDA_MsgPanel::EraseMsgBox( wxDC* DC ) /*******************************************/ /*******************************************/ Loading @@ -140,5 +143,3 @@ wxBrush brush; DC->SetBrush( wxNullBrush ); DC->SetBrush( wxNullBrush ); DC->SetPen( wxNullPen ); DC->SetPen( wxNullPen ); } }
include/pcbstruct.h +17 −0 Original line number Original line Diff line number Diff line Loading @@ -448,6 +448,23 @@ public: ~MARQUEUR(); ~MARQUEUR(); void UnLink(); void UnLink(); void Draw( WinEDA_DrawPanel* panel, wxDC* DC, int DrawMode ); void Draw( WinEDA_DrawPanel* panel, wxDC* DC, int DrawMode ); /** * Function Display_Infos * has knowledge about the frame and how and where to put status information * about this object into the frame's message panel. * @param frame A WinEDA_DrawFrame in which to print status information. */ void Display_Infos( WinEDA_DrawFrame* frame ); /** * Function HitTest * tests if the given wxPoint is within the bounds of this object. * @param ref_pos A wxPoint to test * @return bool - true if a hit, else false */ bool HitTest( const wxPoint& ref_pos ); }; }; Loading
pcbnew/class_board_item.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -179,7 +179,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const break; break; case TYPEMARQUEUR: case TYPEMARQUEUR: text << _( "Marker" ); text << _( "Marker" ) << wxT( " @(" ) << ((MARQUEUR*)item)->m_Pos.x << wxT(",") << ((MARQUEUR*)item)->m_Pos.y << wxT(")"); break; break; case TYPECOTATION: case TYPECOTATION: Loading