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
}
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,
GRTraceMode aFillMode, EDA_Colors aAnchor_color )
{
......@@ -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,
int aDrawMode, GRTraceMode aFillMode,
EDA_Colors aAnchor_color,
......
/**
* WinEDA_BasicFrame Class Functions
* EDA_BASE_FRAME Class Functions
* @file basicframe.cpp
*/
......@@ -23,14 +23,14 @@
#include "bitmaps.h"
/*
* Class constructor for WinEDA_BasicFrame general options
* Class constructor for EDA_BASE_FRAME general options
*/
WinEDA_BasicFrame::WinEDA_BasicFrame( wxWindow* father,
int idtype,
const wxString& title,
const wxPoint& pos,
const wxSize& size,
long style ) :
EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* father,
int idtype,
const wxString& title,
const wxPoint& pos,
const wxSize& size,
long style ) :
wxFrame( father, -1, title, pos, size, style )
{
wxSize minsize;
......@@ -58,11 +58,11 @@ WinEDA_BasicFrame::WinEDA_BasicFrame( wxWindow* father,
Connect( ID_HELP_COPY_VERSION_STRING,
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 )
delete wxGetApp().m_HtmlCtrl;
......@@ -78,7 +78,7 @@ WinEDA_BasicFrame::~WinEDA_BasicFrame()
/*
* Virtual function
*/
void WinEDA_BasicFrame::ReCreateMenuBar()
void EDA_BASE_FRAME::ReCreateMenuBar()
{
}
......@@ -88,7 +88,7 @@ void WinEDA_BasicFrame::ReCreateMenuBar()
* called on a language menu selection
* 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();
......@@ -106,7 +106,7 @@ void WinEDA_BasicFrame::SetLanguage( wxCommandEvent& event )
* parameters. Don't forget to call the base method or your frames won't
* remember their positions and sizes.
*/
void WinEDA_BasicFrame::LoadSettings()
void EDA_BASE_FRAME::LoadSettings()
{
wxString text;
int Ypos_min;
......@@ -146,7 +146,7 @@ void WinEDA_BasicFrame::LoadSettings()
* parameters. Don't forget to call the base method or your frames won't
* remember their positions and sizes.
*/
void WinEDA_BasicFrame::SaveSettings()
void EDA_BASE_FRAME::SaveSettings()
{
wxString text;
wxConfig* config;
......@@ -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 );
}
......@@ -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
*/
void WinEDA_BasicFrame::DisplayActivity( int PerCent, const wxString& Text )
void EDA_BASE_FRAME::DisplayActivity( int PerCent, const wxString& Text )
{
wxString Line;
......@@ -198,7 +198,7 @@ void WinEDA_BasicFrame::DisplayActivity( int PerCent, const wxString& Text )
/*
* 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 );
ReCreateMenuBar();
......@@ -208,7 +208,7 @@ void WinEDA_BasicFrame::SetLastProject( const wxString& FullFileName )
/*
* 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;
size_t i;
......@@ -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;
......@@ -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);
ShowAboutDialog(this);
}
void WinEDA_BasicFrame::AddHelpVersionInfoMenuEntry( wxMenu* aMenu )
void EDA_BASE_FRAME::AddHelpVersionInfoMenuEntry( wxMenu* aMenu )
{
wxASSERT( aMenu != NULL );
......@@ -364,7 +364,7 @@ static inline const char* KICAD_BUILD_OPTIONS_SIGNATURE()
#endif
void WinEDA_BasicFrame::CopyVersionInfoToClipboard( wxCommandEvent& event )
void EDA_BASE_FRAME::CopyVersionInfoToClipboard( wxCommandEvent& event )
{
if( !wxTheClipboard->Open() )
{
......
......@@ -33,7 +33,7 @@ BLOCK_SELECTOR::~BLOCK_SELECTOR()
/*
* 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;
......@@ -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,
int aDrawMode,
int aColor )
......@@ -119,8 +119,7 @@ void BLOCK_SELECTOR::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC,
* Function InitData
* Init the initial values of a BLOCK_SELECTOR, before starting a block command
*/
void BLOCK_SELECTOR::InitData( WinEDA_DrawPanel* aPanel,
const wxPoint& startpos )
void BLOCK_SELECTOR::InitData( EDA_DRAW_PANEL* aPanel, const wxPoint& startpos )
{
m_State = STATE_BLOCK_INIT;
SetOrigin( startpos );
......@@ -166,8 +165,7 @@ void BLOCK_SELECTOR::PushItem( ITEM_PICKER& aItem )
/* First command block function:
* Init the Block infos: command type, initial position, and other variables..
*/
bool WinEDA_DrawFrame::HandleBlockBegin( wxDC* DC, int key,
const wxPoint& startpos )
bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* DC, int key, const wxPoint& startpos )
{
BLOCK_SELECTOR* Block = &GetBaseScreen()->m_BlockLocate;
......@@ -215,7 +213,7 @@ bool WinEDA_DrawFrame::HandleBlockBegin( wxDC* DC, int key,
{
Block->m_ItemsSelection.ClearItemsList();
DisplayError( this,
wxT( "WinEDA_DrawFrame::HandleBlockBegin() Err: ManageCurseur NULL" ) );
wxT( "EDA_DRAW_FRAME::HandleBlockBegin() Err: ManageCurseur NULL" ) );
return TRUE;
}
Block->m_State = STATE_BLOCK_MOVE;
......@@ -225,7 +223,7 @@ bool WinEDA_DrawFrame::HandleBlockBegin( wxDC* DC, int key,
default:
{
wxString msg;
msg << wxT( "WinEDA_DrawFrame::HandleBlockBegin() error: Unknown command " ) <<
msg << wxT( "EDA_DRAW_FRAME::HandleBlockBegin() error: Unknown command " ) <<
Block->m_Command;
DisplayError( this, msg );
}
......@@ -243,7 +241,7 @@ bool WinEDA_DrawFrame::HandleBlockBegin( wxDC* DC, int key,
* by Initm_BlockLocateDatas().
* 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;
......@@ -271,7 +269,7 @@ void DrawAndSizingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
/*
* Cancel Current block operation.
*/
void AbortBlockCurrentCommand( WinEDA_DrawPanel* Panel, wxDC* DC )
void AbortBlockCurrentCommand( EDA_DRAW_PANEL* Panel, wxDC* DC )
{
BASE_SCREEN* screen = Panel->GetScreen();
......
......@@ -145,7 +145,7 @@ EDA_Rect MARKER_BASE::GetBoundingBoxMarker() const
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 )
{
wxPoint corners[CORNERS_COUNT];
......@@ -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();
DIALOG_DISPLAY_HTML_TEXT_BASE infodisplay( (wxWindow*)aFrame, wxID_ANY, _( "Marker Info" ),
......
......@@ -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,
int color )
{
......
......@@ -18,7 +18,7 @@
/* Plot sheet references
* 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
Ki_PageDescr* Sheet = screen->m_CurrentSheetDesc;
......
......@@ -18,13 +18,13 @@
static const bool s_PlotBlackAndWhite = FALSE;
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
* the clipboard
*/
void WinEDA_DrawFrame::CopyToClipboard( wxCommandEvent& event )
void EDA_DRAW_FRAME::CopyToClipboard( wxCommandEvent& event )
{
DrawPage( this );
......@@ -43,7 +43,7 @@ void WinEDA_DrawFrame::CopyToClipboard( wxCommandEvent& event )
* to export drawings to other applications (word processing ...)
* 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;
......
......@@ -22,11 +22,11 @@ static unsigned s_HistoryMaxCount = 8; // Max number of items displayed in hist
* Dialog frame to choose a component or a footprint
* This dialog shows an history of last selected items
*/
DIALOG_GET_COMPONENT::DIALOG_GET_COMPONENT( WinEDA_DrawFrame* parent,
const wxPoint& framepos,
wxArrayString& HistoryList,
const wxString& Title,
bool show_extra_tool ) :
DIALOG_GET_COMPONENT::DIALOG_GET_COMPONENT( EDA_DRAW_FRAME* parent,
const wxPoint& framepos,
wxArrayString& HistoryList,
const wxString& Title,
bool show_extra_tool ) :
DIALOG_GET_COMPONENT_BASE( parent, -1, Title, framepos )
{
......
......@@ -32,7 +32,7 @@ dialog_hotkeys_editor.cpp
#include "dialog_hotkeys_editor.h"
void InstallHotkeyFrame( WinEDA_DrawFrame* parent,
void InstallHotkeyFrame( EDA_DRAW_FRAME* parent,
Ki_HotkeyInfoSectionDescriptor* hotkeys )
{
HOTKEYS_EDITOR_DIALOG dialog( parent, hotkeys );
......@@ -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 ) :
HOTKEYS_EDITOR_DIALOG_BASE( parent )
{
......
......@@ -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
*/
......@@ -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 )
{
m_Parent = parent;
......
......@@ -14,7 +14,7 @@
class DIALOG_PAGES_SETTINGS: public DIALOG_PAGES_SETTINGS_BASE
{
private:
WinEDA_DrawFrame *m_Parent;
EDA_DRAW_FRAME *m_Parent;
BASE_SCREEN * m_Screen;
int m_Modified;
Ki_PageDescr * m_SelectedSheet;
......@@ -22,7 +22,7 @@ private:
int m_CurrentSelection;
public:
DIALOG_PAGES_SETTINGS( WinEDA_DrawFrame* parent );
DIALOG_PAGES_SETTINGS( EDA_DRAW_FRAME* parent );
~DIALOG_PAGES_SETTINGS();
private:
......
......@@ -17,13 +17,13 @@ enum listbox {
BEGIN_EVENT_TABLE( WinEDAListBox, wxDialog )
EVT_BUTTON( wxID_OK, WinEDAListBox::OnOkClick )
EVT_BUTTON( wxID_CANCEL, WinEDAListBox::OnCancelClick )
EVT_LISTBOX( ID_LISTBOX_LIST, WinEDAListBox::ClickOnList )
EVT_LISTBOX_DCLICK( ID_LISTBOX_LIST, WinEDAListBox::D_ClickOnList )
EVT_CHAR( WinEDAListBox::OnKeyEvent )
EVT_CHAR_HOOK( WinEDAListBox::OnKeyEvent )
EVT_CLOSE( WinEDAListBox::OnClose )
EVT_BUTTON( wxID_OK, WinEDAListBox::OnOkClick )
EVT_BUTTON( wxID_CANCEL, WinEDAListBox::OnCancelClick )
EVT_LISTBOX( ID_LISTBOX_LIST, WinEDAListBox::ClickOnList )
EVT_LISTBOX_DCLICK( ID_LISTBOX_LIST, WinEDAListBox::D_ClickOnList )
EVT_CHAR( WinEDAListBox::OnKeyEvent )
EVT_CHAR_HOOK( WinEDAListBox::OnKeyEvent )
EVT_CLOSE( WinEDAListBox::OnClose )
END_EVENT_TABLE()
......@@ -37,7 +37,7 @@ END_EVENT_TABLE()
* @param aCallBackFunction callback function to display comments
* @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,
void(* aCallBackFunction)(wxString& Text), wxPoint aPos ) :
wxDialog( aParent, wxID_ANY, aTitle, aPos, wxDefaultSize,
......@@ -51,8 +51,8 @@ WinEDAListBox::WinEDAListBox( WinEDA_DrawFrame* aParent, const wxString& aTitle,
SetSizer( GeneralBoxSizer );
m_listBox = new wxListBox( this, ID_LISTBOX_LIST, wxDefaultPosition,
wxSize( 300, 200 ), 0, NULL,
wxLB_NEEDED_SB | wxLB_SINGLE | wxLB_HSCROLL );
wxSize( 300, 200 ), 0, NULL,
wxLB_NEEDED_SB | wxLB_SINGLE | wxLB_HSCROLL );
GeneralBoxSizer->Add( m_listBox, 0, wxGROW | wxALL, 5 );
......
This diff is collapsed.
This diff is collapsed.
......@@ -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
* the text. NULL to draw this text.
*/
void DrawGraphicText( WinEDA_DrawPanel* aPanel,
void DrawGraphicText( EDA_DRAW_PANEL* aPanel,
wxDC* aDC,
const wxPoint& aPos,
EDA_Colors aColor,
......
......@@ -56,7 +56,7 @@ WinEDA_Server* CreateServer( wxWindow* window, int service )
/* Function called on every client request.
*/
void WinEDA_DrawFrame::OnSockRequest( wxSocketEvent& evt )
void EDA_DRAW_FRAME::OnSockRequest( wxSocketEvent& evt )
{
size_t len;
wxSocketBase* sock = evt.GetSocket();
......@@ -80,7 +80,7 @@ void WinEDA_DrawFrame::OnSockRequest( wxSocketEvent& evt )
break;
default:
wxPrintf( wxT( "WinEDA_DrawFrame::OnSockRequest() error: Invalid event !" ) );
wxPrintf( wxT( "EDA_DRAW_FRAME::OnSockRequest() error: Invalid event !" ) );
break;
}
}
......@@ -88,7 +88,7 @@ void WinEDA_DrawFrame::OnSockRequest( wxSocketEvent& evt )
/* 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;
wxSocketServer* server = (wxSocketServer*) evt.GetSocket();
......
......@@ -327,7 +327,7 @@ int ReturnKeyCodeFromKeyName( const wxString& keyname )
* Displays the current hotkey list
* aList = a Ki_HotkeyInfoSectionDescriptor list(Null terminated)
*/
void DisplayHotkeyList( WinEDA_DrawFrame* aFrame,
void DisplayHotkeyList( EDA_DRAW_FRAME* aFrame,
struct Ki_HotkeyInfoSectionDescriptor* aDescList )
{
wxString keyname;
......@@ -382,8 +382,8 @@ Ki_HotkeyInfo* GetDescriptorFromHotkey( int aKey, Ki_HotkeyInfo** aList )
* the output format is: shortcut "key" "function"
* lines starting with # are comments
*/
int WinEDA_BasicFrame::WriteHotkeyConfig( struct Ki_HotkeyInfoSectionDescriptor* aDescList,
wxString* aFullFileName )
int EDA_BASE_FRAME::WriteHotkeyConfig( struct Ki_HotkeyInfoSectionDescriptor* aDescList,
wxString* aFullFileName )
{
wxString msg;
wxString keyname, infokey;
......@@ -446,9 +446,8 @@ int WinEDA_BasicFrame::WriteHotkeyConfig( struct Ki_HotkeyInfoSectionDescriptor*
* @param aFilename = file name to read.
* @param aDescList = current hotkey list descr. to initialise.
*/
int WinEDA_BasicFrame::ReadHotkeyConfigFile(
const wxString& aFilename,
struct Ki_HotkeyInfoSectionDescriptor* aDescList )
int EDA_BASE_FRAME::ReadHotkeyConfigFile( const wxString& aFilename,
struct Ki_HotkeyInfoSectionDescriptor* aDescList )
{
wxFile cfgfile( aFilename );
......@@ -493,7 +492,7 @@ void ReadHotkeyConfig( const wxString& Appname,
* Read configuration data and fill the current hotkey list with hotkeys
* 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 );
return 1;
......@@ -575,8 +574,7 @@ void ParseHotkeyConfig(
* Prompt the user for an old hotkey file to read, and read it.
* @param aDescList = current hotkey list descr. to initialise.
*/
void WinEDA_BasicFrame::ImportHotkeyConfigFromFile(
struct Ki_HotkeyInfoSectionDescriptor* aDescList )
void EDA_BASE_FRAME::ImportHotkeyConfigFromFile( struct Ki_HotkeyInfoSectionDescriptor* aDescList )
{
wxString ext = DEFAULT_HOTKEY_FILENAME_EXT;
wxString mask = wxT( "*." ) + ext;
......@@ -604,8 +602,7 @@ void WinEDA_BasicFrame::ImportHotkeyConfigFromFile(
* Prompt the user for an old hotkey file to read, and read it.
* @param aDescList = current hotkey list descr. to initialise.
*/
void WinEDA_BasicFrame::ExportHotkeyConfigToFile(
struct Ki_HotkeyInfoSectionDescriptor* aDescList )
void EDA_BASE_FRAME::ExportHotkeyConfigToFile( struct Ki_HotkeyInfoSectionDescriptor* aDescList )
{
wxString ext = DEFAULT_HOTKEY_FILENAME_EXT;
wxString mask = wxT( "*." ) + ext;
......
......@@ -17,7 +17,7 @@ BEGIN_EVENT_TABLE( WinEDA_MsgPanel, wxPanel )
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 ) :
wxPanel( parent, id, pos, size )
{
......
......@@ -928,8 +928,7 @@ Ki_WorkSheetData WS_Segm5_LT =
/* Draw the page reference sheet.
*/
void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen,
int line_width )
void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_width )
{
if( !m_Draw_Sheet_Ref )
return;
......@@ -958,7 +957,7 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen,
if( Sheet == NULL )
{
DisplayError( this,
wxT( "WinEDA_DrawFrame::TraceWorkSheet() error: NULL Sheet" ) );
wxT( "EDA_DRAW_FRAME::TraceWorkSheet() error: NULL Sheet" ) );
return;
}
......@@ -1527,8 +1526,7 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen,
* @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)
*/
wxString WinEDA_DrawFrame::GetXYSheetReferences( BASE_SCREEN* aScreen,
const wxPoint& aPosition )
wxString EDA_DRAW_FRAME::GetXYSheetReferences( BASE_SCREEN* aScreen, const wxPoint& aPosition )
{
Ki_PageDescr* Sheet = aScreen->m_CurrentSheetDesc;
int ii, xg, yg, ipas, gxpas, gypas;
......@@ -1538,7 +1536,7 @@ wxString WinEDA_DrawFrame::GetXYSheetReferences( BASE_SCREEN* aScreen,
if( Sheet == NULL )
{
DisplayError( this,
wxT( "WinEDA_DrawFrame::GetXYSheetReferences() error: NULL Sheet" ) );
wxT( "EDA_DRAW_FRAME::GetXYSheetReferences() error: NULL Sheet" ) );
return msg;
}
......@@ -1574,7 +1572,7 @@ wxString WinEDA_DrawFrame::GetXYSheetReferences( BASE_SCREEN* aScreen,
}
wxString WinEDA_DrawFrame::GetScreenDesc()
wxString EDA_DRAW_FRAME::GetScreenDesc()
{
wxString msg;
......
......@@ -24,7 +24,7 @@
*
* 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) );
AdjustScrollBars();
......@@ -52,7 +52,7 @@ void WinEDA_DrawFrame::Recadre_Trace( bool ToMouse )
* @param aCoord = coordinate to adjust
* @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;
if( aGridSize )
......@@ -74,7 +74,7 @@ void WinEDA_DrawFrame::PutOnGrid( wxPoint* aCoord , wxRealPoint* aGridSize )
/** Redraw the screen with best zoom level and the best centering
* 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
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 )
* selected area (Rect) in full window screen
* @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;
wxSize size;
......@@ -109,7 +109,7 @@ void WinEDA_DrawFrame::Window_Zoom( EDA_Rect& Rect )
* Function OnZoom
* 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 )
return;
......@@ -184,7 +184,7 @@ void WinEDA_DrawFrame::OnZoom( wxCommandEvent& event )
/* add the zoom list menu the the MasterMenu.
* used in OnRightClick(wxMouseEvent& event)
*/
void WinEDA_DrawFrame::AddMenuZoomAndGrid( wxMenu* MasterMenu )
void EDA_DRAW_FRAME::AddMenuZoomAndGrid( wxMenu* MasterMenu )
{
int maxZoomIds;
int zoom;
......
......@@ -29,7 +29,7 @@ static const wxString KeepCvpcbOpenEntry( wxT( "KeepCvpcbOpen" ) );
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 )
// Menu events
......@@ -99,10 +99,8 @@ BEGIN_EVENT_TABLE( WinEDA_CvpcbFrame, WinEDA_BasicFrame )
WinEDA_CvpcbFrame::OnUpdateKeepOpenOnSave )
END_EVENT_TABLE()
WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title,
long style ) :
WinEDA_BasicFrame( NULL, CVPCB_FRAME, title, wxDefaultPosition,
wxDefaultSize, style )
WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title, long style ) :
EDA_BASE_FRAME( NULL, CVPCB_FRAME, title, wxDefaultPosition, wxDefaultSize, style )
{
m_FrameName = wxT( "CvpcbFrame" );
......@@ -213,7 +211,7 @@ void WinEDA_CvpcbFrame::LoadSettings()
wxConfig* cfg = wxGetApp().m_EDA_Config;
WinEDA_BasicFrame::LoadSettings();
EDA_BASE_FRAME::LoadSettings();
cfg->Read( KeepCvpcbOpenEntry, &m_KeepCvpcbOpen, false );
cfg->Read( FootprintDocFileEntry, &m_DocModulesFileName,
DEFAULT_FOOTPRINTS_LIST_FILENAME );
......@@ -232,7 +230,7 @@ void WinEDA_CvpcbFrame::SaveSettings()
wxConfig* cfg = wxGetApp().m_EDA_Config;
WinEDA_BasicFrame::SaveSettings();
EDA_BASE_FRAME::SaveSettings();
cfg->Write( KeepCvpcbOpenEntry, m_KeepCvpcbOpen );
cfg->Write( FootprintDocFileEntry, m_DocModulesFileName );
}
......@@ -503,7 +501,7 @@ void WinEDA_CvpcbFrame::DisplayModule( 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;
/**
* The CVPcb application main window.
*/
class WinEDA_CvpcbFrame : public WinEDA_BasicFrame
class WinEDA_CvpcbFrame : public EDA_BASE_FRAME
{
public:
......
......@@ -108,7 +108,7 @@ void DISPLAY_FOOTPRINTS_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
/*
* 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 )
{
......
......@@ -18,7 +18,6 @@ set(EESCHEMA_SRCS
class_libentry.cpp
class_library.cpp
class_netlist_object.cpp
cleanup.cpp
cmp_library_keywords.cpp
cmp_library_lexer.cpp
component_references_lister.cpp
......
......@@ -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 Mirror_X_ListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& aMirrorPoint );
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,
PICKED_ITEMS_LIST& aItemsList,
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
......@@ -178,7 +178,7 @@ void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
block->m_Command = BLOCK_IDLE;
GetScreen()->SetCurItem( NULL );
TestDanglingEnds( GetScreen()->GetDrawItems(), DC );
GetScreen()->TestDanglingEnds( DrawPanel, DC );
if( block->GetCount() )
{
......@@ -234,7 +234,7 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
break;
case BLOCK_DRAG: /* Drag */
BreakSegmentOnJunction( GetScreen() );
GetScreen()->BreakSegmentsOnJunctions();
// fall through
case BLOCK_ROTATE:
case BLOCK_MIRROR_X:
......@@ -272,7 +272,7 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
}
block->ClearItemsList();
TestDanglingEnds( GetScreen()->GetDrawItems(), DC );
GetScreen()->TestDanglingEnds( DrawPanel, DC );
DrawPanel->Refresh();
break;
......@@ -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:
block->ClearItemsList();
BreakSegmentOnJunction( GetScreen() );
GetScreen()->BreakSegmentsOnJunctions();
GetScreen()->UpdatePickList();
if( block->GetCount() )
......@@ -399,7 +398,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
OnModify();
}
TestDanglingEnds( GetScreen()->GetDrawItems(), DC );
GetScreen()->TestDanglingEnds( DrawPanel, DC );
DrawPanel->Refresh();
break;
......@@ -435,7 +434,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
OnModify();
}
TestDanglingEnds( GetScreen()->GetDrawItems(), DC );
GetScreen()->TestDanglingEnds( DrawPanel, DC );
DrawPanel->Refresh();
break;
......@@ -452,7 +451,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
Mirror_X_ListOfItems( block->m_ItemsSelection, mirrorPoint );
OnModify();
}
TestDanglingEnds( GetScreen()->GetDrawItems(), DC );
GetScreen()->TestDanglingEnds( DrawPanel, DC );
DrawPanel->Refresh();
break;
......@@ -470,7 +469,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
OnModify();
}
TestDanglingEnds( GetScreen()->GetDrawItems(), DC );
GetScreen()->TestDanglingEnds( DrawPanel, DC );
DrawPanel->Refresh();
break;
......@@ -495,7 +494,7 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
/* Traces the outline of the search block structures
* 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;;
BASE_SCREEN* screen = panel->GetScreen();
......
......@@ -15,7 +15,7 @@
#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 )
* Traces the outline of the search block structures
* 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;
BASE_SCREEN* screen = panel->GetScreen();
......
......@@ -25,8 +25,8 @@
/* Routines Locales */
static void Show_Polyline_in_Ghost( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
static void AbortCreateNewLine( WinEDA_DrawPanel* Panel, wxDC* DC );
static void Show_Polyline_in_Ghost( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase );
static void AbortCreateNewLine( EDA_DRAW_PANEL* Panel, wxDC* DC );
static bool IsTerminalPoint( SCH_SCREEN* screen, const wxPoint& pos, int layer );
static bool IsJunctionNeeded( SCH_EDIT_FRAME* frame, wxPoint& pos );
static void ComputeBreakPoint( SCH_LINE* segment, const wxPoint& new_pos );
......@@ -73,7 +73,7 @@ static void RestoreOldWires( SCH_SCREEN* screen )
/**
* 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* segment;
......@@ -150,7 +150,7 @@ void SCH_EDIT_FRAME::BeginSegment( wxDC* DC, int type )
{
s_ConnexionStartPoint = cursorpos;
s_OldWiresList = GetScreen()->ExtractWires( TRUE );
GetScreen()->SchematicCleanUp( NULL );
GetScreen()->SchematicCleanUp( DrawPanel );
switch( type )
{
......@@ -322,7 +322,7 @@ void SCH_EDIT_FRAME::EndSegment( wxDC* DC )
alt_end_point = lastsegment->m_Start;
}
GetScreen()->SchematicCleanUp( NULL );
GetScreen()->SchematicCleanUp( DrawPanel );
/* clear flags and find last segment entered, for repeat function */
segment = (SCH_LINE*) GetScreen()->GetDrawItems();
......@@ -353,7 +353,7 @@ void SCH_EDIT_FRAME::EndSegment( wxDC* DC )
if( IsJunctionNeeded( this, s_ConnexionStartPoint ) )
CreateNewJunctionStruct( DC, s_ConnexionStartPoint );
TestDanglingEnds( GetScreen()->GetDrawItems(), DC );
GetScreen()->TestDanglingEnds( DrawPanel, DC );
/* Redraw wires and junctions which can be changed by TestDanglingEnds() */
DrawPanel->CursorOff( DC ); // Erase schematic cursor
......@@ -432,7 +432,7 @@ static void ComputeBreakPoint( SCH_LINE* segment, const wxPoint& new_pos )
/* 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();
int color;
......@@ -541,7 +541,7 @@ SCH_NO_CONNECT* SCH_EDIT_FRAME::CreateNewNoConnectStruct( wxDC* DC )
/* 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();
......@@ -608,7 +608,7 @@ void SCH_EDIT_FRAME::RepeatDrawItem( wxDC* DC )
{
m_itemToRepeat->SetNext( GetScreen()->GetDrawItems() );
GetScreen()->SetDrawItems( m_itemToRepeat );
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL );
GetScreen()->TestDanglingEnds();
m_itemToRepeat->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
SaveCopyInUndoList( m_itemToRepeat, UR_NEW );
m_itemToRepeat->m_Flags = 0;
......
......@@ -20,7 +20,7 @@ static int s_LastShape = '\\';
static wxPoint ItemInitialPosition;
static void ExitBusEntry( WinEDA_DrawPanel* Panel, wxDC* DC )
static void ExitBusEntry( EDA_DRAW_PANEL* Panel, wxDC* DC )
{
/* Exit bus entry mode. */
SCH_BUS_ENTRY* BusEntry = (SCH_BUS_ENTRY*) Panel->GetScreen()->GetCurItem();
......@@ -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
BASE_SCREEN* screen = panel->GetScreen();
......@@ -139,7 +139,7 @@ void SCH_EDIT_FRAME::SetBusEntryShape( wxDC* DC, SCH_BUS_ENTRY* BusEntry, int en
break;
}
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL );
GetScreen()->TestDanglingEnds();
BusEntry->Draw( DrawPanel, DC, wxPoint( 0, 0 ), g_XorMode );
OnModify( );
}
......
......@@ -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,
bool aShowPinText, bool aDrawFields, bool aOnlySelected )
{
......@@ -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 );
......
......@@ -330,7 +330,7 @@ public:
* @param aOnlySelected - Draws only the body items that are selected.
* 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,
const TRANSFORM& aTransform = DefaultTransform,
bool aShowPinText = true, bool aDrawFields = true,
......@@ -362,7 +362,7 @@ public:
* @param aPanel - Panel to remove part from.
* @param aDc - Device context to remove part from.
*/
void RemoveDrawItem( LIB_DRAW_ITEM* aItem, WinEDA_DrawPanel* aPanel = NULL, wxDC* aDc = NULL );
void RemoveDrawItem( LIB_DRAW_ITEM* aItem, EDA_DRAW_PANEL* aPanel = NULL, wxDC* aDc = NULL );
/**
* 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 )
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 @@
* Place the name of the component has loaded, select from a list in
* BufName
*/
wxString DataBaseGetName( WinEDA_DrawFrame* frame, wxString& Keys, wxString& BufName )
wxString DataBaseGetName( EDA_DRAW_FRAME* frame, wxString& Keys, wxString& BufName )
{
wxArrayString nameList;
wxString msg;
......
......@@ -18,7 +18,7 @@
// 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 )
/* Clear .m_Flags member for all items */
screen->ClearDrawingState();
BreakSegmentOnJunction( screen );
screen->BreakSegmentsOnJunctions();
/* Locate all the wires, bus or junction under the mouse cursor, and put
* them in a list of items to delete
......@@ -314,7 +314,7 @@ bool LocateAndDeleteItem( SCH_EDIT_FRAME* frame, wxDC* DC )
{
frame->SetRepeatItem( NULL );
DeleteStruct( frame->DrawPanel, DC, DelStruct );
frame->TestDanglingEnds( frame->GetScreen()->GetDrawItems(), DC );
frame->GetScreen()->TestDanglingEnds( frame->DrawPanel, DC );
frame->OnModify( );
item_deleted = TRUE;
}
......
......@@ -37,7 +37,7 @@ static int s_PlotBlackAndWhite = 0;
/*!
* 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 )
{
m_Parent = parent;
......@@ -174,11 +174,11 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref )
}
bool DIALOG_SVG_PRINT::DrawSVGPage( WinEDA_DrawFrame* frame,
const wxString& FullFileName,
SCH_SCREEN* screen,
bool aPrintBlackAndWhite,
bool aPrint_Sheet_Ref )
bool DIALOG_SVG_PRINT::DrawSVGPage( EDA_DRAW_FRAME* frame,
const wxString& FullFileName,
SCH_SCREEN* screen,
bool aPrintBlackAndWhite,
bool aPrint_Sheet_Ref )
{
int tmpzoom;
wxPoint tmp_startvisu;
......@@ -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
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
// to print floating point numbers like 1.3)
......
......@@ -3,7 +3,7 @@
#define _DIALOG_SVG_PRINT_H_
class WinEDA_DrawFrame;
class EDA_DRAW_FRAME;
class BASE_SCREEN;
......@@ -13,11 +13,11 @@ class BASE_SCREEN;
class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base
{
private:
WinEDA_DrawFrame* m_Parent;
wxConfig* m_Config;
EDA_DRAW_FRAME* m_Parent;
wxConfig* m_Config;
public:
DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent );
DIALOG_SVG_PRINT( EDA_DRAW_FRAME* parent );
~DIALOG_SVG_PRINT() {}
private:
......@@ -31,7 +31,7 @@ private:
void PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref );
public:
static bool DrawSVGPage( WinEDA_DrawFrame* frame,
static bool DrawSVGPage( EDA_DRAW_FRAME* frame,
const wxString& FullFileName, SCH_SCREEN* screen,
bool aPrintBlackAndWhite = false,
bool aPrint_Sheet_Ref = false );
......
......@@ -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 )
{
m_Config = wxGetApp().m_EDA_Config;
......
......@@ -10,7 +10,7 @@
#include "dialog_build_BOM_base.h"
class WinEDA_DrawFrame;
class EDA_DRAW_FRAME;
class SCH_COMPONENT;
class wxConfig;
......@@ -18,9 +18,9 @@ class wxConfig;
class DIALOG_BUILD_BOM : public DIALOG_BUILD_BOM_BASE
{
private:
WinEDA_DrawFrame* m_Parent;
wxConfig* m_Config;
wxString m_ListFileName;
EDA_DRAW_FRAME* m_Parent;
wxConfig* m_Config;
wxString m_ListFileName;
private:
void OnRadioboxSelectFormatSelected( wxCommandEvent& event );
......@@ -60,7 +60,7 @@ private:
bool IsFieldChecked( int aFieldId );
public:
DIALOG_BUILD_BOM( WinEDA_DrawFrame* parent );
DIALOG_BUILD_BOM( EDA_DRAW_FRAME* parent );
// ~DIALOG_BUILD_BOM() {};
};
......
......@@ -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;
Init();
......
......@@ -41,7 +41,7 @@ class DIALOG_COLOR_CONFIG: public wxDialog
private:
DECLARE_DYNAMIC_CLASS( DIALOG_COLOR_CONFIG )
WinEDA_DrawFrame* m_Parent;
EDA_DRAW_FRAME* m_Parent;
wxBoxSizer* OuterBoxSizer;
wxBoxSizer* MainBoxSizer;
wxBoxSizer* ColumnBoxSizer;
......@@ -79,7 +79,7 @@ private:
public:
// Constructors and destructor
DIALOG_COLOR_CONFIG();
DIALOG_COLOR_CONFIG( WinEDA_DrawFrame* aParent );
DIALOG_COLOR_CONFIG( EDA_DRAW_FRAME* aParent );
~DIALOG_COLOR_CONFIG();
};
......
......@@ -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_Parent->OnModify();
m_Parent->TestDanglingEnds( m_Parent->GetScreen()->GetDrawItems(), NULL );
m_Parent->GetScreen()->TestDanglingEnds();
m_Parent->DrawPanel->Refresh( TRUE );
EndModal( 0 );
......
......@@ -25,8 +25,8 @@
#include "dialog_eeschema_config.h"
DIALOG_EESCHEMA_CONFIG::DIALOG_EESCHEMA_CONFIG( SCH_EDIT_FRAME* aSchFrame,
WinEDA_DrawFrame* aParent )
DIALOG_EESCHEMA_CONFIG::DIALOG_EESCHEMA_CONFIG( SCH_EDIT_FRAME* aSchFrame,
EDA_DRAW_FRAME* aParent )
: DIALOG_EESCHEMA_CONFIG_FBP( aParent )
{
wxString msg;
......
......@@ -7,7 +7,7 @@
class SCH_EDIT_FRAME;
class WinEDA_DrawFrame;
class EDA_DRAW_FRAME;
class DIALOG_EESCHEMA_CONFIG : public DIALOG_EESCHEMA_CONFIG_FBP
......@@ -34,7 +34,7 @@ private:
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() {};
};
......
......@@ -316,7 +316,7 @@ void SCH_PRINTOUT::DrawPage()
wxRect fitRect;
wxDC* dc = GetDC();
SCH_EDIT_FRAME* parent = m_Parent->GetParent();
WinEDA_DrawPanel* panel = parent->DrawPanel;
EDA_DRAW_PANEL* panel = parent->DrawPanel;
wxBusyCursor dummy;
......
......@@ -16,8 +16,8 @@
#include "sch_component.h"
static void AbortMoveCmpField( WinEDA_DrawPanel* Panel, wxDC* DC );
static void MoveCmpField( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
static void AbortMoveCmpField( EDA_DRAW_PANEL* Panel, wxDC* DC );
static void MoveCmpField( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase );
/******************************************************************************/
......@@ -125,7 +125,7 @@ modified!\nYou must create a new power" ) );
wxString newtext = Field->m_Text;
DrawPanel->m_IgnoreMouseEvents = TRUE;
wxString title = _( "Field:" ) + wxT(" ") + Field->m_Name;
wxString title = _( "Field: " ) + Field->m_Name;
wxTextEntryDialog dlg( this, wxEmptyString , title, newtext );
int diag = dlg.ShowModal();
newtext = dlg.GetValue( );
......@@ -178,7 +178,7 @@ modified!\nYou must create a new power" ) );
/*
* 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;
int fieldNdx;
......@@ -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->ManageCurseur = NULL;
......
......@@ -18,8 +18,8 @@
#include "sch_text.h"
static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
static void ExitMoveTexte( WinEDA_DrawPanel* panel, wxDC* DC );
static void ShowWhileMoving( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase );
static void ExitMoveTexte( EDA_DRAW_PANEL* panel, wxDC* DC );
static wxPoint ItemInitialPosition;
......@@ -184,7 +184,7 @@ SCH_TEXT* SCH_EDIT_FRAME::CreateNewText( wxDC* DC, int type )
/************************************/
/* 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();
......@@ -211,7 +211,7 @@ static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
/* 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();
SCH_ITEM* Struct = (SCH_ITEM*) screen->GetCurItem();
......
......@@ -26,7 +26,7 @@
#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();
......
......@@ -556,7 +556,7 @@ void SCH_EDIT_FRAME::LoadSettings()
wxConfig* cfg = wxGetApp().m_EDA_Config;
WinEDA_DrawFrame::LoadSettings();
EDA_DRAW_FRAME::LoadSettings();
wxGetApp().ReadCurrentSetupValues( GetConfigurationSettings() );
......@@ -653,7 +653,7 @@ void SCH_EDIT_FRAME::SaveSettings()
wxConfig* cfg = wxGetApp().m_EDA_Config;
WinEDA_DrawFrame::SaveSettings();
EDA_DRAW_FRAME::SaveSettings();
wxGetApp().SaveCurrentSetupValues( GetConfigurationSettings() );
......
......@@ -217,7 +217,7 @@ int TestDuplicateSheetNames( bool aCreateMarker )
* or between aNetItemRef and aNetItemTst
* 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* aNetItemTst,
int aMinConn, int aDiag )
......@@ -352,7 +352,7 @@ void Diagnose( WinEDA_DrawPanel* aPanel,
/* Routine testing electrical conflicts between NetItemRef and other items
* of the same net
*/
void TestOthersItems( WinEDA_DrawPanel* panel,
void TestOthersItems( EDA_DRAW_PANEL* panel,
unsigned NetItemRef,
unsigned netstart,
int* NetNbItems, int* MinConnexion )
......@@ -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
* sub sheet Glabel
*/
void TestLabel( WinEDA_DrawPanel* panel, unsigned NetItemRef, unsigned StartNet )
void TestLabel( EDA_DRAW_PANEL* panel, unsigned NetItemRef, unsigned StartNet )
{
unsigned NetItemTst;
int erc = 1;
......
......@@ -26,7 +26,7 @@
#define _ERC_H
class WinEDA_DrawPanel;
class EDA_DRAW_PANEL;
class NETLIST_OBJECT;
/* For ERC markers: error types (used in diags, and to set the color):
......@@ -60,13 +60,13 @@ enum errortype
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 );
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 );
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 );
......
......@@ -22,8 +22,8 @@
#include <boost/foreach.hpp>
static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
static void ExitPlaceCmp( WinEDA_DrawPanel* Panel, wxDC* DC );
static void ShowWhileMoving( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase );
static void ExitPlaceCmp( EDA_DRAW_PANEL* Panel, wxDC* DC );
static TRANSFORM OldTransform;
static wxPoint OldPos;
......@@ -221,7 +221,7 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* DC,
/**
* 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;
......@@ -275,7 +275,7 @@ void SCH_EDIT_FRAME::CmpRotationMiroir( SCH_COMPONENT* DrawComponent, wxDC* DC,
DrawPanel->CursorOn( DC );
}
TestDanglingEnds( GetScreen()->GetDrawItems(), DC );
GetScreen()->TestDanglingEnds( DrawPanel, DC );
OnModify( );
}
......@@ -283,7 +283,7 @@ void SCH_EDIT_FRAME::CmpRotationMiroir( SCH_COMPONENT* DrawComponent, wxDC* DC,
/*
* 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();
......@@ -359,7 +359,7 @@ void SCH_EDIT_FRAME::SelPartUnit( SCH_COMPONENT* DrawComponent, int unit, wxDC*
else
DrawComponent->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
TestDanglingEnds( GetScreen()->GetDrawItems(), DC );
GetScreen()->TestDanglingEnds( DrawPanel, DC );
OnModify( );
}
......@@ -404,7 +404,7 @@ void SCH_EDIT_FRAME::ConvertPart( SCH_COMPONENT* DrawComponent, wxDC* DC )
else
DrawComponent->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
TestDanglingEnds( GetScreen()->GetDrawItems(), DC );
GetScreen()->TestDanglingEnds( DrawPanel, DC );
OnModify( );
}
......
......@@ -346,7 +346,7 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* DC, int hotkey, EDA_ITEM* DrawStruct )
RefreshToolBar = LocateAndDeleteItem( this, DC );
OnModify();
GetScreen()->SetCurItem( NULL );
TestDanglingEnds( GetScreen()->GetDrawItems(), DC );
GetScreen()->TestDanglingEnds( DrawPanel, DC );
}
break;
......@@ -661,7 +661,7 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* DC, int hotkey, EDA_ITEM* DrawStruct )
RefreshToolBar = TRUE;
}
CmpRotationMiroir( (SCH_COMPONENT*) DrawStruct, DC, CMP_NORMAL );
TestDanglingEnds( GetScreen()->GetDrawItems(), DC );
GetScreen()->TestDanglingEnds( DrawPanel, DC );
}
break;
......
......@@ -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 )
{
// 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" ),
}
void LIB_ARC::DisplayInfo( WinEDA_DrawFrame* aFrame )
void LIB_ARC::DisplayInfo( EDA_DRAW_FRAME* aFrame )
{
wxString msg;
EDA_Rect bBox = GetBoundingBox();
......
......@@ -37,7 +37,7 @@ class LIB_ARC : public LIB_DRAW_ITEM
/**
* 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 );
/**
......@@ -97,7 +97,7 @@ public:
virtual bool HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform );
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
......
......@@ -241,7 +241,7 @@ int LIB_BEZIER::GetPenSize()
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 )
{
wxPoint pos1;
......@@ -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;
EDA_Rect bBox = GetBoundingBox();
......
......@@ -18,7 +18,7 @@ class LIB_BEZIER : public LIB_DRAW_ITEM
/**
* 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 );
public:
......@@ -74,7 +74,7 @@ public:
*/
virtual int GetPenSize( );
virtual void DisplayInfo( WinEDA_DrawFrame* aFrame );
virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
protected:
virtual LIB_DRAW_ITEM* DoGenCopy();
......
......@@ -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 )
{
wxPoint pos1;
......@@ -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;
EDA_Rect bBox = GetBoundingBox();
......
......@@ -18,7 +18,7 @@ class LIB_CIRCLE : public LIB_DRAW_ITEM
/**
* 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 );
/**
......@@ -70,7 +70,7 @@ public:
virtual int GetPenSize( );
virtual EDA_Rect GetBoundingBox() const;
virtual void DisplayInfo( WinEDA_DrawFrame* aFrame );
virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
/**
* See LIB_DRAW_ITEM::BeginEdit().
......
......@@ -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
* 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;
......@@ -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 )
{
if( InEditMode() )
......
......@@ -55,7 +55,7 @@ class LIB_DRAW_ITEM : public EDA_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,
int aDrawMode, void* aData, const TRANSFORM& aTransform ) = 0;
......@@ -179,7 +179,7 @@ public:
* or to pass reference to the lib component for pins
* @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 );
/**
......@@ -233,7 +233,7 @@ public:
* in msg panel
* @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.
......
......@@ -292,7 +292,7 @@ int LIB_FIELD::GetPenSize()
* if aData not NULL, aData must point a wxString which is used instead of
* 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 )
{
wxPoint text_pos;
......@@ -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;
......
......@@ -27,7 +27,7 @@ class LIB_FIELD : public LIB_DRAW_ITEM, public EDA_TextStruct
/**
* 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 );
/**
......@@ -135,7 +135,7 @@ public:
* in msg panel
* @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.
......
......@@ -783,13 +783,13 @@ int LIB_PIN::GetPenSize()
}
void LIB_PIN::drawGraphic( WinEDA_DrawPanel* aPanel,
wxDC* aDC,
const wxPoint& aOffset,
int aColor,
int aDrawMode,
void* aData,
const TRANSFORM& aTransform )
void LIB_PIN::drawGraphic( EDA_DRAW_PANEL* aPanel,
wxDC* aDC,
const wxPoint& aOffset,
int aColor,
int aDrawMode,
void* aData,
const TRANSFORM& aTransform )
{
// Invisible pins are only drawn on request. In libedit they are drawn
// in g_InvisibleItemColor because we must see them.
......@@ -841,12 +841,12 @@ void LIB_PIN::drawGraphic( WinEDA_DrawPanel* aPanel,
* Draw the pin symbol (without texts)
* if Color != 0 draw with Color, else with the normal pin color
*/
void LIB_PIN::DrawPinSymbol( WinEDA_DrawPanel* aPanel,
wxDC* aDC,
const wxPoint& aPinPos,
int aOrient,
int aDrawMode,
int aColor )
void LIB_PIN::DrawPinSymbol( EDA_DRAW_PANEL* aPanel,
wxDC* aDC,
const wxPoint& aPinPos,
int aOrient,
int aDrawMode,
int aColor )
{
int MapX1, MapY1, x1, y1;
int color;
......@@ -1063,15 +1063,15 @@ void LIB_PIN::DrawPinSymbol( WinEDA_DrawPanel* aPanel,
* Pin Name: substring beteween '~' is negated
* DrawMode = GR_OR, XOR ...
*****************************************************************************/
void LIB_PIN::DrawPinTexts( WinEDA_DrawPanel* panel,
wxDC* DC,
wxPoint& pin_pos,
int orient,
int TextInside,
bool DrawPinNum,
bool DrawPinName,
int Color,
int DrawMode )
void LIB_PIN::DrawPinTexts( EDA_DRAW_PANEL* panel,
wxDC* DC,
wxPoint& pin_pos,
int orient,
int TextInside,
bool DrawPinNum,
bool DrawPinName,
int Color,
int DrawMode )
{
int x, y, x1, y1;
wxString StringPinNum;
......@@ -1713,7 +1713,7 @@ void LIB_PIN::DoSetWidth( int aWidth )
* Displays info (pin num and name, orientation ...
* on the Info window
*/
void LIB_PIN::DisplayInfo( WinEDA_DrawFrame* frame )
void LIB_PIN::DisplayInfo( EDA_DRAW_FRAME* frame )
{
wxString Text;
......
......@@ -95,7 +95,7 @@ class LIB_PIN : public LIB_DRAW_ITEM
/**
* 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 );
public:
......@@ -152,7 +152,7 @@ public:
*/
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;
......@@ -338,10 +338,10 @@ public:
*/
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 );
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 aColor, int aDrawMode );
......
......@@ -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,
const TRANSFORM& aTransform )
{
......@@ -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;
EDA_Rect bBox = GetBoundingBox();
......
......@@ -19,7 +19,7 @@ class LIB_POLYLINE : public LIB_DRAW_ITEM
/**
* 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 );
/**
......@@ -88,7 +88,7 @@ public:
*/
virtual int GetPenSize( );
virtual void DisplayInfo( WinEDA_DrawFrame* aFrame );
virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
/**
* See LIB_DRAW_ITEM::BeginEdit().
......
......@@ -171,7 +171,7 @@ int LIB_RECTANGLE::GetPenSize()
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,
void* aData, const TRANSFORM& aTransform )
{
......@@ -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;
......
......@@ -21,7 +21,7 @@ class LIB_RECTANGLE : public LIB_DRAW_ITEM
/**
* 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 );
/**
......@@ -76,7 +76,7 @@ public:
virtual EDA_Rect GetBoundingBox() const;
virtual void DisplayInfo( WinEDA_DrawFrame* aFrame );
virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
/**
* See LIB_DRAW_ITEM::BeginEdit().
......
......@@ -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 )
{
wxPoint pos1, pos2;
......@@ -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;
......
......@@ -21,7 +21,7 @@ class LIB_TEXT : public LIB_DRAW_ITEM, public EDA_TextStruct
/**
* 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 );
/**
......@@ -96,7 +96,7 @@ public:
*/
virtual int GetPenSize( );
virtual void DisplayInfo( WinEDA_DrawFrame* aFrame );
virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
virtual EDA_Rect GetBoundingBox() const;
......
......@@ -74,7 +74,7 @@ FILL_T LIB_EDIT_FRAME:: m_drawFillStyle = NO_FILL;
/************************/
/* 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_SIZE( LIB_EDIT_FRAME::OnSize )
EVT_ACTIVATE( LIB_EDIT_FRAME::OnActivate )
......@@ -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_GEN_PNG_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_CONFIG_REQ, LIB_EDIT_FRAME::InstallConfigFrame )
......@@ -168,7 +168,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( SCH_EDIT_FRAME* aParent,
const wxPoint& pos,
const wxSize& size,
long style ) :
WinEDA_DrawFrame( aParent, LIBEDITOR_FRAME, title, pos, size, style )
EDA_DRAW_FRAME( aParent, LIBEDITOR_FRAME, title, pos, size, style )
{
wxASSERT( aParent );
......@@ -267,7 +267,7 @@ void LIB_EDIT_FRAME::LoadSettings()
{
wxConfig* cfg;
WinEDA_DrawFrame::LoadSettings();
EDA_DRAW_FRAME::LoadSettings();
wxConfigPathChanger cpc( wxGetApp().m_EDA_Config, m_ConfigPath );
cfg = wxGetApp().m_EDA_Config;
......@@ -293,7 +293,7 @@ void LIB_EDIT_FRAME::SaveSettings()
{
wxConfig* cfg;
WinEDA_DrawFrame::SaveSettings();
EDA_DRAW_FRAME::SaveSettings();
wxConfigPathChanger cpc( wxGetApp().m_EDA_Config, m_ConfigPath );
cfg = wxGetApp().m_EDA_Config;
......@@ -933,7 +933,7 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& 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
// (can be removed or changed by the schematic editor)
......@@ -956,12 +956,12 @@ void LIB_EDIT_FRAME::EnsureActiveLibExists()
void LIB_EDIT_FRAME::SetLanguage( wxCommandEvent& event )
{
WinEDA_BasicFrame::SetLanguage( event );
EDA_BASE_FRAME::SetLanguage( event );
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
// LIB_EDIT_FRAME::SetLanguage
parent->WinEDA_BasicFrame::SetLanguage( event );
parent->EDA_BASE_FRAME::SetLanguage( event );
}
......
......@@ -23,7 +23,7 @@ class DIALOG_LIB_EDIT_TEXT;
/**
* 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.
......
......@@ -221,7 +221,7 @@ again." );
screen->Show( 0, std::cout );
#endif
TestDanglingEnds( screen->GetDrawItems(), NULL );
screen->TestDanglingEnds();
MsgDiag = _( "Done Loading " ) + screen->GetFileName();
PrintMsg( MsgDiag );
......
......@@ -54,7 +54,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
case SCH_FIELD_T:
DrawStruct->Place( this, DC );
GetScreen()->SetCurItem( NULL );
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL );
GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE );
return;
......@@ -115,7 +115,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
DrawStruct->Place( this, DC );
DrawPanel->m_AutoPAN_Request = FALSE;
}
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL );
GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE );
break;
......@@ -131,7 +131,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
DrawStruct->Place( this, DC );
DrawPanel->m_AutoPAN_Request = FALSE;
}
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL );
GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE );
break;
......@@ -149,7 +149,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{
DrawStruct->Place( this, DC );
GetScreen()->SetCurItem( NULL );
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL );
GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE );
DrawPanel->m_AutoPAN_Request = FALSE;
}
......@@ -159,7 +159,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
LocateAndDeleteItem( this, DC );
OnModify( );
GetScreen()->SetCurItem( NULL );
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL );
GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE );
break;
......@@ -201,7 +201,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{
DrawStruct->Place( this, DC );
DrawPanel->m_AutoPAN_Request = FALSE;
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL );
GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE );
}
break;
......@@ -220,7 +220,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{
DrawStruct->Place( this, DC );
DrawPanel->m_AutoPAN_Request = FALSE;
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL );
GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE );
}
break;
......@@ -235,7 +235,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{
DrawStruct->Place( this, DC );
DrawPanel->m_AutoPAN_Request = FALSE;
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL );
GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE );
}
break;
......@@ -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) )
{
DrawStruct->Place( this, DC );
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL );
GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE );
}
break;
......@@ -274,7 +274,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{
DrawStruct->Place( this, DC );
DrawPanel->m_AutoPAN_Request = FALSE;
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL );
GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE );
}
break;
......@@ -289,7 +289,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{
DrawStruct->Place( this, DC );
DrawPanel->m_AutoPAN_Request = FALSE;
TestDanglingEnds( GetScreen()->GetDrawItems(), NULL );
GetScreen()->TestDanglingEnds();
DrawPanel->Refresh( TRUE );
}
break;
......
......@@ -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,
const wxPoint aMoveVector );
......@@ -110,7 +110,7 @@ void MoveItemsInList( PICKED_ITEMS_LIST& aItemsList, const wxPoint aMoveVector )
* delete schematic items in aItemsList
* 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_EDIT_FRAME* frame = (SCH_EDIT_FRAME*) panel->GetParent();
......@@ -146,7 +146,7 @@ void DeleteItemsInList( WinEDA_DrawPanel* panel, PICKED_ITEMS_LIST& aItemsList )
/* Routine to delete an object from global drawing object 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_EDIT_FRAME* frame = (SCH_EDIT_FRAME*) panel->GetParent();
......
......@@ -20,10 +20,9 @@
#include "dialog_lib_edit_pin.h"
static void CreateImagePins( LIB_PIN* Pin, int unit, int convert,
bool asDeMorgan );
static void AbortPinMove( WinEDA_DrawPanel* Panel, wxDC* DC );
static void DrawMovePin( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
static void CreateImagePins( LIB_PIN* Pin, int unit, int convert, bool asDeMorgan );
static void AbortPinMove( EDA_DRAW_PANEL* Panel, wxDC* DC );
static void DrawMovePin( EDA_DRAW_PANEL* panel, wxDC* DC, bool erase );
static wxPoint OldPos;
......@@ -177,7 +176,7 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
/**
* 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();
......@@ -337,7 +336,7 @@ void LIB_EDIT_FRAME::StartMovePin( wxDC* DC )
/* Move pin to the current mouse position. This function is called by the
* 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();
......
......@@ -10,8 +10,8 @@
class EDA_ITEM;
class WinEDA_DrawPanel;
class WinEDA_DrawFrame;
class EDA_DRAW_PANEL;
class EDA_DRAW_FRAME;
class SCH_EDIT_FRAME;
class LIB_EDIT_FRAME;
class CMP_LIBRARY;
......@@ -35,7 +35,7 @@ wxString ReturnDefaultFieldName( int aFieldNdx );
/* DATABASE.CPP */
/****************/
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 */
......@@ -62,7 +62,7 @@ bool LibItemInBox( int x1, int y1, int x2, int y2, SCH_COMPONENT* Draw
/************/
/* 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
......@@ -120,8 +120,8 @@ SCH_ITEM* PickStruct( const wxPoint& refpos, SCH_SCREEN* screen, int SearchMask
/***************/
/* EEREDRAW.CPP */
/***************/
void DrawDanglingSymbol( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& pos, int Color );
void RedrawActiveWindow( WinEDA_DrawPanel* panel, wxDC* DC );
void DrawDanglingSymbol( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& pos, int Color );
void RedrawActiveWindow( EDA_DRAW_PANEL* panel, wxDC* DC );
/**************/
......@@ -181,10 +181,10 @@ void InstallPineditFrame( LIB_EDIT_FRAME* parent, wxDC* DC, const wxPoint& pos )
* 1 if selected component
* 0 if canceled order
*/
int DisplayComponentsNamesInLib( WinEDA_DrawFrame* frame,
CMP_LIBRARY* Library,
wxString& Buffer,
wxString& OldName );
int DisplayComponentsNamesInLib( EDA_DRAW_FRAME* frame,
CMP_LIBRARY* Library,
wxString& Buffer,
wxString& OldName );
/**
* Function SelectLibraryFromList
......@@ -192,7 +192,7 @@ int DisplayComponentsNamesInLib( WinEDA_DrawFrame* frame,
* a library
* 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.
......@@ -203,9 +203,9 @@ CMP_LIBRARY* SelectLibraryFromList( WinEDA_DrawFrame* frame );
* 0 if canceled order
* Place the name of the selected component list in BufName
*/
int GetNameOfPartToLoad( WinEDA_DrawFrame* frame,
CMP_LIBRARY* Lib,
wxString& BufName );
int GetNameOfPartToLoad( EDA_DRAW_FRAME* frame,
CMP_LIBRARY* Lib,
wxString& BufName );
/**************/
/* LIBARCH.CPP */
......@@ -213,30 +213,13 @@ int GetNameOfPartToLoad( WinEDA_DrawFrame* frame,
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 */
/***************/
void DisplayOptionFrame( SCH_EDIT_FRAME* parent, const wxPoint& framepos );
/****************/
/* CONTROLE.CPP */
/****************/
......
......@@ -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 color;
......
......@@ -40,7 +40,7 @@ public:
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 );
/**
......
......@@ -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 )
{
bool dummy = FALSE;
......@@ -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
// Entry and root_component can differ if Entry is an alias
......
......@@ -163,7 +163,7 @@ public:
*/
wxPoint GetScreenCoord( const wxPoint& aPoint );
void DisplayInfo( WinEDA_DrawFrame* frame );
void DisplayInfo( EDA_DRAW_FRAME* frame );
/**
* Function ClearAnnotation
......@@ -245,21 +245,21 @@ public:
*/
LIB_PIN* GetPin( const wxString& number );
virtual void Draw( WinEDA_DrawPanel* panel,
wxDC* DC,
const wxPoint& offset,
int draw_mode,
int Color = -1 )
virtual void Draw( EDA_DRAW_PANEL* panel,
wxDC* DC,
const wxPoint& offset,
int draw_mode,
int Color = -1 )
{
Draw( panel, DC, offset, draw_mode, Color, true );
}
void Draw( WinEDA_DrawPanel* panel,
wxDC* DC,
const wxPoint& offset,
int draw_mode,
int Color,
bool DrawPinText );
void Draw( EDA_DRAW_PANEL* panel,
wxDC* DC,
const wxPoint& offset,
int draw_mode,
int Color,
bool DrawPinText );
void SwapData( SCH_COMPONENT* copyitem );
......
......@@ -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 )
{
int orient;
......
......@@ -100,11 +100,11 @@ public:
/**
* Function Draw
*/
void Draw( WinEDA_DrawPanel* aPanel,
wxDC* aDC,
const wxPoint& aOffset,
int aDrawMode,
int aColor = -1 );
void Draw( EDA_DRAW_PANEL* aPanel,
wxDC* aDC,
const wxPoint& aOffset,
int aDrawMode,
int aColor = -1 );
/**
* Function Save
......
......@@ -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 color;
......
......@@ -40,7 +40,7 @@ public:
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 );
/**
......
......@@ -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 color;
......@@ -416,14 +416,20 @@ bool SCH_LINE::doHitTest( const wxPoint& aPoint, int aAccuracy, SCH_FILTER_T aFi
if( !( aFilter & ( DRAW_ITEM_T | WIRE_T | BUS_T ) ) )
return false;
if( ( ( aFilter & DRAW_ITEM_T ) && ( m_Layer == LAYER_NOTES ) )
|| ( ( aFilter & WIRE_T ) && ( m_Layer == LAYER_WIRE ) )
|| ( ( aFilter & BUS_T ) && ( m_Layer == LAYER_BUS ) ) )
if( ( ( aFilter & DRAW_ITEM_T ) && ( m_Layer == LAYER_NOTES ) )
|| ( ( aFilter & WIRE_T ) && ( m_Layer == LAYER_WIRE ) )
|| ( ( aFilter & BUS_T ) && ( m_Layer == LAYER_BUS ) ) )
{
if( ( aFilter & EXCLUDE_WIRE_BUS_ENDPOINTS && IsEndPoint( aPoint ) )
|| ( aFilter & WIRE_BUS_ENDPOINTS_ONLY && !IsEndPoint( aPoint ) )
|| ( TestSegmentHit( aPoint, m_Start, m_End, aAccuracy ) ) )
return true;
if( !TestSegmentHit( aPoint, m_Start, m_End, aAccuracy ) )
return false;
if( ( aFilter & EXCLUDE_WIRE_BUS_ENDPOINTS ) && IsEndPoint( aPoint ) )
return false;
if( ( aFilter & WIRE_BUS_ENDPOINTS_ONLY ) && !IsEndPoint( aPoint ) )
return false;
return true;
}
return false;
......
......@@ -54,7 +54,7 @@ public:
*/
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 );
/**
......
......@@ -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 )
{
EDA_Colors color = (EDA_Colors) m_Color;
......@@ -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 )
return;
......
......@@ -38,7 +38,7 @@ public:
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 );
/**
......@@ -93,7 +93,7 @@ public:
*
* @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 );
......
......@@ -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 pX, pY, color;
......
......@@ -34,7 +34,7 @@ public:
*/
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 );
/**
......
......@@ -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 color;
......
......@@ -28,7 +28,7 @@ public:
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 );
/**
......
......@@ -91,9 +91,6 @@ SCH_SCREEN::~SCH_SCREEN()
void SCH_SCREEN::IncRefCount()
{
m_refCount++;
wxLogDebug( wxT("Screen %s reference count after increment is %d." ),
GetChars( GetFileName() ), m_refCount );
}
......@@ -102,9 +99,6 @@ void SCH_SCREEN::DecRefCount()
wxCHECK_RET( m_refCount != 0,
wxT( "Screen reference count already zero. Bad programmer!" ) );
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 )
* - Includes segments or buses aligned in only 1 segment
* - 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;
bool Modify = FALSE;
......@@ -262,9 +258,7 @@ bool SCH_SCREEN::SchematicCleanUp( wxDC* DC )
}
}
SCH_EDIT_FRAME* frame;
frame = (SCH_EDIT_FRAME*) wxGetApp().GetTopWindow();
frame->TestDanglingEnds( GetDrawItems(), DC );
TestDanglingEnds( aCanvas, aDC );
return Modify;
}
......@@ -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() )
{
......@@ -608,7 +602,8 @@ void SCH_SCREEN::addConnectedItemsToBlock( const wxPoint& position )
picker.m_PickedItem = item;
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;
if( item->IsSelected() && item->Type() != SCH_LINE_T )
......@@ -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 */
/******************************************************************/
......@@ -783,7 +860,7 @@ void SCH_SCREENS::SchematicCleanUp()
{
// if wire list has changed, delete the undo/redo list to avoid
// pointer problems with deleted data.
if( m_screens[i]->SchematicCleanUp( NULL ) )
if( m_screens[i]->SchematicCleanUp() )
m_screens[i]->ClearUndoRedoList();
}
}
......
......@@ -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 )
{
int txtcolor;
......@@ -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->AppendMsgPanel( _( "Sheet name" ), m_SheetName, CYAN );
......
......@@ -65,11 +65,11 @@ public:
bool operator ==( const SCH_SHEET_PIN* aPin ) const;
virtual void Draw( WinEDA_DrawPanel* aPanel,
wxDC* aDC,
const wxPoint& aOffset,
int aDraw_mode,
int aColor = -1 );
virtual void Draw( EDA_DRAW_PANEL* aPanel,
wxDC* aDC,
const wxPoint& aOffset,
int aDraw_mode,
int aColor = -1 );
/**
* Function CreateGraphicShape (virual)
......@@ -273,7 +273,7 @@ public:
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
* format, we detect orientation based on pin edges
......@@ -356,11 +356,11 @@ public:
* @param aColor = color used to draw sheet. Usually -1 to use the normal
* color for sheet items
*/
void Draw( WinEDA_DrawPanel* aPanel,
wxDC* aDC,
const wxPoint& aOffset,
int aDrawMode,
int aColor = -1 );
void Draw( EDA_DRAW_PANEL* aPanel,
wxDC* aDC,
const wxPoint& aOffset,
int aDrawMode,
int aColor = -1 );
/**
* Function GetBoundingBox
......
......@@ -66,11 +66,11 @@ EDA_ITEM* SCH_SHEET_PIN::doClone() const
}
void SCH_SHEET_PIN::Draw( WinEDA_DrawPanel* aPanel,
wxDC* aDC,
const wxPoint& aOffset,
int aDraw_mode,
int aColor )
void SCH_SHEET_PIN::Draw( EDA_DRAW_PANEL* aPanel,
wxDC* aDC,
const wxPoint& aOffset,
int aDraw_mode,
int aColor )
{
// The icon selection is handle by the virtual method CreateGraphicShape
// called by ::Draw
......
......@@ -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 )
{
EDA_Colors color;
......@@ -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 )
{
SCH_TEXT::Draw( panel, DC, offset, DrawMode, Color );
......@@ -1098,11 +1098,11 @@ void SCH_GLOBALLABEL::SetSchematicTextOrientation( int aSchematicOrientation )
}
void SCH_GLOBALLABEL::Draw( WinEDA_DrawPanel* panel,
wxDC* DC,
const wxPoint& aOffset,
int DrawMode,
int Color )
void SCH_GLOBALLABEL::Draw( EDA_DRAW_PANEL* panel,
wxDC* DC,
const wxPoint& aOffset,
int DrawMode,
int Color )
{
static std::vector <wxPoint> Poly;
EDA_Colors color;
......@@ -1425,11 +1425,11 @@ void SCH_HIERLABEL::SetSchematicTextOrientation( int aSchematicOrientation )
}
void SCH_HIERLABEL::Draw( WinEDA_DrawPanel* panel,
wxDC* DC,
const wxPoint& offset,
int DrawMode,
int Color )
void SCH_HIERLABEL::Draw( EDA_DRAW_PANEL* panel,
wxDC* DC,
const wxPoint& offset,
int DrawMode,
int Color )
{
static std::vector <wxPoint> Poly;
EDA_Colors color;
......
......@@ -101,11 +101,11 @@ public:
SCH_TEXT* GenCopy();
virtual void Draw( WinEDA_DrawPanel* panel,
wxDC* DC,
const wxPoint& offset,
int draw_mode,
int Color = -1 );
virtual void Draw( EDA_DRAW_PANEL* panel,
wxDC* DC,
const wxPoint& offset,
int draw_mode,
int Color = -1 );
/**
* Function CreateGraphicShape
......@@ -220,11 +220,11 @@ public:
~SCH_LABEL() { }
virtual void Draw( WinEDA_DrawPanel* panel,
wxDC* DC,
const wxPoint& offset,
int draw_mode,
int Color = -1 );
virtual void Draw( EDA_DRAW_PANEL* panel,
wxDC* DC,
const wxPoint& offset,
int draw_mode,
int Color = -1 );
virtual wxString GetClass() const
{
......@@ -305,11 +305,11 @@ public:
~SCH_GLOBALLABEL() { }
virtual void Draw( WinEDA_DrawPanel* panel,
wxDC* DC,
const wxPoint& offset,
int draw_mode,
int Color = -1 );
virtual void Draw( EDA_DRAW_PANEL* panel,
wxDC* DC,
const wxPoint& offset,
int draw_mode,
int Color = -1 );
virtual wxString GetClass() const
{
......@@ -406,11 +406,11 @@ public:
~SCH_HIERLABEL() { }
virtual void Draw( WinEDA_DrawPanel* panel,
wxDC* DC,
const wxPoint& offset,
int draw_mode,
int Color = -1 );
virtual void Draw( EDA_DRAW_PANEL* panel,
wxDC* DC,
const wxPoint& offset,
int draw_mode,
int Color = -1 );
virtual wxString GetClass() const
{
......
......@@ -317,7 +317,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
DeleteConnection( id == ID_POPUP_SCH_DELETE_CONNECTION ? TRUE : FALSE );
screen->SetCurItem( NULL );
m_itemToRepeat = NULL;
TestDanglingEnds( screen->GetDrawItems(), &dc );
screen->TestDanglingEnds( DrawPanel, &dc );
DrawPanel->Refresh();
break;
......@@ -325,12 +325,12 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
{
DrawPanel->MouseToCursorSchema();
SCH_ITEM* oldWiresList = screen->ExtractWires( true );
BreakSegment( screen, screen->m_Curseur );
screen->BreakSegment( screen->m_Curseur );
if( oldWiresList )
SaveCopyInUndoList( oldWiresList, UR_WIRE_IMAGE );
TestDanglingEnds( screen->GetDrawItems(), &dc );
screen->TestDanglingEnds( DrawPanel, &dc );
}
break;
......@@ -353,7 +353,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
DeleteStruct( DrawPanel, &dc, item );
screen->SetCurItem( NULL );
m_itemToRepeat = NULL;
TestDanglingEnds( screen->GetDrawItems(), &dc );
screen->TestDanglingEnds( DrawPanel, &dc );
SetSheetNumberAndCount();
OnModify();
}
......@@ -371,7 +371,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_RESIZE_SHEET:
DrawPanel->MouseToCursorSchema();
ReSizeSheet( (SCH_SHEET*) screen->GetCurItem(), &dc );
TestDanglingEnds( screen->GetDrawItems(), &dc );
screen->TestDanglingEnds( DrawPanel, &dc );
break;
case ID_POPUP_SCH_EDIT_SHEET:
......@@ -717,7 +717,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_ADD_JUNCTION:
DrawPanel->MouseToCursorSchema();
screen->SetCurItem( CreateNewJunctionStruct( &dc, screen->m_Curseur, true ) );
TestDanglingEnds( screen->GetDrawItems(), &dc );
screen->TestDanglingEnds( DrawPanel, &dc );
screen->SetCurItem( NULL );
break;
......@@ -728,7 +728,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
if( screen->GetCurItem() )
{
( (SCH_ITEM*) screen->GetCurItem() )->Place( this, &dc );
TestDanglingEnds( screen->GetDrawItems(), &dc );
screen->TestDanglingEnds( DrawPanel, &dc );
screen->SetCurItem( NULL );
}
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