Commit 73e38ce9 authored by Wayne Stambaugh's avatar Wayne Stambaugh

EESchema code refactoring and coding policy naming fixes.

* Move schematic wire and bus break code into schematic screen object.
* Move schematic test for dangling ends into schematic screen object.
* Remove left over debugging output in schematic screen object.
* Remove unused file eeschema/cleanup.cpp.
* Fix bug in schematic line object hit test algorithm.
* Fix a string concatenation compile error added in r2752.
* Rename class WinEDA_BasicFrame to EDA_BASE_FRAME.
* Rename class WinEDA_DrawFrame to EDA_DRAW_FRAME.
* Rename class WinEDA_DrawPanel to EDA_DRAW_PANEL.
parent 1d2ca601
...@@ -337,7 +337,7 @@ bool EDA_TextStruct::TextHitTest( const EDA_Rect& aRect, bool aContains, int aAc ...@@ -337,7 +337,7 @@ bool EDA_TextStruct::TextHitTest( const EDA_Rect& aRect, bool aContains, int aAc
} }
void EDA_TextStruct::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, void EDA_TextStruct::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
EDA_Colors aColor, int aDrawMode, EDA_Colors aColor, int aDrawMode,
GRTraceMode aFillMode, EDA_Colors aAnchor_color ) GRTraceMode aFillMode, EDA_Colors aAnchor_color )
{ {
...@@ -381,7 +381,7 @@ void EDA_TextStruct::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& a ...@@ -381,7 +381,7 @@ void EDA_TextStruct::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& a
} }
void EDA_TextStruct::DrawOneLineOfText( WinEDA_DrawPanel* aPanel, wxDC* aDC, void EDA_TextStruct::DrawOneLineOfText( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
const wxPoint& aOffset, EDA_Colors aColor, const wxPoint& aOffset, EDA_Colors aColor,
int aDrawMode, GRTraceMode aFillMode, int aDrawMode, GRTraceMode aFillMode,
EDA_Colors aAnchor_color, EDA_Colors aAnchor_color,
......
/** /**
* WinEDA_BasicFrame Class Functions * EDA_BASE_FRAME Class Functions
* @file basicframe.cpp * @file basicframe.cpp
*/ */
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
#include "bitmaps.h" #include "bitmaps.h"
/* /*
* Class constructor for WinEDA_BasicFrame general options * Class constructor for EDA_BASE_FRAME general options
*/ */
WinEDA_BasicFrame::WinEDA_BasicFrame( wxWindow* father, EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* father,
int idtype, int idtype,
const wxString& title, const wxString& title,
const wxPoint& pos, const wxPoint& pos,
...@@ -58,11 +58,11 @@ WinEDA_BasicFrame::WinEDA_BasicFrame( wxWindow* father, ...@@ -58,11 +58,11 @@ WinEDA_BasicFrame::WinEDA_BasicFrame( wxWindow* father,
Connect( ID_HELP_COPY_VERSION_STRING, Connect( ID_HELP_COPY_VERSION_STRING,
wxEVT_COMMAND_MENU_SELECTED, wxEVT_COMMAND_MENU_SELECTED,
wxCommandEventHandler( WinEDA_BasicFrame::CopyVersionInfoToClipboard ) ); wxCommandEventHandler( EDA_BASE_FRAME::CopyVersionInfoToClipboard ) );
} }
WinEDA_BasicFrame::~WinEDA_BasicFrame() EDA_BASE_FRAME::~EDA_BASE_FRAME()
{ {
if( wxGetApp().m_HtmlCtrl ) if( wxGetApp().m_HtmlCtrl )
delete wxGetApp().m_HtmlCtrl; delete wxGetApp().m_HtmlCtrl;
...@@ -78,7 +78,7 @@ WinEDA_BasicFrame::~WinEDA_BasicFrame() ...@@ -78,7 +78,7 @@ WinEDA_BasicFrame::~WinEDA_BasicFrame()
/* /*
* Virtual function * Virtual function
*/ */
void WinEDA_BasicFrame::ReCreateMenuBar() void EDA_BASE_FRAME::ReCreateMenuBar()
{ {
} }
...@@ -88,7 +88,7 @@ void WinEDA_BasicFrame::ReCreateMenuBar() ...@@ -88,7 +88,7 @@ void WinEDA_BasicFrame::ReCreateMenuBar()
* called on a language menu selection * called on a language menu selection
* when using a derived function, do not forget to call this one * when using a derived function, do not forget to call this one
*/ */
void WinEDA_BasicFrame::SetLanguage( wxCommandEvent& event ) void EDA_BASE_FRAME::SetLanguage( wxCommandEvent& event )
{ {
int id = event.GetId(); int id = event.GetId();
...@@ -106,7 +106,7 @@ void WinEDA_BasicFrame::SetLanguage( wxCommandEvent& event ) ...@@ -106,7 +106,7 @@ void WinEDA_BasicFrame::SetLanguage( wxCommandEvent& event )
* parameters. Don't forget to call the base method or your frames won't * parameters. Don't forget to call the base method or your frames won't
* remember their positions and sizes. * remember their positions and sizes.
*/ */
void WinEDA_BasicFrame::LoadSettings() void EDA_BASE_FRAME::LoadSettings()
{ {
wxString text; wxString text;
int Ypos_min; int Ypos_min;
...@@ -146,7 +146,7 @@ void WinEDA_BasicFrame::LoadSettings() ...@@ -146,7 +146,7 @@ void WinEDA_BasicFrame::LoadSettings()
* parameters. Don't forget to call the base method or your frames won't * parameters. Don't forget to call the base method or your frames won't
* remember their positions and sizes. * remember their positions and sizes.
*/ */
void WinEDA_BasicFrame::SaveSettings() void EDA_BASE_FRAME::SaveSettings()
{ {
wxString text; wxString text;
wxConfig* config; wxConfig* config;
...@@ -170,7 +170,7 @@ void WinEDA_BasicFrame::SaveSettings() ...@@ -170,7 +170,7 @@ void WinEDA_BasicFrame::SaveSettings()
} }
void WinEDA_BasicFrame::PrintMsg( const wxString& text ) void EDA_BASE_FRAME::PrintMsg( const wxString& text )
{ {
SetStatusText( text ); SetStatusText( text );
} }
...@@ -179,7 +179,7 @@ void WinEDA_BasicFrame::PrintMsg( const wxString& text ) ...@@ -179,7 +179,7 @@ void WinEDA_BasicFrame::PrintMsg( const wxString& text )
/* /*
* Display a bargraph (0 to 50 point length) for a PerCent value from 0 to 100 * Display a bargraph (0 to 50 point length) for a PerCent value from 0 to 100
*/ */
void WinEDA_BasicFrame::DisplayActivity( int PerCent, const wxString& Text ) void EDA_BASE_FRAME::DisplayActivity( int PerCent, const wxString& Text )
{ {
wxString Line; wxString Line;
...@@ -198,7 +198,7 @@ void WinEDA_BasicFrame::DisplayActivity( int PerCent, const wxString& Text ) ...@@ -198,7 +198,7 @@ void WinEDA_BasicFrame::DisplayActivity( int PerCent, const wxString& Text )
/* /*
* Update the list of past projects. * Update the list of past projects.
*/ */
void WinEDA_BasicFrame::SetLastProject( const wxString& FullFileName ) void EDA_BASE_FRAME::SetLastProject( const wxString& FullFileName )
{ {
wxGetApp().m_fileHistory.AddFileToHistory( FullFileName ); wxGetApp().m_fileHistory.AddFileToHistory( FullFileName );
ReCreateMenuBar(); ReCreateMenuBar();
...@@ -208,7 +208,7 @@ void WinEDA_BasicFrame::SetLastProject( const wxString& FullFileName ) ...@@ -208,7 +208,7 @@ void WinEDA_BasicFrame::SetLastProject( const wxString& FullFileName )
/* /*
* Fetch the file name from the file history list. * Fetch the file name from the file history list.
*/ */
wxString WinEDA_BasicFrame::GetFileFromHistory( int cmdId, const wxString& type ) wxString EDA_BASE_FRAME::GetFileFromHistory( int cmdId, const wxString& type )
{ {
wxString fn, msg; wxString fn, msg;
size_t i; size_t i;
...@@ -239,7 +239,7 @@ wxString WinEDA_BasicFrame::GetFileFromHistory( int cmdId, const wxString& type ...@@ -239,7 +239,7 @@ wxString WinEDA_BasicFrame::GetFileFromHistory( int cmdId, const wxString& type
/* /*
* *
*/ */
void WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event ) void EDA_BASE_FRAME::GetKicadHelp( wxCommandEvent& event )
{ {
wxString msg; wxString msg;
...@@ -282,14 +282,14 @@ void WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event ) ...@@ -282,14 +282,14 @@ void WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event )
/* /*
* *
*/ */
void WinEDA_BasicFrame::GetKicadAbout( wxCommandEvent& event ) void EDA_BASE_FRAME::GetKicadAbout( wxCommandEvent& event )
{ {
bool ShowAboutDialog(wxWindow * parent); bool ShowAboutDialog(wxWindow * parent);
ShowAboutDialog(this); ShowAboutDialog(this);
} }
void WinEDA_BasicFrame::AddHelpVersionInfoMenuEntry( wxMenu* aMenu ) void EDA_BASE_FRAME::AddHelpVersionInfoMenuEntry( wxMenu* aMenu )
{ {
wxASSERT( aMenu != NULL ); wxASSERT( aMenu != NULL );
...@@ -364,7 +364,7 @@ static inline const char* KICAD_BUILD_OPTIONS_SIGNATURE() ...@@ -364,7 +364,7 @@ static inline const char* KICAD_BUILD_OPTIONS_SIGNATURE()
#endif #endif
void WinEDA_BasicFrame::CopyVersionInfoToClipboard( wxCommandEvent& event ) void EDA_BASE_FRAME::CopyVersionInfoToClipboard( wxCommandEvent& event )
{ {
if( !wxTheClipboard->Open() ) if( !wxTheClipboard->Open() )
{ {
......
...@@ -33,7 +33,7 @@ BLOCK_SELECTOR::~BLOCK_SELECTOR() ...@@ -33,7 +33,7 @@ BLOCK_SELECTOR::~BLOCK_SELECTOR()
/* /*
* Print block command message (Block move, Block copy ...) in status bar * Print block command message (Block move, Block copy ...) in status bar
*/ */
void BLOCK_SELECTOR::SetMessageBlock( WinEDA_DrawFrame* frame ) void BLOCK_SELECTOR::SetMessageBlock( EDA_DRAW_FRAME* frame )
{ {
wxString msg; wxString msg;
...@@ -96,7 +96,7 @@ void BLOCK_SELECTOR::SetMessageBlock( WinEDA_DrawFrame* frame ) ...@@ -96,7 +96,7 @@ void BLOCK_SELECTOR::SetMessageBlock( WinEDA_DrawFrame* frame )
} }
void BLOCK_SELECTOR::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, void BLOCK_SELECTOR::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
const wxPoint& aOffset, const wxPoint& aOffset,
int aDrawMode, int aDrawMode,
int aColor ) int aColor )
...@@ -119,8 +119,7 @@ void BLOCK_SELECTOR::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, ...@@ -119,8 +119,7 @@ void BLOCK_SELECTOR::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC,
* Function InitData * Function InitData
* Init the initial values of a BLOCK_SELECTOR, before starting a block command * Init the initial values of a BLOCK_SELECTOR, before starting a block command
*/ */
void BLOCK_SELECTOR::InitData( WinEDA_DrawPanel* aPanel, void BLOCK_SELECTOR::InitData( EDA_DRAW_PANEL* aPanel, const wxPoint& startpos )
const wxPoint& startpos )
{ {
m_State = STATE_BLOCK_INIT; m_State = STATE_BLOCK_INIT;
SetOrigin( startpos ); SetOrigin( startpos );
...@@ -166,8 +165,7 @@ void BLOCK_SELECTOR::PushItem( ITEM_PICKER& aItem ) ...@@ -166,8 +165,7 @@ void BLOCK_SELECTOR::PushItem( ITEM_PICKER& aItem )
/* First command block function: /* First command block function:
* Init the Block infos: command type, initial position, and other variables.. * Init the Block infos: command type, initial position, and other variables..
*/ */
bool WinEDA_DrawFrame::HandleBlockBegin( wxDC* DC, int key, bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* DC, int key, const wxPoint& startpos )
const wxPoint& startpos )
{ {
BLOCK_SELECTOR* Block = &GetBaseScreen()->m_BlockLocate; BLOCK_SELECTOR* Block = &GetBaseScreen()->m_BlockLocate;
...@@ -215,7 +213,7 @@ bool WinEDA_DrawFrame::HandleBlockBegin( wxDC* DC, int key, ...@@ -215,7 +213,7 @@ bool WinEDA_DrawFrame::HandleBlockBegin( wxDC* DC, int key,
{ {
Block->m_ItemsSelection.ClearItemsList(); Block->m_ItemsSelection.ClearItemsList();
DisplayError( this, DisplayError( this,
wxT( "WinEDA_DrawFrame::HandleBlockBegin() Err: ManageCurseur NULL" ) ); wxT( "EDA_DRAW_FRAME::HandleBlockBegin() Err: ManageCurseur NULL" ) );
return TRUE; return TRUE;
} }
Block->m_State = STATE_BLOCK_MOVE; Block->m_State = STATE_BLOCK_MOVE;
...@@ -225,7 +223,7 @@ bool WinEDA_DrawFrame::HandleBlockBegin( wxDC* DC, int key, ...@@ -225,7 +223,7 @@ bool WinEDA_DrawFrame::HandleBlockBegin( wxDC* DC, int key,
default: default:
{ {
wxString msg; wxString msg;
msg << wxT( "WinEDA_DrawFrame::HandleBlockBegin() error: Unknown command " ) << msg << wxT( "EDA_DRAW_FRAME::HandleBlockBegin() error: Unknown command " ) <<
Block->m_Command; Block->m_Command;
DisplayError( this, msg ); DisplayError( this, msg );
} }
...@@ -243,7 +241,7 @@ bool WinEDA_DrawFrame::HandleBlockBegin( wxDC* DC, int key, ...@@ -243,7 +241,7 @@ bool WinEDA_DrawFrame::HandleBlockBegin( wxDC* DC, int key,
* by Initm_BlockLocateDatas(). * by Initm_BlockLocateDatas().
* The other point of the rectangle is the mouse cursor * The other point of the rectangle is the mouse cursor
*/ */
void DrawAndSizingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) void DrawAndSizingBlockOutlines( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase )
{ {
BLOCK_SELECTOR* PtBlock; BLOCK_SELECTOR* PtBlock;
...@@ -271,7 +269,7 @@ void DrawAndSizingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) ...@@ -271,7 +269,7 @@ void DrawAndSizingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
/* /*
* Cancel Current block operation. * Cancel Current block operation.
*/ */
void AbortBlockCurrentCommand( WinEDA_DrawPanel* Panel, wxDC* DC ) void AbortBlockCurrentCommand( EDA_DRAW_PANEL* Panel, wxDC* DC )
{ {
BASE_SCREEN* screen = Panel->GetScreen(); BASE_SCREEN* screen = Panel->GetScreen();
......
...@@ -145,7 +145,7 @@ EDA_Rect MARKER_BASE::GetBoundingBoxMarker() const ...@@ -145,7 +145,7 @@ EDA_Rect MARKER_BASE::GetBoundingBoxMarker() const
return EDA_Rect( m_Pos, realsize ); return EDA_Rect( m_Pos, realsize );
} }
void MARKER_BASE::DrawMarker( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode, void MARKER_BASE::DrawMarker( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode,
const wxPoint& aOffset ) const wxPoint& aOffset )
{ {
wxPoint corners[CORNERS_COUNT]; wxPoint corners[CORNERS_COUNT];
...@@ -169,7 +169,7 @@ void MARKER_BASE::DrawMarker( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode ...@@ -169,7 +169,7 @@ void MARKER_BASE::DrawMarker( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode
} }
void MARKER_BASE::DisplayMarkerInfo( WinEDA_DrawFrame* aFrame ) void MARKER_BASE::DisplayMarkerInfo( EDA_DRAW_FRAME* aFrame )
{ {
wxString msg = m_drc.ShowHtml(); wxString msg = m_drc.ShowHtml();
DIALOG_DISPLAY_HTML_TEXT_BASE infodisplay( (wxWindow*)aFrame, wxID_ANY, _( "Marker Info" ), DIALOG_DISPLAY_HTML_TEXT_BASE infodisplay( (wxWindow*)aFrame, wxID_ANY, _( "Marker Info" ),
......
...@@ -664,7 +664,7 @@ void WinEDA_TextFrame::OnClose( wxCloseEvent& event ) ...@@ -664,7 +664,7 @@ void WinEDA_TextFrame::OnClose( wxCloseEvent& event )
} }
void Affiche_1_Parametre( WinEDA_DrawFrame* frame, int pos_X, void Affiche_1_Parametre( EDA_DRAW_FRAME* frame, int pos_X,
const wxString& texte_H, const wxString& texte_L, const wxString& texte_H, const wxString& texte_L,
int color ) int color )
{ {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
/* Plot sheet references /* Plot sheet references
* margin is in mils (1/1000 inch) * margin is in mils (1/1000 inch)
*/ */
void WinEDA_DrawFrame::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen ) void EDA_DRAW_FRAME::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen )
{ {
#define WSTEXTSIZE 50 // Text size in mils #define WSTEXTSIZE 50 // Text size in mils
Ki_PageDescr* Sheet = screen->m_CurrentSheetDesc; Ki_PageDescr* Sheet = screen->m_CurrentSheetDesc;
......
...@@ -18,13 +18,13 @@ ...@@ -18,13 +18,13 @@
static const bool s_PlotBlackAndWhite = FALSE; static const bool s_PlotBlackAndWhite = FALSE;
static const bool Print_Sheet_Ref = TRUE; static const bool Print_Sheet_Ref = TRUE;
static bool DrawPage( WinEDA_DrawFrame* aFrame ); static bool DrawPage( EDA_DRAW_FRAME* aFrame );
/* calls the function to copy the current page or the current bock to /* calls the function to copy the current page or the current bock to
* the clipboard * the clipboard
*/ */
void WinEDA_DrawFrame::CopyToClipboard( wxCommandEvent& event ) void EDA_DRAW_FRAME::CopyToClipboard( wxCommandEvent& event )
{ {
DrawPage( this ); DrawPage( this );
...@@ -43,7 +43,7 @@ void WinEDA_DrawFrame::CopyToClipboard( wxCommandEvent& event ) ...@@ -43,7 +43,7 @@ void WinEDA_DrawFrame::CopyToClipboard( wxCommandEvent& event )
* to export drawings to other applications (word processing ...) * to export drawings to other applications (word processing ...)
* This is not suitable for copy command within eeschema or pcbnew * This is not suitable for copy command within eeschema or pcbnew
*/ */
bool DrawPage( WinEDA_DrawFrame* aFrame ) bool DrawPage( EDA_DRAW_FRAME* aFrame )
{ {
bool success = TRUE; bool success = TRUE;
......
...@@ -22,7 +22,7 @@ static unsigned s_HistoryMaxCount = 8; // Max number of items displayed in hist ...@@ -22,7 +22,7 @@ static unsigned s_HistoryMaxCount = 8; // Max number of items displayed in hist
* Dialog frame to choose a component or a footprint * Dialog frame to choose a component or a footprint
* This dialog shows an history of last selected items * This dialog shows an history of last selected items
*/ */
DIALOG_GET_COMPONENT::DIALOG_GET_COMPONENT( WinEDA_DrawFrame* parent, DIALOG_GET_COMPONENT::DIALOG_GET_COMPONENT( EDA_DRAW_FRAME* parent,
const wxPoint& framepos, const wxPoint& framepos,
wxArrayString& HistoryList, wxArrayString& HistoryList,
const wxString& Title, const wxString& Title,
......
...@@ -32,7 +32,7 @@ dialog_hotkeys_editor.cpp ...@@ -32,7 +32,7 @@ dialog_hotkeys_editor.cpp
#include "dialog_hotkeys_editor.h" #include "dialog_hotkeys_editor.h"
void InstallHotkeyFrame( WinEDA_DrawFrame* parent, void InstallHotkeyFrame( EDA_DRAW_FRAME* parent,
Ki_HotkeyInfoSectionDescriptor* hotkeys ) Ki_HotkeyInfoSectionDescriptor* hotkeys )
{ {
HOTKEYS_EDITOR_DIALOG dialog( parent, hotkeys ); HOTKEYS_EDITOR_DIALOG dialog( parent, hotkeys );
...@@ -46,7 +46,7 @@ void InstallHotkeyFrame( WinEDA_DrawFrame* parent, ...@@ -46,7 +46,7 @@ void InstallHotkeyFrame( WinEDA_DrawFrame* parent,
} }
HOTKEYS_EDITOR_DIALOG::HOTKEYS_EDITOR_DIALOG( WinEDA_DrawFrame* parent, HOTKEYS_EDITOR_DIALOG::HOTKEYS_EDITOR_DIALOG( EDA_DRAW_FRAME* parent,
Ki_HotkeyInfoSectionDescriptor* hotkeys ) : Ki_HotkeyInfoSectionDescriptor* hotkeys ) :
HOTKEYS_EDITOR_DIALOG_BASE( parent ) HOTKEYS_EDITOR_DIALOG_BASE( parent )
{ {
......
...@@ -34,7 +34,7 @@ Ki_PageDescr * SheetList[NB_ITEMS + 1] = ...@@ -34,7 +34,7 @@ Ki_PageDescr * SheetList[NB_ITEMS + 1] =
/******************************************************************/ /******************************************************************/
void WinEDA_DrawFrame::Process_PageSettings(wxCommandEvent& event) void EDA_DRAW_FRAME::Process_PageSettings(wxCommandEvent& event)
/******************************************************************/ /******************************************************************/
/* Creation de la fenetre de configuration /* Creation de la fenetre de configuration
*/ */
...@@ -46,7 +46,7 @@ void WinEDA_DrawFrame::Process_PageSettings(wxCommandEvent& event) ...@@ -46,7 +46,7 @@ void WinEDA_DrawFrame::Process_PageSettings(wxCommandEvent& event)
} }
DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS( WinEDA_DrawFrame* parent ): DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS( EDA_DRAW_FRAME* parent ):
DIALOG_PAGES_SETTINGS_BASE( parent ) DIALOG_PAGES_SETTINGS_BASE( parent )
{ {
m_Parent = parent; m_Parent = parent;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
class DIALOG_PAGES_SETTINGS: public DIALOG_PAGES_SETTINGS_BASE class DIALOG_PAGES_SETTINGS: public DIALOG_PAGES_SETTINGS_BASE
{ {
private: private:
WinEDA_DrawFrame *m_Parent; EDA_DRAW_FRAME *m_Parent;
BASE_SCREEN * m_Screen; BASE_SCREEN * m_Screen;
int m_Modified; int m_Modified;
Ki_PageDescr * m_SelectedSheet; Ki_PageDescr * m_SelectedSheet;
...@@ -22,7 +22,7 @@ private: ...@@ -22,7 +22,7 @@ private:
int m_CurrentSelection; int m_CurrentSelection;
public: public:
DIALOG_PAGES_SETTINGS( WinEDA_DrawFrame* parent ); DIALOG_PAGES_SETTINGS( EDA_DRAW_FRAME* parent );
~DIALOG_PAGES_SETTINGS(); ~DIALOG_PAGES_SETTINGS();
private: private:
......
...@@ -17,13 +17,13 @@ enum listbox { ...@@ -17,13 +17,13 @@ enum listbox {
BEGIN_EVENT_TABLE( WinEDAListBox, wxDialog ) BEGIN_EVENT_TABLE( WinEDAListBox, wxDialog )
EVT_BUTTON( wxID_OK, WinEDAListBox::OnOkClick ) EVT_BUTTON( wxID_OK, WinEDAListBox::OnOkClick )
EVT_BUTTON( wxID_CANCEL, WinEDAListBox::OnCancelClick ) EVT_BUTTON( wxID_CANCEL, WinEDAListBox::OnCancelClick )
EVT_LISTBOX( ID_LISTBOX_LIST, WinEDAListBox::ClickOnList ) EVT_LISTBOX( ID_LISTBOX_LIST, WinEDAListBox::ClickOnList )
EVT_LISTBOX_DCLICK( ID_LISTBOX_LIST, WinEDAListBox::D_ClickOnList ) EVT_LISTBOX_DCLICK( ID_LISTBOX_LIST, WinEDAListBox::D_ClickOnList )
EVT_CHAR( WinEDAListBox::OnKeyEvent ) EVT_CHAR( WinEDAListBox::OnKeyEvent )
EVT_CHAR_HOOK( WinEDAListBox::OnKeyEvent ) EVT_CHAR_HOOK( WinEDAListBox::OnKeyEvent )
EVT_CLOSE( WinEDAListBox::OnClose ) EVT_CLOSE( WinEDAListBox::OnClose )
END_EVENT_TABLE() END_EVENT_TABLE()
...@@ -37,7 +37,7 @@ END_EVENT_TABLE() ...@@ -37,7 +37,7 @@ END_EVENT_TABLE()
* @param aCallBackFunction callback function to display comments * @param aCallBackFunction callback function to display comments
* @param aPos = position of the dialog. * @param aPos = position of the dialog.
*/ */
WinEDAListBox::WinEDAListBox( WinEDA_DrawFrame* aParent, const wxString& aTitle, WinEDAListBox::WinEDAListBox( EDA_DRAW_FRAME* aParent, const wxString& aTitle,
const wxArrayString& aItemList, const wxString& aRefText, const wxArrayString& aItemList, const wxString& aRefText,
void(* aCallBackFunction)(wxString& Text), wxPoint aPos ) : void(* aCallBackFunction)(wxString& Text), wxPoint aPos ) :
wxDialog( aParent, wxID_ANY, aTitle, aPos, wxDefaultSize, wxDialog( aParent, wxID_ANY, aTitle, aPos, wxDefaultSize,
......
This diff is collapsed.
This diff is collapsed.
...@@ -223,7 +223,7 @@ static int overbar_position( int size_v, int thickness ) ...@@ -223,7 +223,7 @@ static int overbar_position( int size_v, int thickness )
* @param aPlotter = a pointer to a PLOTTER instance, when this function is used to plot * @param aPlotter = a pointer to a PLOTTER instance, when this function is used to plot
* the text. NULL to draw this text. * the text. NULL to draw this text.
*/ */
void DrawGraphicText( WinEDA_DrawPanel* aPanel, void DrawGraphicText( EDA_DRAW_PANEL* aPanel,
wxDC* aDC, wxDC* aDC,
const wxPoint& aPos, const wxPoint& aPos,
EDA_Colors aColor, EDA_Colors aColor,
......
...@@ -56,7 +56,7 @@ WinEDA_Server* CreateServer( wxWindow* window, int service ) ...@@ -56,7 +56,7 @@ WinEDA_Server* CreateServer( wxWindow* window, int service )
/* Function called on every client request. /* Function called on every client request.
*/ */
void WinEDA_DrawFrame::OnSockRequest( wxSocketEvent& evt ) void EDA_DRAW_FRAME::OnSockRequest( wxSocketEvent& evt )
{ {
size_t len; size_t len;
wxSocketBase* sock = evt.GetSocket(); wxSocketBase* sock = evt.GetSocket();
...@@ -80,7 +80,7 @@ void WinEDA_DrawFrame::OnSockRequest( wxSocketEvent& evt ) ...@@ -80,7 +80,7 @@ void WinEDA_DrawFrame::OnSockRequest( wxSocketEvent& evt )
break; break;
default: default:
wxPrintf( wxT( "WinEDA_DrawFrame::OnSockRequest() error: Invalid event !" ) ); wxPrintf( wxT( "EDA_DRAW_FRAME::OnSockRequest() error: Invalid event !" ) );
break; break;
} }
} }
...@@ -88,7 +88,7 @@ void WinEDA_DrawFrame::OnSockRequest( wxSocketEvent& evt ) ...@@ -88,7 +88,7 @@ void WinEDA_DrawFrame::OnSockRequest( wxSocketEvent& evt )
/* Function called when a connection is requested by a client. /* Function called when a connection is requested by a client.
*/ */
void WinEDA_DrawFrame::OnSockRequestServer( wxSocketEvent& evt ) void EDA_DRAW_FRAME::OnSockRequestServer( wxSocketEvent& evt )
{ {
wxSocketBase* sock2; wxSocketBase* sock2;
wxSocketServer* server = (wxSocketServer*) evt.GetSocket(); wxSocketServer* server = (wxSocketServer*) evt.GetSocket();
......
...@@ -327,7 +327,7 @@ int ReturnKeyCodeFromKeyName( const wxString& keyname ) ...@@ -327,7 +327,7 @@ int ReturnKeyCodeFromKeyName( const wxString& keyname )
* Displays the current hotkey list * Displays the current hotkey list
* aList = a Ki_HotkeyInfoSectionDescriptor list(Null terminated) * aList = a Ki_HotkeyInfoSectionDescriptor list(Null terminated)
*/ */
void DisplayHotkeyList( WinEDA_DrawFrame* aFrame, void DisplayHotkeyList( EDA_DRAW_FRAME* aFrame,
struct Ki_HotkeyInfoSectionDescriptor* aDescList ) struct Ki_HotkeyInfoSectionDescriptor* aDescList )
{ {
wxString keyname; wxString keyname;
...@@ -382,7 +382,7 @@ Ki_HotkeyInfo* GetDescriptorFromHotkey( int aKey, Ki_HotkeyInfo** aList ) ...@@ -382,7 +382,7 @@ Ki_HotkeyInfo* GetDescriptorFromHotkey( int aKey, Ki_HotkeyInfo** aList )
* the output format is: shortcut "key" "function" * the output format is: shortcut "key" "function"
* lines starting with # are comments * lines starting with # are comments
*/ */
int WinEDA_BasicFrame::WriteHotkeyConfig( struct Ki_HotkeyInfoSectionDescriptor* aDescList, int EDA_BASE_FRAME::WriteHotkeyConfig( struct Ki_HotkeyInfoSectionDescriptor* aDescList,
wxString* aFullFileName ) wxString* aFullFileName )
{ {
wxString msg; wxString msg;
...@@ -446,8 +446,7 @@ int WinEDA_BasicFrame::WriteHotkeyConfig( struct Ki_HotkeyInfoSectionDescriptor* ...@@ -446,8 +446,7 @@ int WinEDA_BasicFrame::WriteHotkeyConfig( struct Ki_HotkeyInfoSectionDescriptor*
* @param aFilename = file name to read. * @param aFilename = file name to read.
* @param aDescList = current hotkey list descr. to initialise. * @param aDescList = current hotkey list descr. to initialise.
*/ */
int WinEDA_BasicFrame::ReadHotkeyConfigFile( int EDA_BASE_FRAME::ReadHotkeyConfigFile( const wxString& aFilename,
const wxString& aFilename,
struct Ki_HotkeyInfoSectionDescriptor* aDescList ) struct Ki_HotkeyInfoSectionDescriptor* aDescList )
{ {
wxFile cfgfile( aFilename ); wxFile cfgfile( aFilename );
...@@ -493,7 +492,7 @@ void ReadHotkeyConfig( const wxString& Appname, ...@@ -493,7 +492,7 @@ void ReadHotkeyConfig( const wxString& Appname,
* Read configuration data and fill the current hotkey list with hotkeys * Read configuration data and fill the current hotkey list with hotkeys
* aDescList is the current hotkey list descr. to initialise. * aDescList is the current hotkey list descr. to initialise.
*/ */
int WinEDA_BasicFrame::ReadHotkeyConfig( struct Ki_HotkeyInfoSectionDescriptor* aDescList ) int EDA_BASE_FRAME::ReadHotkeyConfig( struct Ki_HotkeyInfoSectionDescriptor* aDescList )
{ {
::ReadHotkeyConfig( m_FrameName, aDescList ); ::ReadHotkeyConfig( m_FrameName, aDescList );
return 1; return 1;
...@@ -575,8 +574,7 @@ void ParseHotkeyConfig( ...@@ -575,8 +574,7 @@ void ParseHotkeyConfig(
* Prompt the user for an old hotkey file to read, and read it. * Prompt the user for an old hotkey file to read, and read it.
* @param aDescList = current hotkey list descr. to initialise. * @param aDescList = current hotkey list descr. to initialise.
*/ */
void WinEDA_BasicFrame::ImportHotkeyConfigFromFile( void EDA_BASE_FRAME::ImportHotkeyConfigFromFile( struct Ki_HotkeyInfoSectionDescriptor* aDescList )
struct Ki_HotkeyInfoSectionDescriptor* aDescList )
{ {
wxString ext = DEFAULT_HOTKEY_FILENAME_EXT; wxString ext = DEFAULT_HOTKEY_FILENAME_EXT;
wxString mask = wxT( "*." ) + ext; wxString mask = wxT( "*." ) + ext;
...@@ -604,8 +602,7 @@ void WinEDA_BasicFrame::ImportHotkeyConfigFromFile( ...@@ -604,8 +602,7 @@ void WinEDA_BasicFrame::ImportHotkeyConfigFromFile(
* Prompt the user for an old hotkey file to read, and read it. * Prompt the user for an old hotkey file to read, and read it.
* @param aDescList = current hotkey list descr. to initialise. * @param aDescList = current hotkey list descr. to initialise.
*/ */
void WinEDA_BasicFrame::ExportHotkeyConfigToFile( void EDA_BASE_FRAME::ExportHotkeyConfigToFile( struct Ki_HotkeyInfoSectionDescriptor* aDescList )
struct Ki_HotkeyInfoSectionDescriptor* aDescList )
{ {
wxString ext = DEFAULT_HOTKEY_FILENAME_EXT; wxString ext = DEFAULT_HOTKEY_FILENAME_EXT;
wxString mask = wxT( "*." ) + ext; wxString mask = wxT( "*." ) + ext;
......
...@@ -17,7 +17,7 @@ BEGIN_EVENT_TABLE( WinEDA_MsgPanel, wxPanel ) ...@@ -17,7 +17,7 @@ BEGIN_EVENT_TABLE( WinEDA_MsgPanel, wxPanel )
END_EVENT_TABLE() END_EVENT_TABLE()
WinEDA_MsgPanel::WinEDA_MsgPanel( WinEDA_DrawFrame* parent, int id, WinEDA_MsgPanel::WinEDA_MsgPanel( EDA_DRAW_FRAME* parent, int id,
const wxPoint& pos, const wxSize& size ) : const wxPoint& pos, const wxSize& size ) :
wxPanel( parent, id, pos, size ) wxPanel( parent, id, pos, size )
{ {
......
...@@ -928,8 +928,7 @@ Ki_WorkSheetData WS_Segm5_LT = ...@@ -928,8 +928,7 @@ Ki_WorkSheetData WS_Segm5_LT =
/* Draw the page reference sheet. /* Draw the page reference sheet.
*/ */
void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_width )
int line_width )
{ {
if( !m_Draw_Sheet_Ref ) if( !m_Draw_Sheet_Ref )
return; return;
...@@ -958,7 +957,7 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, ...@@ -958,7 +957,7 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen,
if( Sheet == NULL ) if( Sheet == NULL )
{ {
DisplayError( this, DisplayError( this,
wxT( "WinEDA_DrawFrame::TraceWorkSheet() error: NULL Sheet" ) ); wxT( "EDA_DRAW_FRAME::TraceWorkSheet() error: NULL Sheet" ) );
return; return;
} }
...@@ -1527,8 +1526,7 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, ...@@ -1527,8 +1526,7 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen,
* @param aPosition = position to identify by YX ref * @param aPosition = position to identify by YX ref
* @return a wxString containing the message locator like A3 or B6 (or ?? if out of page limits) * @return a wxString containing the message locator like A3 or B6 (or ?? if out of page limits)
*/ */
wxString WinEDA_DrawFrame::GetXYSheetReferences( BASE_SCREEN* aScreen, wxString EDA_DRAW_FRAME::GetXYSheetReferences( BASE_SCREEN* aScreen, const wxPoint& aPosition )
const wxPoint& aPosition )
{ {
Ki_PageDescr* Sheet = aScreen->m_CurrentSheetDesc; Ki_PageDescr* Sheet = aScreen->m_CurrentSheetDesc;
int ii, xg, yg, ipas, gxpas, gypas; int ii, xg, yg, ipas, gxpas, gypas;
...@@ -1538,7 +1536,7 @@ wxString WinEDA_DrawFrame::GetXYSheetReferences( BASE_SCREEN* aScreen, ...@@ -1538,7 +1536,7 @@ wxString WinEDA_DrawFrame::GetXYSheetReferences( BASE_SCREEN* aScreen,
if( Sheet == NULL ) if( Sheet == NULL )
{ {
DisplayError( this, DisplayError( this,
wxT( "WinEDA_DrawFrame::GetXYSheetReferences() error: NULL Sheet" ) ); wxT( "EDA_DRAW_FRAME::GetXYSheetReferences() error: NULL Sheet" ) );
return msg; return msg;
} }
...@@ -1574,7 +1572,7 @@ wxString WinEDA_DrawFrame::GetXYSheetReferences( BASE_SCREEN* aScreen, ...@@ -1574,7 +1572,7 @@ wxString WinEDA_DrawFrame::GetXYSheetReferences( BASE_SCREEN* aScreen,
} }
wxString WinEDA_DrawFrame::GetScreenDesc() wxString EDA_DRAW_FRAME::GetScreenDesc()
{ {
wxString msg; wxString msg;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
* *
* Note: Mac OS ** does not ** allow moving mouse cursor by program. * Note: Mac OS ** does not ** allow moving mouse cursor by program.
*/ */
void WinEDA_DrawFrame::Recadre_Trace( bool ToMouse ) void EDA_DRAW_FRAME::Recadre_Trace( bool ToMouse )
{ {
PutOnGrid( &(GetBaseScreen()->m_Curseur) ); PutOnGrid( &(GetBaseScreen()->m_Curseur) );
AdjustScrollBars(); AdjustScrollBars();
...@@ -52,7 +52,7 @@ void WinEDA_DrawFrame::Recadre_Trace( bool ToMouse ) ...@@ -52,7 +52,7 @@ void WinEDA_DrawFrame::Recadre_Trace( bool ToMouse )
* @param aCoord = coordinate to adjust * @param aCoord = coordinate to adjust
* @param aGridSize = pointer to a grid value. if NULL uses the current grid size * @param aGridSize = pointer to a grid value. if NULL uses the current grid size
*/ */
void WinEDA_DrawFrame::PutOnGrid( wxPoint* aCoord , wxRealPoint* aGridSize ) void EDA_DRAW_FRAME::PutOnGrid( wxPoint* aCoord , wxRealPoint* aGridSize )
{ {
wxRealPoint grid_size; wxRealPoint grid_size;
if( aGridSize ) if( aGridSize )
...@@ -74,7 +74,7 @@ void WinEDA_DrawFrame::PutOnGrid( wxPoint* aCoord , wxRealPoint* aGridSize ) ...@@ -74,7 +74,7 @@ void WinEDA_DrawFrame::PutOnGrid( wxPoint* aCoord , wxRealPoint* aGridSize )
/** Redraw the screen with best zoom level and the best centering /** Redraw the screen with best zoom level and the best centering
* that shows all the page or the board * that shows all the page or the board
*/ */
void WinEDA_DrawFrame::Zoom_Automatique( bool move_mouse_cursor ) void EDA_DRAW_FRAME::Zoom_Automatique( bool move_mouse_cursor )
{ {
GetBaseScreen()->SetZoom( BestZoom() ); // Set the best zoom GetBaseScreen()->SetZoom( BestZoom() ); // Set the best zoom
Recadre_Trace( move_mouse_cursor ); // Set the best centering and refresh the screen Recadre_Trace( move_mouse_cursor ); // Set the best centering and refresh the screen
...@@ -85,7 +85,7 @@ void WinEDA_DrawFrame::Zoom_Automatique( bool move_mouse_cursor ) ...@@ -85,7 +85,7 @@ void WinEDA_DrawFrame::Zoom_Automatique( bool move_mouse_cursor )
* selected area (Rect) in full window screen * selected area (Rect) in full window screen
* @param Rect = selected area to show after zooming * @param Rect = selected area to show after zooming
*/ */
void WinEDA_DrawFrame::Window_Zoom( EDA_Rect& Rect ) void EDA_DRAW_FRAME::Window_Zoom( EDA_Rect& Rect )
{ {
double scalex, bestscale; double scalex, bestscale;
wxSize size; wxSize size;
...@@ -109,7 +109,7 @@ void WinEDA_DrawFrame::Window_Zoom( EDA_Rect& Rect ) ...@@ -109,7 +109,7 @@ void WinEDA_DrawFrame::Window_Zoom( EDA_Rect& Rect )
* Function OnZoom * Function OnZoom
* Called from any zoom event (toolbar , hotkey or popup ) * Called from any zoom event (toolbar , hotkey or popup )
*/ */
void WinEDA_DrawFrame::OnZoom( wxCommandEvent& event ) void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event )
{ {
if( DrawPanel == NULL ) if( DrawPanel == NULL )
return; return;
...@@ -184,7 +184,7 @@ void WinEDA_DrawFrame::OnZoom( wxCommandEvent& event ) ...@@ -184,7 +184,7 @@ void WinEDA_DrawFrame::OnZoom( wxCommandEvent& event )
/* add the zoom list menu the the MasterMenu. /* add the zoom list menu the the MasterMenu.
* used in OnRightClick(wxMouseEvent& event) * used in OnRightClick(wxMouseEvent& event)
*/ */
void WinEDA_DrawFrame::AddMenuZoomAndGrid( wxMenu* MasterMenu ) void EDA_DRAW_FRAME::AddMenuZoomAndGrid( wxMenu* MasterMenu )
{ {
int maxZoomIds; int maxZoomIds;
int zoom; int zoom;
......
...@@ -29,7 +29,7 @@ static const wxString KeepCvpcbOpenEntry( wxT( "KeepCvpcbOpen" ) ); ...@@ -29,7 +29,7 @@ static const wxString KeepCvpcbOpenEntry( wxT( "KeepCvpcbOpen" ) );
static const wxString FootprintDocFileEntry( wxT( "footprints_doc_file" ) ); static const wxString FootprintDocFileEntry( wxT( "footprints_doc_file" ) );
BEGIN_EVENT_TABLE( WinEDA_CvpcbFrame, WinEDA_BasicFrame ) BEGIN_EVENT_TABLE( WinEDA_CvpcbFrame, EDA_BASE_FRAME )
EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, WinEDA_CvpcbFrame::LoadNetList ) EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, WinEDA_CvpcbFrame::LoadNetList )
// Menu events // Menu events
...@@ -99,10 +99,8 @@ BEGIN_EVENT_TABLE( WinEDA_CvpcbFrame, WinEDA_BasicFrame ) ...@@ -99,10 +99,8 @@ BEGIN_EVENT_TABLE( WinEDA_CvpcbFrame, WinEDA_BasicFrame )
WinEDA_CvpcbFrame::OnUpdateKeepOpenOnSave ) WinEDA_CvpcbFrame::OnUpdateKeepOpenOnSave )
END_EVENT_TABLE() END_EVENT_TABLE()
WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title, WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title, long style ) :
long style ) : EDA_BASE_FRAME( NULL, CVPCB_FRAME, title, wxDefaultPosition, wxDefaultSize, style )
WinEDA_BasicFrame( NULL, CVPCB_FRAME, title, wxDefaultPosition,
wxDefaultSize, style )
{ {
m_FrameName = wxT( "CvpcbFrame" ); m_FrameName = wxT( "CvpcbFrame" );
...@@ -213,7 +211,7 @@ void WinEDA_CvpcbFrame::LoadSettings() ...@@ -213,7 +211,7 @@ void WinEDA_CvpcbFrame::LoadSettings()
wxConfig* cfg = wxGetApp().m_EDA_Config; wxConfig* cfg = wxGetApp().m_EDA_Config;
WinEDA_BasicFrame::LoadSettings(); EDA_BASE_FRAME::LoadSettings();
cfg->Read( KeepCvpcbOpenEntry, &m_KeepCvpcbOpen, false ); cfg->Read( KeepCvpcbOpenEntry, &m_KeepCvpcbOpen, false );
cfg->Read( FootprintDocFileEntry, &m_DocModulesFileName, cfg->Read( FootprintDocFileEntry, &m_DocModulesFileName,
DEFAULT_FOOTPRINTS_LIST_FILENAME ); DEFAULT_FOOTPRINTS_LIST_FILENAME );
...@@ -232,7 +230,7 @@ void WinEDA_CvpcbFrame::SaveSettings() ...@@ -232,7 +230,7 @@ void WinEDA_CvpcbFrame::SaveSettings()
wxConfig* cfg = wxGetApp().m_EDA_Config; wxConfig* cfg = wxGetApp().m_EDA_Config;
WinEDA_BasicFrame::SaveSettings(); EDA_BASE_FRAME::SaveSettings();
cfg->Write( KeepCvpcbOpenEntry, m_KeepCvpcbOpen ); cfg->Write( KeepCvpcbOpenEntry, m_KeepCvpcbOpen );
cfg->Write( FootprintDocFileEntry, m_DocModulesFileName ); cfg->Write( FootprintDocFileEntry, m_DocModulesFileName );
} }
...@@ -503,7 +501,7 @@ void WinEDA_CvpcbFrame::DisplayModule( wxCommandEvent& event ) ...@@ -503,7 +501,7 @@ void WinEDA_CvpcbFrame::DisplayModule( wxCommandEvent& event )
*/ */
void WinEDA_CvpcbFrame::SetLanguage( wxCommandEvent& event ) void WinEDA_CvpcbFrame::SetLanguage( wxCommandEvent& event )
{ {
WinEDA_BasicFrame::SetLanguage( event ); EDA_BASE_FRAME::SetLanguage( event );
} }
......
...@@ -20,7 +20,7 @@ class DISPLAY_FOOTPRINTS_FRAME; ...@@ -20,7 +20,7 @@ class DISPLAY_FOOTPRINTS_FRAME;
/** /**
* The CVPcb application main window. * The CVPcb application main window.
*/ */
class WinEDA_CvpcbFrame : public WinEDA_BasicFrame class WinEDA_CvpcbFrame : public EDA_BASE_FRAME
{ {
public: public:
......
...@@ -108,7 +108,7 @@ void DISPLAY_FOOTPRINTS_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg ) ...@@ -108,7 +108,7 @@ void DISPLAY_FOOTPRINTS_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
/* /*
* Redraw the BOARD items but not cursors, axis or grid. * Redraw the BOARD items but not cursors, axis or grid.
*/ */
void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode, const wxPoint& aOffset ) void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoint& aOffset )
{ {
if( m_Modules ) if( m_Modules )
{ {
......
...@@ -18,7 +18,6 @@ set(EESCHEMA_SRCS ...@@ -18,7 +18,6 @@ set(EESCHEMA_SRCS
class_libentry.cpp class_libentry.cpp
class_library.cpp class_library.cpp
class_netlist_object.cpp class_netlist_object.cpp
cleanup.cpp
cmp_library_keywords.cpp cmp_library_keywords.cpp
cmp_library_lexer.cpp cmp_library_lexer.cpp
component_references_lister.cpp component_references_lister.cpp
......
...@@ -33,12 +33,12 @@ extern void MoveItemsInList( PICKED_ITEMS_LIST& aItemsList, const wxPoint aMoveV ...@@ -33,12 +33,12 @@ extern void MoveItemsInList( PICKED_ITEMS_LIST& aItemsList, const wxPoint aMoveV
extern void RotateListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& Center ); extern void RotateListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& Center );
extern void Mirror_X_ListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& aMirrorPoint ); extern void Mirror_X_ListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& aMirrorPoint );
extern void MirrorListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& Center ); extern void MirrorListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& Center );
extern void DeleteItemsInList( WinEDA_DrawPanel* panel, PICKED_ITEMS_LIST& aItemsList ); extern void DeleteItemsInList( EDA_DRAW_PANEL* panel, PICKED_ITEMS_LIST& aItemsList );
extern void DuplicateItemsInList( SCH_SCREEN* screen, extern void DuplicateItemsInList( SCH_SCREEN* screen,
PICKED_ITEMS_LIST& aItemsList, PICKED_ITEMS_LIST& aItemsList,
const wxPoint aMoveVector ); const wxPoint aMoveVector );
static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase );
/* Return the block command (BLOCK_MOVE, BLOCK_COPY...) corresponding to /* Return the block command (BLOCK_MOVE, BLOCK_COPY...) corresponding to
...@@ -178,7 +178,7 @@ void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC ) ...@@ -178,7 +178,7 @@ void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
block->m_Command = BLOCK_IDLE; block->m_Command = BLOCK_IDLE;
GetScreen()->SetCurItem( NULL ); GetScreen()->SetCurItem( NULL );
TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); GetScreen()->TestDanglingEnds( DrawPanel, DC );
if( block->GetCount() ) if( block->GetCount() )
{ {
...@@ -234,7 +234,7 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) ...@@ -234,7 +234,7 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
break; break;
case BLOCK_DRAG: /* Drag */ case BLOCK_DRAG: /* Drag */
BreakSegmentOnJunction( GetScreen() ); GetScreen()->BreakSegmentsOnJunctions();
// fall through // fall through
case BLOCK_ROTATE: case BLOCK_ROTATE:
case BLOCK_MIRROR_X: case BLOCK_MIRROR_X:
...@@ -272,7 +272,7 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) ...@@ -272,7 +272,7 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
} }
block->ClearItemsList(); block->ClearItemsList();
TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); GetScreen()->TestDanglingEnds( DrawPanel, DC );
DrawPanel->Refresh(); DrawPanel->Refresh();
break; break;
...@@ -373,8 +373,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC ) ...@@ -373,8 +373,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
// Clear list of items to move, and rebuild it with items to drag: // Clear list of items to move, and rebuild it with items to drag:
block->ClearItemsList(); block->ClearItemsList();
BreakSegmentOnJunction( GetScreen() ); GetScreen()->BreakSegmentsOnJunctions();
GetScreen()->UpdatePickList(); GetScreen()->UpdatePickList();
if( block->GetCount() ) if( block->GetCount() )
...@@ -399,7 +398,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC ) ...@@ -399,7 +398,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
OnModify(); OnModify();
} }
TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); GetScreen()->TestDanglingEnds( DrawPanel, DC );
DrawPanel->Refresh(); DrawPanel->Refresh();
break; break;
...@@ -435,7 +434,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC ) ...@@ -435,7 +434,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
OnModify(); OnModify();
} }
TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); GetScreen()->TestDanglingEnds( DrawPanel, DC );
DrawPanel->Refresh(); DrawPanel->Refresh();
break; break;
...@@ -452,7 +451,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC ) ...@@ -452,7 +451,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
Mirror_X_ListOfItems( block->m_ItemsSelection, mirrorPoint ); Mirror_X_ListOfItems( block->m_ItemsSelection, mirrorPoint );
OnModify(); OnModify();
} }
TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); GetScreen()->TestDanglingEnds( DrawPanel, DC );
DrawPanel->Refresh(); DrawPanel->Refresh();
break; break;
...@@ -470,7 +469,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC ) ...@@ -470,7 +469,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
OnModify(); OnModify();
} }
TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); GetScreen()->TestDanglingEnds( DrawPanel, DC );
DrawPanel->Refresh(); DrawPanel->Refresh();
break; break;
...@@ -495,7 +494,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC ) ...@@ -495,7 +494,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
/* Traces the outline of the search block structures /* Traces the outline of the search block structures
* The entire block follows the cursor * The entire block follows the cursor
*/ */
static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase )
{ {
BLOCK_SELECTOR* block = &panel->GetScreen()->m_BlockLocate;; BLOCK_SELECTOR* block = &panel->GetScreen()->m_BlockLocate;;
BASE_SCREEN* screen = panel->GetScreen(); BASE_SCREEN* screen = panel->GetScreen();
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "libeditframe.h" #include "libeditframe.h"
static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase );
/* /*
...@@ -274,7 +274,7 @@ void LIB_EDIT_FRAME::HandleBlockPlace( wxDC* DC ) ...@@ -274,7 +274,7 @@ void LIB_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
* Traces the outline of the search block structures * Traces the outline of the search block structures
* The entire block follows the cursor * The entire block follows the cursor
*/ */
void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) void DrawMovingBlockOutlines( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase )
{ {
BLOCK_SELECTOR* PtBlock; BLOCK_SELECTOR* PtBlock;
BASE_SCREEN* screen = panel->GetScreen(); BASE_SCREEN* screen = panel->GetScreen();
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
/* Routines Locales */ /* Routines Locales */
static void Show_Polyline_in_Ghost( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); static void Show_Polyline_in_Ghost( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase );
static void AbortCreateNewLine( WinEDA_DrawPanel* Panel, wxDC* DC ); static void AbortCreateNewLine( EDA_DRAW_PANEL* Panel, wxDC* DC );
static bool IsTerminalPoint( SCH_SCREEN* screen, const wxPoint& pos, int layer ); static bool IsTerminalPoint( SCH_SCREEN* screen, const wxPoint& pos, int layer );
static bool IsJunctionNeeded( SCH_EDIT_FRAME* frame, wxPoint& pos ); static bool IsJunctionNeeded( SCH_EDIT_FRAME* frame, wxPoint& pos );
static void ComputeBreakPoint( SCH_LINE* segment, const wxPoint& new_pos ); static void ComputeBreakPoint( SCH_LINE* segment, const wxPoint& new_pos );
...@@ -73,7 +73,7 @@ static void RestoreOldWires( SCH_SCREEN* screen ) ...@@ -73,7 +73,7 @@ static void RestoreOldWires( SCH_SCREEN* screen )
/** /**
* Mouse capture callback for drawing line segments. * Mouse capture callback for drawing line segments.
*/ */
static void DrawSegment( WinEDA_DrawPanel* aPanel, wxDC* aDC, bool aErase ) static void DrawSegment( EDA_DRAW_PANEL* aPanel, wxDC* aDC, bool aErase )
{ {
SCH_LINE* CurrentLine = (SCH_LINE*) aPanel->GetScreen()->GetCurItem(); SCH_LINE* CurrentLine = (SCH_LINE*) aPanel->GetScreen()->GetCurItem();
SCH_LINE* segment; SCH_LINE* segment;
...@@ -150,7 +150,7 @@ void SCH_EDIT_FRAME::BeginSegment( wxDC* DC, int type ) ...@@ -150,7 +150,7 @@ void SCH_EDIT_FRAME::BeginSegment( wxDC* DC, int type )
{ {
s_ConnexionStartPoint = cursorpos; s_ConnexionStartPoint = cursorpos;
s_OldWiresList = GetScreen()->ExtractWires( TRUE ); s_OldWiresList = GetScreen()->ExtractWires( TRUE );
GetScreen()->SchematicCleanUp( NULL ); GetScreen()->SchematicCleanUp( DrawPanel );
switch( type ) switch( type )
{ {
...@@ -322,7 +322,7 @@ void SCH_EDIT_FRAME::EndSegment( wxDC* DC ) ...@@ -322,7 +322,7 @@ void SCH_EDIT_FRAME::EndSegment( wxDC* DC )
alt_end_point = lastsegment->m_Start; alt_end_point = lastsegment->m_Start;
} }
GetScreen()->SchematicCleanUp( NULL ); GetScreen()->SchematicCleanUp( DrawPanel );
/* clear flags and find last segment entered, for repeat function */ /* clear flags and find last segment entered, for repeat function */
segment = (SCH_LINE*) GetScreen()->GetDrawItems(); segment = (SCH_LINE*) GetScreen()->GetDrawItems();
...@@ -353,7 +353,7 @@ void SCH_EDIT_FRAME::EndSegment( wxDC* DC ) ...@@ -353,7 +353,7 @@ void SCH_EDIT_FRAME::EndSegment( wxDC* DC )
if( IsJunctionNeeded( this, s_ConnexionStartPoint ) ) if( IsJunctionNeeded( this, s_ConnexionStartPoint ) )
CreateNewJunctionStruct( DC, s_ConnexionStartPoint ); CreateNewJunctionStruct( DC, s_ConnexionStartPoint );
TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); GetScreen()->TestDanglingEnds( DrawPanel, DC );
/* Redraw wires and junctions which can be changed by TestDanglingEnds() */ /* Redraw wires and junctions which can be changed by TestDanglingEnds() */
DrawPanel->CursorOff( DC ); // Erase schematic cursor DrawPanel->CursorOff( DC ); // Erase schematic cursor
...@@ -432,7 +432,7 @@ static void ComputeBreakPoint( SCH_LINE* segment, const wxPoint& new_pos ) ...@@ -432,7 +432,7 @@ static void ComputeBreakPoint( SCH_LINE* segment, const wxPoint& new_pos )
/* Drawing Polyline phantom at the displacement of the cursor /* Drawing Polyline phantom at the displacement of the cursor
*/ */
static void Show_Polyline_in_Ghost( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) static void Show_Polyline_in_Ghost( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase )
{ {
SCH_POLYLINE* NewPoly = (SCH_POLYLINE*) panel->GetScreen()->GetCurItem(); SCH_POLYLINE* NewPoly = (SCH_POLYLINE*) panel->GetScreen()->GetCurItem();
int color; int color;
...@@ -541,7 +541,7 @@ SCH_NO_CONNECT* SCH_EDIT_FRAME::CreateNewNoConnectStruct( wxDC* DC ) ...@@ -541,7 +541,7 @@ SCH_NO_CONNECT* SCH_EDIT_FRAME::CreateNewNoConnectStruct( wxDC* DC )
/* Abort function for wire, bus or line creation /* Abort function for wire, bus or line creation
*/ */
static void AbortCreateNewLine( WinEDA_DrawPanel* Panel, wxDC* DC ) static void AbortCreateNewLine( EDA_DRAW_PANEL* Panel, wxDC* DC )
{ {
SCH_SCREEN* Screen = (SCH_SCREEN*) Panel->GetScreen(); SCH_SCREEN* Screen = (SCH_SCREEN*) Panel->GetScreen();
...@@ -608,7 +608,7 @@ void SCH_EDIT_FRAME::RepeatDrawItem( wxDC* DC ) ...@@ -608,7 +608,7 @@ void SCH_EDIT_FRAME::RepeatDrawItem( wxDC* DC )
{ {
m_itemToRepeat->SetNext( GetScreen()->GetDrawItems() ); m_itemToRepeat->SetNext( GetScreen()->GetDrawItems() );
GetScreen()->SetDrawItems( m_itemToRepeat ); GetScreen()->SetDrawItems( m_itemToRepeat );
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); GetScreen()->TestDanglingEnds();
m_itemToRepeat->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); m_itemToRepeat->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
SaveCopyInUndoList( m_itemToRepeat, UR_NEW ); SaveCopyInUndoList( m_itemToRepeat, UR_NEW );
m_itemToRepeat->m_Flags = 0; m_itemToRepeat->m_Flags = 0;
......
...@@ -20,7 +20,7 @@ static int s_LastShape = '\\'; ...@@ -20,7 +20,7 @@ static int s_LastShape = '\\';
static wxPoint ItemInitialPosition; static wxPoint ItemInitialPosition;
static void ExitBusEntry( WinEDA_DrawPanel* Panel, wxDC* DC ) static void ExitBusEntry( EDA_DRAW_PANEL* Panel, wxDC* DC )
{ {
/* Exit bus entry mode. */ /* Exit bus entry mode. */
SCH_BUS_ENTRY* BusEntry = (SCH_BUS_ENTRY*) Panel->GetScreen()->GetCurItem(); SCH_BUS_ENTRY* BusEntry = (SCH_BUS_ENTRY*) Panel->GetScreen()->GetCurItem();
...@@ -50,7 +50,7 @@ static void ExitBusEntry( WinEDA_DrawPanel* Panel, wxDC* DC ) ...@@ -50,7 +50,7 @@ static void ExitBusEntry( WinEDA_DrawPanel* Panel, wxDC* DC )
} }
static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) static void ShowWhileMoving( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase )
{ {
// Draws the bus entry while moving the cursor // Draws the bus entry while moving the cursor
BASE_SCREEN* screen = panel->GetScreen(); BASE_SCREEN* screen = panel->GetScreen();
...@@ -139,7 +139,7 @@ void SCH_EDIT_FRAME::SetBusEntryShape( wxDC* DC, SCH_BUS_ENTRY* BusEntry, int en ...@@ -139,7 +139,7 @@ void SCH_EDIT_FRAME::SetBusEntryShape( wxDC* DC, SCH_BUS_ENTRY* BusEntry, int en
break; break;
} }
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); GetScreen()->TestDanglingEnds();
BusEntry->Draw( DrawPanel, DC, wxPoint( 0, 0 ), g_XorMode ); BusEntry->Draw( DrawPanel, DC, wxPoint( 0, 0 ), g_XorMode );
OnModify( ); OnModify( );
} }
......
...@@ -278,7 +278,7 @@ void LIB_COMPONENT::SetName( const wxString& aName ) ...@@ -278,7 +278,7 @@ void LIB_COMPONENT::SetName( const wxString& aName )
} }
void LIB_COMPONENT::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDc, const wxPoint& aOffset, int aMulti, void LIB_COMPONENT::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDc, const wxPoint& aOffset, int aMulti,
int aConvert, int aDrawMode, int aColor, const TRANSFORM& aTransform, int aConvert, int aDrawMode, int aColor, const TRANSFORM& aTransform,
bool aShowPinText, bool aDrawFields, bool aOnlySelected ) bool aShowPinText, bool aDrawFields, bool aOnlySelected )
{ {
...@@ -407,7 +407,7 @@ void LIB_COMPONENT::Plot( PLOTTER* aPlotter, int aUnit, int aConvert, ...@@ -407,7 +407,7 @@ void LIB_COMPONENT::Plot( PLOTTER* aPlotter, int aUnit, int aConvert,
} }
void LIB_COMPONENT::RemoveDrawItem( LIB_DRAW_ITEM* aItem, WinEDA_DrawPanel* aPanel, wxDC* aDc ) void LIB_COMPONENT::RemoveDrawItem( LIB_DRAW_ITEM* aItem, EDA_DRAW_PANEL* aPanel, wxDC* aDc )
{ {
wxASSERT( aItem != NULL ); wxASSERT( aItem != NULL );
......
...@@ -330,7 +330,7 @@ public: ...@@ -330,7 +330,7 @@ public:
* @param aOnlySelected - Draws only the body items that are selected. * @param aOnlySelected - Draws only the body items that are selected.
* Used for block move redraws. * Used for block move redraws.
*/ */
void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDc, const wxPoint& aOffset, void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDc, const wxPoint& aOffset,
int aMulti, int aConvert, int aDrawMode, int aColor = -1, int aMulti, int aConvert, int aDrawMode, int aColor = -1,
const TRANSFORM& aTransform = DefaultTransform, const TRANSFORM& aTransform = DefaultTransform,
bool aShowPinText = true, bool aDrawFields = true, bool aShowPinText = true, bool aDrawFields = true,
...@@ -362,7 +362,7 @@ public: ...@@ -362,7 +362,7 @@ public:
* @param aPanel - Panel to remove part from. * @param aPanel - Panel to remove part from.
* @param aDc - Device context 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, EDA_DRAW_PANEL* aPanel = NULL, wxDC* aDc = NULL );
/** /**
* Return the next draw object pointer. * Return the next draw object pointer.
......
/**************************************/
/* Code to handle schematic clean up. */
/**************************************/
#include "fctsys.h"
#include "common.h"
#include "trigo.h"
#include "confirm.h"
#include "macros.h"
#include "class_sch_screen.h"
#include "general.h"
#include "protos.h"
#include "netlist.h"
#include "sch_bus_entry.h"
#include "sch_junction.h"
#include "sch_line.h"
/* Routine to start/end segment (BUS or wires) on junctions.
*/
void BreakSegmentOnJunction( SCH_SCREEN* Screen )
{
SCH_ITEM* DrawList;
if( Screen == NULL )
{
DisplayError( NULL,
wxT( "BreakSegmentOnJunction() error: NULL screen" ) );
return;
}
DrawList = Screen->GetDrawItems();
while( DrawList )
{
switch( DrawList->Type() )
{
case SCH_JUNCTION_T:
#undef STRUCT
#define STRUCT ( (SCH_JUNCTION*) DrawList )
BreakSegment( Screen, STRUCT->m_Pos );
break;
case SCH_BUS_ENTRY_T:
#undef STRUCT
#define STRUCT ( (SCH_BUS_ENTRY*) DrawList )
BreakSegment( Screen, STRUCT->m_Pos );
BreakSegment( Screen, STRUCT->m_End() );
break;
case SCH_LINE_T:
case SCH_NO_CONNECT_T:
case SCH_LABEL_T:
case SCH_GLOBAL_LABEL_T:
case SCH_HIERARCHICAL_LABEL_T:
case SCH_COMPONENT_T:
case SCH_POLYLINE_T:
case SCH_MARKER_T:
case SCH_TEXT_T:
case SCH_SHEET_T:
case SCH_SHEET_LABEL_T:
break;
default:
break;
}
DrawList = DrawList->Next();
}
}
/* Break a segment ( BUS, WIRE ) int 2 segments at location aBreakpoint,
* if aBreakpoint in on segment segment
* ( excluding ends)
* fill aPicklist with modified items if non null
*/
void BreakSegment( SCH_SCREEN* aScreen, wxPoint aBreakpoint )
{
SCH_LINE* segment, * NewSegment;
for( SCH_ITEM* DrawList = aScreen->GetDrawItems(); DrawList; DrawList = DrawList->Next() )
{
if( DrawList->Type() != SCH_LINE_T )
continue;
segment = (SCH_LINE*) DrawList;
if( !TestSegmentHit( aBreakpoint, segment->m_Start, segment->m_End, 0 ) )
continue;
/* A segment is found
* It will be cut if aBreakpoint is not a segment end */
if( ( segment->m_Start == aBreakpoint ) || ( segment->m_End == aBreakpoint ) )
continue;
/* Here we must cut the segment and create a new segment. */
NewSegment = new SCH_LINE( *segment );
NewSegment->m_Start = aBreakpoint;
segment->m_End = NewSegment->m_Start;
NewSegment->SetNext( segment->Next() );
segment->SetNext( NewSegment );
DrawList = NewSegment;
}
}
...@@ -31,22 +31,3 @@ bool SegmentIntersect( wxPoint aSegStart, wxPoint aSegEnd, wxPoint aTestPoint ) ...@@ -31,22 +31,3 @@ bool SegmentIntersect( wxPoint aSegStart, wxPoint aSegEnd, wxPoint aTestPoint )
return true; return true;
} }
void SCH_EDIT_FRAME::TestDanglingEnds( SCH_ITEM* aDrawList, wxDC* aDC )
{
SCH_ITEM* item;
std::vector< DANGLING_END_ITEM > endPoints;
for( item = aDrawList; item != NULL; item = item->Next() )
item->GetEndPoints( endPoints );
for( item = aDrawList; item; item = item->Next() )
{
if( item->IsDanglingStateChanged( endPoints ) && aDC != NULL )
{
item->Draw( DrawPanel, aDC, wxPoint( 0, 0 ), g_XorMode );
item->Draw( DrawPanel, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
}
}
}
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
* Place the name of the component has loaded, select from a list in * Place the name of the component has loaded, select from a list in
* BufName * BufName
*/ */
wxString DataBaseGetName( WinEDA_DrawFrame* frame, wxString& Keys, wxString& BufName ) wxString DataBaseGetName( EDA_DRAW_FRAME* frame, wxString& Keys, wxString& BufName )
{ {
wxArrayString nameList; wxArrayString nameList;
wxString msg; wxString msg;
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
// Imported function: // Imported function:
void DeleteItemsInList( WinEDA_DrawPanel* panel, PICKED_ITEMS_LIST& aItemsList ); void DeleteItemsInList( EDA_DRAW_PANEL* panel, PICKED_ITEMS_LIST& aItemsList );
/* /*
...@@ -85,7 +85,7 @@ void SCH_EDIT_FRAME::DeleteConnection( bool DeleteFullConnection ) ...@@ -85,7 +85,7 @@ void SCH_EDIT_FRAME::DeleteConnection( bool DeleteFullConnection )
/* Clear .m_Flags member for all items */ /* Clear .m_Flags member for all items */
screen->ClearDrawingState(); screen->ClearDrawingState();
BreakSegmentOnJunction( screen ); screen->BreakSegmentsOnJunctions();
/* Locate all the wires, bus or junction under the mouse cursor, and put /* Locate all the wires, bus or junction under the mouse cursor, and put
* them in a list of items to delete * them in a list of items to delete
...@@ -314,7 +314,7 @@ bool LocateAndDeleteItem( SCH_EDIT_FRAME* frame, wxDC* DC ) ...@@ -314,7 +314,7 @@ bool LocateAndDeleteItem( SCH_EDIT_FRAME* frame, wxDC* DC )
{ {
frame->SetRepeatItem( NULL ); frame->SetRepeatItem( NULL );
DeleteStruct( frame->DrawPanel, DC, DelStruct ); DeleteStruct( frame->DrawPanel, DC, DelStruct );
frame->TestDanglingEnds( frame->GetScreen()->GetDrawItems(), DC ); frame->GetScreen()->TestDanglingEnds( frame->DrawPanel, DC );
frame->OnModify( ); frame->OnModify( );
item_deleted = TRUE; item_deleted = TRUE;
} }
......
...@@ -37,7 +37,7 @@ static int s_PlotBlackAndWhite = 0; ...@@ -37,7 +37,7 @@ static int s_PlotBlackAndWhite = 0;
/*! /*!
* DIALOG_SVG_PRINT functions * DIALOG_SVG_PRINT functions
*/ */
DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent ) : DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( EDA_DRAW_FRAME* parent ) :
DIALOG_SVG_PRINT_base( parent ) DIALOG_SVG_PRINT_base( parent )
{ {
m_Parent = parent; m_Parent = parent;
...@@ -174,7 +174,7 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref ) ...@@ -174,7 +174,7 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref )
} }
bool DIALOG_SVG_PRINT::DrawSVGPage( WinEDA_DrawFrame* frame, bool DIALOG_SVG_PRINT::DrawSVGPage( EDA_DRAW_FRAME* frame,
const wxString& FullFileName, const wxString& FullFileName,
SCH_SCREEN* screen, SCH_SCREEN* screen,
bool aPrintBlackAndWhite, bool aPrintBlackAndWhite,
...@@ -195,7 +195,7 @@ bool DIALOG_SVG_PRINT::DrawSVGPage( WinEDA_DrawFrame* frame, ...@@ -195,7 +195,7 @@ bool DIALOG_SVG_PRINT::DrawSVGPage( WinEDA_DrawFrame* frame,
SheetSize = screen->ReturnPageSize(); // page size in 1/1000 inch, ie in internal units SheetSize = screen->ReturnPageSize(); // page size in 1/1000 inch, ie in internal units
screen->SetScalingFactor( 1.0 ); screen->SetScalingFactor( 1.0 );
WinEDA_DrawPanel* panel = frame->DrawPanel; EDA_DRAW_PANEL* panel = frame->DrawPanel;
SetLocaleTo_C_standard(); // Switch the locale to standard C (needed SetLocaleTo_C_standard(); // Switch the locale to standard C (needed
// to print floating point numbers like 1.3) // to print floating point numbers like 1.3)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#define _DIALOG_SVG_PRINT_H_ #define _DIALOG_SVG_PRINT_H_
class WinEDA_DrawFrame; class EDA_DRAW_FRAME;
class BASE_SCREEN; class BASE_SCREEN;
...@@ -13,11 +13,11 @@ class BASE_SCREEN; ...@@ -13,11 +13,11 @@ class BASE_SCREEN;
class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base
{ {
private: private:
WinEDA_DrawFrame* m_Parent; EDA_DRAW_FRAME* m_Parent;
wxConfig* m_Config; wxConfig* m_Config;
public: public:
DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent ); DIALOG_SVG_PRINT( EDA_DRAW_FRAME* parent );
~DIALOG_SVG_PRINT() {} ~DIALOG_SVG_PRINT() {}
private: private:
...@@ -31,7 +31,7 @@ private: ...@@ -31,7 +31,7 @@ private:
void PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref ); void PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref );
public: public:
static bool DrawSVGPage( WinEDA_DrawFrame* frame, static bool DrawSVGPage( EDA_DRAW_FRAME* frame,
const wxString& FullFileName, SCH_SCREEN* screen, const wxString& FullFileName, SCH_SCREEN* screen,
bool aPrintBlackAndWhite = false, bool aPrintBlackAndWhite = false,
bool aPrint_Sheet_Ref = false ); bool aPrint_Sheet_Ref = false );
......
...@@ -89,7 +89,7 @@ static char s_ExportSeparator[] = ("\t;,."); ...@@ -89,7 +89,7 @@ static char s_ExportSeparator[] = ("\t;,.");
*/ */
DIALOG_BUILD_BOM::DIALOG_BUILD_BOM( WinEDA_DrawFrame* parent ) : DIALOG_BUILD_BOM::DIALOG_BUILD_BOM( EDA_DRAW_FRAME* parent ) :
DIALOG_BUILD_BOM_BASE( parent ) DIALOG_BUILD_BOM_BASE( parent )
{ {
m_Config = wxGetApp().m_EDA_Config; m_Config = wxGetApp().m_EDA_Config;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "dialog_build_BOM_base.h" #include "dialog_build_BOM_base.h"
class WinEDA_DrawFrame; class EDA_DRAW_FRAME;
class SCH_COMPONENT; class SCH_COMPONENT;
class wxConfig; class wxConfig;
...@@ -18,7 +18,7 @@ class wxConfig; ...@@ -18,7 +18,7 @@ class wxConfig;
class DIALOG_BUILD_BOM : public DIALOG_BUILD_BOM_BASE class DIALOG_BUILD_BOM : public DIALOG_BUILD_BOM_BASE
{ {
private: private:
WinEDA_DrawFrame* m_Parent; EDA_DRAW_FRAME* m_Parent;
wxConfig* m_Config; wxConfig* m_Config;
wxString m_ListFileName; wxString m_ListFileName;
...@@ -60,7 +60,7 @@ private: ...@@ -60,7 +60,7 @@ private:
bool IsFieldChecked( int aFieldId ); bool IsFieldChecked( int aFieldId );
public: public:
DIALOG_BUILD_BOM( WinEDA_DrawFrame* parent ); DIALOG_BUILD_BOM( EDA_DRAW_FRAME* parent );
// ~DIALOG_BUILD_BOM() {}; // ~DIALOG_BUILD_BOM() {};
}; };
......
...@@ -79,7 +79,7 @@ DIALOG_COLOR_CONFIG::DIALOG_COLOR_CONFIG() ...@@ -79,7 +79,7 @@ DIALOG_COLOR_CONFIG::DIALOG_COLOR_CONFIG()
} }
DIALOG_COLOR_CONFIG::DIALOG_COLOR_CONFIG( WinEDA_DrawFrame* aParent ) DIALOG_COLOR_CONFIG::DIALOG_COLOR_CONFIG( EDA_DRAW_FRAME* aParent )
{ {
m_Parent = aParent; m_Parent = aParent;
Init(); Init();
......
...@@ -41,7 +41,7 @@ class DIALOG_COLOR_CONFIG: public wxDialog ...@@ -41,7 +41,7 @@ class DIALOG_COLOR_CONFIG: public wxDialog
private: private:
DECLARE_DYNAMIC_CLASS( DIALOG_COLOR_CONFIG ) DECLARE_DYNAMIC_CLASS( DIALOG_COLOR_CONFIG )
WinEDA_DrawFrame* m_Parent; EDA_DRAW_FRAME* m_Parent;
wxBoxSizer* OuterBoxSizer; wxBoxSizer* OuterBoxSizer;
wxBoxSizer* MainBoxSizer; wxBoxSizer* MainBoxSizer;
wxBoxSizer* ColumnBoxSizer; wxBoxSizer* ColumnBoxSizer;
...@@ -79,7 +79,7 @@ private: ...@@ -79,7 +79,7 @@ private:
public: public:
// Constructors and destructor // Constructors and destructor
DIALOG_COLOR_CONFIG(); DIALOG_COLOR_CONFIG();
DIALOG_COLOR_CONFIG( WinEDA_DrawFrame* aParent ); DIALOG_COLOR_CONFIG( EDA_DRAW_FRAME* aParent );
~DIALOG_COLOR_CONFIG(); ~DIALOG_COLOR_CONFIG();
}; };
......
...@@ -268,9 +268,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnOKButtonClick( wxCommandEvent& event ...@@ -268,9 +268,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnOKButtonClick( wxCommandEvent& event
m_Cmp->SetRef( m_Parent->GetSheet(), m_FieldsBuf[REFERENCE].m_Text ); m_Cmp->SetRef( m_Parent->GetSheet(), m_FieldsBuf[REFERENCE].m_Text );
m_Parent->OnModify(); m_Parent->OnModify();
m_Parent->GetScreen()->TestDanglingEnds();
m_Parent->TestDanglingEnds( m_Parent->GetScreen()->GetDrawItems(), NULL );
m_Parent->DrawPanel->Refresh( TRUE ); m_Parent->DrawPanel->Refresh( TRUE );
EndModal( 0 ); EndModal( 0 );
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
DIALOG_EESCHEMA_CONFIG::DIALOG_EESCHEMA_CONFIG( SCH_EDIT_FRAME* aSchFrame, DIALOG_EESCHEMA_CONFIG::DIALOG_EESCHEMA_CONFIG( SCH_EDIT_FRAME* aSchFrame,
WinEDA_DrawFrame* aParent ) EDA_DRAW_FRAME* aParent )
: DIALOG_EESCHEMA_CONFIG_FBP( aParent ) : DIALOG_EESCHEMA_CONFIG_FBP( aParent )
{ {
wxString msg; wxString msg;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
class SCH_EDIT_FRAME; class SCH_EDIT_FRAME;
class WinEDA_DrawFrame; class EDA_DRAW_FRAME;
class DIALOG_EESCHEMA_CONFIG : public DIALOG_EESCHEMA_CONFIG_FBP class DIALOG_EESCHEMA_CONFIG : public DIALOG_EESCHEMA_CONFIG_FBP
...@@ -34,7 +34,7 @@ private: ...@@ -34,7 +34,7 @@ private:
public: public:
DIALOG_EESCHEMA_CONFIG( SCH_EDIT_FRAME* parent, WinEDA_DrawFrame* activeWindow ); DIALOG_EESCHEMA_CONFIG( SCH_EDIT_FRAME* parent, EDA_DRAW_FRAME* activeWindow );
~DIALOG_EESCHEMA_CONFIG() {}; ~DIALOG_EESCHEMA_CONFIG() {};
}; };
......
...@@ -316,7 +316,7 @@ void SCH_PRINTOUT::DrawPage() ...@@ -316,7 +316,7 @@ void SCH_PRINTOUT::DrawPage()
wxRect fitRect; wxRect fitRect;
wxDC* dc = GetDC(); wxDC* dc = GetDC();
SCH_EDIT_FRAME* parent = m_Parent->GetParent(); SCH_EDIT_FRAME* parent = m_Parent->GetParent();
WinEDA_DrawPanel* panel = parent->DrawPanel; EDA_DRAW_PANEL* panel = parent->DrawPanel;
wxBusyCursor dummy; wxBusyCursor dummy;
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
#include "sch_component.h" #include "sch_component.h"
static void AbortMoveCmpField( WinEDA_DrawPanel* Panel, wxDC* DC ); static void AbortMoveCmpField( EDA_DRAW_PANEL* Panel, wxDC* DC );
static void MoveCmpField( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); static void MoveCmpField( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase );
/******************************************************************************/ /******************************************************************************/
...@@ -125,7 +125,7 @@ modified!\nYou must create a new power" ) ); ...@@ -125,7 +125,7 @@ modified!\nYou must create a new power" ) );
wxString newtext = Field->m_Text; wxString newtext = Field->m_Text;
DrawPanel->m_IgnoreMouseEvents = TRUE; DrawPanel->m_IgnoreMouseEvents = TRUE;
wxString title = _( "Field:" ) + wxT(" ") + Field->m_Name; wxString title = _( "Field: " ) + Field->m_Name;
wxTextEntryDialog dlg( this, wxEmptyString , title, newtext ); wxTextEntryDialog dlg( this, wxEmptyString , title, newtext );
int diag = dlg.ShowModal(); int diag = dlg.ShowModal();
newtext = dlg.GetValue( ); newtext = dlg.GetValue( );
...@@ -178,7 +178,7 @@ modified!\nYou must create a new power" ) ); ...@@ -178,7 +178,7 @@ modified!\nYou must create a new power" ) );
/* /*
* Move standard text field. This routine is normally attached to the cursor. * Move standard text field. This routine is normally attached to the cursor.
*/ */
static void MoveCmpField( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) static void MoveCmpField( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase )
{ {
wxPoint pos; wxPoint pos;
int fieldNdx; int fieldNdx;
...@@ -213,7 +213,7 @@ static void MoveCmpField( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) ...@@ -213,7 +213,7 @@ static void MoveCmpField( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
} }
static void AbortMoveCmpField( WinEDA_DrawPanel* Panel, wxDC* DC ) static void AbortMoveCmpField( EDA_DRAW_PANEL* Panel, wxDC* DC )
{ {
Panel->ForceCloseManageCurseur = NULL; Panel->ForceCloseManageCurseur = NULL;
Panel->ManageCurseur = NULL; Panel->ManageCurseur = NULL;
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
#include "sch_text.h" #include "sch_text.h"
static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); static void ShowWhileMoving( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase );
static void ExitMoveTexte( WinEDA_DrawPanel* panel, wxDC* DC ); static void ExitMoveTexte( EDA_DRAW_PANEL* panel, wxDC* DC );
static wxPoint ItemInitialPosition; static wxPoint ItemInitialPosition;
...@@ -184,7 +184,7 @@ SCH_TEXT* SCH_EDIT_FRAME::CreateNewText( wxDC* DC, int type ) ...@@ -184,7 +184,7 @@ SCH_TEXT* SCH_EDIT_FRAME::CreateNewText( wxDC* DC, int type )
/************************************/ /************************************/
/* Redraw a Text while moving */ /* Redraw a Text while moving */
/************************************/ /************************************/
static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) static void ShowWhileMoving( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase )
{ {
SCH_ITEM* TextStruct = (SCH_ITEM*) panel->GetScreen()->GetCurItem(); SCH_ITEM* TextStruct = (SCH_ITEM*) panel->GetScreen()->GetCurItem();
...@@ -211,7 +211,7 @@ static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) ...@@ -211,7 +211,7 @@ static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
/* Abort function for the command move text */ /* Abort function for the command move text */
static void ExitMoveTexte( WinEDA_DrawPanel* Panel, wxDC* DC ) static void ExitMoveTexte( EDA_DRAW_PANEL* Panel, wxDC* DC )
{ {
BASE_SCREEN* screen = Panel->GetScreen(); BASE_SCREEN* screen = Panel->GetScreen();
SCH_ITEM* Struct = (SCH_ITEM*) screen->GetCurItem(); SCH_ITEM* Struct = (SCH_ITEM*) screen->GetCurItem();
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "build_version.h" #include "build_version.h"
void DrawDanglingSymbol( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& pos, int Color ) void DrawDanglingSymbol( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& pos, int Color )
{ {
BASE_SCREEN* screen = panel->GetScreen(); BASE_SCREEN* screen = panel->GetScreen();
......
...@@ -556,7 +556,7 @@ void SCH_EDIT_FRAME::LoadSettings() ...@@ -556,7 +556,7 @@ void SCH_EDIT_FRAME::LoadSettings()
wxConfig* cfg = wxGetApp().m_EDA_Config; wxConfig* cfg = wxGetApp().m_EDA_Config;
WinEDA_DrawFrame::LoadSettings(); EDA_DRAW_FRAME::LoadSettings();
wxGetApp().ReadCurrentSetupValues( GetConfigurationSettings() ); wxGetApp().ReadCurrentSetupValues( GetConfigurationSettings() );
...@@ -653,7 +653,7 @@ void SCH_EDIT_FRAME::SaveSettings() ...@@ -653,7 +653,7 @@ void SCH_EDIT_FRAME::SaveSettings()
wxConfig* cfg = wxGetApp().m_EDA_Config; wxConfig* cfg = wxGetApp().m_EDA_Config;
WinEDA_DrawFrame::SaveSettings(); EDA_DRAW_FRAME::SaveSettings();
wxGetApp().SaveCurrentSetupValues( GetConfigurationSettings() ); wxGetApp().SaveCurrentSetupValues( GetConfigurationSettings() );
......
...@@ -217,7 +217,7 @@ int TestDuplicateSheetNames( bool aCreateMarker ) ...@@ -217,7 +217,7 @@ int TestDuplicateSheetNames( bool aCreateMarker )
* or between aNetItemRef and aNetItemTst * or between aNetItemRef and aNetItemTst
* if MinConn < 0: this is an error on labels * if MinConn < 0: this is an error on labels
*/ */
void Diagnose( WinEDA_DrawPanel* aPanel, void Diagnose( EDA_DRAW_PANEL* aPanel,
NETLIST_OBJECT* aNetItemRef, NETLIST_OBJECT* aNetItemRef,
NETLIST_OBJECT* aNetItemTst, NETLIST_OBJECT* aNetItemTst,
int aMinConn, int aDiag ) int aMinConn, int aDiag )
...@@ -352,7 +352,7 @@ void Diagnose( WinEDA_DrawPanel* aPanel, ...@@ -352,7 +352,7 @@ void Diagnose( WinEDA_DrawPanel* aPanel,
/* Routine testing electrical conflicts between NetItemRef and other items /* Routine testing electrical conflicts between NetItemRef and other items
* of the same net * of the same net
*/ */
void TestOthersItems( WinEDA_DrawPanel* panel, void TestOthersItems( EDA_DRAW_PANEL* panel,
unsigned NetItemRef, unsigned NetItemRef,
unsigned netstart, unsigned netstart,
int* NetNbItems, int* MinConnexion ) int* NetNbItems, int* MinConnexion )
...@@ -571,7 +571,7 @@ static bool IsLabelsConnected( NETLIST_OBJECT* a, NETLIST_OBJECT* b ) ...@@ -571,7 +571,7 @@ static bool IsLabelsConnected( NETLIST_OBJECT* a, NETLIST_OBJECT* b )
/* Routine to perform erc on a sheetLabel that is connected to a corresponding /* Routine to perform erc on a sheetLabel that is connected to a corresponding
* sub sheet Glabel * sub sheet Glabel
*/ */
void TestLabel( WinEDA_DrawPanel* panel, unsigned NetItemRef, unsigned StartNet ) void TestLabel( EDA_DRAW_PANEL* panel, unsigned NetItemRef, unsigned StartNet )
{ {
unsigned NetItemTst; unsigned NetItemTst;
int erc = 1; int erc = 1;
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#define _ERC_H #define _ERC_H
class WinEDA_DrawPanel; class EDA_DRAW_PANEL;
class NETLIST_OBJECT; class NETLIST_OBJECT;
/* For ERC markers: error types (used in diags, and to set the color): /* For ERC markers: error types (used in diags, and to set the color):
...@@ -60,13 +60,13 @@ enum errortype ...@@ -60,13 +60,13 @@ enum errortype
extern bool WriteDiagnosticERC( const wxString& FullFileName ); extern bool WriteDiagnosticERC( const wxString& FullFileName );
extern void Diagnose( WinEDA_DrawPanel* panel, NETLIST_OBJECT* NetItemRef, extern void Diagnose( EDA_DRAW_PANEL* panel, NETLIST_OBJECT* NetItemRef,
NETLIST_OBJECT* NetItemTst, int MinConnexion, int Diag ); NETLIST_OBJECT* NetItemTst, int MinConnexion, int Diag );
extern void TestOthersItems( WinEDA_DrawPanel* panel, unsigned NetItemRef, unsigned NetStart, extern void TestOthersItems( EDA_DRAW_PANEL* panel, unsigned NetItemRef, unsigned NetStart,
int* NetNbItems, int* MinConnexion ); int* NetNbItems, int* MinConnexion );
extern void TestLabel( WinEDA_DrawPanel* panel, unsigned NetItemRef, unsigned StartNet ); extern void TestLabel( EDA_DRAW_PANEL* panel, unsigned NetItemRef, unsigned StartNet );
extern int TestDuplicateSheetNames( bool aCreateMarker ); extern int TestDuplicateSheetNames( bool aCreateMarker );
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); static void ShowWhileMoving( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase );
static void ExitPlaceCmp( WinEDA_DrawPanel* Panel, wxDC* DC ); static void ExitPlaceCmp( EDA_DRAW_PANEL* Panel, wxDC* DC );
static TRANSFORM OldTransform; static TRANSFORM OldTransform;
static wxPoint OldPos; static wxPoint OldPos;
...@@ -221,7 +221,7 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* DC, ...@@ -221,7 +221,7 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* DC,
/** /**
* Move a component. * Move a component.
*/ */
static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) static void ShowWhileMoving( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase )
{ {
wxPoint move_vector; wxPoint move_vector;
...@@ -275,7 +275,7 @@ void SCH_EDIT_FRAME::CmpRotationMiroir( SCH_COMPONENT* DrawComponent, wxDC* DC, ...@@ -275,7 +275,7 @@ void SCH_EDIT_FRAME::CmpRotationMiroir( SCH_COMPONENT* DrawComponent, wxDC* DC,
DrawPanel->CursorOn( DC ); DrawPanel->CursorOn( DC );
} }
TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); GetScreen()->TestDanglingEnds( DrawPanel, DC );
OnModify( ); OnModify( );
} }
...@@ -283,7 +283,7 @@ void SCH_EDIT_FRAME::CmpRotationMiroir( SCH_COMPONENT* DrawComponent, wxDC* DC, ...@@ -283,7 +283,7 @@ void SCH_EDIT_FRAME::CmpRotationMiroir( SCH_COMPONENT* DrawComponent, wxDC* DC,
/* /*
* Abort a place component command in progress. * Abort a place component command in progress.
*/ */
static void ExitPlaceCmp( WinEDA_DrawPanel* Panel, wxDC* DC ) static void ExitPlaceCmp( EDA_DRAW_PANEL* Panel, wxDC* DC )
{ {
SCH_SCREEN* screen = (SCH_SCREEN*) Panel->GetScreen(); SCH_SCREEN* screen = (SCH_SCREEN*) Panel->GetScreen();
...@@ -359,7 +359,7 @@ void SCH_EDIT_FRAME::SelPartUnit( SCH_COMPONENT* DrawComponent, int unit, wxDC* ...@@ -359,7 +359,7 @@ void SCH_EDIT_FRAME::SelPartUnit( SCH_COMPONENT* DrawComponent, int unit, wxDC*
else else
DrawComponent->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); DrawComponent->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); GetScreen()->TestDanglingEnds( DrawPanel, DC );
OnModify( ); OnModify( );
} }
...@@ -404,7 +404,7 @@ void SCH_EDIT_FRAME::ConvertPart( SCH_COMPONENT* DrawComponent, wxDC* DC ) ...@@ -404,7 +404,7 @@ void SCH_EDIT_FRAME::ConvertPart( SCH_COMPONENT* DrawComponent, wxDC* DC )
else else
DrawComponent->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); DrawComponent->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); GetScreen()->TestDanglingEnds( DrawPanel, DC );
OnModify( ); OnModify( );
} }
......
...@@ -346,7 +346,7 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* DC, int hotkey, EDA_ITEM* DrawStruct ) ...@@ -346,7 +346,7 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* DC, int hotkey, EDA_ITEM* DrawStruct )
RefreshToolBar = LocateAndDeleteItem( this, DC ); RefreshToolBar = LocateAndDeleteItem( this, DC );
OnModify(); OnModify();
GetScreen()->SetCurItem( NULL ); GetScreen()->SetCurItem( NULL );
TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); GetScreen()->TestDanglingEnds( DrawPanel, DC );
} }
break; break;
...@@ -661,7 +661,7 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* DC, int hotkey, EDA_ITEM* DrawStruct ) ...@@ -661,7 +661,7 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* DC, int hotkey, EDA_ITEM* DrawStruct )
RefreshToolBar = TRUE; RefreshToolBar = TRUE;
} }
CmpRotationMiroir( (SCH_COMPONENT*) DrawStruct, DC, CMP_NORMAL ); CmpRotationMiroir( (SCH_COMPONENT*) DrawStruct, DC, CMP_NORMAL );
TestDanglingEnds( GetScreen()->GetDrawItems(), DC ); GetScreen()->TestDanglingEnds( DrawPanel, DC );
} }
break; break;
......
...@@ -345,7 +345,7 @@ void LIB_ARC::drawEditGraphics( EDA_Rect* aClipBox, wxDC* aDC, int aColor ) ...@@ -345,7 +345,7 @@ void LIB_ARC::drawEditGraphics( EDA_Rect* aClipBox, wxDC* aDC, int aColor )
} }
void LIB_ARC::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, void LIB_ARC::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ) int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform )
{ {
// Don't draw the arc until the end point is selected. Only the edit indicators // Don't draw the arc until the end point is selected. Only the edit indicators
...@@ -474,7 +474,7 @@ start(%d, %d), end(%d, %d), radius %d" ), ...@@ -474,7 +474,7 @@ start(%d, %d), end(%d, %d), radius %d" ),
} }
void LIB_ARC::DisplayInfo( WinEDA_DrawFrame* aFrame ) void LIB_ARC::DisplayInfo( EDA_DRAW_FRAME* aFrame )
{ {
wxString msg; wxString msg;
EDA_Rect bBox = GetBoundingBox(); EDA_Rect bBox = GetBoundingBox();
......
...@@ -37,7 +37,7 @@ class LIB_ARC : public LIB_DRAW_ITEM ...@@ -37,7 +37,7 @@ class LIB_ARC : public LIB_DRAW_ITEM
/** /**
* Draws the arc. * Draws the arc.
*/ */
void drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, void drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ); int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform );
/** /**
...@@ -97,7 +97,7 @@ public: ...@@ -97,7 +97,7 @@ public:
virtual bool HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ); virtual bool HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform );
virtual EDA_Rect GetBoundingBox() const; virtual EDA_Rect GetBoundingBox() const;
virtual void DisplayInfo( WinEDA_DrawFrame* frame ); virtual void DisplayInfo( EDA_DRAW_FRAME* frame );
/** /**
* @return the size of the "pen" that be used to draw or plot this item * @return the size of the "pen" that be used to draw or plot this item
......
...@@ -241,7 +241,7 @@ int LIB_BEZIER::GetPenSize() ...@@ -241,7 +241,7 @@ int LIB_BEZIER::GetPenSize()
return ( m_Width == 0 ) ? g_DrawDefaultLineThickness : m_Width; return ( m_Width == 0 ) ? g_DrawDefaultLineThickness : m_Width;
} }
void LIB_BEZIER::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, void LIB_BEZIER::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ) int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform )
{ {
wxPoint pos1; wxPoint pos1;
...@@ -367,7 +367,7 @@ EDA_Rect LIB_BEZIER::GetBoundingBox() const ...@@ -367,7 +367,7 @@ EDA_Rect LIB_BEZIER::GetBoundingBox() const
} }
void LIB_BEZIER::DisplayInfo( WinEDA_DrawFrame* aFrame ) void LIB_BEZIER::DisplayInfo( EDA_DRAW_FRAME* aFrame )
{ {
wxString msg; wxString msg;
EDA_Rect bBox = GetBoundingBox(); EDA_Rect bBox = GetBoundingBox();
......
...@@ -18,7 +18,7 @@ class LIB_BEZIER : public LIB_DRAW_ITEM ...@@ -18,7 +18,7 @@ class LIB_BEZIER : public LIB_DRAW_ITEM
/** /**
* Draw the bezier curve. * Draw the bezier curve.
*/ */
void drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, void drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ); int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform );
public: public:
...@@ -74,7 +74,7 @@ public: ...@@ -74,7 +74,7 @@ public:
*/ */
virtual int GetPenSize( ); virtual int GetPenSize( );
virtual void DisplayInfo( WinEDA_DrawFrame* aFrame ); virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
protected: protected:
virtual LIB_DRAW_ITEM* DoGenCopy(); virtual LIB_DRAW_ITEM* DoGenCopy();
......
...@@ -197,7 +197,7 @@ int LIB_CIRCLE::GetPenSize() ...@@ -197,7 +197,7 @@ int LIB_CIRCLE::GetPenSize()
} }
void LIB_CIRCLE::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, void LIB_CIRCLE::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ) int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform )
{ {
wxPoint pos1; wxPoint pos1;
...@@ -250,7 +250,7 @@ EDA_Rect LIB_CIRCLE::GetBoundingBox() const ...@@ -250,7 +250,7 @@ EDA_Rect LIB_CIRCLE::GetBoundingBox() const
} }
void LIB_CIRCLE::DisplayInfo( WinEDA_DrawFrame* aFrame ) void LIB_CIRCLE::DisplayInfo( EDA_DRAW_FRAME* aFrame )
{ {
wxString msg; wxString msg;
EDA_Rect bBox = GetBoundingBox(); EDA_Rect bBox = GetBoundingBox();
......
...@@ -18,7 +18,7 @@ class LIB_CIRCLE : public LIB_DRAW_ITEM ...@@ -18,7 +18,7 @@ class LIB_CIRCLE : public LIB_DRAW_ITEM
/** /**
* Draws the arc. * Draws the arc.
*/ */
void drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, void drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ); int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform );
/** /**
...@@ -70,7 +70,7 @@ public: ...@@ -70,7 +70,7 @@ public:
virtual int GetPenSize( ); virtual int GetPenSize( );
virtual EDA_Rect GetBoundingBox() const; virtual EDA_Rect GetBoundingBox() const;
virtual void DisplayInfo( WinEDA_DrawFrame* aFrame ); virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
/** /**
* See LIB_DRAW_ITEM::BeginEdit(). * See LIB_DRAW_ITEM::BeginEdit().
......
...@@ -53,7 +53,7 @@ LIB_DRAW_ITEM::LIB_DRAW_ITEM( const LIB_DRAW_ITEM& aItem ) : ...@@ -53,7 +53,7 @@ LIB_DRAW_ITEM::LIB_DRAW_ITEM( const LIB_DRAW_ITEM& aItem ) :
* all library items. Call the base class from the derived class or the * all library items. Call the base class from the derived class or the
* common information will not be updated in the message panel. * common information will not be updated in the message panel.
*/ */
void LIB_DRAW_ITEM::DisplayInfo( WinEDA_DrawFrame* aFrame ) void LIB_DRAW_ITEM::DisplayInfo( EDA_DRAW_FRAME* aFrame )
{ {
wxString msg; wxString msg;
...@@ -108,7 +108,7 @@ bool LIB_DRAW_ITEM::operator<( const LIB_DRAW_ITEM& aOther ) const ...@@ -108,7 +108,7 @@ bool LIB_DRAW_ITEM::operator<( const LIB_DRAW_ITEM& aOther ) const
} }
void LIB_DRAW_ITEM::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor, void LIB_DRAW_ITEM::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor,
int aDrawMode, void* aData, const TRANSFORM& aTransform ) int aDrawMode, void* aData, const TRANSFORM& aTransform )
{ {
if( InEditMode() ) if( InEditMode() )
......
...@@ -55,7 +55,7 @@ class LIB_DRAW_ITEM : public EDA_ITEM ...@@ -55,7 +55,7 @@ class LIB_DRAW_ITEM : public EDA_ITEM
/** /**
* Draws the item. * Draws the item.
*/ */
virtual void drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, virtual void drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
const wxPoint& aOffset, int aColor, const wxPoint& aOffset, int aColor,
int aDrawMode, void* aData, const TRANSFORM& aTransform ) = 0; int aDrawMode, void* aData, const TRANSFORM& aTransform ) = 0;
...@@ -179,7 +179,7 @@ public: ...@@ -179,7 +179,7 @@ public:
* or to pass reference to the lib component for pins * or to pass reference to the lib component for pins
* @param aTransform - Transform Matrix (rotation, mirror ..) * @param aTransform - Transform Matrix (rotation, mirror ..)
*/ */
virtual void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint &aOffset, int aColor, virtual void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint &aOffset, int aColor,
int aDrawMode, void* aData, const TRANSFORM& aTransform ); int aDrawMode, void* aData, const TRANSFORM& aTransform );
/** /**
...@@ -233,7 +233,7 @@ public: ...@@ -233,7 +233,7 @@ public:
* in msg panel * in msg panel
* @param aFrame = main frame where the message manel info is. * @param aFrame = main frame where the message manel info is.
*/ */
virtual void DisplayInfo( WinEDA_DrawFrame* aFrame ); virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
/** /**
* Make a copy of this draw item. * Make a copy of this draw item.
......
...@@ -292,7 +292,7 @@ int LIB_FIELD::GetPenSize() ...@@ -292,7 +292,7 @@ int LIB_FIELD::GetPenSize()
* if aData not NULL, aData must point a wxString which is used instead of * if aData not NULL, aData must point a wxString which is used instead of
* the m_Text * the m_Text
*/ */
void LIB_FIELD::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, void LIB_FIELD::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ) int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform )
{ {
wxPoint text_pos; wxPoint text_pos;
...@@ -710,7 +710,7 @@ void LIB_FIELD::calcEdit( const wxPoint& aPosition ) ...@@ -710,7 +710,7 @@ void LIB_FIELD::calcEdit( const wxPoint& aPosition )
} }
} }
void LIB_FIELD::DisplayInfo( WinEDA_DrawFrame* aFrame ) void LIB_FIELD::DisplayInfo( EDA_DRAW_FRAME* aFrame )
{ {
wxString msg; wxString msg;
......
...@@ -27,7 +27,7 @@ class LIB_FIELD : public LIB_DRAW_ITEM, public EDA_TextStruct ...@@ -27,7 +27,7 @@ class LIB_FIELD : public LIB_DRAW_ITEM, public EDA_TextStruct
/** /**
* Draw the field. * Draw the field.
*/ */
void drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, void drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ); int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform );
/** /**
...@@ -135,7 +135,7 @@ public: ...@@ -135,7 +135,7 @@ public:
* in msg panel * in msg panel
* @param aFrame = main frame where the message manel info is. * @param aFrame = main frame where the message manel info is.
*/ */
virtual void DisplayInfo( WinEDA_DrawFrame* aFrame ); virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
/** /**
* Test if the given point is within the bounds of this object. * Test if the given point is within the bounds of this object.
......
...@@ -783,7 +783,7 @@ int LIB_PIN::GetPenSize() ...@@ -783,7 +783,7 @@ int LIB_PIN::GetPenSize()
} }
void LIB_PIN::drawGraphic( WinEDA_DrawPanel* aPanel, void LIB_PIN::drawGraphic( EDA_DRAW_PANEL* aPanel,
wxDC* aDC, wxDC* aDC,
const wxPoint& aOffset, const wxPoint& aOffset,
int aColor, int aColor,
...@@ -841,7 +841,7 @@ void LIB_PIN::drawGraphic( WinEDA_DrawPanel* aPanel, ...@@ -841,7 +841,7 @@ void LIB_PIN::drawGraphic( WinEDA_DrawPanel* aPanel,
* Draw the pin symbol (without texts) * Draw the pin symbol (without texts)
* if Color != 0 draw with Color, else with the normal pin color * if Color != 0 draw with Color, else with the normal pin color
*/ */
void LIB_PIN::DrawPinSymbol( WinEDA_DrawPanel* aPanel, void LIB_PIN::DrawPinSymbol( EDA_DRAW_PANEL* aPanel,
wxDC* aDC, wxDC* aDC,
const wxPoint& aPinPos, const wxPoint& aPinPos,
int aOrient, int aOrient,
...@@ -1063,7 +1063,7 @@ void LIB_PIN::DrawPinSymbol( WinEDA_DrawPanel* aPanel, ...@@ -1063,7 +1063,7 @@ void LIB_PIN::DrawPinSymbol( WinEDA_DrawPanel* aPanel,
* Pin Name: substring beteween '~' is negated * Pin Name: substring beteween '~' is negated
* DrawMode = GR_OR, XOR ... * DrawMode = GR_OR, XOR ...
*****************************************************************************/ *****************************************************************************/
void LIB_PIN::DrawPinTexts( WinEDA_DrawPanel* panel, void LIB_PIN::DrawPinTexts( EDA_DRAW_PANEL* panel,
wxDC* DC, wxDC* DC,
wxPoint& pin_pos, wxPoint& pin_pos,
int orient, int orient,
...@@ -1713,7 +1713,7 @@ void LIB_PIN::DoSetWidth( int aWidth ) ...@@ -1713,7 +1713,7 @@ void LIB_PIN::DoSetWidth( int aWidth )
* Displays info (pin num and name, orientation ... * Displays info (pin num and name, orientation ...
* on the Info window * on the Info window
*/ */
void LIB_PIN::DisplayInfo( WinEDA_DrawFrame* frame ) void LIB_PIN::DisplayInfo( EDA_DRAW_FRAME* frame )
{ {
wxString Text; wxString Text;
......
...@@ -95,7 +95,7 @@ class LIB_PIN : public LIB_DRAW_ITEM ...@@ -95,7 +95,7 @@ class LIB_PIN : public LIB_DRAW_ITEM
/** /**
* Draw the pin. * Draw the pin.
*/ */
void drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, void drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ); int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform );
public: public:
...@@ -152,7 +152,7 @@ public: ...@@ -152,7 +152,7 @@ public:
*/ */
virtual bool HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTransform ); virtual bool HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTransform );
virtual void DisplayInfo( WinEDA_DrawFrame* frame ); virtual void DisplayInfo( EDA_DRAW_FRAME* frame );
virtual EDA_Rect GetBoundingBox() const; virtual EDA_Rect GetBoundingBox() const;
...@@ -338,10 +338,10 @@ public: ...@@ -338,10 +338,10 @@ public:
*/ */
virtual int GetPenSize(); virtual int GetPenSize();
void DrawPinSymbol( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aPosition, void DrawPinSymbol( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition,
int aOrientation, int aDrawMode, int aColor = -1 ); int aOrientation, int aDrawMode, int aColor = -1 );
void DrawPinTexts( WinEDA_DrawPanel* aPanel, wxDC* aDC, wxPoint& aPosition, void DrawPinTexts( EDA_DRAW_PANEL* aPanel, wxDC* aDC, wxPoint& aPosition,
int aOrientation, int TextInside, bool DrawPinNum, bool DrawPinName, int aOrientation, int TextInside, bool DrawPinNum, bool DrawPinName,
int aColor, int aDrawMode ); int aColor, int aDrawMode );
......
...@@ -240,7 +240,7 @@ int LIB_POLYLINE::GetPenSize() ...@@ -240,7 +240,7 @@ int LIB_POLYLINE::GetPenSize()
} }
void LIB_POLYLINE::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, void LIB_POLYLINE::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aColor, int aDrawMode, void* aData, int aColor, int aDrawMode, void* aData,
const TRANSFORM& aTransform ) const TRANSFORM& aTransform )
{ {
...@@ -385,7 +385,7 @@ void LIB_POLYLINE::DeleteSegment( const wxPoint aPosition ) ...@@ -385,7 +385,7 @@ void LIB_POLYLINE::DeleteSegment( const wxPoint aPosition )
} }
void LIB_POLYLINE::DisplayInfo( WinEDA_DrawFrame* aFrame ) void LIB_POLYLINE::DisplayInfo( EDA_DRAW_FRAME* aFrame )
{ {
wxString msg; wxString msg;
EDA_Rect bBox = GetBoundingBox(); EDA_Rect bBox = GetBoundingBox();
......
...@@ -19,7 +19,7 @@ class LIB_POLYLINE : public LIB_DRAW_ITEM ...@@ -19,7 +19,7 @@ class LIB_POLYLINE : public LIB_DRAW_ITEM
/** /**
* Draw the polyline. * Draw the polyline.
*/ */
void drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, void drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ); int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform );
/** /**
...@@ -88,7 +88,7 @@ public: ...@@ -88,7 +88,7 @@ public:
*/ */
virtual int GetPenSize( ); virtual int GetPenSize( );
virtual void DisplayInfo( WinEDA_DrawFrame* aFrame ); virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
/** /**
* See LIB_DRAW_ITEM::BeginEdit(). * See LIB_DRAW_ITEM::BeginEdit().
......
...@@ -171,7 +171,7 @@ int LIB_RECTANGLE::GetPenSize() ...@@ -171,7 +171,7 @@ int LIB_RECTANGLE::GetPenSize()
return ( m_Width == 0 ) ? g_DrawDefaultLineThickness : m_Width; return ( m_Width == 0 ) ? g_DrawDefaultLineThickness : m_Width;
} }
void LIB_RECTANGLE::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, void LIB_RECTANGLE::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
const wxPoint& aOffset, int aColor, int aDrawMode, const wxPoint& aOffset, int aColor, int aDrawMode,
void* aData, const TRANSFORM& aTransform ) void* aData, const TRANSFORM& aTransform )
{ {
...@@ -217,7 +217,7 @@ void LIB_RECTANGLE::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, ...@@ -217,7 +217,7 @@ void LIB_RECTANGLE::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC,
} }
void LIB_RECTANGLE::DisplayInfo( WinEDA_DrawFrame* aFrame ) void LIB_RECTANGLE::DisplayInfo( EDA_DRAW_FRAME* aFrame )
{ {
wxString msg; wxString msg;
......
...@@ -21,7 +21,7 @@ class LIB_RECTANGLE : public LIB_DRAW_ITEM ...@@ -21,7 +21,7 @@ class LIB_RECTANGLE : public LIB_DRAW_ITEM
/** /**
* Draw the rectangle. * Draw the rectangle.
*/ */
void drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, void drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ); int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform );
/** /**
...@@ -76,7 +76,7 @@ public: ...@@ -76,7 +76,7 @@ public:
virtual EDA_Rect GetBoundingBox() const; virtual EDA_Rect GetBoundingBox() const;
virtual void DisplayInfo( WinEDA_DrawFrame* aFrame ); virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
/** /**
* See LIB_DRAW_ITEM::BeginEdit(). * See LIB_DRAW_ITEM::BeginEdit().
......
...@@ -279,7 +279,7 @@ int LIB_TEXT::GetPenSize( ) ...@@ -279,7 +279,7 @@ int LIB_TEXT::GetPenSize( )
} }
void LIB_TEXT::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, void LIB_TEXT::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ) int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform )
{ {
wxPoint pos1, pos2; wxPoint pos1, pos2;
...@@ -351,7 +351,7 @@ void LIB_TEXT::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& ...@@ -351,7 +351,7 @@ void LIB_TEXT::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint&
} }
void LIB_TEXT::DisplayInfo( WinEDA_DrawFrame* frame ) void LIB_TEXT::DisplayInfo( EDA_DRAW_FRAME* frame )
{ {
wxString msg; wxString msg;
......
...@@ -21,7 +21,7 @@ class LIB_TEXT : public LIB_DRAW_ITEM, public EDA_TextStruct ...@@ -21,7 +21,7 @@ class LIB_TEXT : public LIB_DRAW_ITEM, public EDA_TextStruct
/** /**
* Draw the polyline. * Draw the polyline.
*/ */
void drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, void drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform ); int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform );
/** /**
...@@ -96,7 +96,7 @@ public: ...@@ -96,7 +96,7 @@ public:
*/ */
virtual int GetPenSize( ); virtual int GetPenSize( );
virtual void DisplayInfo( WinEDA_DrawFrame* aFrame ); virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
virtual EDA_Rect GetBoundingBox() const; virtual EDA_Rect GetBoundingBox() const;
......
...@@ -74,7 +74,7 @@ FILL_T LIB_EDIT_FRAME:: m_drawFillStyle = NO_FILL; ...@@ -74,7 +74,7 @@ FILL_T LIB_EDIT_FRAME:: m_drawFillStyle = NO_FILL;
/************************/ /************************/
/* class LIB_EDIT_FRAME */ /* class LIB_EDIT_FRAME */
/************************/ /************************/
BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, WinEDA_DrawFrame ) BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME )
EVT_CLOSE( LIB_EDIT_FRAME::OnCloseWindow ) EVT_CLOSE( LIB_EDIT_FRAME::OnCloseWindow )
EVT_SIZE( LIB_EDIT_FRAME::OnSize ) EVT_SIZE( LIB_EDIT_FRAME::OnSize )
EVT_ACTIVATE( LIB_EDIT_FRAME::OnActivate ) EVT_ACTIVATE( LIB_EDIT_FRAME::OnActivate )
...@@ -115,7 +115,7 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, WinEDA_DrawFrame ) ...@@ -115,7 +115,7 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, WinEDA_DrawFrame )
EVT_MENU( ID_LIBEDIT_SAVE_CURRENT_LIB_AS, LIB_EDIT_FRAME::SaveActiveLibrary ) EVT_MENU( ID_LIBEDIT_SAVE_CURRENT_LIB_AS, LIB_EDIT_FRAME::SaveActiveLibrary )
EVT_MENU( ID_LIBEDIT_GEN_PNG_FILE, LIB_EDIT_FRAME::OnPlotCurrentComponent ) EVT_MENU( ID_LIBEDIT_GEN_PNG_FILE, LIB_EDIT_FRAME::OnPlotCurrentComponent )
EVT_MENU( ID_LIBEDIT_GEN_SVG_FILE, LIB_EDIT_FRAME::OnPlotCurrentComponent ) EVT_MENU( ID_LIBEDIT_GEN_SVG_FILE, LIB_EDIT_FRAME::OnPlotCurrentComponent )
EVT_MENU( ID_GENERAL_HELP, WinEDA_DrawFrame::GetKicadHelp ) EVT_MENU( ID_GENERAL_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( ID_COLORS_SETUP, LIB_EDIT_FRAME::OnColorConfig ) EVT_MENU( ID_COLORS_SETUP, LIB_EDIT_FRAME::OnColorConfig )
EVT_MENU( ID_CONFIG_REQ, LIB_EDIT_FRAME::InstallConfigFrame ) EVT_MENU( ID_CONFIG_REQ, LIB_EDIT_FRAME::InstallConfigFrame )
...@@ -168,7 +168,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( SCH_EDIT_FRAME* aParent, ...@@ -168,7 +168,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( SCH_EDIT_FRAME* aParent,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
long style ) : long style ) :
WinEDA_DrawFrame( aParent, LIBEDITOR_FRAME, title, pos, size, style ) EDA_DRAW_FRAME( aParent, LIBEDITOR_FRAME, title, pos, size, style )
{ {
wxASSERT( aParent ); wxASSERT( aParent );
...@@ -267,7 +267,7 @@ void LIB_EDIT_FRAME::LoadSettings() ...@@ -267,7 +267,7 @@ void LIB_EDIT_FRAME::LoadSettings()
{ {
wxConfig* cfg; wxConfig* cfg;
WinEDA_DrawFrame::LoadSettings(); EDA_DRAW_FRAME::LoadSettings();
wxConfigPathChanger cpc( wxGetApp().m_EDA_Config, m_ConfigPath ); wxConfigPathChanger cpc( wxGetApp().m_EDA_Config, m_ConfigPath );
cfg = wxGetApp().m_EDA_Config; cfg = wxGetApp().m_EDA_Config;
...@@ -293,7 +293,7 @@ void LIB_EDIT_FRAME::SaveSettings() ...@@ -293,7 +293,7 @@ void LIB_EDIT_FRAME::SaveSettings()
{ {
wxConfig* cfg; wxConfig* cfg;
WinEDA_DrawFrame::SaveSettings(); EDA_DRAW_FRAME::SaveSettings();
wxConfigPathChanger cpc( wxGetApp().m_EDA_Config, m_ConfigPath ); wxConfigPathChanger cpc( wxGetApp().m_EDA_Config, m_ConfigPath );
cfg = wxGetApp().m_EDA_Config; cfg = wxGetApp().m_EDA_Config;
...@@ -933,7 +933,7 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -933,7 +933,7 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
void LIB_EDIT_FRAME::OnActivate( wxActivateEvent& event ) void LIB_EDIT_FRAME::OnActivate( wxActivateEvent& event )
{ {
WinEDA_DrawFrame::OnActivate( event ); EDA_DRAW_FRAME::OnActivate( event );
// Verify the existence of the current active library // Verify the existence of the current active library
// (can be removed or changed by the schematic editor) // (can be removed or changed by the schematic editor)
...@@ -956,12 +956,12 @@ void LIB_EDIT_FRAME::EnsureActiveLibExists() ...@@ -956,12 +956,12 @@ void LIB_EDIT_FRAME::EnsureActiveLibExists()
void LIB_EDIT_FRAME::SetLanguage( wxCommandEvent& event ) void LIB_EDIT_FRAME::SetLanguage( wxCommandEvent& event )
{ {
WinEDA_BasicFrame::SetLanguage( event ); EDA_BASE_FRAME::SetLanguage( event );
SCH_EDIT_FRAME *parent = (SCH_EDIT_FRAME *)GetParent(); SCH_EDIT_FRAME *parent = (SCH_EDIT_FRAME *)GetParent();
// Call parent->WinEDA_BasicFrame::SetLanguage and NOT // Call parent->EDA_BASE_FRAME::SetLanguage and NOT
// parent->SetLanguage because parent->SetLanguage call // parent->SetLanguage because parent->SetLanguage call
// LIB_EDIT_FRAME::SetLanguage // LIB_EDIT_FRAME::SetLanguage
parent->WinEDA_BasicFrame::SetLanguage( event ); parent->EDA_BASE_FRAME::SetLanguage( event );
} }
......
...@@ -23,7 +23,7 @@ class DIALOG_LIB_EDIT_TEXT; ...@@ -23,7 +23,7 @@ class DIALOG_LIB_EDIT_TEXT;
/** /**
* The component library editor main window. * The component library editor main window.
*/ */
class LIB_EDIT_FRAME : public WinEDA_DrawFrame class LIB_EDIT_FRAME : public EDA_DRAW_FRAME
{ {
LIB_COMPONENT* m_tempCopyComponent; ///< Temporary copy of current component during edit. LIB_COMPONENT* m_tempCopyComponent; ///< Temporary copy of current component during edit.
......
...@@ -221,7 +221,7 @@ again." ); ...@@ -221,7 +221,7 @@ again." );
screen->Show( 0, std::cout ); screen->Show( 0, std::cout );
#endif #endif
TestDanglingEnds( screen->GetDrawItems(), NULL ); screen->TestDanglingEnds();
MsgDiag = _( "Done Loading " ) + screen->GetFileName(); MsgDiag = _( "Done Loading " ) + screen->GetFileName();
PrintMsg( MsgDiag ); PrintMsg( MsgDiag );
......
...@@ -54,7 +54,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -54,7 +54,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
case SCH_FIELD_T: case SCH_FIELD_T:
DrawStruct->Place( this, DC ); DrawStruct->Place( this, DC );
GetScreen()->SetCurItem( NULL ); GetScreen()->SetCurItem( NULL );
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE ); DrawPanel->Refresh( TRUE );
return; return;
...@@ -115,7 +115,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -115,7 +115,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
DrawStruct->Place( this, DC ); DrawStruct->Place( this, DC );
DrawPanel->m_AutoPAN_Request = FALSE; DrawPanel->m_AutoPAN_Request = FALSE;
} }
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE ); DrawPanel->Refresh( TRUE );
break; break;
...@@ -131,7 +131,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -131,7 +131,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
DrawStruct->Place( this, DC ); DrawStruct->Place( this, DC );
DrawPanel->m_AutoPAN_Request = FALSE; DrawPanel->m_AutoPAN_Request = FALSE;
} }
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE ); DrawPanel->Refresh( TRUE );
break; break;
...@@ -149,7 +149,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -149,7 +149,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{ {
DrawStruct->Place( this, DC ); DrawStruct->Place( this, DC );
GetScreen()->SetCurItem( NULL ); GetScreen()->SetCurItem( NULL );
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE ); DrawPanel->Refresh( TRUE );
DrawPanel->m_AutoPAN_Request = FALSE; DrawPanel->m_AutoPAN_Request = FALSE;
} }
...@@ -159,7 +159,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -159,7 +159,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
LocateAndDeleteItem( this, DC ); LocateAndDeleteItem( this, DC );
OnModify( ); OnModify( );
GetScreen()->SetCurItem( NULL ); GetScreen()->SetCurItem( NULL );
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE ); DrawPanel->Refresh( TRUE );
break; break;
...@@ -201,7 +201,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -201,7 +201,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{ {
DrawStruct->Place( this, DC ); DrawStruct->Place( this, DC );
DrawPanel->m_AutoPAN_Request = FALSE; DrawPanel->m_AutoPAN_Request = FALSE;
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE ); DrawPanel->Refresh( TRUE );
} }
break; break;
...@@ -220,7 +220,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -220,7 +220,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{ {
DrawStruct->Place( this, DC ); DrawStruct->Place( this, DC );
DrawPanel->m_AutoPAN_Request = FALSE; DrawPanel->m_AutoPAN_Request = FALSE;
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE ); DrawPanel->Refresh( TRUE );
} }
break; break;
...@@ -235,7 +235,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -235,7 +235,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{ {
DrawStruct->Place( this, DC ); DrawStruct->Place( this, DC );
DrawPanel->m_AutoPAN_Request = FALSE; DrawPanel->m_AutoPAN_Request = FALSE;
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE ); DrawPanel->Refresh( TRUE );
} }
break; break;
...@@ -259,7 +259,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -259,7 +259,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
else if( (DrawStruct->Type() == SCH_SHEET_LABEL_T) && (DrawStruct->m_Flags != 0) ) else if( (DrawStruct->Type() == SCH_SHEET_LABEL_T) && (DrawStruct->m_Flags != 0) )
{ {
DrawStruct->Place( this, DC ); DrawStruct->Place( this, DC );
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE ); DrawPanel->Refresh( TRUE );
} }
break; break;
...@@ -274,7 +274,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -274,7 +274,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{ {
DrawStruct->Place( this, DC ); DrawStruct->Place( this, DC );
DrawPanel->m_AutoPAN_Request = FALSE; DrawPanel->m_AutoPAN_Request = FALSE;
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE ); DrawPanel->Refresh( TRUE );
} }
break; break;
...@@ -289,7 +289,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -289,7 +289,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{ {
DrawStruct->Place( this, DC ); DrawStruct->Place( this, DC );
DrawPanel->m_AutoPAN_Request = FALSE; DrawPanel->m_AutoPAN_Request = FALSE;
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL ); GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE ); DrawPanel->Refresh( TRUE );
} }
break; break;
......
...@@ -62,7 +62,7 @@ void RotateListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& rotationPoint ) ...@@ -62,7 +62,7 @@ void RotateListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& rotationPoint )
} }
void DeleteItemsInList( WinEDA_DrawPanel* panel, PICKED_ITEMS_LIST& aItemsList ); void DeleteItemsInList( EDA_DRAW_PANEL* panel, PICKED_ITEMS_LIST& aItemsList );
void DuplicateItemsInList( SCH_SCREEN* screen, PICKED_ITEMS_LIST& aItemsList, void DuplicateItemsInList( SCH_SCREEN* screen, PICKED_ITEMS_LIST& aItemsList,
const wxPoint aMoveVector ); const wxPoint aMoveVector );
...@@ -110,7 +110,7 @@ void MoveItemsInList( PICKED_ITEMS_LIST& aItemsList, const wxPoint aMoveVector ) ...@@ -110,7 +110,7 @@ void MoveItemsInList( PICKED_ITEMS_LIST& aItemsList, const wxPoint aMoveVector )
* delete schematic items in aItemsList * delete schematic items in aItemsList
* deleted items are put in undo list * deleted items are put in undo list
*/ */
void DeleteItemsInList( WinEDA_DrawPanel* panel, PICKED_ITEMS_LIST& aItemsList ) void DeleteItemsInList( EDA_DRAW_PANEL* panel, PICKED_ITEMS_LIST& aItemsList )
{ {
SCH_SCREEN* screen = (SCH_SCREEN*) panel->GetScreen(); SCH_SCREEN* screen = (SCH_SCREEN*) panel->GetScreen();
SCH_EDIT_FRAME* frame = (SCH_EDIT_FRAME*) panel->GetParent(); SCH_EDIT_FRAME* frame = (SCH_EDIT_FRAME*) panel->GetParent();
...@@ -146,7 +146,7 @@ void DeleteItemsInList( WinEDA_DrawPanel* panel, PICKED_ITEMS_LIST& aItemsList ) ...@@ -146,7 +146,7 @@ void DeleteItemsInList( WinEDA_DrawPanel* panel, PICKED_ITEMS_LIST& aItemsList )
/* Routine to delete an object from global drawing object list. /* Routine to delete an object from global drawing object list.
* Object is put in Undo list * Object is put in Undo list
*/ */
void DeleteStruct( WinEDA_DrawPanel* panel, wxDC* DC, SCH_ITEM* DrawStruct ) void DeleteStruct( EDA_DRAW_PANEL* panel, wxDC* DC, SCH_ITEM* DrawStruct )
{ {
SCH_SCREEN* screen = (SCH_SCREEN*) panel->GetScreen(); SCH_SCREEN* screen = (SCH_SCREEN*) panel->GetScreen();
SCH_EDIT_FRAME* frame = (SCH_EDIT_FRAME*) panel->GetParent(); SCH_EDIT_FRAME* frame = (SCH_EDIT_FRAME*) panel->GetParent();
......
...@@ -20,10 +20,9 @@ ...@@ -20,10 +20,9 @@
#include "dialog_lib_edit_pin.h" #include "dialog_lib_edit_pin.h"
static void CreateImagePins( LIB_PIN* Pin, int unit, int convert, static void CreateImagePins( LIB_PIN* Pin, int unit, int convert, bool asDeMorgan );
bool asDeMorgan ); static void AbortPinMove( EDA_DRAW_PANEL* Panel, wxDC* DC );
static void AbortPinMove( WinEDA_DrawPanel* Panel, wxDC* DC ); static void DrawMovePin( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase );
static void DrawMovePin( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
static wxPoint OldPos; static wxPoint OldPos;
...@@ -177,7 +176,7 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event ) ...@@ -177,7 +176,7 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
/** /**
* Clean up after aborting a move pin command. * Clean up after aborting a move pin command.
*/ */
static void AbortPinMove( WinEDA_DrawPanel* Panel, wxDC* DC ) static void AbortPinMove( EDA_DRAW_PANEL* Panel, wxDC* DC )
{ {
LIB_EDIT_FRAME* parent = (LIB_EDIT_FRAME*) Panel->GetParent(); LIB_EDIT_FRAME* parent = (LIB_EDIT_FRAME*) Panel->GetParent();
...@@ -337,7 +336,7 @@ void LIB_EDIT_FRAME::StartMovePin( wxDC* DC ) ...@@ -337,7 +336,7 @@ void LIB_EDIT_FRAME::StartMovePin( wxDC* DC )
/* Move pin to the current mouse position. This function is called by the /* Move pin to the current mouse position. This function is called by the
* cursor management code. */ * cursor management code. */
static void DrawMovePin( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) static void DrawMovePin( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase )
{ {
LIB_EDIT_FRAME* parent = (LIB_EDIT_FRAME*) panel->GetParent(); LIB_EDIT_FRAME* parent = (LIB_EDIT_FRAME*) panel->GetParent();
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
class EDA_ITEM; class EDA_ITEM;
class WinEDA_DrawPanel; class EDA_DRAW_PANEL;
class WinEDA_DrawFrame; class EDA_DRAW_FRAME;
class SCH_EDIT_FRAME; class SCH_EDIT_FRAME;
class LIB_EDIT_FRAME; class LIB_EDIT_FRAME;
class CMP_LIBRARY; class CMP_LIBRARY;
...@@ -35,7 +35,7 @@ wxString ReturnDefaultFieldName( int aFieldNdx ); ...@@ -35,7 +35,7 @@ wxString ReturnDefaultFieldName( int aFieldNdx );
/* DATABASE.CPP */ /* DATABASE.CPP */
/****************/ /****************/
void DisplayCmpDoc( wxString& Name ); void DisplayCmpDoc( wxString& Name );
wxString DataBaseGetName( WinEDA_DrawFrame* frame, wxString& Keys, wxString& BufName ); wxString DataBaseGetName( EDA_DRAW_FRAME* frame, wxString& Keys, wxString& BufName );
/*********************/ /*********************/
/* DANGLING_ENDS.CPP */ /* DANGLING_ENDS.CPP */
...@@ -62,7 +62,7 @@ bool LibItemInBox( int x1, int y1, int x2, int y2, SCH_COMPONENT* Draw ...@@ -62,7 +62,7 @@ bool LibItemInBox( int x1, int y1, int x2, int y2, SCH_COMPONENT* Draw
/************/ /************/
/* BLOCK.CPP */ /* BLOCK.CPP */
/************/ /************/
void DeleteStruct( WinEDA_DrawPanel* panel, wxDC* DC, SCH_ITEM* DrawStruct ); void DeleteStruct( EDA_DRAW_PANEL* panel, wxDC* DC, SCH_ITEM* DrawStruct );
// operations_on_item_lists.cpp // operations_on_item_lists.cpp
...@@ -120,8 +120,8 @@ SCH_ITEM* PickStruct( const wxPoint& refpos, SCH_SCREEN* screen, int SearchMask ...@@ -120,8 +120,8 @@ SCH_ITEM* PickStruct( const wxPoint& refpos, SCH_SCREEN* screen, int SearchMask
/***************/ /***************/
/* EEREDRAW.CPP */ /* EEREDRAW.CPP */
/***************/ /***************/
void DrawDanglingSymbol( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& pos, int Color ); void DrawDanglingSymbol( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& pos, int Color );
void RedrawActiveWindow( WinEDA_DrawPanel* panel, wxDC* DC ); void RedrawActiveWindow( EDA_DRAW_PANEL* panel, wxDC* DC );
/**************/ /**************/
...@@ -181,7 +181,7 @@ void InstallPineditFrame( LIB_EDIT_FRAME* parent, wxDC* DC, const wxPoint& pos ) ...@@ -181,7 +181,7 @@ void InstallPineditFrame( LIB_EDIT_FRAME* parent, wxDC* DC, const wxPoint& pos )
* 1 if selected component * 1 if selected component
* 0 if canceled order * 0 if canceled order
*/ */
int DisplayComponentsNamesInLib( WinEDA_DrawFrame* frame, int DisplayComponentsNamesInLib( EDA_DRAW_FRAME* frame,
CMP_LIBRARY* Library, CMP_LIBRARY* Library,
wxString& Buffer, wxString& Buffer,
wxString& OldName ); wxString& OldName );
...@@ -192,7 +192,7 @@ int DisplayComponentsNamesInLib( WinEDA_DrawFrame* frame, ...@@ -192,7 +192,7 @@ int DisplayComponentsNamesInLib( WinEDA_DrawFrame* frame,
* a library * a library
* This list is sorted, with the library cache always at end of the list * This list is sorted, with the library cache always at end of the list
*/ */
CMP_LIBRARY* SelectLibraryFromList( WinEDA_DrawFrame* frame ); CMP_LIBRARY* SelectLibraryFromList( EDA_DRAW_FRAME* frame );
/** /**
* Get the name component from a library to load. * Get the name component from a library to load.
...@@ -203,7 +203,7 @@ CMP_LIBRARY* SelectLibraryFromList( WinEDA_DrawFrame* frame ); ...@@ -203,7 +203,7 @@ CMP_LIBRARY* SelectLibraryFromList( WinEDA_DrawFrame* frame );
* 0 if canceled order * 0 if canceled order
* Place the name of the selected component list in BufName * Place the name of the selected component list in BufName
*/ */
int GetNameOfPartToLoad( WinEDA_DrawFrame* frame, int GetNameOfPartToLoad( EDA_DRAW_FRAME* frame,
CMP_LIBRARY* Lib, CMP_LIBRARY* Lib,
wxString& BufName ); wxString& BufName );
...@@ -213,30 +213,13 @@ int GetNameOfPartToLoad( WinEDA_DrawFrame* frame, ...@@ -213,30 +213,13 @@ int GetNameOfPartToLoad( WinEDA_DrawFrame* frame,
bool LibArchive( wxWindow* frame, const wxString& ArchFullFileName ); bool LibArchive( wxWindow* frame, const wxString& ArchFullFileName );
/**************/
/* CLEANUP.CPP */
/**************/
void SchematicCleanUp( SCH_SCREEN* screen, wxDC* DC );
/* Routine de nettoyage:
* - regroupe les segments de fils (ou de bus) alignes en 1 seul segment
* - Detecte les objets identiques superposes
*/
void BreakSegmentOnJunction( SCH_SCREEN* Screen );
/* Break a segment ( BUS, WIRE ) int 2 segments at location aBreakpoint,
* if aBreakpoint in on segment segment
* ( excluding ends)
*/
void BreakSegment(SCH_SCREEN * aScreen, wxPoint aBreakpoint );
/***************/ /***************/
/* OPTIONS.CPP */ /* OPTIONS.CPP */
/***************/ /***************/
void DisplayOptionFrame( SCH_EDIT_FRAME* parent, const wxPoint& framepos ); void DisplayOptionFrame( SCH_EDIT_FRAME* parent, const wxPoint& framepos );
/****************/ /****************/
/* CONTROLE.CPP */ /* CONTROLE.CPP */
/****************/ /****************/
......
...@@ -148,7 +148,7 @@ int SCH_BUS_ENTRY::GetPenSize() const ...@@ -148,7 +148,7 @@ int SCH_BUS_ENTRY::GetPenSize() const
} }
void SCH_BUS_ENTRY::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, void SCH_BUS_ENTRY::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aDrawMode, int aColor ) int aDrawMode, int aColor )
{ {
int color; int color;
......
...@@ -40,7 +40,7 @@ public: ...@@ -40,7 +40,7 @@ public:
wxPoint m_End() const; wxPoint m_End() const;
virtual void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, virtual void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aDrawMode, int aColor = -1 ); int aDrawMode, int aColor = -1 );
/** /**
......
...@@ -227,7 +227,7 @@ void SCH_COMPONENT::SetTransform( const TRANSFORM& aTransform ) ...@@ -227,7 +227,7 @@ void SCH_COMPONENT::SetTransform( const TRANSFORM& aTransform )
} }
void SCH_COMPONENT::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, void SCH_COMPONENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset,
int DrawMode, int Color, bool DrawPinText ) int DrawMode, int Color, bool DrawPinText )
{ {
bool dummy = FALSE; bool dummy = FALSE;
...@@ -1408,7 +1408,7 @@ EDA_Rect SCH_COMPONENT::GetBoundingBox() const ...@@ -1408,7 +1408,7 @@ EDA_Rect SCH_COMPONENT::GetBoundingBox() const
} }
void SCH_COMPONENT::DisplayInfo( WinEDA_DrawFrame* frame ) void SCH_COMPONENT::DisplayInfo( EDA_DRAW_FRAME* frame )
{ {
// search for the component in lib // search for the component in lib
// Entry and root_component can differ if Entry is an alias // Entry and root_component can differ if Entry is an alias
......
...@@ -163,7 +163,7 @@ public: ...@@ -163,7 +163,7 @@ public:
*/ */
wxPoint GetScreenCoord( const wxPoint& aPoint ); wxPoint GetScreenCoord( const wxPoint& aPoint );
void DisplayInfo( WinEDA_DrawFrame* frame ); void DisplayInfo( EDA_DRAW_FRAME* frame );
/** /**
* Function ClearAnnotation * Function ClearAnnotation
...@@ -245,7 +245,7 @@ public: ...@@ -245,7 +245,7 @@ public:
*/ */
LIB_PIN* GetPin( const wxString& number ); LIB_PIN* GetPin( const wxString& number );
virtual void Draw( WinEDA_DrawPanel* panel, virtual void Draw( EDA_DRAW_PANEL* panel,
wxDC* DC, wxDC* DC,
const wxPoint& offset, const wxPoint& offset,
int draw_mode, int draw_mode,
...@@ -254,7 +254,7 @@ public: ...@@ -254,7 +254,7 @@ public:
Draw( panel, DC, offset, draw_mode, Color, true ); Draw( panel, DC, offset, draw_mode, Color, true );
} }
void Draw( WinEDA_DrawPanel* panel, void Draw( EDA_DRAW_PANEL* panel,
wxDC* DC, wxDC* DC,
const wxPoint& offset, const wxPoint& offset,
int draw_mode, int draw_mode,
......
...@@ -82,7 +82,7 @@ int SCH_FIELD::GetPenSize() const ...@@ -82,7 +82,7 @@ int SCH_FIELD::GetPenSize() const
} }
void SCH_FIELD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, void SCH_FIELD::Draw( EDA_DRAW_PANEL* panel, wxDC* DC,
const wxPoint& offset, int DrawMode, int Color ) const wxPoint& offset, int DrawMode, int Color )
{ {
int orient; int orient;
......
...@@ -100,7 +100,7 @@ public: ...@@ -100,7 +100,7 @@ public:
/** /**
* Function Draw * Function Draw
*/ */
void Draw( WinEDA_DrawPanel* aPanel, void Draw( EDA_DRAW_PANEL* aPanel,
wxDC* aDC, wxDC* aDC,
const wxPoint& aOffset, const wxPoint& aOffset,
int aDrawMode, int aDrawMode,
......
...@@ -100,7 +100,7 @@ EDA_Rect SCH_JUNCTION::GetBoundingBox() const ...@@ -100,7 +100,7 @@ EDA_Rect SCH_JUNCTION::GetBoundingBox() const
} }
void SCH_JUNCTION::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, void SCH_JUNCTION::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aDrawMode, int aColor ) int aDrawMode, int aColor )
{ {
int color; int color;
......
...@@ -40,7 +40,7 @@ public: ...@@ -40,7 +40,7 @@ public:
SCH_JUNCTION* GenCopy(); SCH_JUNCTION* GenCopy();
virtual void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, virtual void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aDrawMode, int aColor = -1 ); int aDrawMode, int aColor = -1 );
/** /**
......
...@@ -188,7 +188,7 @@ int SCH_LINE::GetPenSize() const ...@@ -188,7 +188,7 @@ int SCH_LINE::GetPenSize() const
} }
void SCH_LINE::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, void SCH_LINE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset,
int DrawMode, int Color ) int DrawMode, int Color )
{ {
int color; int color;
...@@ -420,9 +420,15 @@ bool SCH_LINE::doHitTest( const wxPoint& aPoint, int aAccuracy, SCH_FILTER_T aFi ...@@ -420,9 +420,15 @@ bool SCH_LINE::doHitTest( const wxPoint& aPoint, int aAccuracy, SCH_FILTER_T aFi
|| ( ( aFilter & WIRE_T ) && ( m_Layer == LAYER_WIRE ) ) || ( ( aFilter & WIRE_T ) && ( m_Layer == LAYER_WIRE ) )
|| ( ( aFilter & BUS_T ) && ( m_Layer == LAYER_BUS ) ) ) || ( ( aFilter & BUS_T ) && ( m_Layer == LAYER_BUS ) ) )
{ {
if( ( aFilter & EXCLUDE_WIRE_BUS_ENDPOINTS && IsEndPoint( aPoint ) ) if( !TestSegmentHit( aPoint, m_Start, m_End, aAccuracy ) )
|| ( aFilter & WIRE_BUS_ENDPOINTS_ONLY && !IsEndPoint( aPoint ) ) return false;
|| ( TestSegmentHit( aPoint, m_Start, m_End, aAccuracy ) ) )
if( ( aFilter & EXCLUDE_WIRE_BUS_ENDPOINTS ) && IsEndPoint( aPoint ) )
return false;
if( ( aFilter & WIRE_BUS_ENDPOINTS_ONLY ) && !IsEndPoint( aPoint ) )
return false;
return true; return true;
} }
......
...@@ -54,7 +54,7 @@ public: ...@@ -54,7 +54,7 @@ public:
*/ */
EDA_Rect GetBoundingBox() const; EDA_Rect GetBoundingBox() const;
virtual void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, virtual void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aDrawMode, int aColor = -1 ); int aDrawMode, int aColor = -1 );
/** /**
......
...@@ -92,7 +92,7 @@ bool SCH_MARKER::Save( FILE* aFile ) const ...@@ -92,7 +92,7 @@ bool SCH_MARKER::Save( FILE* aFile ) const
} }
void SCH_MARKER::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, void SCH_MARKER::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
const wxPoint& aOffset, int aDrawMode, int aColor ) const wxPoint& aOffset, int aDrawMode, int aColor )
{ {
EDA_Colors color = (EDA_Colors) m_Color; EDA_Colors color = (EDA_Colors) m_Color;
...@@ -147,7 +147,7 @@ EDA_Rect SCH_MARKER::GetBoundingBox() const ...@@ -147,7 +147,7 @@ EDA_Rect SCH_MARKER::GetBoundingBox() const
} }
void SCH_MARKER::DisplayInfo( WinEDA_DrawFrame* aFrame ) void SCH_MARKER::DisplayInfo( EDA_DRAW_FRAME* aFrame )
{ {
if( aFrame == NULL ) if( aFrame == NULL )
return; return;
......
...@@ -38,7 +38,7 @@ public: ...@@ -38,7 +38,7 @@ public:
return wxT( "SCH_MARKER" ); return wxT( "SCH_MARKER" );
} }
virtual void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, virtual void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aDraw_mode, int aColor = -1 ); int aDraw_mode, int aColor = -1 );
/** /**
...@@ -93,7 +93,7 @@ public: ...@@ -93,7 +93,7 @@ public:
* *
* @param aFrame - Top window that owns the message panel. * @param aFrame - Top window that owns the message panel.
*/ */
void DisplayInfo( WinEDA_DrawFrame* aFrame ); void DisplayInfo( EDA_DRAW_FRAME* aFrame );
virtual bool IsSelectStateChanged( const wxRect& aRect ); virtual bool IsSelectStateChanged( const wxRect& aRect );
......
...@@ -90,7 +90,7 @@ int SCH_NO_CONNECT::GetPenSize() const ...@@ -90,7 +90,7 @@ int SCH_NO_CONNECT::GetPenSize() const
} }
void SCH_NO_CONNECT::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, void SCH_NO_CONNECT::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aDrawMode, int aColor ) int aDrawMode, int aColor )
{ {
int pX, pY, color; int pX, pY, color;
......
...@@ -34,7 +34,7 @@ public: ...@@ -34,7 +34,7 @@ public:
*/ */
virtual int GetPenSize() const; virtual int GetPenSize() const;
virtual void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, virtual void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aDrawMode, int aColor = -1 ); int aDrawMode, int aColor = -1 );
/** /**
......
...@@ -139,7 +139,7 @@ int SCH_POLYLINE::GetPenSize() const ...@@ -139,7 +139,7 @@ int SCH_POLYLINE::GetPenSize() const
} }
void SCH_POLYLINE::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, void SCH_POLYLINE::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aDrawMode, int aColor ) int aDrawMode, int aColor )
{ {
int color; int color;
......
...@@ -28,7 +28,7 @@ public: ...@@ -28,7 +28,7 @@ public:
return wxT( "SCH_POLYLINE" ); return wxT( "SCH_POLYLINE" );
} }
virtual void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, virtual void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
int aDrawMode, int aColor = -1 ); int aDrawMode, int aColor = -1 );
/** /**
......
...@@ -91,9 +91,6 @@ SCH_SCREEN::~SCH_SCREEN() ...@@ -91,9 +91,6 @@ SCH_SCREEN::~SCH_SCREEN()
void SCH_SCREEN::IncRefCount() void SCH_SCREEN::IncRefCount()
{ {
m_refCount++; m_refCount++;
wxLogDebug( wxT("Screen %s reference count after increment is %d." ),
GetChars( GetFileName() ), m_refCount );
} }
...@@ -102,9 +99,6 @@ void SCH_SCREEN::DecRefCount() ...@@ -102,9 +99,6 @@ void SCH_SCREEN::DecRefCount()
wxCHECK_RET( m_refCount != 0, wxCHECK_RET( m_refCount != 0,
wxT( "Screen reference count already zero. Bad programmer!" ) ); wxT( "Screen reference count already zero. Bad programmer!" ) );
m_refCount--; m_refCount--;
wxLogDebug( wxT("Screen %s reference count after decrement is %d." ),
GetChars( GetFileName() ), m_refCount );
} }
...@@ -220,8 +214,10 @@ SCH_ITEM* SCH_SCREEN::ExtractWires( bool CreateCopy ) ...@@ -220,8 +214,10 @@ SCH_ITEM* SCH_SCREEN::ExtractWires( bool CreateCopy )
* - Includes segments or buses aligned in only 1 segment * - Includes segments or buses aligned in only 1 segment
* - Detects identical objects superimposed * - Detects identical objects superimposed
*/ */
bool SCH_SCREEN::SchematicCleanUp( wxDC* DC ) bool SCH_SCREEN::SchematicCleanUp( EDA_DRAW_PANEL* aCanvas, wxDC* aDC )
{ {
wxASSERT( aCanvas != NULL );
SCH_ITEM* DrawList, * TstDrawList; SCH_ITEM* DrawList, * TstDrawList;
bool Modify = FALSE; bool Modify = FALSE;
...@@ -262,9 +258,7 @@ bool SCH_SCREEN::SchematicCleanUp( wxDC* DC ) ...@@ -262,9 +258,7 @@ bool SCH_SCREEN::SchematicCleanUp( wxDC* DC )
} }
} }
SCH_EDIT_FRAME* frame; TestDanglingEnds( aCanvas, aDC );
frame = (SCH_EDIT_FRAME*) wxGetApp().GetTopWindow();
frame->TestDanglingEnds( GetDrawItems(), DC );
return Modify; return Modify;
} }
...@@ -328,7 +322,7 @@ bool SCH_SCREEN::Save( FILE* aFile ) const ...@@ -328,7 +322,7 @@ bool SCH_SCREEN::Save( FILE* aFile ) const
} }
void SCH_SCREEN::Draw( WinEDA_DrawPanel* aCanvas, wxDC* aDC, int aDrawMode, int aColor ) void SCH_SCREEN::Draw( EDA_DRAW_PANEL* aCanvas, wxDC* aDC, int aDrawMode, int aColor )
{ {
for( SCH_ITEM* item = GetDrawItems(); item != NULL; item = item->Next() ) for( SCH_ITEM* item = GetDrawItems(); item != NULL; item = item->Next() )
{ {
...@@ -608,7 +602,8 @@ void SCH_SCREEN::addConnectedItemsToBlock( const wxPoint& position ) ...@@ -608,7 +602,8 @@ void SCH_SCREEN::addConnectedItemsToBlock( const wxPoint& position )
picker.m_PickedItem = item; picker.m_PickedItem = item;
picker.m_PickedItemType = item->Type(); picker.m_PickedItemType = item->Type();
if( !item->IsConnectable() || !item->IsConnected( position ) || (item->m_Flags & SKIP_STRUCT) ) if( !item->IsConnectable() || !item->IsConnected( position )
|| (item->m_Flags & SKIP_STRUCT) )
continue; continue;
if( item->IsSelected() && item->Type() != SCH_LINE_T ) if( item->IsSelected() && item->Type() != SCH_LINE_T )
...@@ -664,6 +659,88 @@ int SCH_SCREEN::UpdatePickList() ...@@ -664,6 +659,88 @@ int SCH_SCREEN::UpdatePickList()
} }
bool SCH_SCREEN::TestDanglingEnds( EDA_DRAW_PANEL* aCanvas, wxDC* aDC )
{
SCH_ITEM* item;
std::vector< DANGLING_END_ITEM > endPoints;
bool hasDanglingEnds = false;
for( item = GetDrawItems(); item != NULL; item = item->Next() )
item->GetEndPoints( endPoints );
for( item = GetDrawItems(); item; item = item->Next() )
{
if( item->IsDanglingStateChanged( endPoints ) && ( aCanvas != NULL ) && ( aDC != NULL ) )
{
item->Draw( aCanvas, aDC, wxPoint( 0, 0 ), g_XorMode );
item->Draw( aCanvas, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
if( item->IsDangling() )
hasDanglingEnds = true;
}
}
return hasDanglingEnds;
}
bool SCH_SCREEN::BreakSegment( const wxPoint& aPoint )
{
SCH_LINE* segment;
SCH_LINE* newSegment;
bool brokenSegments = false;
SCH_FILTER_T filter = ( SCH_FILTER_T ) ( WIRE_T | BUS_T | EXCLUDE_ENDPOINTS_T );
for( SCH_ITEM* item = GetDrawItems(); item != NULL; item = item->Next() )
{
if( item->Type() != SCH_LINE_T )
continue;
segment = (SCH_LINE*) item;
if( !segment->HitTest( aPoint, 0, filter ) )
continue;
// Break the segment at aPoint and create a new segment.
newSegment = new SCH_LINE( *segment );
newSegment->m_Start = aPoint;
segment->m_End = newSegment->m_Start;
newSegment->SetNext( segment->Next() );
segment->SetNext( newSegment );
item = newSegment;
brokenSegments = true;
}
return brokenSegments;
}
bool SCH_SCREEN::BreakSegmentsOnJunctions()
{
bool brokenSegments = false;
for( SCH_ITEM* item = GetDrawItems(); item != NULL; item = item->Next() )
{
if( item->Type() == SCH_JUNCTION_T )
{
SCH_JUNCTION* junction = ( SCH_JUNCTION* ) item;
if( BreakSegment( junction->m_Pos ) )
brokenSegments = true;
}
else if( item->Type() == SCH_BUS_ENTRY_T )
{
SCH_BUS_ENTRY* busEntry = ( SCH_BUS_ENTRY* ) item;
if( BreakSegment( busEntry->m_Pos ) || BreakSegment( busEntry->m_End() ) )
brokenSegments = true;
}
}
return brokenSegments;
}
/******************************************************************/ /******************************************************************/
/* Class SCH_SCREENS to handle the list of screens in a hierarchy */ /* Class SCH_SCREENS to handle the list of screens in a hierarchy */
/******************************************************************/ /******************************************************************/
...@@ -783,7 +860,7 @@ void SCH_SCREENS::SchematicCleanUp() ...@@ -783,7 +860,7 @@ void SCH_SCREENS::SchematicCleanUp()
{ {
// if wire list has changed, delete the undo/redo list to avoid // if wire list has changed, delete the undo/redo list to avoid
// pointer problems with deleted data. // pointer problems with deleted data.
if( m_screens[i]->SchematicCleanUp( NULL ) ) if( m_screens[i]->SchematicCleanUp() )
m_screens[i]->ClearUndoRedoList(); m_screens[i]->ClearUndoRedoList();
} }
} }
......
...@@ -536,7 +536,7 @@ wxPoint SCH_SHEET::GetFileNamePosition() ...@@ -536,7 +536,7 @@ wxPoint SCH_SHEET::GetFileNamePosition()
} }
void SCH_SHEET::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, void SCH_SHEET::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
const wxPoint& aOffset, int aDrawMode, int aColor ) const wxPoint& aOffset, int aDrawMode, int aColor )
{ {
int txtcolor; int txtcolor;
...@@ -783,7 +783,7 @@ wxString SCH_SHEET::GetFileName( void ) ...@@ -783,7 +783,7 @@ wxString SCH_SHEET::GetFileName( void )
} }
void SCH_SHEET::DisplayInfo( WinEDA_DrawFrame* frame ) void SCH_SHEET::DisplayInfo( EDA_DRAW_FRAME* frame )
{ {
frame->ClearMsgPanel(); frame->ClearMsgPanel();
frame->AppendMsgPanel( _( "Sheet name" ), m_SheetName, CYAN ); frame->AppendMsgPanel( _( "Sheet name" ), m_SheetName, CYAN );
......
...@@ -65,7 +65,7 @@ public: ...@@ -65,7 +65,7 @@ public:
bool operator ==( const SCH_SHEET_PIN* aPin ) const; bool operator ==( const SCH_SHEET_PIN* aPin ) const;
virtual void Draw( WinEDA_DrawPanel* aPanel, virtual void Draw( EDA_DRAW_PANEL* aPanel,
wxDC* aDC, wxDC* aDC,
const wxPoint& aOffset, const wxPoint& aOffset,
int aDraw_mode, int aDraw_mode,
...@@ -273,7 +273,7 @@ public: ...@@ -273,7 +273,7 @@ public:
void Place( SCH_EDIT_FRAME* frame, wxDC* DC ); void Place( SCH_EDIT_FRAME* frame, wxDC* DC );
void DisplayInfo( WinEDA_DrawFrame* frame ); void DisplayInfo( EDA_DRAW_FRAME* frame );
/* there is no member for orientation in sch_sheet, to preserve file /* there is no member for orientation in sch_sheet, to preserve file
* format, we detect orientation based on pin edges * format, we detect orientation based on pin edges
...@@ -356,7 +356,7 @@ public: ...@@ -356,7 +356,7 @@ public:
* @param aColor = color used to draw sheet. Usually -1 to use the normal * @param aColor = color used to draw sheet. Usually -1 to use the normal
* color for sheet items * color for sheet items
*/ */
void Draw( WinEDA_DrawPanel* aPanel, void Draw( EDA_DRAW_PANEL* aPanel,
wxDC* aDC, wxDC* aDC,
const wxPoint& aOffset, const wxPoint& aOffset,
int aDrawMode, int aDrawMode,
......
...@@ -66,7 +66,7 @@ EDA_ITEM* SCH_SHEET_PIN::doClone() const ...@@ -66,7 +66,7 @@ EDA_ITEM* SCH_SHEET_PIN::doClone() const
} }
void SCH_SHEET_PIN::Draw( WinEDA_DrawPanel* aPanel, void SCH_SHEET_PIN::Draw( EDA_DRAW_PANEL* aPanel,
wxDC* aDC, wxDC* aDC,
const wxPoint& aOffset, const wxPoint& aOffset,
int aDraw_mode, int aDraw_mode,
......
...@@ -361,7 +361,7 @@ int SCH_TEXT::GetPenSize() const ...@@ -361,7 +361,7 @@ int SCH_TEXT::GetPenSize() const
} }
void SCH_TEXT::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& aOffset, void SCH_TEXT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& aOffset,
int DrawMode, int Color ) int DrawMode, int Color )
{ {
EDA_Colors color; EDA_Colors color;
...@@ -791,7 +791,7 @@ bool SCH_LABEL::Load( LINE_READER& aLine, wxString& aErrorMsg ) ...@@ -791,7 +791,7 @@ bool SCH_LABEL::Load( LINE_READER& aLine, wxString& aErrorMsg )
} }
void SCH_LABEL::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, void SCH_LABEL::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset,
int DrawMode, int Color ) int DrawMode, int Color )
{ {
SCH_TEXT::Draw( panel, DC, offset, DrawMode, Color ); SCH_TEXT::Draw( panel, DC, offset, DrawMode, Color );
...@@ -1098,7 +1098,7 @@ void SCH_GLOBALLABEL::SetSchematicTextOrientation( int aSchematicOrientation ) ...@@ -1098,7 +1098,7 @@ void SCH_GLOBALLABEL::SetSchematicTextOrientation( int aSchematicOrientation )
} }
void SCH_GLOBALLABEL::Draw( WinEDA_DrawPanel* panel, void SCH_GLOBALLABEL::Draw( EDA_DRAW_PANEL* panel,
wxDC* DC, wxDC* DC,
const wxPoint& aOffset, const wxPoint& aOffset,
int DrawMode, int DrawMode,
...@@ -1425,7 +1425,7 @@ void SCH_HIERLABEL::SetSchematicTextOrientation( int aSchematicOrientation ) ...@@ -1425,7 +1425,7 @@ void SCH_HIERLABEL::SetSchematicTextOrientation( int aSchematicOrientation )
} }
void SCH_HIERLABEL::Draw( WinEDA_DrawPanel* panel, void SCH_HIERLABEL::Draw( EDA_DRAW_PANEL* panel,
wxDC* DC, wxDC* DC,
const wxPoint& offset, const wxPoint& offset,
int DrawMode, int DrawMode,
......
...@@ -101,7 +101,7 @@ public: ...@@ -101,7 +101,7 @@ public:
SCH_TEXT* GenCopy(); SCH_TEXT* GenCopy();
virtual void Draw( WinEDA_DrawPanel* panel, virtual void Draw( EDA_DRAW_PANEL* panel,
wxDC* DC, wxDC* DC,
const wxPoint& offset, const wxPoint& offset,
int draw_mode, int draw_mode,
...@@ -220,7 +220,7 @@ public: ...@@ -220,7 +220,7 @@ public:
~SCH_LABEL() { } ~SCH_LABEL() { }
virtual void Draw( WinEDA_DrawPanel* panel, virtual void Draw( EDA_DRAW_PANEL* panel,
wxDC* DC, wxDC* DC,
const wxPoint& offset, const wxPoint& offset,
int draw_mode, int draw_mode,
...@@ -305,7 +305,7 @@ public: ...@@ -305,7 +305,7 @@ public:
~SCH_GLOBALLABEL() { } ~SCH_GLOBALLABEL() { }
virtual void Draw( WinEDA_DrawPanel* panel, virtual void Draw( EDA_DRAW_PANEL* panel,
wxDC* DC, wxDC* DC,
const wxPoint& offset, const wxPoint& offset,
int draw_mode, int draw_mode,
...@@ -406,7 +406,7 @@ public: ...@@ -406,7 +406,7 @@ public:
~SCH_HIERLABEL() { } ~SCH_HIERLABEL() { }
virtual void Draw( WinEDA_DrawPanel* panel, virtual void Draw( EDA_DRAW_PANEL* panel,
wxDC* DC, wxDC* DC,
const wxPoint& offset, const wxPoint& offset,
int draw_mode, int draw_mode,
......
...@@ -317,7 +317,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -317,7 +317,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
DeleteConnection( id == ID_POPUP_SCH_DELETE_CONNECTION ? TRUE : FALSE ); DeleteConnection( id == ID_POPUP_SCH_DELETE_CONNECTION ? TRUE : FALSE );
screen->SetCurItem( NULL ); screen->SetCurItem( NULL );
m_itemToRepeat = NULL; m_itemToRepeat = NULL;
TestDanglingEnds( screen->GetDrawItems(), &dc ); screen->TestDanglingEnds( DrawPanel, &dc );
DrawPanel->Refresh(); DrawPanel->Refresh();
break; break;
...@@ -325,12 +325,12 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -325,12 +325,12 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
{ {
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
SCH_ITEM* oldWiresList = screen->ExtractWires( true ); SCH_ITEM* oldWiresList = screen->ExtractWires( true );
BreakSegment( screen, screen->m_Curseur ); screen->BreakSegment( screen->m_Curseur );
if( oldWiresList ) if( oldWiresList )
SaveCopyInUndoList( oldWiresList, UR_WIRE_IMAGE ); SaveCopyInUndoList( oldWiresList, UR_WIRE_IMAGE );
TestDanglingEnds( screen->GetDrawItems(), &dc ); screen->TestDanglingEnds( DrawPanel, &dc );
} }
break; break;
...@@ -353,7 +353,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -353,7 +353,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
DeleteStruct( DrawPanel, &dc, item ); DeleteStruct( DrawPanel, &dc, item );
screen->SetCurItem( NULL ); screen->SetCurItem( NULL );
m_itemToRepeat = NULL; m_itemToRepeat = NULL;
TestDanglingEnds( screen->GetDrawItems(), &dc ); screen->TestDanglingEnds( DrawPanel, &dc );
SetSheetNumberAndCount(); SetSheetNumberAndCount();
OnModify(); OnModify();
} }
...@@ -371,7 +371,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -371,7 +371,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_RESIZE_SHEET: case ID_POPUP_SCH_RESIZE_SHEET:
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
ReSizeSheet( (SCH_SHEET*) screen->GetCurItem(), &dc ); ReSizeSheet( (SCH_SHEET*) screen->GetCurItem(), &dc );
TestDanglingEnds( screen->GetDrawItems(), &dc ); screen->TestDanglingEnds( DrawPanel, &dc );
break; break;
case ID_POPUP_SCH_EDIT_SHEET: case ID_POPUP_SCH_EDIT_SHEET:
...@@ -717,7 +717,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -717,7 +717,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_ADD_JUNCTION: case ID_POPUP_SCH_ADD_JUNCTION:
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
screen->SetCurItem( CreateNewJunctionStruct( &dc, screen->m_Curseur, true ) ); screen->SetCurItem( CreateNewJunctionStruct( &dc, screen->m_Curseur, true ) );
TestDanglingEnds( screen->GetDrawItems(), &dc ); screen->TestDanglingEnds( DrawPanel, &dc );
screen->SetCurItem( NULL ); screen->SetCurItem( NULL );
break; break;
...@@ -728,7 +728,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -728,7 +728,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
if( screen->GetCurItem() ) if( screen->GetCurItem() )
{ {
( (SCH_ITEM*) screen->GetCurItem() )->Place( this, &dc ); ( (SCH_ITEM*) screen->GetCurItem() )->Place( this, &dc );
TestDanglingEnds( screen->GetDrawItems(), &dc ); screen->TestDanglingEnds( DrawPanel, &dc );
screen->SetCurItem( NULL ); screen->SetCurItem( NULL );
} }
break; break;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment