mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-14 16:19:36 +00:00
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.
This commit is contained in:
parent
ec400bf7c7
commit
1010601a78
3d-viewer
common
cvpcb
gerbview
include
pcbnew
ar_protos.hattribut.cppautomove.cppautoplac.cppautorout.cppbasepcbframe.cppblock.cppblock_module_editor.cppboard.cppboard_undo_redo.cppbuild_BOM_from_board.cppclass_board.cppclass_board.hclass_drawsegment.hclass_edge_mod.cppclass_netinfo_item.cppclass_pad_draw_functions.cppclass_pcb_layer_widget.cppclass_pcb_layer_widget.hclass_text_mod.cppclass_track.cppclass_zone.cppclass_zone.hclean.cppcollectors.cppcollectors.hconnect.cppcontrole.cppcross-probing.cppdeltrack.cpp
dialogs
dialog_SVG_print.cppdialog_SVG_print.hdialog_copper_zones.cppdialog_copper_zones.hdialog_design_rules.cppdialog_design_rules.hdialog_display_options.cppdialog_display_options.hdialog_drc.cppdialog_drc.hdialog_edit_module_for_BoardEditor.cppdialog_edit_module_for_BoardEditor.hdialog_edit_module_text.cppdialog_freeroute_exchange.cppdialog_freeroute_exchange.hdialog_gendrill.cppdialog_gendrill.hdialog_general_options.cppdialog_general_options.hdialog_global_deletion.cppdialog_global_deletion.hdialog_global_edit_tracks_and_vias.cppdialog_global_edit_tracks_and_vias.hdialog_graphic_item_properties.cppdialog_graphic_items_options.cppdialog_graphic_items_options.hdialog_layers_setup.cppdialog_mask_clearance.cppdialog_mask_clearance.hdialog_netlist.cppdialog_netlist.hdialog_orient_footprints.cppdialog_pad_properties.cppdialog_pcb_text_properties.cppdialog_pcb_text_properties.hdialog_pcbnew_config_libs_and_paths.cppdialog_pcbnew_config_libs_and_paths.hdialog_print_using_printer.cpp
dimension.cppdragsegm.cppdrc.cppdrc_stuff.hedit.cppedit_pcb_text.cppedit_track_width.cppeditedge.cppeditmod.cppeditrack-part2.cppeditrack.cppedtxtmod.cppevent_handlers_tracks_vias_sizes.cppexport_gencad.cppexport_vrml.cppfiles.cppfind.cppfind.hgen_modules_placefile.cppgendrill.cppglobaleditpad.cpphotkeys_board_editor.cppinitpcb.cppioascii.cpplibrairi.cpploadcmp.cppmagnetic_tracks_functions.cppmenubar_pcbframe.cppmirepcb.cppmodedit.cppmodule_editor_frame.hmoduleframe.cppmodules.cppmove-drag_pads.cppmove_or_drag_track.cppmuonde.cppmuwave_command.cppnetlist.cpponleftclick.cpponrightclick.cpppcbframe.cpppcbnew.cpppcbnew_config.cpppcbplot.cppplot_rtn.cppplotdxf.cppplotgerb.cppplothpgl.cppplotps.cppprint_board_functions.cppprintout_controler.cppprotos.hratsnest.cppsel_layer.cppset_grid.cppsolve.cppspecctra.hspecctra_export.cppspecctra_import.cppsurbrill.cppswap_layers.cpptool_onrightclick.cpptool_pcb.cpptoolbars_update_user_interface.cpptr_modif.cpptracepcb.cppxchgmod.cppzones_by_polygon.cppzones_by_polygon_fill_functions.cppzones_non_copper_type_functions.cpp@ -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 );
|
||||
|
@ -34,34 +34,32 @@ static const wxString DisplayModuleEdgeEntry( wxT( "DiModEd" ) );
|
||||
static const wxString DisplayModuleTextEntry( wxT( "DiModTx" ) );
|
||||
|
||||
|
||||
/*****************************/
|
||||
/* class WinEDA_BasePcbFrame */
|
||||
/*****************************/
|
||||
/****************************/
|
||||
/* class PCB_BASE_FRAME */
|
||||
/****************************/
|
||||
|
||||
BEGIN_EVENT_TABLE( WinEDA_BasePcbFrame, EDA_DRAW_FRAME )
|
||||
BEGIN_EVENT_TABLE( PCB_BASE_FRAME, EDA_DRAW_FRAME )
|
||||
EVT_MENU_RANGE( ID_POPUP_PCB_ITEM_SELECTION_START, ID_POPUP_PCB_ITEM_SELECTION_END,
|
||||
WinEDA_BasePcbFrame::ProcessItemSelection )
|
||||
PCB_BASE_FRAME::ProcessItemSelection )
|
||||
|
||||
EVT_TOOL( ID_TB_OPTIONS_SHOW_POLAR_COORD, WinEDA_BasePcbFrame::OnTogglePolarCoords )
|
||||
EVT_TOOL( ID_TB_OPTIONS_SHOW_PADS_SKETCH, WinEDA_BasePcbFrame::OnTogglePadDrawMode )
|
||||
EVT_TOOL( ID_TB_OPTIONS_SHOW_POLAR_COORD, PCB_BASE_FRAME::OnTogglePolarCoords )
|
||||
EVT_TOOL( ID_TB_OPTIONS_SHOW_PADS_SKETCH, PCB_BASE_FRAME::OnTogglePadDrawMode )
|
||||
|
||||
EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_POLAR_COORD, WinEDA_BasePcbFrame::OnUpdateCoordType )
|
||||
EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_PADS_SKETCH, WinEDA_BasePcbFrame::OnUpdatePadDrawMode )
|
||||
EVT_UPDATE_UI_RANGE( ID_POPUP_GRID_LEVEL_1000, ID_POPUP_GRID_USER,
|
||||
WinEDA_BasePcbFrame::OnUpdateSelectGrid )
|
||||
EVT_UPDATE_UI_RANGE( ID_POPUP_ZOOM_START_RANGE, ID_POPUP_ZOOM_END_RANGE,
|
||||
WinEDA_BasePcbFrame::OnUpdateSelectZoom )
|
||||
EVT_UPDATE_UI_RANGE( ID_ZOOM_IN, ID_ZOOM_PAGE,
|
||||
WinEDA_BasePcbFrame::OnUpdateSelectZoom )
|
||||
EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_POLAR_COORD, PCB_BASE_FRAME::OnUpdateCoordType )
|
||||
EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_PADS_SKETCH, PCB_BASE_FRAME::OnUpdatePadDrawMode )
|
||||
EVT_UPDATE_UI( ID_ON_GRID_SELECT, PCB_BASE_FRAME::OnUpdateSelectGrid )
|
||||
EVT_UPDATE_UI( ID_ON_ZOOM_SELECT, PCB_BASE_FRAME::OnUpdateSelectZoom )
|
||||
|
||||
EVT_UPDATE_UI_RANGE( ID_ZOOM_IN, ID_ZOOM_PAGE, PCB_BASE_FRAME::OnUpdateSelectZoom )
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
WinEDA_BasePcbFrame::WinEDA_BasePcbFrame( wxWindow* father,
|
||||
int idtype,
|
||||
const wxString& title,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style) :
|
||||
PCB_BASE_FRAME::PCB_BASE_FRAME( wxWindow* father,
|
||||
int idtype,
|
||||
const wxString& title,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style) :
|
||||
EDA_DRAW_FRAME( father, idtype, title, pos, size, style )
|
||||
{
|
||||
m_InternalUnits = PCB_INTERNAL_UNIT; // Internal unit = 1/10000 inch
|
||||
@ -83,13 +81,13 @@ WinEDA_BasePcbFrame::WinEDA_BasePcbFrame( wxWindow* father,
|
||||
}
|
||||
|
||||
|
||||
WinEDA_BasePcbFrame::~WinEDA_BasePcbFrame()
|
||||
PCB_BASE_FRAME::~PCB_BASE_FRAME()
|
||||
{
|
||||
delete m_Collector;
|
||||
}
|
||||
|
||||
|
||||
void WinEDA_BasePcbFrame::SetBoard( BOARD* aBoard )
|
||||
void PCB_BASE_FRAME::SetBoard( BOARD* aBoard )
|
||||
{
|
||||
if( m_Pcb != g_ModuleEditor_Pcb )
|
||||
delete m_Pcb;
|
||||
@ -101,7 +99,7 @@ void WinEDA_BasePcbFrame::SetBoard( BOARD* aBoard )
|
||||
/**
|
||||
* Return the "best" zoom, i.e. the zoom which shows the entire board on screen
|
||||
*/
|
||||
int WinEDA_BasePcbFrame::BestZoom( void )
|
||||
int PCB_BASE_FRAME::BestZoom( void )
|
||||
{
|
||||
int dx, dy, ii, jj;
|
||||
int bestzoom;
|
||||
@ -117,12 +115,12 @@ int WinEDA_BasePcbFrame::BestZoom( void )
|
||||
size = DrawPanel->GetClientSize();
|
||||
|
||||
if( size.x )
|
||||
ii = ( dx + (size.x / 2) ) / size.x;
|
||||
ii = wxRound( ( (double) dx + ((double) size.x / 2.0) ) / (double) size.x );
|
||||
else
|
||||
ii = 31;
|
||||
|
||||
if ( size.y )
|
||||
jj = ( dy + (size.y / 2) ) / size.y;
|
||||
jj = wxRound( ( (double) dy + ((double) size.y / 2.0) ) / (double) size.y );
|
||||
else
|
||||
jj = 31;
|
||||
|
||||
@ -133,7 +131,7 @@ int WinEDA_BasePcbFrame::BestZoom( void )
|
||||
}
|
||||
|
||||
|
||||
void WinEDA_BasePcbFrame::CursorGoto( const wxPoint& aPos )
|
||||
void PCB_BASE_FRAME::CursorGoto( const wxPoint& aPos )
|
||||
{
|
||||
// factored out of pcbnew/find.cpp
|
||||
|
||||
@ -159,19 +157,19 @@ void WinEDA_BasePcbFrame::CursorGoto( const wxPoint& aPos )
|
||||
|
||||
|
||||
// Virtual function
|
||||
void WinEDA_BasePcbFrame::ReCreateMenuBar( void )
|
||||
void PCB_BASE_FRAME::ReCreateMenuBar( void )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/* Virtual functions: Do nothing for WinEDA_BasePcbFrame window */
|
||||
void WinEDA_BasePcbFrame::Show3D_Frame( wxCommandEvent& event )
|
||||
/* Virtual functions: Do nothing for PCB_BASE_FRAME window */
|
||||
void PCB_BASE_FRAME::Show3D_Frame( wxCommandEvent& event )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// Note: virtual, overridden in WinEDA_PcbFrame;
|
||||
void WinEDA_BasePcbFrame::SwitchLayer( wxDC* DC, int layer )
|
||||
// Note: virtual, overridden in PCB_EDIT_FRAME;
|
||||
void PCB_BASE_FRAME::SwitchLayer( wxDC* DC, int layer )
|
||||
{
|
||||
int preslayer = ((PCB_SCREEN*)GetScreen())->m_Active_Layer;
|
||||
|
||||
@ -220,7 +218,7 @@ void WinEDA_BasePcbFrame::SwitchLayer( wxDC* DC, int layer )
|
||||
}
|
||||
|
||||
|
||||
void WinEDA_BasePcbFrame::OnTogglePolarCoords( wxCommandEvent& aEvent )
|
||||
void PCB_BASE_FRAME::OnTogglePolarCoords( wxCommandEvent& aEvent )
|
||||
{
|
||||
SetStatusText( wxEmptyString );
|
||||
DisplayOpt.DisplayPolarCood = !DisplayOpt.DisplayPolarCood;
|
||||
@ -228,14 +226,14 @@ void WinEDA_BasePcbFrame::OnTogglePolarCoords( wxCommandEvent& aEvent )
|
||||
}
|
||||
|
||||
|
||||
void WinEDA_BasePcbFrame::OnTogglePadDrawMode( wxCommandEvent& aEvent )
|
||||
void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent )
|
||||
{
|
||||
m_DisplayPadFill = DisplayOpt.DisplayPadFill = !m_DisplayPadFill;
|
||||
DrawPanel->Refresh();
|
||||
}
|
||||
|
||||
|
||||
void WinEDA_BasePcbFrame::OnUpdateCoordType( wxUpdateUIEvent& aEvent )
|
||||
void PCB_BASE_FRAME::OnUpdateCoordType( wxUpdateUIEvent& aEvent )
|
||||
{
|
||||
aEvent.Check( DisplayOpt.DisplayPolarCood );
|
||||
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_POLAR_COORD,
|
||||
@ -245,7 +243,7 @@ void WinEDA_BasePcbFrame::OnUpdateCoordType( wxUpdateUIEvent& aEvent )
|
||||
}
|
||||
|
||||
|
||||
void WinEDA_BasePcbFrame::OnUpdatePadDrawMode( wxUpdateUIEvent& aEvent )
|
||||
void PCB_BASE_FRAME::OnUpdatePadDrawMode( wxUpdateUIEvent& aEvent )
|
||||
{
|
||||
aEvent.Check( !m_DisplayPadFill );
|
||||
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_PADS_SKETCH,
|
||||
@ -255,7 +253,7 @@ void WinEDA_BasePcbFrame::OnUpdatePadDrawMode( wxUpdateUIEvent& aEvent )
|
||||
}
|
||||
|
||||
|
||||
void WinEDA_BasePcbFrame::OnUpdateSelectGrid( wxUpdateUIEvent& aEvent )
|
||||
void PCB_BASE_FRAME::OnUpdateSelectGrid( wxUpdateUIEvent& aEvent )
|
||||
{
|
||||
// No need to update the grid select box if it doesn't exist or the grid setting change
|
||||
// was made using the select box.
|
||||
@ -264,27 +262,21 @@ void WinEDA_BasePcbFrame::OnUpdateSelectGrid( wxUpdateUIEvent& aEvent )
|
||||
|
||||
int select = wxNOT_FOUND;
|
||||
|
||||
if( aEvent.GetId() == ID_POPUP_GRID_USER )
|
||||
for( size_t i = 0; i < GetScreen()->GetGridCount(); i++ )
|
||||
{
|
||||
select = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
for( size_t i = 0; i < GetScreen()->GetGridCount(); i++ )
|
||||
if( GetScreen()->GetGridId() == GetScreen()->GetGrid( i ).m_Id )
|
||||
{
|
||||
if( aEvent.GetId() == GetScreen()->GetGrid( i ).m_Id )
|
||||
{
|
||||
select = (int) i;
|
||||
break;
|
||||
}
|
||||
select = (int) i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
m_SelGridBox->SetSelection( select );
|
||||
if( select != m_SelGridBox->GetSelection() )
|
||||
m_SelGridBox->SetSelection( select );
|
||||
}
|
||||
|
||||
|
||||
void WinEDA_BasePcbFrame::OnUpdateSelectZoom( wxUpdateUIEvent& aEvent )
|
||||
void PCB_BASE_FRAME::OnUpdateSelectZoom( wxUpdateUIEvent& aEvent )
|
||||
{
|
||||
if( m_SelZoomBox == NULL || m_AuxiliaryToolBar == NULL )
|
||||
return;
|
||||
@ -305,7 +297,7 @@ void WinEDA_BasePcbFrame::OnUpdateSelectZoom( wxUpdateUIEvent& aEvent )
|
||||
}
|
||||
|
||||
|
||||
void WinEDA_BasePcbFrame::ProcessItemSelection( wxCommandEvent& aEvent )
|
||||
void PCB_BASE_FRAME::ProcessItemSelection( wxCommandEvent& aEvent )
|
||||
{
|
||||
int id = aEvent.GetId();
|
||||
|
||||
@ -326,7 +318,7 @@ void WinEDA_BasePcbFrame::ProcessItemSelection( wxCommandEvent& aEvent )
|
||||
}
|
||||
|
||||
|
||||
void WinEDA_BasePcbFrame::SetCurItem( BOARD_ITEM* aItem, bool aDisplayInfo )
|
||||
void PCB_BASE_FRAME::SetCurItem( BOARD_ITEM* aItem, bool aDisplayInfo )
|
||||
{
|
||||
GetScreen()->SetCurItem( aItem );
|
||||
|
||||
@ -355,13 +347,13 @@ void WinEDA_BasePcbFrame::SetCurItem( BOARD_ITEM* aItem, bool aDisplayInfo )
|
||||
}
|
||||
|
||||
|
||||
BOARD_ITEM* WinEDA_BasePcbFrame::GetCurItem()
|
||||
BOARD_ITEM* PCB_BASE_FRAME::GetCurItem()
|
||||
{
|
||||
return GetScreen()->GetCurItem();
|
||||
}
|
||||
|
||||
|
||||
GENERAL_COLLECTORS_GUIDE WinEDA_BasePcbFrame::GetCollectorsGuide()
|
||||
GENERAL_COLLECTORS_GUIDE PCB_BASE_FRAME::GetCollectorsGuide()
|
||||
{
|
||||
GENERAL_COLLECTORS_GUIDE guide( m_Pcb->GetVisibleLayers(),
|
||||
( (PCB_SCREEN*)GetScreen())->m_Active_Layer );
|
||||
@ -378,7 +370,7 @@ GENERAL_COLLECTORS_GUIDE WinEDA_BasePcbFrame::GetCollectorsGuide()
|
||||
return guide;
|
||||
}
|
||||
|
||||
void WinEDA_BasePcbFrame::SetToolID( int aId, int aCursor, const wxString& aToolMsg )
|
||||
void PCB_BASE_FRAME::SetToolID( int aId, int aCursor, const wxString& aToolMsg )
|
||||
{
|
||||
bool redraw = false;
|
||||
|
||||
@ -405,7 +397,7 @@ void WinEDA_BasePcbFrame::SetToolID( int aId, int aCursor, const wxString& aTool
|
||||
/*
|
||||
* Update the status bar information.
|
||||
*/
|
||||
void WinEDA_BasePcbFrame::UpdateStatusBar()
|
||||
void PCB_BASE_FRAME::UpdateStatusBar()
|
||||
{
|
||||
EDA_DRAW_FRAME::UpdateStatusBar();
|
||||
|
||||
@ -454,13 +446,21 @@ void WinEDA_BasePcbFrame::UpdateStatusBar()
|
||||
}
|
||||
|
||||
|
||||
void PCB_BASE_FRAME::unitsChangeRefresh()
|
||||
{
|
||||
EDA_DRAW_FRAME::unitsChangeRefresh(); // Update the status bar.
|
||||
|
||||
updateGridSelectBox();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load PCB base frame specific configuration settings.
|
||||
*
|
||||
* Don't forget to call this base method from any derived classes or the
|
||||
* settings will not get loaded.
|
||||
*/
|
||||
void WinEDA_BasePcbFrame::LoadSettings()
|
||||
void PCB_BASE_FRAME::LoadSettings()
|
||||
{
|
||||
wxASSERT( wxGetApp().m_EDA_Config != NULL );
|
||||
|
||||
@ -497,7 +497,7 @@ void WinEDA_BasePcbFrame::LoadSettings()
|
||||
* Don't forget to call this base method from any derived classes or the
|
||||
* settings will not get saved.
|
||||
*/
|
||||
void WinEDA_BasePcbFrame::SaveSettings()
|
||||
void PCB_BASE_FRAME::SaveSettings()
|
||||
{
|
||||
wxASSERT( wxGetApp().m_EDA_Config != NULL );
|
||||
|
||||
@ -523,7 +523,7 @@ void WinEDA_BasePcbFrame::SaveSettings()
|
||||
* do not forget to call this basic OnModify function to update info
|
||||
* in derived OnModify functions
|
||||
*/
|
||||
void WinEDA_BasePcbFrame::OnModify( )
|
||||
void PCB_BASE_FRAME::OnModify( )
|
||||
{
|
||||
GetScreen()->SetModify( );
|
||||
|
||||
@ -532,7 +532,7 @@ void WinEDA_BasePcbFrame::OnModify( )
|
||||
}
|
||||
|
||||
|
||||
void WinEDA_BasePcbFrame::updateGridSelectBox()
|
||||
void PCB_BASE_FRAME::updateGridSelectBox()
|
||||
{
|
||||
UpdateStatusBar();
|
||||
DisplayUnitsMsg();
|
||||
@ -591,7 +591,7 @@ void WinEDA_BasePcbFrame::updateGridSelectBox()
|
||||
}
|
||||
|
||||
|
||||
void WinEDA_BasePcbFrame::updateZoomSelectBox()
|
||||
void PCB_BASE_FRAME::updateZoomSelectBox()
|
||||
{
|
||||
if( m_SelZoomBox == NULL )
|
||||
return;
|
||||
|
@ -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();
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user