Loading common/base_struct.cpp +41 −0 Original line number Diff line number Diff line Loading @@ -463,6 +463,27 @@ void EDA_TextStruct::DrawOneLineOfText( WinEDA_DrawPanel* aPanel, wxDC* aDC, m_HJustify, m_VJustify, width, m_Italic, m_Bold ); } /** * Function GetStyleName * @return a wwString withe the style name( Normal, Italic, Bold, Bold+Italic) */ wxString EDA_TextStruct::GetTextStyleName() { int style = 0; if( m_Italic ) style = 1; if( m_Bold ) style += 2; wxString stylemsg[4] = { _("Normal"), _("Italic"), _("Bold"), _("Bold+Italic") }; return stylemsg[style]; } /******************/ /* Class EDA_Rect */ Loading Loading @@ -666,3 +687,23 @@ void EDA_Rect::Merge( const EDA_Rect& aRect ) end.y = MAX( end.y, rect_end.y ); SetEnd( end ); } /** * Function Merge * modifies Position and Size of this in order to contain the given point * mainly used to calculate bounding boxes * @param aPoint = given point to merge with this */ void EDA_Rect::Merge( const wxPoint& aPoint ) { Normalize(); // ensure width and height >= 0 wxPoint end = GetEnd(); // Change origin and size in order to contain the given rect m_Pos.x = MIN( m_Pos.x, aPoint.x ); m_Pos.y = MIN( m_Pos.y, aPoint.y ); end.x = MAX( end.x, aPoint.x ); end.y = MAX( end.y, aPoint.y ); SetEnd( end ); } eeschema/CMakeLists.txt +2 −2 Original line number Diff line number Diff line Loading @@ -56,8 +56,8 @@ set(EESCHEMA_SRCS dialog_libedit_dimensions_base.cpp dialog_lib_edit_draw_item.cpp dialog_lib_edit_draw_item_base.cpp dialog_lib_edit_pin.cpp dialog_lib_edit_pin_base.cpp dialogs/dialog_lib_edit_pin.cpp dialogs/dialog_lib_edit_pin_base.cpp dialog_lib_new_component.cpp dialog_lib_new_component_base.cpp dialogs/dialog_print_using_printer_base.cpp Loading eeschema/dialog_lib_edit_pin.cpp→eeschema/dialogs/dialog_lib_edit_pin.cpp +0 −0 File moved. View file eeschema/dialog_lib_edit_pin.h→eeschema/dialogs/dialog_lib_edit_pin.h +0 −0 File moved. View file eeschema/dialog_lib_edit_pin_base.cpp→eeschema/dialogs/dialog_lib_edit_pin_base.cpp +9 −8 Original line number Diff line number Diff line /////////////////////////////////////////////////////////////////////////// // C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Sep 8 2010) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! Loading @@ -11,6 +11,10 @@ /////////////////////////////////////////////////////////////////////////// BEGIN_EVENT_TABLE( DIALOG_LIB_EDIT_PIN_BASE, wxDialog ) EVT_CHECKBOX( wxID_ANY, DIALOG_LIB_EDIT_PIN_BASE::_wxFB_OnCBpartSelection ) END_EVENT_TABLE() DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); Loading Loading @@ -101,10 +105,10 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 ); fgSizer1->Add( 0, 0, 0, wxEXPAND, 3 ); Loading @@ -120,10 +124,10 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 ); mainSizer->Add( fgSizer1, 0, wxALL|wxEXPAND, 12 ); Loading @@ -131,16 +135,13 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID boarderSizer = new wxBoxSizer( wxVERTICAL ); m_checkApplyToAllParts = new wxCheckBox( this, wxID_ANY, _("Add to all &parts in package"), wxDefaultPosition, wxDefaultSize, 0 ); boarderSizer->Add( m_checkApplyToAllParts, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); m_checkApplyToAllConversions = new wxCheckBox( this, wxID_ANY, _("Add to all alternate &body styles (DeMorgan)"), wxDefaultPosition, wxDefaultSize, 0 ); boarderSizer->Add( m_checkApplyToAllConversions, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); m_checkShow = new wxCheckBox( this, wxID_ANY, _("&Visible"), wxDefaultPosition, wxDefaultSize, 0 ); m_checkShow->SetValue(true); boarderSizer->Add( m_checkShow, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); Loading Loading
common/base_struct.cpp +41 −0 Original line number Diff line number Diff line Loading @@ -463,6 +463,27 @@ void EDA_TextStruct::DrawOneLineOfText( WinEDA_DrawPanel* aPanel, wxDC* aDC, m_HJustify, m_VJustify, width, m_Italic, m_Bold ); } /** * Function GetStyleName * @return a wwString withe the style name( Normal, Italic, Bold, Bold+Italic) */ wxString EDA_TextStruct::GetTextStyleName() { int style = 0; if( m_Italic ) style = 1; if( m_Bold ) style += 2; wxString stylemsg[4] = { _("Normal"), _("Italic"), _("Bold"), _("Bold+Italic") }; return stylemsg[style]; } /******************/ /* Class EDA_Rect */ Loading Loading @@ -666,3 +687,23 @@ void EDA_Rect::Merge( const EDA_Rect& aRect ) end.y = MAX( end.y, rect_end.y ); SetEnd( end ); } /** * Function Merge * modifies Position and Size of this in order to contain the given point * mainly used to calculate bounding boxes * @param aPoint = given point to merge with this */ void EDA_Rect::Merge( const wxPoint& aPoint ) { Normalize(); // ensure width and height >= 0 wxPoint end = GetEnd(); // Change origin and size in order to contain the given rect m_Pos.x = MIN( m_Pos.x, aPoint.x ); m_Pos.y = MIN( m_Pos.y, aPoint.y ); end.x = MAX( end.x, aPoint.x ); end.y = MAX( end.y, aPoint.y ); SetEnd( end ); }
eeschema/CMakeLists.txt +2 −2 Original line number Diff line number Diff line Loading @@ -56,8 +56,8 @@ set(EESCHEMA_SRCS dialog_libedit_dimensions_base.cpp dialog_lib_edit_draw_item.cpp dialog_lib_edit_draw_item_base.cpp dialog_lib_edit_pin.cpp dialog_lib_edit_pin_base.cpp dialogs/dialog_lib_edit_pin.cpp dialogs/dialog_lib_edit_pin_base.cpp dialog_lib_new_component.cpp dialog_lib_new_component_base.cpp dialogs/dialog_print_using_printer_base.cpp Loading
eeschema/dialog_lib_edit_pin.cpp→eeschema/dialogs/dialog_lib_edit_pin.cpp +0 −0 File moved. View file
eeschema/dialog_lib_edit_pin_base.cpp→eeschema/dialogs/dialog_lib_edit_pin_base.cpp +9 −8 Original line number Diff line number Diff line /////////////////////////////////////////////////////////////////////////// // C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Sep 8 2010) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! Loading @@ -11,6 +11,10 @@ /////////////////////////////////////////////////////////////////////////// BEGIN_EVENT_TABLE( DIALOG_LIB_EDIT_PIN_BASE, wxDialog ) EVT_CHECKBOX( wxID_ANY, DIALOG_LIB_EDIT_PIN_BASE::_wxFB_OnCBpartSelection ) END_EVENT_TABLE() DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); Loading Loading @@ -101,10 +105,10 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 ); fgSizer1->Add( 0, 0, 0, wxEXPAND, 3 ); Loading @@ -120,10 +124,10 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 ); mainSizer->Add( fgSizer1, 0, wxALL|wxEXPAND, 12 ); Loading @@ -131,16 +135,13 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID boarderSizer = new wxBoxSizer( wxVERTICAL ); m_checkApplyToAllParts = new wxCheckBox( this, wxID_ANY, _("Add to all &parts in package"), wxDefaultPosition, wxDefaultSize, 0 ); boarderSizer->Add( m_checkApplyToAllParts, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); m_checkApplyToAllConversions = new wxCheckBox( this, wxID_ANY, _("Add to all alternate &body styles (DeMorgan)"), wxDefaultPosition, wxDefaultSize, 0 ); boarderSizer->Add( m_checkApplyToAllConversions, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); m_checkShow = new wxCheckBox( this, wxID_ANY, _("&Visible"), wxDefaultPosition, wxDefaultSize, 0 ); m_checkShow->SetValue(true); boarderSizer->Add( m_checkShow, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); Loading