From 1ab68d8fb88be00b76a063daacf1a14d8be08c44 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 19 Jun 2010 12:58:50 +0200 Subject: [PATCH 1/9] fixed very minor things. --- INSTALL.txt | 6 +- bitmap2component/gui_bm2cmp.cpp | 1122 ------------------------------- eeschema/build_BOM.cpp | 6 + eeschema/files-io.cpp | 2 +- gerbview/files.cpp | 2 +- pcbnew/automove.cpp | 3 +- pcbnew/dialog_gendrill_base.cpp | 2 +- pcbnew/dialog_gendrill_base.fbp | 2 +- 8 files changed, 14 insertions(+), 1131 deletions(-) delete mode 100644 bitmap2component/gui_bm2cmp.cpp diff --git a/INSTALL.txt b/INSTALL.txt index d35af5723a..f128444e30 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -106,9 +106,9 @@ Installation from source code Some dependencies must be satisfied for the correct installation of KiCad: -wxWidgets >= 2.6.3.3 http://www.wxwidgets.org/ -CMake >= 2.4.6 http://www.cmake.org/ -Boost C++ Libraries http://www.boost.org/ +wxWidgets >= 2.8.11 http://www.wxwidgets.org/ +CMake >= 2.6.4 http://www.cmake.org/ +Boost C++ Libraries (files used by kicad are provided in kicad sources) http://www.boost.org/ OpenGL Linux: Mesa 3D Graphics Library http://www.mesa3d.org/ Windows: built-in diff --git a/bitmap2component/gui_bm2cmp.cpp b/bitmap2component/gui_bm2cmp.cpp deleted file mode 100644 index 729b324d5c..0000000000 --- a/bitmap2component/gui_bm2cmp.cpp +++ /dev/null @@ -1,1122 +0,0 @@ - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP - #include "wx/wx.h" -#endif - -#include "wx/image.h" -#include "wx/file.h" -#include "wx/filename.h" -#include "wx/mstream.h" -#include "wx/wfstream.h" -#include "wx/quantize.h" - -#if wxUSE_CLIPBOARD - #include "wx/dataobj.h" - #include "wx/clipbrd.h" -#endif // wxUSE_CLIPBOARD - -#if defined(__WXMSW__) - #ifdef wxHAVE_RAW_BITMAP - #include "wx/rawbmp.h" - #endif -#endif - -#if defined(__WXMAC__) || defined(__WXGTK__) - #define wxHAVE_RAW_BITMAP - #include "wx/rawbmp.h" -#endif - -// derived classes - -class BM_TO_CMP_FRAME; -class BM_TO_CMP_APP; - -// MyCanvas - -class MyCanvas: public wxScrolledWindow -{ -public: - MyCanvas( wxWindow *parent, wxWindowID, const wxPoint &pos, const wxSize &size ); - ~MyCanvas(); - -private: - void OnPaint( wxPaintEvent &event ); - - DECLARE_EVENT_TABLE() -}; - - -// BM_TO_CMP_FRAME - - -class BM_TO_CMP_FRAME: public wxFrame -{ -public: - BM_TO_CMP_FRAME(); - - void OnAbout( wxCommandEvent &event ); - void OnNewFrame( wxCommandEvent &event ); -#ifdef wxHAVE_RAW_BITMAP - void OnTestRawBitmap( wxCommandEvent &event ); -#endif // wxHAVE_RAW_BITMAP - void OnQuit( wxCommandEvent &event ); - -#if wxUSE_CLIPBOARD - void OnCopy(wxCommandEvent& event); - void OnPaste(wxCommandEvent& event); -#endif // wxUSE_CLIPBOARD - - MyCanvas *m_canvas; - -private: - DECLARE_DYNAMIC_CLASS(BM_TO_CMP_FRAME) - DECLARE_EVENT_TABLE() -}; - -class MyImageFrame : public wxFrame -{ -public: - MyImageFrame(wxFrame *parent, const wxBitmap& bitmap) - : wxFrame(parent, wxID_ANY, _T("Double click to save"), - wxDefaultPosition, wxDefaultSize, - wxCAPTION | wxSYSTEM_MENU | wxCLOSE_BOX), - m_bitmap(bitmap) - { - SetClientSize(bitmap.GetWidth(), bitmap.GetHeight()); - } - - void OnEraseBackground(wxEraseEvent& WXUNUSED(event)) - { - // do nothing here to be able to see how transparent images are shown - } - - void OnPaint(wxPaintEvent& WXUNUSED(event)) - { - wxPaintDC dc( this ); - dc.DrawBitmap( m_bitmap, 0, 0, true /* use mask */ ); - } - - void OnSave(wxMouseEvent& WXUNUSED(event)) - { -#if wxUSE_FILEDLG - wxImage image = m_bitmap.ConvertToImage(); - - wxString savefilename = wxFileSelector( wxT("Save Image"), - wxEmptyString, - wxEmptyString, - (const wxChar *)NULL, - wxT("BMP files (*.bmp)|*.bmp|") - wxT("PNG files (*.png)|*.png|") - wxT("JPEG files (*.jpg)|*.jpg|") - wxT("GIF files (*.gif)|*.gif|") - wxT("TIFF files (*.tif)|*.tif|") - wxT("PCX files (*.pcx)|*.pcx|") - wxT("ICO files (*.ico)|*.ico|") - wxT("CUR files (*.cur)|*.cur"), - wxFD_SAVE, - this); - - if ( savefilename.empty() ) - return; - - wxString extension; - wxFileName::SplitPath(savefilename, NULL, NULL, &extension); - - bool saved = false; - if ( extension == _T("bmp") ) - { - static const int bppvalues[] = - { - wxBMP_1BPP, - wxBMP_1BPP_BW, - wxBMP_4BPP, - wxBMP_8BPP, - wxBMP_8BPP_GREY, - wxBMP_8BPP_RED, - wxBMP_8BPP_PALETTE, - wxBMP_24BPP - }; - - const wxString bppchoices[] = - { - _T("1 bpp color"), - _T("1 bpp B&W"), - _T("4 bpp color"), - _T("8 bpp color"), - _T("8 bpp greyscale"), - _T("8 bpp red"), - _T("8 bpp own palette"), - _T("24 bpp") - }; - - int bppselection = wxGetSingleChoiceIndex(_T("Set BMP BPP"), - _T("Image sample: save file"), - WXSIZEOF(bppchoices), - bppchoices, - this); - if ( bppselection != -1 ) - { - int format = bppvalues[bppselection]; - image.SetOption(wxIMAGE_OPTION_BMP_FORMAT, format); - - if ( format == wxBMP_8BPP_PALETTE ) - { - unsigned char *cmap = new unsigned char [256]; - for ( int i = 0; i < 256; i++ ) - cmap[i] = (unsigned char)i; - image.SetPalette(wxPalette(256, cmap, cmap, cmap)); - - delete[] cmap; - } - } - } - else if ( extension == _T("png") ) - { - static const int pngvalues[] = - { - wxPNG_TYPE_COLOUR, - wxPNG_TYPE_COLOUR, - wxPNG_TYPE_GREY, - wxPNG_TYPE_GREY, - wxPNG_TYPE_GREY_RED, - wxPNG_TYPE_GREY_RED, - }; - - const wxString pngchoices[] = - { - _T("Colour 8bpp"), - _T("Colour 16bpp"), - _T("Grey 8bpp"), - _T("Grey 16bpp"), - _T("Grey red 8bpp"), - _T("Grey red 16bpp"), - }; - - int sel = wxGetSingleChoiceIndex(_T("Set PNG format"), - _T("Image sample: save file"), - WXSIZEOF(pngchoices), - pngchoices, - this); - if ( sel != -1 ) - { - image.SetOption(wxIMAGE_OPTION_PNG_FORMAT, pngvalues[sel]); - image.SetOption(wxIMAGE_OPTION_PNG_BITDEPTH, sel % 2 ? 16 : 8); - } - } - else if ( extension == _T("cur") ) - { - image.Rescale(32,32); - image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 0); - image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 0); - // This shows how you can save an image with explicitly - // specified image format: - saved = image.SaveFile(savefilename, wxBITMAP_TYPE_CUR); - } - - if ( !saved ) - { - // This one guesses image format from filename extension - // (it may fail if the extension is not recognized): - image.SaveFile(savefilename); - } -#endif // wxUSE_FILEDLG - } - -private: - wxBitmap m_bitmap; - - DECLARE_EVENT_TABLE() -}; - -#ifdef wxHAVE_RAW_BITMAP - -#include "wx/rawbmp.h" - -class MyRawBitmapFrame : public wxFrame -{ -public: - enum - { - BORDER = 15, - SIZE = 150, - REAL_SIZE = SIZE - 2*BORDER - }; - - MyRawBitmapFrame(wxFrame *parent) - : wxFrame(parent, wxID_ANY, _T("Raw bitmaps (how exciting)")), - m_bitmap(SIZE, SIZE, 24), - m_alphaBitmap(SIZE, SIZE, 32) - { - SetClientSize(SIZE, SIZE*2+25); - - InitAlphaBitmap(); - InitBitmap(); - - } - - void InitAlphaBitmap() - { - // First, clear the whole bitmap by making it alpha - { - wxAlphaPixelData data( m_alphaBitmap, wxPoint(0,0), wxSize(SIZE, SIZE) ); - if ( !data ) - { - wxLogError(_T("Failed to gain raw access to bitmap data")); - return; - } - data.UseAlpha(); - wxAlphaPixelData::Iterator p(data); - for ( int y = 0; y < SIZE; ++y ) - { - wxAlphaPixelData::Iterator rowStart = p; - for ( int x = 0; x < SIZE; ++x ) - { - p.Alpha() = 0; - ++p; // same as p.OffsetX(1) - } - p = rowStart; - p.OffsetY(data, 1); - } - } - - // Then, draw colourful alpha-blended stripes - wxAlphaPixelData data(m_alphaBitmap, wxPoint(BORDER, BORDER), - wxSize(REAL_SIZE, REAL_SIZE)); - if ( !data ) - { - wxLogError(_T("Failed to gain raw access to bitmap data")); - return; - } - - data.UseAlpha(); - wxAlphaPixelData::Iterator p(data); - - for ( int y = 0; y < REAL_SIZE; ++y ) - { - wxAlphaPixelData::Iterator rowStart = p; - - int r = y < REAL_SIZE/3 ? 255 : 0, - g = (REAL_SIZE/3 <= y) && (y < 2*(REAL_SIZE/3)) ? 255 : 0, - b = 2*(REAL_SIZE/3) <= y ? 255 : 0; - - for ( int x = 0; x < REAL_SIZE; ++x ) - { - // note that RGB must be premultiplied by alpha - unsigned a = (wxAlphaPixelData::Iterator::ChannelType)((x*255.)/REAL_SIZE); - p.Red() = r * a / 256; - p.Green() = g * a / 256; - p.Blue() = b * a / 256; - p.Alpha() = a; - - ++p; // same as p.OffsetX(1) - } - - p = rowStart; - p.OffsetY(data, 1); - } - } - - void InitBitmap() - { - // draw some colourful stripes without alpha - wxNativePixelData data(m_bitmap); - if ( !data ) - { - wxLogError(_T("Failed to gain raw access to bitmap data")); - return; - } - - wxNativePixelData::Iterator p(data); - for ( int y = 0; y < SIZE; ++y ) - { - wxNativePixelData::Iterator rowStart = p; - - int r = y < SIZE/3 ? 255 : 0, - g = (SIZE/3 <= y) && (y < 2*(SIZE/3)) ? 255 : 0, - b = 2*(SIZE/3) <= y ? 255 : 0; - - for ( int x = 0; x < SIZE; ++x ) - { - p.Red() = r; - p.Green() = g; - p.Blue() = b; - ++p; // same as p.OffsetX(1) - } - - p = rowStart; - p.OffsetY(data, 1); - } - } - - void OnPaint(wxPaintEvent& WXUNUSED(event)) - { - wxPaintDC dc( this ); - dc.DrawText(_T("This is alpha and raw bitmap test"), 0, BORDER); - dc.DrawText(_T("This is alpha and raw bitmap test"), 0, SIZE/2 - BORDER); - dc.DrawText(_T("This is alpha and raw bitmap test"), 0, SIZE - 2*BORDER); - dc.DrawBitmap( m_alphaBitmap, 0, 0, true /* use mask */ ); - - dc.DrawText(_T("Raw bitmap access without alpha"), 0, SIZE+5); - dc.DrawBitmap( m_bitmap, 0, SIZE+5+dc.GetCharHeight()); - } - -private: - wxBitmap m_bitmap; - wxBitmap m_alphaBitmap; - - DECLARE_EVENT_TABLE() -}; - -#endif // wxHAVE_RAW_BITMAP - -// BM_TO_CMP_APP - -class BM_TO_CMP_APP: public wxApp -{ -public: - virtual bool OnInit(); -}; - -// main program - -IMPLEMENT_APP(BM_TO_CMP_APP) - -// MyCanvas - -BEGIN_EVENT_TABLE(MyImageFrame, wxFrame) - EVT_ERASE_BACKGROUND(MyImageFrame::OnEraseBackground) - EVT_PAINT(MyImageFrame::OnPaint) - EVT_LEFT_DCLICK(MyImageFrame::OnSave) -END_EVENT_TABLE() - -#ifdef wxHAVE_RAW_BITMAP - -BEGIN_EVENT_TABLE(MyRawBitmapFrame, wxFrame) - EVT_PAINT(MyRawBitmapFrame::OnPaint) -END_EVENT_TABLE() - -#endif // wxHAVE_RAW_BITMAP - -BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow) - EVT_PAINT(MyCanvas::OnPaint) -END_EVENT_TABLE() - -MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id, - const wxPoint &pos, const wxSize &size ) - : wxScrolledWindow( parent, id, pos, size, wxSUNKEN_BORDER ) - , m_bmpSmileXpm(smile_xpm) - , m_iconSmileXpm(smile_xpm) -{ - my_horse_ani = NULL; - m_ani_images = 0 ; - - SetBackgroundColour(* wxWHITE); - - wxBitmap bitmap( 100, 100 ); - - wxMemoryDC dc; - dc.SelectObject( bitmap ); - dc.SetBrush( wxBrush( wxT("orange"), wxSOLID ) ); - dc.SetPen( *wxBLACK_PEN ); - dc.DrawRectangle( 0, 0, 100, 100 ); - dc.SetBrush( *wxWHITE_BRUSH ); - dc.DrawRectangle( 20, 20, 60, 60 ); - dc.SelectObject( wxNullBitmap ); - - // try to find the directory with our images - wxString dir; - if ( wxFile::Exists(wxT("./horse.png")) ) - dir = wxT("./"); - else if ( wxFile::Exists(wxT("../horse.png")) ) - dir = wxT("../"); - else - wxLogWarning(wxT("Can't find image files in either '.' or '..'!")); - - wxImage image = bitmap.ConvertToImage(); - -#if wxUSE_LIBPNG - if ( !image.SaveFile( dir + _T("test.png"), wxBITMAP_TYPE_PNG )) - wxLogError(wxT("Can't save file")); - - image.Destroy(); - - if ( image.LoadFile( dir + _T("test.png") ) ) - my_square = wxBitmap( image ); - - image.Destroy(); - - if ( !image.LoadFile( dir + _T("horse.png")) ) - wxLogError(wxT("Can't load PNG image")); - else - my_horse_png = wxBitmap( image ); - - if ( !image.LoadFile( dir + _T("toucan.png")) ) - wxLogError(wxT("Can't load PNG image")); - else - my_toucan = wxBitmap(image); - - my_toucan_flipped_horiz = wxBitmap(image.Mirror(true)); - my_toucan_flipped_vert = wxBitmap(image.Mirror(false)); - my_toucan_flipped_both = wxBitmap(image.Mirror(true).Mirror(false)); - my_toucan_grey = wxBitmap(image.ConvertToGreyscale()); - my_toucan_head = wxBitmap(image.GetSubImage(wxRect(40, 7, 80, 60))); - my_toucan_scaled_normal = wxBitmap(image.Scale(110,90,wxIMAGE_QUALITY_NORMAL)); - my_toucan_scaled_high = wxBitmap(image.Scale(110,90,wxIMAGE_QUALITY_HIGH)); - my_toucan_blur = wxBitmap(image.Blur(10)); - -#endif // wxUSE_LIBPNG - -#if wxUSE_LIBJPEG - image.Destroy(); - - if ( !image.LoadFile( dir + _T("horse.jpg")) ) - wxLogError(wxT("Can't load JPG image")); - else - { - my_horse_jpeg = wxBitmap( image ); - - // Colorize by rotating green hue to red - wxImage::HSVValue greenHSV = wxImage::RGBtoHSV(wxImage::RGBValue(0, 255, 0)); - wxImage::HSVValue redHSV = wxImage::RGBtoHSV(wxImage::RGBValue(255, 0, 0)); - image.RotateHue(redHSV.hue - greenHSV.hue); - colorized_horse_jpeg = wxBitmap( image ); - } - - if ( !image.LoadFile( dir + _T("cmyk.jpg")) ) - wxLogError(_T("Can't load CMYK JPG image")); - else - my_cmyk_jpeg = wxBitmap(image); -#endif // wxUSE_LIBJPEG - -#if wxUSE_GIF - image.Destroy(); - - if ( !image.LoadFile( dir + _T("horse.gif" )) ) - wxLogError(wxT("Can't load GIF image")); - else - my_horse_gif = wxBitmap( image ); -#endif - -#if wxUSE_PCX - image.Destroy(); - - if ( !image.LoadFile( dir + _T("horse.pcx"), wxBITMAP_TYPE_PCX ) ) - wxLogError(wxT("Can't load PCX image")); - else - my_horse_pcx = wxBitmap( image ); -#endif - - image.Destroy(); - - if ( !image.LoadFile( dir + _T("horse.bmp"), wxBITMAP_TYPE_BMP ) ) - wxLogError(wxT("Can't load BMP image")); - else - my_horse_bmp = wxBitmap( image ); - -#if wxUSE_XPM - image.Destroy(); - - if ( !image.LoadFile( dir + _T("horse.xpm"), wxBITMAP_TYPE_XPM ) ) - wxLogError(wxT("Can't load XPM image")); - else - my_horse_xpm = wxBitmap( image ); - - if ( !image.SaveFile( dir + _T("test.xpm"), wxBITMAP_TYPE_XPM )) - wxLogError(wxT("Can't save file")); -#endif - -#if wxUSE_PNM - image.Destroy(); - - if ( !image.LoadFile( dir + _T("horse.pnm"), wxBITMAP_TYPE_PNM ) ) - wxLogError(wxT("Can't load PNM image")); - else - my_horse_pnm = wxBitmap( image ); - - image.Destroy(); - - if ( !image.LoadFile( dir + _T("horse_ag.pnm"), wxBITMAP_TYPE_PNM ) ) - wxLogError(wxT("Can't load PNM image")); - else - my_horse_asciigrey_pnm = wxBitmap( image ); - - image.Destroy(); - - if ( !image.LoadFile( dir + _T("horse_rg.pnm"), wxBITMAP_TYPE_PNM ) ) - wxLogError(wxT("Can't load PNM image")); - else - my_horse_rawgrey_pnm = wxBitmap( image ); -#endif - -#if wxUSE_LIBTIFF - image.Destroy(); - - if ( !image.LoadFile( dir + _T("horse.tif"), wxBITMAP_TYPE_TIF ) ) - wxLogError(wxT("Can't load TIFF image")); - else - my_horse_tiff = wxBitmap( image ); -#endif - -#if wxUSE_LIBTIFF - image.Destroy(); - - if ( !image.LoadFile( dir + _T("horse.tga"), wxBITMAP_TYPE_TGA ) ) - wxLogError(wxT("Can't load TGA image")); - else - my_horse_tga = wxBitmap( image ); -#endif - - CreateAntiAliasedBitmap(); - - my_smile_xbm = wxBitmap( (const char*)smile_bits, smile_width, - smile_height, 1 ); - - // demonstrates XPM automatically using the mask when saving - if ( m_bmpSmileXpm.Ok() ) - m_bmpSmileXpm.SaveFile(_T("saved.xpm"), wxBITMAP_TYPE_XPM); - -#if wxUSE_ICO_CUR - image.Destroy(); - - if ( !image.LoadFile( dir + _T("horse.ico"), wxBITMAP_TYPE_ICO, 0 ) ) - wxLogError(wxT("Can't load first ICO image")); - else - my_horse_ico32 = wxBitmap( image ); - - image.Destroy(); - - if ( !image.LoadFile( dir + _T("horse.ico"), wxBITMAP_TYPE_ICO, 1 ) ) - wxLogError(wxT("Can't load second ICO image")); - else - my_horse_ico16 = wxBitmap( image ); - - image.Destroy(); - - if ( !image.LoadFile( dir + _T("horse.ico") ) ) - wxLogError(wxT("Can't load best ICO image")); - else - my_horse_ico = wxBitmap( image ); - - image.Destroy(); - - if ( !image.LoadFile( dir + _T("horse.cur"), wxBITMAP_TYPE_CUR ) ) - wxLogError(wxT("Can't load best ICO image")); - else - { - my_horse_cur = wxBitmap( image ); - xH = 30 + image.GetOptionInt(wxIMAGE_OPTION_CUR_HOTSPOT_X) ; - yH = 2420 + image.GetOptionInt(wxIMAGE_OPTION_CUR_HOTSPOT_Y) ; - } - - m_ani_images = wxImage::GetImageCount ( dir + _T("horse3.ani"), wxBITMAP_TYPE_ANI ); - if (m_ani_images==0) - wxLogError(wxT("No ANI-format images found")); - else - my_horse_ani = new wxBitmap [m_ani_images]; - int i ; - for (i=0; i < m_ani_images; i++) - { - image.Destroy(); - if (!image.LoadFile( dir + _T("horse3.ani"), wxBITMAP_TYPE_ANI, i )) - { - wxString tmp = wxT("Can't load image number "); - tmp << i ; - wxLogError(tmp); - } - else - my_horse_ani [i] = wxBitmap( image ); - } -#endif // wxUSE_ICO_CUR - - image.Destroy(); - - // test image loading from stream - wxFile file(dir + _T("horse.bmp")); - if ( file.IsOpened() ) - { - wxFileOffset len = file.Length(); - size_t dataSize = (size_t)len; - void *data = malloc(dataSize); - if ( file.Read(data, dataSize) != len ) - wxLogError(_T("Reading bitmap file failed")); - else - { - wxMemoryInputStream mis(data, dataSize); - if ( !image.LoadFile(mis) ) - wxLogError(wxT("Can't load BMP image from stream")); - else - my_horse_bmp2 = wxBitmap( image ); - } - - free(data); - } -} - -MyCanvas::~MyCanvas() -{ - delete [] my_horse_ani; -} - -void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) ) -{ - wxPaintDC dc( this ); - PrepareDC( dc ); - - dc.DrawText( _T("Loaded image"), 30, 10 ); - if (my_square.Ok()) - dc.DrawBitmap( my_square, 30, 30 ); - - dc.DrawText( _T("Drawn directly"), 150, 10 ); - dc.SetBrush( wxBrush( wxT("orange"), wxSOLID ) ); - dc.SetPen( *wxBLACK_PEN ); - dc.DrawRectangle( 150, 30, 100, 100 ); - dc.SetBrush( *wxWHITE_BRUSH ); - dc.DrawRectangle( 170, 50, 60, 60 ); - - if (my_anti.Ok()) - dc.DrawBitmap( my_anti, 280, 30 ); - - dc.DrawText( _T("PNG handler"), 30, 135 ); - if (my_horse_png.Ok()) - { - dc.DrawBitmap( my_horse_png, 30, 150 ); - wxRect rect(0,0,100,100); - wxBitmap sub( my_horse_png.GetSubBitmap(rect) ); - dc.DrawText( _T("GetSubBitmap()"), 280, 175 ); - dc.DrawBitmap( sub, 280, 195 ); - } - - dc.DrawText( _T("JPEG handler"), 30, 365 ); - if (my_horse_jpeg.Ok()) - dc.DrawBitmap( my_horse_jpeg, 30, 380 ); - - dc.DrawText( _T("Green rotated to red"), 280, 365 ); - if (colorized_horse_jpeg.Ok()) - dc.DrawBitmap( colorized_horse_jpeg, 280, 380 ); - - dc.DrawText( _T("CMYK JPEG image"), 530, 365 ); - if (my_cmyk_jpeg.Ok()) - dc.DrawBitmap( my_cmyk_jpeg, 530, 380 ); - - dc.DrawText( _T("GIF handler"), 30, 595 ); - if (my_horse_gif.Ok()) - dc.DrawBitmap( my_horse_gif, 30, 610 ); - - dc.DrawText( _T("PCX handler"), 30, 825 ); - if (my_horse_pcx.Ok()) - dc.DrawBitmap( my_horse_pcx, 30, 840 ); - - dc.DrawText( _T("BMP handler"), 30, 1055 ); - if (my_horse_bmp.Ok()) - dc.DrawBitmap( my_horse_bmp, 30, 1070 ); - - dc.DrawText( _T("BMP read from memory"), 280, 1055 ); - if (my_horse_bmp2.Ok()) - dc.DrawBitmap( my_horse_bmp2, 280, 1070 ); - - dc.DrawText( _T("PNM handler"), 30, 1285 ); - if (my_horse_pnm.Ok()) - dc.DrawBitmap( my_horse_pnm, 30, 1300 ); - - dc.DrawText( _T("PNM handler (ascii grey)"), 280, 1285 ); - if (my_horse_asciigrey_pnm.Ok()) - dc.DrawBitmap( my_horse_asciigrey_pnm, 280, 1300 ); - - dc.DrawText( _T("PNM handler (raw grey)"), 530, 1285 ); - if (my_horse_rawgrey_pnm.Ok()) - dc.DrawBitmap( my_horse_rawgrey_pnm, 530, 1300 ); - - dc.DrawText( _T("TIFF handler"), 30, 1515 ); - if (my_horse_tiff.Ok()) - dc.DrawBitmap( my_horse_tiff, 30, 1530 ); - - dc.DrawText( _T("TGA handler"), 30, 1745 ); - if (my_horse_tga.Ok()) - dc.DrawBitmap( my_horse_tga, 30, 1760 ); - - dc.DrawText( _T("XPM handler"), 30, 1975 ); - if (my_horse_xpm.Ok()) - dc.DrawBitmap( my_horse_xpm, 30, 2000 ); - - // toucans - { - int x = 750, y = 10, yy = 170; - - dc.DrawText(wxT("Original toucan"), x+50, y); - dc.DrawBitmap(my_toucan, x, y+15, true); - y += yy; - dc.DrawText(wxT("Flipped horizontally"), x+50, y); - dc.DrawBitmap(my_toucan_flipped_horiz, x, y+15, true); - y += yy; - dc.DrawText(wxT("Flipped vertically"), x+50, y); - dc.DrawBitmap(my_toucan_flipped_vert, x, y+15, true); - y += yy; - dc.DrawText(wxT("Flipped both h&v"), x+50, y); - dc.DrawBitmap(my_toucan_flipped_both, x, y+15, true); - - y += yy; - dc.DrawText(wxT("In greyscale"), x+50, y); - dc.DrawBitmap(my_toucan_grey, x, y+15, true); - - y += yy; - dc.DrawText(wxT("Toucan's head"), x+50, y); - dc.DrawBitmap(my_toucan_head, x, y+15, true); - - y += yy; - dc.DrawText(wxT("Scaled with normal quality"), x+50, y); - dc.DrawBitmap(my_toucan_scaled_normal, x, y+15, true); - - y += yy; - dc.DrawText(wxT("Scaled with high quality"), x+50, y); - dc.DrawBitmap(my_toucan_scaled_high, x, y+15, true); - - y += yy; - dc.DrawText(wxT("Blured"), x+50, y); - dc.DrawBitmap(my_toucan_blur, x, y+15, true); - } - - if (my_smile_xbm.Ok()) - { - int x = 300, y = 1800; - - dc.DrawText( _T("XBM bitmap"), x, y ); - dc.DrawText( _T("(green on red)"), x, y + 15 ); - dc.SetTextForeground( _T("GREEN") ); - dc.SetTextBackground( _T("RED") ); - dc.DrawBitmap( my_smile_xbm, x, y + 30 ); - - dc.SetTextForeground( *wxBLACK ); - dc.DrawText( _T("After wxImage conversion"), x + 120, y ); - dc.DrawText( _T("(red on white)"), x + 120, y + 15 ); - dc.SetTextForeground( wxT("RED") ); - wxImage i = my_smile_xbm.ConvertToImage(); - i.SetMaskColour( 255, 255, 255 ); - i.Replace( 0, 0, 0, - wxRED_PEN->GetColour().Red(), - wxRED_PEN->GetColour().Green(), - wxRED_PEN->GetColour().Blue() ); - dc.DrawBitmap( wxBitmap(i), x + 120, y + 30, true ); - dc.SetTextForeground( *wxBLACK ); - } - - - wxBitmap mono( 60,50,1 ); - wxMemoryDC memdc; - memdc.SelectObject( mono ); - memdc.SetPen( *wxBLACK_PEN ); - memdc.SetBrush( *wxWHITE_BRUSH ); - memdc.DrawRectangle( 0,0,60,50 ); - memdc.SetTextForeground( *wxBLACK ); -#ifndef __WXGTK20__ - // I cannot convince GTK2 to draw into mono bitmaps - memdc.DrawText( _T("Hi!"), 5, 5 ); -#endif - memdc.SetBrush( *wxBLACK_BRUSH ); - memdc.DrawRectangle( 33,5,20,20 ); - memdc.SetPen( *wxRED_PEN ); - memdc.DrawLine( 5, 42, 50, 42 ); - memdc.SelectObject( wxNullBitmap ); - - if (mono.Ok()) - { - int x = 300, y = 1900; - - dc.DrawText( _T("Mono bitmap"), x, y ); - dc.DrawText( _T("(red on green)"), x, y + 15 ); - dc.SetTextForeground( wxT("RED") ); - dc.SetTextBackground( wxT("GREEN") ); - dc.DrawBitmap( mono, x, y + 30 ); - - dc.SetTextForeground( *wxBLACK ); - dc.DrawText( _T("After wxImage conversion"), x + 120, y ); - dc.DrawText( _T("(red on white)"), x + 120, y + 15 ); - dc.SetTextForeground( wxT("RED") ); - wxImage i = mono.ConvertToImage(); - i.SetMaskColour( 255,255,255 ); - i.Replace( 0,0,0, - wxRED_PEN->GetColour().Red(), - wxRED_PEN->GetColour().Green(), - wxRED_PEN->GetColour().Blue() ); - dc.DrawBitmap( wxBitmap(i), x + 120, y + 30, true ); - dc.SetTextForeground( *wxBLACK ); - } - - // For testing transparency - dc.SetBrush( *wxRED_BRUSH ); - dc.DrawRectangle( 20, 2220, 560, 68 ); - - dc.DrawText(_T("XPM bitmap"), 30, 2230 ); - if ( m_bmpSmileXpm.Ok() ) - dc.DrawBitmap(m_bmpSmileXpm, 30, 2250, true); - - dc.DrawText(_T("XPM icon"), 110, 2230 ); - if ( m_iconSmileXpm.Ok() ) - dc.DrawIcon(m_iconSmileXpm, 110, 2250); - - // testing icon -> bitmap conversion - wxBitmap to_blit( m_iconSmileXpm ); - if (to_blit.Ok()) - { - dc.DrawText( _T("SubBitmap"), 170, 2230 ); - wxBitmap sub = to_blit.GetSubBitmap( wxRect(0,0,15,15) ); - if (sub.Ok()) - dc.DrawBitmap( sub, 170, 2250, true ); - - dc.DrawText( _T("Enlarged"), 250, 2230 ); - dc.SetUserScale( 1.5, 1.5 ); - dc.DrawBitmap( to_blit, (int)(250/1.5), (int)(2250/1.5), true ); - dc.SetUserScale( 2, 2 ); - dc.DrawBitmap( to_blit, (int)(300/2), (int)(2250/2), true ); - dc.SetUserScale( 1.0, 1.0 ); - - dc.DrawText( _T("Blit"), 400, 2230); - wxMemoryDC blit_dc; - blit_dc.SelectObject( to_blit ); - dc.Blit( 400, 2250, to_blit.GetWidth(), to_blit.GetHeight(), &blit_dc, 0, 0, wxCOPY, true ); - dc.SetUserScale( 1.5, 1.5 ); - dc.Blit( (int)(450/1.5), (int)(2250/1.5), to_blit.GetWidth(), to_blit.GetHeight(), &blit_dc, 0, 0, wxCOPY, true ); - dc.SetUserScale( 2, 2 ); - dc.Blit( (int)(500/2), (int)(2250/2), to_blit.GetWidth(), to_blit.GetHeight(), &blit_dc, 0, 0, wxCOPY, true ); - dc.SetUserScale( 1.0, 1.0 ); - } - - dc.DrawText( _T("ICO handler (1st image)"), 30, 2290 ); - if (my_horse_ico32.Ok()) - dc.DrawBitmap( my_horse_ico32, 30, 2330, true ); - - dc.DrawText( _T("ICO handler (2nd image)"), 230, 2290 ); - if (my_horse_ico16.Ok()) - dc.DrawBitmap( my_horse_ico16, 230, 2330, true ); - - dc.DrawText( _T("ICO handler (best image)"), 430, 2290 ); - if (my_horse_ico.Ok()) - dc.DrawBitmap( my_horse_ico, 430, 2330, true ); - - dc.DrawText( _T("CUR handler"), 30, 2390 ); - if (my_horse_cur.Ok()) - { - dc.DrawBitmap( my_horse_cur, 30, 2420, true ); - dc.SetPen (*wxRED_PEN); - dc.DrawLine (xH-10,yH,xH+10,yH); - dc.DrawLine (xH,yH-10,xH,yH+10); - } - - dc.DrawText( _T("ANI handler"), 230, 2390 ); - for ( int i=0; i < m_ani_images; i++ ) - { - if (my_horse_ani[i].Ok()) - { - dc.DrawBitmap( my_horse_ani[i], 230 + i * 2 * my_horse_ani[i].GetWidth() , 2420, true ); - } - } -} - -void MyCanvas::CreateAntiAliasedBitmap() -{ - wxBitmap bitmap( 300, 300 ); - - wxMemoryDC dc; - - dc.SelectObject( bitmap ); - - dc.Clear(); - - dc.SetFont( wxFont( 24, wxDECORATIVE, wxNORMAL, wxNORMAL) ); - dc.SetTextForeground( wxT("RED") ); - dc.DrawText( _T("This is anti-aliased Text."), 20, 5 ); - dc.DrawText( _T("And a Rectangle."), 20, 45 ); - - dc.SetBrush( *wxRED_BRUSH ); - dc.SetPen( *wxTRANSPARENT_PEN ); - dc.DrawRoundedRectangle( 20, 85, 200, 180, 20 ); - - wxImage original= bitmap.ConvertToImage(); - wxImage anti( 150, 150 ); - - /* This is quite slow, but safe. Use wxImage::GetData() for speed instead. */ - - for (int y = 1; y < 149; y++) - for (int x = 1; x < 149; x++) - { - int red = original.GetRed( x*2, y*2 ) + - original.GetRed( x*2-1, y*2 ) + - original.GetRed( x*2, y*2+1 ) + - original.GetRed( x*2+1, y*2+1 ); - red = red/4; - - int green = original.GetGreen( x*2, y*2 ) + - original.GetGreen( x*2-1, y*2 ) + - original.GetGreen( x*2, y*2+1 ) + - original.GetGreen( x*2+1, y*2+1 ); - green = green/4; - - int blue = original.GetBlue( x*2, y*2 ) + - original.GetBlue( x*2-1, y*2 ) + - original.GetBlue( x*2, y*2+1 ) + - original.GetBlue( x*2+1, y*2+1 ); - blue = blue/4; - anti.SetRGB( x, y, (unsigned char)red, (unsigned char)green, (unsigned char)blue ); - } - my_anti = wxBitmap(anti); -} - -// BM_TO_CMP_FRAME - -enum -{ - ID_QUIT = wxID_EXIT, - ID_ABOUT = wxID_ABOUT, - ID_NEW = 100, - ID_SHOWRAW = 101 -}; - -IMPLEMENT_DYNAMIC_CLASS( BM_TO_CMP_FRAME, wxFrame ) - -BEGIN_EVENT_TABLE(BM_TO_CMP_FRAME,wxFrame) - EVT_MENU (ID_ABOUT, BM_TO_CMP_FRAME::OnAbout) - EVT_MENU (ID_QUIT, BM_TO_CMP_FRAME::OnQuit) - EVT_MENU (ID_NEW, BM_TO_CMP_FRAME::OnNewFrame) -#ifdef wxHAVE_RAW_BITMAP - EVT_MENU (ID_SHOWRAW, BM_TO_CMP_FRAME::OnTestRawBitmap) -#endif - -#if wxUSE_CLIPBOARD - EVT_MENU(wxID_COPY, BM_TO_CMP_FRAME::OnCopy) - EVT_MENU(wxID_PASTE, BM_TO_CMP_FRAME::OnPaste) -#endif // wxUSE_CLIPBOARD -END_EVENT_TABLE() - -BM_TO_CMP_FRAME::BM_TO_CMP_FRAME() - : wxFrame( (wxFrame *)NULL, wxID_ANY, _T("wxImage sample"), - wxPoint(20, 20), wxSize(950, 700) ) -{ - wxMenuBar *menu_bar = new wxMenuBar(); - - wxMenu *menuImage = new wxMenu; - menuImage->Append( ID_NEW, _T("&Show any image...\tCtrl-O")); - -#ifdef wxHAVE_RAW_BITMAP - menuImage->Append( ID_SHOWRAW, _T("Test &raw bitmap...\tCtrl-R")); -#endif - menuImage->AppendSeparator(); - menuImage->Append( ID_ABOUT, _T("&About...")); - menuImage->AppendSeparator(); - menuImage->Append( ID_QUIT, _T("E&xit\tCtrl-Q")); - menu_bar->Append(menuImage, _T("&Image")); - -#if wxUSE_CLIPBOARD - wxMenu *menuClipboard = new wxMenu; - menuClipboard->Append(wxID_COPY, _T("&Copy test image\tCtrl-C")); - menuClipboard->Append(wxID_PASTE, _T("&Paste image\tCtrl-V")); - menu_bar->Append(menuClipboard, _T("&Clipboard")); -#endif // wxUSE_CLIPBOARD - - SetMenuBar( menu_bar ); - -#if wxUSE_STATUSBAR - CreateStatusBar(2); - int widths[] = { -1, 100 }; - SetStatusWidths( 2, widths ); -#endif // wxUSE_STATUSBAR - - m_canvas = new MyCanvas( this, wxID_ANY, wxPoint(0,0), wxSize(10,10) ); - - // 500 width * 2750 height - m_canvas->SetScrollbars( 10, 10, 50, 275 ); -} - -void BM_TO_CMP_FRAME::OnQuit( wxCommandEvent &WXUNUSED(event) ) -{ - Close( true ); -} - -void BM_TO_CMP_FRAME::OnAbout( wxCommandEvent &WXUNUSED(event) ) -{ - (void)wxMessageBox( _T("wxImage demo\n") - _T("Robert Roebling (c) 1998,2000"), - _T("About wxImage Demo"), wxICON_INFORMATION | wxOK ); -} - -void BM_TO_CMP_FRAME::OnNewFrame( wxCommandEvent &WXUNUSED(event) ) -{ -#if wxUSE_FILEDLG - wxString filename = wxFileSelector(_T("Select image file")); - if ( !filename ) - return; - - wxImage image; - if ( !image.LoadFile(filename) ) - { - wxLogError(_T("Couldn't load image from '%s'."), filename.c_str()); - - return; - } - - (new MyImageFrame(this, wxBitmap(image)))->Show(); -#endif // wxUSE_FILEDLG -} - -#ifdef wxHAVE_RAW_BITMAP - -void BM_TO_CMP_FRAME::OnTestRawBitmap( wxCommandEvent &WXUNUSED(event) ) -{ - (new MyRawBitmapFrame(this))->Show(); -} - -#endif // wxHAVE_RAW_BITMAP - -#if wxUSE_CLIPBOARD - -void BM_TO_CMP_FRAME::OnCopy(wxCommandEvent& WXUNUSED(event)) -{ - wxBitmapDataObject *dobjBmp = new wxBitmapDataObject; - dobjBmp->SetBitmap(m_canvas->my_horse_png); - - wxTheClipboard->Open(); - - if ( !wxTheClipboard->SetData(dobjBmp) ) - { - wxLogError(_T("Failed to copy bitmap to clipboard")); - } - - wxTheClipboard->Close(); -} - -void BM_TO_CMP_FRAME::OnPaste(wxCommandEvent& WXUNUSED(event)) -{ - wxBitmapDataObject dobjBmp; - - wxTheClipboard->Open(); - if ( !wxTheClipboard->GetData(dobjBmp) ) - { - wxLogMessage(_T("No bitmap data in the clipboard")); - } - else - { - (new MyImageFrame(this, dobjBmp.GetBitmap()))->Show(); - } - wxTheClipboard->Close(); -} - -#endif // wxUSE_CLIPBOARD - -//----------------------------------------------------------------------------- -// BM_TO_CMP_APP -//----------------------------------------------------------------------------- - -bool BM_TO_CMP_APP::OnInit() -{ - wxInitAllImageHandlers(); - - wxFrame *frame = new BM_TO_CMP_FRAME(); - frame->Show( true ); - - return true; -} diff --git a/eeschema/build_BOM.cpp b/eeschema/build_BOM.cpp index 8d1a5854df..8ae9417846 100644 --- a/eeschema/build_BOM.cpp +++ b/eeschema/build_BOM.cpp @@ -797,6 +797,10 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart( // Store fields. Store non empty fields only. for( int jj = FOOTPRINT; jj < currCmp->GetFieldCount(); jj++ ) { + //Ensure fields exists in dummy component + if( dummyCmp.GetFieldCount() < currCmp->GetFieldCount() ) + dummyCmp.AddField( *currCmp->GetField( jj ) ); + // store useful data if( !currCmp->GetField( jj )->m_Text.IsEmpty() ) dummyCmp.GetField( jj )->m_Text = currCmp->GetField( jj )->m_Text; } @@ -848,6 +852,8 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart( // print fields, on demand for( int jj = FIELD1; jj <= FIELD8 ; jj++ ) { + if( dummyCmp.GetFieldCount() >= jj ) + break; if ( IsFieldChecked( jj ) ) fprintf( f, "%c%4s", s_ExportSeparatorSymbol, CONV_TO_UTF8( dummyCmp.GetField( jj )->m_Text ) ); diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp index eb92b29d79..02e9958c1a 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -194,7 +194,7 @@ bool WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName, bool IsN GetChars( fn.GetFullPath() ), GetChars( errMsg ) ); DisplayError( this, prompt ); - msg += wxT( " ->Error" ); + msg += _( " ->Error" ); } PrintMsg( msg ); diff --git a/gerbview/files.cpp b/gerbview/files.cpp index bad890292a..0a06698ec0 100644 --- a/gerbview/files.cpp +++ b/gerbview/files.cpp @@ -62,7 +62,7 @@ void WinEDA_GerberFrame::Files_io( wxCommandEvent& event ) else { wxString msg; - msg.Printf( _( "GerbView only supports a maximum of %d layers. You must first \ + msg.Printf( _( "GerbView only supports a maximum of %d layers. You must first \ delete an existing layer to load any new layers." ), NB_LAYERS ); wxMessageBox( msg ); } diff --git a/pcbnew/automove.cpp b/pcbnew/automove.cpp index 7a980bf82d..790f27b196 100644 --- a/pcbnew/automove.cpp +++ b/pcbnew/automove.cpp @@ -204,8 +204,7 @@ void WinEDA_PcbFrame::AutoMoveModulesOnPcb( bool PlaceModulesHorsPcb ) if( PlaceModulesHorsPcb && !EdgeExists ) { DisplayError( this, - _( "Could not automatically place modules. No board \ -edges detected." ) ); + _( "Could not automatically place modules. No board outlines detected." ) ); return; } diff --git a/pcbnew/dialog_gendrill_base.cpp b/pcbnew/dialog_gendrill_base.cpp index 0b9daf1b0d..bdf3678282 100644 --- a/pcbnew/dialog_gendrill_base.cpp +++ b/pcbnew/dialog_gendrill_base.cpp @@ -58,7 +58,7 @@ DIALOG_GENDRILL_BASE::DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id, con int m_Choice_Drill_MapNChoices = sizeof( m_Choice_Drill_MapChoices ) / sizeof( wxString ); m_Choice_Drill_Map = new wxRadioBox( this, wxID_ANY, _("Drill Sheet:"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_MapNChoices, m_Choice_Drill_MapChoices, 1, wxRA_SPECIFY_COLS ); m_Choice_Drill_Map->SetSelection( 0 ); - m_Choice_Drill_Map->SetToolTip( _("Creates a drill map in PSr HPGL or others formats") ); + m_Choice_Drill_Map->SetToolTip( _("Creates a drill map in PS, HPGL or others formats") ); bMiddleBoxSizer->Add( m_Choice_Drill_Map, 0, wxALL|wxEXPAND, 5 ); diff --git a/pcbnew/dialog_gendrill_base.fbp b/pcbnew/dialog_gendrill_base.fbp index dee44347e4..b291a58cb8 100644 --- a/pcbnew/dialog_gendrill_base.fbp +++ b/pcbnew/dialog_gendrill_base.fbp @@ -335,7 +335,7 @@ wxRA_SPECIFY_COLS - Creates a drill map in PSr HPGL or others formats + Creates a drill map in PS, HPGL or others formats From 9cf56261b6457205cb85a87ac1809c466f15510f Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 20 Jun 2010 16:47:30 +0200 Subject: [PATCH 2/9] give an icon to bitmapt2component frame --- bitmap2component/CMakeLists.txt | 12 +++++- bitmap2component/bitmap2cmp_gui.cpp | 4 +- bitmap2component/bitmap2component.cpp | 2 - bitmap2component/bitmap2component.xpm | 54 +++++++++++++++++++++++++++ eeschema/build_BOM.cpp | 18 +++++---- pcbnew/class_edge_mod.cpp | 6 +-- 6 files changed, 81 insertions(+), 15 deletions(-) create mode 100644 bitmap2component/bitmap2component.xpm diff --git a/bitmap2component/CMakeLists.txt b/bitmap2component/CMakeLists.txt index 455795469d..307b60dfb2 100644 --- a/bitmap2component/CMakeLists.txt +++ b/bitmap2component/CMakeLists.txt @@ -9,7 +9,17 @@ set(BITMAP2COMPONENT_SRCS bitmap2cmp_gui ) -add_executable(bitmap2component WIN32 MACOSX_BUNDLE ${BITMAP2COMPONENT_SRCS} ${BITMAP2COMPONENT_RESOURCES}) +if(WIN32) + if(MINGW) + # BITMAP2COMPONENT_RESOURCES variable is set by the macro. + mingw_resource_compiler(bitmap2component) + else(MINGW) + set(BITMAP2COMPONENT_RESOURCES bitmap2component.rc) + endif(MINGW) +endif(WIN32) +add_executable(bitmap2component WIN32 MACOSX_BUNDLE + ${BITMAP2COMPONENT_SRCS} + ${BITMAP2COMPONENT_RESOURCES}) target_link_libraries( bitmap2component diff --git a/bitmap2component/bitmap2cmp_gui.cpp b/bitmap2component/bitmap2cmp_gui.cpp index 999241c827..679c636446 100644 --- a/bitmap2component/bitmap2cmp_gui.cpp +++ b/bitmap2component/bitmap2cmp_gui.cpp @@ -29,6 +29,8 @@ #include "potracelib.h" #include "bitmap_io.h" +//#include "bitmap2component.xpm" + #define KEYWORD_FRAME_POSX wxT( "bmconverter_Pos_x" ) #define KEYWORD_FRAME_POSY wxT( "bmconverter_Pos_y" ) @@ -72,7 +74,6 @@ private: void ExportFile( FILE* aOutfile, int aFormat ); }; - BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL ) { m_Config = new wxConfig(); @@ -81,6 +82,7 @@ BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL ) m_Config->Read( KEYWORD_FRAME_SIZEX, & m_FrameSize.x, -1 ); m_Config->Read( KEYWORD_FRAME_SIZEY, & m_FrameSize.y, -1 ); + SetIcon( wxICON( bitmap2component_icon ) ); wxString msg( wxT( " 0000 " ) ); m_gridInfo->SetCellValue( 1, 0, msg ); diff --git a/bitmap2component/bitmap2component.cpp b/bitmap2component/bitmap2component.cpp index 8c67b3d742..f61f8348f6 100644 --- a/bitmap2component/bitmap2component.cpp +++ b/bitmap2component/bitmap2component.cpp @@ -32,10 +32,8 @@ #include #include "potracelib.h" -//#include "bitmap_io.h" #include "auxiliary.h" - #ifndef max #define max( a, b ) ( ( (a) > (b) ) ? (a) : (b) ) #endif diff --git a/bitmap2component/bitmap2component.xpm b/bitmap2component/bitmap2component.xpm new file mode 100644 index 0000000000..b33d7a583b --- /dev/null +++ b/bitmap2component/bitmap2component.xpm @@ -0,0 +1,54 @@ +/* XPM */ +static const char *bitmap2component_xpm[] = { +/* columns rows colors chars-per-pixel */ +"32 32 16 1", +"@ c #592904", +"# c #974704", +"$ c #5455D0", +"o c #090915", +"- c #2E1604", +"+ c #4B4BB5", +"* c #222352", +"X c #0F1128", +": c #BE5904", +" c #0CFA0C", +"% c #FC7A04", +"= c #323378", +"; c #753704", +"O c #3C3B8F", +"& c #DF6904", +". c #050204", +/* pixels */ +" . ..", +" .", +" ", +"........................ .. ", +"........................ .. ", +" X.oO ... ", +"+++X@#.X+ $ ... .", +"...o@%&@.*$$X.o= ... ..", +"....@%%%#-..-#;.... ........", +"....@%%&%&-.#%%-.... .......", +"....@%%%%;..;%&......====O+$ ", +"....@%%:-....o..............= ", +"....@&@.... +*O ......%%%%&#.X ", +"....-..... .....%%&%%%:...", +"OO O=+ . *.%%%%%&%@X ", +" ... =.%%%%%%%#..", +" . O.%%%%&%%;.=", +".......... .....%%%%%%%-..", +"....@@..... ......%%%%%%;...", +"....@%:-....X.........###;;-.= ", +"....@%%&#...-#@...........o*$ ", +"....@%%%%&-.#%%...... $ ", +"....@%%%%#..;%%..... .......", +"....@%%&-....-..... ........", +"XXXo@%;.X+ +*=$ ... ..", +" X-.oO ... .", +" X.= ... ", +"........................ .. ", +"........................ .. ", +" ", +" .", +" . .." +}; diff --git a/eeschema/build_BOM.cpp b/eeschema/build_BOM.cpp index 8ae9417846..94c9dae54c 100644 --- a/eeschema/build_BOM.cpp +++ b/eeschema/build_BOM.cpp @@ -798,7 +798,7 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart( for( int jj = FOOTPRINT; jj < currCmp->GetFieldCount(); jj++ ) { //Ensure fields exists in dummy component - if( dummyCmp.GetFieldCount() < currCmp->GetFieldCount() ) + if( dummyCmp.GetFieldCount() <= jj ) dummyCmp.AddField( *currCmp->GetField( jj ) ); // store useful data if( !currCmp->GetField( jj )->m_Text.IsEmpty() ) @@ -849,23 +849,27 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart( CONV_TO_UTF8( currCmp->GetField( DATASHEET) ->m_Text ) ); #endif + fprintf( f, "%c%s", s_ExportSeparatorSymbol, + CONV_TO_UTF8( RNames ) ); + // print fields, on demand - for( int jj = FIELD1; jj <= FIELD8 ; jj++ ) + int last_nonempty_field_idx = 0; + for( int jj = FOOTPRINT; jj < dummyCmp.GetFieldCount(); jj++ ) + if ( !dummyCmp.GetField( jj )->m_Text.IsEmpty() ) + last_nonempty_field_idx = jj; + for( int jj = FIELD1; jj <= last_nonempty_field_idx ; jj++ ) { - if( dummyCmp.GetFieldCount() >= jj ) - break; if ( IsFieldChecked( jj ) ) fprintf( f, "%c%4s", s_ExportSeparatorSymbol, CONV_TO_UTF8( dummyCmp.GetField( jj )->m_Text ) ); } - fprintf( f, "%c%s\n", s_ExportSeparatorSymbol, - CONV_TO_UTF8( RNames ) ); + fprintf( f, "\n" ); // Clear strings and values, to prepare next component qty = 0; RNames.Empty(); - for( int jj = FOOTPRINT; jj < currCmp->GetFieldCount(); jj++ ) + for( int jj = FOOTPRINT; jj < dummyCmp.GetFieldCount(); jj++ ) dummyCmp.GetField( jj )->m_Text.Empty(); } diff --git a/pcbnew/class_edge_mod.cpp b/pcbnew/class_edge_mod.cpp index 1f946ec046..509289409a 100644 --- a/pcbnew/class_edge_mod.cpp +++ b/pcbnew/class_edge_mod.cpp @@ -105,12 +105,10 @@ EDA_Rect EDGE_MODULE::GetBoundingBox() if( Module ) { RotatePoint( &pt.x, &pt.y, Module->m_Orient ); - pt.x += Module->m_Pos.x; - pt.y += Module->m_Pos.y; + pt += Module->m_Pos; } - pt.x += m_Start0.x; - pt.y += m_Start0.y; + pt += m_Start0; bbox.m_Pos.x = MIN( bbox.m_Pos.x, pt.x ); bbox.m_Pos.y = MIN( bbox.m_Pos.y, pt.y ); p_end.x = MAX( p_end.x, pt.x ); From 7d2ff522c1f846ec4803cb65d29ecf2a19a60dae Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 20 Jun 2010 20:04:29 +0200 Subject: [PATCH 3/9] give an icon to bitmapt2component frame --- bitmap2component/bitmap2cmp_gui.cpp | 8 ++++++-- bitmap2component/bitmap2component.ico | Bin 0 -> 2238 bytes bitmap2component/bitmap2component.rc | 2 ++ bitmap2component/bitmap2component.xpm | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 bitmap2component/bitmap2component.ico create mode 100644 bitmap2component/bitmap2component.rc diff --git a/bitmap2component/bitmap2cmp_gui.cpp b/bitmap2component/bitmap2cmp_gui.cpp index 679c636446..be1d52a68c 100644 --- a/bitmap2component/bitmap2cmp_gui.cpp +++ b/bitmap2component/bitmap2cmp_gui.cpp @@ -29,7 +29,7 @@ #include "potracelib.h" #include "bitmap_io.h" -//#include "bitmap2component.xpm" +#include "bitmap2component.xpm" #define KEYWORD_FRAME_POSX wxT( "bmconverter_Pos_x" ) @@ -82,9 +82,13 @@ BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL ) m_Config->Read( KEYWORD_FRAME_SIZEX, & m_FrameSize.x, -1 ); m_Config->Read( KEYWORD_FRAME_SIZEY, & m_FrameSize.y, -1 ); + #ifdef __WINDOWS__ SetIcon( wxICON( bitmap2component_icon ) ); + #else + SetIcon( wxICON( bitmap2component ) ); + #endif - wxString msg( wxT( " 0000 " ) ); + wxString msg( wxT( "000000" ) ); m_gridInfo->SetCellValue( 1, 0, msg ); m_gridInfo->SetCellValue( 2, 0, msg ); if( GetSizer() ) diff --git a/bitmap2component/bitmap2component.ico b/bitmap2component/bitmap2component.ico new file mode 100644 index 0000000000000000000000000000000000000000..476513d76f6110b8bd037cc5ed7c83c6ad845626 GIT binary patch literal 2238 zcmchZ&2HO96oo(8l4Z$1L>JAPXg4WP2>wCSfGmN^Bo)h+M1iC%2Owa`7U9q}DM6GI zI}5);mwko4K(~E{zCquk=%SaTtT;{GO@WTU;qabw@0@#P7J`!eR27-m`FS0l0ng=; z5Z}v_#XlLPB2xb9HRV@7@!P=X^IDDavj)E$ALD-c1Oj zXI-?^CQvQ<7cR3&n@N1aWo$FMF&HJ1pK7Q9w5&s^;c)%7OL%INs(tX9cyD~{(IMW< zzzYM~V+$vk(9Lz{R8K#HX_0TMbK=!m69?pq@d9cSo+Ue>Jw#4owwtFxnup_SYglS_;a5SOgy~EK{ zOsU^I>dCh+d&0fmXSXpT7|!v%H-vJ2vG_D?XfO;U)}?zG(dQVW?_;_lnsX|>s95$M zj@Q8SUNUe3x^9ep7IEMFfn9eloRF)-Tc+)Rz(1!WnjAC1^mUp8la8y2hJbrx$nI^M z;AId0g++)%+#fP^r7@?$z}(4swwL01cUVq}BlWvyA(F~Sr1`?5t2VG(J91BSu40pEB>i3o4DN<_Y8(4S4>!B3T?cnE z#2I_E!UpZ@9XfJJ?OhM!n>$Q3Mf0TBd59IpOs4x>O!v5n0^(#yczI5uhRk(bTZ@u4$CDe$^fT||r5;%h6%x3dBtIV;t2-o`_|h~C<&ZEc8m z`B>zy75H|YYOe2*ZG~XLrFwmRA&>360r7t;=NJ0KlIlbM3j~NA literal 0 HcmV?d00001 diff --git a/bitmap2component/bitmap2component.rc b/bitmap2component/bitmap2component.rc new file mode 100644 index 0000000000..98ff16a927 --- /dev/null +++ b/bitmap2component/bitmap2component.rc @@ -0,0 +1,2 @@ +bitmap2component_icon ICON bitmap2component.ico +#include "wx/msw/wx.rc" diff --git a/bitmap2component/bitmap2component.xpm b/bitmap2component/bitmap2component.xpm index b33d7a583b..e968612ef9 100644 --- a/bitmap2component/bitmap2component.xpm +++ b/bitmap2component/bitmap2component.xpm @@ -1,5 +1,5 @@ /* XPM */ -static const char *bitmap2component_xpm[] = { +const char *bitmap2component_xpm[] = { /* columns rows colors chars-per-pixel */ "32 32 16 1", "@ c #592904", From 000085792c39c7ef013795dff438cf58d0fab5d1 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 21 Jun 2010 18:15:05 +0200 Subject: [PATCH 4/9] minor enhancement --- bitmap2component/bitmap2cmp_gui.cpp | 58 ++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 18 deletions(-) diff --git a/bitmap2component/bitmap2cmp_gui.cpp b/bitmap2component/bitmap2cmp_gui.cpp index be1d52a68c..a376582919 100644 --- a/bitmap2component/bitmap2cmp_gui.cpp +++ b/bitmap2component/bitmap2cmp_gui.cpp @@ -23,6 +23,7 @@ */ #include "wx/wx.h" #include "wx/config.h" +#include "wx/filename.h" #include "bitmap2cmp_gui_base.h" @@ -32,10 +33,12 @@ #include "bitmap2component.xpm" -#define KEYWORD_FRAME_POSX wxT( "bmconverter_Pos_x" ) -#define KEYWORD_FRAME_POSY wxT( "bmconverter_Pos_y" ) -#define KEYWORD_FRAME_SIZEX wxT( "bmconverter_Size_x" ) -#define KEYWORD_FRAME_SIZEY wxT( "bmconverter_Size_y" ) +#define KEYWORD_FRAME_POSX wxT( "Bmconverter_Pos_x" ) +#define KEYWORD_FRAME_POSY wxT( "Bmconverter_Pos_y" ) +#define KEYWORD_FRAME_SIZEX wxT( "Bmconverter_Size_x" ) +#define KEYWORD_FRAME_SIZEY wxT( "Bmconverter_Size_y" ) +#define KEYWORD_LAST_INPUT_FILE wxT( "Last_input" ) +#define KEYWORD_LAST_OUTPUT_FILE wxT( "Last_output" ) extern int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile, int aFormat ); @@ -51,7 +54,8 @@ private: wxBitmap m_Greyscale_Bitmap; wxImage m_NB_Image; wxBitmap m_BN_Bitmap; - wxString m_ImgFileName; + wxString m_BitmapFileName; + wxString m_ConvertedFileName; wxSize m_FrameSize; wxPoint m_FramePos; wxConfig * m_Config; @@ -81,6 +85,8 @@ BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL ) m_Config->Read( KEYWORD_FRAME_POSY, & m_FramePos.y, -1 ); m_Config->Read( KEYWORD_FRAME_SIZEX, & m_FrameSize.x, -1 ); m_Config->Read( KEYWORD_FRAME_SIZEY, & m_FrameSize.y, -1 ); + m_Config->Read( KEYWORD_LAST_INPUT_FILE, &m_BitmapFileName ); + m_Config->Read( KEYWORD_LAST_OUTPUT_FILE, &m_ConvertedFileName ); #ifdef __WINDOWS__ SetIcon( wxICON( bitmap2component_icon ) ); @@ -89,8 +95,8 @@ BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL ) #endif wxString msg( wxT( "000000" ) ); + m_gridInfo->SetCellValue( 0, 0, msg ); m_gridInfo->SetCellValue( 1, 0, msg ); - m_gridInfo->SetCellValue( 2, 0, msg ); if( GetSizer() ) { GetSizer()->SetSizeHints( this ); @@ -114,6 +120,8 @@ BM2CMP_FRAME::~BM2CMP_FRAME() m_Config->Write( KEYWORD_FRAME_POSY, (long) m_FramePos.y ); m_Config->Write( KEYWORD_FRAME_SIZEX, (long) m_FrameSize.x ); m_Config->Write( KEYWORD_FRAME_SIZEY, (long) m_FrameSize.y ); + m_Config->Write( KEYWORD_LAST_INPUT_FILE, m_BitmapFileName ); + m_Config->Write( KEYWORD_LAST_OUTPUT_FILE, m_ConvertedFileName ); delete m_Config; @@ -142,18 +150,24 @@ void BM2CMP_FRAME::OnPaint( wxPaintEvent& event ) */ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event ) { - wxFileDialog FileDlg( this, _( "Choose Image" ), ::wxGetCwd(), wxEmptyString, + wxFileName fn(m_BitmapFileName); + wxString path = fn.GetPath(); + if( path.IsEmpty() || !wxDirExists(path) ) + path = wxGetCwd(); + + wxFileDialog FileDlg( this, _( "Choose Image" ), path, wxEmptyString, _( "Image Files " ) + wxImage::GetImageExtWildcard(), wxFD_OPEN ); int diag = FileDlg.ShowModal(); if( diag != wxID_OK ) return; - m_ImgFileName = FileDlg.GetPath(); - if( !m_Pict_Image.LoadFile( m_ImgFileName ) ) + m_BitmapFileName = FileDlg.GetPath(); + + if( !m_Pict_Image.LoadFile( m_BitmapFileName ) ) { - wxMessageBox( _( "Couldn't load image from '%s'." ), m_ImgFileName.c_str() ); + wxMessageBox( _( "Couldn't load image from <%s>" ), m_BitmapFileName.c_str() ); return; } @@ -242,22 +256,26 @@ void BM2CMP_FRAME::OnThresholdChange( wxScrollEvent& event ) void BM2CMP_FRAME::OnExportEeschema( wxCommandEvent& event ) { + wxFileName fn(m_ConvertedFileName); + wxString path = fn.GetPath(); + if( path.IsEmpty() || !wxDirExists(path) ) + path = ::wxGetCwd(); wxString msg = _( "Schematic lib file (*.lib)|*.lib" ); - wxFileDialog FileDlg( this, _( "Create lib file" ), ::wxGetCwd(), wxEmptyString, + wxFileDialog FileDlg( this, _( "Create lib file" ), path, wxEmptyString, msg, wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); int diag = FileDlg.ShowModal(); if( diag != wxID_OK ) return; - wxString filename = FileDlg.GetPath(); + m_ConvertedFileName = FileDlg.GetPath(); FILE* outfile; - outfile = wxFopen( filename, wxT( "w" ) ); + outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) ); if( outfile == NULL ) { wxString msg; - msg.Printf( _( "File %s could not be created" ), filename.c_str() ); + msg.Printf( _( "File %s could not be created" ), m_ConvertedFileName.c_str() ); wxMessageBox( msg ); return; } @@ -269,22 +287,26 @@ void BM2CMP_FRAME::OnExportEeschema( wxCommandEvent& event ) void BM2CMP_FRAME::OnExportPcbnew( wxCommandEvent& event ) { + wxFileName fn(m_ConvertedFileName); + wxString path = fn.GetPath(); + if( path.IsEmpty() || !wxDirExists(path) ) + path = ::wxGetCwd(); wxString msg = _( "Footprint export file (*.emp)|*.emp" ); - wxFileDialog FileDlg( this, _( "Create footprint export file" ), ::wxGetCwd(), wxEmptyString, + wxFileDialog FileDlg( this, _( "Create footprint export file" ), path, wxEmptyString, msg, wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); int diag = FileDlg.ShowModal(); if( diag != wxID_OK ) return; - wxString filename = FileDlg.GetPath(); + m_ConvertedFileName = FileDlg.GetPath(); FILE* outfile; - outfile = wxFopen( filename, wxT( "w" ) ); + outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) ); if( outfile == NULL ) { wxString msg; - msg.Printf( _( "File %s could not be created" ), filename.c_str() ); + msg.Printf( _( "File %s could not be created" ), m_ConvertedFileName.c_str() ); wxMessageBox( msg ); return; } From 3543ba65de82075fa016a1aef3288fd44bc93b6a Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 23 Jun 2010 19:00:12 +0200 Subject: [PATCH 5/9] ++eeschema: In netlist generation, changed the rule to calculate netnames of nets with labels: Previously, named nets (i.e. nets with local, hierarchical or global labels) have their name defined by the first label found in list. So net names could be changed without really changing the schematic. Now the names are calculated from the rules (by priority order) : 1 - use the most top level labels in hierarchies. 2 - use global labels first, local labels next (hidden power pins names are global labels). 3 - use alphabetic sort (so, if GND and AGND are connected, the net will be always named AGND, and adding a VSS connection cannot change the net name) So power nets and nets that have more than one label cannot have their netname changed if there is no actual change relative to these nets names in schematic --- CHANGELOG.txt | 16 +++ demos/pic_programmer/pic_programmer.pro | 6 +- eeschema/class_netlist_object.cpp | 17 +-- eeschema/class_netlist_object.h | 16 +-- eeschema/netform.cpp | 116 ++++++++------------ eeschema/netlist.cpp | 137 ++++++++++++++++++++++-- 6 files changed, 211 insertions(+), 97 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 90b8691d87..5e625f6add 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,22 @@ KiCad ChangeLog 2010 Please add newer entries at the top, list the date and your name with email address. +2010-jun-23, UPDATE Jean-Pierre Charras +================================================================================ +++eeschema: + In netlist generation, changed the rule to calculate netnames of nets with labels: + Previously, named nets (i.e. nets with local, hierarchical or global labels) have their name + defined by the first label found in list. + So net names could be changed without really changing the schematic. + Now the names are calculated from the rules (by priority order) : + 1 - use the most top level labels in hierarchies. + 2 - use global labels first, local labels next (hidden power pins names are global labels). + 3 - use alphabetic sort (so, if GND and AGND are connected, the net will be always named AGND, + and adding a VSS connection cannot change the net name) + So power nets and nets that have more than one label cannot have their netname changed + if there is no actual change relative to these nets names in schematic + + 2010-Jun-17 UPDATE Dick Hollenbeck ================================================================================ ++eeschema: diff --git a/demos/pic_programmer/pic_programmer.pro b/demos/pic_programmer/pic_programmer.pro index 868476ee83..750daa8a11 100644 --- a/demos/pic_programmer/pic_programmer.pro +++ b/demos/pic_programmer/pic_programmer.pro @@ -1,4 +1,4 @@ -update=12/06/2010 08:55:18 +update=23/06/2010 18:43:01 last_client=pcbnew [general] version=1 @@ -17,8 +17,8 @@ NetDir= [pcbnew] version=1 PadDrlX=320 -PadDimH=700 -PadDimV=700 +PadDimH=620 +PadDimV=1100 BoardThickness=630 SgPcb45=1 TxtPcbV=800 diff --git a/eeschema/class_netlist_object.cpp b/eeschema/class_netlist_object.cpp index 66c210d5a0..1277664e42 100644 --- a/eeschema/class_netlist_object.cpp +++ b/eeschema/class_netlist_object.cpp @@ -100,10 +100,10 @@ NETLIST_OBJECT::NETLIST_OBJECT() { m_Type = NET_ITEM_UNSPECIFIED; /* Type of this item (see NetObjetType enum) */ m_Comp = NULL; /* Pointer on the library item that created this net object (the parent)*/ - m_Link = NULL; /* For SCH_SHEET_PIN: - * Pointer to the hierarchy sheet that contains this SCH_SHEET_PIN - * For Pins: pointer to the component that contains this pin - */ + m_Link = NULL; /* For SCH_SHEET_PIN: + * Pointer to the hierarchy sheet that contains this SCH_SHEET_PIN + * For Pins: pointer to the component that contains this pin + */ m_Flag = 0; /* flag used in calculations */ m_ElectricalType = 0; /* Has meaning only for Pins and hierachical pins: electrical type */ m_NetCode = 0; /* net code for all items except BUS labels because a BUS label has @@ -116,16 +116,21 @@ NETLIST_OBJECT::NETLIST_OBJECT() m_FlagOfConnection = UNCONNECTED; m_PinNum = 0; /* pin number ( 1 long = 4 bytes -> 4 ascii codes) */ m_Label = 0; /* For all labels:pointer on the text label */ + m_NetNameCandidate = NULL; /* a pointer to a NETLIST_OBJECT type label connected to this object + * used to give a name to the net + */ } + // Copy constructor NETLIST_OBJECT::NETLIST_OBJECT( NETLIST_OBJECT& aSource ) { - *this = aSource; - m_Label = NULL; // set to null because some items are owner, so the delete operator can create problems + *this = aSource; + m_Label = NULL; // set to null because some items are owner, so the delete operator can create problems // if this member is copied here (if 2 different items are owner of the same object) } + NETLIST_OBJECT::~NETLIST_OBJECT() { /* NETLIST_OBJECT is owner of m_Label only if its type is diff --git a/eeschema/class_netlist_object.h b/eeschema/class_netlist_object.h index 0fda5cf496..1ed96afe60 100644 --- a/eeschema/class_netlist_object.h +++ b/eeschema/class_netlist_object.h @@ -64,18 +64,18 @@ public: * For Pins: pointer to the component * that contains this pin */ - int m_Flag; /* flag used in calculations */ - SCH_SHEET_PATH m_SheetList; - int m_ElectricalType; /* Has meaning only for Pins and + int m_Flag; /* flag used in calculations */ + SCH_SHEET_PATH m_SheetList; + int m_ElectricalType; /* Has meaning only for Pins and * hierarchical pins: electrical type */ private: - int m_NetCode; /* net code for all items except BUS + int m_NetCode; /* net code for all items except BUS * labels because a BUS label has * as many net codes as bus members */ public: - int m_BusNetCode; /* Used for BUS connections */ - int m_Member; /* for labels type NET_BUSLABELMEMBER + int m_BusNetCode; /* Used for BUS connections */ + int m_Member; /* for labels type NET_BUSLABELMEMBER * ( bus member created from the BUS * label ) member number */ @@ -90,6 +90,10 @@ public: // starting point wxPoint m_End; // For segments (wire and buses): // ending point + NETLIST_OBJECT* m_NetNameCandidate; /* a pointer to a label connected to the net, + * that can be used to give a name to the net + * NULL if no usable label + */ #if defined(DEBUG) void Show( std::ostream& out, int ndx ); diff --git a/eeschema/netform.cpp b/eeschema/netform.cpp index ed1023dd0f..330475a197 100644 --- a/eeschema/netform.cpp +++ b/eeschema/netform.cpp @@ -212,43 +212,29 @@ static wxString ReturnPinNetName( NETLIST_OBJECT* Pin, wxString NetName; if( (netcode == 0 ) || ( Pin->m_FlagOfConnection != PAD_CONNECT ) ) - { return NetName; + + NETLIST_OBJECT* netref = Pin->m_NetNameCandidate; + if( netref ) + NetName = *netref->m_Label; + + if( !NetName.IsEmpty() ) + { + // prefix non global labels names by the sheet path, to avoid names collisions + if( netref->m_Type != NET_PINLABEL ) + { + wxString lnet = NetName; + NetName = netref->m_SheetList.PathHumanReadable(); + + // If sheet path is too long, use the time stamp name instead + if( NetName.Length() > 32 ) + NetName = netref->m_SheetList.Path(); + NetName += lnet; + } } else - { - unsigned jj; - for( jj = 0; jj < g_NetObjectslist.size(); jj++ ) - { - if( g_NetObjectslist[jj]->GetNet() != netcode ) - continue; - if( ( g_NetObjectslist[jj]->m_Type != NET_HIERLABEL) - && ( g_NetObjectslist[jj]->m_Type != NET_LABEL) - && ( g_NetObjectslist[jj]->m_Type != NET_PINLABEL) ) - continue; + NetName.Printf( DefaultFormatNetname.GetData(), netcode ); - NetName = *g_NetObjectslist[jj]->m_Label; - break; - } - - if( !NetName.IsEmpty() ) - { - if( g_NetObjectslist[jj]->m_Type != NET_PINLABEL ) - { - wxString lnet = NetName; - NetName = g_NetObjectslist[jj]->m_SheetList.PathHumanReadable(); - - // If sheet path is too long, use the time stamp name instead - if( NetName.Length() > 32 ) - NetName = g_NetObjectslist[jj]->m_SheetList.Path(); - NetName += lnet; - } - } - else - { - NetName.Printf( DefaultFormatNetname.GetData(), netcode ); - } - } return NetName; } @@ -890,31 +876,22 @@ static void WriteGENERICListOfNets( FILE* f, NETLIST_OBJECT_LIST& aObjectsList ) { SameNetcodeCount = 0; // Items count for this net NetName.Empty(); - unsigned jj; // Find a label (if exists) for this net. - for( jj = 0; jj < aObjectsList.size(); jj++ ) - { - if( aObjectsList[jj]->GetNet() != NetCode ) - continue; - if( ( aObjectsList[jj]->m_Type != NET_HIERLABEL) - && ( aObjectsList[jj]->m_Type != NET_LABEL) - && ( aObjectsList[jj]->m_Type != NET_PINLABEL) ) - continue; - - NetName = *aObjectsList[jj]->m_Label; - break; - } + NETLIST_OBJECT* netref; + netref = aObjectsList[ii]->m_NetNameCandidate; + if( netref ) + NetName = *netref->m_Label; NetcodeName.Printf( wxT( "Net %d " ), NetCode ); NetcodeName += wxT( "\"" ); if( !NetName.IsEmpty() ) { - if( aObjectsList[jj]->m_Type != NET_PINLABEL ) + if( netref->m_Type != NET_PINLABEL ) { // usual net name, prefix it by the sheet path NetcodeName += - aObjectsList[jj]->m_SheetList.PathHumanReadable(); + netref->m_SheetList.PathHumanReadable(); } NetcodeName += NetName; } @@ -957,6 +934,7 @@ static void WriteGENERICListOfNets( FILE* f, NETLIST_OBJECT_LIST& aObjectsList ) if( SameNetcodeCount >= 2 ) fprintf( f, " %s %.4s\n", CONV_TO_UTF8( CmpRef ), (const char*) &aObjectsList[ii]->m_PinNum ); + } } @@ -1069,7 +1047,7 @@ static void WriteListOfNetsCADSTAR( FILE* f, NETLIST_OBJECT_LIST& aObjectsList ) wxString InitNetDesc = StartLine + wxT( "ADD_TER" ); wxString StartNetDesc = StartLine + wxT( "TER" ); wxString NetcodeName, InitNetDescLine; - unsigned ii, jj; + unsigned ii; int print_ter = 0; int NetCode, LastNetCode = -1; SCH_COMPONENT* Cmp; @@ -1084,31 +1062,21 @@ static void WriteListOfNetsCADSTAR( FILE* f, NETLIST_OBJECT_LIST& aObjectsList ) if( ( NetCode = aObjectsList[ii]->GetNet() ) != LastNetCode ) { NetName.Empty(); - for( jj = 0; jj < aObjectsList.size(); jj++ ) - { - if( aObjectsList[jj]->GetNet() != NetCode ) - continue; - if( ( aObjectsList[jj]->m_Type != NET_HIERLABEL) - && ( aObjectsList[jj]->m_Type != NET_LABEL) - && ( aObjectsList[jj]->m_Type != NET_PINLABEL) ) - continue; - - NetName = *aObjectsList[jj]->m_Label; break; - } + NETLIST_OBJECT* netref; + netref = aObjectsList[ii]->m_NetNameCandidate; + if( netref ) + NetName = *netref->m_Label; NetcodeName = wxT( "\"" ); if( !NetName.IsEmpty() ) { - NetcodeName += NetName; - if( aObjectsList[jj]->m_Type != NET_PINLABEL ) + if( netref->m_Type != NET_PINLABEL ) { - NetcodeName = - aObjectsList[jj]->m_SheetList.PathHumanReadable() - + NetcodeName; - - //NetcodeName << wxT("_") << - // g_NetObjectslist[jj].m_SheetList.PathHumanReadable(); + // usual net name, prefix it by the sheet path + NetcodeName += + netref->m_SheetList.PathHumanReadable(); } + NetcodeName += NetName; } else // this net has no name: create a default name $ NetcodeName << wxT( "$" ) << NetCode; @@ -1139,10 +1107,10 @@ static void WriteListOfNetsCADSTAR( FILE* f, NETLIST_OBJECT_LIST& aObjectsList ) buf[4] = 0; str_pinnum = CONV_FROM_UTF8( buf ); InitNetDescLine.Printf( wxT( "\n%s %s %.4s %s" ), - InitNetDesc.GetData(), - refstr.GetData(), - str_pinnum.GetData(), - NetcodeName.GetData() ); + GetChars(InitNetDesc), + GetChars(refstr), + GetChars(str_pinnum), + GetChars(NetcodeName) ); } print_ter++; break; @@ -1165,9 +1133,9 @@ static void WriteListOfNetsCADSTAR( FILE* f, NETLIST_OBJECT_LIST& aObjectsList ) aObjectsList[ii]->m_Flag = 1; - // Search for redundant pins to avoid generation the same connection + // Search for redundant pins to avoid generation of the same connection // more than once. - for( jj = ii + 1; jj < aObjectsList.size(); jj++ ) + for( unsigned jj = ii + 1; jj < aObjectsList.size(); jj++ ) { if( aObjectsList[jj]->GetNet() != NetCode ) break; diff --git a/eeschema/netlist.cpp b/eeschema/netlist.cpp index aa521546ff..04a038d64e 100644 --- a/eeschema/netlist.cpp +++ b/eeschema/netlist.cpp @@ -22,8 +22,8 @@ NETLIST_OBJECT_LIST g_NetObjectslist; static void PropageNetCode( int OldNetCode, int NewNetCode, int IsBus ); static void SheetLabelConnect( NETLIST_OBJECT* SheetLabel ); -static void ListeObjetConnection( SCH_SHEET_PATH* sheetlist, - NETLIST_OBJECT_LIST& aNetItemBuffer ); +static void AddConnectedObjects( SCH_SHEET_PATH* sheetlist, + NETLIST_OBJECT_LIST& aNetItemBuffer ); static int ConvertBusToMembers( NETLIST_OBJECT_LIST& aNetItemBuffer, NETLIST_OBJECT& ObjNet ); static void PointToPointConnect( NETLIST_OBJECT* Ref, int IsBus, int start ); static void SegmentToPointConnect( NETLIST_OBJECT* Jonction, int IsBus, int start ); @@ -31,10 +31,14 @@ static void LabelConnect( NETLIST_OBJECT* Label ); static void ConnectBusLabels( NETLIST_OBJECT_LIST& aNetItemBuffer ); static void SetUnconnectedFlag( NETLIST_OBJECT_LIST& aNetItemBuffer ); +static void FindBestNetNameForEachNet( NETLIST_OBJECT_LIST& aNetItemBuffer ); +static NETLIST_OBJECT* FindBestNetName( NETLIST_OBJECT_LIST& aLabelItemBuffer ); + // Sort functions used here: static bool SortItemsbyNetcode( const NETLIST_OBJECT* Objet1, const NETLIST_OBJECT* Objet2 ); static bool SortItemsBySheet( const NETLIST_OBJECT* Objet1, const NETLIST_OBJECT* Objet2 ); +// Local variables static int FirstNumWireBus, LastNumWireBus, RootBusNameLength; static int LastNetCode, LastBusNetCode; @@ -93,7 +97,7 @@ void WinEDA_SchematicFrame::BuildNetListBase() sheet = SheetListList.GetFirst(); for( ; sheet != NULL; sheet = SheetListList.GetNext() ) - ListeObjetConnection( sheet, g_NetObjectslist ); + AddConnectedObjects( sheet, g_NetObjectslist ); if( g_NetObjectslist.size() == 0 ) return; // no objects @@ -290,9 +294,126 @@ void WinEDA_SchematicFrame::BuildNetListBase() /* Assignment of m_FlagOfConnection based connection or not. */ SetUnconnectedFlag( g_NetObjectslist ); + + /* find the best label object to give the best net name to each net */ + FindBestNetNameForEachNet( g_NetObjectslist ); } +/** function FindBestNetNameForEachNet + * fill the .m_NetNameCandidate member of each item of aNetItemBuffer + * with a reference to the "best" NETLIST_OBJECT usable to give a name to the net + * If no suitable object found, .m_NetNameCandidate is filled with 0. + * The "best" NETLIST_OBJECT is a NETLIST_OBJECT that have the type label + * and by priority order: + * the label is global or local + * the label is in the first sheet in a hierarchy (the root sheet has the most priority) + * alphabetic order. + */ +void FindBestNetNameForEachNet( NETLIST_OBJECT_LIST& aNetItemBuffer ) +{ + NETLIST_OBJECT_LIST candidates; + int netcode = 0; // current netcode for tested items + unsigned idxstart = 0; // index of the first item of this net + for( unsigned ii = 0; ii <= aNetItemBuffer.size(); ii++ ) + { + NETLIST_OBJECT* item; + + if( ii == aNetItemBuffer.size() ) // last item already found + netcode = -2; + else + item = aNetItemBuffer[ii]; + if( netcode != item->GetNet() ) // End of net found + { + if( candidates.size() ) // O,e or more labels exists, find the best + { + NETLIST_OBJECT* bestlabel = FindBestNetName( candidates ); + for (unsigned jj = idxstart; jj < ii; jj++ ) + aNetItemBuffer[jj]->m_NetNameCandidate = bestlabel; + } + if( netcode == -2 ) + break; + netcode = item->GetNet(); + candidates.clear(); + idxstart = ii; + } + switch( item->m_Type ) + { + case NET_HIERLABEL: + case NET_LABEL: + case NET_PINLABEL: + candidates.push_back( item ); + break; + + default: + break; + } + } +} + +/** Function FindBestNetName + * @return a reference to the "best" label that can be used to give a name + * to a net. + * @param aLabelItemBuffer = list of NETLIST_OBJECT type labels candidates. + * labels are local labels, hierarchical labels or pin labels + * labels in included sheets have a lower priority than labels in the current sheet. + * so labels inside the root sheet have the highter priority. + * pin labels are global labels and have the highter priority + * local labels have the lower priority + * labels having the same priority are sorted by alphabetic order. + * + */ +static NETLIST_OBJECT* FindBestNetName( NETLIST_OBJECT_LIST& aLabelItemBuffer ) +{ + if( aLabelItemBuffer.size() == 0 ) + return NULL; + + NETLIST_OBJECT*item = aLabelItemBuffer[0]; + + for( unsigned ii = 1; ii < aLabelItemBuffer.size(); ii++ ) + { + NETLIST_OBJECT* candidate = aLabelItemBuffer[ii]; + if( candidate->m_SheetList.Path().Length() < item->m_SheetList.Path().Length() ) + { + item = candidate; + continue; + } + switch ( item->m_Type ) + { + case NET_HIERLABEL: + if( candidate->m_Type == NET_PINLABEL ) + item = candidate; + else if( candidate->m_Type == NET_HIERLABEL ) + { + if( candidate->m_Label->Cmp(*item->m_Label) < 0 ) + item = candidate; + } + break; + + case NET_LABEL: + if( candidate->m_Type == NET_LABEL ) + { + if( candidate->m_Label->Cmp(*item->m_Label) < 0 ) + item = candidate; + } + else + item = candidate; + break; + + case NET_PINLABEL: + if( candidate->m_Type != NET_PINLABEL ) + break; + if( candidate->m_Label->Cmp(*item->m_Label) < 0 ) + item = candidate; + break; + + default: // Should not occur. + break; + } + } + return item; +} + /* * Connect sheets by sheetLabels */ @@ -332,7 +453,7 @@ static void SheetLabelConnect( NETLIST_OBJECT* SheetLabel ) } -/** Function ListeObjetConnection +/** Function AddConnectedObjects * Creates the list of objects related to connections (pins of components, * wires, labels, junctions ...) * @@ -340,8 +461,8 @@ static void SheetLabelConnect( NETLIST_OBJECT* SheetLabel ) * @param aNetItemBuffer: a std::vector to store pointer on NETLIST_OBJECT * created */ -static void ListeObjetConnection( SCH_SHEET_PATH* sheetlist, - std::vector& aNetItemBuffer ) +static void AddConnectedObjects( SCH_SHEET_PATH* sheetlist, + std::vector& aNetItemBuffer ) { int ii; SCH_ITEM* DrawList; @@ -563,7 +684,7 @@ static void ListeObjetConnection( SCH_SHEET_PATH* sheetlist, { wxString msg; msg.Printf( wxT( "Netlist: unexpected struct type %d" ), - DrawList->Type() ); + DrawList->Type() ); wxMessageBox( msg ); break; } @@ -663,7 +784,7 @@ int IsBusLabel( const wxString& LabelDrawList ) } if( !BufLine.ToLong( &tmp ) ) - error = TRUE; ; + error = TRUE;; LastNumWireBus = tmp; if( FirstNumWireBus < 0 ) From e1b5d49f1bbdab3ba2fb9a7a300f16b0300eebe3 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Thu, 24 Jun 2010 14:31:43 -0400 Subject: [PATCH 6/9] EESchema component library and hierarchical sheet label object improvements. * Continue component library class clean up and encapsulation work. * Change hierarchical sheet label container to boost::vector_ptr. * Encapsulate hierarchical label handling in hierarchical sheet class. * Convert some missed occurrences of wxString::GetData() to GetChars( wxString ). * Fix some minor code formatting issues. --- eeschema/block.cpp | 9 +- eeschema/build_BOM.cpp | 44 +- eeschema/class_drawsheet.cpp | 269 +++++++---- eeschema/class_drawsheet.h | 148 +++++- eeschema/class_hierarchical_PIN_sheet.cpp | 74 ++- eeschema/class_libentry.cpp | 54 +-- eeschema/class_libentry.h | 110 +++-- eeschema/class_netlist_object.cpp | 62 +-- eeschema/class_netlist_object.h | 3 +- eeschema/class_pin.cpp | 8 +- eeschema/class_sch_component.cpp | 2 +- eeschema/dangling_ends.cpp | 15 +- eeschema/delete.cpp | 45 +- eeschema/dialog_create_component.cpp | 8 +- eeschema/dialog_edit_component_in_lib.cpp | 10 +- .../dialog_edit_component_in_schematic.cpp | 2 +- eeschema/edit_component_in_lib.cpp | 24 +- eeschema/erc.cpp | 19 +- eeschema/libedit.cpp | 22 +- eeschema/load_one_schematic_file.cpp | 58 ++- eeschema/locate.cpp | 26 +- eeschema/netform.cpp | 101 ++-- eeschema/netlist.cpp | 54 +-- eeschema/netlist.h | 2 +- eeschema/onrightclick.cpp | 452 +++++++----------- eeschema/plot.cpp | 12 +- ...from_file_schematic_items_descriptions.cpp | 23 +- eeschema/schedit.cpp | 29 +- eeschema/sheet.cpp | 25 +- eeschema/sheetlab.cpp | 103 ++-- eeschema/symbedit.cpp | 6 +- 31 files changed, 874 insertions(+), 945 deletions(-) diff --git a/eeschema/block.cpp b/eeschema/block.cpp index bec948e353..03a65e0ead 100644 --- a/eeschema/block.cpp +++ b/eeschema/block.cpp @@ -675,13 +675,12 @@ static void CollectStructsToDrag( SCH_SCREEN* screen ) if( Struct->Type() == DRAW_SHEET_STRUCT_TYPE ) { + SCH_SHEET* sheet = (SCH_SHEET*) Struct; + // Add all pins sheets of a selected hierarchical sheet to the list - SCH_SHEET_PIN* SLabel = ( (SCH_SHEET*) Struct )->m_Label; - while( SLabel ) + BOOST_FOREACH( SCH_SHEET_PIN label, sheet->GetSheetPins() ) { - if( SLabel->Type() == DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE ) - AddPickedItem( screen, SLabel->m_Pos ); - SLabel = (SCH_SHEET_PIN*) SLabel->Next(); + AddPickedItem( screen, label.m_Pos ); } } diff --git a/eeschema/build_BOM.cpp b/eeschema/build_BOM.cpp index 94c9dae54c..1f4613b7b9 100644 --- a/eeschema/build_BOM.cpp +++ b/eeschema/build_BOM.cpp @@ -340,31 +340,28 @@ void BuildComponentsListFromSchematic( std::vector & aList ) { EDA_BaseStruct* SchItem; SCH_COMPONENT* DrawLibItem; - SCH_SHEET_PATH* sheet; + SCH_SHEET_PATH* sheetPath; /* Build the sheet (not screen) list */ SCH_SHEET_LIST SheetList; - for( sheet = SheetList.GetFirst(); - sheet != NULL; - sheet = SheetList.GetNext() ) + for( sheetPath = SheetList.GetFirst(); sheetPath != NULL; sheetPath = SheetList.GetNext() ) { - for( SchItem = sheet->LastDrawList(); SchItem; - SchItem = SchItem->Next() ) + for( SchItem = sheetPath->LastDrawList(); SchItem; SchItem = SchItem->Next() ) { if( SchItem->Type() != TYPE_SCH_COMPONENT ) continue; DrawLibItem = (SCH_COMPONENT*) SchItem; - DrawLibItem->SetParent( sheet->LastScreen() ); + DrawLibItem->SetParent( sheetPath->LastScreen() ); OBJ_CMP_TO_LIST item; item.m_RootCmp = DrawLibItem; - item.m_SheetPath = *sheet; - item.m_Unit = DrawLibItem->GetUnitSelection( sheet ); + item.m_SheetPath = *sheetPath; + item.m_Unit = DrawLibItem->GetUnitSelection( sheetPath ); strncpy( item.m_Reference, - CONV_TO_UTF8( DrawLibItem->GetRef( sheet ) ), - sizeof( item.m_Reference ) ); + CONV_TO_UTF8( DrawLibItem->GetRef( sheetPath ) ), + sizeof( item.m_Reference ) ); // Ensure always null terminate m_Ref. item.m_Reference[sizeof( item.m_Reference ) - 1 ] = 0; @@ -384,19 +381,17 @@ void BuildComponentsListFromSchematic( std::vector & aList ) static void GenListeGLabels( std::vector & aList ) { SCH_ITEM* DrawList; - SCH_SHEET_PIN* PinLabel; - SCH_SHEET_PATH* sheet; + SCH_SHEET_PATH* sheetPath; /* Build the sheet list */ SCH_SHEET_LIST SheetList; LABEL_OBJECT labet_object; - for( sheet = SheetList.GetFirst(); - sheet != NULL; - sheet = SheetList.GetNext() ) + for( sheetPath = SheetList.GetFirst(); sheetPath != NULL; sheetPath = SheetList.GetNext() ) { - DrawList = (SCH_ITEM*) sheet->LastDrawList(); + DrawList = (SCH_ITEM*) sheetPath->LastDrawList(); + while( DrawList ) { switch( DrawList->Type() ) @@ -404,22 +399,21 @@ static void GenListeGLabels( std::vector & aList ) case TYPE_SCH_HIERLABEL: case TYPE_SCH_GLOBALLABEL: labet_object.m_LabelType = DrawList->Type(); - labet_object.m_SheetPath = *sheet; + labet_object.m_SheetPath = *sheetPath; labet_object.m_Label = DrawList; aList.push_back( labet_object ); break; case DRAW_SHEET_STRUCT_TYPE: { - PinLabel = ( (SCH_SHEET*) DrawList )->m_Label; - while( PinLabel != NULL ) + SCH_SHEET* sheet = (SCH_SHEET*) DrawList; + + BOOST_FOREACH( SCH_SHEET_PIN sheetLabel, sheet->GetSheetPins() ) { - labet_object.m_LabelType = - DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE; - labet_object.m_SheetPath = *sheet; - labet_object.m_Label = PinLabel; + labet_object.m_LabelType = DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE; + labet_object.m_SheetPath = *sheetPath; + labet_object.m_Label = &sheetLabel; aList.push_back( labet_object ); - PinLabel = PinLabel->Next(); } } break; diff --git a/eeschema/class_drawsheet.cpp b/eeschema/class_drawsheet.cpp index e5d3b7f8b5..7810baf21d 100644 --- a/eeschema/class_drawsheet.cpp +++ b/eeschema/class_drawsheet.cpp @@ -25,8 +25,6 @@ SCH_SHEET::SCH_SHEET( const wxPoint& pos ) : SCH_ITEM( NULL, DRAW_SHEET_STRUCT_TYPE ) { - m_Label = NULL; - m_NbLabel = 0; m_Layer = LAYER_SHEET; m_Pos = pos; m_TimeStamp = GetTimeStamp(); @@ -39,20 +37,12 @@ SCH_SHEET::SCH_SHEET( const wxPoint& pos ) : SCH_SHEET::~SCH_SHEET() { - SCH_SHEET_PIN* label = m_Label, * next_label; - - while( label ) - { - next_label = label->Next(); - delete label; - label = next_label; - } - // also, look at the associated sheet & its reference count // perhaps it should be deleted also. if( m_AssociatedScreen ) { m_AssociatedScreen->m_RefCount--; + if( m_AssociatedScreen->m_RefCount == 0 ) delete m_AssociatedScreen; } @@ -66,8 +56,6 @@ SCH_SHEET::~SCH_SHEET() */ bool SCH_SHEET::Save( FILE* aFile ) const { - SCH_SHEET_PIN* SheetLabel; - if( fprintf( aFile, "$Sheet\n" ) == EOF || fprintf( aFile, "S %-4d %-4d %-4d %-4d\n", m_Pos.x, m_Pos.y, m_Size.x, m_Size.y ) == EOF ) @@ -92,15 +80,12 @@ bool SCH_SHEET::Save( FILE* aFile ) const return false; } - /* Create the list of labels in the sheet. */ - SheetLabel = m_Label; - int l_id = 2; - while( SheetLabel != NULL ) + /* Save the list of labels in the sheet. */ + + BOOST_FOREACH( const SCH_SHEET_PIN& label, m_labels ) { - SheetLabel->m_Number = l_id; - SheetLabel->Save( aFile ); - l_id++; - SheetLabel = SheetLabel->Next(); + if( !label.Save( aFile ) ) + return false; } if( fprintf( aFile, "$EndSheet\n" ) == EOF ) @@ -132,24 +117,14 @@ SCH_SHEET* SCH_SHEET::GenCopy() */ newitem->m_SheetNameSize = m_SheetNameSize; - newitem->m_Label = NULL; - - SCH_SHEET_PIN* Slabel = NULL, * label = m_Label; - - if( label ) + BOOST_FOREACH( SCH_SHEET_PIN& sheetPin, m_labels ) { - Slabel = newitem->m_Label = label->GenCopy(); - Slabel->SetParent( newitem ); - label = label->Next(); + SCH_SHEET_PIN* newSheetPin = sheetPin.GenCopy(); + newSheetPin->SetParent( newitem ); + newitem->GetSheetPins().push_back( newSheetPin ); } - while( label ) - { - Slabel->SetNext( label->GenCopy() ); - Slabel = Slabel->Next(); - Slabel->SetParent( newitem ); - label = label->Next(); - } + newitem->renumberLabels(); /* don't copy screen data - just reference it. */ newitem->m_AssociatedScreen = m_AssociatedScreen; @@ -170,27 +145,95 @@ void SCH_SHEET::SwapData( SCH_SHEET* copyitem ) EXCHG( m_SheetName, copyitem->m_SheetName ); EXCHG( m_SheetNameSize, copyitem->m_SheetNameSize ); EXCHG( m_FileNameSize, copyitem->m_FileNameSize ); - EXCHG( m_Label, copyitem->m_Label ); - EXCHG( m_NbLabel, copyitem->m_NbLabel ); + m_labels.swap( copyitem->m_labels ); // Ensure sheet labels have their .m_Parent member pointing really on their // parent, after swapping. - SCH_SHEET_PIN* label = m_Label; - while( label ) + BOOST_FOREACH( SCH_SHEET_PIN& sheetPin, m_labels ) { - label->SetParent( this ); - label = label->Next(); + sheetPin.SetParent( this ); } - label = copyitem->m_Label; - while( label ) + BOOST_FOREACH( SCH_SHEET_PIN& sheetPin, copyitem->m_labels ) { - label->SetParent( copyitem ); - label = label->Next(); + sheetPin.SetParent( copyitem ); } } +void SCH_SHEET::AddLabel( SCH_SHEET_PIN* aLabel ) +{ + wxASSERT( aLabel != NULL ); + wxASSERT( aLabel->Type() == DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE ); + + m_labels.push_back( aLabel ); + renumberLabels(); +} + + +void SCH_SHEET::RemoveLabel( SCH_SHEET_PIN* aLabel ) +{ + wxASSERT( aLabel != NULL ); + wxASSERT( aLabel->Type() == DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE ); + + SCH_SHEET_PIN_LIST::iterator i; + + for( i = m_labels.begin(); i < m_labels.end(); ++i ) + { + if( *i == aLabel ) + { + m_labels.erase( i ); + renumberLabels(); + return; + } + } + + wxLogDebug( wxT( "Fix me: attempt to remove label %s which is not in sheet %s." ), + GetChars( aLabel->m_Text ), GetChars( m_SheetName ) ); +} + + +bool SCH_SHEET::HasLabel( const wxString& aName ) +{ + BOOST_FOREACH( SCH_SHEET_PIN label, m_labels ) + { + if( label.m_Text.CmpNoCase( aName ) == 0 ) + return true; + } + + return false; +} + + +bool SCH_SHEET::HasUndefinedLabels() +{ + BOOST_FOREACH( SCH_SHEET_PIN label, m_labels ) + { + /* Search the schematic for a hierarchical label corresponding to this sheet label. */ + EDA_BaseStruct* DrawStruct = m_AssociatedScreen->EEDrawList; + SCH_HIERLABEL* HLabel = NULL; + + for( ; DrawStruct != NULL; DrawStruct = DrawStruct->Next() ) + { + if( DrawStruct->Type() != TYPE_SCH_HIERLABEL ) + continue; + + HLabel = (SCH_HIERLABEL*) DrawStruct; + + if( label.m_Text.CmpNoCase( HLabel->m_Text ) == 0 ) + break; // Found! + + HLabel = NULL; + } + + if( HLabel == NULL ) // Corresponding hierarchical label not found. + return true; + } + + return false; +} + + void SCH_SHEET::Place( WinEDA_SchematicFrame* frame, wxDC* DC ) { /* Place list structures for new sheet. */ @@ -233,56 +276,61 @@ void SCH_SHEET::Place( WinEDA_SchematicFrame* frame, wxDC* DC ) } -/** Function CleanupSheet - * Delete pinsheets which are not corresponding to a hierarchical label - * @param aRedraw = true to redraw Sheet - * @param aFrame = the schematic frame +/** + * Delete sheet labels which do not have corresponding hierarchical label. */ -void SCH_SHEET::CleanupSheet( WinEDA_SchematicFrame* aFrame, - bool aRedraw, - bool aSaveForUndoRedo) +void SCH_SHEET::CleanupSheet() { - SCH_SHEET_PIN* Pinsheet, * NextPinsheet; - bool isSaved = false; + SCH_SHEET_PIN_LIST::iterator i = m_labels.begin(); - if( !IsOK( aFrame, _( "Ok to cleanup this sheet" ) ) ) - return; - - Pinsheet = m_Label; - while( Pinsheet ) + while( i != m_labels.end() ) { - /* Search Hlabel corresponding to this Pinsheet */ - + /* Search the schematic for a hierarchical label corresponding to this sheet label. */ EDA_BaseStruct* DrawStruct = m_AssociatedScreen->EEDrawList; SCH_HIERLABEL* HLabel = NULL; + for( ; DrawStruct != NULL; DrawStruct = DrawStruct->Next() ) { if( DrawStruct->Type() != TYPE_SCH_HIERLABEL ) continue; HLabel = (SCH_HIERLABEL*) DrawStruct; - if( Pinsheet->m_Text.CmpNoCase( HLabel->m_Text ) == 0 ) + + if( i->m_Text.CmpNoCase( HLabel->m_Text ) == 0 ) break; // Found! HLabel = NULL; } - NextPinsheet = Pinsheet->Next(); - if( HLabel == NULL ) // Hlabel not found: delete pinsheet - { - if( aSaveForUndoRedo && !isSaved ) - { - isSaved = true; - aFrame->SaveCopyInUndoList( this, UR_CHANGED); - } - aFrame->OnModify( ); - aFrame->DeleteSheetLabel( false, Pinsheet ); - } - Pinsheet = NextPinsheet; + if( HLabel == NULL ) // Hlabel not found: delete sheet label. + m_labels.erase( i ); + else + ++i; + } +} + + +SCH_SHEET_PIN* SCH_SHEET::GetLabel( const wxPoint& aPosition ) +{ + int size, dy, minx, maxx; + + BOOST_FOREACH( SCH_SHEET_PIN& label, m_labels ) + { + size = ( label.GetLength() + 1 ) * label.m_Size.x; + if( label.m_Edge ) + size = -size; + minx = label.m_Pos.x; + maxx = label.m_Pos.x + size; + if( maxx < minx ) + EXCHG( maxx, minx ); + dy = label.m_Size.x / 2; + + if( ( ABS( aPosition.y - label.m_Pos.y ) <= dy ) + && ( aPosition.x <= maxx ) && ( aPosition.x >= minx ) ) + return &label; } - if( aRedraw ) - aFrame->DrawPanel->PostDirtyRect( GetBoundingBox() ); + return NULL; } @@ -307,7 +355,6 @@ int SCH_SHEET::GetPenSize() void SCH_SHEET::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, int aDrawMode, int aColor ) { - SCH_SHEET_PIN* SheetLabelStruct; int txtcolor; wxString Text; int color; @@ -350,12 +397,10 @@ void SCH_SHEET::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, /* Draw text : SheetLabel */ - SheetLabelStruct = m_Label; - while( SheetLabelStruct != NULL ) + BOOST_FOREACH( SCH_SHEET_PIN& sheetPin, m_labels ) { - if( !( SheetLabelStruct->m_Flags & IS_MOVED ) ) - SheetLabelStruct->Draw( aPanel, aDC, aOffset, aDrawMode, aColor ); - SheetLabelStruct = SheetLabelStruct->Next(); + if( !( sheetPin.m_Flags & IS_MOVED ) ) + sheetPin.Draw( aPanel, aDC, aOffset, aDrawMode, aColor ); } } @@ -377,8 +422,8 @@ EDA_Rect SCH_SHEET::GetBoundingBox() dx = MAX( m_Size.x, textlen1 ); dy = m_Size.y + m_SheetNameSize + m_FileNameSize + 16; - EDA_Rect box( wxPoint( m_Pos.x, m_Pos.y - m_SheetNameSize - 8 ), - wxSize( dx, dy ) ); + EDA_Rect box( wxPoint( m_Pos.x, m_Pos.y - m_SheetNameSize - 8 ), wxSize( dx, dy ) ); + return box; } @@ -603,7 +648,7 @@ bool SCH_SHEET::ChangeFileName( WinEDA_SchematicFrame* aFrame, { msg.Printf( _( "A Sub Hierarchy named %s exists, Use it (The \ data in this sheet will be replaced)?" ), - aFileName.GetData() ); + GetChars( aFileName ) ); if( !IsOK( NULL, msg ) ) { DisplayInfoMessage( (wxWindow*) NULL, @@ -617,7 +662,7 @@ data in this sheet will be replaced)?" ), { msg.Printf( _( "A file named %s exists, load it (otherwise keep \ current sheet data if possible)?" ), - aFileName.GetData() ); + GetChars( aFileName ) ); if( IsOK( NULL, msg ) ) { LoadFromFile = true; @@ -708,11 +753,25 @@ void SCH_SHEET::Mirror_Y( int aYaxis_position ) m_Pos.x -= m_Size.x; - SCH_SHEET_PIN* label = m_Label; - while( label != NULL ) + BOOST_FOREACH( SCH_SHEET_PIN& label, m_labels ) { - label->Mirror_Y( aYaxis_position ); - label = label->Next(); + label.Mirror_Y( aYaxis_position ); + } +} + + +void SCH_SHEET::Resize( const wxSize& aSize ) +{ + if( aSize == m_Size ) + return; + + m_Size = aSize; + + /* Move the sheet labels according to the new sheet size. */ + BOOST_FOREACH( SCH_SHEET_PIN& label, m_labels ) + { + if( label.m_Edge ) + label.m_Pos.x = m_Pos.x + m_Size.x; } } @@ -726,27 +785,35 @@ bool SCH_SHEET::Matches( wxFindReplaceData& aSearchData ) } +void SCH_SHEET::renumberLabels() +{ + int labelId = 2; + + BOOST_FOREACH( SCH_SHEET_PIN& label, m_labels ) + { + label.SetNumber( labelId ); + labelId++; + } +} + + #if defined(DEBUG) + void SCH_SHEET::Show( int nestLevel, std::ostream& os ) { // XML output: wxString s = GetClass(); - NestedSpace( nestLevel, os ) << '<' << s.Lower().mb_str() << ">" - << " sheet_name=\"" - << CONV_TO_UTF8( m_SheetName ) - << '"' << ">\n"; + NestedSpace( nestLevel, os ) << '<' << s.Lower().mb_str() << ">" << " sheet_name=\"" + << CONV_TO_UTF8( m_SheetName ) << '"' << ">\n"; // show all the pins, and check the linked list integrity - SCH_SHEET_PIN* label; - for( label = m_Label; label; label = label->Next() ) + BOOST_FOREACH( SCH_SHEET_PIN& label, m_labels ) { - label->Show( nestLevel + 1, os ); + label.Show( nestLevel + 1, os ); } - NestedSpace( nestLevel, os ) << "\n" - << std::flush; + NestedSpace( nestLevel, os ) << "\n" << std::flush; } - #endif diff --git a/eeschema/class_drawsheet.h b/eeschema/class_drawsheet.h index fe0c8a4018..efc557093a 100644 --- a/eeschema/class_drawsheet.h +++ b/eeschema/class_drawsheet.h @@ -6,6 +6,9 @@ #define CLASS_DRAWSHEET_H #include "base_struct.h" +#include +#include + extern SCH_SHEET* g_RootSheet; @@ -21,12 +24,15 @@ extern SCH_SHEET* g_RootSheet; */ class SCH_SHEET_PIN : public SCH_ITEM, public EDA_TextStruct { +private: + int m_Number; ///< Label number use for saving sheet label to file. + ///< Sheet label numbering begins at 2. + ///< 0 is reserved for the sheet name. + ///< 1 is reserve for the sheet file name. + public: int m_Edge, m_Shape; bool m_IsDangling; // TRUE non connected - int m_Number; // used to numbered labels when writing data on file . - // m_Number >= 2 - // value 0 is for sheet name and 1 for sheet filename public: SCH_SHEET_PIN( SCH_SHEET* parent, @@ -40,6 +46,7 @@ public: return wxT( "SCH_SHEET_PIN" ); } + bool operator==( const SCH_SHEET_PIN* aPin ) const; SCH_SHEET_PIN* GenCopy(); @@ -48,14 +55,43 @@ public: return ( SCH_SHEET_PIN*) Pnext; } - void Place( WinEDA_SchematicFrame* frame, - wxDC* DC ); + /** + * Get the sheet label number. + * + * @return Number of the sheet label. + */ + int GetNumber() { return m_Number; } + + /** + * Set the sheet label number. + * + * @param aNumber - New sheet number label. + */ + void SetNumber( int aNumber ); + + /** + * Get the parent sheet object of this sheet pin. + * + * @return The sheet that is the parent of this sheet pin or NULL if it does + * not have a parent. + */ + SCH_SHEET* GetParent() const { return (SCH_SHEET*) m_Parent; } + + void Place( WinEDA_SchematicFrame* frame, wxDC* DC ); + void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int draw_mode, int Color = -1 ); + /** + * Plot this sheet pin object to aPlotter. + * + * @param aPlotter - The plotter object to plot to. + */ + void Plot( PLOTTER* aPlotter ); + /** * Function Save * writes the data structures for this object out to a FILE in "*.sch" @@ -119,6 +155,9 @@ public: }; +typedef boost::ptr_vector< SCH_SHEET_PIN > SCH_SHEET_PIN_LIST; + + /* class SCH_SHEET * This class is the sheet symbol placed in a schematic, and is the entry point * for a sub schematic @@ -131,10 +170,14 @@ public: * components: it is stored in F0 ... * of the file. */ private: - wxString m_FileName; /*also in SCH_SCREEN (redundant), + wxString m_FileName; /* also in SCH_SCREEN (redundant), * but need it here for loading after * reading the sheet description from * file. */ + +protected: + SCH_SHEET_PIN_LIST m_labels; /* List of points to be connected.*/ + public: int m_SheetNameSize; /* Size (height) of the text, used to * draw the sheet name */ @@ -143,10 +186,6 @@ public: wxPoint m_Pos; wxSize m_Size; /* Position and Size of *sheet symbol */ int m_Layer; - SCH_SHEET_PIN* m_Label; /* Points Be connection, linked - * list.*/ - int m_NbLabel; /* Pins sheet (corresponding to - * hierarchical labels) count */ SCH_SCREEN* m_AssociatedScreen; /* Associated Screen which * handle the physical data * In complex hierarchies we @@ -176,14 +215,60 @@ public: SCH_SHEET* GenCopy(); void DisplayInfo( WinEDA_DrawFrame* frame ); - /** Function CleanupSheet - * Delete pinsheets which are not corresponding to a hierarchical label - * @param aFrame = the schematic frame - * @param aRedraw = true to redraw Sheet - * @param aSaveForUndoRedo = true to put this sheet in UndoRedo list, - * if it is modified. + /** + * Add aLabel to this sheet. + * + * Note: Once a label is added to the sheet, it is owned by the sheet. + * Do not delete the label object or you will likely get a segfault + * when this sheet is destroyed. + * + * @param aLabel - The label to add to the sheet. */ - void CleanupSheet( WinEDA_SchematicFrame* frame, bool aRedraw, bool aSaveForUndoRedo ); + void AddLabel( SCH_SHEET_PIN* aLabel ); + + SCH_SHEET_PIN_LIST& GetSheetPins() { return m_labels; } + + /** + * Remove a sheet label from this sheet. + * + * @param aSheetLabel - The sheet label to remove from the list. + */ + void RemoveLabel( SCH_SHEET_PIN* aSheetLabel ); + + /** + * Delete sheet label which do not have a corresponding hierarchical label. + * + * Note: Make sure you save a copy of the sheet in the undo list before calling + * CleanupSheet() otherwise any unrefernced sheet labels will be lost. + */ + void CleanupSheet(); + + /** + * Return the label found at aPosition in this sheet. + * + * @param aPosition - The position to check for a label. + * + * @return The label found at aPosition or NULL if no label is found. + */ + SCH_SHEET_PIN* GetLabel( const wxPoint& aPosition ); + + /** + * Checks if a label already exists with aName. + * + * @param aName - Name of label to search for. + * + * @return - True if label found, otherwise false. + */ + bool HasLabel( const wxString& aName ); + + bool HasLabels() { return !m_labels.empty(); } + + /** + * Check all sheet labels against schematic for undefined hierarchical labels. + * + * @return True if there are any undefined labels. + */ + bool HasUndefinedLabels(); /** Function GetPenSize * @return the size of the "pen" that be used to draw or plot this item @@ -272,7 +357,7 @@ public: wxString GetFileName( void ); // Set a new filename without changing anything else - void SetFileName( const wxString& aFilename ) + void SetFileName( const wxString& aFilename ) { m_FileName = aFilename; } @@ -304,11 +389,9 @@ public: virtual void Move( const wxPoint& aMoveVector ) { m_Pos += aMoveVector; - SCH_SHEET_PIN* label = m_Label; - while( label != NULL ) + BOOST_FOREACH( SCH_SHEET_PIN& label, m_labels ) { - label->Move( aMoveVector ); - label = label->Next(); + label.Move( aMoveVector ); } } @@ -323,18 +406,35 @@ public: * Compare schematic sheet file and sheet name against search string. * * @param aSearchData - Criteria to search against. - * @param aCaseSensitive - True for case sensitive search. - * @param aWholeWord - True to match whole word. + * * @return True if this item matches the search criteria. */ virtual bool Matches( wxFindReplaceData& aSearchData ); + /** + * Resize this sheet to aSize and adjust all of the labels accordingly. + * + * @param aSize - The new size for this sheet. + */ + void Resize( const wxSize& aSize ); + #if defined(DEBUG) // comment inherited by Doxygen from Base_Struct void Show( int nestLevel, std::ostream& os ); #endif + +protected: + + /** + * Renumber labels in list. + * + * This method is used internally by SCH_SHEET to update the label numbering + * when the label list changes. Make sure you call this method any time a + * label is added or removed. + */ + void renumberLabels(); }; #endif /* CLASS_DRAWSHEET_H */ diff --git a/eeschema/class_hierarchical_PIN_sheet.cpp b/eeschema/class_hierarchical_PIN_sheet.cpp index 57a167bdde..ddfa9f06d7 100644 --- a/eeschema/class_hierarchical_PIN_sheet.cpp +++ b/eeschema/class_hierarchical_PIN_sheet.cpp @@ -16,20 +16,16 @@ #include "common.h" #include "class_drawpanel.h" #include "drawtxt.h" +#include "plot_common.h" #include "program.h" #include "general.h" #include "protos.h" -/*******************************************************************/ -SCH_SHEET_PIN::SCH_SHEET_PIN( SCH_SHEET* parent, - const wxPoint& pos, - const wxString& text ) : - SCH_ITEM( parent, DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE ), - EDA_TextStruct( text ) +SCH_SHEET_PIN::SCH_SHEET_PIN( SCH_SHEET* parent, const wxPoint& pos, const wxString& text ) : + SCH_ITEM( parent, DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE ), EDA_TextStruct( text ) { -/*******************************************************************/ wxASSERT( parent ); wxASSERT( Pnext == NULL ); m_Layer = LAYER_SHEETLABEL; @@ -41,12 +37,9 @@ SCH_SHEET_PIN::SCH_SHEET_PIN( SCH_SHEET* parent, } -/***********************************************************/ SCH_SHEET_PIN* SCH_SHEET_PIN::GenCopy() { -/***********************************************************/ - SCH_SHEET_PIN* newitem = - new SCH_SHEET_PIN( (SCH_SHEET*) m_Parent, m_Pos, m_Text ); + SCH_SHEET_PIN* newitem = new SCH_SHEET_PIN( (SCH_SHEET*) m_Parent, m_Pos, m_Text ); newitem->m_Edge = m_Edge; newitem->m_Shape = m_Shape; @@ -56,6 +49,12 @@ SCH_SHEET_PIN* SCH_SHEET_PIN::GenCopy() } +bool SCH_SHEET_PIN::operator==(const SCH_SHEET_PIN* aPin ) const +{ + return aPin == this; +} + + /** Function GetPenSize * @return the size of the "pen" that be used to draw or plot this item */ @@ -65,6 +64,16 @@ int SCH_SHEET_PIN::GetPenSize() } +void SCH_SHEET_PIN::SetNumber( int aNumber ) +{ + wxASSERT( aNumber >= 2 ); + + m_Number = aNumber; +} + + +/*****************************************************************************/ +/* Routine to create hierarchical labels */ /*****************************************************************************/ void SCH_SHEET_PIN::Draw( WinEDA_DrawPanel* panel, wxDC* DC, @@ -72,8 +81,6 @@ void SCH_SHEET_PIN::Draw( WinEDA_DrawPanel* panel, int DrawMode, int Color ) { -/*****************************************************************************/ -/* Routine to create hierarchical labels */ GRTextHorizJustifyType side; EDA_Colors txtcolor; int posx, tposx, posy; @@ -117,6 +124,47 @@ void SCH_SHEET_PIN::Draw( WinEDA_DrawPanel* panel, } +void SCH_SHEET_PIN::Plot( PLOTTER* aPlotter ) +{ + wxASSERT( aPlotter != NULL ); + + EDA_Colors txtcolor = UNSPECIFIED_COLOR; + int posx, tposx, posy, size; + + static std::vector Poly; + + txtcolor = ReturnLayerColor( GetLayer() ); + + posx = m_Pos.x; + posy = m_Pos.y; + size = m_Size.x; + GRTextHorizJustifyType side; + + if( m_Edge ) + { + tposx = posx - size; + side = GR_TEXT_HJUSTIFY_RIGHT; + } + else + { + tposx = posx + size + (size / 8); + side = GR_TEXT_HJUSTIFY_LEFT; + } + + int thickness = GetPenSize(); + aPlotter->set_current_line_width( thickness ); + + aPlotter->text( wxPoint( tposx, posy ), txtcolor, m_Text, TEXT_ORIENT_HORIZ, + wxSize( size, size ), side, GR_TEXT_VJUSTIFY_CENTER, thickness, + m_Italic, m_Bold ); + + /* Draw the associated graphic symbol */ + CreateGraphicShape( Poly, m_Pos ); + + aPlotter->poly( Poly.size(), &Poly[0].x, NO_FILL ); +} + + /** function CreateGraphicShape * Calculates the graphic shape (a polygon) associated to the text * @param aCorner_list = list to fill with polygon corners coordinates diff --git a/eeschema/class_libentry.cpp b/eeschema/class_libentry.cpp index 3d618d3eb5..89a6e4639d 100644 --- a/eeschema/class_libentry.cpp +++ b/eeschema/class_libentry.cpp @@ -180,13 +180,13 @@ void LIB_ALIAS::SetComponent( LIB_COMPONENT* aComponent ) LIB_COMPONENT::LIB_COMPONENT( const wxString& aName, CMP_LIBRARY* aLibrary ) : CMP_LIB_ENTRY( ROOT, aName, aLibrary ) { - m_LastDate = 0; + m_dateModified = 0; unitCount = 1; - m_TextInside = 40; + m_pinNameOffset = 40; m_options = ENTRY_NORMAL; - m_UnitSelectionLocked = FALSE; - m_DrawPinNum = 1; - m_DrawPinName = 1; + m_unitsLocked = FALSE; + m_showPinNumbers = true; + m_showPinNames = true; // Add the MANDATORY_FIELDS in RAM only. These are assumed to be present // when the field editors are invoked. @@ -209,11 +209,11 @@ LIB_COMPONENT::LIB_COMPONENT( LIB_COMPONENT& aComponent, CMP_LIBRARY* aLibrary ) m_aliasListData = aComponent.m_aliasListData; m_FootprintList = aComponent.m_FootprintList; unitCount = aComponent.unitCount; - m_UnitSelectionLocked = aComponent.m_UnitSelectionLocked; - m_TextInside = aComponent.m_TextInside; - m_DrawPinNum = aComponent.m_DrawPinNum; - m_DrawPinName = aComponent.m_DrawPinName; - m_LastDate = aComponent.m_LastDate; + m_unitsLocked = aComponent.m_unitsLocked; + m_pinNameOffset = aComponent.m_pinNameOffset; + m_showPinNumbers = aComponent.m_showPinNumbers; + m_showPinNames = aComponent.m_showPinNames; + m_dateModified = aComponent.m_dateModified; m_options = aComponent.m_options; BOOST_FOREACH( LIB_DRAW_ITEM& oldItem, aComponent.GetDrawItemList() ) @@ -554,10 +554,10 @@ bool LIB_COMPONENT::Save( FILE* aFile ) } if( fprintf( aFile, " %d %d %c %c %d %c %c\n", - 0, m_TextInside, - m_DrawPinNum ? 'Y' : 'N', - m_DrawPinName ? 'Y' : 'N', - unitCount, m_UnitSelectionLocked ? 'L' : 'F', + 0, m_pinNameOffset, + m_showPinNumbers ? 'Y' : 'N', + m_showPinNames ? 'Y' : 'N', + unitCount, m_unitsLocked ? 'L' : 'F', m_options == ENTRY_POWER ? 'P' : 'N' ) < 0 ) return false; @@ -688,7 +688,7 @@ bool LIB_COMPONENT::Load( FILE* aFile, char* aLine, int* aLineNum, || ( p = strtok( NULL, " \t\n" ) ) == NULL /* NumOfPins: */ || sscanf( p, "%d", &unused ) != 1 || ( p = strtok( NULL, " \t\n" ) ) == NULL /* TextInside: */ - || sscanf( p, "%d", &m_TextInside ) != 1 + || sscanf( p, "%d", &m_pinNameOffset ) != 1 || ( p = strtok( NULL, " \t\n" ) ) == NULL /* DrawNums: */ || sscanf( p, "%c", &drawnum ) != 1 || ( p = strtok( NULL, " \t\n" ) ) == NULL /* DrawNums: */ @@ -712,8 +712,8 @@ bool LIB_COMPONENT::Load( FILE* aFile, char* aLine, int* aLineNum, if( unitCount < 1 ) unitCount = 1; - m_DrawPinNum = ( drawnum == 'N' ) ? FALSE : true; - m_DrawPinName = ( drawname == 'N' ) ? FALSE : true; + m_showPinNumbers = ( drawnum == 'N' ) ? false : true; + m_showPinNames = ( drawname == 'N' ) ? false : true; /* Copy part name and prefix. */ LIB_FIELD& value = GetValueField(); @@ -743,7 +743,7 @@ bool LIB_COMPONENT::Load( FILE* aFile, char* aLine, int* aLineNum, // Copy optional infos if( ( p = strtok( NULL, " \t\n" ) ) != NULL && *p == 'L' ) - m_UnitSelectionLocked = true; + m_unitsLocked = true; if( ( p = strtok( NULL, " \t\n" ) ) != NULL && *p == 'P' ) m_options = ENTRY_POWER; @@ -1101,15 +1101,15 @@ bool LIB_COMPONENT::SaveDateAndTime( FILE* aFile ) { int year, mon, day, hour, min, sec; - if( m_LastDate == 0 ) + if( m_dateModified == 0 ) return true; - sec = m_LastDate & 63; - min = ( m_LastDate >> 6 ) & 63; - hour = ( m_LastDate >> 12 ) & 31; - day = ( m_LastDate >> 17 ) & 31; - mon = ( m_LastDate >> 22 ) & 15; - year = ( m_LastDate >> 26 ) + 1990; + sec = m_dateModified & 63; + min = ( m_dateModified >> 6 ) & 63; + hour = ( m_dateModified >> 12 ) & 31; + day = ( m_dateModified >> 17 ) & 31; + mon = ( m_dateModified >> 22 ) & 15; + year = ( m_dateModified >> 26 ) + 1990; if ( fprintf( aFile, "Ti %d/%d/%d %d:%d:%d\n", year, mon, day, hour, min, sec ) < 0 ) @@ -1134,7 +1134,7 @@ bool LIB_COMPONENT::LoadDateAndTime( char* aLine ) &year, &mon, &day, &hour, &min, &sec ) != 6 ) return false; - m_LastDate = ( sec & 63 ) + ( ( min & 63 ) << 6 ) + + m_dateModified = ( sec & 63 ) + ( ( min & 63 ) << 6 ) + ( ( hour & 31 ) << 12 ) + ( ( day & 31 ) << 17 ) + ( ( mon & 15 ) << 22 ) + ( ( year - 1990 ) << 26 ); @@ -1192,7 +1192,7 @@ int LIB_COMPONENT::SelectItems( EDA_Rect& aRect, int aUnit, int aConvert, continue; // Specific rules for pins. - if( aEditPinByPin || m_UnitSelectionLocked + if( aEditPinByPin || m_unitsLocked || ( item.m_Convert && item.m_Convert != aConvert ) ) continue; } diff --git a/eeschema/class_libentry.h b/eeschema/class_libentry.h index 82298bb794..f209fa0ecc 100644 --- a/eeschema/class_libentry.h +++ b/eeschema/class_libentry.h @@ -49,13 +49,11 @@ protected: LibrEntryType type; wxString description; /* documentation for info */ - wxString keyWords; /* keyword list (used for search for - * components by keyword) */ + wxString keyWords; /* keyword list (used for search for components by keyword) */ wxString docFileName; /* Associate doc file name */ public: - CMP_LIB_ENTRY( LibrEntryType aType, const wxString& aName, - CMP_LIBRARY* aLibrary = NULL ); + CMP_LIB_ENTRY( LibrEntryType aType, const wxString& aName, CMP_LIBRARY* aLibrary = NULL ); CMP_LIB_ENTRY( CMP_LIB_ENTRY& aEntry, CMP_LIBRARY* aLibrary = NULL ); virtual ~CMP_LIB_ENTRY(); @@ -129,10 +127,7 @@ extern int LibraryEntryCompare( const CMP_LIB_ENTRY* aItem1, const CMP_LIB_ENTRY /** * Library component object definition. * - * Library component object definition. - * - * A library component object is typically saved and loaded - * in a component library file (.lib). + * A library component object is typically saved and loaded in a component library file (.lib). * Library components are different from schematic components. */ class LIB_COMPONENT : public CMP_LIB_ENTRY @@ -142,25 +137,7 @@ public: wxArrayString m_FootprintList; /* list of suitable footprint names * for the component (wildcard names * accepted) */ - bool m_UnitSelectionLocked; /* True if units are different - * and their selection is - * locked (i.e. if part A cannot - * be automatically changed in - * part B */ - int m_TextInside; /* if 0: pin name drawn on the pin - * itself if > 0 pin name drawn inside - * the component, with a distance of - * m_TextInside in mils */ - bool m_DrawPinNum; - bool m_DrawPinName; - long m_LastDate; // Last change Date -protected: - LibrEntryOptions m_options; // special features (i.e. Entry is a POWER) - int unitCount; /* Units (parts) per package */ - LIB_DRAW_ITEM_LIST drawings; /* How to draw this part */ - -public: /* Offsets used in editing library component, * for handle aliases data in m_AliasListData array string * when editing a library component, aliases data is stored @@ -178,7 +155,18 @@ public: ALIAS_DOC_FILENAME_IDX = 3, ALIAS_NEXT_IDX = 4 }; + private: + int m_pinNameOffset; ///< The offset in mils to draw the pin name. Set to 0 + ///< to draw the pin name above the pin. + bool m_unitsLocked; ///< True if component has multple parts and changing + ///< one part does not automatically change another part. + bool m_showPinNames; ///< Determines if component pin names are visible. + bool m_showPinNumbers; ///< Determines if component pin numbers are visible. + long m_dateModified; ///< Date the component was last modified. + LibrEntryOptions m_options; // special features (i.e. Entry is a POWER) + int unitCount; /* Units (parts) per package */ + LIB_DRAW_ITEM_LIST drawings; /* How to draw this part */ wxArrayString m_aliasListData; /* ALIAS data (name, doc, keywords and doc filename). * Used only by the component editor LibEdit * to store aliases info during edition @@ -281,7 +269,7 @@ public: bool Save( FILE* aFile ); /** - * Load component definition from /a aFile. + * Load component definition from \a aFile. * * @param aFile - File descriptor of file to load form. * @param aLine - The first line of the component definition. @@ -291,11 +279,9 @@ public: */ bool Load( FILE* aFile, char* aLine, int* aLineNum, wxString& aErrorMsg ); bool LoadField( char* aLine, wxString& aErrorMsg ); - bool LoadDrawEntries( FILE* aFile, char* aLine, - int* aLineNum, wxString& aErrorMsg ); + bool LoadDrawEntries( FILE* aFile, char* aLine, int* aLineNum, wxString& aErrorMsg ); bool LoadAliases( char* aLine, wxString& aErrorMsg ); - bool LoadFootprints( FILE* aFile, char* aLine, - int* aLineNum, wxString& aErrorMsg ); + bool LoadFootprints( FILE* aFile, char* aLine, int* aLineNum, wxString& aErrorMsg ); bool isPower() { return m_options == ENTRY_POWER; } bool isNormal() { return m_options == ENTRY_NORMAL; } @@ -303,6 +289,9 @@ public: void SetPower() { m_options = ENTRY_POWER; } void SetNormal() { m_options = ENTRY_NORMAL; } + void LockUnits( bool aLockUnits ) { m_unitsLocked = aLockUnits; } + bool UnitsLocked() { return m_unitsLocked; } + /** * Function SetFields * overwrites all the existing in this component with fields supplied @@ -381,22 +370,20 @@ public: const int aTransform[2][2] ); /** - * Add a new draw /a aItem to the draw object list. + * Add a new draw \a aItem to the draw object list. * * @param item - New draw object to add to component. */ void AddDrawItem( LIB_DRAW_ITEM* aItem ); /** - * Remove draw /a aItem from list. + * Remove draw \a aItem from list. * * @param aItem - Draw item to remove from list. * @param aPanel - Panel to remove part from. * @param aDc - Device context to remove part from. */ - void RemoveDrawItem( LIB_DRAW_ITEM* aItem, - WinEDA_DrawPanel* aPanel = NULL, - wxDC* aDc = NULL ); + void RemoveDrawItem( LIB_DRAW_ITEM* aItem, WinEDA_DrawPanel* aPanel = NULL, wxDC* aDc = NULL ); /** * Return the next draw object pointer. @@ -407,9 +394,7 @@ public: * if TYPE_NOT_INIT search for all items types * @return - The next drawing object in the list if found, otherwise NULL. */ - - LIB_DRAW_ITEM* GetNextDrawItem( LIB_DRAW_ITEM* aItem = NULL, - KICAD_T aType = TYPE_NOT_INIT ); + LIB_DRAW_ITEM* GetNextDrawItem( LIB_DRAW_ITEM* aItem = NULL, KICAD_T aType = TYPE_NOT_INIT ); /** * Return the next pin object from the draw list. @@ -422,8 +407,7 @@ public: */ LIB_PIN* GetNextPin( LIB_PIN* aItem = NULL ) { - return (LIB_PIN*) GetNextDrawItem( (LIB_DRAW_ITEM*) aItem, - COMPONENT_PIN_DRAW_TYPE ); + return (LIB_PIN*) GetNextDrawItem( (LIB_DRAW_ITEM*) aItem, COMPONENT_PIN_DRAW_TYPE ); } @@ -443,7 +427,7 @@ public: void GetPins( LIB_PIN_LIST& aList, int aUnit = 0, int aConvert = 0 ); /** - * Return pin object with the requested pin /a aNumber. + * Return pin object with the requested pin \a aNumber. * * @param aNumber - Number of the pin to find. * @param aUnit - Unit of the component to find. Set to 0 if a specific @@ -455,7 +439,7 @@ public: LIB_PIN* GetPin( const wxString& aNumber, int aUnit = 0, int aConvert = 0 ); /** - * Move the component /a aOffset. + * Move the component \a aOffset. * * @param aOffset - Offset displacement. */ @@ -474,7 +458,7 @@ public: bool HasConversion() const; /** - * Test if alias /a aName is in component alias list. + * Test if alias \a aName is in component alias list. * * Alias name comparisons are case insensitive. * @@ -506,8 +490,7 @@ public: * @return The number of draw objects found inside the block select * rectangle. */ - int SelectItems( EDA_Rect& aRect, int aUnit, int aConvert, - bool aEditPinByPin ); + int SelectItems( EDA_Rect& aRect, int aUnit, int aConvert, bool aEditPinByPin ); /** * Clears all the draw items marked by a block select. @@ -553,8 +536,7 @@ public: * @param aPoint - Coordinate for hit testing. * @return The draw object if found. Otherwise NULL. */ - LIB_DRAW_ITEM* LocateDrawItem( int aUnit, int aConvert, KICAD_T aType, - const wxPoint& aPoint ); + LIB_DRAW_ITEM* LocateDrawItem( int aUnit, int aConvert, KICAD_T aType, const wxPoint& aPoint ); /** * Locate a draw object (overlaid) @@ -567,8 +549,7 @@ public: * @return The draw object if found. Otherwise NULL. */ LIB_DRAW_ITEM* LocateDrawItem( int aUnit, int aConvert, KICAD_T aType, - const wxPoint& aPoint, - const int aTransfrom[2][2] ); + const wxPoint& aPoint, const int aTransfrom[2][2] ); /** * Return a reference to the draw item list. @@ -617,6 +598,35 @@ public: * @param aSetConvert - Set or clear the component alternate body style. */ void SetConversion( bool aSetConvert ); + + /** + * Set the offset in mils of the pin name text from the pin symbol. + * + * Set the offset to 0 to draw the pin name above the pin symbol. + * + * @param aOffset - The offset in mils. + */ + void SetPinNameOffset( int aOffset ) { m_pinNameOffset = aOffset; } + + int GetPinNameOffset() { return m_pinNameOffset; } + + /** + * Set or clear the pin name visibility flag. + * + * @param aShow - True to make the component pin names visible. + */ + void SetShowPinNames( bool aShow ) { m_showPinNames = aShow; } + + bool ShowPinNames() { return m_showPinNames; } + + /** + * Set or clear the pin number visibility flag. + * + * @param aShow - True to make the component pin numbers visible. + */ + void SetShowPinNumbers( bool aShow ) { m_showPinNumbers = aShow; } + + bool ShowPinNumbers() { return m_showPinNumbers; } }; diff --git a/eeschema/class_netlist_object.cpp b/eeschema/class_netlist_object.cpp index 1277664e42..ce3c2bbded 100644 --- a/eeschema/class_netlist_object.cpp +++ b/eeschema/class_netlist_object.cpp @@ -82,7 +82,7 @@ void NETLIST_OBJECT::Show( std::ostream& out, int ndx ) out << " \n"; if( m_Label ) - out << " \n"; + out << " \n"; if( m_Comp ) m_Comp->Show( 1, out ); @@ -98,26 +98,28 @@ void NETLIST_OBJECT::Show( std::ostream& out, int ndx ) NETLIST_OBJECT::NETLIST_OBJECT() { - m_Type = NET_ITEM_UNSPECIFIED; /* Type of this item (see NetObjetType enum) */ - m_Comp = NULL; /* Pointer on the library item that created this net object (the parent)*/ - m_Link = NULL; /* For SCH_SHEET_PIN: - * Pointer to the hierarchy sheet that contains this SCH_SHEET_PIN - * For Pins: pointer to the component that contains this pin - */ - m_Flag = 0; /* flag used in calculations */ - m_ElectricalType = 0; /* Has meaning only for Pins and hierachical pins: electrical type */ - m_NetCode = 0; /* net code for all items except BUS labels because a BUS label has - * as many net codes as bus members - */ - m_BusNetCode = 0; /* Used for BUS connections */ - m_Member = 0; /* for labels type NET_BUSLABELMEMBER ( bus member created from the BUS label ) - * member number - */ + m_Type = NET_ITEM_UNSPECIFIED; /* Type of this item (see NetObjetType enum) */ + m_Comp = NULL; /* Pointer on the library item that created this net object + * (the parent)*/ + m_Link = NULL; /* For SCH_SHEET_PIN: + * Pointer to the hierarchy sheet that contains this + * SCH_SHEET_PIN For Pins: pointer to the component that + * contains this pin + */ + m_Flag = 0; /* flag used in calculations */ + m_ElectricalType = 0; /* Has meaning only for Pins and hierachical pins: electrical + * type */ + m_NetCode = 0; /* net code for all items except BUS labels because a BUS + * label has as many net codes as bus members + */ + m_BusNetCode = 0; /* Used for BUS connections */ + m_Member = 0; /* for labels type NET_BUSLABELMEMBER ( bus member created + * from the BUS label ) member number + */ m_FlagOfConnection = UNCONNECTED; m_PinNum = 0; /* pin number ( 1 long = 4 bytes -> 4 ascii codes) */ - m_Label = 0; /* For all labels:pointer on the text label */ - m_NetNameCandidate = NULL; /* a pointer to a NETLIST_OBJECT type label connected to this object - * used to give a name to the net + m_NetNameCandidate = NULL; /* a pointer to a NETLIST_OBJECT type label connected to this + * object used to give a name to the net */ } @@ -125,30 +127,10 @@ NETLIST_OBJECT::NETLIST_OBJECT() // Copy constructor NETLIST_OBJECT::NETLIST_OBJECT( NETLIST_OBJECT& aSource ) { - *this = aSource; - m_Label = NULL; // set to null because some items are owner, so the delete operator can create problems - // if this member is copied here (if 2 different items are owner of the same object) + *this = aSource; } NETLIST_OBJECT::~NETLIST_OBJECT() { - /* NETLIST_OBJECT is owner of m_Label only if its type is - * NET_HIERBUSLABELMEMBER, NET_GLOBBUSLABELMEMBER, NET_SHEETBUSLABELMEMBER or NET_BUSLABELMEMBER - * So we must delete m_Label only for these cases - * ( see the note in ConvertBustToMembers) - */ - - switch( m_Type ) - { - default: - break; - - case NET_HIERBUSLABELMEMBER: - case NET_GLOBBUSLABELMEMBER: - case NET_SHEETBUSLABELMEMBER: - case NET_BUSLABELMEMBER: - SAFE_DELETE( m_Label ); - break; - } } diff --git a/eeschema/class_netlist_object.h b/eeschema/class_netlist_object.h index 1ed96afe60..5f79de5e66 100644 --- a/eeschema/class_netlist_object.h +++ b/eeschema/class_netlist_object.h @@ -84,8 +84,7 @@ public: * connects to.*/ long m_PinNum; /* pin number ( 1 long = 4 bytes -> * 4 ascii codes) */ - const wxString* m_Label; /* For all labels:pointer on the text - * label */ + wxString m_Label; /* Label text. */ wxPoint m_Start; // Position of object or for segments: // starting point wxPoint m_End; // For segments (wire and buses): diff --git a/eeschema/class_pin.cpp b/eeschema/class_pin.cpp index 6f2a4cd5cb..2a94558c32 100644 --- a/eeschema/class_pin.cpp +++ b/eeschema/class_pin.cpp @@ -809,8 +809,8 @@ void LIB_PIN::Draw( WinEDA_DrawPanel* aPanel, if( DrawPinText ) { - DrawPinTexts( aPanel, aDC, pos1, orient, Entry->m_TextInside, - Entry->m_DrawPinNum, Entry->m_DrawPinName, + DrawPinTexts( aPanel, aDC, pos1, orient, Entry->GetPinNameOffset(), + Entry->ShowPinNumbers(), Entry->ShowPinNames(), aColor, aDrawMode ); } @@ -1610,8 +1610,8 @@ void LIB_PIN::DoPlot( PLOTTER* plotter, const wxPoint& offset, bool fill, plotter->set_current_line_width( GetPenSize() ); PlotPinSymbol( plotter, pos, m_PinLen, orient, m_PinShape ); - PlotPinTexts( plotter, pos, orient, GetParent()->m_TextInside, - GetParent()->m_DrawPinNum, GetParent()->m_DrawPinName, + PlotPinTexts( plotter, pos, orient, GetParent()->GetPinNameOffset(), + GetParent()->ShowPinNumbers(), GetParent()->ShowPinNames(), GetPenSize() ); } diff --git a/eeschema/class_sch_component.cpp b/eeschema/class_sch_component.cpp index 3628ba9f44..9d491d8ec2 100644 --- a/eeschema/class_sch_component.cpp +++ b/eeschema/class_sch_component.cpp @@ -659,7 +659,7 @@ void SCH_COMPONENT::ClearAnnotation( SCH_SHEET_PATH* aSheet ) Entry = CMP_LIBRARY::FindLibraryComponent( m_ChipName ); - if( Entry && Entry->m_UnitSelectionLocked ) + if( Entry && Entry->UnitsLocked() ) KeepMulti = true; while( defRef.Last() == '?' ) diff --git a/eeschema/dangling_ends.cpp b/eeschema/dangling_ends.cpp index 6bf9606544..8350974f1f 100644 --- a/eeschema/dangling_ends.cpp +++ b/eeschema/dangling_ends.cpp @@ -415,18 +415,15 @@ DanglingEndHandle* RebuildEndList( EDA_BaseStruct* DrawList ) case DRAW_SHEET_STRUCT_TYPE: { - SCH_SHEET_PIN* pinsheet; - for( pinsheet = ( (SCH_SHEET*) DrawItem )->m_Label; - pinsheet; - pinsheet = pinsheet->Next() ) + SCH_SHEET* sheet = (SCH_SHEET*) DrawItem; + + BOOST_FOREACH( SCH_SHEET_PIN pinsheet, sheet->GetSheetPins() ) { - wxASSERT( pinsheet->Type() == - DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE ); + wxASSERT( pinsheet.Type() == DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE ); item = new DanglingEndHandle( SHEET_LABEL_END ); - - item->m_Item = pinsheet; - item->m_Pos = pinsheet->m_Pos; + item->m_Item = &pinsheet; + item->m_Pos = pinsheet.m_Pos; if( lastitem ) lastitem->m_Pnext = item; diff --git a/eeschema/delete.cpp b/eeschema/delete.cpp index bb96becd8e..f7d67bccb4 100644 --- a/eeschema/delete.cpp +++ b/eeschema/delete.cpp @@ -389,7 +389,6 @@ bool LocateAndDeleteItem( WinEDA_SchematicFrame* frame, wxDC* DC ) void EraseStruct( SCH_ITEM* DrawStruct, SCH_SCREEN* Screen ) { EDA_BaseStruct* DrawList; - SCH_SHEET_PIN* SheetLabel, * NextLabel; if( DrawStruct == NULL ) return; @@ -401,44 +400,12 @@ void EraseStruct( SCH_ITEM* DrawStruct, SCH_SCREEN* Screen ) if( DrawStruct->Type() == DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE ) { - //this structure is attached to a sheet , which we must find. - DrawList = Screen->EEDrawList; - for( ; DrawList != NULL; DrawList = DrawList->Next() ) - { - if( DrawList->Type() != DRAW_SHEET_STRUCT_TYPE ) - continue; - - /* See if our item is in this Sheet */ - SheetLabel = ( (SCH_SHEET*) DrawList )->m_Label; - if( SheetLabel == NULL ) - continue; - - if( SheetLabel == (SCH_SHEET_PIN*) DrawStruct ) - { - ( (SCH_SHEET*) DrawList )->m_Label = - (SCH_SHEET_PIN*) SheetLabel->Next(); - - SAFE_DELETE( DrawStruct ); - return; - } - else - { - while( SheetLabel->Next() ) - { - NextLabel = (SCH_SHEET_PIN*) SheetLabel->Next(); - - if( NextLabel == (SCH_SHEET_PIN*) DrawStruct ) - { - SheetLabel->SetNext( (EDA_BaseStruct*) NextLabel->Next() ); - SAFE_DELETE( DrawStruct ); - return; - - } - SheetLabel = NextLabel; - } - } - } - + // This structure is attached to a sheet, get the parent sheet object. + SCH_SHEET_PIN* sheetLabel = (SCH_SHEET_PIN*) DrawStruct; + SCH_SHEET* sheet = sheetLabel->GetParent(); + wxASSERT_MSG( sheet != NULL, + wxT( "Sheet label parent not properly set, bad programmer!" ) ); + sheet->RemoveLabel( sheetLabel ); return; } else diff --git a/eeschema/dialog_create_component.cpp b/eeschema/dialog_create_component.cpp index 077841cc17..3606c4df4b 100644 --- a/eeschema/dialog_create_component.cpp +++ b/eeschema/dialog_create_component.cpp @@ -110,9 +110,9 @@ void WinEDA_CreateCmpDialog::SetComponentData( LIB_COMPONENT & component ) component.SetPartCount( m_PartsCount->GetSelection() + 1 ); component.GetReference().m_Text = m_Reference->GetValue(); if ( m_PinNameInside->GetValue() == FALSE) - component.m_TextInside = 0; + component.SetPinNameOffset( 0 ); else - component.m_TextInside = m_SetSkew->GetValue(); + component.SetPinNameOffset( m_SetSkew->GetValue() ); if ( m_IsPowerSymbol->GetValue() == TRUE ) component.SetPower(); @@ -121,9 +121,9 @@ void WinEDA_CreateCmpDialog::SetComponentData( LIB_COMPONENT & component ) /* Set the option "Units locked". Obviously, cannot be TRUE if there is only one part */ - component.m_UnitSelectionLocked = m_PartsAreLocked->GetValue(); + component.LockUnits( m_PartsAreLocked->GetValue() ); if ( component.GetPartCount() <= 1 ) - component.m_UnitSelectionLocked = FALSE; + component.LockUnits( false ); } /*! diff --git a/eeschema/dialog_edit_component_in_lib.cpp b/eeschema/dialog_edit_component_in_lib.cpp index e65ffc22bf..e6b2bac8d9 100644 --- a/eeschema/dialog_edit_component_in_lib.cpp +++ b/eeschema/dialog_edit_component_in_lib.cpp @@ -146,11 +146,11 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::InitBasicPanel() return; } - m_ShowPinNumButt->SetValue( component->m_DrawPinNum ); - m_ShowPinNameButt->SetValue( component->m_DrawPinName ); - m_PinsNameInsideButt->SetValue( component->m_TextInside != 0 ); + m_ShowPinNumButt->SetValue( component->ShowPinNumbers() ); + m_ShowPinNameButt->SetValue( component->ShowPinNames() ); + m_PinsNameInsideButt->SetValue( component->GetPinNameOffset() != 0 ); m_SelNumberOfUnits->SetValue( component->GetPartCount() ); - m_SetSkew->SetValue( component->m_TextInside ); + m_SetSkew->SetValue( component->GetPinNameOffset() ); m_OptionPower->SetValue( component->isPower() ); - m_OptionPartsLocked->SetValue( component->m_UnitSelectionLocked ); + m_OptionPartsLocked->SetValue( component->UnitsLocked() ); } diff --git a/eeschema/dialog_edit_component_in_schematic.cpp b/eeschema/dialog_edit_component_in_schematic.cpp index 22a96a817d..120c8a28ec 100644 --- a/eeschema/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialog_edit_component_in_schematic.cpp @@ -763,7 +763,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyOptionsToPanel() } // Show the "Parts Locked" option? - if( !m_LibEntry || !m_LibEntry->m_UnitSelectionLocked ) + if( !m_LibEntry || !m_LibEntry->UnitsLocked() ) { D( printf( "partsAreLocked->false\n" ); ) partsAreLockedLabel->Show( false ); diff --git a/eeschema/edit_component_in_lib.cpp b/eeschema/edit_component_in_lib.cpp index 362cc3617b..76c4dffd1b 100644 --- a/eeschema/edit_component_in_lib.cpp +++ b/eeschema/edit_component_in_lib.cpp @@ -32,15 +32,15 @@ void WinEDA_LibeditFrame::OnEditComponentProperties( wxCommandEvent& event ) { - bool partLocked = GetComponent()->m_UnitSelectionLocked; + bool partLocked = GetComponent()->UnitsLocked(); EditComponentProperties(); - if( partLocked != GetComponent()->m_UnitSelectionLocked ) + if( partLocked != GetComponent()->UnitsLocked() ) { // g_EditPinByPinIsOn is set to the better value, // if m_UnitSelectionLocked has changed - g_EditPinByPinIsOn = GetComponent()->m_UnitSelectionLocked ? true : false; + g_EditPinByPinIsOn = GetComponent()->UnitsLocked() ? true : false; m_HToolBar->ToggleTool( ID_LIBEDIT_EDIT_PIN_BY_PIN, g_EditPinByPinIsOn ); } - + m_HToolBar->Refresh(); DrawPanel->Refresh(); } @@ -143,17 +143,17 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnOkClick( wxCommandEvent& event ) } } - component->m_DrawPinNum = m_ShowPinNumButt->GetValue() ? 1 : 0; - component->m_DrawPinName = m_ShowPinNameButt->GetValue() ? 1 : 0; + component->SetShowPinNumbers( m_ShowPinNumButt->GetValue() ); + component->SetShowPinNames( m_ShowPinNameButt->GetValue() ); if( m_PinsNameInsideButt->GetValue() == false ) - component->m_TextInside = 0; // pin text outside the body (name is on the pin) + component->SetPinNameOffset( 0 ); // pin text outside the body (name is on the pin) else { - component->m_TextInside = m_SetSkew->GetValue(); + component->SetPinNameOffset( m_SetSkew->GetValue() ); // Ensure component->m_TextInside != 0, because the meaning is "text outside". - if( component->m_TextInside == 0 ) - component->m_TextInside = 20; // give a reasonnable value + if( component->GetPinNameOffset() == 0 ) + component->SetPinNameOffset( 20 ); // give a reasonnable value } if( m_OptionPower->GetValue() == true ) @@ -163,9 +163,9 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnOkClick( wxCommandEvent& event ) /* Set the option "Units locked". * Obviously, cannot be true if there is only one part */ - component->m_UnitSelectionLocked = m_OptionPartsLocked->GetValue(); + component->LockUnits( m_OptionPartsLocked->GetValue() ); if( component->GetPartCount() <= 1 ) - component->m_UnitSelectionLocked = false; + component->LockUnits( false ); /* Update the footprint filter list */ component->m_FootprintList.Clear(); diff --git a/eeschema/erc.cpp b/eeschema/erc.cpp index f38f7d0716..cffbd49cb0 100644 --- a/eeschema/erc.cpp +++ b/eeschema/erc.cpp @@ -428,11 +428,14 @@ static void Diagnose( WinEDA_DrawPanel* aPanel, || (aNetItemRef->m_Type == NET_HIERBUSLABELMEMBER) ) { msg.Printf( _( "HLabel %s not connected to SheetLabel" ), - aNetItemRef->m_Label->GetData() ); + GetChars( aNetItemRef->m_Label ) ); } else + { msg.Printf( _( "SheetLabel %s not connected to HLabel" ), - aNetItemRef->m_Label->GetData() ); + GetChars( aNetItemRef->m_Label ) ); + } + Marker->SetData( ERCE_HIERACHICAL_LABEL, aNetItemRef->m_Start, @@ -458,7 +461,7 @@ static void Diagnose( WinEDA_DrawPanel* aPanel, if( aMinConn == NOC ) /* Only 1 element in the net. */ { msg.Printf( _( "Cmp %s, Pin %s (%s) Unconnected" ), - cmp_ref.GetData(), string_pinnum.GetData(), + GetChars( cmp_ref ), GetChars( string_pinnum ), MsgPinElectricType[ii] ); Marker->SetData( ERCE_PIN_NOT_CONNECTED, aNetItemRef->m_Start, @@ -473,7 +476,7 @@ static void Diagnose( WinEDA_DrawPanel* aPanel, cmp_ref = ( (SCH_COMPONENT*) aNetItemRef->m_Link )->GetRef( &aNetItemRef->m_SheetList ); msg.Printf( _( "Cmp %s, Pin %s (%s) not driven (Net %d)" ), - cmp_ref.GetData(), string_pinnum.GetData(), + GetChars( cmp_ref ), GetChars( string_pinnum ), MsgPinElectricType[ii], aNetItemRef->GetNet() ); Marker->SetData( ERCE_PIN_NOT_DRIVEN, aNetItemRef->m_Start, @@ -513,15 +516,13 @@ static void Diagnose( WinEDA_DrawPanel* aPanel, alt_cmp = ( (SCH_COMPONENT*) aNetItemTst->m_Link )->GetRef( &aNetItemTst->m_SheetList ); msg.Printf( _( "Cmp %s, Pin %s (%s) connected to " ), - cmp_ref.GetData(), - string_pinnum.GetData(), MsgPinElectricType[ii] ); + GetChars( cmp_ref ), GetChars( string_pinnum ), MsgPinElectricType[ii] ); Marker->SetData( errortype, aNetItemRef->m_Start, msg, aNetItemRef->m_Start ); msg.Printf( _( "Cmp %s, Pin %s (%s) (net %d)" ), - alt_cmp.GetData(), - alt_string_pinnum.GetData(), MsgPinElectricType[jj], + GetChars( alt_cmp ), GetChars( alt_string_pinnum ), MsgPinElectricType[jj], aNetItemRef->GetNet() ); Marker->SetAuxiliaryData( msg, aNetItemTst->m_Start ); } @@ -703,7 +704,7 @@ static bool WriteDiagnosticERC( const wxString& FullFileName ) else { wxString str = Sheet->PathHumanReadable(); - msg.Printf( _( "\n***** Sheet %s\n" ), str.GetData() ); + msg.Printf( _( "\n***** Sheet %s\n" ), GetChars( str ) ); } fprintf( OutErc, "%s", CONV_TO_UTF8( msg ) ); diff --git a/eeschema/libedit.cpp b/eeschema/libedit.cpp index 04623cef4a..6e639c002a 100644 --- a/eeschema/libedit.cpp +++ b/eeschema/libedit.cpp @@ -107,9 +107,9 @@ library \"%s\"." ), if( !LoadOneLibraryPartAux( LibEntry, m_library ) ) return; - g_EditPinByPinIsOn = m_component->m_UnitSelectionLocked ? true : false; + g_EditPinByPinIsOn = m_component->UnitsLocked() ? true : false; m_HToolBar->ToggleTool( ID_LIBEDIT_EDIT_PIN_BY_PIN, g_EditPinByPinIsOn ); - + GetScreen()->ClearUndoRedoList(); Zoom_Automatique( false ); DrawPanel->Refresh(); @@ -556,21 +556,21 @@ created. Aborted" ) ); SetShowDeMorgan( dlg.GetAlternateBodyStyle() ); if( dlg.GetPinNameInside( ) ) { - component->m_TextInside = dlg.GetPinTextPosition(); - if( component->m_TextInside == 0 ) - component->m_TextInside = 1; + component->SetPinNameOffset( dlg.GetPinTextPosition() ); + if( component->GetPinNameOffset() == 0 ) + component->SetPinNameOffset( 1 ); } else { - component->m_TextInside = 0; + component->SetPinNameOffset( 0 ); } ( dlg.GetPowerSymbol() ) ? component->SetPower() : component->SetNormal(); - component->m_DrawPinNum = dlg.GetShowPinNumber(); - component->m_DrawPinName = dlg.GetShowPinName(); - component->m_UnitSelectionLocked = dlg.GetLockItems(); + component->SetShowPinNumbers( dlg.GetShowPinNumber() ); + component->SetShowPinNames( dlg.GetShowPinName() ); + component->LockUnits( dlg.GetLockItems() ); if( dlg.GetPartCount() < 2 ) - component->m_UnitSelectionLocked = false; + component->LockUnits( false ); if( m_component ) { @@ -584,7 +584,7 @@ created. Aborted" ) ); DisplayCmpDoc(); UpdateAliasSelectList(); UpdatePartSelectList(); - g_EditPinByPinIsOn = m_component->m_UnitSelectionLocked ? true : false; + g_EditPinByPinIsOn = m_component->UnitsLocked() ? true : false; m_HToolBar->ToggleTool( ID_LIBEDIT_EDIT_PIN_BY_PIN, g_EditPinByPinIsOn ); m_lastDrawItem = NULL; GetScreen()->ClearUndoRedoList(); diff --git a/eeschema/load_one_schematic_file.cpp b/eeschema/load_one_schematic_file.cpp index ac4e9d84c2..95bf3d0ea0 100644 --- a/eeschema/load_one_schematic_file.cpp +++ b/eeschema/load_one_schematic_file.cpp @@ -49,12 +49,12 @@ bool WinEDA_SchematicFrame::LoadOneEEFile( SCH_SCREEN* screen, SCH_JUNCTION* ConnectionStruct; SCH_POLYLINE* PolylineStruct; SCH_LINE* SegmentStruct; - SCH_BUS_ENTRY* RaccordStruct; + SCH_BUS_ENTRY* busEntry; SCH_NO_CONNECT* NoConnectStruct; int LineCount; wxString MsgDiag; /* Error and log messages */ - FILE* f; + FILE* f; if( screen == NULL ) return FALSE; @@ -138,29 +138,28 @@ again." ); { case '$': /* identification block */ if( Line[1] == 'C' ) - Failed = ReadPartDescr( this, Line, f, MsgDiag, &LineCount, - screen ); + Failed = ReadPartDescr( this, Line, f, MsgDiag, &LineCount, screen ); else if( Line[1] == 'S' ) - Failed = ReadSheetDescr( this, Line, f, MsgDiag, &LineCount, - screen ); + Failed = ReadSheetDescr( this, Line, f, MsgDiag, &LineCount, screen ); else if( Line[1] == 'D' ) - Failed = ReadSchemaDescr( this, Line, f, MsgDiag, &LineCount, - screen ); + Failed = ReadSchemaDescr( this, Line, f, MsgDiag, &LineCount, screen ); else if( Line[1] == 'T' ) //text part { - printf("**** TEXT PART\n"); - SCH_ITEM* Struct; - Struct = ReadTextDescr( f, MsgDiag, Line, sizeof(Line), - &LineCount, version); - if( Struct ) - { - Struct->SetNext( screen->EEDrawList ); - screen->EEDrawList = Struct; - } - else - Failed = true; + printf( "**** TEXT PART\n" ); + SCH_ITEM* Struct; + Struct = ReadTextDescr( f, MsgDiag, Line, sizeof(Line), &LineCount, version ); + + if( Struct ) + { + Struct->SetNext( screen->EEDrawList ); + screen->EEDrawList = Struct; + } + else + { + Failed = true; + } } break; @@ -222,28 +221,27 @@ again." ); ii = WIRE_TO_BUS; if( Name1[0] == 'B' ) ii = BUS_TO_BUS; - RaccordStruct = new SCH_BUS_ENTRY( wxPoint( 0, 0 ), '\\', ii ); + busEntry = new SCH_BUS_ENTRY( wxPoint( 0, 0 ), '\\', ii ); LineCount++; if( fgets( Line, 256 - 1, f ) == NULL - || sscanf( Line, "%d %d %d %d ", &RaccordStruct->m_Pos.x, - &RaccordStruct->m_Pos.y, &RaccordStruct->m_Size.x, - &RaccordStruct->m_Size.y ) != 4 ) + || sscanf( Line, "%d %d %d %d ", &busEntry->m_Pos.x, &busEntry->m_Pos.y, + &busEntry->m_Size.x, &busEntry->m_Size.y ) != 4 ) { MsgDiag.Printf( wxT( "EESchema file Bus Entry struct error at line %d, aborted" ), LineCount ); MsgDiag << wxT( "\n" ) << CONV_FROM_UTF8( Line ); Failed = true; - SAFE_DELETE( RaccordStruct ); + SAFE_DELETE( busEntry ); break; } if( !Failed ) { - RaccordStruct->m_Size.x -= RaccordStruct->m_Pos.x; - RaccordStruct->m_Size.y -= RaccordStruct->m_Pos.y; - RaccordStruct->SetNext( screen->EEDrawList ); - screen->EEDrawList = RaccordStruct; + busEntry->m_Size.x -= busEntry->m_Pos.x; + busEntry->m_Size.y -= busEntry->m_Pos.y; + busEntry->SetNext( screen->EEDrawList ); + screen->EEDrawList = busEntry; } break; @@ -333,8 +331,8 @@ at line %d, aborted" ), case 'T': /* It is a text item. */ { SCH_ITEM* Struct; - Struct = ReadTextDescr( f, MsgDiag, Line, sizeof(Line), - &LineCount, version); + Struct = ReadTextDescr( f, MsgDiag, Line, sizeof(Line), &LineCount, version); + if( Struct ) { Struct->SetNext( screen->EEDrawList ); diff --git a/eeschema/locate.cpp b/eeschema/locate.cpp index 114c063f9a..e95395cfa0 100644 --- a/eeschema/locate.cpp +++ b/eeschema/locate.cpp @@ -459,33 +459,11 @@ bool IsItemInBox( EDA_Rect& aBox, SCH_ITEM* DrawStruct ) SCH_SHEET_PIN* LocateSheetLabel( SCH_SHEET* Sheet, const wxPoint& pos ) { - int size, dy, minx, maxx; - SCH_SHEET_PIN* SheetLabel; - - SheetLabel = Sheet->m_Label; - while( SheetLabel - && SheetLabel->Type() == DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE ) - { - size = ( SheetLabel->GetLength() + 1 ) * SheetLabel->m_Size.x; - if( SheetLabel->m_Edge ) - size = -size; - minx = SheetLabel->m_Pos.x; maxx = SheetLabel->m_Pos.x + size; - if( maxx < minx ) - EXCHG( maxx, minx ); - dy = SheetLabel->m_Size.x / 2; - if( (ABS( pos.y - SheetLabel->m_Pos.y ) <= dy ) - && (pos.x <= maxx) - && (pos.x >= minx) ) - return SheetLabel; - SheetLabel = SheetLabel->Next(); - } - - return NULL; + return Sheet->GetLabel( pos ); } -LIB_PIN* LocateAnyPin( SCH_ITEM* DrawList, const wxPoint& RefPos, - SCH_COMPONENT** libpart ) +LIB_PIN* LocateAnyPin( SCH_ITEM* DrawList, const wxPoint& RefPos, SCH_COMPONENT** libpart ) { SCH_ITEM* DrawStruct; LIB_COMPONENT* Entry; diff --git a/eeschema/netform.cpp b/eeschema/netform.cpp index 330475a197..cf23debc86 100644 --- a/eeschema/netform.cpp +++ b/eeschema/netform.cpp @@ -110,9 +110,8 @@ void WriteNetList( WinEDA_SchematicFrame* frame, const wxString& FileNameNL, * considered) * Must be deallocated by the user */ -static SCH_COMPONENT* FindNextComponentAndCreatPinList( - EDA_BaseStruct* DrawList, - SCH_SHEET_PATH* sheet ) +static SCH_COMPONENT* FindNextComponentAndCreatPinList( EDA_BaseStruct* DrawList, + SCH_SHEET_PATH* sheet ) { SCH_COMPONENT* Component = NULL; LIB_COMPONENT* Entry; @@ -169,8 +168,7 @@ static SCH_COMPONENT* FindNextComponentAndCreatPinList( { LIB_PIN_LIST pins; - Entry->GetPins( pins, Component->GetUnitSelection( sheet ), - Component->m_Convert ); + Entry->GetPins( pins, Component->GetUnitSelection( sheet ), Component->m_Convert ); for( size_t i = 0; i < pins.size(); i++ ) { @@ -205,18 +203,17 @@ static SCH_COMPONENT* FindNextComponentAndCreatPinList( * "netname" for global net (like gnd, vcc .. * "netname_sheetnumber" for the usual nets */ -static wxString ReturnPinNetName( NETLIST_OBJECT* Pin, - const wxString& DefaultFormatNetname ) +static wxString ReturnPinNetName( NETLIST_OBJECT* Pin, const wxString& DefaultFormatNetname ) { int netcode = Pin->GetNet(); wxString NetName; - if( (netcode == 0 ) || ( Pin->m_FlagOfConnection != PAD_CONNECT ) ) + if( ( netcode == 0 ) || ( Pin->m_FlagOfConnection != PAD_CONNECT ) ) return NetName; NETLIST_OBJECT* netref = Pin->m_NetNameCandidate; if( netref ) - NetName = *netref->m_Label; + NetName = netref->m_Label; if( !NetName.IsEmpty() ) { @@ -233,7 +230,9 @@ static wxString ReturnPinNetName( NETLIST_OBJECT* Pin, } } else + { NetName.Printf( DefaultFormatNetname.GetData(), netcode ); + } return NetName; } @@ -242,8 +241,7 @@ static wxString ReturnPinNetName( NETLIST_OBJECT* Pin, /* Create a generic netlist, and call an external netlister * to change the netlist syntax and create the file */ -void Write_GENERIC_NetList( WinEDA_SchematicFrame* frame, - const wxString& FullFileName ) +void Write_GENERIC_NetList( WinEDA_SchematicFrame* frame, const wxString& FullFileName ) { wxString Line, FootprintName; SCH_SHEET_PATH* sheet; @@ -270,16 +268,11 @@ void Write_GENERIC_NetList( WinEDA_SchematicFrame* frame, fprintf( tmpfile, "$BeginComponentList\n" ); SCH_SHEET_LIST SheetList; - for( sheet = SheetList.GetFirst(); - sheet != NULL; - sheet = SheetList.GetNext() ) + for( sheet = SheetList.GetFirst(); sheet != NULL; sheet = SheetList.GetNext() ) { - for( SchItem = sheet->LastDrawList(); - SchItem != NULL; - SchItem = SchItem->Next() ) + for( SchItem = sheet->LastDrawList(); SchItem != NULL; SchItem = SchItem->Next() ) { - SchItem = Component = FindNextComponentAndCreatPinList( SchItem, - sheet ); + SchItem = Component = FindNextComponentAndCreatPinList( SchItem, sheet ); if( Component == NULL ) break; // No component left @@ -294,8 +287,7 @@ void Write_GENERIC_NetList( WinEDA_SchematicFrame* frame, fprintf( tmpfile, "\n$BeginComponent\n" ); fprintf( tmpfile, "TimeStamp=%8.8lX\n", Component->m_TimeStamp ); fprintf( tmpfile, "Footprint=%s\n", CONV_TO_UTF8( FootprintName ) ); - Line = wxT( "Reference=" ) + Component->GetRef( sheet ) + wxT( - "\n" ); + Line = wxT( "Reference=" ) + Component->GetRef( sheet ) + wxT( "\n" ); Line.Replace( wxT( " " ), wxT( "_" ) ); fputs( CONV_TO_UTF8( Line ), tmpfile ); @@ -317,8 +309,7 @@ void Write_GENERIC_NetList( WinEDA_SchematicFrame* frame, netname = ReturnPinNetName( Pin, wxT( "$-%.6d" ) ); if( netname.IsEmpty() ) netname = wxT( "?" ); - fprintf( tmpfile, "%.4s=%s\n", (char*) &Pin->m_PinNum, - CONV_TO_UTF8( netname ) ); + fprintf( tmpfile, "%.4s=%s\n", (char*) &Pin->m_PinNum, CONV_TO_UTF8( netname ) ); } fprintf( tmpfile, "$EndPinList\n" ); @@ -369,8 +360,7 @@ static void ClearUsedFlags( void ) * [.-] Or PSpice gnucap are beginning * + + Gnucap and PSpice are ultimately NetList */ -static void WriteNetListPspice( WinEDA_SchematicFrame* frame, FILE* f, - bool use_netnames ) +static void WriteNetListPspice( WinEDA_SchematicFrame* frame, FILE* f, bool use_netnames ) { char Line[1024]; SCH_SHEET_PATH* sheet; @@ -458,16 +448,11 @@ static void WriteNetListPspice( WinEDA_SchematicFrame* frame, FILE* f, /* Create component list */ ClearUsedFlags(); /* Reset the flags FlagControlMulti in all schematic * files*/ - for( sheet = SheetList.GetFirst(); - sheet != NULL; - sheet = SheetList.GetNext() ) + for( sheet = SheetList.GetFirst(); sheet != NULL; sheet = SheetList.GetNext() ) { - for( DrawList = sheet->LastDrawList(); - DrawList != NULL; - DrawList = DrawList->Next() ) + for( DrawList = sheet->LastDrawList(); DrawList != NULL; DrawList = DrawList->Next() ) { - DrawList = Component = FindNextComponentAndCreatPinList( DrawList, - sheet ); + DrawList = Component = FindNextComponentAndCreatPinList( DrawList, sheet ); if( Component == NULL ) break; @@ -527,9 +512,7 @@ static void WriteNetListPspice( WinEDA_SchematicFrame* frame, FILE* f, * = FALSE if with_pcbnew * Format ORCADPCB2 strict */ -static void WriteNetListPCBNEW( WinEDA_SchematicFrame* frame, - FILE* f, - bool with_pcbnew ) +static void WriteNetListPCBNEW( WinEDA_SchematicFrame* frame, FILE* f, bool with_pcbnew ) { wxString Line, FootprintName; char Buf[256]; @@ -552,16 +535,11 @@ static void WriteNetListPCBNEW( WinEDA_SchematicFrame* frame, SCH_SHEET_LIST SheetList; - for( sheet = SheetList.GetFirst(); - sheet != NULL; - sheet = SheetList.GetNext() ) + for( sheet = SheetList.GetFirst(); sheet != NULL; sheet = SheetList.GetNext() ) { - for( DrawList = sheet->LastDrawList(); - DrawList != NULL; - DrawList = DrawList->Next() ) + for( DrawList = sheet->LastDrawList(); DrawList != NULL; DrawList = DrawList->Next() ) { - DrawList = Component = FindNextComponentAndCreatPinList( DrawList, - sheet ); + DrawList = Component = FindNextComponentAndCreatPinList( DrawList, sheet ); if( Component == NULL ) break; @@ -577,8 +555,7 @@ static void WriteNetListPCBNEW( WinEDA_SchematicFrame* frame, if( CmpList == NULL ) { CmpList = (OBJ_CMP_TO_LIST*) - MyZMalloc( sizeof(OBJ_CMP_TO_LIST) * - CmpListSize ); + MyZMalloc( sizeof(OBJ_CMP_TO_LIST) * CmpListSize ); } if( CmpListCount >= CmpListSize ) { @@ -715,8 +692,7 @@ static void AddPinToComponentPinList( SCH_COMPONENT* Component, if( s_SortedComponentPinList.size() >= MAXPIN ) { /* Log message for Internal error */ - DisplayError( NULL, - wxT( "AddPinToComponentPinList err: MAXPIN reached" ) ); + DisplayError( NULL, wxT( "AddPinToComponentPinList err: MAXPIN reached" ) ); return; } } @@ -801,11 +777,9 @@ static void FindAllsInstancesOfComponent( SCH_COMPONENT* Component_in, SCH_SHEET_LIST SheetList; - for( sheet = SheetList.GetFirst(); sheet != NULL; - sheet = SheetList.GetNext() ) + for( sheet = SheetList.GetFirst(); sheet != NULL; sheet = SheetList.GetNext() ) { - for( SchItem = sheet->LastDrawList(); SchItem; - SchItem = SchItem->Next() ) + for( SchItem = sheet->LastDrawList(); SchItem; SchItem = SchItem->Next() ) { if( SchItem->Type() != TYPE_SCH_COMPONENT ) continue; @@ -819,8 +793,7 @@ static void FindAllsInstancesOfComponent( SCH_COMPONENT* Component_in, if( Entry == NULL ) continue; - for( pin = Entry->GetNextPin(); pin != NULL; - pin = Entry->GetNextPin( pin ) ) + for( pin = Entry->GetNextPin(); pin != NULL; pin = Entry->GetNextPin( pin ) ) { wxASSERT( pin->Type() == COMPONENT_PIN_DRAW_TYPE ); @@ -881,7 +854,7 @@ static void WriteGENERICListOfNets( FILE* f, NETLIST_OBJECT_LIST& aObjectsList ) NETLIST_OBJECT* netref; netref = aObjectsList[ii]->m_NetNameCandidate; if( netref ) - NetName = *netref->m_Label; + NetName = netref->m_Label; NetcodeName.Printf( wxT( "Net %d " ), NetCode ); NetcodeName += wxT( "\"" ); @@ -890,8 +863,7 @@ static void WriteGENERICListOfNets( FILE* f, NETLIST_OBJECT_LIST& aObjectsList ) if( netref->m_Type != NET_PINLABEL ) { // usual net name, prefix it by the sheet path - NetcodeName += - netref->m_SheetList.PathHumanReadable(); + NetcodeName += netref->m_SheetList.PathHumanReadable(); } NetcodeName += NetName; } @@ -934,7 +906,6 @@ static void WriteGENERICListOfNets( FILE* f, NETLIST_OBJECT_LIST& aObjectsList ) if( SameNetcodeCount >= 2 ) fprintf( f, " %s %.4s\n", CONV_TO_UTF8( CmpRef ), (const char*) &aObjectsList[ii]->m_PinNum ); - } } @@ -992,16 +963,11 @@ static void WriteNetListCADSTAR( WinEDA_SchematicFrame* frame, FILE* f ) *files*/ SCH_SHEET_LIST SheetList; - for( sheet = SheetList.GetFirst(); - sheet != NULL; - sheet = SheetList.GetNext() ) + for( sheet = SheetList.GetFirst(); sheet != NULL; sheet = SheetList.GetNext() ) { - for( DrawList = sheet->LastDrawList(); - DrawList != NULL; - DrawList = DrawList->Next() ) + for( DrawList = sheet->LastDrawList(); DrawList != NULL; DrawList = DrawList->Next() ) { - DrawList = Component = FindNextComponentAndCreatPinList( DrawList, - sheet ); + DrawList = Component = FindNextComponentAndCreatPinList( DrawList, sheet ); if( Component == NULL ) break; @@ -1062,10 +1028,11 @@ static void WriteListOfNetsCADSTAR( FILE* f, NETLIST_OBJECT_LIST& aObjectsList ) if( ( NetCode = aObjectsList[ii]->GetNet() ) != LastNetCode ) { NetName.Empty(); + NETLIST_OBJECT* netref; netref = aObjectsList[ii]->m_NetNameCandidate; if( netref ) - NetName = *netref->m_Label; + NetName = netref->m_Label; NetcodeName = wxT( "\"" ); if( !NetName.IsEmpty() ) diff --git a/eeschema/netlist.cpp b/eeschema/netlist.cpp index 04a038d64e..c8dab63ddc 100644 --- a/eeschema/netlist.cpp +++ b/eeschema/netlist.cpp @@ -361,7 +361,7 @@ void FindBestNetNameForEachNet( NETLIST_OBJECT_LIST& aNetItemBuffer ) * pin labels are global labels and have the highter priority * local labels have the lower priority * labels having the same priority are sorted by alphabetic order. - * + * */ static NETLIST_OBJECT* FindBestNetName( NETLIST_OBJECT_LIST& aLabelItemBuffer ) { @@ -385,7 +385,7 @@ static NETLIST_OBJECT* FindBestNetName( NETLIST_OBJECT_LIST& aLabelItemBuffer ) item = candidate; else if( candidate->m_Type == NET_HIERLABEL ) { - if( candidate->m_Label->Cmp(*item->m_Label) < 0 ) + if( candidate->m_Label.Cmp( item->m_Label ) < 0 ) item = candidate; } break; @@ -393,7 +393,7 @@ static NETLIST_OBJECT* FindBestNetName( NETLIST_OBJECT_LIST& aLabelItemBuffer ) case NET_LABEL: if( candidate->m_Type == NET_LABEL ) { - if( candidate->m_Label->Cmp(*item->m_Label) < 0 ) + if( candidate->m_Label.Cmp( item->m_Label ) < 0 ) item = candidate; } else @@ -403,10 +403,10 @@ static NETLIST_OBJECT* FindBestNetName( NETLIST_OBJECT_LIST& aLabelItemBuffer ) case NET_PINLABEL: if( candidate->m_Type != NET_PINLABEL ) break; - if( candidate->m_Label->Cmp(*item->m_Label) < 0 ) + if( candidate->m_Label.Cmp( item->m_Label ) < 0 ) item = candidate; break; - + default: // Should not occur. break; } @@ -439,9 +439,7 @@ static void SheetLabelConnect( NETLIST_OBJECT* SheetLabel ) if( ObjetNet->GetNet() == SheetLabel->GetNet() ) continue; //already connected. - wxASSERT( ObjetNet->m_Label ); - wxASSERT( SheetLabel->m_Label ); - if( ObjetNet->m_Label->CmpNoCase( *SheetLabel->m_Label ) != 0 ) + if( ObjetNet->m_Label.CmpNoCase( SheetLabel->m_Label ) != 0 ) continue; //different names. /* Propagate Netcode having all the objects of the same Netcode. */ @@ -470,7 +468,6 @@ static void AddConnectedObjects( SCH_SHEET_PATH* sheetlist, SCH_COMPONENT* DrawLibItem; LIB_COMPONENT* Entry; LIB_PIN* pin; - SCH_SHEET_PIN* SheetLabel; SCH_SHEET_PATH list; DrawList = sheetlist->LastScreen()->EEDrawList; @@ -547,7 +544,7 @@ static void AddConnectedObjects( SCH_SHEET_PATH* sheetlist, if( STRUCT->m_Layer == LAYER_HIERLABEL ) new_item->m_Type = NET_HIERLABEL; - new_item->m_Label = &STRUCT->m_Text; + new_item->m_Label = STRUCT->m_Text; new_item->m_Start = new_item->m_End = STRUCT->m_Pos; aNetItemBuffer.push_back( new_item ); @@ -576,7 +573,7 @@ static void AddConnectedObjects( SCH_SHEET_PATH* sheetlist, if( STRUCT->m_Layer == LAYER_HIERLABEL ) new_item->m_Type = NET_HIERLABEL; - new_item->m_Label = &STRUCT->m_Text; + new_item->m_Label = STRUCT->m_Text; new_item->m_Start = new_item->m_End = STRUCT->m_Pos; aNetItemBuffer.push_back( new_item ); @@ -622,7 +619,7 @@ static void AddConnectedObjects( SCH_SHEET_PATH* sheetlist, new_item->m_Link = DrawLibItem; new_item->m_ElectricalType = pin->m_PinType; new_item->m_PinNum = pin->m_PinNum; - new_item->m_Label = &pin->m_PinName; + new_item->m_Label = pin->m_PinName; new_item->m_Start = new_item->m_End = pos2; aNetItemBuffer.push_back( new_item ); @@ -636,7 +633,7 @@ static void AddConnectedObjects( SCH_SHEET_PATH* sheetlist, new_item->m_Comp = NULL; new_item->m_SheetList = *sheetlist; new_item->m_Type = NET_PINLABEL; - new_item->m_Label = &pin->m_PinName; + new_item->m_Label = pin->m_PinName; new_item->m_Start = pos2; new_item->m_End = new_item->m_Start; @@ -653,24 +650,26 @@ static void AddConnectedObjects( SCH_SHEET_PATH* sheetlist, break; case DRAW_SHEET_STRUCT_TYPE: + { #undef STRUCT #define STRUCT ( (SCH_SHEET*) DrawList ) list = *sheetlist; list.Push( STRUCT ); - SheetLabel = STRUCT->m_Label; - for( ; SheetLabel != NULL; SheetLabel = SheetLabel->Next() ) + SCH_SHEET* sheet = (SCH_SHEET*) DrawList; + + BOOST_FOREACH( SCH_SHEET_PIN label, sheet->GetSheetPins() ) { - ii = IsBusLabel( SheetLabel->m_Text ); + ii = IsBusLabel( label.m_Text ); new_item = new NETLIST_OBJECT(); new_item->m_SheetListInclude = *sheetlist; - new_item->m_Comp = SheetLabel; + new_item->m_Comp = &label; new_item->m_SheetList = *sheetlist; new_item->m_Link = DrawList; new_item->m_Type = NET_SHEETLABEL; - new_item->m_ElectricalType = SheetLabel->m_Shape; - new_item->m_Label = &SheetLabel->m_Text; + new_item->m_ElectricalType = label.m_Shape; + new_item->m_Label = label.m_Text; new_item->m_SheetListInclude = list; - new_item->m_Start = new_item->m_End = SheetLabel->m_Pos; + new_item->m_Start = new_item->m_End = label.m_Pos; aNetItemBuffer.push_back( new_item ); if( ii ) @@ -678,6 +677,7 @@ static void AddConnectedObjects( SCH_SHEET_PATH* sheetlist, } break; + } case DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE: default: @@ -828,11 +828,11 @@ static int ConvertBusToMembers( NETLIST_OBJECT_LIST& aNetItemBuffer, BusLabel.m_Type = NET_BUSLABELMEMBER; /* Conversion of BusLabel to the root Label name + the member id like mybus0, mybus1 ... */ - BufLine = BusLabel.m_Label->Left( RootBusNameLength ); + BufLine = BusLabel.m_Label.Left( RootBusNameLength ); BusMember = FirstNumWireBus; BufLine << BusMember; - BusLabel.m_Label = new wxString( BufLine ); + BusLabel.m_Label = BufLine; BusLabel.m_Member = BusMember; NumItem = 1; @@ -843,9 +843,9 @@ static int ConvertBusToMembers( NETLIST_OBJECT_LIST& aNetItemBuffer, NumItem++; /* Conversion of BusLabel to the root name + the current member id.*/ - BufLine = BusLabel.m_Label->Left( RootBusNameLength ); + BufLine = BusLabel.m_Label.Left( RootBusNameLength ); BufLine << BusMember; - new_label->m_Label = new wxString( BufLine ); + new_label->m_Label = BufLine; new_label->m_Member = BusMember; aNetItemBuffer.push_back( new_label ); @@ -1095,13 +1095,11 @@ void LabelConnect( NETLIST_OBJECT* LabelRef ) || ntype == NET_HIERBUSLABELMEMBER || ntype == NET_PINLABEL ) { - if( g_NetObjectslist[i]->m_Label->CmpNoCase( *LabelRef->m_Label ) - != 0 ) + if( g_NetObjectslist[i]->m_Label.CmpNoCase( LabelRef->m_Label ) != 0 ) continue; if( g_NetObjectslist[i]->GetNet() ) - PropageNetCode( - g_NetObjectslist[i]->GetNet(), LabelRef->GetNet(), 0 ); + PropageNetCode( g_NetObjectslist[i]->GetNet(), LabelRef->GetNet(), 0 ); else g_NetObjectslist[i]->SetNet( LabelRef->GetNet() ); } diff --git a/eeschema/netlist.h b/eeschema/netlist.h index 303fc84767..3bd1b81aec 100644 --- a/eeschema/netlist.h +++ b/eeschema/netlist.h @@ -93,7 +93,7 @@ public: bool IsPartsLocked() { - return m_Entry->m_UnitSelectionLocked; + return m_Entry->UnitsLocked(); } }; diff --git a/eeschema/onrightclick.cpp b/eeschema/onrightclick.cpp index b431718a04..d6a222293a 100644 --- a/eeschema/onrightclick.cpp +++ b/eeschema/onrightclick.cpp @@ -21,10 +21,8 @@ using namespace std; static void AddMenusForBlock( wxMenu* PopMenu, WinEDA_SchematicFrame* frame ); -static void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, - WinEDA_SchematicFrame* frame ); -static void AddMenusForBus( wxMenu* PopMenu, SCH_LINE* Bus, - WinEDA_SchematicFrame* frame ); +static void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, WinEDA_SchematicFrame* frame ); +static void AddMenusForBus( wxMenu* PopMenu, SCH_LINE* Bus, WinEDA_SchematicFrame* frame ); static void AddMenusForHierchicalSheet( wxMenu* PopMenu, SCH_SHEET* Sheet ); static void AddMenusForPinSheet( wxMenu* PopMenu, SCH_SHEET_PIN* PinSheet ); static void AddMenusForText( wxMenu* PopMenu, SCH_TEXT* Text ); @@ -43,12 +41,10 @@ static void AddMenusForMarkers( wxMenu* aPopMenu, SCH_MARKER* aMarker, * * This menu is then added to the list of zoom commands. */ -bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos, - wxMenu* PopMenu ) +bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ) { SCH_ITEM* DrawStruct = (SCH_ITEM*) GetScreen()->GetCurItem(); - bool BlockActive = - (GetScreen()->m_BlockLocate.m_Command != BLOCK_IDLE); + bool BlockActive = (GetScreen()->m_BlockLocate.m_Command != BLOCK_IDLE); // Do not start a block command on context menu. DrawPanel->m_CanStartBlock = -1; @@ -68,8 +64,7 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos, if( DrawStruct && (DrawStruct->Type() == DRAW_SHEET_STRUCT_TYPE) ) { SCH_SHEET_PIN* slabel; - slabel = LocateSheetLabel( (SCH_SHEET*) DrawStruct, - GetScreen()->m_Curseur ); + slabel = LocateSheetLabel( (SCH_SHEET*) DrawStruct, GetScreen()->m_Curseur ); if( slabel ) DrawStruct = slabel; } @@ -80,13 +75,11 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos, { if( DrawStruct && DrawStruct->m_Flags ) { - ADD_MENUITEM( PopMenu, ID_POPUP_CANCEL_CURRENT_COMMAND, - _( "Cancel" ), cancel_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_CANCEL_CURRENT_COMMAND, _( "Cancel" ), cancel_xpm ); } else { - ADD_MENUITEM( PopMenu, ID_POPUP_CLOSE_CURRENT_TOOL, - _( "End Tool" ), cancel_tool_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_CLOSE_CURRENT_TOOL, _( "End Tool" ), cancel_tool_xpm ); } PopMenu->AppendSeparator(); } @@ -94,8 +87,7 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos, { if( DrawStruct && DrawStruct->m_Flags ) { - ADD_MENUITEM( PopMenu, ID_POPUP_CANCEL_CURRENT_COMMAND, - _( "Cancel" ), cancel_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_CANCEL_CURRENT_COMMAND, _( "Cancel" ), cancel_xpm ); PopMenu->AppendSeparator(); } } @@ -104,8 +96,7 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos, { if( GetSheet()->Last() != g_RootSheet ) { - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_LEAVE_SHEET, - _( "Leave Sheet" ), leave_sheet_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_LEAVE_SHEET, _( "Leave Sheet" ), leave_sheet_xpm ); PopMenu->AppendSeparator(); } return true; @@ -120,8 +111,7 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos, { case DRAW_NOCONNECT_STRUCT_TYPE: - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, _( "Delete Noconn" ), - delete_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, _( "Delete Noconn" ), delete_xpm ); break; case DRAW_JUNCTION_STRUCT_TYPE: @@ -129,21 +119,18 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos, break; case DRAW_BUSENTRY_STRUCT_TYPE: - if( !flags ){ - wxString msg = AddHotkeyName( _( "Move Bus Entry" ), - s_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST, - msg, move_xpm ); + if( !flags ) + { + wxString msg = AddHotkeyName( _( "Move Bus Entry" ), s_Schematic_Hokeys_Descr, + HK_MOVE_COMPONENT_OR_ITEM ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST, msg, move_xpm ); } if( GetBusEntryShape( (SCH_BUS_ENTRY*) DrawStruct ) == '\\' ) - PopMenu->Append( ID_POPUP_SCH_ENTRY_SELECT_SLASH, - _( "Set Bus Entry /" ) ); + PopMenu->Append( ID_POPUP_SCH_ENTRY_SELECT_SLASH, _( "Set Bus Entry /" ) ); else - PopMenu->Append( ID_POPUP_SCH_ENTRY_SELECT_ANTISLASH, - _( "Set Bus Entry \\" ) ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, - _( "Delete Bus Entry" ), delete_bus_xpm ); + PopMenu->Append( ID_POPUP_SCH_ENTRY_SELECT_ANTISLASH, _( "Set Bus Entry \\" ) ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, _( "Delete Bus Entry" ), delete_bus_xpm ); break; case TYPE_SCH_MARKER: @@ -204,10 +191,8 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos, default: if( is_new ) - ADD_MENUITEM( PopMenu, ID_POPUP_END_LINE, _( "End Drawing" ), - apply_xpm ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, - _( "Delete Drawing" ), delete_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_END_LINE, _( "End Drawing" ), apply_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, _( "Delete Drawing" ), delete_xpm ); break; } @@ -223,8 +208,7 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos, default: wxString msg; - msg.Printf( wxT( "WinEDA_SchematicFrame::OnRightClick Error: unknown \ -DrawType %d" ), + msg.Printf( wxT( "WinEDA_SchematicFrame::OnRightClick Error: unknown DrawType %d" ), DrawStruct->Type() ); DisplayError( this, msg ); break; @@ -237,21 +221,17 @@ DrawType %d" ), void AddMenusForComponentField( wxMenu* PopMenu, SCH_FIELD* Field ) { - wxString msg; + wxString msg; if( !Field->m_Flags ){ - msg = AddHotkeyName( _( "Move Field" ), - s_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST, - msg, move_text_xpm ); + msg = AddHotkeyName( _( "Move Field" ), s_Schematic_Hokeys_Descr, + HK_MOVE_COMPONENT_OR_ITEM ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST, msg, move_text_xpm ); } - msg = AddHotkeyName( _( "Rotate Field" ), - s_Schematic_Hokeys_Descr, HK_ROTATE ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_FIELD, - msg, rotate_field_xpm ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_FIELD, - _( "Edit Field" ), edit_text_xpm ); + msg = AddHotkeyName( _( "Rotate Field" ), s_Schematic_Hokeys_Descr, HK_ROTATE ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_FIELD, msg, rotate_field_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_FIELD, _( "Edit Field" ), edit_text_xpm ); } @@ -282,59 +262,43 @@ void AddMenusForComponent( wxMenu* PopMenu, SCH_COMPONENT* Component ) msg = _( "Move Component" ); msg << wxT( " " ) << Component->GetField( REFERENCE )->m_Text; msg = AddHotkeyName( msg, s_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_CMP_REQUEST, - msg, move_xpm ); - msg = AddHotkeyName( _( "Drag Component" ), s_Schematic_Hokeys_Descr, - HK_DRAG ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DRAG_CMP_REQUEST, - msg, move_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_CMP_REQUEST, msg, move_xpm ); + msg = AddHotkeyName( _( "Drag Component" ), s_Schematic_Hokeys_Descr, HK_DRAG ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DRAG_CMP_REQUEST, msg, move_xpm ); } wxMenu* orientmenu = new wxMenu; - msg = AddHotkeyName( _( "Rotate +" ), s_Schematic_Hokeys_Descr, - HK_ROTATE ); - ADD_MENUITEM( orientmenu, ID_POPUP_SCH_ROTATE_CMP_COUNTERCLOCKWISE, - msg, rotate_pos_xpm ); - ADD_MENUITEM( orientmenu, ID_POPUP_SCH_ROTATE_CMP_CLOCKWISE, - _( "Rotate -" ), rotate_neg_xpm ); - msg = AddHotkeyName( _( "Mirror --" ), s_Schematic_Hokeys_Descr, - HK_MIRROR_X_COMPONENT ); + msg = AddHotkeyName( _( "Rotate +" ), s_Schematic_Hokeys_Descr, HK_ROTATE ); + ADD_MENUITEM( orientmenu, ID_POPUP_SCH_ROTATE_CMP_COUNTERCLOCKWISE, msg, rotate_pos_xpm ); + ADD_MENUITEM( orientmenu, ID_POPUP_SCH_ROTATE_CMP_CLOCKWISE, _( "Rotate -" ), rotate_neg_xpm ); + msg = AddHotkeyName( _( "Mirror --" ), s_Schematic_Hokeys_Descr, HK_MIRROR_X_COMPONENT ); ADD_MENUITEM( orientmenu, ID_POPUP_SCH_MIROR_X_CMP, msg, mirror_V_xpm ); - msg = AddHotkeyName( _( "Mirror ||" ), s_Schematic_Hokeys_Descr, - HK_MIRROR_Y_COMPONENT ); + msg = AddHotkeyName( _( "Mirror ||" ), s_Schematic_Hokeys_Descr, HK_MIRROR_Y_COMPONENT ); ADD_MENUITEM( orientmenu, ID_POPUP_SCH_MIROR_Y_CMP, msg, mirror_H_xpm ); - msg = AddHotkeyName( _( "Normal" ), s_Schematic_Hokeys_Descr, - HK_ORIENT_NORMAL_COMPONENT ); + msg = AddHotkeyName( _( "Normal" ), s_Schematic_Hokeys_Descr, HK_ORIENT_NORMAL_COMPONENT ); ADD_MENUITEM( orientmenu, ID_POPUP_SCH_ORIENT_NORMAL_CMP, msg, normal_xpm ); - ADD_MENUITEM_WITH_SUBMENU( PopMenu, orientmenu, - ID_POPUP_SCH_GENERIC_ORIENT_CMP, + ADD_MENUITEM_WITH_SUBMENU( PopMenu, orientmenu, ID_POPUP_SCH_GENERIC_ORIENT_CMP, _( "Orient Component" ), orient_xpm ); wxMenu* editmenu = new wxMenu; - msg = AddHotkeyName( _( "Edit" ), s_Schematic_Hokeys_Descr, - HK_EDIT ); - ADD_MENUITEM( editmenu, ID_POPUP_SCH_EDIT_CMP, msg, - edit_component_xpm ); + msg = AddHotkeyName( _( "Edit" ), s_Schematic_Hokeys_Descr, HK_EDIT ); + ADD_MENUITEM( editmenu, ID_POPUP_SCH_EDIT_CMP, msg, edit_component_xpm ); if( libComponent && libComponent->isNormal() ) { - msg = AddHotkeyName( _( "Value " ), s_Schematic_Hokeys_Descr, - HK_EDIT_COMPONENT_VALUE ); - ADD_MENUITEM( editmenu, ID_POPUP_SCH_EDIT_VALUE_CMP, msg, - edit_comp_value_xpm ); + msg = AddHotkeyName( _( "Value " ), s_Schematic_Hokeys_Descr, HK_EDIT_COMPONENT_VALUE ); + ADD_MENUITEM( editmenu, ID_POPUP_SCH_EDIT_VALUE_CMP, msg, edit_comp_value_xpm ); - ADD_MENUITEM( editmenu, ID_POPUP_SCH_EDIT_REF_CMP, - _( "Reference" ), edit_comp_ref_xpm ); + ADD_MENUITEM( editmenu, ID_POPUP_SCH_EDIT_REF_CMP, _( "Reference" ), edit_comp_ref_xpm ); msg = AddHotkeyName( _( "Footprint " ), s_Schematic_Hokeys_Descr, HK_EDIT_COMPONENT_FOOTPRINT ); - ADD_MENUITEM( editmenu, ID_POPUP_SCH_EDIT_FOOTPRINT_CMP, msg, - edit_comp_footprint_xpm ); + ADD_MENUITEM( editmenu, ID_POPUP_SCH_EDIT_FOOTPRINT_CMP, msg, edit_comp_footprint_xpm ); } if( libComponent && libComponent->HasConversion() ) - ADD_MENUITEM( editmenu, ID_POPUP_SCH_EDIT_CONVERT_CMP, - _( "Convert" ), component_select_alternate_shape_xpm ); + ADD_MENUITEM( editmenu, ID_POPUP_SCH_EDIT_CONVERT_CMP, _( "Convert" ), + component_select_alternate_shape_xpm ); if( libComponent && ( libComponent->GetPartCount() >= 2 ) ) { @@ -347,31 +311,24 @@ void AddMenusForComponent( wxMenu* PopMenu, SCH_COMPONENT* Component ) sel_unit_menu->Append( ID_POPUP_SCH_SELECT_UNIT1 + ii, num_unit ); } - ADD_MENUITEM_WITH_SUBMENU( editmenu, sel_unit_menu, - ID_POPUP_SCH_SELECT_UNIT_CMP, + ADD_MENUITEM_WITH_SUBMENU( editmenu, sel_unit_menu, ID_POPUP_SCH_SELECT_UNIT_CMP, _( "Unit" ), component_select_unit_xpm ); } - ADD_MENUITEM_WITH_SUBMENU( PopMenu, editmenu, - ID_POPUP_SCH_GENERIC_EDIT_CMP, + ADD_MENUITEM_WITH_SUBMENU( PopMenu, editmenu, ID_POPUP_SCH_GENERIC_EDIT_CMP, _( "Edit Component" ), edit_component_xpm ); if( !Component->m_Flags ) { - msg = AddHotkeyName( _( "Copy Component" ), - s_Schematic_Hokeys_Descr, + msg = AddHotkeyName( _( "Copy Component" ), s_Schematic_Hokeys_Descr, HK_COPY_COMPONENT_OR_LABEL ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_COPY_ITEM, - msg, copy_button ); - msg = AddHotkeyName( _( "Delete Component" ), s_Schematic_Hokeys_Descr, - HK_DELETE ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE_CMP, - msg, delete_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_COPY_ITEM, msg, copy_button ); + msg = AddHotkeyName( _( "Delete Component" ), s_Schematic_Hokeys_Descr, HK_DELETE ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE_CMP, msg, delete_xpm ); } if( libEntry && !libEntry->GetDocFileName().IsEmpty() ) - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DISPLAYDOC_CMP, _( "Doc" ), - datasheet_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DISPLAYDOC_CMP, _( "Doc" ), datasheet_xpm ); } @@ -382,28 +339,20 @@ void AddMenusForGLabel( wxMenu* PopMenu, SCH_GLOBALLABEL* GLabel ) if( !GLabel->m_Flags ) { - msg = AddHotkeyName( _( "Move Global Label" ), - s_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST, - msg, move_text_xpm ); - msg = AddHotkeyName( _( "Copy Global Label" ), - s_Schematic_Hokeys_Descr, + msg = AddHotkeyName( _( "Move Global Label" ), s_Schematic_Hokeys_Descr, + HK_MOVE_COMPONENT_OR_ITEM ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST, msg, move_text_xpm ); + msg = AddHotkeyName( _( "Copy Global Label" ), s_Schematic_Hokeys_Descr, HK_COPY_COMPONENT_OR_LABEL ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_COPY_ITEM, - msg, copy_button ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_COPY_ITEM, msg, copy_button ); } - msg = AddHotkeyName( _( "Rotate Global Label" ), s_Schematic_Hokeys_Descr, - HK_ROTATE ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_TEXT, - msg, rotate_glabel_xpm ); - msg = AddHotkeyName( _( "Edit Global Label" ), s_Schematic_Hokeys_Descr, - HK_EDIT ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_TEXT, - msg, edit_text_xpm ); - msg = AddHotkeyName( _( "Delete Global Label" ), s_Schematic_Hokeys_Descr, - HK_DELETE ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, - msg, delete_text_xpm ); + + msg = AddHotkeyName( _( "Rotate Global Label" ), s_Schematic_Hokeys_Descr, HK_ROTATE ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_TEXT, msg, rotate_glabel_xpm ); + msg = AddHotkeyName( _( "Edit Global Label" ), s_Schematic_Hokeys_Descr, HK_EDIT ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_TEXT, msg, edit_text_xpm ); + msg = AddHotkeyName( _( "Delete Global Label" ), s_Schematic_Hokeys_Descr, HK_DELETE ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, msg, delete_text_xpm ); // add menu change type text (to label, glabel, text): ADD_MENUITEM( menu_change_type, ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_HLABEL, @@ -412,8 +361,7 @@ void AddMenusForGLabel( wxMenu* PopMenu, SCH_GLOBALLABEL* GLabel ) _( "Change to Label" ), glabel2label_xpm ); ADD_MENUITEM( menu_change_type, ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_COMMENT, _( "Change to Text" ), glabel2text_xpm ); - ADD_MENUITEM_WITH_SUBMENU( PopMenu, menu_change_type, - ID_POPUP_SCH_CHANGE_TYPE_TEXT, + ADD_MENUITEM_WITH_SUBMENU( PopMenu, menu_change_type, ID_POPUP_SCH_CHANGE_TYPE_TEXT, _( "Change Type" ), gl_change_xpm ); } @@ -425,29 +373,19 @@ void AddMenusForHLabel( wxMenu* PopMenu, SCH_HIERLABEL* HLabel ) if( !HLabel->m_Flags ) { - msg = AddHotkeyName( _( "Move Hierarchical Label" ), - s_Schematic_Hokeys_Descr, + msg = AddHotkeyName( _( "Move Hierarchical Label" ), s_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST, - msg, move_text_xpm ); - msg = AddHotkeyName( _( "Copy Hierarchical Label" ), - s_Schematic_Hokeys_Descr, + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST, msg, move_text_xpm ); + msg = AddHotkeyName( _( "Copy Hierarchical Label" ), s_Schematic_Hokeys_Descr, HK_COPY_COMPONENT_OR_LABEL ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_COPY_ITEM, - msg, copy_button ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_COPY_ITEM, msg, copy_button ); } - msg = AddHotkeyName( _( "Rotate Hierarchical Label" ), s_Schematic_Hokeys_Descr, - HK_ROTATE ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_TEXT, - msg, rotate_glabel_xpm ); - msg = AddHotkeyName( _( "Edit Hierarchical Label" ), s_Schematic_Hokeys_Descr, - HK_EDIT ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_TEXT, - msg, edit_text_xpm ); - msg = AddHotkeyName( _( "Delete Hierarchical Label" ), s_Schematic_Hokeys_Descr, - HK_DELETE ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, - msg, delete_text_xpm ); + msg = AddHotkeyName( _( "Rotate Hierarchical Label" ), s_Schematic_Hokeys_Descr, HK_ROTATE ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_TEXT, msg, rotate_glabel_xpm ); + msg = AddHotkeyName( _( "Edit Hierarchical Label" ), s_Schematic_Hokeys_Descr, HK_EDIT ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_TEXT, msg, edit_text_xpm ); + msg = AddHotkeyName( _( "Delete Hierarchical Label" ), s_Schematic_Hokeys_Descr, HK_DELETE ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, msg, delete_text_xpm ); // add menu change type text (to label, glabel, text): ADD_MENUITEM( menu_change_type, ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_LABEL, @@ -456,8 +394,7 @@ void AddMenusForHLabel( wxMenu* PopMenu, SCH_HIERLABEL* HLabel ) _( "Change to Text" ), glabel2text_xpm ); ADD_MENUITEM( menu_change_type, ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_GLABEL, _( "Change to Global Label" ), label2glabel_xpm ); - ADD_MENUITEM_WITH_SUBMENU( PopMenu, menu_change_type, - ID_POPUP_SCH_CHANGE_TYPE_TEXT, + ADD_MENUITEM_WITH_SUBMENU( PopMenu, menu_change_type, ID_POPUP_SCH_CHANGE_TYPE_TEXT, _( "Change Type" ), gl_change_xpm ); } @@ -471,26 +408,17 @@ void AddMenusForLabel( wxMenu* PopMenu, SCH_LABEL* Label ) { msg = AddHotkeyName( _( "Move Label" ), s_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST, - msg, move_text_xpm ); - msg = AddHotkeyName( _( "Copy Label" ), - s_Schematic_Hokeys_Descr, + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST, msg, move_text_xpm ); + msg = AddHotkeyName( _( "Copy Label" ), s_Schematic_Hokeys_Descr, HK_COPY_COMPONENT_OR_LABEL ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_COPY_ITEM, - msg, copy_button ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_COPY_ITEM, msg, copy_button ); } - msg = AddHotkeyName( _( "Rotate Label" ), s_Schematic_Hokeys_Descr, - HK_ROTATE ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_TEXT, - msg, rotate_pos_xpm ); - msg = AddHotkeyName( _( "Edit Label" ), s_Schematic_Hokeys_Descr, - HK_EDIT ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_TEXT, - msg, edit_text_xpm ); - msg = AddHotkeyName( _( "Delete Label" ), s_Schematic_Hokeys_Descr, - HK_DELETE ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, - msg, delete_text_xpm ); + msg = AddHotkeyName( _( "Rotate Label" ), s_Schematic_Hokeys_Descr, HK_ROTATE ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_TEXT, msg, rotate_pos_xpm ); + msg = AddHotkeyName( _( "Edit Label" ), s_Schematic_Hokeys_Descr, HK_EDIT ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_TEXT, msg, edit_text_xpm ); + msg = AddHotkeyName( _( "Delete Label" ), s_Schematic_Hokeys_Descr, HK_DELETE ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, msg, delete_text_xpm ); // add menu change type text (to label, glabel, text): ADD_MENUITEM( menu_change_type, ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_HLABEL, @@ -499,8 +427,7 @@ void AddMenusForLabel( wxMenu* PopMenu, SCH_LABEL* Label ) _( "Change to Text" ), label2text_xpm ); ADD_MENUITEM( menu_change_type, ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_GLABEL, _( "Change to Global Label" ), label2glabel_xpm ); - ADD_MENUITEM_WITH_SUBMENU( PopMenu, menu_change_type, - ID_POPUP_SCH_CHANGE_TYPE_TEXT, + ADD_MENUITEM_WITH_SUBMENU( PopMenu, menu_change_type, ID_POPUP_SCH_CHANGE_TYPE_TEXT, _( "Change Type" ), gl_change_xpm ); } @@ -512,29 +439,20 @@ void AddMenusForText( wxMenu* PopMenu, SCH_TEXT* Text ) if( !Text->m_Flags ) { - msg = AddHotkeyName( _( "Move Text" ), - s_Schematic_Hokeys_Descr, + msg = AddHotkeyName( _( "Move Text" ), s_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST, - msg, move_text_xpm ); - msg = AddHotkeyName( _( "Copy Text" ), - s_Schematic_Hokeys_Descr, + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST, msg, move_text_xpm ); + msg = AddHotkeyName( _( "Copy Text" ), s_Schematic_Hokeys_Descr, HK_COPY_COMPONENT_OR_LABEL ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_COPY_ITEM, - msg, copy_button ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_COPY_ITEM, msg, copy_button ); } - msg = AddHotkeyName( _( "Rotate Text" ), s_Schematic_Hokeys_Descr, - HK_ROTATE ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_TEXT, msg, - rotate_pos_xpm ); - msg = AddHotkeyName( _( "Edit Text" ), s_Schematic_Hokeys_Descr, - HK_EDIT ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_TEXT, msg, - edit_text_xpm ); - msg = AddHotkeyName( _( "Delete Text" ), s_Schematic_Hokeys_Descr, - HK_DELETE ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, msg, - delete_text_xpm ); + + msg = AddHotkeyName( _( "Rotate Text" ), s_Schematic_Hokeys_Descr, HK_ROTATE ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_TEXT, msg, rotate_pos_xpm ); + msg = AddHotkeyName( _( "Edit Text" ), s_Schematic_Hokeys_Descr, HK_EDIT ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_TEXT, msg, edit_text_xpm ); + msg = AddHotkeyName( _( "Delete Text" ), s_Schematic_Hokeys_Descr, HK_DELETE ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, msg, delete_text_xpm ); /* add menu change type text (to label, glabel, text), * but only if this is a single line text @@ -543,22 +461,17 @@ void AddMenusForText( wxMenu* PopMenu, SCH_TEXT* Text ) { ADD_MENUITEM( menu_change_type, ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_LABEL, _( "Change to Label" ), label2text_xpm ); - ADD_MENUITEM( menu_change_type, - ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_HLABEL, - _( "Change to Hierarchical Label" ), - label2glabel_xpm ); - ADD_MENUITEM( menu_change_type, - ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_GLABEL, + ADD_MENUITEM( menu_change_type, ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_HLABEL, + _( "Change to Hierarchical Label" ), label2glabel_xpm ); + ADD_MENUITEM( menu_change_type, ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_GLABEL, _( "Change to Glabel" ), label2glabel_xpm ); - ADD_MENUITEM_WITH_SUBMENU( PopMenu, menu_change_type, - ID_POPUP_SCH_CHANGE_TYPE_TEXT, + ADD_MENUITEM_WITH_SUBMENU( PopMenu, menu_change_type, ID_POPUP_SCH_CHANGE_TYPE_TEXT, _( "Change Type" ), gl_change_xpm ); } } -void AddMenusForJunction( wxMenu* PopMenu, SCH_JUNCTION* Junction, - WinEDA_SchematicFrame* frame ) +void AddMenusForJunction( wxMenu* PopMenu, SCH_JUNCTION* Junction, WinEDA_SchematicFrame* frame ) { bool is_new = (Junction->m_Flags & IS_NEW) ? TRUE : FALSE; wxString msg; @@ -567,28 +480,22 @@ void AddMenusForJunction( wxMenu* PopMenu, SCH_JUNCTION* Junction, { if( PickStruct( frame->GetScreen()->m_Curseur, frame->GetScreen(), WIREITEM | BUSITEM | EXCLUDE_WIRE_BUS_ENDPOINTS ) ) - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_BREAK_WIRE, - _( "Break Wire" ), break_line_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_BREAK_WIRE, _( "Break Wire" ), break_line_xpm ); } - msg = AddHotkeyName( _( "Delete Junction" ), s_Schematic_Hokeys_Descr, - HK_DELETE ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, msg, - delete_xpm ); + msg = AddHotkeyName( _( "Delete Junction" ), s_Schematic_Hokeys_Descr, HK_DELETE ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, msg, delete_xpm ); - if( PickStruct( frame->GetScreen()->m_Curseur, frame->GetScreen(), - WIREITEM | BUSITEM ) ) + if( PickStruct( frame->GetScreen()->m_Curseur, frame->GetScreen(), WIREITEM | BUSITEM ) ) { - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE_NODE, - _( "Delete Node" ), delete_node_xpm ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE_CONNECTION, - _( "Delete Connection" ), delete_connection_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE_NODE, _( "Delete Node" ), delete_node_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE_CONNECTION, _( "Delete Connection" ), + delete_connection_xpm ); } } -void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, - WinEDA_SchematicFrame* frame ) +void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, WinEDA_SchematicFrame* frame ) { bool is_new = (Wire->m_Flags & IS_NEW) ? TRUE : FALSE; wxPoint pos = frame->GetScreen()->m_Curseur; @@ -600,41 +507,32 @@ void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, return; } - msg = AddHotkeyName( _( "Drag Wire" ), s_Schematic_Hokeys_Descr, - HK_DRAG ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DRAG_WIRE_REQUEST, msg, - move_track_xpm ); + msg = AddHotkeyName( _( "Drag Wire" ), s_Schematic_Hokeys_Descr, HK_DRAG ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DRAG_WIRE_REQUEST, msg, move_track_xpm ); PopMenu->AppendSeparator(); - msg = AddHotkeyName( _( "Delete Wire" ), s_Schematic_Hokeys_Descr, - HK_DELETE ); + msg = AddHotkeyName( _( "Delete Wire" ), s_Schematic_Hokeys_Descr, HK_DELETE ); ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, msg, delete_xpm ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE_NODE, _( "Delete Node" ), - delete_node_xpm ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE_CONNECTION, - _( "Delete Connection" ), delete_connection_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE_NODE, _( "Delete Node" ), delete_node_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE_CONNECTION, _( "Delete Connection" ), + delete_connection_xpm ); if( PickStruct( frame->GetScreen()->m_Curseur, frame->GetScreen(), WIREITEM | BUSITEM | EXCLUDE_WIRE_BUS_ENDPOINTS ) ) - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_BREAK_WIRE, _( "Break Wire" ), - break_line_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_BREAK_WIRE, _( "Break Wire" ), break_line_xpm ); PopMenu->AppendSeparator(); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ADD_JUNCTION, _( "Add Junction" ), - add_junction_xpm ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ADD_LABEL, _( "Add Label" ), - add_line_label_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ADD_JUNCTION, _( "Add Junction" ), add_junction_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ADD_LABEL, _( "Add Label" ), add_line_label_xpm ); // Add global label command only if the cursor is over one end of the wire. if( ( pos.x == Wire->m_Start.x && pos.y == Wire->m_Start.y) || ( pos.x == Wire->m_End.x && pos.y == Wire->m_End.y ) ) - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ADD_GLABEL, - _( "Add Global Label" ), add_glabel_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ADD_GLABEL, _( "Add Global Label" ), add_glabel_xpm ); } -void AddMenusForBus( wxMenu* PopMenu, SCH_LINE* Bus, - WinEDA_SchematicFrame* frame ) +void AddMenusForBus( wxMenu* PopMenu, SCH_LINE* Bus, WinEDA_SchematicFrame* frame ) { bool is_new = (Bus->m_Flags & IS_NEW) ? TRUE : FALSE; wxPoint pos = frame->GetScreen()->m_Curseur; @@ -645,105 +543,89 @@ void AddMenusForBus( wxMenu* PopMenu, SCH_LINE* Bus, return; } - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, _( "Delete Bus" ), - delete_bus_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, _( "Delete Bus" ), delete_bus_xpm ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_BREAK_WIRE, _( "Break Bus" ), - break_bus_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_BREAK_WIRE, _( "Break Bus" ), break_bus_xpm ); PopMenu->AppendSeparator(); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ADD_JUNCTION, _( "Add Junction" ), - add_junction_xpm ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ADD_LABEL, _( "Add Label" ), - add_line_label_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ADD_JUNCTION, _( "Add Junction" ), add_junction_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ADD_LABEL, _( "Add Label" ), add_line_label_xpm ); // Add global label command only if the cursor is over one end of the bus. if( ( pos.x == Bus->m_Start.x && pos.y == Bus->m_Start.y) || ( pos.x == Bus->m_End.x && pos.y == Bus->m_End.y ) ) - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ADD_GLABEL, - _( "Add Global Label" ), add_glabel_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ADD_GLABEL, _( "Add Global Label" ), add_glabel_xpm ); } void AddMenusForHierchicalSheet( wxMenu* PopMenu, SCH_SHEET* Sheet ) { - wxString msg; + wxString msg; if( !Sheet->m_Flags ) { - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ENTER_SHEET, - _( "Enter Sheet" ), enter_sheet_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ENTER_SHEET, _( "Enter Sheet" ), enter_sheet_xpm ); PopMenu->AppendSeparator(); - msg = AddHotkeyName( _( "Move Sheet" ), - s_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST, - msg, move_sheet_xpm ); + msg = AddHotkeyName( _( "Move Sheet" ), s_Schematic_Hokeys_Descr, + HK_MOVE_COMPONENT_OR_ITEM ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST, msg, move_sheet_xpm ); - msg = AddHotkeyName( _( "Drag Sheet" ), s_Schematic_Hokeys_Descr, - HK_DRAG ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DRAG_CMP_REQUEST, - msg, move_sheet_xpm ); + msg = AddHotkeyName( _( "Drag Sheet" ), s_Schematic_Hokeys_Descr, HK_DRAG ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DRAG_CMP_REQUEST, msg, move_sheet_xpm ); } if( Sheet->m_Flags ) { - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_END_SHEET, _( "Place Sheet" ), - apply_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_END_SHEET, _( "Place Sheet" ), apply_xpm ); } else { - msg = AddHotkeyName( _( "Edit Sheet" ), - s_Schematic_Hokeys_Descr, HK_EDIT ); + msg = AddHotkeyName( _( "Edit Sheet" ), s_Schematic_Hokeys_Descr, HK_EDIT ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_SHEET, msg, - edit_sheet_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_SHEET, msg, edit_sheet_xpm ); ADD_MENUITEM( PopMenu, ID_POPUP_SCH_RESIZE_SHEET, _( "Resize Sheet" ), resize_sheet_xpm ); PopMenu->AppendSeparator(); ADD_MENUITEM( PopMenu, ID_POPUP_IMPORT_GLABEL, _( "Import PinSheets" ), import_hierarchical_label_xpm ); - if( Sheet->m_Label ) // Sheet has pin labels, and can be cleaned - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_CLEANUP_SHEET, - _( "Cleanup PinSheets" ), options_pinsheet_xpm ); + + if( Sheet->HasUndefinedLabels() ) // Sheet has pin labels, and can be cleaned + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_CLEANUP_SHEET, _( "Cleanup PinSheets" ), + options_pinsheet_xpm ); PopMenu->AppendSeparator(); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, _( "Delete Sheet" ), - delete_sheet_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, _( "Delete Sheet" ), delete_sheet_xpm ); } } void AddMenusForPinSheet( wxMenu* PopMenu, SCH_SHEET_PIN* PinSheet ) { - wxString msg; - - if( !PinSheet->m_Flags ){ - msg = AddHotkeyName( _( "Move PinSheet" ), - s_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM ); - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_PINSHEET, - msg, move_xpm ); - } - - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_PINSHEET, _( "Edit PinSheet" ), - edit_xpm ); + wxString msg; if( !PinSheet->m_Flags ) - ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, _( "Delete PinSheet" ), - delete_pinsheet_xpm ); + { + msg = AddHotkeyName( _( "Move PinSheet" ), s_Schematic_Hokeys_Descr, + HK_MOVE_COMPONENT_OR_ITEM ); + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_PINSHEET, msg, move_xpm ); + } + + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_PINSHEET, _( "Edit PinSheet" ), edit_xpm ); + + if( !PinSheet->m_Flags ) + ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, _( "Delete PinSheet" ), delete_pinsheet_xpm ); } void AddMenusForBlock( wxMenu* PopMenu, WinEDA_SchematicFrame* frame ) { wxString msg; - ADD_MENUITEM( PopMenu, ID_POPUP_CANCEL_CURRENT_COMMAND, - _( "Cancel Block" ), cancel_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_CANCEL_CURRENT_COMMAND, _( "Cancel Block" ), cancel_xpm ); PopMenu->AppendSeparator(); if( frame->GetScreen()->m_BlockLocate.m_Command == BLOCK_MOVE ) - ADD_MENUITEM( PopMenu, ID_POPUP_ZOOM_BLOCK, _( "Window Zoom" ), - zoom_selected_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_ZOOM_BLOCK, _( "Window Zoom" ), zoom_selected_xpm ); ADD_MENUITEM( PopMenu, ID_POPUP_PLACE_BLOCK, _( "Place Block" ), apply_xpm ); @@ -752,20 +634,15 @@ void AddMenusForBlock( wxMenu* PopMenu, WinEDA_SchematicFrame* frame ) if( frame->GetScreen()->m_BlockLocate.m_Command == BLOCK_MOVE ) { ADD_MENUITEM( PopMenu, wxID_COPY, _( "Save Block" ), copy_button ); - ADD_MENUITEM( PopMenu, ID_POPUP_COPY_BLOCK, _( "Copy Block" ), - copyblock_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_COPY_BLOCK, _( "Copy Block" ), copyblock_xpm ); msg = AddHotkeyName( _( "Drag Block" ), s_Schematic_Hokeys_Descr, HK_MOVEBLOCK_TO_DRAGBLOCK ); - ADD_MENUITEM( PopMenu, ID_POPUP_DRAG_BLOCK, msg, - move_xpm ); - ADD_MENUITEM( PopMenu, ID_POPUP_DELETE_BLOCK, _( "Delete Block" ), - delete_xpm ); - ADD_MENUITEM( PopMenu, ID_POPUP_MIRROR_Y_BLOCK, - _( "Mirror Block ||" ), mirror_H_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_DRAG_BLOCK, msg, move_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_DELETE_BLOCK, _( "Delete Block" ), delete_xpm ); + ADD_MENUITEM( PopMenu, ID_POPUP_MIRROR_Y_BLOCK, _( "Mirror Block ||" ), mirror_H_xpm ); #if 0 #ifdef __WINDOWS__ - ADD_MENUITEM( menu_other_block_commands, - ID_GEN_COPY_BLOCK_TO_CLIPBOARD, + ADD_MENUITEM( menu_other_block_commands, ID_GEN_COPY_BLOCK_TO_CLIPBOARD, _( "Copy to Clipboard" ), copy_button ); #endif #endif @@ -773,11 +650,8 @@ void AddMenusForBlock( wxMenu* PopMenu, WinEDA_SchematicFrame* frame ) } -void AddMenusForMarkers( wxMenu* aPopMenu, SCH_MARKER* aMarker, - WinEDA_SchematicFrame* aFrame ) +void AddMenusForMarkers( wxMenu* aPopMenu, SCH_MARKER* aMarker, WinEDA_SchematicFrame* aFrame ) { - ADD_MENUITEM( aPopMenu, ID_POPUP_SCH_DELETE, _( "Delete Marker" ), - delete_xpm ); - ADD_MENUITEM( aPopMenu, ID_POPUP_SCH_GETINFO_MARKER, - _( "Marker Error Info" ), info_xpm ); + ADD_MENUITEM( aPopMenu, ID_POPUP_SCH_DELETE, _( "Delete Marker" ), delete_xpm ); + ADD_MENUITEM( aPopMenu, ID_POPUP_SCH_GETINFO_MARKER, _( "Marker Error Info" ), info_xpm ); } diff --git a/eeschema/plot.cpp b/eeschema/plot.cpp index 062458dcc6..19f55a4015 100644 --- a/eeschema/plot.cpp +++ b/eeschema/plot.cpp @@ -346,7 +346,6 @@ static void Plot_Hierarchical_PIN_Sheet( PLOTTER* plotter, static void PlotSheetStruct( PLOTTER* plotter, SCH_SHEET* Struct ) { - SCH_SHEET_PIN* SheetLabelStruct; EDA_Colors txtcolor = UNSPECIFIED_COLOR; wxSize size; wxString Text; @@ -392,20 +391,17 @@ static void PlotSheetStruct( PLOTTER* plotter, SCH_SHEET* Struct ) plotter->set_color( ReturnLayerColor( LAYER_SHEETFILENAME ) ); - plotter->text( wxPoint( Struct->m_Pos.x, - Struct->m_Pos.y + Struct->m_Size.y + 4 ), + plotter->text( wxPoint( Struct->m_Pos.x, Struct->m_Pos.y + Struct->m_Size.y + 4 ), txtcolor, Text, TEXT_ORIENT_HORIZ, size, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_TOP, thickness, italic, false ); - /* Draw texts : SheetLabel */ - SheetLabelStruct = Struct->m_Label; plotter->set_color( ReturnLayerColor( Struct->m_Layer ) ); - while( SheetLabelStruct != NULL ) + /* Draw texts : SheetLabel */ + BOOST_FOREACH( SCH_SHEET_PIN& label, Struct->GetSheetPins() ) { - Plot_Hierarchical_PIN_Sheet( plotter, SheetLabelStruct ); - SheetLabelStruct = SheetLabelStruct->Next(); + label.Plot( plotter ); } } diff --git a/eeschema/read_from_file_schematic_items_descriptions.cpp b/eeschema/read_from_file_schematic_items_descriptions.cpp index 163ce7e6d6..683458a579 100644 --- a/eeschema/read_from_file_schematic_items_descriptions.cpp +++ b/eeschema/read_from_file_schematic_items_descriptions.cpp @@ -184,7 +184,7 @@ int ReadSheetDescr( wxWindow* frame, char* Line, FILE* f, wxString& aMsgDiag, int ii, fieldNdx, size; char Name1[256], Char1[256], Char2[256]; SCH_SHEET* SheetStruct; - SCH_SHEET_PIN* SheetLabelStruct, * OldSheetLabel = NULL; + SCH_SHEET_PIN* SheetLabelStruct; int Failed = FALSE; char* ptcar; @@ -305,28 +305,21 @@ error line %d, aborted\n" ), if( fieldNdx > 1 ) { - SheetLabelStruct = new SCH_SHEET_PIN( SheetStruct, wxPoint( 0, 0 ), - CONV_FROM_UTF8( Name1 ) ); - - if( SheetStruct->m_Label == NULL ) - OldSheetLabel = SheetStruct->m_Label = SheetLabelStruct; - else - OldSheetLabel->SetNext( (EDA_BaseStruct*) SheetLabelStruct ); - OldSheetLabel = SheetLabelStruct; + int x, y; /* Read coordinates. */ - if( sscanf( ptcar, "%s %s %d %d %d", Char1, Char2, - &SheetLabelStruct->m_Pos.x, &SheetLabelStruct->m_Pos.y, - &size ) != 5 ) + if( sscanf( ptcar, "%s %s %d %d %d", Char1, Char2, &x, &y, &size ) != 5 ) { - aMsgDiag.Printf( wxT( "EESchema file Sheet Label Caract \ -error line %d, aborted\n" ), + aMsgDiag.Printf( wxT( "EESchema file sheet label error at line %d, ignoring.\n" ), *aLineNum ); aMsgDiag << CONV_FROM_UTF8( Line ); DisplayError( frame, aMsgDiag ); continue; } + SheetLabelStruct = new SCH_SHEET_PIN( SheetStruct, wxPoint( x, y ), + CONV_FROM_UTF8( Name1 ) ); + if( size == 0 ) size = DEFAULT_SIZE_TEXT; SheetLabelStruct->m_Size.x = SheetLabelStruct->m_Size.y = size; @@ -356,6 +349,8 @@ error line %d, aborted\n" ), if( Char2[0] == 'R' ) SheetLabelStruct->m_Edge = 1; + + SheetStruct->AddLabel( SheetLabelStruct ); } } diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index 52b4b61374..57a95b4c81 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -374,16 +374,31 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event ) break; case ID_POPUP_IMPORT_GLABEL: - if ( screen->GetCurItem() - && screen->GetCurItem()->Type() == DRAW_SHEET_STRUCT_TYPE ) - GetScreen()->SetCurItem( - Import_PinSheet( (SCH_SHEET*)screen->GetCurItem(), &dc ) ); + if ( screen->GetCurItem() && screen->GetCurItem()->Type() == DRAW_SHEET_STRUCT_TYPE ) + GetScreen()->SetCurItem( Import_PinSheet( (SCH_SHEET*)screen->GetCurItem(), &dc ) ); break; case ID_POPUP_SCH_CLEANUP_SHEET: - if ( screen->GetCurItem() - && screen->GetCurItem()->Type() == DRAW_SHEET_STRUCT_TYPE ) - ( (SCH_SHEET*) screen->GetCurItem() )->CleanupSheet( this, true, true ); + if ( screen->GetCurItem() && screen->GetCurItem()->Type() == DRAW_SHEET_STRUCT_TYPE ) + { + SCH_SHEET* sheet = (SCH_SHEET*) screen->GetCurItem(); + + if( !sheet->HasUndefinedLabels() ) + { + DisplayInfoMessage( this, + _( "There are no undefined labels in this sheet to clean up." ) ); + return; + } + + if( !IsOK( this, _( "Do you wish to cleanup this sheet" ) ) ) + return; + + /* Save sheet in undo list before cleaning up unreferenced hierarchical labels. */ + SaveCopyInUndoList( sheet, UR_CHANGED ); + sheet->CleanupSheet(); + OnModify(); + DrawPanel->PostDirtyRect( sheet->GetBoundingBox() ); + } break; case ID_POPUP_SCH_EDIT_PINSHEET: diff --git a/eeschema/sheet.cpp b/eeschema/sheet.cpp index f76cdd8612..83891da7bc 100644 --- a/eeschema/sheet.cpp +++ b/eeschema/sheet.cpp @@ -144,7 +144,6 @@ structures and cannot be undone.\nOk to continue renaming?" ); static void MoveOrResizeSheet( WinEDA_DrawPanel* aPanel, wxDC* aDC, bool aErase ) { wxPoint moveVector; - SCH_SHEET_PIN* sheetLabel; BASE_SCREEN* screen = aPanel->GetScreen(); SCH_SHEET* sheet = (SCH_SHEET*) screen->GetCurItem(); @@ -153,16 +152,9 @@ static void MoveOrResizeSheet( WinEDA_DrawPanel* aPanel, wxDC* aDC, bool aErase if( sheet->m_Flags & IS_RESIZED ) { - sheet->m_Size.x = MAX( s_PreviousSheetWidth, screen->m_Curseur.x - sheet->m_Pos.x ); - sheet->m_Size.y = MAX( s_PreviousSheetHeight, screen->m_Curseur.y - sheet->m_Pos.y ); - sheetLabel = sheet->m_Label; - - while( sheetLabel ) - { - if( sheetLabel->m_Edge ) - sheetLabel->m_Pos.x = sheet->m_Pos.x + sheet->m_Size.x; - sheetLabel = sheetLabel->Next(); - } + wxSize newSize( MAX( s_PreviousSheetWidth, screen->m_Curseur.x - sheet->m_Pos.x ), + MAX( s_PreviousSheetHeight, screen->m_Curseur.y - sheet->m_Pos.y ) ); + sheet->Resize( newSize ); } else /* Move Sheet */ { @@ -244,8 +236,6 @@ SCH_SHEET* WinEDA_SchematicFrame::CreateSheet( wxDC* aDC ) void WinEDA_SchematicFrame::ReSizeSheet( SCH_SHEET* aSheet, wxDC* aDC ) { - SCH_SHEET_PIN* sheetLabel; - if( aSheet == NULL || aSheet->m_Flags & IS_NEW ) return; @@ -263,16 +253,13 @@ void WinEDA_SchematicFrame::ReSizeSheet( SCH_SHEET* aSheet, wxDC* aDC ) s_PreviousSheetWidth = SHEET_MIN_WIDTH; s_PreviousSheetHeight = SHEET_MIN_HEIGHT; - sheetLabel = aSheet->m_Label; - while( sheetLabel ) + BOOST_FOREACH( SCH_SHEET_PIN sheetLabel, aSheet->GetSheetPins() ) { s_PreviousSheetWidth = MAX( s_PreviousSheetWidth, - (int) ( ( sheetLabel->GetLength() + 1 ) * - sheetLabel->m_Size.x ) ); + ( sheetLabel.GetLength() + 1 ) * sheetLabel.m_Size.x ); s_PreviousSheetHeight = MAX( s_PreviousSheetHeight, - sheetLabel->m_Pos.y - aSheet->m_Pos.y ); - sheetLabel = sheetLabel->Next(); + sheetLabel.m_Pos.y - aSheet->m_Pos.y ); } DrawPanel->ManageCurseur = MoveOrResizeSheet; diff --git a/eeschema/sheetlab.cpp b/eeschema/sheetlab.cpp index 8ffddfbcde..e760ec777a 100644 --- a/eeschema/sheetlab.cpp +++ b/eeschema/sheetlab.cpp @@ -17,9 +17,9 @@ static void ExitPinSheet( WinEDA_DrawPanel* Panel, wxDC* DC ); static void Move_PinSheet( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); -static int s_CurrentTypeLabel = NET_INPUT; -static wxSize NetSheetTextSize( DEFAULT_SIZE_TEXT, DEFAULT_SIZE_TEXT ); -static wxPoint s_InitialPosition; // remember here the initial value of the pin label when moving it +static int s_CurrentTypeLabel = NET_INPUT; +static wxSize NetSheetTextSize( DEFAULT_SIZE_TEXT, DEFAULT_SIZE_TEXT ); +static wxPoint s_InitialPosition; // remember the initial value of the pin label when moving it /****************************************/ @@ -38,9 +38,8 @@ private: WinEDA_GraphicTextCtrl* m_TextWin; public: WinEDA_PinSheetPropertiesFrame( WinEDA_SchematicFrame* parent, - SCH_SHEET_PIN* curr_pinsheet, - const wxPoint& framepos = - wxPoint( -1, -1 ) ); + SCH_SHEET_PIN* curr_pinsheet, + const wxPoint& framepos = wxPoint( -1, -1 ) ); ~WinEDA_PinSheetPropertiesFrame() { }; private: @@ -51,8 +50,8 @@ private: }; BEGIN_EVENT_TABLE( WinEDA_PinSheetPropertiesFrame, wxDialog ) -EVT_BUTTON( wxID_OK, WinEDA_PinSheetPropertiesFrame::OnOkClick ) -EVT_BUTTON( wxID_CANCEL, WinEDA_PinSheetPropertiesFrame::OnCancelClick ) + EVT_BUTTON( wxID_OK, WinEDA_PinSheetPropertiesFrame::OnOkClick ) + EVT_BUTTON( wxID_CANCEL, WinEDA_PinSheetPropertiesFrame::OnCancelClick ) END_EVENT_TABLE() @@ -121,8 +120,7 @@ void WinEDA_PinSheetPropertiesFrame::OnCancelClick( wxCommandEvent& WXUNUSED( void WinEDA_PinSheetPropertiesFrame::OnOkClick( wxCommandEvent& event ) { m_CurrentPinSheet->m_Text = m_TextWin->GetText(); - m_CurrentPinSheet->m_Size.x = m_CurrentPinSheet->m_Size.y = - m_TextWin->GetTextSize(); + m_CurrentPinSheet->m_Size.x = m_CurrentPinSheet->m_Size.y = m_TextWin->GetTextSize(); m_CurrentPinSheet->m_Shape = m_PinSheetShape->GetSelection(); EndModal( wxID_OK ); @@ -133,8 +131,7 @@ void WinEDA_PinSheetPropertiesFrame::OnOkClick( wxCommandEvent& event ) */ static void ExitPinSheet( WinEDA_DrawPanel* Panel, wxDC* DC ) { - SCH_SHEET_PIN* SheetLabel = - (SCH_SHEET_PIN*) Panel->GetScreen()->GetCurItem(); + SCH_SHEET_PIN* SheetLabel = (SCH_SHEET_PIN*) Panel->GetScreen()->GetCurItem(); if( SheetLabel == NULL ) return; @@ -168,31 +165,17 @@ static void ExitPinSheet( WinEDA_DrawPanel* Panel, wxDC* DC ) void SCH_SHEET_PIN::Place( WinEDA_SchematicFrame* frame, wxDC* DC ) { SCH_SHEET* Sheet = (SCH_SHEET*) GetParent(); + wxASSERT( Sheet != NULL && Sheet->Type() == DRAW_SHEET_STRUCT_TYPE ); SAFE_DELETE( g_ItemToUndoCopy ); - + int flags = m_Flags; m_Flags = 0; if( flags & IS_NEW ) { frame->SaveCopyInUndoList( Sheet, UR_CHANGED ); - if( Sheet->m_Label == NULL ) - Sheet->m_Label = this; - else - { - SCH_SHEET_PIN* pinsheet = Sheet->m_Label; - while( pinsheet ) - { - if( pinsheet->Next() == NULL ) - { - pinsheet->SetNext( this ); - break; - } - pinsheet = pinsheet->Next(); - } - } + Sheet->AddLabel( this ); } - else // pin sheet was existing and only moved { wxPoint tmp = m_Pos; @@ -206,7 +189,8 @@ void SCH_SHEET_PIN::Place( WinEDA_SchematicFrame* frame, wxDC* DC ) m_Pos.x = Sheet->m_Pos.x; m_Edge = 0; - if( frame->GetScreen()->m_Curseur.x > ( Sheet->m_Pos.x + (Sheet->m_Size.x / 2) ) ) + + if( frame->GetScreen()->m_Curseur.x > ( Sheet->m_Pos.x + ( Sheet->m_Size.x / 2 ) ) ) { m_Edge = 1; m_Pos.x = Sheet->m_Pos.x + Sheet->m_Size.x; @@ -219,7 +203,6 @@ void SCH_SHEET_PIN::Place( WinEDA_SchematicFrame* frame, wxDC* DC ) m_Pos.y = Sheet->m_Pos.y + Sheet->m_Size.y; RedrawOneStruct( frame->DrawPanel, DC, Sheet, GR_DEFAULT_DRAWMODE ); - frame->DrawPanel->ManageCurseur = NULL; frame->DrawPanel->ForceCloseManageCurseur = NULL; } @@ -241,8 +224,7 @@ void WinEDA_SchematicFrame::StartMove_PinSheet( SCH_SHEET_PIN* SheetLabel, static void Move_PinSheet( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) { - SCH_SHEET_PIN* SheetLabel = - (SCH_SHEET_PIN*) panel->GetScreen()->GetCurItem(); + SCH_SHEET_PIN* SheetLabel = (SCH_SHEET_PIN*) panel->GetScreen()->GetCurItem(); if( SheetLabel == NULL ) return; @@ -273,8 +255,7 @@ static void Move_PinSheet( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) } -int WinEDA_SchematicFrame::Edit_PinSheet( SCH_SHEET_PIN* SheetLabel, - wxDC* DC ) +int WinEDA_SchematicFrame::Edit_PinSheet( SCH_SHEET_PIN* SheetLabel, wxDC* DC ) { if( SheetLabel == NULL ) return wxID_CANCEL; @@ -297,8 +278,7 @@ int WinEDA_SchematicFrame::Edit_PinSheet( SCH_SHEET_PIN* SheetLabel, /* Add a new sheet pin to the sheet at the current cursor position. */ -SCH_SHEET_PIN* WinEDA_SchematicFrame::Create_PinSheet( SCH_SHEET* Sheet, - wxDC* DC ) +SCH_SHEET_PIN* WinEDA_SchematicFrame::Create_PinSheet( SCH_SHEET* Sheet, wxDC* DC ) { wxString Line, Text; SCH_SHEET_PIN* NewSheetLabel; @@ -330,41 +310,35 @@ SCH_SHEET_PIN* WinEDA_SchematicFrame::Create_PinSheet( SCH_SHEET* Sheet, /* Automatically create a sheet labels from global labels for each node in * the corresponding hierarchy. */ -SCH_SHEET_PIN* WinEDA_SchematicFrame::Import_PinSheet( SCH_SHEET* Sheet, - wxDC* DC ) +SCH_SHEET_PIN* WinEDA_SchematicFrame::Import_PinSheet( SCH_SHEET* Sheet, wxDC* DC ) { EDA_BaseStruct* DrawStruct; - SCH_SHEET_PIN* NewSheetLabel, * SheetLabel = NULL; + SCH_SHEET_PIN* NewSheetLabel; SCH_HIERLABEL* HLabel = NULL; if( !Sheet->m_AssociatedScreen ) return NULL; + DrawStruct = Sheet->m_AssociatedScreen->EEDrawList; HLabel = NULL; + for( ; DrawStruct != NULL; DrawStruct = DrawStruct->Next() ) { if( DrawStruct->Type() != TYPE_SCH_HIERLABEL ) continue; + HLabel = (SCH_HIERLABEL*) DrawStruct; - /* A global label has been found: check is there a corresponding - * sheet label. */ - SheetLabel = Sheet->m_Label; - for( ; SheetLabel != NULL; SheetLabel = SheetLabel->Next() ) - { - if( SheetLabel->m_Text.CmpNoCase( HLabel->m_Text ) == 0 ) - { - break; - } - } - - if( SheetLabel == NULL ) + /* A global label has been found: check if there a corresponding sheet label. */ + if( !Sheet->HasLabel( HLabel->m_Text ) ) break; + + HLabel = NULL; } - if( (HLabel == NULL ) || SheetLabel ) + if( HLabel == NULL ) { - DisplayInfoMessage( this, _( "No new hierarchical labels found" ), 10 ); + DisplayInfoMessage( this, _( "No new hierarchical labels found" ) ); return NULL; } @@ -392,8 +366,7 @@ SCH_SHEET_PIN* WinEDA_SchematicFrame::Import_PinSheet( SCH_SHEET* Sheet, * This sheet label can not be put in a pile "undelete" because it would not * Possible to link it back it's 'SCH_SHEET' parent. */ -void WinEDA_SchematicFrame::DeleteSheetLabel( bool aRedraw, - SCH_SHEET_PIN* aSheetLabelToDel ) +void WinEDA_SchematicFrame::DeleteSheetLabel( bool aRedraw, SCH_SHEET_PIN* aSheetLabelToDel ) { SCH_SHEET* parent = (SCH_SHEET*) aSheetLabelToDel->GetParent(); @@ -406,23 +379,7 @@ void WinEDA_SchematicFrame::DeleteSheetLabel( bool aRedraw, std::cout << "\n\n\n" << std::flush; #endif - SCH_SHEET_PIN* prev = NULL; - SCH_SHEET_PIN* label = parent->m_Label; - - for( ; label; prev = label, label = label->Next() ) - { - if( label == aSheetLabelToDel ) - { - if( prev ) - prev->SetNext( label->Next() ); - else - parent->m_Label = label->Next(); - - delete aSheetLabelToDel; - - break; - } - } + parent->RemoveLabel( aSheetLabelToDel ); if( aRedraw ) DrawPanel->PostDirtyRect( parent->GetBoundingBox() ); diff --git a/eeschema/symbedit.cpp b/eeschema/symbedit.cpp index 770d1f49d7..9de5942cfa 100644 --- a/eeschema/symbedit.cpp +++ b/eeschema/symbedit.cpp @@ -175,14 +175,14 @@ void WinEDA_LibeditFrame::SaveOneSymbol() else line << wxT( "~ " ); - line << 0 << wxT( " " ) << m_component->m_TextInside << wxT( " " ); + line << 0 << wxT( " " ) << m_component->GetPinNameOffset() << wxT( " " ); - if( m_component->m_DrawPinNum ) + if( m_component->ShowPinNumbers() ) line << wxT( "Y " ); else line << wxT( "N " ); - if( m_component->m_DrawPinName ) + if( m_component->ShowPinNames() ) line << wxT( "Y " ); else line << wxT( "N " ); From af7c26e8bea3535f7b588b84da355d35c2135c64 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 25 Jun 2010 21:02:39 +0200 Subject: [PATCH 7/9] bitmap2component minor enhancements --- CHANGELOG.txt | 9 +++++++++ bitmap2component/bitmap2cmp_gui.cpp | 12 ++++++------ bitmap2component/bitmap2cmp_gui_base.cpp | 2 +- bitmap2component/bitmap2cmp_gui_base.fbp | 6 +++--- demos/pic_programmer/pic_programmer.pro | 2 +- 5 files changed, 20 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 5e625f6add..486e1abcab 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,15 @@ KiCad ChangeLog 2010 Please add newer entries at the top, list the date and your name with email address. +2010-jun-24 UPDATE Wayne Stambaugh +================================================================================ +++EESchema component library and hierarchical sheet label object improvements. + * Continue component library class clean up and encapsulation work. + * Change hierarchical sheet label container to boost::vector_ptr. + * Encapsulate hierarchical label handling in hierarchical sheet class. + * Convert some missed occurrences of wxString::GetData() to GetChars( wxString ). + * Fix some minor code formatting issues. + 2010-jun-23, UPDATE Jean-Pierre Charras ================================================================================ ++eeschema: diff --git a/bitmap2component/bitmap2cmp_gui.cpp b/bitmap2component/bitmap2cmp_gui.cpp index a376582919..3eab77a013 100644 --- a/bitmap2component/bitmap2cmp_gui.cpp +++ b/bitmap2component/bitmap2cmp_gui.cpp @@ -71,7 +71,7 @@ private: void OnLoadFile( wxCommandEvent& event ); void OnExportEeschema( wxCommandEvent& event ); void OnExportPcbnew( wxCommandEvent& event ); - void Binarize( int aThreshold ); + void Binarize( double aThreshold ); // aThreshold = 0.0 (black level) to 1.0 (white level) void OnOptionsSelection( wxCommandEvent& event ); void OnThresholdChange( wxScrollEvent& event ); void NegateGreyscaleImage( ); @@ -196,18 +196,18 @@ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event ) m_Greyscale_Bitmap = wxBitmap( m_Greyscale_Image ); m_NB_Image = m_Greyscale_Image; - Binarize( m_sliderThreshold->GetValue() ); + Binarize( (double)m_sliderThreshold->GetValue()/m_sliderThreshold->GetMax() ); Refresh(); } -void BM2CMP_FRAME::Binarize( int aThreshold ) +void BM2CMP_FRAME::Binarize( double aThreshold ) { unsigned int pixin; unsigned char pixout; int h = m_Greyscale_Image.GetHeight(); int w = m_Greyscale_Image.GetWidth(); - unsigned int threshold = (aThreshold * 256) / 10; + unsigned int threshold = (int)(aThreshold * 256); for( int y = 1; y < h; y++ ) for( int x = 1; x < w; x++ ) @@ -243,13 +243,13 @@ void BM2CMP_FRAME::OnOptionsSelection( wxCommandEvent& event ) { NegateGreyscaleImage( ); m_Greyscale_Bitmap = wxBitmap( m_Greyscale_Image ); - Binarize( m_sliderThreshold->GetValue() ); + Binarize( (double)m_sliderThreshold->GetValue()/m_sliderThreshold->GetMax() ); Refresh(); } void BM2CMP_FRAME::OnThresholdChange( wxScrollEvent& event ) { - Binarize( m_sliderThreshold->GetValue() ); + Binarize( (double)m_sliderThreshold->GetValue()/m_sliderThreshold->GetMax() ); Refresh(); } diff --git a/bitmap2component/bitmap2cmp_gui_base.cpp b/bitmap2component/bitmap2cmp_gui_base.cpp index 832e699a65..fa72459275 100644 --- a/bitmap2component/bitmap2cmp_gui_base.cpp +++ b/bitmap2component/bitmap2cmp_gui_base.cpp @@ -87,7 +87,7 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS m_ThresholdText->Wrap( -1 ); brightSizer->Add( m_ThresholdText, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - m_sliderThreshold = new wxSlider( this, wxID_ANY, 5, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS|wxSL_TOP ); + m_sliderThreshold = new wxSlider( this, wxID_ANY, 25, 0, 50, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_TOP ); brightSizer->Add( m_sliderThreshold, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bMainSizer->Add( brightSizer, 0, wxEXPAND, 5 ); diff --git a/bitmap2component/bitmap2cmp_gui_base.fbp b/bitmap2component/bitmap2cmp_gui_base.fbp index a7fb614d88..d008ba62fd 100644 --- a/bitmap2component/bitmap2cmp_gui_base.fbp +++ b/bitmap2component/bitmap2cmp_gui_base.fbp @@ -670,7 +670,7 @@ 0 wxID_ANY - 10 + 50 0 @@ -678,10 +678,10 @@ protected - wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS|wxSL_TOP + wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_TOP - 5 + 25 diff --git a/demos/pic_programmer/pic_programmer.pro b/demos/pic_programmer/pic_programmer.pro index 750daa8a11..52544d9d8f 100644 --- a/demos/pic_programmer/pic_programmer.pro +++ b/demos/pic_programmer/pic_programmer.pro @@ -1,4 +1,4 @@ -update=23/06/2010 18:43:01 +update=24/06/2010 21:06:23 last_client=pcbnew [general] version=1 From c580d5d72c2b5677a4f76b5891cf6bf87f72e793 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 28 Jun 2010 15:11:14 +0200 Subject: [PATCH 8/9] fixed a serious bug in zone filling, for pads with drill but not on all layers --- eeschema/class_netlist_object.cpp | 2 +- eeschema/erc.cpp | 34 +++++++++++-------- eeschema/netlist_control.cpp | 9 +++++ .../zones_convert_brd_items_to_polygons.cpp | 5 +-- 4 files changed, 32 insertions(+), 18 deletions(-) diff --git a/eeschema/class_netlist_object.cpp b/eeschema/class_netlist_object.cpp index ce3c2bbded..28cda6b3e3 100644 --- a/eeschema/class_netlist_object.cpp +++ b/eeschema/class_netlist_object.cpp @@ -81,7 +81,7 @@ void NETLIST_OBJECT::Show( std::ostream& out, int ndx ) out << " \n"; - if( m_Label ) + if( !m_Label.IsEmpty() ) out << " \n"; if( m_Comp ) diff --git a/eeschema/erc.cpp b/eeschema/erc.cpp index cffbd49cb0..9efb32e6d2 100644 --- a/eeschema/erc.cpp +++ b/eeschema/erc.cpp @@ -174,8 +174,11 @@ static int MinimalReq[PIN_NMAX][PIN_NMAX] = /** Function TestDuplicateSheetNames( ) * inside a given sheet, one cannot have sheets with duplicate names (file * names can be duplicated). + * @return the error count + * @param aCreateMarker: true = create error markers in schematic, + * false = calculate error count only */ -int TestDuplicateSheetNames() +int TestDuplicateSheetNames(bool aCreateMarker) { int err_count = 0; EDA_ScreenList ScreenList; // Created the list of screen @@ -203,17 +206,20 @@ int TestDuplicateSheetNames() ( ( SCH_SHEET* ) item_to_test )-> m_SheetName ) == 0 ) { - /* Create a new marker type ERC error*/ - SCH_MARKER* Marker = new SCH_MARKER(); - Marker->m_TimeStamp = GetTimeStamp(); - Marker->SetData( ERCE_DUPLICATE_SHEET_NAME, - ( (SCH_SHEET*) item_to_test )->m_Pos, - _( "Duplicate Sheet name" ), - ( (SCH_SHEET*) item_to_test )->m_Pos ); - Marker->SetMarkerType( MARK_ERC ); - Marker->SetErrorLevel( ERR ); - Marker->SetNext( Screen->EEDrawList ); - Screen->EEDrawList = Marker; + if( aCreateMarker ) + { + /* Create a new marker type ERC error*/ + SCH_MARKER* Marker = new SCH_MARKER(); + Marker->m_TimeStamp = GetTimeStamp(); + Marker->SetData( ERCE_DUPLICATE_SHEET_NAME, + ( (SCH_SHEET*) item_to_test )->m_Pos, + _( "Duplicate Sheet name" ), + ( (SCH_SHEET*) item_to_test )->m_Pos ); + Marker->SetMarkerType( MARK_ERC ); + Marker->SetErrorLevel( ERR ); + Marker->SetNext( Screen->EEDrawList ); + Screen->EEDrawList = Marker; + } err_count++; } } @@ -279,9 +285,8 @@ void DIALOG_ERC::TestErc( wxArrayString* aMessagesList ) * inside a given sheet, one cannot have sheets with duplicate names (file * names can be duplicated). */ - int errcnt = TestDuplicateSheetNames(); + int errcnt = TestDuplicateSheetNames( true ); g_EESchemaVar.NbErrorErc += errcnt; - g_EESchemaVar.NbWarningErc += errcnt; m_Parent->BuildNetListBase(); @@ -290,7 +295,6 @@ void DIALOG_ERC::TestErc( wxArrayString* aMessagesList ) for( unsigned ii = 0; ii < g_NetObjectslist.size(); ii++ ) g_NetObjectslist[ii]->m_FlagOfConnection = UNCONNECTED; - StartNet = OldItem = 0; NetNbItems = 0; MinConn = NOC; diff --git a/eeschema/netlist_control.cpp b/eeschema/netlist_control.cpp index 7c47e53bb9..67eb8e1f35 100644 --- a/eeschema/netlist_control.cpp +++ b/eeschema/netlist_control.cpp @@ -24,6 +24,8 @@ #include "protos.h" #include "netlist_control.h" +//Imported function: +int TestDuplicateSheetNames(bool aCreateMarker); // ID for configuration: #define CUSTOM_NETLIST_TITLE wxT( "CustomNetlistTitle" ) @@ -492,6 +494,13 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event ) return; } + // Test duplicate sheet names: + if( TestDuplicateSheetNames(false ) > 0 ) + { + if( !IsOK( this, _( "Error: duplicate sheet names. Continue?" ) ) ) + return; + } + /* Cleanup the entire hierarchy */ EDA_ScreenList ScreenList; for( SCH_SCREEN* screen = ScreenList.GetFirst(); diff --git a/pcbnew/zones_convert_brd_items_to_polygons.cpp b/pcbnew/zones_convert_brd_items_to_polygons.cpp index e966854346..3c71300d21 100644 --- a/pcbnew/zones_convert_brd_items_to_polygons.cpp +++ b/pcbnew/zones_convert_brd_items_to_polygons.cpp @@ -216,11 +216,12 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) have_poly_to_substract = false; D_PAD dummyPad((MODULE*)NULL); - + D_PAD * nextpad; for( MODULE* module = aPcb->m_Modules; module; module = module->Next() ) { - for( D_PAD* pad = module->m_Pads; pad != NULL; pad = pad->Next() ) + for( D_PAD* pad = module->m_Pads; pad != NULL; pad = nextpad ) { + nextpad = pad->Next(); // pad pointer can be modified by next code, so calculate the next pad here if( !pad->IsOnLayer( GetLayer() ) ) { /* Test fo pads that are on top or bottom only and have a hole. * There are curious pads but they can be used for some components that are inside the From 1872a80836ee9d29b564a54d9decd5fd70980377 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 30 Jun 2010 13:15:34 +0200 Subject: [PATCH 9/9] Cleaning code: moved some help strings used both in toolbars and menus in a single file help_common_strings.h, in order to avoid slightly different help strings for the same command, and avoid some not needed translations. --- demos/interf_u/image.emp | 453 ++++++++++++++++++++ demos/interf_u/image.lib | 19 + demos/interf_u/interf_u.brd | 748 ++++++++++++++++++++++++++------- demos/interf_u/interf_u.pro | 31 +- demos/interf_u/interf_u.sch | 194 ++------- demos/interf_u/tux.bmp | Bin 0 -> 185814 bytes eeschema/annotate.cpp | 1 + eeschema/help_common_strings.h | 61 +++ eeschema/menubar.cpp | 55 ++- eeschema/menubar_libedit.cpp | 30 +- eeschema/tool_lib.cpp | 24 +- eeschema/tool_sch.cpp | 52 +-- pcbnew/help_common_strings.h | 24 ++ pcbnew/menubar_pcbframe.cpp | 22 +- pcbnew/tool_pcb.cpp | 21 +- 15 files changed, 1310 insertions(+), 425 deletions(-) create mode 100644 demos/interf_u/image.emp create mode 100644 demos/interf_u/image.lib create mode 100644 demos/interf_u/tux.bmp create mode 100644 eeschema/help_common_strings.h create mode 100644 pcbnew/help_common_strings.h diff --git a/demos/interf_u/image.emp b/demos/interf_u/image.emp new file mode 100644 index 0000000000..76c436679e --- /dev/null +++ b/demos/interf_u/image.emp @@ -0,0 +1,453 @@ +PCBNEW-LibModule-V1 +$INDEX +LOGO +$EndINDEX +# +# LOGO +# pixmap w = 229, h = 270 +# +$MODULE LOGO +Po 0 0 0 15 00000000 00000000 ~~ +T0 0 4800 600 600 0 120 N I 21 "G***" +T1 0 -4800 600 600 0 120 N I 21 "LOGO" +DP 0 0 0 0 5 1 21 +Dl -3783 4516 +Dl -3766 -4466 +Dl 3850 -4483 +Dl -3800 -4500 +Dl -3783 4516 +DP 0 0 0 0 390 1 21 +Dl 1632 4131 +Dl 1638 4131 +Dl 1780 4126 +Dl 1890 4102 +Dl 2002 4043 +Dl 2149 3930 +Dl 2363 3747 +Dl 2609 3558 +Dl 2925 3367 +Dl 2953 3353 +Dl 3208 3199 +Dl 3374 3049 +Dl 3430 2920 +Dl 3427 2889 +Dl 3408 2899 +Dl 3352 2984 +Dl 3273 3033 +Dl 3265 3034 +Dl 3196 3087 +Dl 3127 3137 +Dl 2968 3224 +Dl 2766 3322 +Dl 2565 3409 +Dl 2409 3464 +Dl 2322 3492 +Dl 2250 3532 +Dl 2193 3578 +Dl 2046 3649 +Dl 1874 3708 +Dl 1736 3733 +Dl 1669 3729 +Dl 1582 3691 +Dl 1484 3578 +Dl 1479 3570 +Dl 1408 3458 +Dl 1371 3333 +Dl 1360 3154 +Dl 1369 2883 +Dl 1374 2686 +Dl 1361 2510 +Dl 1318 2351 +Dl 1286 2218 +Dl 1266 2017 +Dl 1257 1890 +Dl 1233 1816 +Dl 1230 1815 +Dl 1208 1871 +Dl 1199 2043 +Dl 1199 2110 +Dl 1190 2365 +Dl 1158 2536 +Dl 1091 2664 +Dl 977 2790 +Dl 920 2843 +Dl 516 3128 +Dl 70 3289 +Dl -404 3323 +Dl -637 3292 +Dl -853 3202 +Dl -1017 3037 +Dl -1126 2886 +Dl -999 2829 +Dl -983 2821 +Dl -843 2712 +Dl -822 2563 +Dl -822 2562 +Dl -856 2472 +Dl -936 2370 +Dl -1082 2234 +Dl -1316 2041 +Dl -1493 1900 +Dl -1665 1757 +Dl -1767 1658 +Dl -1816 1577 +Dl -1831 1491 +Dl -1832 1376 +Dl -1818 1157 +Dl -1783 920 +Dl -1783 919 +Dl -1720 715 +Dl -1617 463 +Dl -1494 206 +Dl -1372 -10 +Dl -1272 -144 +Dl -1237 -179 +Dl -1193 -249 +Dl -1222 -335 +Dl -1248 -399 +Dl -1243 -481 +Dl -1185 -620 +Dl -1093 -804 +Dl -979 -1005 +Dl -973 -1016 +Dl -889 -1183 +Dl -877 -1295 +Dl -885 -1396 +Dl -865 -1410 +Dl -865 -2009 +Dl -930 -2105 +Dl -953 -2213 +Dl -966 -2390 +Dl -966 -2426 +Dl -943 -2572 +Dl -861 -2701 +Dl -786 -2787 +Dl -733 -2833 +Dl -692 -2808 +Dl -592 -2724 +Dl -547 -2679 +Dl -450 -2495 +Dl -476 -2314 +Dl -523 -2224 +Dl -543 -2349 +Dl -559 -2417 +Dl -638 -2554 +Dl -744 -2596 +Dl -848 -2525 +Dl -897 -2373 +Dl -832 -2172 +Dl -798 -2106 +Dl -784 -2031 +Dl -794 -2018 +Dl -865 -2009 +Dl -865 -1410 +Dl -838 -1429 +Dl -731 -1345 +Dl -637 -1263 +Dl -471 -1159 +Dl -412 -1136 +Dl -412 -1333 +Dl -483 -1366 +Dl -484 -1369 +Dl -453 -1399 +Dl -412 -1380 +Dl -412 -1473 +Dl -617 -1494 +Dl -737 -1573 +Dl -743 -1597 +Dl -719 -1723 +Dl -644 -1899 +Dl -626 -1935 +Dl -600 -2011 +Dl -580 -2047 +Dl -496 -2136 +Dl -472 -2157 +Dl -369 -2218 +Dl -221 -2228 +Dl -123 -2221 +Dl -125 -2209 +Dl -133 -2208 +Dl -197 -2165 +Dl -133 -2116 +Dl -123 -2113 +Dl -33 -2118 +Dl -18 -2168 +Dl -24 -2193 +Dl 49 -2183 +Dl 233 -2099 +Dl 245 -2094 +Dl 391 -2027 +Dl 478 -1999 +Dl 495 -1996 +Dl 495 -2037 +Dl 423 -2065 +Dl 467 -2158 +Dl 520 -2276 +Dl 512 -2442 +Dl 434 -2577 +Dl 303 -2633 +Dl 230 -2607 +Dl 138 -2490 +Dl 98 -2320 +Dl 97 -2183 +Dl 31 -2262 +Dl -55 -2423 +Dl -45 -2589 +Dl 74 -2708 +Dl 142 -2741 +Dl 313 -2816 +Dl 412 -2842 +Dl 473 -2829 +Dl 484 -2822 +Dl 533 -2739 +Dl 536 -2719 +Dl 596 -2627 +Dl 644 -2561 +Dl 685 -2383 +Dl 659 -2182 +Dl 614 -2083 +Dl 532 -2040 +Dl 495 -2037 +Dl 495 -1996 +Dl 506 -1993 +Dl 604 -1935 +Dl 656 -1882 +Dl 640 -1827 +Dl 614 -1805 +Dl 569 -1828 +Dl 561 -1839 +Dl 511 -1850 +Dl 413 -1805 +Dl 236 -1690 +Dl 89 -1608 +Dl -108 -1528 +Dl -159 -1513 +Dl -412 -1473 +Dl -412 -1380 +Dl -383 -1366 +Dl -381 -1363 +Dl -412 -1333 +Dl -412 -1136 +Dl -399 -1131 +Dl -220 -1110 +Dl -22 -1170 +Dl 232 -1318 +Dl 324 -1377 +Dl 514 -1477 +Dl 628 -1491 +Dl 684 -1425 +Dl 697 -1388 +Dl 760 -1249 +Dl 850 -1065 +Dl 884 -995 +Dl 985 -757 +Dl 1053 -548 +Dl 1117 -358 +Dl 1203 -199 +Dl 1383 97 +Dl 1511 450 +Dl 1536 567 +Dl 1577 892 +Dl 1589 1224 +Dl 1567 1496 +Dl 1556 1560 +Dl 1545 1685 +Dl 1569 1735 +Dl 1579 1744 +Dl 1583 1813 +Dl 1535 1967 +Dl 1534 1970 +Dl 1486 2117 +Dl 1481 2211 +Dl 1516 2321 +Dl 1522 2335 +Dl 1658 2502 +Dl 1859 2582 +Dl 2077 2554 +Dl 2078 2554 +Dl 2201 2473 +Dl 2339 2346 +Dl 2453 2214 +Dl 2499 2120 +Dl 2526 2030 +Dl 2595 1887 +Dl 2618 1845 +Dl 2736 1510 +Dl 2760 1129 +Dl 2690 686 +Dl 2526 166 +Dl 2419 -91 +Dl 2285 -326 +Dl 2107 -549 +Dl 2084 -575 +Dl 1788 -972 +Dl 1513 -1466 +Dl 1410 -1707 +Dl 1349 -1962 +Dl 1333 -2269 +Dl 1331 -2416 +Dl 1285 -2920 +Dl 1171 -3320 +Dl 982 -3631 +Dl 710 -3865 +Dl 349 -4036 +Dl 179 -4082 +Dl -197 -4100 +Dl -546 -4006 +Dl -639 -3959 +Dl -881 -3774 +Dl -1056 -3508 +Dl -1150 -3316 +Dl -1150 -1281 +Dl -1262 -1095 +Dl -1314 -1016 +Dl -1453 -826 +Dl -1612 -629 +Dl -1622 -616 +Dl -1775 -422 +Dl -1887 -238 +Dl -1983 -19 +Dl -2086 281 +Dl -2109 349 +Dl -2204 591 +Dl -2300 793 +Dl -2310 812 +Dl -2400 976 +Dl -2460 1087 +Dl -2484 1146 +Dl -2519 1309 +Dl -2527 1476 +Dl -2503 1579 +Dl -2486 1643 +Dl -2536 1765 +Dl -2631 1904 +Dl -2761 1977 +Dl -2975 2009 +Dl -2990 2010 +Dl -3154 2034 +Dl -3249 2066 +Dl -3294 2122 +Dl -3338 2308 +Dl -3323 2604 +Dl -3321 2625 +Dl -3304 2811 +Dl -3316 2944 +Dl -3361 3099 +Dl -3407 3256 +Dl -3427 3451 +Dl -3365 3565 +Dl -3216 3619 +Dl -3085 3647 +Dl -2900 3701 +Dl -2717 3757 +Dl -2500 3813 +Dl -2192 3895 +Dl -1716 4063 +Dl -1618 4091 +Dl -1618 3724 +Dl -1877 3667 +Dl -2040 3621 +Dl -2194 3587 +Dl -2223 3583 +Dl -2405 3553 +Dl -2631 3514 +Dl -2857 3472 +Dl -3038 3437 +Dl -3132 3416 +Dl -3176 3385 +Dl -3212 3269 +Dl -3178 3139 +Dl -3169 3121 +Dl -3143 2964 +Dl -3148 2711 +Dl -3185 2390 +Dl -3188 2367 +Dl -3179 2222 +Dl -3088 2153 +Dl -2893 2138 +Dl -2693 2117 +Dl -2509 2005 +Dl -2421 1802 +Dl -2395 1718 +Dl -2299 1601 +Dl -2175 1580 +Dl -2092 1629 +Dl -1936 1793 +Dl -1734 2069 +Dl -1482 2464 +Dl -1128 3045 +Dl -1150 3247 +Dl -1168 3355 +Dl -1249 3572 +Dl -1367 3700 +Dl -1418 3719 +Dl -1618 3724 +Dl -1618 4091 +Dl -1549 4111 +Dl -1325 4130 +Dl -1156 4095 +Dl -1096 4057 +Dl -973 3961 +Dl -901 3905 +Dl -829 3866 +Dl -823 3866 +Dl -748 3819 +Dl -729 3806 +Dl -585 3769 +Dl -337 3745 +Dl -7 3736 +Dl 382 3744 +Dl 652 3757 +Dl 868 3774 +Dl 998 3797 +Dl 1067 3833 +Dl 1100 3885 +Dl 1142 3947 +Dl 1256 4047 +Dl 1334 4094 +Dl 1450 4125 +Dl 1632 4131 +DP 0 0 0 0 5 1 21 +Dl 3387 2800 +Dl 3383 2766 +Dl 3346 2733 +Dl 3350 2766 +Dl 3387 2800 +DP 0 0 0 0 5 1 21 +Dl 3283 2733 +Dl 3300 2716 +Dl 3283 2700 +Dl 3266 2716 +Dl 3283 2733 +DP 0 0 0 0 5 1 21 +Dl 3216 2700 +Dl 3233 2683 +Dl 3216 2666 +Dl 3200 2683 +Dl 3216 2700 +DP 0 0 0 0 9 1 21 +Dl 3129 2633 +Dl 3119 2613 +Dl 3050 2533 +Dl 2990 2474 +Dl 2937 2433 +Dl 2946 2453 +Dl 3016 2533 +Dl 3076 2591 +Dl 3129 2633 +DP 0 0 0 0 5 1 21 +Dl 2920 2400 +Dl 2916 2366 +Dl 2879 2333 +Dl 2883 2366 +Dl 2920 2400 +DP 0 0 0 0 7 1 21 +Dl 2812 2179 +Dl 2823 2175 +Dl 2825 2161 +Dl 2823 2025 +Dl 2814 2012 +Dl 2809 2100 +Dl 2812 2179 +$EndMODULE LOGO +$EndLIBRARY diff --git a/demos/interf_u/image.lib b/demos/interf_u/image.lib new file mode 100644 index 0000000000..b9ae5e423a --- /dev/null +++ b/demos/interf_u/image.lib @@ -0,0 +1,19 @@ +EESchema-LIBRARY Version 2.3 +# +# LOGO +# pixmap size w = 229, h = 270 +# +DEF LOGO G 0 40 Y Y 1 F N +F0 "#G" 0 -420 60 H I C CNN +F1 "LOGO" 0 420 60 H I C CNN +DRAW +P 5 0 0 1 -378 -451 -376 446 385 448 -380 450 -378 -451 F +P 390 0 0 1 163 -413 163 -413 178 -412 189 -410 200 -404 214 -393 236 -374 260 -355 292 -336 295 -335 320 -319 337 -304 343 -292 342 -288 340 -289 335 -298 327 -303 326 -303 319 -308 312 -313 296 -322 276 -332 256 -340 240 -346 232 -349 225 -353 219 -357 204 -364 187 -370 173 -373 166 -372 158 -369 148 -357 147 -357 140 -345 137 -333 136 -315 136 -288 137 -268 136 -251 131 -235 128 -221 126 -201 125 -189 123 -181 123 -181 120 -187 120 -204 119 -211 119 -236 115 -253 109 -266 97 -279 92 -284 51 -312 7 -328 -40 -332 -63 -329 -85 -320 -101 -303 -112 -288 -99 -282 -98 -282 -84 -271 -82 -256 -82 -256 -85 -247 -93 -237 -108 -223 -131 -204 -149 -190 -166 -175 -176 -165 -181 -157 -183 -149 -183 -137 -181 -115 -178 -92 -178 -91 -172 -71 -161 -46 -149 -20 -137 1 -127 14 -123 17 -119 24 -122 33 -124 39 -124 48 -118 62 -109 80 -97 100 -97 101 -88 118 -87 129 -88 139 -86 141 -86 200 -93 210 -95 221 -96 239 -96 242 -94 257 -86 270 -78 278 -73 283 -69 280 -59 272 -54 267 -45 249 -47 231 -52 222 -54 234 -55 241 -63 255 -74 259 -84 252 -89 237 -83 217 -79 210 -78 203 -79 201 -86 200 -86 141 -83 142 -73 134 -63 126 -47 115 -41 113 -41 133 -48 136 -48 136 -45 139 -41 138 -41 147 -61 149 -73 157 -74 159 -71 172 -64 189 -62 193 -60 201 -58 204 -49 213 -47 215 -36 221 -22 222 -12 222 -12 220 -13 220 -19 216 -13 211 -12 211 -3 211 -1 216 -2 219 4 218 23 209 24 209 39 202 47 199 49 199 49 203 42 206 46 215 52 227 51 244 43 257 30 263 23 260 13 249 9 232 9 218 3 226 -5 242 -4 258 7 270 14 274 31 281 41 284 47 282 48 282 53 273 53 271 59 262 64 256 68 238 65 218 61 208 53 204 49 203 49 199 50 199 60 193 65 188 64 182 61 180 56 182 56 183 51 185 41 180 23 169 8 160 -10 152 -15 151 -41 147 -41 138 -38 136 -38 136 -41 133 -41 113 -39 113 -22 111 -2 117 23 131 32 137 51 147 62 149 68 142 69 138 76 124 85 106 88 99 98 75 105 54 111 35 120 19 138 -9 151 -45 153 -56 157 -89 158 -122 156 -149 155 -156 154 -168 156 -173 157 -174 158 -181 153 -196 153 -197 148 -211 148 -221 151 -232 152 -233 165 -250 185 -258 207 -255 207 -255 220 -247 233 -234 245 -221 249 -212 252 -203 259 -188 261 -184 273 -151 276 -112 269 -68 252 -16 241 9 228 32 210 54 208 57 178 97 151 146 141 170 134 196 133 226 133 241 128 292 117 332 98 363 71 386 34 403 17 408 -19 410 -54 400 -63 395 -88 377 -105 350 -114 331 -114 128 -126 109 -131 101 -145 82 -161 62 -162 61 -177 42 -188 23 -198 1 -208 -28 -210 -34 -220 -59 -229 -79 -231 -81 -240 -97 -246 -108 -248 -114 -251 -130 -252 -147 -250 -157 -248 -164 -253 -176 -263 -190 -276 -197 -297 -200 -299 -201 -315 -203 -324 -206 -329 -212 -333 -230 -332 -260 -332 -262 -330 -281 -331 -294 -336 -309 -340 -325 -342 -345 -336 -356 -321 -361 -308 -364 -289 -370 -271 -375 -249 -381 -219 -389 -171 -406 -161 -409 -161 -372 -187 -366 -204 -362 -219 -358 -222 -358 -240 -355 -263 -351 -285 -347 -303 -343 -313 -341 -317 -338 -321 -326 -317 -313 -316 -312 -314 -296 -314 -271 -318 -239 -318 -236 -317 -222 -308 -215 -289 -213 -269 -211 -250 -200 -242 -180 -239 -171 -229 -160 -217 -158 -209 -162 -193 -179 -173 -206 -148 -246 -112 -304 -115 -324 -116 -335 -124 -357 -136 -370 -141 -371 -161 -372 -161 -409 -154 -411 -132 -413 -115 -409 -109 -405 -97 -396 -90 -390 -82 -386 -82 -386 -74 -381 -72 -380 -58 -376 -33 -374 0 -373 38 -374 65 -375 86 -377 99 -379 106 -383 110 -388 114 -394 125 -404 133 -409 145 -412 163 -413 F +P 5 0 0 1 338 -280 338 -276 334 -273 335 -276 338 -280 F +P 5 0 0 1 328 -273 330 -271 328 -270 326 -271 328 -273 F +P 5 0 0 1 321 -270 323 -268 321 -266 320 -268 321 -270 F +P 9 0 0 1 312 -263 311 -261 305 -253 299 -247 293 -243 294 -245 301 -253 307 -259 312 -263 F +P 5 0 0 1 292 -240 291 -236 287 -233 288 -236 292 -240 F +P 7 0 0 1 281 -217 282 -217 282 -216 282 -202 281 -201 280 -210 281 -217 F +ENDDRAW +ENDDEF diff --git a/demos/interf_u/interf_u.brd b/demos/interf_u/interf_u.brd index e916a06f98..f24111452f 100644 --- a/demos/interf_u/interf_u.brd +++ b/demos/interf_u/interf_u.brd @@ -1,6 +1,6 @@ -PCBNEW-BOARD Version 1 date 02/05/2010 21:27:40 +PCBNEW-BOARD Version 1 date 30/06/2010 12:54:50 -# Created by Pcbnew(2010-04-21 BZR 2353)-unstable +# Created by Pcbnew(2010-06-21 BZR 2404)-unstable $GENERAL LayerCount 2 @@ -8,19 +8,19 @@ Ly 1FFF8001 EnabledLayers 1FFF8001 Links 200 NoConn 0 -Di 29439 12974 77910 55660 +Di 29439 12974 77910 78010 Ndraw 24 Ntrack 782 Nzone 0 BoardThickness 630 -Nmodule 24 +Nmodule 25 Nnets 111 $EndGENERAL $SHEETDESCR Sheet A4 11700 8267 Title "Demo" -Date "2 may 2010" +Date "30 jun 2010" Rev "2.C" Comp "Kicad" Comment1 "" @@ -626,6 +626,454 @@ AddNet "N-000126" AddNet "N-000127" AddNet "VCC" $EndNCLASS +$MODULE G*** +Po 66000 72750 0 15 00000000 4C2B2261 ~~ +Li G*** +Sc 4C2B2261 +AR +Op 0 0 0 +T0 0 4800 600 600 0 120 N I 21 N"G***" +T1 0 -4800 600 600 0 120 N I 21 N"LOGO" +DP 0 0 0 0 5 1 21 +Dl -3783 4516 +Dl -3766 -4466 +Dl 3850 -4483 +Dl -3800 -4500 +Dl -3783 4516 +DP 0 0 0 0 390 1 21 +Dl 1632 4131 +Dl 1638 4131 +Dl 1780 4126 +Dl 1890 4102 +Dl 2002 4043 +Dl 2149 3930 +Dl 2363 3747 +Dl 2609 3558 +Dl 2925 3367 +Dl 2953 3353 +Dl 3208 3199 +Dl 3374 3049 +Dl 3430 2920 +Dl 3427 2889 +Dl 3408 2899 +Dl 3352 2984 +Dl 3273 3033 +Dl 3265 3034 +Dl 3196 3087 +Dl 3127 3137 +Dl 2968 3224 +Dl 2766 3322 +Dl 2565 3409 +Dl 2409 3464 +Dl 2322 3492 +Dl 2250 3532 +Dl 2193 3578 +Dl 2046 3649 +Dl 1874 3708 +Dl 1736 3733 +Dl 1669 3729 +Dl 1582 3691 +Dl 1484 3578 +Dl 1479 3570 +Dl 1408 3458 +Dl 1371 3333 +Dl 1360 3154 +Dl 1369 2883 +Dl 1374 2686 +Dl 1361 2510 +Dl 1318 2351 +Dl 1286 2218 +Dl 1266 2017 +Dl 1257 1890 +Dl 1233 1816 +Dl 1230 1815 +Dl 1208 1871 +Dl 1199 2043 +Dl 1199 2110 +Dl 1190 2365 +Dl 1158 2536 +Dl 1091 2664 +Dl 977 2790 +Dl 920 2843 +Dl 516 3128 +Dl 70 3289 +Dl -404 3323 +Dl -637 3292 +Dl -853 3202 +Dl -1017 3037 +Dl -1126 2886 +Dl -999 2829 +Dl -983 2821 +Dl -843 2712 +Dl -822 2563 +Dl -822 2562 +Dl -856 2472 +Dl -936 2370 +Dl -1082 2234 +Dl -1316 2041 +Dl -1493 1900 +Dl -1665 1757 +Dl -1767 1658 +Dl -1816 1577 +Dl -1831 1491 +Dl -1832 1376 +Dl -1818 1157 +Dl -1783 920 +Dl -1783 919 +Dl -1720 715 +Dl -1617 463 +Dl -1494 206 +Dl -1372 -10 +Dl -1272 -144 +Dl -1237 -179 +Dl -1193 -249 +Dl -1222 -335 +Dl -1248 -399 +Dl -1243 -481 +Dl -1185 -620 +Dl -1093 -804 +Dl -979 -1005 +Dl -973 -1016 +Dl -889 -1183 +Dl -877 -1295 +Dl -885 -1396 +Dl -865 -1410 +Dl -865 -2009 +Dl -930 -2105 +Dl -953 -2213 +Dl -966 -2390 +Dl -966 -2426 +Dl -943 -2572 +Dl -861 -2701 +Dl -786 -2787 +Dl -733 -2833 +Dl -692 -2808 +Dl -592 -2724 +Dl -547 -2679 +Dl -450 -2495 +Dl -476 -2314 +Dl -523 -2224 +Dl -543 -2349 +Dl -559 -2417 +Dl -638 -2554 +Dl -744 -2596 +Dl -848 -2525 +Dl -897 -2373 +Dl -832 -2172 +Dl -798 -2106 +Dl -784 -2031 +Dl -794 -2018 +Dl -865 -2009 +Dl -865 -1410 +Dl -838 -1429 +Dl -731 -1345 +Dl -637 -1263 +Dl -471 -1159 +Dl -412 -1136 +Dl -412 -1333 +Dl -483 -1366 +Dl -484 -1369 +Dl -453 -1399 +Dl -412 -1380 +Dl -412 -1473 +Dl -617 -1494 +Dl -737 -1573 +Dl -743 -1597 +Dl -719 -1723 +Dl -644 -1899 +Dl -626 -1935 +Dl -600 -2011 +Dl -580 -2047 +Dl -496 -2136 +Dl -472 -2157 +Dl -369 -2218 +Dl -221 -2228 +Dl -123 -2221 +Dl -125 -2209 +Dl -133 -2208 +Dl -197 -2165 +Dl -133 -2116 +Dl -123 -2113 +Dl -33 -2118 +Dl -18 -2168 +Dl -24 -2193 +Dl 49 -2183 +Dl 233 -2099 +Dl 245 -2094 +Dl 391 -2027 +Dl 478 -1999 +Dl 495 -1996 +Dl 495 -2037 +Dl 423 -2065 +Dl 467 -2158 +Dl 520 -2276 +Dl 512 -2442 +Dl 434 -2577 +Dl 303 -2633 +Dl 230 -2607 +Dl 138 -2490 +Dl 98 -2320 +Dl 97 -2183 +Dl 31 -2262 +Dl -55 -2423 +Dl -45 -2589 +Dl 74 -2708 +Dl 142 -2741 +Dl 313 -2816 +Dl 412 -2842 +Dl 473 -2829 +Dl 484 -2822 +Dl 533 -2739 +Dl 536 -2719 +Dl 596 -2627 +Dl 644 -2561 +Dl 685 -2383 +Dl 659 -2182 +Dl 614 -2083 +Dl 532 -2040 +Dl 495 -2037 +Dl 495 -1996 +Dl 506 -1993 +Dl 604 -1935 +Dl 656 -1882 +Dl 640 -1827 +Dl 614 -1805 +Dl 569 -1828 +Dl 561 -1839 +Dl 511 -1850 +Dl 413 -1805 +Dl 236 -1690 +Dl 89 -1608 +Dl -108 -1528 +Dl -159 -1513 +Dl -412 -1473 +Dl -412 -1380 +Dl -383 -1366 +Dl -381 -1363 +Dl -412 -1333 +Dl -412 -1136 +Dl -399 -1131 +Dl -220 -1110 +Dl -22 -1170 +Dl 232 -1318 +Dl 324 -1377 +Dl 514 -1477 +Dl 628 -1491 +Dl 684 -1425 +Dl 697 -1388 +Dl 760 -1249 +Dl 850 -1065 +Dl 884 -995 +Dl 985 -757 +Dl 1053 -548 +Dl 1117 -358 +Dl 1203 -199 +Dl 1383 97 +Dl 1511 450 +Dl 1536 567 +Dl 1577 892 +Dl 1589 1224 +Dl 1567 1496 +Dl 1556 1560 +Dl 1545 1685 +Dl 1569 1735 +Dl 1579 1744 +Dl 1583 1813 +Dl 1535 1967 +Dl 1534 1970 +Dl 1486 2117 +Dl 1481 2211 +Dl 1516 2321 +Dl 1522 2335 +Dl 1658 2502 +Dl 1859 2582 +Dl 2077 2554 +Dl 2078 2554 +Dl 2201 2473 +Dl 2339 2346 +Dl 2453 2214 +Dl 2499 2120 +Dl 2526 2030 +Dl 2595 1887 +Dl 2618 1845 +Dl 2736 1510 +Dl 2760 1129 +Dl 2690 686 +Dl 2526 166 +Dl 2419 -91 +Dl 2285 -326 +Dl 2107 -549 +Dl 2084 -575 +Dl 1788 -972 +Dl 1513 -1466 +Dl 1410 -1707 +Dl 1349 -1962 +Dl 1333 -2269 +Dl 1331 -2416 +Dl 1285 -2920 +Dl 1171 -3320 +Dl 982 -3631 +Dl 710 -3865 +Dl 349 -4036 +Dl 179 -4082 +Dl -197 -4100 +Dl -546 -4006 +Dl -639 -3959 +Dl -881 -3774 +Dl -1056 -3508 +Dl -1150 -3316 +Dl -1150 -1281 +Dl -1262 -1095 +Dl -1314 -1016 +Dl -1453 -826 +Dl -1612 -629 +Dl -1622 -616 +Dl -1775 -422 +Dl -1887 -238 +Dl -1983 -19 +Dl -2086 281 +Dl -2109 349 +Dl -2204 591 +Dl -2300 793 +Dl -2310 812 +Dl -2400 976 +Dl -2460 1087 +Dl -2484 1146 +Dl -2519 1309 +Dl -2527 1476 +Dl -2503 1579 +Dl -2486 1643 +Dl -2536 1765 +Dl -2631 1904 +Dl -2761 1977 +Dl -2975 2009 +Dl -2990 2010 +Dl -3154 2034 +Dl -3249 2066 +Dl -3294 2122 +Dl -3338 2308 +Dl -3323 2604 +Dl -3321 2625 +Dl -3304 2811 +Dl -3316 2944 +Dl -3361 3099 +Dl -3407 3256 +Dl -3427 3451 +Dl -3365 3565 +Dl -3216 3619 +Dl -3085 3647 +Dl -2900 3701 +Dl -2717 3757 +Dl -2500 3813 +Dl -2192 3895 +Dl -1716 4063 +Dl -1618 4091 +Dl -1618 3724 +Dl -1877 3667 +Dl -2040 3621 +Dl -2194 3587 +Dl -2223 3583 +Dl -2405 3553 +Dl -2631 3514 +Dl -2857 3472 +Dl -3038 3437 +Dl -3132 3416 +Dl -3176 3385 +Dl -3212 3269 +Dl -3178 3139 +Dl -3169 3121 +Dl -3143 2964 +Dl -3148 2711 +Dl -3185 2390 +Dl -3188 2367 +Dl -3179 2222 +Dl -3088 2153 +Dl -2893 2138 +Dl -2693 2117 +Dl -2509 2005 +Dl -2421 1802 +Dl -2395 1718 +Dl -2299 1601 +Dl -2175 1580 +Dl -2092 1629 +Dl -1936 1793 +Dl -1734 2069 +Dl -1482 2464 +Dl -1128 3045 +Dl -1150 3247 +Dl -1168 3355 +Dl -1249 3572 +Dl -1367 3700 +Dl -1418 3719 +Dl -1618 3724 +Dl -1618 4091 +Dl -1549 4111 +Dl -1325 4130 +Dl -1156 4095 +Dl -1096 4057 +Dl -973 3961 +Dl -901 3905 +Dl -829 3866 +Dl -823 3866 +Dl -748 3819 +Dl -729 3806 +Dl -585 3769 +Dl -337 3745 +Dl -7 3736 +Dl 382 3744 +Dl 652 3757 +Dl 868 3774 +Dl 998 3797 +Dl 1067 3833 +Dl 1100 3885 +Dl 1142 3947 +Dl 1256 4047 +Dl 1334 4094 +Dl 1450 4125 +Dl 1632 4131 +DP 0 0 0 0 5 1 21 +Dl 3387 2800 +Dl 3383 2766 +Dl 3346 2733 +Dl 3350 2766 +Dl 3387 2800 +DP 0 0 0 0 5 1 21 +Dl 3283 2733 +Dl 3300 2716 +Dl 3283 2700 +Dl 3266 2716 +Dl 3283 2733 +DP 0 0 0 0 5 1 21 +Dl 3216 2700 +Dl 3233 2683 +Dl 3216 2666 +Dl 3200 2683 +Dl 3216 2700 +DP 0 0 0 0 9 1 21 +Dl 3129 2633 +Dl 3119 2613 +Dl 3050 2533 +Dl 2990 2474 +Dl 2937 2433 +Dl 2946 2453 +Dl 3016 2533 +Dl 3076 2591 +Dl 3129 2633 +DP 0 0 0 0 5 1 21 +Dl 2920 2400 +Dl 2916 2366 +Dl 2879 2333 +Dl 2883 2366 +Dl 2920 2400 +DP 0 0 0 0 7 1 21 +Dl 2812 2179 +Dl 2823 2175 +Dl 2825 2161 +Dl 2823 2025 +Dl 2814 2012 +Dl 2809 2100 +Dl 2812 2179 +$EndMODULE G*** $MODULE PGA120 Po 60500 32000 1800 15 429C886F 322D32FA ~~ Li PGA120 @@ -3985,18 +4433,18 @@ Po 0 29500 13000 32500 16000 50 De 28 0 0 0 0 $EndDRAWSEGMENT $TRACK -Po 0 48500 35500 49000 35000 170 -1 -De 0 0 1 0 800 Po 0 49000 35000 54500 35000 170 -1 De 0 0 1 0 400 +Po 0 48500 35500 49000 35000 170 -1 +De 0 0 1 0 800 +Po 0 70000 37800 69250 37050 170 -1 +De 0 0 2 0 800 Po 0 66500 35000 67250 35000 170 -1 De 0 0 2 0 800 Po 0 69250 37000 69250 37050 170 -1 De 0 0 2 0 0 Po 0 69250 37000 67250 35000 170 -1 De 0 0 2 0 0 -Po 0 70000 37800 69250 37050 170 -1 -De 0 0 2 0 800 Po 0 68500 27500 69550 28550 170 -1 De 0 0 3 0 0 Po 0 71000 28550 71000 28620 170 -1 @@ -4007,20 +4455,20 @@ Po 0 66000 27500 68500 27500 170 -1 De 0 0 3 0 0 Po 0 65500 28000 66000 27500 170 -1 De 0 0 3 0 800 +Po 0 66000 28500 69000 28500 170 -1 +De 0 0 4 0 0 +Po 0 69500 29000 70000 29000 170 -1 +De 0 0 4 0 0 Po 0 69000 28500 69500 29000 170 -1 De 0 0 4 0 0 Po 0 70000 29000 70000 29100 170 -1 De 0 0 4 0 400 Po 0 65500 29000 66000 28500 170 -1 De 0 0 4 0 800 -Po 0 66000 28500 69000 28500 170 -1 -De 0 0 4 0 0 -Po 0 69500 29000 70000 29000 170 -1 -De 0 0 4 0 0 -Po 0 70000 30000 70000 30150 170 -1 -De 0 0 5 0 400 Po 0 66500 30000 70000 30000 170 -1 De 0 0 5 0 800 +Po 0 70000 30000 70000 30150 170 -1 +De 0 0 5 0 400 Po 0 65500 31000 66000 31500 170 -1 De 0 0 6 0 800 Po 0 67800 31300 70000 31300 170 -1 @@ -4045,26 +4493,20 @@ Po 0 70000 33400 70000 33450 170 -1 De 0 0 8 0 400 Po 0 68950 33000 69350 33400 170 -1 De 0 0 8 0 0 +Po 0 66000 33500 68500 33500 170 -1 +De 0 0 9 0 0 Po 0 69500 34500 70000 34500 170 -1 De 0 0 9 0 400 Po 0 68500 33500 69500 34500 170 -1 De 0 0 9 0 0 Po 0 65500 33000 66000 33500 170 -1 De 0 0 9 0 800 -Po 0 66000 33500 68500 33500 170 -1 -De 0 0 9 0 0 Po 0 66500 34000 68500 34000 170 -1 De 0 0 10 0 800 Po 0 68500 34000 70000 35500 170 -1 De 0 0 10 0 0 Po 0 70000 35500 70000 35600 170 -1 De 0 0 10 0 400 -Po 0 64500 33000 65000 32500 170 -1 -De 0 0 11 0 800 -Po 0 69000 32500 69500 33000 170 -1 -De 15 0 11 0 0 -Po 0 68500 32500 69000 32500 170 -1 -De 15 0 11 0 0 Po 0 69500 33000 69500 36000 170 -1 De 15 0 11 0 0 Po 0 69500 36000 70000 36500 170 -1 @@ -4075,6 +4517,12 @@ Po 0 70000 36500 70000 36700 170 -1 De 15 0 11 0 400 Po 0 65000 32500 68500 32500 170 -1 De 0 0 11 0 0 +Po 0 64500 33000 65000 32500 170 -1 +De 0 0 11 0 800 +Po 0 69000 32500 69500 33000 170 -1 +De 15 0 11 0 0 +Po 0 68500 32500 69000 32500 170 -1 +De 15 0 11 0 0 Po 0 66750 35500 70000 38750 170 -1 De 0 0 12 0 0 Po 0 70000 38750 70000 38850 170 -1 @@ -4087,12 +4535,6 @@ Po 0 66250 35500 66750 35500 170 -1 De 0 0 12 0 0 Po 0 65500 34000 66000 34500 170 -1 De 0 0 12 0 800 -Po 0 57000 37500 57000 40000 170 -1 -De 15 0 13 0 0 -Po 0 55125 40500 55000 40625 170 -1 -De 15 0 13 0 0 -Po 0 56500 40500 55125 40500 170 -1 -De 15 0 13 0 0 Po 0 57000 40000 56500 40500 170 -1 De 15 0 13 0 0 Po 0 57500 37000 57000 37500 170 -1 @@ -4101,6 +4543,12 @@ Po 0 57500 36000 57500 37000 170 -1 De 15 0 13 0 C00 Po 0 55000 40625 55000 41000 170 -1 De 15 0 13 0 400 +Po 0 57000 37500 57000 40000 170 -1 +De 15 0 13 0 0 +Po 0 55125 40500 55000 40625 170 -1 +De 15 0 13 0 0 +Po 0 56500 40500 55125 40500 170 -1 +De 15 0 13 0 0 Po 3 63500 22500 63500 22500 450 -1 De 15 1 14 0 0 Po 0 42500 23000 42500 23500 170 -1 @@ -4149,36 +4597,36 @@ Po 0 62500 38000 62500 44500 170 -1 De 15 0 17 0 800 Po 0 62500 44500 62000 45000 170 -1 De 15 0 17 0 0 -Po 0 63000 37500 63000 45500 170 -1 -De 15 0 18 0 400 Po 0 62500 37000 63000 37500 170 -1 De 15 0 18 0 800 -Po 0 63500 37000 64000 37500 170 -1 -De 15 0 19 0 800 +Po 0 63000 37500 63000 45500 170 -1 +De 15 0 18 0 400 Po 0 64000 37500 64000 45500 170 -1 De 15 0 19 0 400 +Po 0 63500 37000 64000 37500 170 -1 +De 15 0 19 0 800 Po 0 64500 38000 64500 43750 170 -1 De 15 0 20 0 800 Po 0 65000 44250 65000 45500 170 -1 De 15 0 20 0 400 Po 0 64500 43750 65000 44250 170 -1 De 15 0 20 0 0 +Po 0 65000 43500 66000 44500 170 -1 +De 15 0 21 0 0 Po 0 66000 44500 66000 45500 170 -1 De 15 0 21 0 400 Po 0 65000 37500 65000 43500 170 -1 De 15 0 21 0 0 Po 0 64500 37000 65000 37500 170 -1 De 15 0 21 0 800 -Po 0 65000 43500 66000 44500 170 -1 -De 15 0 21 0 0 +Po 0 66000 36500 66000 43750 170 -1 +De 15 0 22 0 0 Po 0 66000 43750 67000 44750 170 -1 De 15 0 22 0 0 Po 0 67000 44750 67000 45500 170 -1 De 15 0 22 0 400 Po 0 65500 36000 66000 36500 170 -1 De 15 0 22 0 800 -Po 0 66000 36500 66000 43750 170 -1 -De 15 0 22 0 0 Po 0 57500 48000 58000 48500 170 -1 De 15 0 23 0 400 Po 0 53500 47000 57000 47000 170 -1 @@ -4227,14 +4675,14 @@ Po 0 49000 42000 59000 42000 170 -1 De 0 0 25 0 0 Po 3 49000 42000 49000 42000 450 -1 De 15 1 25 0 0 +Po 0 68900 29000 69550 29650 170 -1 +De 0 0 26 0 0 Po 0 66500 29000 68900 29000 170 -1 De 0 0 26 0 800 Po 0 69550 29650 71000 29650 170 -1 De 0 0 26 0 0 Po 0 71000 29620 71000 29650 170 -1 De 0 0 26 0 800 -Po 0 68900 29000 69550 29650 170 -1 -De 0 0 26 0 0 Po 0 66000 30500 69400 30500 170 -1 De 0 0 27 0 0 Po 0 69600 30700 71000 30700 170 -1 @@ -4245,12 +4693,6 @@ Po 0 65500 30000 66000 30500 170 -1 De 0 0 27 0 800 Po 0 71000 30700 71000 30720 170 -1 De 0 0 27 0 400 -Po 0 55000 35500 55000 31500 170 -1 -De 15 0 28 0 0 -Po 0 57000 25500 56500 25000 170 -1 -De 15 0 28 0 0 -Po 0 56500 37000 56000 36500 170 -1 -De 15 0 28 0 800 Po 0 56500 25000 56500 16000 170 -1 De 15 0 28 0 400 Po 0 56000 35500 55000 35500 170 -1 @@ -4261,16 +4703,16 @@ Po 0 55000 31500 57000 31500 170 -1 De 15 0 28 0 0 Po 0 56000 36500 56000 35500 170 -1 De 15 0 28 0 0 +Po 0 55000 35500 55000 31500 170 -1 +De 15 0 28 0 0 +Po 0 57000 25500 56500 25000 170 -1 +De 15 0 28 0 0 +Po 0 56500 37000 56000 36500 170 -1 +De 15 0 28 0 800 Po 0 66500 31000 67500 30000 170 -1 De 15 0 29 0 800 Po 0 67500 30000 67500 16000 170 -1 De 15 0 29 0 400 -Po 0 64500 22000 43000 22000 170 -1 -De 0 0 30 0 0 -Po 3 43000 22000 43000 22000 450 -1 -De 15 1 30 0 0 -Po 3 64500 22000 64500 22000 450 -1 -De 15 1 30 0 0 Po 0 43500 29500 43500 29000 170 -1 De 15 0 30 0 800 Po 0 43000 22000 43000 28500 170 -1 @@ -4279,6 +4721,12 @@ Po 0 43500 29000 43000 28500 170 -1 De 15 0 30 0 0 Po 0 64500 26000 64500 22000 170 -1 De 15 0 30 0 800 +Po 0 64500 22000 43000 22000 170 -1 +De 0 0 30 0 0 +Po 3 43000 22000 43000 22000 450 -1 +De 15 1 30 0 0 +Po 3 64500 22000 64500 22000 450 -1 +De 15 1 30 0 0 Po 0 42000 28500 42000 26500 170 -1 De 15 0 31 0 0 Po 3 42000 26500 42000 26500 450 -1 @@ -4291,12 +4739,6 @@ Po 0 42500 29000 42000 28500 170 -1 De 15 0 31 0 0 Po 0 55500 27000 55000 26500 170 -1 De 0 0 31 0 800 -Po 0 41500 25000 41500 23500 170 -1 -De 15 0 32 0 400 -Po 0 63000 27500 64000 27500 170 -1 -De 15 0 32 0 0 -Po 3 64000 25000 64000 25000 450 -1 -De 15 1 32 0 0 Po 0 62500 28000 63000 27500 170 -1 De 15 0 32 0 800 Po 0 64000 27500 64000 25000 170 -1 @@ -4305,6 +4747,12 @@ Po 3 41500 25000 41500 25000 450 -1 De 15 1 32 0 0 Po 0 64000 25000 41500 25000 170 -1 De 0 0 32 0 0 +Po 0 41500 25000 41500 23500 170 -1 +De 15 0 32 0 400 +Po 0 63000 27500 64000 27500 170 -1 +De 15 0 32 0 0 +Po 3 64000 25000 64000 25000 450 -1 +De 15 1 32 0 0 Po 3 53000 27000 53000 27000 600 -1 De 15 1 33 0 0 Po 3 39500 26500 39500 26500 450 -1 @@ -4323,14 +4771,14 @@ Po 0 55500 29000 55000 28500 170 -1 De 15 0 33 0 800 Po 0 40000 27000 39500 26500 170 -1 De 0 0 33 0 0 +Po 0 35500 30500 35500 29500 170 -1 +De 0 0 34 0 400 Po 0 56000 31500 36500 31500 170 -1 De 0 0 34 0 0 Po 0 36500 31500 35500 30500 170 -1 De 0 0 34 0 0 Po 0 56500 31000 56000 31500 170 -1 De 0 0 34 0 800 -Po 0 35500 30500 35500 29500 170 -1 -De 0 0 34 0 400 Po 0 36500 27000 36500 26500 170 -1 De 0 0 35 0 0 Po 0 37500 28000 36500 27000 170 -1 @@ -4341,10 +4789,10 @@ Po 0 54500 28000 37500 28000 170 -1 De 0 0 35 0 800 Po 0 36500 26500 36500 23500 170 -1 De 15 0 35 0 400 -Po 0 54500 29000 35000 29000 170 -1 -De 0 0 36 0 800 Po 0 35000 29000 34500 29500 170 -1 De 0 0 36 0 400 +Po 0 54500 29000 35000 29000 170 -1 +De 0 0 36 0 800 Po 3 52500 25500 52500 25500 600 300 De 15 1 37 0 0 Po 0 33750 25500 33500 25250 170 -1 @@ -4359,12 +4807,6 @@ Po 0 52500 25500 33750 25500 170 -1 De 0 0 37 0 0 Po 0 33500 23500 33500 25250 170 -1 De 0 0 37 0 800 -Po 0 62000 18500 62000 27500 170 -1 -De 15 0 38 0 0 -Po 3 33000 18500 33000 18500 450 -1 -De 15 1 38 0 0 -Po 0 33500 29000 33500 29500 170 -1 -De 15 0 38 0 400 Po 0 33000 18500 33000 28500 170 -1 De 15 0 38 0 0 Po 0 62000 18500 33000 18500 170 -1 @@ -4375,6 +4817,12 @@ Po 0 33000 28500 33500 29000 170 -1 De 15 0 38 0 0 Po 3 62000 18500 62000 18500 450 -1 De 15 1 38 0 0 +Po 0 62000 18500 62000 27500 170 -1 +De 15 0 38 0 0 +Po 3 33000 18500 33000 18500 450 -1 +De 15 1 38 0 0 +Po 0 33500 29000 33500 29500 170 -1 +De 15 0 38 0 400 Po 0 42000 30000 41500 29500 170 -1 De 0 0 39 0 400 Po 0 56500 29000 56000 29500 170 -1 @@ -4385,16 +4833,16 @@ Po 0 51000 29500 50500 30000 170 -1 De 0 0 39 0 0 Po 0 56000 29500 51000 29500 170 -1 De 0 0 39 0 0 +Po 0 55000 28500 40000 28500 170 -1 +De 0 0 40 0 0 +Po 0 40500 29000 40000 28500 170 -1 +De 15 0 40 0 0 Po 3 40000 28500 40000 28500 450 -1 De 15 1 40 0 0 Po 0 40500 29500 40500 29000 170 -1 De 15 0 40 0 800 Po 0 55500 28000 55000 28500 170 -1 De 0 0 40 0 800 -Po 0 55000 28500 40000 28500 170 -1 -De 0 0 40 0 0 -Po 0 40500 29000 40000 28500 170 -1 -De 15 0 40 0 0 Po 0 40500 30500 39500 29500 170 -1 De 0 0 41 0 400 Po 0 54500 30000 51500 30000 170 -1 @@ -4403,12 +4851,6 @@ Po 0 51500 30000 51000 30500 170 -1 De 0 0 41 0 0 Po 0 51000 30500 40500 30500 170 -1 De 0 0 41 0 0 -Po 0 67000 27500 66500 28000 170 -1 -De 15 0 42 0 400 -Po 0 67000 24500 67000 27500 170 -1 -De 15 0 42 0 0 -Po 3 38000 24500 38000 24500 450 -1 -De 15 1 42 0 0 Po 3 67000 24500 67000 24500 450 -1 De 15 1 42 0 0 Po 0 38500 29500 38500 29000 170 -1 @@ -4419,6 +4861,12 @@ Po 0 38500 29000 38000 28500 170 -1 De 15 0 42 0 0 Po 0 38000 28500 38000 24500 170 -1 De 15 0 42 0 0 +Po 0 67000 27500 66500 28000 170 -1 +De 15 0 42 0 400 +Po 0 67000 24500 67000 27500 170 -1 +De 15 0 42 0 0 +Po 3 38000 24500 38000 24500 450 -1 +De 15 1 42 0 0 Po 0 55000 30500 52000 30500 170 -1 De 0 0 43 0 0 Po 0 52000 30500 51500 31000 170 -1 @@ -4431,12 +4879,6 @@ Po 0 37500 30000 37500 29500 170 -1 De 0 0 43 0 400 Po 0 55500 31000 55000 30500 170 -1 De 0 0 43 0 800 -Po 0 56500 27000 56000 26500 170 -1 -De 15 0 44 0 800 -Po 0 36000 20500 36000 28500 170 -1 -De 15 0 44 0 0 -Po 0 56000 20500 36000 20500 170 -1 -De 0 0 44 0 0 Po 0 56000 26500 56000 20500 170 -1 De 15 0 44 0 0 Po 3 56000 20500 56000 20500 450 -1 @@ -4447,6 +4889,12 @@ Po 0 36500 29500 36500 29000 170 -1 De 15 0 44 0 800 Po 0 36500 29000 36000 28500 170 -1 De 15 0 44 0 0 +Po 0 56500 27000 56000 26500 170 -1 +De 15 0 44 0 800 +Po 0 36000 20500 36000 28500 170 -1 +De 15 0 44 0 0 +Po 0 56000 20500 36000 20500 170 -1 +De 0 0 44 0 0 Po 0 54500 32000 38000 32000 170 -1 De 0 0 45 0 800 Po 0 37500 28500 37500 23500 170 -1 @@ -4457,22 +4905,22 @@ Po 3 38000 32000 38000 32000 450 -1 De 15 1 45 0 0 Po 0 38000 32000 38000 29000 170 -1 De 15 0 45 0 0 +Po 0 57500 26000 57500 24000 170 -1 +De 15 0 46 0 800 Po 0 39000 24000 38500 23500 170 -1 De 0 0 46 0 400 Po 0 57500 24000 39000 24000 170 -1 De 0 0 46 0 0 Po 3 57500 24000 57500 24000 450 -1 De 15 1 46 0 0 -Po 0 57500 26000 57500 24000 170 -1 -De 15 0 46 0 800 +Po 0 37500 45000 47750 45000 170 -1 +De 0 0 47 0 0 Po 0 48000 44750 48000 44000 170 -1 De 0 0 47 0 400 Po 0 47750 45000 48000 44750 170 -1 De 0 0 47 0 0 Po 0 37000 45500 37500 45000 170 -1 De 0 0 47 0 800 -Po 0 37500 45000 47750 45000 170 -1 -De 0 0 47 0 0 Po 0 44500 29000 44000 28500 170 -1 De 15 0 48 0 0 Po 3 44000 27500 44000 27500 450 -1 @@ -4485,12 +4933,6 @@ Po 0 59500 28000 59000 27500 170 -1 De 0 0 48 0 800 Po 0 44500 29500 44500 29000 170 -1 De 15 0 48 0 800 -Po 0 53500 25500 53000 26000 170 -1 -De 0 0 49 0 0 -Po 0 45000 26000 45000 28500 170 -1 -De 15 0 49 0 0 -Po 0 58500 26000 58000 25500 170 -1 -De 0 0 49 0 800 Po 0 45500 29000 45000 28500 170 -1 De 15 0 49 0 0 Po 3 45000 26000 45000 26000 450 -1 @@ -4501,6 +4943,12 @@ Po 0 58000 25500 53500 25500 170 -1 De 0 0 49 0 0 Po 0 53000 26000 45000 26000 170 -1 De 0 0 49 0 0 +Po 0 53500 25500 53000 26000 170 -1 +De 0 0 49 0 0 +Po 0 45000 26000 45000 28500 170 -1 +De 15 0 49 0 0 +Po 0 58500 26000 58000 25500 170 -1 +De 0 0 49 0 800 Po 3 58000 21000 58000 21000 450 -1 De 15 1 50 0 0 Po 0 59000 26500 59000 22000 170 -1 @@ -4535,16 +4983,16 @@ Po 0 60500 26000 60500 17500 170 -1 De 15 0 52 0 800 Po 0 60500 17500 46500 17500 170 -1 De 0 0 52 0 0 +Po 0 45500 19000 61500 19000 170 -1 +De 0 0 53 0 0 +Po 0 61500 26000 61500 19000 170 -1 +De 15 0 53 0 800 Po 0 45500 23500 45500 19000 170 -1 De 15 0 53 0 800 Po 3 61500 19000 61500 19000 450 -1 De 15 1 53 0 0 Po 3 45500 19000 45500 19000 450 -1 De 15 1 53 0 0 -Po 0 45500 19000 61500 19000 170 -1 -De 0 0 53 0 0 -Po 0 61500 26000 61500 19000 170 -1 -De 15 0 53 0 800 Po 0 44500 21500 62500 21500 170 -1 De 0 0 54 0 0 Po 3 62500 21500 62500 21500 450 -1 @@ -4555,16 +5003,16 @@ Po 3 44500 21500 44500 21500 450 -1 De 15 1 54 0 0 Po 0 44500 23500 44500 21500 170 -1 De 15 0 54 0 800 +Po 3 61000 23000 61000 23000 450 -1 +De 15 1 55 0 0 +Po 0 61000 26500 61000 23000 170 -1 +De 15 0 55 0 0 Po 0 61500 27000 61000 26500 170 -1 De 15 0 55 0 800 Po 0 44000 23000 43500 23500 170 -1 De 0 0 55 0 400 Po 0 61000 23000 44000 23000 170 -1 De 0 0 55 0 0 -Po 3 61000 23000 61000 23000 450 -1 -De 15 1 55 0 0 -Po 0 61000 26500 61000 23000 170 -1 -De 15 0 55 0 0 Po 0 63000 18000 40500 18000 170 -1 De 0 0 56 0 0 Po 3 63000 18000 63000 18000 450 -1 @@ -4937,16 +5385,16 @@ Po 0 65000 49500 63000 51500 170 -1 De 15 0 76 0 0 Po 0 63000 51500 63000 54000 170 -1 De 15 0 76 0 400 +Po 0 64000 54000 64000 52500 170 -1 +De 15 0 77 0 800 +Po 0 65500 52000 66000 51500 170 -1 +De 15 0 77 0 0 Po 0 64500 52000 65500 52000 170 -1 De 15 0 77 0 0 Po 0 66000 51500 66000 48500 170 -1 De 15 0 77 0 400 Po 0 64000 52500 64500 52000 170 -1 De 15 0 77 0 0 -Po 0 64000 54000 64000 52500 170 -1 -De 15 0 77 0 800 -Po 0 65500 52000 66000 51500 170 -1 -De 15 0 77 0 0 Po 0 52000 52000 53000 51000 170 -1 De 15 0 78 0 0 Po 0 52000 54000 52000 52000 170 -1 @@ -4955,18 +5403,18 @@ Po 3 52000 52000 52000 52000 450 -1 De 15 1 78 0 0 Po 0 53000 51000 53000 48500 170 -1 De 15 0 78 0 400 -Po 0 53000 54000 53000 52000 170 -1 -De 0 0 79 0 800 -Po 0 53000 52000 53500 51500 170 -1 -De 15 0 79 0 0 -Po 0 53500 51500 53500 48000 170 -1 -De 15 0 79 0 0 Po 0 53500 48000 52500 48000 170 -1 De 15 0 79 0 0 Po 3 53000 52000 53000 52000 450 -1 De 15 1 79 0 0 Po 0 52500 48000 52000 48500 170 -1 De 15 0 79 0 400 +Po 0 53000 54000 53000 52000 170 -1 +De 0 0 79 0 800 +Po 0 53000 52000 53500 51500 170 -1 +De 15 0 79 0 0 +Po 0 53500 51500 53500 48000 170 -1 +De 15 0 79 0 0 Po 0 57000 41000 57500 40500 170 -1 De 0 0 80 0 800 Po 3 62000 41000 62000 41000 450 -1 @@ -4993,18 +5441,18 @@ Po 0 57500 40500 58500 40500 170 -1 De 0 0 80 0 0 Po 0 58500 40500 59000 41000 170 -1 De 0 0 80 0 0 -Po 0 64000 54000 64000 50000 170 -1 -De 0 0 81 0 800 -Po 0 63500 49500 55500 49500 170 -1 -De 0 0 81 0 0 -Po 0 64000 50000 63500 49500 170 -1 -De 0 0 81 0 0 Po 0 55500 49500 55000 49000 170 -1 De 0 0 81 0 0 Po 0 55000 49000 55000 48500 170 -1 De 0 0 81 0 400 Po 0 55000 48500 54000 48500 170 -1 De 0 0 81 0 C00 +Po 0 64000 54000 64000 50000 170 -1 +De 0 0 81 0 800 +Po 0 63500 49500 55500 49500 170 -1 +De 0 0 81 0 0 +Po 0 64000 50000 63500 49500 170 -1 +De 0 0 81 0 0 Po 0 53125 44500 53000 44375 170 -1 De 0 0 82 0 0 Po 0 53000 44375 53000 44000 170 -1 @@ -5045,52 +5493,52 @@ Po 0 57500 40000 58750 40000 170 -1 De 0 0 84 0 0 Po 0 66000 40125 66000 37125 170 -1 De 0 0 84 0 0 -Po 0 44000 45500 44000 44000 170 -1 -De 15 0 85 0 C00 Po 0 44000 44000 44000 42000 170 -1 De 15 0 85 0 C00 +Po 0 44000 45500 44000 44000 170 -1 +De 15 0 85 0 C00 +Po 0 43000 44000 43500 44500 170 -1 +De 15 0 86 0 800 +Po 0 43000 44000 43000 42000 170 -1 +De 15 0 86 0 C00 Po 0 44000 47000 44000 48500 170 -1 De 15 0 86 0 400 Po 0 43500 44500 43500 46500 170 -1 De 15 0 86 0 0 Po 0 43500 46500 44000 47000 170 -1 De 15 0 86 0 0 -Po 0 43000 44000 43500 44500 170 -1 -De 15 0 86 0 800 -Po 0 43000 44000 43000 42000 170 -1 -De 15 0 86 0 C00 Po 0 38000 42000 38000 44000 170 -1 De 15 0 87 0 C00 Po 0 38000 44000 38000 45500 170 -1 De 15 0 87 0 C00 +Po 0 37500 46500 38000 47000 170 -1 +De 15 0 88 0 0 +Po 0 37000 44000 37000 42000 170 -1 +De 15 0 88 0 C00 Po 0 37000 44000 37500 44500 170 -1 De 15 0 88 0 800 Po 0 38000 47000 38000 48500 170 -1 De 15 0 88 0 400 Po 0 37500 44500 37500 46500 170 -1 De 15 0 88 0 0 -Po 0 37500 46500 38000 47000 170 -1 -De 15 0 88 0 0 -Po 0 37000 44000 37000 42000 170 -1 -De 15 0 88 0 C00 -Po 0 40000 44000 40000 42000 170 -1 -De 15 0 89 0 C00 Po 0 40000 45500 40000 44000 170 -1 De 15 0 89 0 C00 +Po 0 40000 44000 40000 42000 170 -1 +De 15 0 89 0 C00 Po 0 42000 45500 42000 44000 170 -1 De 15 0 90 0 C00 Po 0 42000 44000 42000 42000 170 -1 De 15 0 90 0 C00 +Po 0 40000 47000 40000 48500 170 -1 +De 15 0 91 0 400 +Po 0 39000 44000 39000 42000 170 -1 +De 15 0 91 0 C00 Po 0 39000 44000 39500 44500 170 -1 De 15 0 91 0 800 Po 0 39500 46500 40000 47000 170 -1 De 15 0 91 0 0 Po 0 39500 44500 39500 46500 170 -1 De 15 0 91 0 0 -Po 0 40000 47000 40000 48500 170 -1 -De 15 0 91 0 400 -Po 0 39000 44000 39000 42000 170 -1 -De 15 0 91 0 C00 Po 0 41000 44000 41000 42000 170 -1 De 15 0 92 0 C00 Po 0 42000 47000 42000 48500 170 -1 @@ -5101,14 +5549,14 @@ Po 0 41000 44000 41500 44500 170 -1 De 15 0 92 0 800 Po 0 41500 46500 42000 47000 170 -1 De 15 0 92 0 0 +Po 0 55500 45000 55000 45500 170 -1 +De 15 0 93 0 400 Po 0 56500 45000 55500 45000 170 -1 De 15 0 93 0 0 Po 0 57000 44500 56500 45000 170 -1 De 15 0 93 0 0 Po 0 57000 44000 57000 44500 170 -1 De 15 0 93 0 800 -Po 0 55500 45000 55000 45500 170 -1 -De 15 0 93 0 400 Po 0 55500 36375 55500 36000 170 -1 De 15 0 94 0 400 Po 0 55375 36500 55500 36375 170 -1 @@ -5149,12 +5597,6 @@ Po 0 65500 26000 66000 26500 170 -1 De 0 0 97 0 800 Po 0 66000 26500 68500 26500 170 -1 De 0 0 97 0 0 -Po 0 61500 17000 35500 17000 170 -1 -De 0 0 98 0 0 -Po 3 66500 17500 66500 17500 450 -1 -De 15 1 98 0 0 -Po 0 35500 23500 35500 17000 170 -1 -De 15 0 98 0 800 Po 3 35500 17000 35500 17000 450 -1 De 15 1 98 0 0 Po 0 62000 17500 61500 17000 170 -1 @@ -5163,6 +5605,12 @@ Po 0 66500 26000 66500 17500 170 -1 De 15 0 98 0 800 Po 0 66500 17500 62000 17500 170 -1 De 0 0 98 0 0 +Po 0 61500 17000 35500 17000 170 -1 +De 0 0 98 0 0 +Po 3 66500 17500 66500 17500 450 -1 +De 15 1 98 0 0 +Po 0 35500 23500 35500 17000 170 -1 +De 15 0 98 0 800 Po 0 56000 41375 56125 41500 170 -1 De 0 0 99 0 0 Po 0 58000 41375 58000 41000 170 -1 @@ -5379,18 +5827,18 @@ Po 0 61500 14500 63500 14500 170 -1 De 15 0 100 0 400 Po 0 59500 17000 59500 20000 170 -1 De 15 0 100 0 400 -Po 0 46000 38500 46500 38000 170 -1 -De 0 0 101 0 800 -Po 0 44500 38500 43500 38500 170 -1 -De 0 0 101 0 800 -Po 0 46000 38500 44500 38500 170 -1 -De 0 0 101 0 C00 Po 0 48000 38000 48500 38500 170 -1 De 0 0 101 0 400 Po 0 43500 38500 43000 38000 170 -1 De 0 0 101 0 400 Po 0 46500 38000 48000 38000 170 -1 De 0 0 101 0 0 +Po 0 46000 38500 46500 38000 170 -1 +De 0 0 101 0 800 +Po 0 44500 38500 43500 38500 170 -1 +De 0 0 101 0 800 +Po 0 46000 38500 44500 38500 170 -1 +De 0 0 101 0 C00 Po 0 44500 35500 43500 35500 170 -1 De 0 0 102 0 800 Po 0 51000 36000 54500 36000 170 -1 @@ -5405,10 +5853,10 @@ Po 0 46000 35500 44500 35500 170 -1 De 0 0 102 0 C00 Po 0 46750 36250 50750 36250 170 -1 De 0 0 102 0 0 -Po 0 59500 16000 60500 15000 170 -1 -De 15 0 103 0 800 Po 0 60500 15000 60500 14500 170 -1 De 15 0 103 0 400 +Po 0 59500 16000 60500 15000 170 -1 +De 15 0 103 0 800 Po 0 64500 16000 64500 14500 170 -1 De 15 0 104 0 C00 Po 0 34500 22000 34500 23500 170 -1 @@ -5558,7 +6006,7 @@ ZLayer 0 ZAux 6 E ZClearance 200 T ZMinThickness 100 -ZOptions 0 32 F 200 200 +ZOptions 0 32 S 200 200 ZCorner 74750 51750 0 ZCorner 74750 13250 0 ZCorner 32750 13250 0 diff --git a/demos/interf_u/interf_u.pro b/demos/interf_u/interf_u.pro index 0135362439..d22691c050 100644 --- a/demos/interf_u/interf_u.pro +++ b/demos/interf_u/interf_u.pro @@ -1,8 +1,20 @@ -update=16/05/2010 14:21:37 +update=30/06/2010 12:54:53 version=1 last_client=pcbnew [common] NetDir= +[general] +version=1 +RootSch=interf_u.sch +BoardNm=interf_u.brd +[cvpcb] +version=1 +NetITyp=0 +NetIExt=.net +PkgIExt=.pkg +NetType=0 +[cvpcb/libraries] +EquName1=devcms [eeschema] version=1 LibDir= @@ -33,9 +45,11 @@ offY_E=0 RptD_X=0 RptD_Y=100 RptLab=1 -PenMin=20 SimCmd= UseNetN=0 +LabSize=60 +PrintMonochrome=1 +ShowSheetReferenceAndTitleBlock=1 [eeschema/libraries] LibName1=power LibName2=device @@ -48,18 +62,7 @@ LibName8=adc-dac LibName9=memory LibName10=xilinx LibName11=special -[general] -version=1 -RootSch=interf_u.sch -BoardNm=interf_u.brd -[cvpcb] -version=1 -NetITyp=0 -NetIExt=.net -PkgIExt=.pkg -NetType=0 -[cvpcb/libraries] -EquName1=devcms +LibName12=image [pcbnew] version=1 PadDrlX=430 diff --git a/demos/interf_u/interf_u.sch b/demos/interf_u/interf_u.sch index d4d6dec2cc..3a1a029c06 100644 --- a/demos/interf_u/interf_u.sch +++ b/demos/interf_u/interf_u.sch @@ -1,4 +1,4 @@ -EESchema Schematic File Version 2 date 28/04/2010 09:06:34 +EESchema Schematic File Version 2 date 30/06/2010 12:55:05 LIBS:power LIBS:device LIBS:conn @@ -10,13 +10,14 @@ LIBS:adc-dac LIBS:memory LIBS:xilinx LIBS:special +LIBS:image LIBS:interf_u-cache EELAYER 24 0 EELAYER END $Descr A3 16535 11700 Sheet 1 1 Title "INTERFACE UNIVERSEL" -Date "28 apr 2010" +Date "30 jun 2010" Rev "2B" Comp "KICAD" Comment1 "Comment 1" @@ -24,6 +25,15 @@ Comment2 "Comment 2" Comment3 "Comment 3" Comment4 "Comment 4" $EndDescr +$Comp +L LOGO #G? +U 1 1 4C2B218C +P 11350 10550 +F 0 "#G?" H 11350 10130 60 0001 C CNN +F 1 "LOGO" H 11350 10970 60 0001 C CNN + 1 11350 10550 + 1 0 0 -1 +$EndComp Wire Bus Line 3900 2450 3850 2450 Wire Wire Line @@ -43,21 +53,13 @@ Wire Wire Line Wire Wire Line 3150 2250 3650 2250 Wire Wire Line - 4450 9300 3800 9300 -Wire Wire Line - 3800 9300 3250 9300 -Wire Wire Line - 3250 9300 2600 9300 + 4450 9300 2600 9300 Wire Wire Line 2600 9300 2600 9350 Wire Wire Line 2600 8900 2600 8850 Wire Wire Line - 4450 8900 3800 8900 -Wire Wire Line - 3800 8900 3250 8900 -Wire Wire Line - 3250 8900 2600 8900 + 4450 8900 2600 8900 Connection ~ 3250 8900 Connection ~ 3800 8900 Connection ~ 3800 9300 @@ -187,11 +189,7 @@ Wire Wire Line Wire Wire Line 10050 3300 10100 3300 Wire Wire Line - 10050 3000 10050 3100 -Wire Wire Line - 10050 3100 10050 3200 -Wire Wire Line - 10050 3200 10050 3300 + 10050 3000 10050 3300 Wire Wire Line 10100 3100 10050 3100 Wire Wire Line @@ -199,13 +197,9 @@ Wire Wire Line Connection ~ 10050 3100 Connection ~ 10050 3200 Wire Wire Line - 13550 4400 13550 4150 + 13550 4400 13550 3700 Wire Wire Line - 13550 4150 13550 3700 -Wire Wire Line - 14350 4400 14350 4150 -Wire Wire Line - 14350 4150 14350 3700 + 14350 4400 14350 3700 Connection ~ 13550 4150 Connection ~ 14350 4150 Connection ~ 14350 3700 @@ -224,9 +218,7 @@ Wire Wire Line Wire Wire Line 8450 1850 9000 1850 Wire Wire Line - 8450 1950 8500 1950 -Wire Wire Line - 8500 1950 9000 1950 + 8450 1950 9000 1950 Wire Wire Line 8450 2150 9000 2150 Wire Wire Line @@ -237,9 +229,7 @@ Connection ~ 8500 1950 Wire Wire Line 3950 4000 4500 4000 Wire Wire Line - 4550 2350 4550 2450 -Wire Wire Line - 4550 2450 4550 2550 + 4550 2350 4550 2550 Connection ~ 4550 2450 Wire Wire Line 3950 4100 4500 4100 @@ -459,23 +449,9 @@ Wire Wire Line Wire Wire Line 14700 7500 14750 7500 Wire Wire Line - 14700 7500 14700 7300 + 14700 7500 14700 6100 Wire Wire Line - 14700 7300 14700 7100 -Wire Wire Line - 14700 7100 14700 6900 -Wire Wire Line - 14700 6900 14700 6700 -Wire Wire Line - 14700 6700 14700 6500 -Wire Wire Line - 14700 6500 14700 6300 -Wire Wire Line - 14700 6300 14700 6100 -Wire Wire Line - 14650 6100 14700 6100 -Wire Wire Line - 14700 6100 14750 6100 + 14650 6100 14750 6100 Wire Wire Line 14750 6300 14700 6300 Wire Wire Line @@ -532,21 +508,7 @@ Wire Wire Line Wire Wire Line 1200 6900 1300 6900 Wire Wire Line - 1200 7700 1200 7600 -Wire Wire Line - 1200 7600 1200 7500 -Wire Wire Line - 1200 7500 1200 7400 -Wire Wire Line - 1200 7400 1200 7300 -Wire Wire Line - 1200 7300 1200 7200 -Wire Wire Line - 1200 7200 1200 7100 -Wire Wire Line - 1200 7100 1200 7000 -Wire Wire Line - 1200 7000 1200 6900 + 1200 7700 1200 6900 Wire Wire Line 1300 7000 1200 7000 Wire Wire Line @@ -573,9 +535,7 @@ Wire Wire Line Wire Wire Line 3350 6800 3350 6900 Wire Wire Line - 3350 6800 3150 6800 -Wire Wire Line - 3150 6800 2450 6800 + 3350 6800 2450 6800 Wire Wire Line 2450 6800 2450 6900 Wire Wire Line @@ -583,9 +543,7 @@ Wire Wire Line Wire Wire Line 3150 7950 3150 6800 Wire Wire Line - 3900 7000 2950 7000 -Wire Wire Line - 2950 7000 2600 7000 + 3900 7000 2600 7000 Wire Wire Line 2600 7000 2600 7100 Wire Wire Line @@ -597,9 +555,7 @@ Wire Wire Line Wire Wire Line 3050 6900 2500 6900 Wire Wire Line - 3050 7950 3050 7700 -Wire Wire Line - 3050 7700 3050 6900 + 3050 7950 3050 6900 Wire Wire Line 3900 7600 3400 7600 Wire Wire Line @@ -607,17 +563,13 @@ Wire Wire Line Wire Wire Line 3400 7700 3050 7700 Wire Wire Line - 2100 7300 2750 7300 -Wire Wire Line - 2750 7300 3250 7300 + 2100 7300 3250 7300 Wire Wire Line 3250 7300 3250 7100 Wire Wire Line 3250 7100 3900 7100 Wire Wire Line - 2100 7600 2450 7600 -Wire Wire Line - 2450 7600 3300 7600 + 2100 7600 3300 7600 Wire Wire Line 3300 7600 3300 7300 Wire Wire Line @@ -637,9 +589,7 @@ Wire Wire Line Wire Wire Line 3900 7500 2850 7500 Wire Wire Line - 3900 7400 2650 7400 -Wire Wire Line - 2650 7400 2100 7400 + 3900 7400 2100 7400 Connection ~ 2450 7600 Connection ~ 2550 7500 Connection ~ 2650 7400 @@ -651,13 +601,9 @@ Wire Wire Line Wire Wire Line 2850 7200 2100 7200 Wire Wire Line - 2850 7950 2850 7500 + 2850 7950 2850 7200 Wire Wire Line - 2850 7500 2850 7200 -Wire Wire Line - 2550 7950 2550 7500 -Wire Wire Line - 2550 7500 2550 7150 + 2550 7950 2550 7150 Wire Wire Line 2550 7150 2900 7150 Wire Wire Line @@ -673,85 +619,19 @@ Wire Wire Line Wire Wire Line 14250 4150 14350 4150 Wire Bus Line - 3750 2350 3750 2250 + 3750 2350 3750 1650 Wire Bus Line - 3750 2250 3750 2150 -Wire Bus Line - 3750 2150 3750 2050 -Wire Bus Line - 3750 2050 3750 1950 -Wire Bus Line - 3750 1950 3750 1850 -Wire Bus Line - 3750 1850 3750 1750 -Wire Bus Line - 3750 1750 3750 1650 -Wire Bus Line - 3750 3450 3750 3550 -Wire Bus Line - 3750 3550 3750 3650 -Wire Bus Line - 3750 3650 3750 3750 -Wire Bus Line - 3750 3750 3750 3850 -Wire Bus Line - 3750 3850 3750 3950 -Wire Bus Line - 3750 3950 3750 4050 -Wire Bus Line - 3750 4050 3750 4150 -Wire Bus Line - 3750 4150 3750 4250 -Wire Bus Line - 3750 4250 3750 4350 -Wire Bus Line - 3750 4350 3750 4450 -Wire Bus Line - 3750 4450 3750 4550 -Wire Bus Line - 3750 4550 3750 5350 + 3750 3450 3750 5350 Wire Bus Line 3300 5350 3750 5350 Wire Bus Line - 3300 6650 3300 6550 + 3300 6650 3300 5350 Wire Bus Line - 3300 6550 3300 6450 -Wire Bus Line - 3300 6450 3300 6350 -Wire Bus Line - 3300 6350 3300 6250 -Wire Bus Line - 3300 6250 3300 6150 -Wire Bus Line - 3300 6150 3300 6050 -Wire Bus Line - 3300 6050 3300 5950 -Wire Bus Line - 3300 5950 3300 5350 -Wire Bus Line - 3900 3700 3900 3600 -Wire Bus Line - 3900 3600 3900 3500 -Wire Bus Line - 3900 3500 3900 3400 -Wire Bus Line - 3900 3400 3900 3300 -Wire Bus Line - 3900 3300 3900 3200 -Wire Bus Line - 3900 3200 3900 3100 -Wire Bus Line - 3900 3100 3900 3000 -Wire Bus Line - 3900 3000 3900 2450 + 3900 3700 3900 2450 Wire Wire Line - 13700 3700 13550 3700 + 13700 3700 12300 3700 Wire Wire Line - 13550 3700 12300 3700 -Wire Wire Line - 14200 3700 14350 3700 -Wire Wire Line - 14350 3700 14650 3700 + 14200 3700 14650 3700 Wire Wire Line 15200 3700 15150 3700 Wire Wire Line @@ -1663,6 +1543,8 @@ P 11200 5700 F 0 "U9" H 11200 8450 70 0000 C CNN F 1 "4003APG120" H 11200 2950 70 0000 C CNN F 2 "PGA120" H 11200 2850 60 0000 C CNN +F 4 "50$" H 11200 5700 60 0001 C CNN "price" +F 5 "test" H 11200 5700 60 0001 C CNN "Field5" 1 11200 5700 1 0 0 -1 $EndComp diff --git a/demos/interf_u/tux.bmp b/demos/interf_u/tux.bmp new file mode 100644 index 0000000000000000000000000000000000000000..ec1dbf98a18d77a12649e5ee1011c63c52c5c2a9 GIT binary patch literal 185814 zcmeF42YgjU(}%^}c5X?bN>TK+VJ}!w1RE+S*szPeU{_QWR73=%_a-16Dbfiw^xk{# zolrv()YtNU-!o_K-JINnkVH^a@;e;1%$B?RKeMy5v%7aZuzJ;*XUN|T{42x1UHpqJ zaK;%0&NvI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n_X4WD85UddW55k2yIx@B*>jn})+)Wh99FHgn21!0NXE4(5^aTa63 z_t>#x;g!UkMCItwvnTTnQ3mQf{WR8DSut45tKsrU=tYi@vd3k9zsSbx-8(~cp!a(B zE^a_`*Uxx?gw&+1XAa|AZ@$_0v(E^LJZjXaZw3!0810*HywSQV zu(s0lV}I@0qsP1Nyn`(k6D+V|JroTz5@eax{iuj6 zq#iqarrI)OAZ8jiZ%)^Wju)d`3~|-2T?cCbV_SLEfXWUIQwI;ebNhC#OD`WQHeM~C zGx6XV+bo1LvmW|G?uj^ORF+1cUKaye$XbT7*upTZh+UB9M7?_SSTS{KMtZvCb(fEI z8?TnnnSAo|=FWYrT7kX22%O>QtQedK!+~@c2|leYy?ga4ZyhX)$7AEw;)aM-v;thY zoe*-5aS(xMF(P10E{~RblVw zszxU;N?As*qNAfl+K+PovGH0E0ti}=eSF<7a~;4Kw!2BAM*n#K{jxp9rJx6p=Q|s( zd2UJW4a_wqJUnKmT*A*Btl}xt=lky4Z~guJa$in)U$gOgUj#hP;2LNk1W6|R%)iR| zWP$s-^|^Pl@tXU7p_D^WKf0!2;_f*@9P^I zulIGEOgoVfnViL2Hg9g$q>1wb=D^4g@j3*2ec^@k=g*Vahy-1xbJ+@c?|_Zhy!WK= zEwt36cT@G+F0Z_jABY8Pe-#I9JP3RD?$N!wO-U{Mj_2%Q<2C0_6!qUP*Ez~xy*6IU z-!m`Gzu3lWX?}X;@7is=mcM6Snt!p4*V6p-%HOrycrAa=yfpt}8?UAL>6O20FNjyZ zvwduL;7Pj!rk9ipyBA;EwAEIy-GL|b4%m2oGM|g>s;u7u8?V;yi*4(Zc?Sfq{BQf% L?m%g|15f>bb(kl% literal 0 HcmV?d00001 diff --git a/eeschema/annotate.cpp b/eeschema/annotate.cpp index 5b17f3fb7e..1880d4d876 100644 --- a/eeschema/annotate.cpp +++ b/eeschema/annotate.cpp @@ -340,6 +340,7 @@ void AnnotateComponents( WinEDA_SchematicFrame* parent, /* Final control (just in case ... )*/ parent->CheckAnnotate( NULL, !annotateSchematic ); + parent->OnModify( ); parent->DrawPanel->Refresh( true ); } diff --git a/eeschema/help_common_strings.h b/eeschema/help_common_strings.h new file mode 100644 index 0000000000..5f8fd1fd57 --- /dev/null +++ b/eeschema/help_common_strings.h @@ -0,0 +1,61 @@ +/** + * @file help_common_strings.h + * strings common to toolbars and menubar + */ + +/** + * These strings are used in menus and tools, that do the same command + * But they are internatinalized, and therefore must be created + * at run time, on the fly. + * So they cannot be static. + * + * Therefore they are defined by #define, used inside menu constructors + */ + +// Common to schematic editor and component editor +#define HELP_UNDO _( "Undo last edition" ) +#define HELP_REDO _( "Redo the last undo command" ) + +#define HELP_ZOOM_IN _( "Zoom in" ) +#define HELP_ZOOM_OUT _( "Zoom out" ) +#define HELP_ZOOM_FIT _( "Fit the schematic sheet on the screen" ) +#define HELP_ZOOM_REDRAW _( "Redraw the schematic view" ) + +#define HELP_DELETE_ITEMS _( "Delete items" ) + +// Schematic editor: +#define HELP_FIND _( "Find components and texts" ) + +#define HELP_PLACE_COMPONENTS _( "Place a component" ) +#define HELP_PLACE_POWERPORT _( "Place a power port" ) +#define HELP_PLACE_WIRE _( "Place a wire" ) +#define HELP_PLACE_BUS _( "Place a bus" ) +#define HELP_PLACE_WIRE2BUS_ENTRY _( "Place a wire to bus entry" ) +#define HELP_PLACE_BUS2BUS_ENTRY _( "Place a bus to bus entry" ) +#define HELP_PLACE_NC_FLAG _( "Place a no connect flag" ) + +#define HELP_PLACE_NETLABEL _( "Place a net name (local label)" ) +#define HELP_PLACE_GLOBALLABEL \ + _(\ + "Place a global label.\nWarning: all global labels with the same name are connected in whole hierarchy" ) +#define HELP_PLACE_HIER_LABEL \ + _( "Place a hierarchical label. This label will be seen as a pin sheet in the sheet symbol" ) + +#define HELP_PLACE_JUNCTION _( "Place a junction" ) +#define HELP_PLACE_SHEET _( "Create a hierarchical sheet" ) +#define HELP_IMPORT_PINSHEET _( \ + "Place a pin sheet, imported from the corresponding hierarchical label in sheet" ) +#define HELP_PLACE_PINSHEET _( "Place a hierarchical pin to sheet" ) +#define HELP_PLACE_GRAPHICLINES _( "Place graphic lines or polygons" ) +#define HELP_PLACE_GRAPHICTEXTS _( "Place graphic text (comment)" ) + + +// Component editor: +#define HELP_ADD_PIN _( "Add pins to the component" ) +#define HELP_ADD_BODYTEXT _( "Add graphic texts to the component body" ) +#define HELP_ADD_BODYRECT _( "Add graphic rectangles to the component body" ) +#define HELP_ADD_BODYCIRCLE _( "Add circles to the component body" ) +#define HELP_ADD_BODYARC _( "Add arcs to the component body" ) +#define HELP_ADD_BODYPOLYGON _( "Add lines and polygons to the component body" ) + + diff --git a/eeschema/menubar.cpp b/eeschema/menubar.cpp index 2979e94714..86b84f0b42 100644 --- a/eeschema/menubar.cpp +++ b/eeschema/menubar.cpp @@ -17,6 +17,8 @@ #include "eeschema_id.h" #include "hotkeys.h" +#include "help_common_strings.h" + /** * @brief Create or update the menubar for the schematic frame */ @@ -156,7 +158,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() text = AddHotkeyName( _( "Undo" ), s_Schematic_Hokeys_Descr, HK_UNDO); item = new wxMenuItem( editMenu, wxID_UNDO, text, - _( "Undo last edition" ), wxITEM_NORMAL ); + HELP_UNDO, wxITEM_NORMAL ); item->SetBitmap( undo_xpm ); editMenu->Append( item ); @@ -164,7 +166,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() text = AddHotkeyName( _( "Redo" ), s_Schematic_Hokeys_Descr, HK_REDO); item = new wxMenuItem( editMenu, wxID_REDO, text, - _( "Redo the last undo command" ), wxITEM_NORMAL ); + HELP_REDO, wxITEM_NORMAL ); item->SetBitmap( redo_xpm ); editMenu->Append( item ); @@ -173,7 +175,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() /* Delete */ item = new wxMenuItem( editMenu, ID_SCHEMATIC_DELETE_ITEM_BUTT, - _( "Delete" ), _( "Delete items" ), wxITEM_NORMAL ); + _( "Delete" ), HELP_DELETE_ITEMS, wxITEM_NORMAL ); item->SetBitmap( delete_body_xpm ); editMenu->Append( item ); @@ -183,7 +185,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() /* Find */ text = AddHotkeyName( _( "&Find" ), s_Schematic_Hokeys_Descr, HK_FIND_ITEM ); item = new wxMenuItem( editMenu, ID_FIND_ITEMS, text, - _( "Find components and texts" ), wxITEM_NORMAL ); + HELP_FIND, wxITEM_NORMAL ); item->SetBitmap( find_xpm ); editMenu->Append( item ); @@ -217,14 +219,14 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() */ /* Zoom in */ text =_( "Zoom In" ); - item = new wxMenuItem( viewMenu, ID_ZOOM_IN, text, _( "Zoom In" ), + item = new wxMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, wxITEM_NORMAL ); item->SetBitmap( zoom_in_xpm ); viewMenu->Append( item ); /* Zoom out */ text = _( "Zoom Out" ); - item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text, _( "Zoom Out" ), + item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, wxITEM_NORMAL ); item->SetBitmap( zoom_out_xpm ); viewMenu->Append( item ); @@ -234,8 +236,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() HK_ZOOM_AUTO ); item = new wxMenuItem( viewMenu, ID_ZOOM_PAGE, text, - _( "Fit the schematic sheet on the screen" ), - wxITEM_NORMAL ); + HELP_ZOOM_FIT, wxITEM_NORMAL ); item->SetBitmap( zoom_auto_xpm ); viewMenu->Append( item ); @@ -246,8 +247,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() HK_ZOOM_REDRAW ); item = new wxMenuItem( viewMenu, ID_ZOOM_REDRAW, text, - _( "Redraw the schematic view" ), - wxITEM_NORMAL ); + HELP_ZOOM_REDRAW, wxITEM_NORMAL ); item->SetBitmap( zoom_redraw_xpm ); viewMenu->Append( item ); @@ -261,51 +261,51 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() /* Component */ item = new wxMenuItem( placeMenu, ID_COMPONENT_BUTT, _( "&Component" ), - _( "Place the component" ), wxITEM_NORMAL ); + HELP_PLACE_COMPONENTS, wxITEM_NORMAL ); item->SetBitmap( add_component_xpm ); placeMenu->Append( item ); /* Power port */ item = new wxMenuItem( placeMenu, ID_PLACE_POWER_BUTT, _( "&Power port" ), - _( "Place the power port" ), wxITEM_NORMAL ); + HELP_PLACE_POWERPORT, wxITEM_NORMAL ); item->SetBitmap( add_power_xpm ); placeMenu->Append( item ); /* Wire */ item = new wxMenuItem( placeMenu, ID_WIRE_BUTT, _( "&Wire" ), - _( "Place the wire" ), wxITEM_NORMAL ); + HELP_PLACE_WIRE, wxITEM_NORMAL ); item->SetBitmap( add_line_xpm ); placeMenu->Append( item ); /* Bus */ item = new wxMenuItem( placeMenu, ID_BUS_BUTT, _( "&Bus" ), - _( "Place bus" ), wxITEM_NORMAL ); + HELP_PLACE_BUS, wxITEM_NORMAL ); item->SetBitmap( add_bus_xpm ); placeMenu->Append( item ); /* Wire to Bus */ item = new wxMenuItem( placeMenu, ID_WIRETOBUS_ENTRY_BUTT, _( "W&ire to bus entry" ), - _( "Place a wire to bus entry" ), wxITEM_NORMAL ); + HELP_PLACE_WIRE2BUS_ENTRY, wxITEM_NORMAL ); item->SetBitmap( add_line2bus_xpm ); placeMenu->Append( item ); /* Bus to Bus */ item = new wxMenuItem( placeMenu, ID_BUSTOBUS_ENTRY_BUTT, _( "B&us to bus entry" ), - _( "Place a bus to bus entry" ), wxITEM_NORMAL ); + HELP_PLACE_BUS2BUS_ENTRY, wxITEM_NORMAL ); item->SetBitmap( add_bus2bus_xpm ); placeMenu->Append( item ); /* No connect flag */ item = new wxMenuItem( placeMenu, ID_NOCONN_BUTT, _( "No connect flag" ), - _( "Place a no connect flag" ), wxITEM_NORMAL ); + HELP_PLACE_NC_FLAG, wxITEM_NORMAL ); item->SetBitmap( noconn_button ); placeMenu->Append( item ); /* Net name */ item = new wxMenuItem( placeMenu, ID_LABEL_BUTT, _( "Label" ), - _( "Place net name" ), wxITEM_NORMAL ); + HELP_PLACE_NETLABEL, wxITEM_NORMAL ); item->SetBitmap( add_line_label_xpm ); placeMenu->Append( item ); @@ -318,7 +318,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() /* Junction */ item = new wxMenuItem( placeMenu, ID_JUNCTION_BUTT, _( "Junction" ), - _( "Place junction" ), wxITEM_NORMAL ); + HELP_PLACE_JUNCTION, wxITEM_NORMAL ); item->SetBitmap( add_junction_xpm ); placeMenu->Append( item ); @@ -328,31 +328,28 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() /* Hierarchical label */ item = new wxMenuItem( placeMenu, ID_HIERLABEL_BUTT, _( "Hierarchical label" ), - _( "Place a hierarchical label. This label will be seen as a pin sheet in the sheet symbol" ), - wxITEM_NORMAL ); + HELP_PLACE_HIER_LABEL, wxITEM_NORMAL ); item->SetBitmap( add_hierarchical_label_xpm ); placeMenu->Append( item ); /* Hierarchical sheet */ item = new wxMenuItem( placeMenu, ID_SHEET_SYMBOL_BUTT, _( "Hierarchical sheet" ), - _( "Create a hierarchical sheet" ), wxITEM_NORMAL ); + HELP_PLACE_SHEET, wxITEM_NORMAL ); item->SetBitmap( add_hierarchical_subsheet_xpm ); placeMenu->Append( item ); /* Import hierarchical sheet */ item = new wxMenuItem( placeMenu, ID_IMPORT_HLABEL_BUTT, _( "Import Hierarchical Label" ), - _( "Place a pin sheet created by importing a hierarchical label from sheet" ), - wxITEM_NORMAL ); + HELP_IMPORT_PINSHEET, wxITEM_NORMAL ); item->SetBitmap( import_hierarchical_label_xpm ); placeMenu->Append( item ); /* Add hierarchical Pin to Sheet */ item = new wxMenuItem( placeMenu, ID_SHEET_LABEL_BUTT, _( "Add Hierarchical Pin to Sheet" ), - _( "Place a hierarchical pin to sheet" ), - wxITEM_NORMAL ); + HELP_PLACE_PINSHEET, wxITEM_NORMAL ); item->SetBitmap( add_hierar_pin_xpm ); placeMenu->Append( item ); @@ -362,16 +359,14 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() /* Graphic line or polygon */ item = new wxMenuItem( placeMenu, ID_LINE_COMMENT_BUTT, _( "Graphic line or polygon" ), - _( "Place graphic lines or polygons" ), - wxITEM_NORMAL ); + HELP_PLACE_GRAPHICLINES, wxITEM_NORMAL ); item->SetBitmap( add_dashed_line_xpm ); placeMenu->Append( item ); /* Graphic text */ item = new wxMenuItem( placeMenu, ID_TEXT_COMMENT_BUTT, _( "Graphic text" ), - _( "Place graphic text for comment" ), - wxITEM_NORMAL ); + HELP_PLACE_GRAPHICTEXTS, wxITEM_NORMAL ); item->SetBitmap( add_text_xpm ); placeMenu->Append( item ); diff --git a/eeschema/menubar_libedit.cpp b/eeschema/menubar_libedit.cpp index e1a8b369cc..ff272f7ff8 100644 --- a/eeschema/menubar_libedit.cpp +++ b/eeschema/menubar_libedit.cpp @@ -14,6 +14,8 @@ #include "eeschema_id.h" #include "hotkeys.h" +#include "help_common_strings.h" + /** * @brief Create or update the menubar for the Component Editor frame */ @@ -92,7 +94,7 @@ void WinEDA_LibeditFrame::ReCreateMenuBar() /* Delete */ item = new wxMenuItem( editMenu, ID_LIBEDIT_DELETE_ITEM_BUTT, - _( "Delete" ), _( "Delete items" ), wxITEM_NORMAL ); + _( "Delete" ), HELP_DELETE_ITEMS, wxITEM_NORMAL ); item->SetBitmap( delete_body_xpm ); editMenu->Append( item ); @@ -114,14 +116,14 @@ void WinEDA_LibeditFrame::ReCreateMenuBar() */ /* Zoom in */ text =_( "Zoom In" ); - item = new wxMenuItem( viewMenu, ID_ZOOM_IN, text, _( "Zoom In" ), + item = new wxMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, wxITEM_NORMAL ); item->SetBitmap( zoom_in_xpm ); viewMenu->Append( item ); /* Zoom out */ text = _( "Zoom Out" ); - item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text, _( "Zoom Out" ), + item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, wxITEM_NORMAL ); item->SetBitmap( zoom_out_xpm ); viewMenu->Append( item ); @@ -131,8 +133,7 @@ void WinEDA_LibeditFrame::ReCreateMenuBar() HK_ZOOM_AUTO ); item = new wxMenuItem( viewMenu, ID_ZOOM_PAGE, text, - _( "Fit the schematic sheet on the screen" ), - wxITEM_NORMAL ); + HELP_ZOOM_FIT, wxITEM_NORMAL ); item->SetBitmap( zoom_auto_xpm ); viewMenu->Append( item ); @@ -143,8 +144,7 @@ void WinEDA_LibeditFrame::ReCreateMenuBar() HK_ZOOM_REDRAW ); item = new wxMenuItem( viewMenu, ID_ZOOM_REDRAW, text, - _( "Redraw the schematic view" ), - wxITEM_NORMAL ); + HELP_ZOOM_REDRAW, wxITEM_NORMAL ); item->SetBitmap( zoom_redraw_xpm ); viewMenu->Append( item ); @@ -156,30 +156,28 @@ void WinEDA_LibeditFrame::ReCreateMenuBar() /* Pin */ item = new wxMenuItem( placeMenu, ID_LIBEDIT_PIN_BUTT, _( "&Pin" ), - _( "Add pins to the component" ), wxITEM_NORMAL ); + HELP_ADD_PIN, wxITEM_NORMAL ); item->SetBitmap( pin_xpm ); placeMenu->Append( item ); /* Graphic text */ item = new wxMenuItem( placeMenu, ID_LIBEDIT_BODY_TEXT_BUTT, _( "Graphic text" ), - _( "Add graphic texts to the component body" ), - wxITEM_NORMAL ); + HELP_ADD_BODYTEXT, wxITEM_NORMAL ); item->SetBitmap( add_text_xpm ); placeMenu->Append( item ); /* Graphic rectangle */ item = new wxMenuItem( placeMenu, ID_LIBEDIT_BODY_RECT_BUTT, _( "Rectangle" ), - _( "Add graphic rectangles to the component body" ), - wxITEM_NORMAL ); + HELP_ADD_BODYRECT, wxITEM_NORMAL ); item->SetBitmap( add_rectangle_xpm ); placeMenu->Append( item ); /* Graphic Circle */ item = new wxMenuItem( placeMenu, ID_LIBEDIT_BODY_CIRCLE_BUTT, _( "Circle" ), - _( "Add circles to the component body" ), + HELP_ADD_BODYCIRCLE, wxITEM_NORMAL ); item->SetBitmap( add_circle_xpm ); placeMenu->Append( item ); @@ -187,16 +185,14 @@ void WinEDA_LibeditFrame::ReCreateMenuBar() /* Graphic Arc */ item = new wxMenuItem( placeMenu, ID_LIBEDIT_BODY_ARC_BUTT, _( "Arc" ), - _( "Add arcs to the component body" ), - wxITEM_NORMAL ); + HELP_ADD_BODYARC, wxITEM_NORMAL ); item->SetBitmap( add_arc_xpm ); placeMenu->Append( item ); /* Graphic line or polygon */ item = new wxMenuItem( placeMenu, ID_LIBEDIT_BODY_LINE_BUTT, _( "Line or Polygon" ), - _( "Add lines and polygons to the component body" ), - wxITEM_NORMAL ); + HELP_ADD_BODYPOLYGON, wxITEM_NORMAL ); item->SetBitmap( add_polygon_xpm ); placeMenu->Append( item ); diff --git a/eeschema/tool_lib.cpp b/eeschema/tool_lib.cpp index 6b62c66d5b..18c95dffde 100644 --- a/eeschema/tool_lib.cpp +++ b/eeschema/tool_lib.cpp @@ -13,6 +13,8 @@ #include "protos.h" #include "libeditframe.h" +#include "help_common_strings.h" + #ifdef __UNIX__ #define LISTBOX_WIDTH 140 #else @@ -40,27 +42,27 @@ void WinEDA_LibeditFrame::ReCreateVToolbar() m_VToolBar->AddSeparator(); m_VToolBar->AddTool( ID_LIBEDIT_PIN_BUTT, wxEmptyString, wxBitmap( pin_xpm ), - _( "Add pin" ), wxITEM_CHECK ); + HELP_ADD_PIN, wxITEM_CHECK ); m_VToolBar->AddTool( ID_LIBEDIT_BODY_TEXT_BUTT, wxEmptyString, wxBitmap( add_text_xpm ), - _( "Add graphic text" ), wxITEM_CHECK ); + HELP_ADD_BODYTEXT, wxITEM_CHECK ); m_VToolBar->AddTool( ID_LIBEDIT_BODY_RECT_BUTT, wxEmptyString, wxBitmap( add_rectangle_xpm ), - _( "Add rectangle" ), wxITEM_CHECK ); + HELP_ADD_BODYRECT, wxITEM_CHECK ); m_VToolBar->AddTool( ID_LIBEDIT_BODY_CIRCLE_BUTT, wxEmptyString, wxBitmap( add_circle_xpm ), - _( "Add circle" ), wxITEM_CHECK ); + HELP_ADD_BODYCIRCLE, wxITEM_CHECK ); m_VToolBar->AddTool( ID_LIBEDIT_BODY_ARC_BUTT, wxEmptyString, wxBitmap( add_arc_xpm ), - _( "Add arc" ), wxITEM_CHECK ); + HELP_ADD_BODYARC, wxITEM_CHECK ); m_VToolBar->AddTool( ID_LIBEDIT_BODY_LINE_BUTT, wxEmptyString, wxBitmap( add_polygon_xpm ), - _( "Add lines and polygons" ), wxITEM_CHECK ); + HELP_ADD_BODYPOLYGON, wxITEM_CHECK ); m_VToolBar->AddSeparator(); m_VToolBar->AddTool( ID_LIBEDIT_ANCHOR_ITEM_BUTT, wxEmptyString, @@ -79,7 +81,7 @@ void WinEDA_LibeditFrame::ReCreateVToolbar() m_VToolBar->AddSeparator(); m_VToolBar->AddTool( ID_LIBEDIT_DELETE_ITEM_BUTT, wxEmptyString, wxBitmap( delete_body_xpm ), - _( "Delete items" ), wxITEM_CHECK ); + HELP_DELETE_ITEMS, wxITEM_CHECK ); m_VToolBar->Realize(); } @@ -156,20 +158,20 @@ void WinEDA_LibeditFrame::ReCreateHToolbar() _( "Test for duplicate pins and off grid pins" ) ); m_HToolBar->AddSeparator(); - msg = AddHotkeyName( _( "Zoom in" ), s_Libedit_Hokeys_Descr, HK_ZOOM_IN, false ); + msg = AddHotkeyName( HELP_ZOOM_IN, s_Libedit_Hokeys_Descr, HK_ZOOM_IN, false ); m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, wxBitmap( zoom_in_xpm ), msg ); - msg = AddHotkeyName( _( "Zoom out" ), s_Libedit_Hokeys_Descr, HK_ZOOM_OUT, false ); + msg = AddHotkeyName( HELP_ZOOM_OUT, s_Libedit_Hokeys_Descr, HK_ZOOM_OUT, false ); m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, wxBitmap( zoom_out_xpm ), msg ); - msg = AddHotkeyName( _( "Redraw view" ), s_Libedit_Hokeys_Descr, + msg = AddHotkeyName( HELP_ZOOM_REDRAW, s_Libedit_Hokeys_Descr, HK_ZOOM_REDRAW, false ); m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString, wxBitmap( zoom_redraw_xpm ), msg ); - msg = AddHotkeyName( _( "Zoom auto" ), s_Libedit_Hokeys_Descr, HK_ZOOM_AUTO, false ); + msg = AddHotkeyName( HELP_ZOOM_FIT, s_Libedit_Hokeys_Descr, HK_ZOOM_AUTO, false ); m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, wxBitmap( zoom_auto_xpm ), msg ); diff --git a/eeschema/tool_sch.cpp b/eeschema/tool_sch.cpp index eb6b470e86..92c9dac6d8 100644 --- a/eeschema/tool_sch.cpp +++ b/eeschema/tool_sch.cpp @@ -14,6 +14,8 @@ #include "hotkeys.h" #include "eeschema_id.h" +#include "help_common_strings.h" + /* Create the main Horizontal Toolbar for the schematic editor */ @@ -65,12 +67,12 @@ void WinEDA_SchematicFrame::ReCreateHToolbar() _( "Paste" ) ); m_HToolBar->AddSeparator(); - msg = AddHotkeyName( _( "Undo last edition" ), s_Schematic_Hokeys_Descr, + msg = AddHotkeyName( HELP_UNDO, s_Schematic_Hokeys_Descr, HK_UNDO, false ); m_HToolBar->AddTool( wxID_UNDO, wxEmptyString, wxBitmap( undo_xpm ), msg ); - msg = AddHotkeyName( _( "Redo the last undo command" ), + msg = AddHotkeyName( HELP_REDO, s_Schematic_Hokeys_Descr, HK_REDO, false ); m_HToolBar->AddTool( wxID_REDO, wxEmptyString, wxBitmap( redo_xpm ), msg ); @@ -87,27 +89,27 @@ void WinEDA_SchematicFrame::ReCreateHToolbar() _( "Run pcbnew" ) ); m_HToolBar->AddSeparator(); - msg = AddHotkeyName( _( "Zoom in" ), s_Schematic_Hokeys_Descr, HK_ZOOM_IN, false ); + msg = AddHotkeyName( HELP_ZOOM_IN, s_Schematic_Hokeys_Descr, HK_ZOOM_IN, false ); m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, wxBitmap( zoom_in_xpm ), msg ); - msg = AddHotkeyName( _( "Zoom out" ), s_Schematic_Hokeys_Descr, + msg = AddHotkeyName( HELP_ZOOM_OUT, s_Schematic_Hokeys_Descr, HK_ZOOM_OUT, false ); m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, wxBitmap( zoom_out_xpm ), msg ); - msg = AddHotkeyName( _( "Redraw view" ), s_Schematic_Hokeys_Descr, + msg = AddHotkeyName( HELP_ZOOM_REDRAW, s_Schematic_Hokeys_Descr, HK_ZOOM_REDRAW, false ); m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString, wxBitmap( zoom_redraw_xpm ), msg ); - msg = AddHotkeyName( _( "Zoom auto" ), s_Schematic_Hokeys_Descr, + msg = AddHotkeyName( HELP_ZOOM_FIT, s_Schematic_Hokeys_Descr, HK_ZOOM_AUTO, false ); m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, wxBitmap( zoom_auto_xpm ), msg ); m_HToolBar->AddSeparator(); - msg = AddHotkeyName( _( "Find components and texts" ), s_Schematic_Hokeys_Descr, + msg = AddHotkeyName( HELP_FIND, s_Schematic_Hokeys_Descr, HK_FIND_ITEM, false ); m_HToolBar->AddTool( ID_FIND_ITEMS, wxEmptyString, wxBitmap( find_xpm ), msg ); @@ -157,79 +159,77 @@ void WinEDA_SchematicFrame::ReCreateVToolbar() m_VToolBar->AddSeparator(); m_VToolBar->AddTool( ID_COMPONENT_BUTT, wxEmptyString, wxBitmap( add_component_xpm ), - _( "Place a component" ), wxITEM_CHECK ); + HELP_PLACE_COMPONENTS, wxITEM_CHECK ); m_VToolBar->AddTool( ID_PLACE_POWER_BUTT, wxEmptyString, wxBitmap( add_power_xpm ), - _( "Place a power port" ), wxITEM_CHECK ); + HELP_PLACE_POWERPORT, wxITEM_CHECK ); m_VToolBar->AddSeparator(); m_VToolBar->AddTool( ID_WIRE_BUTT, wxEmptyString, wxBitmap( add_line_xpm ), - _( "Place a wire" ), wxITEM_CHECK ); + HELP_PLACE_WIRE, wxITEM_CHECK ); m_VToolBar->AddTool( ID_BUS_BUTT, wxEmptyString, wxBitmap( add_bus_xpm ), - _( "Place a bus" ), wxITEM_CHECK ); + HELP_PLACE_BUS, wxITEM_CHECK ); m_VToolBar->AddTool( ID_WIRETOBUS_ENTRY_BUTT, wxEmptyString, wxBitmap( add_line2bus_xpm ), - _( "Place a wire to bus entry" ), wxITEM_CHECK ); + HELP_PLACE_WIRE2BUS_ENTRY, wxITEM_CHECK ); m_VToolBar->AddTool( ID_BUSTOBUS_ENTRY_BUTT, wxEmptyString, wxBitmap( add_bus2bus_xpm ), - _( "Place a bus to bus entry" ), wxITEM_CHECK ); + HELP_PLACE_BUS2BUS_ENTRY, wxITEM_CHECK ); m_VToolBar->AddSeparator(); m_VToolBar->AddTool( ID_NOCONN_BUTT, wxEmptyString, wxBitmap( noconn_button ), - _( "Place no connect flag" ), wxITEM_CHECK ); + HELP_PLACE_NC_FLAG, wxITEM_CHECK ); m_VToolBar->AddTool( ID_LABEL_BUTT, wxEmptyString, wxBitmap( add_line_label_xpm ), - _( "Place net name" ), wxITEM_CHECK ); + HELP_PLACE_NETLABEL, wxITEM_CHECK ); m_VToolBar->AddTool( ID_GLABEL_BUTT, wxEmptyString, wxBitmap( add_glabel_xpm ), - _( "Place a global label.\nWarning: all global labels with the same name are connected in whole hierarchy" ), + HELP_PLACE_GLOBALLABEL, wxITEM_CHECK ); m_VToolBar->AddTool( ID_JUNCTION_BUTT, wxEmptyString, wxBitmap( add_junction_xpm ), - _( "Place a junction" ), wxITEM_CHECK ); + HELP_PLACE_JUNCTION, wxITEM_CHECK ); m_VToolBar->AddSeparator(); m_VToolBar->AddTool( ID_HIERLABEL_BUTT, wxEmptyString, wxBitmap( add_hierarchical_label_xpm ), - _( "Place a hierarchical label. This label will be seen as a pin sheet in the sheet symbol" ), - wxITEM_CHECK ); + HELP_PLACE_HIER_LABEL, wxITEM_CHECK ); m_VToolBar->AddTool( ID_SHEET_SYMBOL_BUTT, wxEmptyString, wxBitmap( add_hierarchical_subsheet_xpm ), - _( "Place hierarchical sheet" ), wxITEM_CHECK ); + HELP_PLACE_SHEET, wxITEM_CHECK ); m_VToolBar->AddTool( ID_IMPORT_HLABEL_BUTT, wxEmptyString, wxBitmap( import_hierarchical_label_xpm ), - _( "Place a pin sheet, imported from the corresponding hierarchical label in sheet" ), - wxITEM_CHECK ); + HELP_IMPORT_PINSHEET, wxITEM_CHECK ); m_VToolBar->AddTool( ID_SHEET_LABEL_BUTT, wxEmptyString, wxBitmap( add_hierar_pin_xpm ), - _( "Place hierarchical pin to sheet" ), wxITEM_CHECK ); + HELP_PLACE_PINSHEET, wxITEM_CHECK ); m_VToolBar->AddSeparator(); m_VToolBar->AddTool( ID_LINE_COMMENT_BUTT, wxEmptyString, wxBitmap( add_dashed_line_xpm ), - _( "Place graphic line or polygon" ), wxITEM_CHECK ); + HELP_PLACE_GRAPHICLINES, wxITEM_CHECK ); m_VToolBar->AddTool( ID_TEXT_COMMENT_BUTT, wxEmptyString, wxBitmap( add_text_xpm ), - _( "Place graphic text (comment)" ), wxITEM_CHECK ); + HELP_PLACE_GRAPHICTEXTS, wxITEM_CHECK ); m_VToolBar->AddSeparator(); m_VToolBar->AddTool( ID_SCHEMATIC_DELETE_ITEM_BUTT, wxEmptyString, wxBitmap( delete_body_xpm ), - _( "Delete items" ), wxITEM_CHECK ); + HELP_DELETE_ITEMS, wxITEM_CHECK ); m_VToolBar->Realize(); SetToolbars(); diff --git a/pcbnew/help_common_strings.h b/pcbnew/help_common_strings.h new file mode 100644 index 0000000000..ab2bac55dd --- /dev/null +++ b/pcbnew/help_common_strings.h @@ -0,0 +1,24 @@ +/** + * @file help_common_strings.h + * strings common to toolbars and menubar + */ + +/** + * These strings are used in menus and tools, that do the same command + * But they are internatinalized, and therefore must be created + * at run time, on the fly. + * So they cannot be static. + * + * Therefore they are defined by #define, used inside menu constructors + */ + +#define HELP_UNDO _( "Undo last edition" ) +#define HELP_REDO _( "Redo the last undo command" ) +#define HELP_FIND _( "Find components and text in current loaded board" ) + +#define HELP_ZOOM_IN _( "Zoom in" ) +#define HELP_ZOOM_OUT _( "Zoom out" ) +#define HELP_ZOOM_FIT _( "Zoom to fit the board on the screen" ) +#define HELP_ZOOM_REDRAW _( "Redraw the screen of the board" ) + +#define HELP_SHOW_HIDE_LAYERMANAGER _( "Show/hide the layers manager toolbar" ) diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index c3ffa88476..7f4ba65d37 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -12,6 +12,8 @@ #include "hotkeys.h" #include "pcbnew_id.h" +#include "help_common_strings.h" + /** * PCBNew mainframe menubar */ @@ -249,14 +251,14 @@ void WinEDA_PcbFrame::ReCreateMenuBar() /* Undo */ text = AddHotkeyName( _( "Undo" ), s_Pcbnew_Editor_Hokeys_Descr, HK_UNDO ); item = new wxMenuItem( editMenu, wxID_UNDO, text, - _( "Undo last edition" ), wxITEM_NORMAL ); + HELP_UNDO, wxITEM_NORMAL ); item->SetBitmap( undo_xpm ); editMenu->Append( item ); /* Redo */ text = AddHotkeyName( _( "Redo" ), s_Pcbnew_Editor_Hokeys_Descr, HK_REDO ); item = new wxMenuItem( editMenu, wxID_REDO, text, - _( "Redo the last undo command" ), wxITEM_NORMAL ); + HELP_REDO, wxITEM_NORMAL ); item->SetBitmap( redo_xpm ); editMenu->Append( item ); @@ -265,8 +267,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar() /* Find */ text = AddHotkeyName( _( "&Find" ), s_Pcbnew_Editor_Hokeys_Descr, HK_FIND_ITEM ); - item = new wxMenuItem( editMenu, ID_FIND_ITEMS, text, - _( "Find components and text in current loaded board" ) ); + item = new wxMenuItem( editMenu, ID_FIND_ITEMS, text, HELP_FIND ); item->SetBitmap( find_xpm ); editMenu->Append( item ); @@ -313,14 +314,14 @@ void WinEDA_PcbFrame::ReCreateMenuBar() */ /* Zoom in */ text = _( "Zoom In" ); - item = new wxMenuItem( viewMenu, ID_ZOOM_IN, text, _( "Zoom In" ), + item = new wxMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, wxITEM_NORMAL ); item->SetBitmap( zoom_in_xpm ); viewMenu->Append( item ); /* Zoom out */ - text = _( "Zoom out" ); - item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text, _( "Zoom Out" ), + text = _( "Zoom Out" ); + item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, wxITEM_NORMAL ); item->SetBitmap( zoom_out_xpm ); viewMenu->Append( item ); @@ -330,8 +331,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar() HK_ZOOM_AUTO ); item = new wxMenuItem( viewMenu, ID_ZOOM_PAGE, text, - _( "Zoom to fit the board on the screen" ), - wxITEM_NORMAL ); + HELP_ZOOM_FIT, wxITEM_NORMAL ); item->SetBitmap( zoom_auto_xpm ); viewMenu->Append( item ); @@ -342,7 +342,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar() HK_ZOOM_REDRAW ); item = new wxMenuItem( viewMenu, ID_ZOOM_REDRAW, text, - _( "Redraw the screen of the board" ), + HELP_ZOOM_REDRAW, wxITEM_NORMAL ); item->SetBitmap( zoom_redraw_xpm ); viewMenu->Append( item ); @@ -381,7 +381,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar() */ item = new wxMenuItem( configmenu, ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG, _( "Hide &Layers Manager" ), - _( "Show/hide the layers manager toolbar" ) ); + HELP_SHOW_HIDE_LAYERMANAGER ); item->SetBitmap( layers_manager_xpm ); configmenu->Append( item ); diff --git a/pcbnew/tool_pcb.cpp b/pcbnew/tool_pcb.cpp index ec98fb7951..57594ef6e8 100644 --- a/pcbnew/tool_pcb.cpp +++ b/pcbnew/tool_pcb.cpp @@ -25,6 +25,8 @@ #include "hotkeys.h" +#include "help_common_strings.h" + #define SEL_LAYER_HELP _( \ "Show active layer selections\nand select layer pair for route and place via" ) @@ -213,9 +215,9 @@ void WinEDA_PcbFrame::ReCreateHToolbar() m_HToolBar->AddSeparator(); m_HToolBar->AddTool( wxID_UNDO, wxEmptyString, wxBitmap( undo_xpm ), - _( "Undo last edition" ) ); + HELP_UNDO ); m_HToolBar->AddTool( wxID_REDO, wxEmptyString, wxBitmap( redo_xpm ), - _( "Redo the last undo command" ) ); + HELP_REDO ); m_HToolBar->AddSeparator(); m_HToolBar->AddTool( ID_GEN_PRINT, wxEmptyString, wxBitmap( print_button ), @@ -224,28 +226,28 @@ void WinEDA_PcbFrame::ReCreateHToolbar() _( "Plot (HPGL, PostScript, or GERBER format)" ) ); m_HToolBar->AddSeparator(); - msg = AddHotkeyName( _( "Zoom in" ), s_Board_Editor_Hokeys_Descr, + msg = AddHotkeyName( HELP_ZOOM_IN, s_Board_Editor_Hokeys_Descr, HK_ZOOM_IN, false ); m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, wxBitmap( zoom_in_xpm ), msg ); - msg = AddHotkeyName( _( "Zoom out" ), s_Board_Editor_Hokeys_Descr, + msg = AddHotkeyName( HELP_ZOOM_OUT, s_Board_Editor_Hokeys_Descr, HK_ZOOM_OUT, false ); m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, wxBitmap( zoom_out_xpm ), msg ); - msg = AddHotkeyName( _( "Redraw view" ), s_Board_Editor_Hokeys_Descr, + msg = AddHotkeyName( HELP_ZOOM_REDRAW, s_Board_Editor_Hokeys_Descr, HK_ZOOM_REDRAW, false ); m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString, wxBitmap( zoom_redraw_xpm ), msg ); - msg = AddHotkeyName( _( "Zoom auto" ), s_Board_Editor_Hokeys_Descr, + msg = AddHotkeyName( HELP_ZOOM_FIT, s_Board_Editor_Hokeys_Descr, HK_ZOOM_AUTO, false ); m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, wxBitmap( zoom_auto_xpm ), msg ); m_HToolBar->AddSeparator(); - msg = AddHotkeyName( _( "Find components and texts" ), + msg = AddHotkeyName( HELP_FIND, // Find components and texts s_Board_Editor_Hokeys_Descr, HK_FIND_ITEM, false ); m_HToolBar->AddTool( ID_FIND_ITEMS, wxEmptyString, wxBitmap( find_xpm ), @@ -278,7 +280,7 @@ void WinEDA_PcbFrame::ReCreateHToolbar() m_HToolBar->AddSeparator(); m_HToolBar->AddTool( ID_TOOLBARH_PCB_FREEROUTE_ACCESS, wxEmptyString, wxBitmap( web_support_xpm ), - _( "Fast access to theWeb Based FreeROUTE advanced router" ) ); + _( "Fast access to the Web Based FreeROUTE advanced router" ) ); // after adding the buttons to the toolbar, must call Realize() to reflect // the changes @@ -373,8 +375,7 @@ void WinEDA_PcbFrame::ReCreateOptToolbar() m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR, wxEmptyString, wxBitmap( layers_manager_xpm ), - _( - "Show/hide the layers manager toolbar" ), + HELP_SHOW_HIDE_LAYERMANAGER, wxITEM_CHECK ); m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1, wxEmptyString,