Commit 1010601a authored by Wayne Stambaugh's avatar Wayne Stambaugh

PCBNew control update bug fixes, fixes lp:725963.

* Fix grid select box update bug on context menu.
* Fix via size and track width select box update bugs.
* Fix layer pair indicator button update bug.
* Fix auto track width tool bar control enable bug.
* Fix via size and track width select status bug in context menu.
* Fix layer select box and layer control widget select bug when current
  layer is removed.
* Add virtual function to notify objects derived from EDA_DRAW_FRAME that
  the units setting has changed.
* Coding policy class naming fixes.
parent ec400bf7
......@@ -111,7 +111,7 @@ void Pcb3D_GLCanvas::Redraw( bool finish )
*/
GLuint Pcb3D_GLCanvas::CreateDrawGL_List()
{
WinEDA_BasePcbFrame* pcbframe = m_Parent->m_Parent;
PCB_BASE_FRAME* pcbframe = m_Parent->m_Parent;
BOARD* pcb = pcbframe->GetBoard();
TRACK* track;
SEGZONE* segzone;
......
......@@ -45,11 +45,10 @@ BEGIN_EVENT_TABLE( WinEDA3D_DrawFrame, wxFrame )
EVT_CLOSE( WinEDA3D_DrawFrame::OnCloseWindow )
END_EVENT_TABLE()
WinEDA3D_DrawFrame::WinEDA3D_DrawFrame( WinEDA_BasePcbFrame* parent,
const wxString& title,
long style ) :
wxFrame( parent, DISPLAY3D_FRAME, title, wxPoint( -1, -1 ),
wxSize( -1, -1 ), style )
WinEDA3D_DrawFrame::WinEDA3D_DrawFrame( PCB_BASE_FRAME* parent,
const wxString& title,
long style ) :
wxFrame( parent, DISPLAY3D_FRAME, title, wxPoint( -1, -1 ), wxSize( -1, -1 ), style )
{
m_FrameName = wxT( "Frame3D" );
m_Canvas = NULL;
......
......@@ -203,7 +203,7 @@ public:
class WinEDA3D_DrawFrame : public wxFrame
{
public:
WinEDA_BasePcbFrame* m_Parent;
PCB_BASE_FRAME* m_Parent;
private:
wxString m_FrameName; // name used for writing and reading setup
// It is "Frame3D"
......@@ -217,7 +217,7 @@ private:
bool m_reloadRequest;
public:
WinEDA3D_DrawFrame( WinEDA_BasePcbFrame* parent, const wxString& title,
WinEDA3D_DrawFrame( PCB_BASE_FRAME* parent, const wxString& title,
long style = KICAD_DEFAULT_3D_DRAWFRAME_STYLE );
~WinEDA3D_DrawFrame()
{
......
......@@ -106,7 +106,7 @@ int WinEDALayerChoiceBox::SetLayerSelection( int layer )
// Reload the Layers
void WinEDALayerChoiceBox::Resync()
{
WinEDA_BasePcbFrame* pcbFrame = (WinEDA_BasePcbFrame*) GetParent()->GetParent();
PCB_BASE_FRAME* pcbFrame = (PCB_BASE_FRAME*) GetParent()->GetParent();
BOARD* board = pcbFrame->GetBoard();
wxASSERT( board != NULL );
......@@ -152,7 +152,7 @@ void WinEDALayerChoiceBox::Resync()
void WinEDALayerChoiceBox::ResyncBitmapOnly()
{
WinEDA_BasePcbFrame* pcbFrame = (WinEDA_BasePcbFrame*) GetParent()->GetParent();
PCB_BASE_FRAME* pcbFrame = (PCB_BASE_FRAME*) GetParent()->GetParent();
BOARD* board = pcbFrame->GetBoard();
int elements = GetCount();
......
......@@ -174,16 +174,15 @@ void EDA_DRAW_FRAME::OnToggleGridState( wxCommandEvent& aEvent )
void EDA_DRAW_FRAME::OnSelectUnits( wxCommandEvent& aEvent )
{
if( aEvent.GetId() == ID_TB_OPTIONS_SELECT_UNIT_MM && g_UserUnit != MILLIMETRES )
{
g_UserUnit = MILLIMETRES;
UpdateStatusBar();
unitsChangeRefresh();
}
else if( aEvent.GetId() == ID_TB_OPTIONS_SELECT_UNIT_INCH && g_UserUnit != INCHES )
{
g_UserUnit = INCHES;
UpdateStatusBar();
unitsChangeRefresh();
}
}
......
......@@ -24,7 +24,7 @@
BEGIN_EVENT_TABLE( DISPLAY_FOOTPRINTS_FRAME, WinEDA_BasePcbFrame )
BEGIN_EVENT_TABLE( DISPLAY_FOOTPRINTS_FRAME, PCB_BASE_FRAME )
EVT_CLOSE( DISPLAY_FOOTPRINTS_FRAME::OnCloseWindow )
EVT_SIZE( DISPLAY_FOOTPRINTS_FRAME::OnSize )
EVT_TOOL( ID_OPTIONS_SETUP, DISPLAY_FOOTPRINTS_FRAME::InstallOptionsDisplay )
......@@ -49,7 +49,7 @@ DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( CVPCB_MAINFRAME* father,
const wxString& title,
const wxPoint& pos,
const wxSize& size, long style ) :
WinEDA_BasePcbFrame( father, CVPCB_DISPLAY_FRAME, title, pos, size, style )
PCB_BASE_FRAME( father, CVPCB_DISPLAY_FRAME, title, pos, size, style )
{
m_FrameName = wxT( "CmpFrame" );
m_Draw_Axis = true; // true to draw axis.
......
......@@ -5,7 +5,7 @@
/* class DISPLAY_FOOTPRINTS_FRAME: used to display footprints */
/*******************************************************/
class DISPLAY_FOOTPRINTS_FRAME : public WinEDA_BasePcbFrame
class DISPLAY_FOOTPRINTS_FRAME : public PCB_BASE_FRAME
{
public:
DISPLAY_FOOTPRINTS_FRAME( CVPCB_MAINFRAME* father, const wxString& title,
......@@ -57,7 +57,7 @@ public:
/* SaveCopyInUndoList() virtual
* currently: do nothing in cvpcb.
* but but be defined because it is a pure virtual in WinEDA_BasePcbFrame
* but but be defined because it is a pure virtual in PCB_BASE_FRAME
*/
virtual void SaveCopyInUndoList( BOARD_ITEM* aItemToCopy,
UndoRedoOpType aTypeCommand = UR_UNSPECIFIED,
......
......@@ -26,13 +26,12 @@ void DISPLAY_FOOTPRINTS_FRAME::InstallOptionsDisplay( wxCommandEvent& event )
}
DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::DIALOG_FOOTPRINTS_DISPLAY_OPTIONS(
WinEDA_BasePcbFrame* parent )
: DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE( parent)
DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::DIALOG_FOOTPRINTS_DISPLAY_OPTIONS( PCB_BASE_FRAME* parent )
: DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE( parent )
{
m_Parent = parent;
initDialog( );
initDialog();
GetSizer()->SetSizeHints( this );
Centre();
......
......@@ -18,10 +18,10 @@ class DIALOG_FOOTPRINTS_DISPLAY_OPTIONS :
public DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE
{
private:
WinEDA_BasePcbFrame * m_Parent;
PCB_BASE_FRAME * m_Parent;
public:
DIALOG_FOOTPRINTS_DISPLAY_OPTIONS( WinEDA_BasePcbFrame* parent );
DIALOG_FOOTPRINTS_DISPLAY_OPTIONS( PCB_BASE_FRAME* parent );
~DIALOG_FOOTPRINTS_DISPLAY_OPTIONS();
......
......@@ -198,7 +198,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( )
}
// Disable checkboxes if the corresponding layer is not enabled
BOARD* board = ((WinEDA_BasePcbFrame*)m_Parent)->GetBoard();
BOARD* board = ((PCB_BASE_FRAME*)m_Parent)->GetBoard();
for( int layer = 0; layer<NB_LAYERS; layer++, mask <<= 1 )
{
if( ! board->IsLayerEnabled( layer ) )
......
......@@ -25,7 +25,7 @@
/* class WinEDA_GerberFrame for GerbView*/
/****************************************/
BEGIN_EVENT_TABLE( WinEDA_GerberFrame, WinEDA_BasePcbFrame )
BEGIN_EVENT_TABLE( WinEDA_GerberFrame, PCB_BASE_FRAME )
EVT_CLOSE( WinEDA_GerberFrame::OnCloseWindow )
EVT_SIZE( WinEDA_GerberFrame::OnSize )
......@@ -124,7 +124,7 @@ WinEDA_GerberFrame::WinEDA_GerberFrame( wxWindow* father,
const wxPoint& pos,
const wxSize& size,
long style ) :
WinEDA_BasePcbFrame( father, GERBER_FRAME, title, pos, size, style )
PCB_BASE_FRAME( father, GERBER_FRAME, title, pos, size, style )
{
m_FrameName = wxT( "GerberFrame" );
m_show_layer_manager_tools = true;
......@@ -271,7 +271,7 @@ void WinEDA_GerberFrame::LoadSettings()
if( config == NULL )
return;
WinEDA_BasePcbFrame::LoadSettings();
PCB_BASE_FRAME::LoadSettings();
config->Read( GerbviewDrawModeOption, &m_displayMode, 0l );
long pageSize_opt;
config->Read( GerbviewShowPageSizeOption, &pageSize_opt, 0l );
......@@ -303,7 +303,7 @@ void WinEDA_GerberFrame::SaveSettings()
if( config == NULL )
return;
WinEDA_BasePcbFrame::SaveSettings();
PCB_BASE_FRAME::SaveSettings();
wxRealPoint GridSize = GetScreen()->GetGridSize();
......
......@@ -15,7 +15,7 @@ PCB_Plot_Options g_pcb_plot_options;
/**************************************************************/
/* void WinEDA_BasePcbFrame::ToPlotter(wxCommandEvent& event) */
/* void PCB_BASE_FRAME::ToPlotter(wxCommandEvent& event) */
/***************************************************************/
/** TODO */
......
......@@ -37,7 +37,7 @@ class DCODE_SELECTION_BOX;
* class WinEDA_GerberFrame: this is the main window used in gerbview
******************************************************************/
class WinEDA_GerberFrame : public WinEDA_BasePcbFrame
class WinEDA_GerberFrame : public PCB_BASE_FRAME
{
friend class PCB_LAYER_WIDGET;
......@@ -230,7 +230,7 @@ public: WinEDA_GerberFrame( wxWindow* father, const wxString& title,
/**
* Load applications settings specific to the PCBNew.
*
* This overrides the base class WinEDA_BasePcbFrame::LoadSettings() to
* This overrides the base class PCB_BASE_FRAME::LoadSettings() to
* handle settings specific common to the PCB layout application. It
* calls down to the base class to load settings common to all PCB type
* drawing frames. Please put your application settings for PCBNew here
......@@ -241,7 +241,7 @@ public: WinEDA_GerberFrame( wxWindow* father, const wxString& title,
/**
* Save applications settings common to PCB draw frame objects.
*
* This overrides the base class WinEDA_BasePcbFrame::SaveSettings() to
* This overrides the base class PCB_BASE_FRAME::SaveSettings() to
* save settings specific to the PCB layout application main window. It
* calls down to the base class to save settings common to all PCB type
* drawing frames. Please put your application settings for PCBNew here
......@@ -416,7 +416,7 @@ public: WinEDA_GerberFrame( wxWindow* father, const wxString& title,
/* SaveCopyInUndoList() virtual
* currently: do nothing in gerbview.
* but must be defined because it is a pure virtual in WinEDA_BasePcbFrame
* but must be defined because it is a pure virtual in PCB_BASE_FRAME
*/
virtual void SaveCopyInUndoList(
BOARD_ITEM* aItemToCopy,
......
......@@ -22,7 +22,7 @@
/* Forward declarations of classes. */
class WinEDA_Toolbar;
class WinEDA_CvpcbFrame;
class WinEDA_PcbFrame;
class PCB_EDIT_FRAME;
class WinEDA_ModuleEditFrame;
class BOARD;
class TEXTE_PCB;
......@@ -44,10 +44,10 @@ class GENERAL_COLLECTORS_GUIDE;
/******************************************************************/
/* class WinEDA_BasePcbFrame: Basic class for pcbnew and gerbview */
/* class PCB_BASE_FRAME: Basic class for pcbnew and gerbview */
/******************************************************************/
class WinEDA_BasePcbFrame : public EDA_DRAW_FRAME
class PCB_BASE_FRAME : public EDA_DRAW_FRAME
{
public:
bool m_DisplayPadFill; // How show pads
......@@ -70,14 +70,14 @@ protected:
void updateGridSelectBox();
void updateZoomSelectBox();
virtual void unitsChangeRefresh();
public:
WinEDA_BasePcbFrame( wxWindow* father, int idtype,
const wxString& title,
const wxPoint& pos, const wxSize& size,
long style = KICAD_DEFAULT_DRAWFRAME_STYLE );
PCB_BASE_FRAME( wxWindow* father, int idtype, const wxString& title,
const wxPoint& pos, const wxSize& size,
long style = KICAD_DEFAULT_DRAWFRAME_STYLE );
~WinEDA_BasePcbFrame();
~PCB_BASE_FRAME();
/**
* Function SetBoard
......
......@@ -42,14 +42,14 @@ class PCB_LAYER_WIDGET;
/**
* See also class WinEDA_BasePcbFrame(): Basic class for pcbnew and gerbview.
* See also class PCB_BASE_FRAME(): Basic class for pcbnew and gerbview.
*/
/*****************************************************/
/* class WinEDA_PcbFrame: the main frame for Pcbnew */
/* class PCB_EDIT_FRAME: the main frame for Pcbnew */
/*****************************************************/
class WinEDA_PcbFrame : public WinEDA_BasePcbFrame
class PCB_EDIT_FRAME : public PCB_BASE_FRAME
{
friend class PCB_LAYER_WIDGET;
......@@ -111,14 +111,7 @@ protected:
*/
void syncLayerWidget( );
/**
* Function syncLayerBox
* updates the currently "selected" layer within m_SelLayerBox
* The currently active layer, as defined by the return value of
* getActiveLayer(). And updates the colored icon in the toolbar.
*/
void syncLayerBox();
virtual void unitsChangeRefresh();
public:
WinEDALayerChoiceBox* m_SelLayerBox; // a combo box to display and
......@@ -139,11 +132,11 @@ public:
public:
WinEDA_PcbFrame( wxWindow* father, const wxString& title,
const wxPoint& pos, const wxSize& size,
long style = KICAD_DEFAULT_DRAWFRAME_STYLE );
PCB_EDIT_FRAME( wxWindow* father, const wxString& title,
const wxPoint& pos, const wxSize& size,
long style = KICAD_DEFAULT_DRAWFRAME_STYLE );
~WinEDA_PcbFrame();
~PCB_EDIT_FRAME();
void OnQuit( wxCommandEvent& event );
......@@ -164,6 +157,8 @@ public:
// User interface update command event handlers.
void OnUpdateSave( wxUpdateUIEvent& aEvent );
void OnUpdateLayerPair( wxUpdateUIEvent& aEvent );
void OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent );
void OnUpdateDrcEnable( wxUpdateUIEvent& aEvent );
void OnUpdateShowBoardRatsnest( wxUpdateUIEvent& aEvent );
void OnUpdateShowModuleRatsnest( wxUpdateUIEvent& aEvent );
......@@ -173,8 +168,10 @@ public:
void OnUpdateHighContrastDisplayMode( wxUpdateUIEvent& aEvent );
void OnUpdateShowLayerManager( wxUpdateUIEvent& aEvent );
void OnUpdateVerticalToolbar( wxUpdateUIEvent& aEvent );
void OnUpdateAuxilaryToolbar( wxUpdateUIEvent& aEvent );
void OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent );
void OnUpdateZoneDisplayStyle( wxUpdateUIEvent& aEvent );
void OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent );
void OnUpdateSelectAutoTrackWidth( wxUpdateUIEvent& aEvent );
/**
* Function PrintPage , virtual
......@@ -243,7 +240,7 @@ public:
/**
* Load applications settings specific to PCBNew.
*
* This overrides the base class WinEDA_BasePcbFrame::LoadSettings() to
* This overrides the base class PCB_BASE_FRAME::LoadSettings() to
* handle settings specific common to the PCB layout application. It
* calls down to the base class to load settings common to all PCB type
* drawing frames. Please put your application settings for PCBNew here
......@@ -254,7 +251,7 @@ public:
/**
* Save applications settings common to PCBNew.
*
* This overrides the base class WinEDA_BasePcbFrame::SaveSettings() to
* This overrides the base class PCB_BASE_FRAME::SaveSettings() to
* save settings specific to the PCB layout application main window. It
* calls down to the base class to save settings common to all PCB type
* drawing frames. Please put your application settings for PCBNew here
......@@ -710,7 +707,7 @@ public:
void Place_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC );
void InstallGraphicItemPropertiesDialog( DRAWSEGMENT* aItem, wxDC* aDC );
// Footprint edition (see also WinEDA_BasePcbFrame)
// Footprint edition (see also PCB_BASE_FRAME)
void InstallModuleOptionsFrame( MODULE* Module, wxDC* DC );
void StartMove_Module( MODULE* module, wxDC* DC );
......@@ -742,7 +739,7 @@ public:
MODULE* aNewModule,
PICKED_ITEMS_LIST* aUndoPickList );
// loading modules: see WinEDA_BasePcbFrame
// loading modules: see PCB_BASE_FRAME
// Board handling
void RemoveStruct( BOARD_ITEM* Item, wxDC* DC );
......
......@@ -251,6 +251,15 @@ protected:
m_currentScreen = aScreen;
}
/**
* Function unitsChangeRefresh
* is called when when the units setting has changed to allow for any derived classes
* to handle refreshing and controls that have units based measurements in them. The
* default version only updates the status bar. Don't forget to call the default
* in your derived class or the status bar will not get updated properly.
*/
virtual void unitsChangeRefresh() { UpdateStatusBar(); }
public:
EDA_DRAW_FRAME( wxWindow* father, int idtype,
const wxString& title,
......
......@@ -56,7 +56,7 @@ int GetApxDist( int, int, int, int );
int CalcDist( int, int, int ,int );
/* BOARD.CPP */
bool ComputeMatriceSize( WinEDA_BasePcbFrame * frame, int pas_route );
bool ComputeMatriceSize( PCB_BASE_FRAME * frame, int pas_route );
int Build_Work( BOARD * Pcb );
void PlaceCells( BOARD * Pcb, int net_code, int flag = 0 );
......
......@@ -16,7 +16,7 @@
* TRACK_LOCKED protection against global delete
* TRACK_AR AutoRouted segment
*/
void WinEDA_PcbFrame::Attribut_Segment( TRACK* track, wxDC* DC, bool Flag_On )
void PCB_EDIT_FRAME::Attribut_Segment( TRACK* track, wxDC* DC, bool Flag_On )
{
if( track == NULL )
return;
......@@ -31,7 +31,7 @@ void WinEDA_PcbFrame::Attribut_Segment( TRACK* track, wxDC* DC, bool Flag_On )
/* Attribute change for an entire track */
void WinEDA_PcbFrame::Attribut_Track( TRACK* track, wxDC* DC, bool Flag_On )
void PCB_EDIT_FRAME::Attribut_Track( TRACK* track, wxDC* DC, bool Flag_On )
{
TRACK* Track;
int nb_segm;
......@@ -60,7 +60,7 @@ void WinEDA_PcbFrame::Attribut_Track( TRACK* track, wxDC* DC, bool Flag_On )
* for all the segments related to net_code.
* if net_code < 0 all the segments are modified.
*/
void WinEDA_PcbFrame::Attribut_net( wxDC* DC, int net_code, bool Flag_On )
void PCB_EDIT_FRAME::Attribut_net( wxDC* DC, int net_code, bool Flag_On )
{
TRACK* Track = GetBoard()->m_Track;
......
......@@ -35,7 +35,7 @@ wxString ModulesMaskSelection = wxT( "*" );
/* Called on events (popup menus) relative to automove and autoplace footprints
*/
void WinEDA_PcbFrame::AutoPlace( wxCommandEvent& event )
void PCB_EDIT_FRAME::AutoPlace( wxCommandEvent& event )
{
int id = event.GetId();
bool on_state;
......@@ -167,7 +167,7 @@ void WinEDA_PcbFrame::AutoPlace( wxCommandEvent& event )
* starting from the mouse cursor
* The components with the FIXED status set are not moved
*/
void WinEDA_PcbFrame::AutoMoveModulesOnPcb( bool PlaceModulesHorsPcb )
void PCB_EDIT_FRAME::AutoMoveModulesOnPcb( bool PlaceModulesHorsPcb )
{
std::vector <MODULE*> moduleList;
wxPoint start, current;
......@@ -271,7 +271,7 @@ void WinEDA_PcbFrame::AutoMoveModulesOnPcb( bool PlaceModulesHorsPcb )
/* Update (TRUE or FALSE) FIXED attribute on the module Module
* or all the modules if Module == NULL
*/
void WinEDA_PcbFrame::FixeModule( MODULE* Module, bool Fixe )
void PCB_EDIT_FRAME::FixeModule( MODULE* Module, bool Fixe )
{
if( Module )
{
......
......@@ -60,16 +60,14 @@ static void TracePenaliteRectangle( BOARD* Pcb,
int marge,
int Penalite,
int masque_layer );
static MODULE* PickModule( WinEDA_PcbFrame* pcbframe, wxDC* DC );
static MODULE* PickModule( PCB_EDIT_FRAME* pcbframe, wxDC* DC );
/* Routine to automatically place components in the contour of the PCB
* The components with the FIXED status are not moved. If the menu is
* calling the placement of 1 module, it will be replaced.
*/
void WinEDA_PcbFrame::AutoPlaceModule( MODULE* Module,
int place_mode,
wxDC* DC )
void PCB_EDIT_FRAME::AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC )
{
int ii, activ;
MODULE* ThisModule = NULL;
......@@ -311,7 +309,7 @@ end_of_tst:
}
void WinEDA_PcbFrame::DrawInfoPlace( wxDC* DC )
void PCB_EDIT_FRAME::DrawInfoPlace( wxDC* DC )
{
int color, ii, jj;
int ox, oy;
......@@ -373,7 +371,7 @@ void WinEDA_PcbFrame::DrawInfoPlace( wxDC* DC )
* Bitmap of the penalty is set to 0
* Occupation cell is a 0 leaves
*/
int WinEDA_PcbFrame::GenPlaceBoard()
int PCB_EDIT_FRAME::GenPlaceBoard()
{
int jj, ii;
int NbCells;
......@@ -489,7 +487,7 @@ int WinEDA_PcbFrame::GenPlaceBoard()
/* Place module on board.
*/
void WinEDA_PcbFrame::GenModuleOnBoard( MODULE* Module )
void PCB_EDIT_FRAME::GenModuleOnBoard( MODULE* Module )
{
int ox, oy, fx, fy, Penalite;
int marge = g_GridRoutingSize / 2;
......@@ -558,7 +556,7 @@ void WinEDA_PcbFrame::GenModuleOnBoard( MODULE* Module )
* 1 if placement impossible, 0 if OK
* = MinCout and external variable = cost of best placement
*/
int WinEDA_PcbFrame::RecherchePlacementModule( MODULE* Module, wxDC* DC )
int PCB_EDIT_FRAME::RecherchePlacementModule( MODULE* Module, wxDC* DC )
{
int cx, cy;
int ox, oy, fx, fy; /* occupying part of the module focuses on the
......@@ -842,7 +840,7 @@ int TstModuleOnBoard( BOARD* Pcb, MODULE* Module, bool TstOtherSide )
* The cost is the longest ratsnest distance with penalty for connections
* approaching 45 degrees.
*/
float WinEDA_PcbFrame::Compute_Ratsnest_PlaceModule( wxDC* DC )
float PCB_EDIT_FRAME::Compute_Ratsnest_PlaceModule( wxDC* DC )
{
double cout, icout;
int ox, oy;
......@@ -1024,7 +1022,7 @@ static bool Tri_RatsModules( MODULE* ref, MODULE* compare )
* - Maximum ratsnet with modules already placed
* - Max size, and number of pads max
*/
static MODULE* PickModule( WinEDA_PcbFrame* pcbframe, wxDC* DC )
static MODULE* PickModule( PCB_EDIT_FRAME* pcbframe, wxDC* DC )
{
MODULE* Module;
std::vector <MODULE*> moduleList;
......@@ -1087,7 +1085,7 @@ static MODULE* PickModule( WinEDA_PcbFrame* pcbframe, wxDC* DC )
/********************************************/
int Propagation( WinEDA_PcbFrame* frame )
int Propagation( PCB_EDIT_FRAME* frame )
/********************************************/
/**
......
......@@ -31,7 +31,7 @@ BOARDHEAD Board; /* 2-sided board */
/* init board, route traces*/
void WinEDA_PcbFrame::Autoroute( wxDC* DC, int mode )
void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode )
{
int start, stop;
MODULE* Module = NULL;
......@@ -185,7 +185,7 @@ void WinEDA_PcbFrame::Autoroute( wxDC* DC, int mode )
* When a ratsnets has not been routed.
* If this flag is 1 it is not reroute
*/
void WinEDA_PcbFrame::Reset_Noroutable( wxDC* DC )
void PCB_EDIT_FRAME::Reset_Noroutable( wxDC* DC )
{
if( ( GetBoard()->m_Status_Pcb & LISTE_RATSNEST_ITEM_OK )== 0 )
Compile_Ratsnest( DC, TRUE );
......
This diff is collapsed.
......@@ -58,12 +58,11 @@ static bool blockDrawItems = true;
class DIALOG_BLOCK_OPTIONS : public DIALOG_BLOCK_OPTIONS_BASE
{
private:
WinEDA_BasePcbFrame* m_Parent;
PCB_BASE_FRAME* m_Parent;
public:
DIALOG_BLOCK_OPTIONS( WinEDA_BasePcbFrame* parent,
const wxString& title );
DIALOG_BLOCK_OPTIONS( PCB_BASE_FRAME* parent, const wxString& title );
~DIALOG_BLOCK_OPTIONS()
{
}
......@@ -82,7 +81,7 @@ private:
};
static bool InstallBlockCmdFrame( WinEDA_BasePcbFrame* parent, const wxString& title )
static bool InstallBlockCmdFrame( PCB_BASE_FRAME* parent, const wxString& title )
{
int nocmd;
wxPoint oldpos = parent->GetScreen()->GetCrossHairPosition();
......@@ -101,8 +100,7 @@ static bool InstallBlockCmdFrame( WinEDA_BasePcbFrame* parent, const wxString& t
}
DIALOG_BLOCK_OPTIONS::DIALOG_BLOCK_OPTIONS( WinEDA_BasePcbFrame* aParent,
const wxString& aTitle ) :
DIALOG_BLOCK_OPTIONS::DIALOG_BLOCK_OPTIONS( PCB_BASE_FRAME* aParent, const wxString& aTitle ) :
DIALOG_BLOCK_OPTIONS_BASE( aParent, -1, aTitle )
{
m_Parent = aParent;
......@@ -151,7 +149,7 @@ void DIALOG_BLOCK_OPTIONS::ExecuteCommand( wxCommandEvent& event )
* @param aKey = the key modifiers (Alt, Shift ...)
* @return the block command id (BLOCK_MOVE, BLOCK_COPY...)
*/
int WinEDA_PcbFrame::ReturnBlockCommand( int aKey )
int PCB_EDIT_FRAME::ReturnBlockCommand( int aKey )
{
int cmd = 0;
......@@ -197,7 +195,7 @@ int WinEDA_PcbFrame::ReturnBlockCommand( int aKey )
* (bloc move, drag, copy .. )
* Parameters must be initialized in GetScreen()->m_BlockLocate
*/
void WinEDA_PcbFrame::HandleBlockPlace( wxDC* DC )
void PCB_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
{
bool err = false;
......@@ -267,7 +265,7 @@ void WinEDA_PcbFrame::HandleBlockPlace( wxDC* DC )
* @return false if no item selected, or command finished,
* true if some items found and HandleBlockPlace must be called later
*/
bool WinEDA_PcbFrame::HandleBlockEnd( wxDC* DC )
bool PCB_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
{
bool nextcmd = false; // Will be set to true if a block place is needed
bool cancelCmd = false;
......@@ -384,7 +382,7 @@ bool WinEDA_PcbFrame::HandleBlockEnd( wxDC* DC )
* select items within the selected block.
* selected items are put in the pick list
*/
void WinEDA_PcbFrame::Block_SelectItems()
void PCB_EDIT_FRAME::Block_SelectItems()
{
int masque_layer;
......@@ -521,8 +519,8 @@ void WinEDA_PcbFrame::Block_SelectItems()
static void drawPickedItems( EDA_DRAW_PANEL* aPanel, wxDC* aDC, wxPoint aOffset )
{
PICKED_ITEMS_LIST* itemsList = &aPanel->GetScreen()->m_BlockLocate.m_ItemsSelection;
WinEDA_BasePcbFrame* frame = (WinEDA_BasePcbFrame*) aPanel->GetParent();
PICKED_ITEMS_LIST* itemsList = &aPanel->GetScreen()->m_BlockLocate.m_ItemsSelection;
PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) aPanel->GetParent();
g_Offset_Module = -aOffset;
for( unsigned ii = 0; ii < itemsList->GetCount(); ii++ )
......@@ -595,7 +593,7 @@ static void drawMovingBlock( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& a
/*
* Erase selected block.
*/
void WinEDA_PcbFrame::Block_Delete()
void PCB_EDIT_FRAME::Block_Delete()
{
OnModify();
SetCurItem( NULL );
......@@ -642,7 +640,7 @@ void WinEDA_PcbFrame::Block_Delete()
break;
default:
wxMessageBox( wxT( "WinEDA_PcbFrame::Block_Delete( ) error: unexpected type" ) );
wxMessageBox( wxT( "PCB_EDIT_FRAME::Block_Delete( ) error: unexpected type" ) );
break;
}
}
......@@ -659,7 +657,7 @@ void WinEDA_PcbFrame::Block_Delete()
* Rotate all items within the selected block.
* The rotation center is the center of the block
*/
void WinEDA_PcbFrame::Block_Rotate()
void PCB_EDIT_FRAME::Block_Rotate()
{
wxPoint oldpos;
wxPoint centre; // rotation cent-re for the rotation transform
......@@ -706,7 +704,7 @@ void WinEDA_PcbFrame::Block_Rotate()
break;
default:
wxMessageBox( wxT( "WinEDA_PcbFrame::Block_Rotate( ) error: unexpected type" ) );
wxMessageBox( wxT( "PCB_EDIT_FRAME::Block_Rotate( ) error: unexpected type" ) );
break;
}
}
......@@ -723,7 +721,7 @@ void WinEDA_PcbFrame::Block_Rotate()
* flips items within the selected block.
* The flip center is the center of the block
*/
void WinEDA_PcbFrame::Block_Flip()
void PCB_EDIT_FRAME::Block_Flip()
{
#define INVERT( pos ) (pos) = center.y - ( (pos) - center.y )
wxPoint memo;
......@@ -772,7 +770,7 @@ void WinEDA_PcbFrame::Block_Flip()
default:
wxMessageBox( wxT( "WinEDA_PcbFrame::Block_Flip( ) error: unexpected type" ) );
wxMessageBox( wxT( "PCB_EDIT_FRAME::Block_Flip( ) error: unexpected type" ) );
break;
}
}
......@@ -789,7 +787,7 @@ void WinEDA_PcbFrame::Block_Flip()
* New location is determined by the current offset from the selected block's
* original location.
*/
void WinEDA_PcbFrame::Block_Move()
void PCB_EDIT_FRAME::Block_Move()
{
OnModify();
......@@ -831,7 +829,7 @@ void WinEDA_PcbFrame::Block_Move()
break;
default:
wxMessageBox( wxT( "WinEDA_PcbFrame::Block_Move( ) error: unexpected type" ) );
wxMessageBox( wxT( "PCB_EDIT_FRAME::Block_Move( ) error: unexpected type" ) );
break;
}
}
......@@ -849,7 +847,7 @@ void WinEDA_PcbFrame::Block_Move()
* New location is determined by the current offset from the selected block's
* original location.
*/
void WinEDA_PcbFrame::Block_Duplicate()
void PCB_EDIT_FRAME::Block_Duplicate()
{
wxPoint MoveVector = GetScreen()->m_BlockLocate.m_MoveVector;
......@@ -944,7 +942,7 @@ void WinEDA_PcbFrame::Block_Duplicate()
break;
default:
wxMessageBox( wxT( "WinEDA_PcbFrame::Block_Duplicate( ) error: unexpected type" ) );
wxMessageBox( wxT( "PCB_EDIT_FRAME::Block_Duplicate( ) error: unexpected type" ) );
break;
}
......
......@@ -291,7 +291,7 @@ static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx
BOARD_ITEM* item;
wxPoint move_offset;
MODULE* currentModule =
( (WinEDA_BasePcbFrame*) wxGetApp().GetTopWindow() )->m_ModuleEditFrame->GetBoard()->m_Modules;
( (PCB_BASE_FRAME*) wxGetApp().GetTopWindow() )->m_ModuleEditFrame->GetBoard()->m_Modules;
PtBlock = &screen->m_BlockLocate;
GRSetDrawMode( aDC, g_XorMode );
......
......@@ -32,7 +32,7 @@ void SetDir( int, int, int, int );
* Calculates nrows and ncols, dimensions of the matrix representation of BOARD
* for routing and automatic calculation of area.
*/
bool ComputeMatriceSize( WinEDA_BasePcbFrame* frame, int g_GridRoutingSize )
bool ComputeMatriceSize( PCB_BASE_FRAME* frame, int g_GridRoutingSize )
{
BOARD* pcb = frame->GetBoard();
......
......@@ -338,9 +338,9 @@ BOARD_ITEM* DuplicateStruct( BOARD_ITEM* aItem )
* UR_FLIPPED
* UR_ROTATED
*/
void WinEDA_PcbFrame::SaveCopyInUndoList( BOARD_ITEM* aItem,
UndoRedoOpType aCommandType,
const wxPoint& aTransformPoint )
void PCB_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem,
UndoRedoOpType aCommandType,
const wxPoint& aTransformPoint )
{
if( aItem == NULL ) // Nothing to save
return;
......@@ -398,9 +398,9 @@ void WinEDA_PcbFrame::SaveCopyInUndoList( BOARD_ITEM* aItem,
* @param aTypeCommand = type of comand ( UR_CHANGED, UR_NEW, UR_DELETED ...
* @param aTransformPoint - Transform items around this point.
*/
void WinEDA_PcbFrame::SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
UndoRedoOpType aTypeCommand,
const wxPoint& aTransformPoint )
void PCB_EDIT_FRAME::SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
UndoRedoOpType aTypeCommand,
const wxPoint& aTransformPoint )
{
PICKED_ITEMS_LIST* commandToUndo = new PICKED_ITEMS_LIST();
......@@ -475,7 +475,8 @@ void WinEDA_PcbFrame::SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
* @param aRebuildRatsnet = a bool: true to rebuid ratsnet (normal use, and default), false
* to just retrieve las state (used in abort commands that do not need to rebuild ratsnest)
*/
void WinEDA_PcbFrame::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRedoCommand, bool aRebuildRatsnet )
void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRedoCommand,
bool aRebuildRatsnet )
{
BOARD_ITEM* item;
bool not_found = false;
......@@ -574,7 +575,7 @@ void WinEDA_PcbFrame::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRe
/**********************************************************/
void WinEDA_PcbFrame::GetBoardFromUndoList( wxCommandEvent& event )
void PCB_EDIT_FRAME::GetBoardFromUndoList( wxCommandEvent& event )
/**********************************************************/
/**
......@@ -609,7 +610,7 @@ void WinEDA_PcbFrame::GetBoardFromUndoList( wxCommandEvent& event )
* - Get an old version of the board from Redo list
* @return none
*/
void WinEDA_PcbFrame::GetBoardFromRedoList( wxCommandEvent& event )
void PCB_EDIT_FRAME::GetBoardFromRedoList( wxCommandEvent& event )
{
if( GetScreen()->GetRedoCommandCount() == 0 )
return;
......
......@@ -46,7 +46,7 @@ WX_DECLARE_LIST( cmp, CmpList );
WX_DEFINE_LIST( CmpList )
void WinEDA_PcbFrame::RecreateBOMFileFromBoard( wxCommandEvent& aEvent )
void PCB_EDIT_FRAME::RecreateBOMFileFromBoard( wxCommandEvent& aEvent )
{
wxFileName fn;
FILE* FichBom;
......
......@@ -23,7 +23,7 @@ BOARD_DESIGN_SETTINGS boardDesignSettings;
/* Class BOARD: */
/*****************/
BOARD::BOARD( EDA_ITEM* parent, WinEDA_BasePcbFrame* frame ) :
BOARD::BOARD( EDA_ITEM* parent, PCB_BASE_FRAME* frame ) :
BOARD_ITEM( (BOARD_ITEM*)parent, TYPE_PCB ),
m_NetClasses( this )
{
......
......@@ -99,7 +99,7 @@ public:
#define HISTORY_MAX_COUNT 8
class BOARD : public BOARD_ITEM
{
friend class WinEDA_PcbFrame;
friend class PCB_EDIT_FRAME;
private:
typedef std::vector<MARKER_PCB*> MARKERS; // @todo: switch to boost:ptr_vector, and change ~BOARD()
......@@ -111,7 +111,7 @@ private:
LAYER m_Layer[NB_COPPER_LAYERS];
public:
WinEDA_BasePcbFrame* m_PcbFrame; // Window of visualization
PCB_BASE_FRAME* m_PcbFrame; // Window of visualization
EDA_Rect m_BoundaryBox; // Board size and position
int m_Status_Pcb; // Flags used in ratsnet calculation and update
int m_NbNodes; // Active pads (pads attached to a net ) count
......@@ -153,7 +153,7 @@ private:
/**********************************/
public:
BOARD( EDA_ITEM* aParent, WinEDA_BasePcbFrame* frame );
BOARD( EDA_ITEM* aParent, PCB_BASE_FRAME* frame );
~BOARD();
/**
......
......@@ -84,7 +84,7 @@ public:
* has knowledge about the frame and how and where to put status information
* about this object into the frame's message panel.
* Is virtual from EDA_ITEM.
* @param frame A WinEDA_BasePcbFrame in which to print status information.
* @param frame A PCB_BASE_FRAME in which to print status information.
*/
virtual void DisplayInfo( EDA_DRAW_FRAME* frame );
......
......@@ -148,11 +148,11 @@ void EDGE_MODULE::SetDrawCoord()
*/
void EDGE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wxPoint& offset )
{
int ux0, uy0, dx, dy, rayon, StAngle, EndAngle;
int color, type_trace;
int typeaff;
PCB_SCREEN* screen;
WinEDA_BasePcbFrame* frame;
int ux0, uy0, dx, dy, rayon, StAngle, EndAngle;
int color, type_trace;
int typeaff;
PCB_SCREEN* screen;
PCB_BASE_FRAME* frame;
MODULE* module = (MODULE*) m_Parent;
if( module == NULL )
......@@ -164,7 +164,7 @@ void EDGE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wx
color = brd->GetLayerColor(m_Layer);
frame = (WinEDA_BasePcbFrame*) panel->GetParent();
frame = (PCB_BASE_FRAME*) panel->GetParent();
screen = frame->GetScreen();
......
......@@ -139,7 +139,7 @@ void NETINFO_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame )
frame->AppendMsgPanel( _( "Net Code" ), txt, RED );
count = 0;
module = ( (WinEDA_BasePcbFrame*) frame )->GetBoard()->m_Modules;
module = ( (PCB_BASE_FRAME*) frame )->GetBoard()->m_Modules;
for( ; module != 0; module = module->Next() )
{
for( pad = module->m_Pads; pad != 0; pad = pad->Next() )
......@@ -153,7 +153,7 @@ void NETINFO_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame )
frame->AppendMsgPanel( _( "Pads" ), txt, DARKGREEN );
count = 0;
Struct = ( (WinEDA_BasePcbFrame*) frame )->GetBoard()->m_Track;
Struct = ( (PCB_BASE_FRAME*) frame )->GetBoard()->m_Track;
for( ; Struct != NULL; Struct = Struct->Next() )
{
if( Struct->Type() == TYPE_VIA )
......
......@@ -102,8 +102,8 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDraw_mode, const wxPoi
return;
WinEDA_BasePcbFrame* frame = (WinEDA_BasePcbFrame*) aPanel->GetParent();
PCB_SCREEN* screen = frame->GetScreen();
PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) aPanel->GetParent();
PCB_SCREEN* screen = frame->GetScreen();
if( frame->m_DisplayPadFill == FILLED )
drawInfo.m_ShowPadFilled = true;
else
......
......@@ -46,12 +46,12 @@
/**
* Class PCB_LAYER_WIDGET
* is here to implement the abtract functions of LAYER_WIDGET so they
* may be tied into the WinEDA_PcbFrame's data and so we can add a popup
* may be tied into the PCB_EDIT_FRAME's data and so we can add a popup
* menu which is specific to PCBNEW's needs.
*/
PCB_LAYER_WIDGET::PCB_LAYER_WIDGET( WinEDA_PcbFrame* aParent, wxWindow* aFocusOwner, int aPointSize ) :
PCB_LAYER_WIDGET::PCB_LAYER_WIDGET( PCB_EDIT_FRAME* aParent, wxWindow* aFocusOwner, int aPointSize ) :
LAYER_WIDGET( aParent, aFocusOwner, aPointSize ),
myframe( aParent )
{
......@@ -298,7 +298,7 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( int aLayer )
// the layer change from the PCB_LAYER_WIDGET can be denied by returning
// false from this function.
myframe->setActiveLayer( aLayer, false );
myframe->syncLayerBox();
if(DisplayOpt.ContrastModeDisplay)
myframe->DrawPanel->Refresh();
......
......@@ -34,12 +34,12 @@
/**
* Class PCB_LAYER_WIDGET
* is here to implement the abtract functions of LAYER_WIDGET so they
* may be tied into the WinEDA_PcbFrame's data and so we can add a popup
* may be tied into the PCB_EDIT_FRAME's data and so we can add a popup
* menu which is specific to PCBNEW's needs.
*/
class PCB_LAYER_WIDGET : public LAYER_WIDGET
{
WinEDA_PcbFrame* myframe;
PCB_EDIT_FRAME* myframe;
// popup menu ids.
#define ID_SHOW_ALL_COPPERS wxID_HIGHEST
......@@ -67,7 +67,7 @@ public:
* effectively sets the overal size of the widget via the row height and bitmap
* button sizes.
*/
PCB_LAYER_WIDGET( WinEDA_PcbFrame* aParent, wxWindow* aFocusOwner, int aPointSize = 10 );
PCB_LAYER_WIDGET( PCB_EDIT_FRAME* aParent, wxWindow* aFocusOwner, int aPointSize = 10 );
void ReFill();
......
......@@ -328,21 +328,21 @@ EDA_Rect TEXTE_MODULE::GetBoundingBox() const
*/
void TEXTE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wxPoint& offset )
{
int width, color, orient;
wxSize size;
wxPoint pos; // Center of text
PCB_SCREEN* screen;
WinEDA_BasePcbFrame* frame;
MODULE* Module = (MODULE*) m_Parent; /* parent must *not* be null
* (a module text without a footprint parent has no sense)
*/
int width, color, orient;
wxSize size;
wxPoint pos; // Center of text
PCB_SCREEN* screen;
PCB_BASE_FRAME* frame;
MODULE* Module = (MODULE*) m_Parent; /* parent must *not* be null
* (a module text without a footprint
* parent has no sense) */
if( panel == NULL )
return;
screen = (PCB_SCREEN*) panel->GetScreen();
frame = (WinEDA_BasePcbFrame*) panel->GetParent();
frame = (PCB_BASE_FRAME*) panel->GetParent();
pos.x = m_Pos.x - offset.x;
pos.y = m_Pos.y - offset.y;
......
......@@ -727,8 +727,8 @@ void SEGVIA::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wxPoint
int curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer;
int fillvia = 0;
WinEDA_BasePcbFrame* frame = (WinEDA_BasePcbFrame*) panel->GetParent();
PCB_SCREEN* screen = frame->GetScreen();
PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) panel->GetParent();
PCB_SCREEN* screen = frame->GetScreen();
if( frame->m_DisplayViaFill == FILLED )
fillvia = 1;
......@@ -941,7 +941,7 @@ void SEGVIA::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wxPoint
void TRACK::DisplayInfo( EDA_DRAW_FRAME* frame )
{
wxString msg;
BOARD* board = ( (WinEDA_BasePcbFrame*) frame )->GetBoard();
BOARD* board = ( (PCB_BASE_FRAME*) frame )->GetBoard();
// Display basic infos
DisplayInfoBase( frame );
......@@ -967,7 +967,7 @@ void TRACK::DisplayInfo( EDA_DRAW_FRAME* frame )
void TRACK::DisplayInfoBase( EDA_DRAW_FRAME* frame )
{
wxString msg;
BOARD* board = ( (WinEDA_BasePcbFrame*) frame )->GetBoard();
BOARD* board = ( (PCB_BASE_FRAME*) frame )->GetBoard();
frame->ClearMsgPanel();
......
......@@ -981,7 +981,7 @@ void ZONE_CONTAINER::DisplayInfo( EDA_DRAW_FRAME* frame )
{
if( GetNet() >= 0 )
{
NETINFO_ITEM* equipot = ( (WinEDA_BasePcbFrame*) frame )->GetBoard()->FindNet( GetNet() );
NETINFO_ITEM* equipot = ( (PCB_BASE_FRAME*) frame )->GetBoard()->FindNet( GetNet() );
if( equipot )
msg = equipot->GetNetname();
......
......@@ -277,7 +277,7 @@ public:
* @param verbose = true to show error messages
* @return error level (0 = no error)
*/
int Fill_Zone( WinEDA_PcbFrame* frame, wxDC* DC, bool verbose = TRUE );
int Fill_Zone( PCB_EDIT_FRAME* frame, wxDC* DC, bool verbose = TRUE );
/**
* Function Fill_Zone_Areas_With_Segments
......
......@@ -13,27 +13,27 @@
#include "protos.h"
/* local functions : */
static void clean_segments( WinEDA_PcbFrame* frame );
static void clean_segments( PCB_EDIT_FRAME* frame );
static void clean_vias( BOARD* aPcb );
static void DeleteUnconnectedTracks( WinEDA_PcbFrame* frame, wxDC* DC );
static void DeleteUnconnectedTracks( PCB_EDIT_FRAME* frame, wxDC* DC );
static TRACK* AlignSegment( BOARD* Pcb, TRACK* pt_ref, TRACK* pt_segm, int extremite );
static void Clean_Pcb_Items( WinEDA_PcbFrame* frame, wxDC* DC,
bool aCleanVias, bool aMergeSegments,
bool aDeleteUnconnectedSegm, bool aConnectToPads );
static void Clean_Pcb_Items( PCB_EDIT_FRAME* frame, wxDC* DC,
bool aCleanVias, bool aMergeSegments,
bool aDeleteUnconnectedSegm, bool aConnectToPads );
#include "dialog_cleaning_options.h"
#define CONN2PAD_ENBL
#ifdef CONN2PAD_ENBL
static void ConnectDanglingEndToPad( WinEDA_PcbFrame* frame, wxDC* DC );
static void ConnectDanglingEndToPad( PCB_EDIT_FRAME* frame, wxDC* DC );
static void ConnectDanglingEndToVia( BOARD* pcb );
//static void Gen_Raccord_Track( WinEDA_PcbFrame* frame, wxDC* DC );
//static void Gen_Raccord_Track( PCB_EDIT_FRAME* frame, wxDC* DC );
#endif
/*****************************************/
void WinEDA_PcbFrame::Clean_Pcb( wxDC* DC )
void PCB_EDIT_FRAME::Clean_Pcb( wxDC* DC )
/*****************************************/
/* Install the track operation dialog frame
*/
......@@ -56,7 +56,7 @@ void WinEDA_PcbFrame::Clean_Pcb( wxDC* DC )
* Create segments when track ends are incorrecty connected:
* i.e. when a track end covers a pad or a via but is not exactly on the pad or the via center
*/
void Clean_Pcb_Items( WinEDA_PcbFrame* frame, wxDC* DC,
void Clean_Pcb_Items( PCB_EDIT_FRAME* frame, wxDC* DC,
bool aCleanVias, bool aMergeSegments,
bool aDeleteUnconnectedSegm, bool aConnectToPads )
{
......@@ -162,7 +162,7 @@ void clean_vias( BOARD * aPcb )
/*****************************************************************************/
static void DeleteUnconnectedTracks( WinEDA_PcbFrame* frame, wxDC* DC )
static void DeleteUnconnectedTracks( PCB_EDIT_FRAME* frame, wxDC* DC )
/*****************************************************************************/
/*
......@@ -361,7 +361,7 @@ static void DeleteUnconnectedTracks( WinEDA_PcbFrame* frame, wxDC* DC )
/************************************************************/
static void clean_segments( WinEDA_PcbFrame* frame )
static void clean_segments( PCB_EDIT_FRAME* frame )
/************************************************************/
/* Delete null lenght segments, and intermediate points .. */
{
......@@ -631,7 +631,7 @@ static TRACK* AlignSegment( BOARD* Pcb, TRACK* pt_ref, TRACK* pt_segm, int extre
* @param aDC = the current device context (can be NULL)
* @return true if any change is made
*/
bool WinEDA_PcbFrame::RemoveMisConnectedTracks( wxDC* aDC )
bool PCB_EDIT_FRAME::RemoveMisConnectedTracks( wxDC* aDC )
{
TRACK* segment;
TRACK* other;
......@@ -708,7 +708,7 @@ bool WinEDA_PcbFrame::RemoveMisConnectedTracks( wxDC* aDC )
#if 0
/***************************************************************/
static void Gen_Raccord_Track( WinEDA_PcbFrame* frame, wxDC* DC )
static void Gen_Raccord_Track( PCB_EDIT_FRAME* frame, wxDC* DC )
/***************************************************************/
/**
......@@ -934,7 +934,7 @@ static void ConnectDanglingEndToVia( BOARD* pcb )
/***************************************************************/
void ConnectDanglingEndToPad( WinEDA_PcbFrame* frame, wxDC* DC )
void ConnectDanglingEndToPad( PCB_EDIT_FRAME* frame, wxDC* DC )
/**************************************************************/
/**
......
......@@ -27,7 +27,7 @@
/* This module contains out of line member functions for classes given in
* collectors.h. Those classes augment the functionality of class WinEDA_PcbFrame.
* collectors.h. Those classes augment the functionality of class PCB_EDIT_FRAME.
*/
......
......@@ -27,7 +27,7 @@
/* This module contains a number of COLLECTOR implementations which are used
to augment the functionality of class WinEDA_PcbFrame.
to augment the functionality of class PCB_EDIT_FRAME.
*/
......@@ -182,7 +182,7 @@ public:
* Class GENERAL_COLLECTOR
* is intended for use when the right click button is pressed, or when the
* plain "arrow" tool is in effect. This class can be used by window classes
* such as WinEDA_PcbFrame.
* such as PCB_EDIT_FRAME.
*
* Philosophy: this class knows nothing of the context in which a BOARD is used
* and that means it knows nothing about which layers are visible or current,
......
......@@ -266,7 +266,7 @@ static void Propagate_SubNet( TRACK* pt_start_conn, TRACK* pt_end_conn )
/***************************************************/
void WinEDA_BasePcbFrame::test_connexions( wxDC* DC )
void PCB_BASE_FRAME::test_connexions( wxDC* DC )
/***************************************************/
/**
......@@ -310,7 +310,7 @@ void WinEDA_BasePcbFrame::test_connexions( wxDC* DC )
/*************************************************************************/
void WinEDA_BasePcbFrame::test_1_net_connexion( wxDC* DC, int net_code )
void PCB_BASE_FRAME::test_1_net_connexion( wxDC* DC, int net_code )
/*************************************************************************/
/**
......@@ -566,7 +566,7 @@ void CreateSortedPadListByXCoord( BOARD* aBoard, std::vector<D_PAD*>* aVector )
/********************************************************************/
void WinEDA_BasePcbFrame::RecalculateAllTracksNetcode( )
void PCB_BASE_FRAME::RecalculateAllTracksNetcode()
/********************************************************************/
/* search connections between tracks and pads, and propagate pad net codes to the track segments
......
......@@ -15,7 +15,7 @@
#include "collectors.h"
//external funtions used here:
extern bool Magnetize( BOARD* m_Pcb, WinEDA_PcbFrame* frame,
extern bool Magnetize( BOARD* m_Pcb, PCB_EDIT_FRAME* frame,
int aCurrentTool, wxSize grid, wxPoint on_grid, wxPoint* curpos );
......@@ -60,7 +60,7 @@ static BOARD_ITEM* AllAreModulesAndReturnSmallestIfSo( GENERAL_COLLECTOR* aColle
}
BOARD_ITEM* WinEDA_BasePcbFrame::PcbGeneralLocateAndDisplay( int aHotKeyCode )
BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode )
{
BOARD_ITEM* item;
......@@ -209,7 +209,7 @@ BOARD_ITEM* WinEDA_BasePcbFrame::PcbGeneralLocateAndDisplay( int aHotKeyCode )
* DrawPanel->m_IgnoreMouseEvents = true;
*/
// this menu's handler is void WinEDA_BasePcbFrame::ProcessItemSelection()
// this menu's handler is void PCB_BASE_FRAME::ProcessItemSelection()
// and it calls SetCurItem() which in turn calls DisplayInfo() on the item.
DrawPanel->m_AbortRequest = true; // changed in false if an item
PopupMenu( &itemMenu ); // m_AbortRequest = false if an item is selected
......@@ -226,7 +226,7 @@ BOARD_ITEM* WinEDA_BasePcbFrame::PcbGeneralLocateAndDisplay( int aHotKeyCode )
}
void WinEDA_PcbFrame::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey )
void PCB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey )
{
wxRealPoint gridSize;
wxPoint oldpos;
......
......@@ -34,14 +34,14 @@ void RemoteCommand( const char* cmdline )
* $PIN: "pin name" $PART: "reference" put cursor on the footprint pin
*/
{
char line[1024];
wxString msg;
wxString modName;
char* idcmd;
char* text;
MODULE* module = 0;
WinEDA_PcbFrame* frame = (WinEDA_PcbFrame*)wxGetApp().GetTopWindow();
wxPoint pos;
char line[1024];
wxString msg;
wxString modName;
char* idcmd;
char* text;
MODULE* module = 0;
PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*)wxGetApp().GetTopWindow();
wxPoint pos;
strncpy( line, cmdline, sizeof(line) - 1 );
......@@ -131,7 +131,7 @@ void RemoteCommand( const char* cmdline )
// see wxstruct.h
/**************************************************************************/
void WinEDA_PcbFrame::SendMessageToEESCHEMA( BOARD_ITEM* objectToSync )
void PCB_EDIT_FRAME::SendMessageToEESCHEMA( BOARD_ITEM* objectToSync )
/**************************************************************************/
/** Send a remote command to eeschema via a socket,
......
......@@ -18,7 +18,7 @@
* If There is evidence of new track: delete new segment.
* Otherwise, delete segment under the cursor.
*/
TRACK* WinEDA_PcbFrame::Delete_Segment( wxDC* DC, TRACK* aTrack )
TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack )
{
int current_net_code;
......@@ -116,7 +116,7 @@ TRACK* WinEDA_PcbFrame::Delete_Segment( wxDC* DC, TRACK* aTrack )
}
void WinEDA_PcbFrame::Delete_Track( wxDC* DC, TRACK* aTrack )
void PCB_EDIT_FRAME::Delete_Track( wxDC* DC, TRACK* aTrack )
{
if( aTrack != NULL )
{
......@@ -128,7 +128,7 @@ void WinEDA_PcbFrame::Delete_Track( wxDC* DC, TRACK* aTrack )
}
void WinEDA_PcbFrame::Delete_net( wxDC* DC, TRACK* aTrack )
void PCB_EDIT_FRAME::Delete_net( wxDC* DC, TRACK* aTrack )
{
if( aTrack == NULL )
return;
......@@ -172,7 +172,7 @@ void WinEDA_PcbFrame::Delete_net( wxDC* DC, TRACK* aTrack )
* The leading segment is removed and all adjacent segments
* until a pad or a junction point of more than 2 segments is found
*/
void WinEDA_PcbFrame::Remove_One_Track( wxDC* DC, TRACK* pt_segm )
void PCB_EDIT_FRAME::Remove_One_Track( wxDC* DC, TRACK* pt_segm )
{
int segments_to_delete_count;
......
......@@ -42,7 +42,7 @@ static long s_SelectedLayers = LAYER_BACK | LAYER_FRONT |
DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( EDA_DRAW_FRAME* parent ) :
DIALOG_SVG_PRINT_base( parent )
{
m_Parent = (WinEDA_BasePcbFrame*) parent;
m_Parent = (PCB_BASE_FRAME*) parent;
m_Config = wxGetApp().m_EDA_Config;
initDialog( );
GetSizer()->SetSizeHints( this );
......
......@@ -7,17 +7,17 @@
class BASE_SCREEN;
class WinEDA_BasePcbFrame;
class PCB_BASE_FRAME;
class wxConfig;
class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base
{
private:
WinEDA_BasePcbFrame* m_Parent;
wxConfig* m_Config;
long m_PrintMaskLayer;
wxCheckBox* m_BoxSelectLayer[32];
PCB_BASE_FRAME* m_Parent;
wxConfig* m_Config;
long m_PrintMaskLayer;
wxCheckBox* m_BoxSelectLayer[32];
public:
DIALOG_SVG_PRINT( EDA_DRAW_FRAME* parent );
......
......@@ -33,7 +33,7 @@ wxPoint dialog_copper_zone::prevPosition( -1, -1 );
wxSize dialog_copper_zone::prevSize;
dialog_copper_zone::dialog_copper_zone( WinEDA_PcbFrame* parent, ZONE_SETTING* zone_setting ) :
dialog_copper_zone::dialog_copper_zone( PCB_EDIT_FRAME* parent, ZONE_SETTING* zone_setting ) :
dialog_copper_zone_base( parent )
{
m_Parent = parent;
......
......@@ -12,7 +12,7 @@
class dialog_copper_zone : public dialog_copper_zone_base
{
private:
WinEDA_PcbFrame* m_Parent;
PCB_EDIT_FRAME* m_Parent;
wxConfig* m_Config; // Current config
int m_OnExitCode; /* exit code: ZONE_ABORT if no change,
* ZONE_OK if new values accepted
......@@ -35,7 +35,7 @@ private:
static wxSize prevSize;
public:
dialog_copper_zone( WinEDA_PcbFrame* parent, ZONE_SETTING* zone_setting );
dialog_copper_zone( PCB_EDIT_FRAME* parent, ZONE_SETTING* zone_setting );
private:
void initDialog();
void OnButtonOkClick( wxCommandEvent& event );
......
......@@ -143,7 +143,7 @@ void EnsureGridColumnWidths( wxGrid* aGrid )
/***********************************************************************************/
DIALOG_DESIGN_RULES::DIALOG_DESIGN_RULES( WinEDA_PcbFrame* parent ) :
DIALOG_DESIGN_RULES::DIALOG_DESIGN_RULES( PCB_EDIT_FRAME* parent ) :
DIALOG_DESIGN_RULES_BASE( parent )
/***********************************************************************************/
{
......
......@@ -31,7 +31,7 @@ private:
static const wxString wildCard; ///< the name of a ficticious netclass which includes all NETs
WinEDA_PcbFrame* m_Parent;
PCB_EDIT_FRAME* m_Parent;
BOARD* m_Pcb;
BOARD_DESIGN_SETTINGS* m_BrdSettings;
......@@ -100,7 +100,7 @@ private:
public:
DIALOG_DESIGN_RULES( WinEDA_PcbFrame* parent );
DIALOG_DESIGN_RULES( PCB_EDIT_FRAME* parent );
~DIALOG_DESIGN_RULES( ) { };
};
......
......@@ -18,7 +18,7 @@
#include "dialog_display_options_base.h"
void WinEDA_PcbFrame::InstallDisplayOptionsDialog( wxCommandEvent& aEvent )
void PCB_EDIT_FRAME::InstallDisplayOptionsDialog( wxCommandEvent& aEvent )
{
Dialog_Display_Options* DisplayOptionsDialog =
new Dialog_Display_Options( this );
......@@ -29,7 +29,7 @@ void WinEDA_PcbFrame::InstallDisplayOptionsDialog( wxCommandEvent& aEvent )
/*******************************************************************************/
Dialog_Display_Options::Dialog_Display_Options( WinEDA_PcbFrame* parent ) :
Dialog_Display_Options::Dialog_Display_Options( PCB_EDIT_FRAME* parent ) :
DialogDisplayOptions_base(parent)
/*******************************************************************************/
{
......
......@@ -6,12 +6,12 @@
class Dialog_Display_Options : public DialogDisplayOptions_base
{
private:
WinEDA_PcbFrame* m_Parent;
PCB_EDIT_FRAME* m_Parent;
void init();
public:
Dialog_Display_Options( WinEDA_PcbFrame* parent );
Dialog_Display_Options( PCB_EDIT_FRAME* parent );
~Dialog_Display_Options( ) { };
void OnOkClick( wxCommandEvent& event );
void OnCancelClick( wxCommandEvent& event );
......
......@@ -23,7 +23,7 @@ wxSize DIALOG_DRC_CONTROL::s_LastSize;
* and run DRC tests
*/
DIALOG_DRC_CONTROL::DIALOG_DRC_CONTROL( DRC* aTester, WinEDA_PcbFrame* parent ) :
DIALOG_DRC_CONTROL::DIALOG_DRC_CONTROL( DRC* aTester, PCB_EDIT_FRAME* parent ) :
DIALOG_DRC_CONTROL_BASE( parent )
{
m_tester = aTester;
......
......@@ -41,7 +41,7 @@ public:
BOARD_DESIGN_SETTINGS* m_BrdSettings;
/// Constructors
DIALOG_DRC_CONTROL( DRC* aTester, WinEDA_PcbFrame* parent );
DIALOG_DRC_CONTROL( DRC* aTester, PCB_EDIT_FRAME* parent );
~DIALOG_DRC_CONTROL(){};
/**
......@@ -116,7 +116,7 @@ private:
DRC* m_tester;
WinEDA_PcbFrame* m_Parent;
PCB_EDIT_FRAME* m_Parent;
int m_UnconnectedCount;
};
......
......@@ -16,10 +16,9 @@
#include "dialog_edit_module_for_BoardEditor.h"
DIALOG_MODULE_BOARD_EDITOR::DIALOG_MODULE_BOARD_EDITOR(
WinEDA_PcbFrame* aParent,
MODULE* aModule,
wxDC* aDC ) :
DIALOG_MODULE_BOARD_EDITOR::DIALOG_MODULE_BOARD_EDITOR( PCB_EDIT_FRAME* aParent,
MODULE* aModule,
wxDC* aDC ) :
DIALOG_MODULE_BOARD_EDITOR_BASE( aParent )
{
m_Parent = aParent;
......
......@@ -13,7 +13,7 @@ class DIALOG_MODULE_BOARD_EDITOR: public DIALOG_MODULE_BOARD_EDITOR_BASE
{
private:
WinEDA_PcbFrame * m_Parent;
PCB_EDIT_FRAME * m_Parent;
wxDC * m_DC;
MODULE* m_CurrentModule;
TEXTE_MODULE* m_ReferenceCopy;
......@@ -27,7 +27,7 @@ private:
public:
// Constructor and destructor
DIALOG_MODULE_BOARD_EDITOR( WinEDA_PcbFrame* aParent, MODULE* aModule, wxDC* aDC );
DIALOG_MODULE_BOARD_EDITOR( PCB_EDIT_FRAME* aParent, MODULE* aModule, wxDC* aDC );
~DIALOG_MODULE_BOARD_EDITOR();
private:
......
......@@ -23,13 +23,13 @@ extern wxPoint MoveVector; // Move vector for move edge, imported from edtxtmod
class DialogEditModuleText : public DialogEditModuleText_base
{
private:
WinEDA_BasePcbFrame* m_Parent;
PCB_BASE_FRAME* m_Parent;
wxDC* m_DC;
MODULE* m_Module;
TEXTE_MODULE* m_CurrentTextMod;
public:
DialogEditModuleText( WinEDA_BasePcbFrame* parent, TEXTE_MODULE* TextMod, wxDC* DC );
DialogEditModuleText( PCB_BASE_FRAME* parent, TEXTE_MODULE* TextMod, wxDC* DC );
~DialogEditModuleText() {};
private:
......@@ -39,7 +39,7 @@ private:
};
/*************************************************************************************/
void WinEDA_BasePcbFrame::InstallTextModOptionsFrame( TEXTE_MODULE* TextMod, wxDC* DC )
void PCB_BASE_FRAME::InstallTextModOptionsFrame( TEXTE_MODULE* TextMod, wxDC* DC )
/**************************************************************************************/
{
DrawPanel->m_IgnoreMouseEvents = TRUE;
......@@ -49,7 +49,8 @@ void WinEDA_BasePcbFrame::InstallTextModOptionsFrame( TEXTE_MODULE* TextMod, wxD
}
DialogEditModuleText::DialogEditModuleText( WinEDA_BasePcbFrame* parent, TEXTE_MODULE* TextMod, wxDC* DC ) :
DialogEditModuleText::DialogEditModuleText( PCB_BASE_FRAME* parent,
TEXTE_MODULE* TextMod, wxDC* DC ) :
DialogEditModuleText_base(parent)
{
......
......@@ -19,7 +19,7 @@
/**********************************************************************/
void WinEDA_PcbFrame::Access_to_External_Tool( wxCommandEvent& event )
void PCB_EDIT_FRAME::Access_to_External_Tool( wxCommandEvent& event )
/**********************************************************************/
/* Run an external tool (currently, only freeroute)
......@@ -31,7 +31,7 @@ void WinEDA_PcbFrame::Access_to_External_Tool( wxCommandEvent& event )
DIALOG_FREEROUTE::DIALOG_FREEROUTE( WinEDA_PcbFrame* parent ):
DIALOG_FREEROUTE::DIALOG_FREEROUTE( PCB_EDIT_FRAME* parent ):
DIALOG_FREEROUTE_BASE( parent )
{
m_Parent = parent;
......
......@@ -14,7 +14,7 @@
class DIALOG_FREEROUTE : public DIALOG_FREEROUTE_BASE
{
private:
WinEDA_PcbFrame* m_Parent;
PCB_EDIT_FRAME* m_Parent;
bool m_FreeRouteSetupChanged;
private:
......@@ -31,7 +31,7 @@ private:
public:
DIALOG_FREEROUTE( WinEDA_PcbFrame* parent );
DIALOG_FREEROUTE( PCB_EDIT_FRAME* parent );
~DIALOG_FREEROUTE() {};
};
......
......@@ -56,7 +56,7 @@ static DRILL_PRECISION precisionListForMetric[] =
};
DIALOG_GENDRILL::DIALOG_GENDRILL( WinEDA_PcbFrame* parent ) :
DIALOG_GENDRILL::DIALOG_GENDRILL( PCB_EDIT_FRAME* parent ) :
DIALOG_GENDRILL_BASE( parent )
{
m_Parent = parent;
......
......@@ -45,13 +45,13 @@ public:
wxPoint m_FileDrillOffset; // Drill offset: 0,0 for absolute coordiantes, or auxialry axis origin
private:
WinEDA_PcbFrame* m_Parent;
PCB_EDIT_FRAME* m_Parent;
int m_PadsHoleCount;
int m_ThroughViasCount;
int m_MicroViasCount;
int m_BlindOrBuriedViasCount;
public: DIALOG_GENDRILL( WinEDA_PcbFrame* parent );
public: DIALOG_GENDRILL( PCB_EDIT_FRAME* parent );
~DIALOG_GENDRILL();
private:
......
......@@ -19,7 +19,7 @@
#include "pcbnew_id.h"
Dialog_GeneralOptions::Dialog_GeneralOptions( WinEDA_PcbFrame* parent ) :
Dialog_GeneralOptions::Dialog_GeneralOptions( PCB_EDIT_FRAME* parent ) :
DialogGeneralOptionsBoardEditor_base( parent )
{
m_Parent = parent;
......@@ -106,7 +106,7 @@ void Dialog_GeneralOptions::OnOkClick( wxCommandEvent& event )
/* Must be called on a click on the left toolbar (options toolbar
* Update variables according to tools states
*/
void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event )
void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
{
int id = event.GetId();
bool state = m_OptionsToolBar->GetToolState( id );
......@@ -182,7 +182,7 @@ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event )
default:
DisplayError( this,
wxT( "WinEDA_PcbFrame::OnSelectOptionToolbar error \n (event not handled!)" ) );
wxT( "PCB_EDIT_FRAME::OnSelectOptionToolbar error \n (event not handled!)" ) );
break;
}
}
......@@ -8,13 +8,13 @@ class Dialog_GeneralOptions : public DialogGeneralOptionsBoardEditor_base
/***********************************************************************/
{
private:
WinEDA_PcbFrame* m_Parent;
PCB_EDIT_FRAME* m_Parent;
BOARD * m_Board;
void init();
public:
Dialog_GeneralOptions( WinEDA_PcbFrame* parent );
Dialog_GeneralOptions( PCB_EDIT_FRAME* parent );
~Dialog_GeneralOptions() {};
void OnOkClick( wxCommandEvent& event );
void OnCancelClick( wxCommandEvent& event );
......
......@@ -13,7 +13,7 @@
#include "dialog_global_deletion.h"
DIALOG_GLOBAL_DELETION::DIALOG_GLOBAL_DELETION( WinEDA_PcbFrame* parent )
DIALOG_GLOBAL_DELETION::DIALOG_GLOBAL_DELETION( PCB_EDIT_FRAME* parent )
: DIALOG_GLOBAL_DELETION_BASE( parent )
{
m_Parent = parent;
......@@ -25,7 +25,7 @@ DIALOG_GLOBAL_DELETION::DIALOG_GLOBAL_DELETION( WinEDA_PcbFrame* parent )
/********************************************************************/
void WinEDA_PcbFrame::InstallPcbGlobalDeleteFrame( const wxPoint& pos )
void PCB_EDIT_FRAME::InstallPcbGlobalDeleteFrame( const wxPoint& pos )
/********************************************************************/
{
DIALOG_GLOBAL_DELETION dlg( this );
......
......@@ -10,10 +10,10 @@
class DIALOG_GLOBAL_DELETION: public DIALOG_GLOBAL_DELETION_BASE
{
private:
WinEDA_PcbFrame * m_Parent;
PCB_EDIT_FRAME * m_Parent;
public:
DIALOG_GLOBAL_DELETION( WinEDA_PcbFrame* parent );
DIALOG_GLOBAL_DELETION( PCB_EDIT_FRAME* parent );
private:
void OnOkClick( wxCommandEvent& event )
......
......@@ -21,8 +21,8 @@
* automatically created by wxFormBuilder
*/
DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS(
WinEDA_PcbFrame* aParent, int aNetcode ) :
DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS( PCB_EDIT_FRAME* aParent,
int aNetcode ) :
DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE( aParent )
{
m_Parent = aParent;
......
......@@ -34,12 +34,12 @@ class DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS :
public DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE
{
private:
WinEDA_PcbFrame* m_Parent;
PCB_EDIT_FRAME* m_Parent;
int m_Netcode;
int m_OptionID;
public:
DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS( WinEDA_PcbFrame* aParent, int aNetcode );
DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS( PCB_EDIT_FRAME* aParent, int aNetcode );
~DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS() {};
// Virtual event handlers, overided here
......
......@@ -26,13 +26,13 @@
class DialogGraphicItemProperties: public DialogGraphicItemProperties_base
{
private:
WinEDA_PcbFrame* m_Parent;
PCB_EDIT_FRAME* m_Parent;
wxDC* m_DC;
DRAWSEGMENT* m_Item;
BOARD_DESIGN_SETTINGS* m_BrdSettings;
public:
DialogGraphicItemProperties( WinEDA_PcbFrame* aParent, DRAWSEGMENT * aItem, wxDC * aDC);
DialogGraphicItemProperties( PCB_EDIT_FRAME* aParent, DRAWSEGMENT * aItem, wxDC * aDC);
~DialogGraphicItemProperties() {};
private:
......@@ -42,7 +42,8 @@ private:
void OnLayerChoice( wxCommandEvent& event );
};
DialogGraphicItemProperties::DialogGraphicItemProperties( WinEDA_PcbFrame* aParent, DRAWSEGMENT * aItem, wxDC * aDC):
DialogGraphicItemProperties::DialogGraphicItemProperties( PCB_EDIT_FRAME* aParent,
DRAWSEGMENT * aItem, wxDC * aDC):
DialogGraphicItemProperties_base( aParent )
{
m_Parent = aParent;
......@@ -56,7 +57,7 @@ DialogGraphicItemProperties::DialogGraphicItemProperties( WinEDA_PcbFrame* aPare
/*******************************************************************************************/
void WinEDA_PcbFrame::InstallGraphicItemPropertiesDialog(DRAWSEGMENT * aItem, wxDC* aDC)
void PCB_EDIT_FRAME::InstallGraphicItemPropertiesDialog(DRAWSEGMENT * aItem, wxDC* aDC)
/*******************************************************************************************/
{
if ( aItem == NULL )
......
......@@ -17,7 +17,7 @@
extern int g_DrawDefaultLineThickness;
void WinEDA_PcbFrame::OnConfigurePcbOptions( wxCommandEvent& aEvent )
void PCB_EDIT_FRAME::OnConfigurePcbOptions( wxCommandEvent& aEvent )
{
DIALOG_GRAPHIC_ITEMS_OPTIONS dlg( this );
......@@ -36,7 +36,7 @@ void WinEDA_ModuleEditFrame::InstallOptionsFrame( const wxPoint& pos )
* DIALOG_GRAPHIC_ITEMS_OPTIONS constructor
*/
DIALOG_GRAPHIC_ITEMS_OPTIONS::DIALOG_GRAPHIC_ITEMS_OPTIONS( WinEDA_BasePcbFrame* parent )
DIALOG_GRAPHIC_ITEMS_OPTIONS::DIALOG_GRAPHIC_ITEMS_OPTIONS( PCB_BASE_FRAME* parent )
: DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( parent )
{
m_Parent = parent;
......
......@@ -24,7 +24,7 @@
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _DIALOG_GRAPHIC_ITEMS_OPTIONS_H_
#define _DIALOG_GRAPHIC_ITEMS_OPTIONS_H_
......@@ -38,11 +38,11 @@ class DIALOG_GRAPHIC_ITEMS_OPTIONS: public DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE
{
public:
BOARD_DESIGN_SETTINGS* m_BrdSettings;
WinEDA_BasePcbFrame * m_Parent;
PCB_BASE_FRAME * m_Parent;
public:
DIALOG_GRAPHIC_ITEMS_OPTIONS( WinEDA_BasePcbFrame* parent );
~DIALOG_GRAPHIC_ITEMS_OPTIONS( );
DIALOG_GRAPHIC_ITEMS_OPTIONS( PCB_BASE_FRAME* parent );
~DIALOG_GRAPHIC_ITEMS_OPTIONS();
private:
void initValues( );
......
......@@ -75,7 +75,7 @@ private:
static wxPoint s_LastPos;
static wxSize s_LastSize;
WinEDA_PcbFrame* m_Parent;
PCB_EDIT_FRAME* m_Parent;
int m_CopperLayerCount;
int m_EnabledLayers;
......@@ -154,7 +154,7 @@ private:
public:
DIALOG_LAYERS_SETUP( WinEDA_PcbFrame* parent );
DIALOG_LAYERS_SETUP( PCB_EDIT_FRAME* parent );
~DIALOG_LAYERS_SETUP( ) { };
bool Show( bool show ); // overload stock function
......@@ -271,7 +271,7 @@ CTLs DIALOG_LAYERS_SETUP::getCTLs( int aLayerNumber )
/***********************************************************************************/
DIALOG_LAYERS_SETUP::DIALOG_LAYERS_SETUP( WinEDA_PcbFrame* parent ) :
DIALOG_LAYERS_SETUP::DIALOG_LAYERS_SETUP( PCB_EDIT_FRAME* parent ) :
DIALOG_LAYERS_SETUP_BASE( parent )
/***********************************************************************************/
{
......@@ -560,7 +560,7 @@ void DIALOG_LAYERS_SETUP::OnCopperLayersChoice( wxCommandEvent& event )
void DIALOG_LAYERS_SETUP::OnCancelButtonClick( wxCommandEvent& event )
/*****************************************************************/
{
EndModal( 0 );
EndModal( wxID_CANCEL );
}
......@@ -698,8 +698,36 @@ bool DIALOG_LAYERS_SETUP::testLayerNames()
}
void WinEDA_PcbFrame::InstallDialogLayerSetup()
void PCB_EDIT_FRAME::InstallDialogLayerSetup()
{
DIALOG_LAYERS_SETUP dlg( this );
dlg.ShowModal();
if( dlg.ShowModal() == wxID_CANCEL )
return;
wxLogDebug( wxT( "Current layer selected %d." ), getActiveLayer() );
// If the current active layer was removed, find the next avaiable layer to set as the
// active layer.
if( ( ( 1 << getActiveLayer() ) & GetBoard()->GetEnabledLayers() ) == 0 )
{
for( int i = 0; i < LAYER_COUNT; i++ )
{
int tmp = i;
if( i >= LAYER_COUNT )
tmp = i - LAYER_COUNT;
if( ( 1 << tmp ) & GetBoard()->GetEnabledLayers() )
{
wxLogDebug( wxT( "Setting current layer to %d." ), getActiveLayer() );
setActiveLayer( tmp, true );
break;
}
}
}
else
{
setActiveLayer( getActiveLayer(), true );
}
}
......@@ -22,7 +22,7 @@
* automatically created by wxFormBuilder
*/
DIALOG_PADS_MASK_CLEARANCE::DIALOG_PADS_MASK_CLEARANCE( WinEDA_PcbFrame* parent ) :
DIALOG_PADS_MASK_CLEARANCE::DIALOG_PADS_MASK_CLEARANCE( PCB_EDIT_FRAME* parent ) :
DIALOG_PADS_MASK_CLEARANCE_BASE( parent )
{
m_Parent = parent;
......
......@@ -19,11 +19,11 @@
class DIALOG_PADS_MASK_CLEARANCE : public DIALOG_PADS_MASK_CLEARANCE_BASE
{
private:
WinEDA_PcbFrame* m_Parent;
PCB_EDIT_FRAME* m_Parent;
BOARD_DESIGN_SETTINGS* m_BrdSettings;
public:
DIALOG_PADS_MASK_CLEARANCE( WinEDA_PcbFrame* parent );
DIALOG_PADS_MASK_CLEARANCE( PCB_EDIT_FRAME* parent );
~DIALOG_PADS_MASK_CLEARANCE() {};
private:
void MyInit();
......
......@@ -18,7 +18,7 @@ extern void TestFor_Duplicate_Missing_And_Extra_Footprints( wxWindow* fram
void WinEDA_PcbFrame::InstallNetlistFrame( wxDC* DC, const wxPoint& pos )
void PCB_EDIT_FRAME::InstallNetlistFrame( wxDC* DC, const wxPoint& pos )
{
/* Setup the netlist file name to the last net list file read or the board file
* name if no last file read is not set.
......@@ -37,7 +37,7 @@ void WinEDA_PcbFrame::InstallNetlistFrame( wxDC* DC, const wxPoint& pos )
}
DIALOG_NETLIST::DIALOG_NETLIST( WinEDA_PcbFrame* aParent, wxDC * aDC,
DIALOG_NETLIST::DIALOG_NETLIST( PCB_EDIT_FRAME* aParent, wxDC * aDC,
const wxString & aNetlistFull_Filename )
: DIALOG_NETLIST_FBP( aParent )
{
......
......@@ -15,12 +15,13 @@
class DIALOG_NETLIST : public DIALOG_NETLIST_FBP
{
private:
WinEDA_PcbFrame * m_Parent;
PCB_EDIT_FRAME * m_Parent;
wxDC * m_DC;
public:
DIALOG_NETLIST( WinEDA_PcbFrame* aParent, wxDC * aDC, const wxString & aNetlistFull_Filename );
DIALOG_NETLIST( PCB_EDIT_FRAME* aParent, wxDC * aDC,
const wxString & aNetlistFull_Filename );
~DIALOG_NETLIST() {};
void Init();
......
......@@ -44,13 +44,13 @@
class DIALOG_ORIENT_FOOTPRINTS: public DIALOG_ORIENT_FOOTPRINTS_BASE
{
private:
WinEDA_PcbFrame * m_Parent;
PCB_EDIT_FRAME * m_Parent;
static int newOrientation;
public:
DIALOG_ORIENT_FOOTPRINTS( WinEDA_PcbFrame* parent );
DIALOG_ORIENT_FOOTPRINTS( PCB_EDIT_FRAME* parent );
~DIALOG_ORIENT_FOOTPRINTS() {}
bool ApplyToLockedModules()
{
return m_ApplyToLocked->IsChecked();
......@@ -73,7 +73,7 @@ private:
int DIALOG_ORIENT_FOOTPRINTS::newOrientation = 0;
DIALOG_ORIENT_FOOTPRINTS::DIALOG_ORIENT_FOOTPRINTS( WinEDA_PcbFrame* parent )
DIALOG_ORIENT_FOOTPRINTS::DIALOG_ORIENT_FOOTPRINTS( PCB_EDIT_FRAME* parent )
: DIALOG_ORIENT_FOOTPRINTS_BASE( parent )
{
m_Parent = parent;
......@@ -87,7 +87,7 @@ DIALOG_ORIENT_FOOTPRINTS::DIALOG_ORIENT_FOOTPRINTS( WinEDA_PcbFrame* parent )
/****************************************************************/
void WinEDA_PcbFrame::OnOrientFootprints( wxCommandEvent& event )
void PCB_EDIT_FRAME::OnOrientFootprints( wxCommandEvent& event )
/****************************************************************/
/**
* Function OnOrientFootprints
......@@ -108,8 +108,8 @@ void WinEDA_PcbFrame::OnOrientFootprints( wxCommandEvent& event )
/*******************************************************************/
bool WinEDA_PcbFrame::ReOrientModules( const wxString& ModuleMask,
int Orient, bool include_fixe )
bool PCB_EDIT_FRAME::ReOrientModules( const wxString& ModuleMask,
int Orient, bool include_fixe )
/*******************************************************************/
/**
* Function ReOrientModules
......@@ -141,7 +141,7 @@ bool WinEDA_PcbFrame::ReOrientModules( const wxString& ModuleMask,
if ( modified )
OnModify();
return modified;
}
......
......@@ -53,7 +53,7 @@ extern int ChangeSideMaskLayer( int masque );
class DIALOG_PAD_PROPERTIES : public DIALOG_PAD_PROPERTIES_BASE
{
private:
WinEDA_BasePcbFrame* m_Parent;
PCB_BASE_FRAME* m_Parent;
D_PAD* m_CurrentPad; // Pad currently edited
D_PAD* m_dummyPad; // a working copy used to show changes
BOARD* m_Board;
......@@ -63,7 +63,7 @@ private:
bool m_canUpdate;
public:
DIALOG_PAD_PROPERTIES( WinEDA_BasePcbFrame* parent, D_PAD* Pad );
DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* parent, D_PAD* Pad );
~DIALOG_PAD_PROPERTIES()
{
delete m_dummyPad;
......@@ -140,7 +140,7 @@ void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event )
/*******************************************************************************************/
DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( WinEDA_BasePcbFrame* parent, D_PAD* Pad ) :
DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* parent, D_PAD* Pad ) :
DIALOG_PAD_PROPERTIES_BASE( parent )
/*******************************************************************************************/
{
......@@ -163,7 +163,7 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( WinEDA_BasePcbFrame* parent, D_PAD
}
void WinEDA_BasePcbFrame::InstallPadOptionsFrame( D_PAD* Pad )
void PCB_BASE_FRAME::InstallPadOptionsFrame( D_PAD* Pad )
{
DIALOG_PAD_PROPERTIES dlg( this, Pad );
......
......@@ -44,7 +44,8 @@
* wxFormBuilder.
*/
DIALOG_PCB_TEXT_PROPERTIES::DIALOG_PCB_TEXT_PROPERTIES( WinEDA_PcbFrame* parent, TEXTE_PCB* passedTextPCB, wxDC* DC )
DIALOG_PCB_TEXT_PROPERTIES::DIALOG_PCB_TEXT_PROPERTIES( PCB_EDIT_FRAME* parent,
TEXTE_PCB* passedTextPCB, wxDC* DC )
: DIALOG_PCB_TEXT_PROPERTIES_BASE( parent )
{
m_Parent = parent;
......@@ -59,7 +60,7 @@ DIALOG_PCB_TEXT_PROPERTIES::DIALOG_PCB_TEXT_PROPERTIES( WinEDA_PcbFrame* parent,
/**
* Routine for main window class to launch text properties dialog.
*/
void WinEDA_PcbFrame::InstallTextPCBOptionsFrame( TEXTE_PCB* TextPCB, wxDC* DC )
void PCB_EDIT_FRAME::InstallTextPCBOptionsFrame( TEXTE_PCB* TextPCB, wxDC* DC )
{
DrawPanel->m_IgnoreMouseEvents = TRUE;
DIALOG_PCB_TEXT_PROPERTIES dlg( this, TextPCB, DC );
......
......@@ -10,7 +10,7 @@ Subclass of DIALOG_PCB_TEXT_PROPERTIES_BASE, which is generated by wxFormBuilder
//// end generated include
class WinEDA_PcbFrame;
class PCB_EDIT_FRAME;
class wxDC;
class TEXTE_PCB;
......@@ -18,7 +18,7 @@ class TEXTE_PCB;
class DIALOG_PCB_TEXT_PROPERTIES : public DIALOG_PCB_TEXT_PROPERTIES_BASE
{
private:
WinEDA_PcbFrame* m_Parent;
PCB_EDIT_FRAME* m_Parent;
wxDC* m_DC;
TEXTE_PCB* m_SelectedPCBText;
......@@ -30,7 +30,7 @@ protected:
void OnOkClick( wxCommandEvent& event );
public:
DIALOG_PCB_TEXT_PROPERTIES( WinEDA_PcbFrame* parent, TEXTE_PCB* passedTextPCB, wxDC* DC );
DIALOG_PCB_TEXT_PROPERTIES( PCB_EDIT_FRAME* parent, TEXTE_PCB* passedTextPCB, wxDC* DC );
//// end generated class members
};
......
......@@ -21,7 +21,7 @@
/*****************************************************************/
void WinEDA_PcbFrame::InstallConfigFrame( const wxPoint& pos )
void PCB_EDIT_FRAME::InstallConfigFrame( const wxPoint& pos )
/*****************************************************************/
{
DIALOG_PCBNEW_CONFIG_LIBS dialog( this );
......@@ -29,7 +29,7 @@ void WinEDA_PcbFrame::InstallConfigFrame( const wxPoint& pos )
}
DIALOG_PCBNEW_CONFIG_LIBS::DIALOG_PCBNEW_CONFIG_LIBS( WinEDA_PcbFrame* parent ):
DIALOG_PCBNEW_CONFIG_LIBS::DIALOG_PCBNEW_CONFIG_LIBS( PCB_EDIT_FRAME* parent ):
DIALOG_PCBNEW_CONFIG_LIBS_FBP(parent)
{
m_Parent = parent;
......
......@@ -12,7 +12,7 @@
class DIALOG_PCBNEW_CONFIG_LIBS : public DIALOG_PCBNEW_CONFIG_LIBS_FBP
{
private:
WinEDA_PcbFrame* m_Parent;
PCB_EDIT_FRAME* m_Parent;
wxConfig * m_Config;
bool m_LibListChanged;
bool m_LibPathChanged;
......@@ -36,7 +36,7 @@ private:
public:
DIALOG_PCBNEW_CONFIG_LIBS( WinEDA_PcbFrame * parent );
DIALOG_PCBNEW_CONFIG_LIBS( PCB_EDIT_FRAME * parent );
~DIALOG_PCBNEW_CONFIG_LIBS() {};
};
......
......@@ -47,15 +47,15 @@ static PRINT_PARAMETERS s_Parameters;
class DIALOG_PRINT_USING_PRINTER : public DIALOG_PRINT_USING_PRINTER_base
{
private:
WinEDA_PcbFrame* m_Parent;
wxConfig* m_Config;
wxCheckBox* m_BoxSelectLayer[32];
static bool m_ExcludeEdgeLayer;
static wxPoint s_LastPos;
static wxSize s_LastSize;
PCB_EDIT_FRAME* m_Parent;
wxConfig* m_Config;
wxCheckBox* m_BoxSelectLayer[32];
static bool m_ExcludeEdgeLayer;
static wxPoint s_LastPos;
static wxSize s_LastSize;
public:
DIALOG_PRINT_USING_PRINTER( WinEDA_PcbFrame* parent );
DIALOG_PRINT_USING_PRINTER( PCB_EDIT_FRAME* parent );
~DIALOG_PRINT_USING_PRINTER() {};
private:
......@@ -88,7 +88,7 @@ wxSize DIALOG_PRINT_USING_PRINTER::s_LastSize;
/*******************************************************/
void WinEDA_PcbFrame::ToPrinter( wxCommandEvent& event )
void PCB_EDIT_FRAME::ToPrinter( wxCommandEvent& event )
/*******************************************************/
/* Virtual function:
......@@ -114,7 +114,7 @@ void WinEDA_PcbFrame::ToPrinter( wxCommandEvent& event )
/*************************************************************************************/
DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( WinEDA_PcbFrame* parent ) :
DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( PCB_EDIT_FRAME* parent ) :
DIALOG_PRINT_USING_PRINTER_base( parent )
/*************************************************************************************/
{
......
......@@ -42,7 +42,7 @@ class DIMENSION_EDITOR_DIALOG : public wxDialog
{
private:
WinEDA_PcbFrame* m_Parent;
PCB_EDIT_FRAME* m_Parent;
wxDC* m_DC;
DIMENSION* CurrentDimension;
WinEDA_EnterText* m_Name;
......@@ -54,8 +54,7 @@ private:
public:
// Constructor and destructor
DIMENSION_EDITOR_DIALOG( WinEDA_PcbFrame* parent,
DIMENSION* Dimension, wxDC* DC );
DIMENSION_EDITOR_DIALOG( PCB_EDIT_FRAME* parent, DIMENSION* Dimension, wxDC* DC );
~DIMENSION_EDITOR_DIALOG()
{
}
......@@ -74,7 +73,7 @@ BEGIN_EVENT_TABLE( DIMENSION_EDITOR_DIALOG, wxDialog )
END_EVENT_TABLE()
DIMENSION_EDITOR_DIALOG::DIMENSION_EDITOR_DIALOG( WinEDA_PcbFrame* parent,
DIMENSION_EDITOR_DIALOG::DIMENSION_EDITOR_DIALOG( PCB_EDIT_FRAME* parent,
DIMENSION* Dimension, wxDC* DC
) :
wxDialog( parent, -1, wxString( _( "Dimension properties" ) ) )
......@@ -211,12 +210,12 @@ static void Exit_EditDimension( EDA_DRAW_PANEL* Panel, wxDC* DC )
}
status_dimension = 0;
((WinEDA_PcbFrame*)Panel->GetParent())->SetCurItem( NULL );
((PCB_EDIT_FRAME*)Panel->GetParent())->SetCurItem( NULL );
}
/*************************************************************************/
DIMENSION* WinEDA_PcbFrame::Begin_Dimension( DIMENSION* Dimension, wxDC* DC )
DIMENSION* PCB_EDIT_FRAME::Begin_Dimension( DIMENSION* Dimension, wxDC* DC )
/*************************************************************************/
{
wxPoint pos;
......@@ -347,7 +346,7 @@ static void Montre_Position_New_Dimension( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
/***************************************************************/
void WinEDA_PcbFrame::Install_Edit_Dimension( DIMENSION* Dimension, wxDC* DC )
void PCB_EDIT_FRAME::Install_Edit_Dimension( DIMENSION* Dimension, wxDC* DC )
/***************************************************************/
{
if( Dimension == NULL )
......@@ -360,7 +359,7 @@ void WinEDA_PcbFrame::Install_Edit_Dimension( DIMENSION* Dimension, wxDC* DC )
/*******************************************************************/
void WinEDA_PcbFrame::Delete_Dimension( DIMENSION* Dimension, wxDC* DC )
void PCB_EDIT_FRAME::Delete_Dimension( DIMENSION* Dimension, wxDC* DC )
/*******************************************************************/
{
if( Dimension == NULL )
......
......@@ -98,7 +98,7 @@ void Build_1_Pad_SegmentsToDrag( EDA_DRAW_PANEL* panel, wxDC* DC, D_PAD* PtPad )
int net_code = PtPad->GetNet();
int MasqueLayer;
wxPoint pos;
BOARD* pcb = ( (WinEDA_BasePcbFrame*)( panel->GetParent() ) )->GetBoard();
BOARD* pcb = ( (PCB_BASE_FRAME*)( panel->GetParent() ) )->GetBoard();
Track = pcb->m_Track->GetStartNetCode( net_code );
......@@ -166,7 +166,7 @@ void Collect_TrackSegmentsToDrag( EDA_DRAW_PANEL* panel, wxDC* DC,
* @param aRefPos = reference point of connection
*/
{
BOARD* pcb = ( (WinEDA_BasePcbFrame*)( panel->GetParent() ) )->GetBoard();
BOARD* pcb = ( (PCB_BASE_FRAME*)( panel->GetParent() ) )->GetBoard();
TRACK* track = pcb->m_Track->GetStartNetCode( net_code );
......
......@@ -87,7 +87,7 @@ void DRC::DestroyDialog( int aReason )
}
DRC::DRC( WinEDA_PcbFrame* aPcbWindow )
DRC::DRC( PCB_EDIT_FRAME* aPcbWindow )
{
m_mainWindow = aPcbWindow;
m_pcb = aPcbWindow->GetBoard();
......
......@@ -178,7 +178,7 @@ private:
int m_xcliphi;
int m_ycliphi;
WinEDA_PcbFrame* m_mainWindow;
PCB_EDIT_FRAME* m_mainWindow;
BOARD* m_pcb;
DIALOG_DRC_CONTROL* m_ui;
......@@ -354,7 +354,7 @@ private:
//-----</single tests>---------------------------------------------
public:
DRC( WinEDA_PcbFrame* aPcbWindow );
DRC( PCB_EDIT_FRAME* aPcbWindow );
~DRC();
......
......@@ -25,11 +25,11 @@
// Uncomment following line to enable wxBell() command (which beeps speaker)
// #include <wx/utils.h>
static void Process_Move_Item( WinEDA_PcbFrame* frame, EDA_ITEM* DrawStruct, wxDC* DC );
static void Process_Move_Item( PCB_EDIT_FRAME* frame, EDA_ITEM* DrawStruct, wxDC* DC );
/* Handles the selection of command events. */
void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
{
int id = event.GetId();
wxPoint pos;
......@@ -988,7 +988,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
default:
wxString msg;
msg.Printf(
wxT( "WinEDA_PcbFrame::Process_Special_Functions() id %d error" ),
wxT( "PCB_EDIT_FRAME::Process_Special_Functions() id %d error" ),
DrawStruct->Type() );
DisplayError( this, msg );
......@@ -1000,7 +1000,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
}
static void Process_Move_Item( WinEDA_PcbFrame* frame, EDA_ITEM* DrawStruct, wxDC* DC )
static void Process_Move_Item( PCB_EDIT_FRAME* frame, EDA_ITEM* DrawStruct, wxDC* DC )
{
if( DrawStruct == NULL )
return;
......@@ -1016,7 +1016,7 @@ static void Process_Move_Item( WinEDA_PcbFrame* frame, EDA_ITEM* DrawStruct, wxD
default:
wxString msg;
msg.Printf(
wxT( "WinEDA_PcbFrame::Move_Item Error: Bad DrawType %d" ),
wxT( "PCB_EDIT_FRAME::Move_Item Error: Bad DrawType %d" ),
DrawStruct->Type() );
DisplayError( frame, msg );
break;
......@@ -1024,7 +1024,7 @@ static void Process_Move_Item( WinEDA_PcbFrame* frame, EDA_ITEM* DrawStruct, wxD
}
void WinEDA_PcbFrame::RemoveStruct( BOARD_ITEM* Item, wxDC* DC )
void PCB_EDIT_FRAME::RemoveStruct( BOARD_ITEM* Item, wxDC* DC )
{
if( Item == NULL )
return;
......@@ -1106,7 +1106,7 @@ void WinEDA_PcbFrame::RemoveStruct( BOARD_ITEM* Item, wxDC* DC )
}
void WinEDA_PcbFrame::SwitchLayer( wxDC* DC, int layer )
void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, int layer )
{
int curLayer = getActiveLayer();
......@@ -1191,7 +1191,7 @@ void WinEDA_PcbFrame::SwitchLayer( wxDC* DC, int layer )
}
void WinEDA_PcbFrame::OnSelectTool( wxCommandEvent& aEvent )
void PCB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent )
{
int id = aEvent.GetId();
......
......@@ -33,7 +33,7 @@ static TEXTE_PCB s_TextCopy( (BOARD_ITEM*) NULL ); /* copy of the edited text
void Abort_Edit_Pcb_Text( EDA_DRAW_PANEL* Panel, wxDC* DC )
{
TEXTE_PCB* TextePcb = (TEXTE_PCB*) Panel->GetScreen()->GetCurItem();
( (WinEDA_PcbFrame*) Panel->GetParent() )->SetCurItem( NULL );
( (PCB_EDIT_FRAME*) Panel->GetParent() )->SetCurItem( NULL );
Panel->SetMouseCapture( NULL, NULL );
......@@ -58,7 +58,7 @@ void Abort_Edit_Pcb_Text( EDA_DRAW_PANEL* Panel, wxDC* DC )
/*
* Place the current text being moving
*/
void WinEDA_PcbFrame::Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC )
void PCB_EDIT_FRAME::Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC )
{
DrawPanel->SetMouseCapture( NULL, NULL );
SetCurItem( NULL );
......@@ -94,7 +94,7 @@ void WinEDA_PcbFrame::Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC )
/* Initialize parameters to move a pcb text
*/
void WinEDA_PcbFrame::StartMoveTextePcb( TEXTE_PCB* TextePcb, wxDC* DC )
void PCB_EDIT_FRAME::StartMoveTextePcb( TEXTE_PCB* TextePcb, wxDC* DC )
{
if( TextePcb == NULL )
return;
......@@ -130,7 +130,7 @@ static void Move_Texte_Pcb( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aP
}
void WinEDA_PcbFrame::Delete_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC )
void PCB_EDIT_FRAME::Delete_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC )
{
if( TextePcb == NULL )
return;
......@@ -144,7 +144,7 @@ void WinEDA_PcbFrame::Delete_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC )
}
TEXTE_PCB* WinEDA_PcbFrame::Create_Texte_Pcb( wxDC* DC )
TEXTE_PCB* PCB_EDIT_FRAME::Create_Texte_Pcb( wxDC* DC )
{
TEXTE_PCB* TextePcb;
......@@ -177,7 +177,7 @@ TEXTE_PCB* WinEDA_PcbFrame::Create_Texte_Pcb( wxDC* DC )
}
void WinEDA_PcbFrame::Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC )
void PCB_EDIT_FRAME::Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC )
{
int angle = 900;
int drawmode = GR_XOR;
......
......@@ -24,9 +24,9 @@
* @param aUseNetclassValue = true to use NetClass value, false to use g_DesignSettings value
* @return true if done, false if no not change (because DRC error)
*/
bool WinEDA_PcbFrame::SetTrackSegmentWidth( TRACK* aTrackItem,
PICKED_ITEMS_LIST* aItemsListPicker,
bool aUseNetclassValue )
bool PCB_EDIT_FRAME::SetTrackSegmentWidth( TRACK* aTrackItem,
PICKED_ITEMS_LIST* aItemsListPicker,
bool aUseNetclassValue )
{
int initial_width, new_width;
int initial_drill = -1,new_drill = -1;
......@@ -113,7 +113,7 @@ bool WinEDA_PcbFrame::SetTrackSegmentWidth( TRACK* aTrackItem,
* @param aDC = the curred device context (can be NULL)
* @param aTrackItem = the track segment or via to modify
*/
void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* aDC, TRACK* aTrackItem )
void PCB_EDIT_FRAME::Edit_TrackSegm_Width( wxDC* aDC, TRACK* aTrackItem )
{
PICKED_ITEMS_LIST itemsListPicker;
bool change = SetTrackSegmentWidth( aTrackItem, &itemsListPicker, false );
......@@ -142,7 +142,7 @@ void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* aDC, TRACK* aTrackItem )
* @param aDC = the curred device context (can be NULL)
* @param aTrackSegment = a segment or via on the track to change
*/
void WinEDA_PcbFrame::Edit_Track_Width( wxDC* aDC, TRACK* aTrackSegment )
void PCB_EDIT_FRAME::Edit_Track_Width( wxDC* aDC, TRACK* aTrackSegment )
{
TRACK* pt_track;
int nb_segm;
......@@ -192,8 +192,7 @@ void WinEDA_PcbFrame::Edit_Track_Width( wxDC* aDC, TRACK* aTrackSegment )
* @param aUseNetclassValue : bool. True to use netclass values, false to use current values
*/
/***********************************************************/
bool WinEDA_PcbFrame::Change_Net_Tracks_And_Vias_Sizes(
int aNetcode, bool aUseNetclassValue )
bool PCB_EDIT_FRAME::Change_Net_Tracks_And_Vias_Sizes( int aNetcode, bool aUseNetclassValue )
/***********************************************************/
{
TRACK* pt_segm;
......@@ -223,8 +222,7 @@ bool WinEDA_PcbFrame::Change_Net_Tracks_And_Vias_Sizes(
/*************************************************************************/
bool WinEDA_PcbFrame::Reset_All_Tracks_And_Vias_To_Netclass_Values(
bool aTrack, bool aVia )
bool PCB_EDIT_FRAME::Reset_All_Tracks_And_Vias_To_Netclass_Values( bool aTrack, bool aVia )
/*************************************************************************/
{
TRACK* pt_segm;
......
......@@ -26,7 +26,7 @@ static wxPoint s_LastPosition; // Current cursor position.
/* Start move of a graphic element type DRAWSEGMENT */
void WinEDA_PcbFrame::Start_Move_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC )
void PCB_EDIT_FRAME::Start_Move_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC )
{
if( drawitem == NULL )
return;
......@@ -43,7 +43,7 @@ void WinEDA_PcbFrame::Start_Move_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC )
/*
* Place graphic element of type DRAWSEGMENT.
*/
void WinEDA_PcbFrame::Place_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC )
void PCB_EDIT_FRAME::Place_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC )
{
if( drawitem == NULL )
return;
......@@ -80,7 +80,7 @@ static void Move_Segment( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPos
}
void WinEDA_PcbFrame::Delete_Segment_Edge( DRAWSEGMENT* Segment, wxDC* DC )
void PCB_EDIT_FRAME::Delete_Segment_Edge( DRAWSEGMENT* Segment, wxDC* DC )
{
EDA_ITEM* PtStruct;
int track_fill_copy = DisplayOpt.DisplayDrawItems;
......@@ -112,7 +112,7 @@ void WinEDA_PcbFrame::Delete_Segment_Edge( DRAWSEGMENT* Segment, wxDC* DC )
}
void WinEDA_PcbFrame::Delete_Drawings_All_Layer( int aLayer )
void PCB_EDIT_FRAME::Delete_Drawings_All_Layer( int aLayer )
{
if( aLayer <= LAST_COPPER_LAYER )
{
......@@ -192,13 +192,13 @@ static void Abort_EditEdge( EDA_DRAW_PANEL* Panel, wxDC* DC )
}
Panel->SetMouseCapture( NULL, NULL );
( (WinEDA_PcbFrame*) Panel->GetParent() )->SetCurItem( NULL );
( (PCB_EDIT_FRAME*) Panel->GetParent() )->SetCurItem( NULL );
}
/* Initialize the drawing of a segment of type other than trace.
*/
DRAWSEGMENT* WinEDA_PcbFrame::Begin_DrawSegment( DRAWSEGMENT* Segment,
DRAWSEGMENT* PCB_EDIT_FRAME::Begin_DrawSegment( DRAWSEGMENT* Segment,
int shape, wxDC* DC )
{
int s_large;
......@@ -266,7 +266,7 @@ DRAWSEGMENT* WinEDA_PcbFrame::Begin_DrawSegment( DRAWSEGMENT* Segment,
}
void WinEDA_PcbFrame::End_Edge( DRAWSEGMENT* Segment, wxDC* DC )
void PCB_EDIT_FRAME::End_Edge( DRAWSEGMENT* Segment, wxDC* DC )
{
if( Segment == NULL )
return;
......
......@@ -19,7 +19,7 @@
/*
* Show module property dialog.
*/
void WinEDA_PcbFrame::InstallModuleOptionsFrame( MODULE* Module, wxDC* DC )
void PCB_EDIT_FRAME::InstallModuleOptionsFrame( MODULE* Module, wxDC* DC )
{
if( Module == NULL )
return;
......
......@@ -21,7 +21,7 @@
* It is put on another layer of work, if possible
* (Or DRC = Off).
*/
void WinEDA_PcbFrame::ExChange_Track_Layer( TRACK* pt_segm, wxDC* DC )
void PCB_EDIT_FRAME::ExChange_Track_Layer( TRACK* pt_segm, wxDC* DC )
{
int ii;
TRACK* pt_track;
......@@ -91,7 +91,7 @@ void WinEDA_PcbFrame::ExChange_Track_Layer( TRACK* pt_segm, wxDC* DC )
}
bool WinEDA_PcbFrame::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
{
unsigned itmp;
......@@ -209,7 +209,7 @@ bool WinEDA_PcbFrame::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
// use the form of SetCurItem() which does not write to the msg panel,
// SCREEN::SetCurItem(), so the DRC error remains on screen.
// WinEDA_PcbFrame::SetCurItem() calls DisplayInfo().
// PCB_EDIT_FRAME::SetCurItem() calls DisplayInfo().
GetScreen()->SetCurItem( g_CurrentTrackSegment );
return false;
......@@ -265,7 +265,7 @@ bool WinEDA_PcbFrame::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
* The status of the net on top of the screen segment advanced by mouse.
* PCB status or bottom of screen if no segment peak.
*/
void WinEDA_PcbFrame::Affiche_Status_Net( wxDC* DC )
void PCB_EDIT_FRAME::Affiche_Status_Net( wxDC* DC )
{
TRACK* pt_segm;
int masquelayer = (1 << getActiveLayer());
......@@ -285,7 +285,7 @@ void WinEDA_PcbFrame::Affiche_Status_Net( wxDC* DC )
* The net edge pad with mouse or module locates the mouse.
* Delete if the ratsnest if no module or pad is selected.
*/
void WinEDA_PcbFrame::Show_1_Ratsnest( EDA_ITEM* item, wxDC* DC )
void PCB_EDIT_FRAME::Show_1_Ratsnest( EDA_ITEM* item, wxDC* DC )
{
D_PAD* pt_pad = NULL;
MODULE* Module = NULL;
......@@ -378,7 +378,7 @@ void WinEDA_PcbFrame::Show_1_Ratsnest( EDA_ITEM* item, wxDC* DC )
/* High light the unconnected pads
*/
void WinEDA_PcbFrame::Affiche_PadsNoConnect( wxDC* DC )
void PCB_EDIT_FRAME::Affiche_PadsNoConnect( wxDC* DC )
{
for( unsigned ii = 0; ii < GetBoard()->GetRatsnestsCount(); ii++ )
{
......
......@@ -36,8 +36,8 @@ static PICKED_ITEMS_LIST s_ItemsListPicker;
*/
static void Exit_Editrack( EDA_DRAW_PANEL* Panel, wxDC* DC )
{
WinEDA_PcbFrame* frame = (WinEDA_PcbFrame*) Panel->GetParent();
TRACK* track = (TRACK*) frame->GetCurItem();
PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) Panel->GetParent();
TRACK* track = (TRACK*) frame->GetCurItem();
if( track && ( track->Type()==TYPE_VIA || track->Type()==TYPE_TRACK ) )
{
......@@ -77,7 +77,7 @@ static void Exit_Editrack( EDA_DRAW_PANEL* Panel, wxDC* DC )
* - Control DRC
* - OK if DRC: adding a new track.
*/
TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* aTrack, wxDC* DC )
TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* DC )
{
D_PAD* pt_pad = NULL;
TRACK* TrackOnStartPoint = NULL;
......@@ -132,10 +132,9 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* aTrack, wxDC* DC )
else // no starting point, but a filled zone area can exist. This is
// also a good starting point.
{
ZONE_CONTAINER* zone =
GetBoard()->HitTestForAnyFilledArea( pos,
GetScreen()->
m_Active_Layer );
ZONE_CONTAINER* zone;
zone = GetBoard()->HitTestForAnyFilledArea( pos, GetScreen()-> m_Active_Layer );
if( zone )
g_HighLight_NetCode = zone->GetNet();
}
......@@ -152,6 +151,7 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* aTrack, wxDC* DC )
g_CurrentTrackSegment->SetNet( g_HighLight_NetCode );
GetBoard()->SetCurrentNetClass( g_CurrentTrackSegment->GetNetClassName() );
m_TrackAndViasSizesList_Changed = true;
updateDesignRulesSelectBoxes();
g_CurrentTrackSegment->SetLayer( GetScreen()->m_Active_Layer );
g_CurrentTrackSegment->m_Width = GetBoard()->GetCurrentTrackWidth();
......@@ -295,7 +295,7 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* aTrack, wxDC* DC )
* 1 if ok
* 0 if not
*/
bool WinEDA_PcbFrame::Add_45_degrees_Segment( wxDC* DC )
bool PCB_EDIT_FRAME::Add_45_degrees_Segment( wxDC* DC )
{
int pas_45;
int dx0, dy0, dx1, dy1;
......@@ -416,7 +416,7 @@ bool WinEDA_PcbFrame::Add_45_degrees_Segment( wxDC* DC )
/*
* End trace route in progress.
*/
void WinEDA_PcbFrame::End_Route( TRACK* aTrack, wxDC* DC )
void PCB_EDIT_FRAME::End_Route( TRACK* aTrack, wxDC* DC )
{
int masquelayer =
g_TabOneLayerMask[( (PCB_SCREEN*) GetScreen() )->m_Active_Layer];
......@@ -605,8 +605,8 @@ TRACK* LocateIntrusion( TRACK* listStart, TRACK* aTrack, int aLayer, const wxPoi
*/
static void PushTrack( EDA_DRAW_PANEL* panel )
{
PCB_SCREEN* screen = ( (WinEDA_BasePcbFrame*) (panel->GetParent()) )->GetScreen();
BOARD* pcb = ( (WinEDA_BasePcbFrame*) (panel->GetParent()) )->GetBoard();
PCB_SCREEN* screen = ( (PCB_BASE_FRAME*) (panel->GetParent()) )->GetScreen();
BOARD* pcb = ( (PCB_BASE_FRAME*) (panel->GetParent()) )->GetBoard();
wxPoint cursor = screen->GetCrossHairPosition();
wxPoint cv, vec, n;
TRACK* track = g_CurrentTrackSegment;
......@@ -670,8 +670,8 @@ void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPo
{
D( g_CurrentTrackList.VerifyListIntegrity(); );
PCB_SCREEN* screen = (PCB_SCREEN*) aPanel->GetScreen();
WinEDA_BasePcbFrame* frame = (WinEDA_BasePcbFrame*) aPanel->GetParent();
PCB_SCREEN* screen = (PCB_SCREEN*) aPanel->GetScreen();
PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) aPanel->GetParent();
bool Track_fill_copy = DisplayOpt.DisplayPcbTrackFill;
DisplayOpt.DisplayPcbTrackFill = true;
......
......@@ -30,7 +30,7 @@ static int TextInitialOrientation; // module text initial orientation for
* Note there always are 2 texts: reference and value.
* New texts have the member TEXTE_MODULE.m_Type set to TEXT_is_DIVERS
*/
TEXTE_MODULE* WinEDA_BasePcbFrame::CreateTextModule( MODULE* Module, wxDC* DC )
TEXTE_MODULE* PCB_BASE_FRAME::CreateTextModule( MODULE* Module, wxDC* DC )
{
TEXTE_MODULE* Text;
......@@ -67,7 +67,7 @@ TEXTE_MODULE* WinEDA_BasePcbFrame::CreateTextModule( MODULE* Module, wxDC* DC )
/* Rotate text 90 degrees.
*/
void WinEDA_BasePcbFrame::RotateTextModule( TEXTE_MODULE* Text, wxDC* DC )
void PCB_BASE_FRAME::RotateTextModule( TEXTE_MODULE* Text, wxDC* DC )
{
if( Text == NULL )
return;
......@@ -100,7 +100,7 @@ void WinEDA_BasePcbFrame::RotateTextModule( TEXTE_MODULE* Text, wxDC* DC )
/*
* Deletes text in module (if not the reference or value)
*/
void WinEDA_BasePcbFrame::DeleteTextModule( TEXTE_MODULE* Text )
void PCB_BASE_FRAME::DeleteTextModule( TEXTE_MODULE* Text )
{
MODULE* Module;
......@@ -160,7 +160,7 @@ static void AbortMoveTextModule( EDA_DRAW_PANEL* Panel, wxDC* DC )
/* Start a text move.
*/
void WinEDA_BasePcbFrame::StartMoveTexteModule( TEXTE_MODULE* Text, wxDC* DC )
void PCB_BASE_FRAME::StartMoveTexteModule( TEXTE_MODULE* Text, wxDC* DC )
{
MODULE* Module;
......@@ -194,7 +194,7 @@ void WinEDA_BasePcbFrame::StartMoveTexteModule( TEXTE_MODULE* Text, wxDC* DC )
/* Place the text a the cursor position when the left mouse button is clicked.
*/
void WinEDA_BasePcbFrame::PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC )
void PCB_BASE_FRAME::PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC )
{
if( Text != NULL )
{
......@@ -263,7 +263,7 @@ static void Show_MoveTexte_Module( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPo
Text->Draw( aPanel, aDC, GR_XOR, MoveVector );
}
void WinEDA_BasePcbFrame::ResetTextSize( BOARD_ITEM* aItem, wxDC* aDC )
void PCB_BASE_FRAME::ResetTextSize( BOARD_ITEM* aItem, wxDC* aDC )
{
wxSize newSize;
int newThickness;
......@@ -319,7 +319,7 @@ void WinEDA_BasePcbFrame::ResetTextSize( BOARD_ITEM* aItem, wxDC* aDC )
OnModify();
}
void WinEDA_BasePcbFrame::ResetModuleTextSizes( int aType, wxDC* aDC )
void PCB_BASE_FRAME::ResetModuleTextSizes( int aType, wxDC* aDC )
{
MODULE* module;
BOARD_ITEM* boardItem;
......
......@@ -22,7 +22,7 @@
* Event handler for tracks and vias size selection (and some options)
* relative to toolbars and popup events
*/
void WinEDA_PcbFrame::Tracks_and_Vias_Size_Event( wxCommandEvent& event )
void PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event( wxCommandEvent& event )
{
int ii;
int id = event.GetId();
......@@ -64,20 +64,19 @@ void WinEDA_PcbFrame::Tracks_and_Vias_Size_Event( wxCommandEvent& event )
GetBoard()->m_TrackWidthSelector = ii;
break;
case ID_POPUP_PCB_SELECT_VIASIZE1: // this is the default Netclass selection
case ID_POPUP_PCB_SELECT_VIASIZE2: // this is a custom value selection
case ID_POPUP_PCB_SELECT_VIASIZE1: // this is the default Netclass selection
case ID_POPUP_PCB_SELECT_VIASIZE2: // this is a custom value selection
case ID_POPUP_PCB_SELECT_VIASIZE3:
case ID_POPUP_PCB_SELECT_VIASIZE4:
case ID_POPUP_PCB_SELECT_VIASIZE5:
case ID_POPUP_PCB_SELECT_VIASIZE6:
case ID_POPUP_PCB_SELECT_VIASIZE7:
case ID_POPUP_PCB_SELECT_VIASIZE8: // select the new current value for via size (via diameter)
case ID_POPUP_PCB_SELECT_VIASIZE8: // select the new current value for via size (via diameter)
DrawPanel->MoveCursorToCrossHair();
ii = id - ID_POPUP_PCB_SELECT_VIASIZE1;
GetBoard()->m_ViaSizeSelector = ii;
break;
case ID_AUX_TOOLBAR_PCB_TRACK_WIDTH:
ii = m_SelTrackWidthBox->GetChoice();
GetBoard()->m_TrackWidthSelector = ii;
......@@ -85,11 +84,11 @@ void WinEDA_PcbFrame::Tracks_and_Vias_Size_Event( wxCommandEvent& event )
case ID_AUX_TOOLBAR_PCB_VIA_SIZE:
ii = m_SelViaSizeBox->GetChoice();
GetBoard()->m_ViaSizeSelector = ii;
GetBoard()->m_ViaSizeSelector = ii;
break;
default:
wxMessageBox( wxT( "WinEDA_PcbFrame::Tracks_and_Vias_Size_Event() error") );
wxMessageBox( wxT( "PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event() error") );
break;
}
}
......@@ -15,7 +15,7 @@
#include "build_version.h"
bool CreateHeaderInfoData( FILE* file, WinEDA_PcbFrame* frame );
bool CreateHeaderInfoData( FILE* file, PCB_EDIT_FRAME* frame );
static void CreateTracksInfoData( FILE* file, BOARD* pcb );
static void CreateBoardSection( FILE* file, BOARD* pcb );
static void CreateComponentsSection( FILE* file, BOARD* pcb );
......@@ -65,7 +65,7 @@ static int mapYto( int y )
/*
* Creates an Export file (format GenCAD 1.4) from the current board.
*/
void WinEDA_PcbFrame::ExportToGenCAD( wxCommandEvent& event )
void PCB_EDIT_FRAME::ExportToGenCAD( wxCommandEvent& event )
{
wxFileName fn = GetScreen()->GetFileName();
wxString msg, ext, wildcard;
......@@ -530,7 +530,7 @@ void CreateSignalsSection( FILE* file, BOARD* pcb )
/* Creates the section $HEADER ... $ENDHEADER
*/
bool CreateHeaderInfoData( FILE* file, WinEDA_PcbFrame* frame )
bool CreateHeaderInfoData( FILE* file, PCB_EDIT_FRAME* frame )
{
wxString msg;
PCB_SCREEN* screen = (PCB_SCREEN*) ( frame->GetScreen() );
......
......@@ -26,7 +26,7 @@
class DIALOG_EXPORT_3DFILE : public DIALOG_EXPORT_3DFILE_BASE
{
private:
WinEDA_PcbFrame* m_parent;
PCB_EDIT_FRAME* m_parent;
wxConfig* m_config;
int m_unitsOpt; // to remember last option
int m_3DFilesOpt; // to remember last option
......@@ -34,7 +34,7 @@ private:
virtual void OnOkClick( wxCommandEvent& event ){ EndModal( wxID_OK ); }
public:
DIALOG_EXPORT_3DFILE( WinEDA_PcbFrame* parent ) :
DIALOG_EXPORT_3DFILE( PCB_EDIT_FRAME* parent ) :
DIALOG_EXPORT_3DFILE_BASE( parent )
{
m_parent = parent;
......@@ -1126,7 +1126,7 @@ static void write_and_empty_triangle_bag( FILE* output_file,
* Function OnExportVRML
* will export the current BOARD to a VRML file.
*/
void WinEDA_PcbFrame::OnExportVRML( wxCommandEvent& event )
void PCB_EDIT_FRAME::OnExportVRML( wxCommandEvent& event )
{
wxFileName fn;
static wxString subDirFor3Dshapes = wxT("shapes3D");
......@@ -1175,9 +1175,9 @@ wxBusyCursor dummy;
* the full path name, changing the separators by underscore.
* this is needed because files with the same shortname can exist in different directories
*/
bool WinEDA_PcbFrame::ExportVRML_File( const wxString & aFullFileName,
double aScale, bool aExport3DFiles,
const wxString & a3D_Subdir )
bool PCB_EDIT_FRAME::ExportVRML_File( const wxString & aFullFileName,
double aScale, bool aExport3DFiles,
const wxString & a3D_Subdir )
{
wxString msg;
FILE* output_file;
......
......@@ -19,7 +19,7 @@
#define BACKUP_FILE_EXT wxT( "000" )
void WinEDA_PcbFrame::OnFileHistory( wxCommandEvent& event )
void PCB_EDIT_FRAME::OnFileHistory( wxCommandEvent& event )
{
wxString fn;
......@@ -36,7 +36,7 @@ void WinEDA_PcbFrame::OnFileHistory( wxCommandEvent& event )
/* Handle the read/write file commands
*/
void WinEDA_PcbFrame::Files_io( wxCommandEvent& event )
void PCB_EDIT_FRAME::Files_io( wxCommandEvent& event )
{
int id = event.GetId();
wxString msg;
......@@ -129,8 +129,8 @@ void WinEDA_PcbFrame::Files_io( wxCommandEvent& event )
*
* @return False if file load fails or is cancelled by the user, otherwise true.
*/
bool WinEDA_PcbFrame::LoadOnePcbFile( const wxString& aFileName, bool aAppend,
bool aForceFileDialog )
bool PCB_EDIT_FRAME::LoadOnePcbFile( const wxString& aFileName, bool aAppend,
bool aForceFileDialog )
{
FILE* source;
wxString msg;
......@@ -280,6 +280,10 @@ this file again." ) );
ReCreateLayerBox( NULL );
syncLayerWidget();
updateDesignRulesSelectBoxes();
updateTraceWidthSelectBox();
updateViaSizeSelectBox();
// Display the loaded board:
Zoom_Automatique( false );
wxSafeYield(); // Needed if we want to see the board now.
......@@ -312,7 +316,7 @@ this file again." ) );
/* Write the board file
*/
bool WinEDA_PcbFrame::SavePcbFile( const wxString& FileName )
bool PCB_EDIT_FRAME::SavePcbFile( const wxString& FileName )
{
wxFileName backupFileName;
wxFileName pcbFileName;
......
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