KiCad PCB EDA Suite
sch_edit_frame.cpp File Reference
#include <fctsys.h>
#include <kiface_i.h>
#include <pgm_base.h>
#include <gr_basic.h>
#include <sch_draw_panel.h>
#include <gestfich.h>
#include <confirm.h>
#include <base_units.h>
#include <msgpanel.h>
#include <html_messagebox.h>
#include <executable_names.h>
#include <eda_dockart.h>
#include <general.h>
#include <eeschema_id.h>
#include <netlist.h>
#include <lib_pin.h>
#include <class_library.h>
#include <sch_edit_frame.h>
#include <sch_component.h>
#include <symbol_lib_table.h>
#include <dialog_helpers.h>
#include <reporter.h>
#include <lib_edit_frame.h>
#include <viewlib_frame.h>
#include <hotkeys.h>
#include <eeschema_config.h>
#include <sch_sheet.h>
#include <sch_sheet_path.h>
#include "sim/sim_plot_frame.h"
#include <invoke_sch_dialog.h>
#include <dialogs/dialog_schematic_find.h>
#include <dialog_symbol_remap.h>
#include <view/view.h>
#include <tool/tool_manager.h>
#include <wx/display.h>
#include <build_version.h>
#include <wildcards_and_files_ext.h>
#include <netlist_exporter_kicad.h>
#include <kiway.h>
#include <dialogs/dialog_fields_editor_global.h>
#include <sch_view.h>
#include <sch_painter.h>
#include <gal/graphics_abstraction_layer.h>

Go to the source code of this file.

Macros

#define FN_LEN_MAX   80
 

Functions

static void add_search_paths (SEARCH_STACK *aDst, const SEARCH_STACK &aSrc, int aIndex)
 
static void add_search_paths (SEARCH_STACK *aDst, wxConfigBase *aCfg, int aIndex)
 
 EVT_TOOL_RANGE (ID_SCHEMATIC_VERTICAL_TOOLBAR_START, ID_SCHEMATIC_VERTICAL_TOOLBAR_END, SCH_EDIT_FRAME::OnSelectTool) EVT_TOOL_RANGE(ID_SCHEMATIC_PLACE_MENU_START
 
SCH_EDIT_FRAME::OnSelectTool EVT_MENU_RANGE (ID_SCH_ROTATE_CLOCKWISE, ID_SCH_ROTATE_COUNTERCLOCKWISE, SCH_EDIT_FRAME::OnRotate) EVT_MENU_RANGE(ID_SCH_EDIT_ITEM
 
SCH_EDIT_FRAME::OnSelectTool SCH_EDIT_FRAME::OnEditItem EVT_MENU_RANGE (ID_POPUP_START_RANGE, ID_POPUP_END_RANGE, SCH_EDIT_FRAME::Process_Special_Functions) EVT_MENU_RANGE(ID_POPUP_GENERAL_START_RANGE
 
SCH_EDIT_FRAME::OnSelectTool SCH_EDIT_FRAME::OnEditItem SCH_EDIT_FRAME::Process_Special_Functions EVT_MENU_RANGE (ID_POPUP_SCH_SELECT_UNIT1, ID_POPUP_SCH_SELECT_UNIT_CMP_MAX, SCH_EDIT_FRAME::OnSelectUnit) EVT_MENU_RANGE(ID_POPUP_SCH_CHANGE_TYPE_TEXT
 
SCH_EDIT_FRAME::OnSelectTool SCH_EDIT_FRAME::OnEditItem SCH_EDIT_FRAME::Process_Special_Functions SCH_EDIT_FRAME::OnConvertTextType EVT_UPDATE_UI_RANGE (ID_SCHEMATIC_VERTICAL_TOOLBAR_START, ID_SCHEMATIC_VERTICAL_TOOLBAR_END, SCH_EDIT_FRAME::OnUpdateSelectTool) SCH_EDIT_FRAME
 

Variables

 ID_SCHEMATIC_PLACE_MENU_END
 
SCH_EDIT_FRAME::OnSelectTool ID_SCH_EDIT_COMPONENT_FOOTPRINT
 
SCH_EDIT_FRAME::OnSelectTool SCH_EDIT_FRAME::OnEditItem ID_POPUP_GENERAL_END_RANGE
 
SCH_EDIT_FRAME::OnSelectTool SCH_EDIT_FRAME::OnEditItem SCH_EDIT_FRAME::Process_Special_Functions ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_COMMENT
 

Macro Definition Documentation

◆ FN_LEN_MAX

#define FN_LEN_MAX   80

Function Documentation

◆ add_search_paths() [1/2]

static void add_search_paths ( SEARCH_STACK aDst,
const SEARCH_STACK aSrc,
int  aIndex 
)
static

Definition at line 82 of file sch_edit_frame.cpp.

83 {
84  for( unsigned i=0; i<aSrc.GetCount(); ++i )
85  aDst->AddPaths( aSrc[i], aIndex );
86 }
size_t i
Definition: json11.cpp:597
void AddPaths(const wxString &aPaths, int aIndex=-1)
Function AddPaths insert or append path(s)

References SEARCH_STACK::AddPaths(), and i.

◆ add_search_paths() [2/2]

static void add_search_paths ( SEARCH_STACK aDst,
wxConfigBase *  aCfg,
int  aIndex 
)
static

Definition at line 91 of file sch_edit_frame.cpp.

92 {
93  for( int i=1; true; ++i )
94  {
95  wxString key = wxString::Format( wxT( "LibraryPath%d" ), i );
96  wxString upath = aCfg->Read( key, wxEmptyString );
97 
98  if( !upath )
99  break;
100 
101  aDst->AddPaths( upath, aIndex );
102  }
103 }
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
size_t i
Definition: json11.cpp:597
void AddPaths(const wxString &aPaths, int aIndex=-1)
Function AddPaths insert or append path(s)

References SEARCH_STACK::AddPaths(), Format(), and i.

◆ EVT_MENU_RANGE() [1/3]

◆ EVT_MENU_RANGE() [2/3]

◆ EVT_MENU_RANGE() [3/3]

◆ EVT_TOOL_RANGE()

◆ EVT_UPDATE_UI_RANGE()

Definition at line 350 of file sch_edit_frame.cpp.

369  :
370  SCH_BASE_FRAME( aKiway, aParent, FRAME_SCH, wxT( "Eeschema" ),
371  wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, SCH_EDIT_FRAME_NAME ),
372  m_item_to_repeat( 0 )
373 {
374  m_showAxis = false; // true to show axis
375  m_showBorderAndTitleBlock = true; // true to show sheet references
376  m_CurrentSheet = new SCH_SHEET_PATH;
377  m_DefaultSchematicFileName = NAMELESS_PROJECT;
378  m_DefaultSchematicFileName += wxT( ".sch" );
379  m_showAllPins = false;
380  m_printMonochrome = true;
381  m_printSheetReference = true;
382  SetShowPageLimits( true );
383  m_hotkeysDescrList = g_Schematic_Hokeys_Descr;
384  m_dlgFindReplace = NULL;
385  m_findReplaceData = new wxFindReplaceData( wxFR_DOWN );
386  m_findReplaceStatus = new wxString( wxEmptyString );
387  m_undoItem = NULL;
388  m_hasAutoSave = true;
389  m_FrameSize = ConvertDialogToPixels( wxSize( 500, 350 ) ); // default in case of no prefs
390 
391  m_toolManager = new TOOL_MANAGER;
392 
393  SetForceHVLines( true );
394  SetSpiceAjustPassiveValues( false );
395 
396  // Give an icon
397  wxIcon icon;
398  icon.CopyFromBitmap( KiBitmap( icon_eeschema_xpm ) );
399  SetIcon( icon );
400 
401  // Initialize grid id to the default value (50 mils):
403 
404  LoadSettings( config() );
405 
406  CreateScreens();
407 
408  SetPresetGrid( m_LastGridSizeId );
409 
410  SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
411 
412  if( m_canvas )
413  m_canvas->SetEnableBlockCommands( true );
414 
415  ReCreateMenuBar();
416  ReCreateHToolbar();
417  ReCreateVToolbar();
418  ReCreateOptToolbar();
419 
420  // Initialize common print setup dialog settings.
421  m_pageSetupData.GetPrintData().SetPrintMode( wxPRINT_MODE_PRINTER );
422  m_pageSetupData.GetPrintData().SetQuality( wxPRINT_QUALITY_MEDIUM );
423  m_pageSetupData.GetPrintData().SetBin( wxPRINTBIN_AUTO );
424  m_pageSetupData.GetPrintData().SetNoCopies( 1 );
425 
426  m_auimgr.SetManagedWindow( this );
427  m_auimgr.SetArtProvider( new EDA_DOCKART( this ) );
428 
429  m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" ).Top().Layer(6) );
430  m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( "OptToolbar" ).Left().Layer(3) );
431  m_auimgr.AddPane( m_drawToolBar, EDA_PANE().VToolbar().Name( "ToolsToolbar" ).Right().Layer(1) );
432  m_auimgr.AddPane( m_canvas->GetWindow(), EDA_PANE().Canvas().Name( "DrawFrame" ).Center() );
433  m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" ).Bottom().Layer(6) );
434 
435  m_auimgr.Update();
436 
437  Zoom_Automatique( false );
438 
439  if( GetGalCanvas() )
440  GetGalCanvas()->GetGAL()->SetGridVisibility( IsGridVisible() );
441 
442  // Net list generator
443  DefaultExecFlags();
444 
445  Bind( wxEVT_COMMAND_MENU_SELECTED, &SCH_EDIT_FRAME::OnEditSymbolLibTable, this,
447 
448  UpdateTitle();
449 }
virtual void OnEditSymbolLibTable(wxCommandEvent &aEvent)
#define SCH_EDIT_FRAME_NAME
Definition: draw_frame.h:50
Class TOOL_MANAGER.
Definition: tool_manager.h:49
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:79
#define NAMELESS_PROJECT
#define KICAD_DEFAULT_DRAWFRAME_STYLE
Class SCH_SHEET_PATH.
Specialization of the wxAuiPaneInfo class for KiCad panels.
EDA_PANE & Canvas()
Function Canvas Turn *this into an undecorated pane suitable for a drawing canvas.
A shim class between EDA_DRAW_FRAME and several derived classes: LIB_EDIT_FRAME, LIB_VIEW_FRAME,...
struct EDA_HOTKEY_CONFIG g_Schematic_Hokeys_Descr[]

References EDA_PANE::Canvas(), g_Schematic_Hokeys_Descr, ID_EDIT_SYM_LIB_TABLE, ID_POPUP_GRID_LEVEL_1000, ID_POPUP_GRID_LEVEL_50, KiBitmap(), PCAD2KICAD::Left, NAMELESS_PROJECT, SCH_BASE_FRAME::OnEditSymbolLibTable(), and PCAD2KICAD::Right.

Variable Documentation

◆ ID_POPUP_GENERAL_END_RANGE

Definition at line 333 of file sch_edit_frame.cpp.

◆ ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_COMMENT

◆ ID_SCH_EDIT_COMPONENT_FOOTPRINT

SCH_EDIT_FRAME::OnSelectTool ID_SCH_EDIT_COMPONENT_FOOTPRINT

Definition at line 319 of file sch_edit_frame.cpp.

◆ ID_SCHEMATIC_PLACE_MENU_END

ID_SCHEMATIC_PLACE_MENU_END

Definition at line 306 of file sch_edit_frame.cpp.