mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-19 18:51:40 +00:00
Naming conventions.
This commit is contained in:
parent
dff5173baf
commit
a207bd97bb
3d-viewer
bitmap2component
common
advanced_config.cppbase_screen.cppboard_printout.cppdialog_shim.cpp
dialogs
dialog_color_picker.cppdialog_configure_paths.cppdialog_edit_library_tables.cppdialog_global_lib_table_config.cppdialog_grid_settings.cppdialog_hotkey_list.cppdialog_image_editor.cppdialog_print_generic.cpphtml_messagebox.cpp
eda_base_frame.cppeda_draw_frame.cppfilename_resolver.cppfootprint_info.cppwidgets
cvpcb
eeschema
cross-probing.cpp
dialogs
dialog_annotate.cppdialog_bom.cppdialog_bus_manager.cppdialog_change_symbols.cppdialog_choose_component.cppdialog_edit_components_libid.cppdialog_edit_label.cppdialog_edit_line_style.cppdialog_edit_one_field.cppdialog_erc.cppdialog_fields_editor_global.cppdialog_global_edit_text_and_graphics.cppdialog_junction_props.cppdialog_lib_edit_draw_item.cppdialog_lib_edit_text.cppdialog_lib_new_component.cppdialog_lib_symbol_properties.cppdialog_netlist.cppdialog_paste_special.cppdialog_pin_properties.cppdialog_plot_schematic.cppdialog_print_using_printer.cppdialog_rescue_each.cppdialog_schematic_setup.cppdialog_sheet_pin_properties.cppdialog_sheet_properties.cppdialog_signal_list.cppdialog_sim_settings.hdialog_spice_model.hdialog_symbol_properties.cppdialog_update_from_pcb.cpp
lib_view_frame.cppsch_base_frame.cppsch_connection.cppsch_edit_frame.cppsymbol_editor
tools
gerbview
include
advanced_config.hbase_screen.hboard_item.hboard_printout.hdialog_shim.h
dialogs
eda_base_frame.heda_draw_frame.hfilename_resolver.hfootprint_info.htool
kicad
pagelayout_editor
pcb_calculator
pcbnew
board_item.cpp
dialogs
dialog_board_reannotate.cppdialog_board_setup.cppdialog_board_statistics.cppdialog_choose_footprint.cppdialog_cleanup_tracks_and_vias.cppdialog_constraints_reporter.cppdialog_copper_zones.cppdialog_dimension_properties.cppdialog_drc.cppdialog_edit_footprint_for_fp_editor.cppdialog_enum_pads.cppdialog_exchange_footprints.cppdialog_export_idf.cppdialog_export_step.cppdialog_export_svg.cppdialog_export_vrml.cppdialog_footprint_properties.cppdialog_footprint_wizard_list.cppdialog_gencad_export_options.cppdialog_global_edit_text_and_graphics.cppdialog_global_edit_tracks_and_vias.cppdialog_graphic_item_properties.cppdialog_imported_layers.cppdialog_move_exact.cppdialog_net_inspector.cppdialog_netlist.cppdialog_non_copper_zones_properties.cppdialog_pad_basicshapes_properties.cppdialog_pad_properties.cppdialog_position_relative.cppdialog_print_pcbnew.cppdialog_push_pad_properties.cppdialog_rule_area_properties.cppdialog_swap_layers.cppdialog_target_properties.cppdialog_text_properties.cppdialog_track_via_properties.cppdialog_track_via_size.cppdialog_unused_pad_layers.cppdialog_update_pcb.cpp
footprint_edit_frame.cppfootprint_info_impl.cppfootprint_info_impl.hfootprint_viewer_frame.cppfootprint_wizard_frame.cpppad.cpppcb_edit_frame.cpppcbnew_printout.cpptools
track.cpptrack.hutils/kicad2step/pcb
@ -134,7 +134,7 @@ DLG_SELECT_3DMODEL::DLG_SELECT_3DMODEL( wxWindow* aParent, S3D_CACHE* aCacheMana
|
||||
m_modelViewer->Refresh();
|
||||
m_modelViewer->SetFocus();
|
||||
|
||||
FinishDialogSettings();
|
||||
finishDialogSettings();
|
||||
}
|
||||
|
||||
|
||||
@ -216,14 +216,14 @@ void DLG_SELECT_3DMODEL::updateDirChoiceList( void )
|
||||
// extract the current project dir
|
||||
if( sL != md->end() )
|
||||
{
|
||||
prjDir = sL->m_pathexp;
|
||||
prjDir = sL->m_Pathexp;
|
||||
++sL;
|
||||
}
|
||||
|
||||
while( sL != md->end() )
|
||||
{
|
||||
if( !sL->m_pathexp.empty() && sL->m_pathexp.compare( prjDir ) )
|
||||
cl.insert( sL->m_pathexp );
|
||||
if( !sL->m_Pathexp.empty() && sL->m_Pathexp.compare( prjDir ) )
|
||||
cl.insert( sL->m_Pathexp );
|
||||
|
||||
++sL;
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ DIALOG_3D_VIEW_OPTIONS::DIALOG_3D_VIEW_OPTIONS( EDA_3D_VIEWER* aParent ) :
|
||||
m_sdbSizerOK->SetDefault();
|
||||
|
||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||
FinishDialogSettings();
|
||||
finishDialogSettings();
|
||||
}
|
||||
|
||||
|
||||
|
@ -93,7 +93,7 @@ EDA_3D_VIEWER::EDA_3D_VIEWER( KIWAY *aKiway, PCB_BASE_FRAME *aParent, const wxSt
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::EDA_3D_VIEWER %s", aTitle );
|
||||
|
||||
m_disable_ray_tracing = false;
|
||||
m_AboutTitle = "3D Viewer";
|
||||
m_aboutTitle = "3D Viewer";
|
||||
|
||||
// Give it an icon
|
||||
wxIcon icon;
|
||||
|
@ -179,9 +179,9 @@ BM2CMP_FRAME::BM2CMP_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||
m_buttonExportFile->Enable( false );
|
||||
m_buttonExportClipboard->Enable( false );
|
||||
|
||||
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
|
||||
SetSize( m_framePos.x, m_framePos.y, m_frameSize.x, m_frameSize.y );
|
||||
|
||||
if ( m_FramePos == wxDefaultPosition )
|
||||
if ( m_framePos == wxDefaultPosition )
|
||||
Centre();
|
||||
}
|
||||
|
||||
|
@ -220,11 +220,11 @@ ADVANCED_CFG::ADVANCED_CFG()
|
||||
|
||||
// Init defaults - this is done in case the config doesn't exist,
|
||||
// then the values will remain as set here.
|
||||
m_realTimeConnectivity = true;
|
||||
m_coroutineStackSize = AC_STACK::default_stack;
|
||||
m_RealTimeConnectivity = true;
|
||||
m_CoroutineStackSize = AC_STACK::default_stack;
|
||||
m_ShowRouterDebugGraphics = false;
|
||||
m_drawArcAccuracy = 10.0;
|
||||
m_drawArcCenterMaxAngle = 50.0;
|
||||
m_DrawArcAccuracy = 10.0;
|
||||
m_DrawArcCenterMaxAngle = 50.0;
|
||||
m_DrawTriangulationOutlines = false;
|
||||
m_PluginAltiumSch = false;
|
||||
|
||||
@ -281,7 +281,7 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
|
||||
std::vector<PARAM_CFG*> configParams;
|
||||
|
||||
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::RealtimeConnectivity,
|
||||
&m_realTimeConnectivity, true ) );
|
||||
&m_RealTimeConnectivity, true ) );
|
||||
|
||||
configParams.push_back( new PARAM_CFG_DOUBLE( true, AC_KEYS::ExtraFillMargin,
|
||||
&m_ExtraClearance, 0.0005, 0.0, 1.0 ) );
|
||||
@ -293,7 +293,7 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
|
||||
&m_HoleWallThickness, 0.020, 0.0, 1.0 ) );
|
||||
|
||||
configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::CoroutineStackSize,
|
||||
&m_coroutineStackSize, AC_STACK::default_stack,
|
||||
&m_CoroutineStackSize, AC_STACK::default_stack,
|
||||
AC_STACK::min_stack, AC_STACK::max_stack ) );
|
||||
|
||||
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::ShowRouterDebugGraphics,
|
||||
@ -303,10 +303,10 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
|
||||
&m_CompactSave, false ) );
|
||||
|
||||
configParams.push_back( new PARAM_CFG_DOUBLE( true, AC_KEYS::DrawArcAccuracy,
|
||||
&m_drawArcAccuracy, 10.0, 0.0, 100000.0 ) );
|
||||
&m_DrawArcAccuracy, 10.0, 0.0, 100000.0 ) );
|
||||
|
||||
configParams.push_back( new PARAM_CFG_DOUBLE( true, AC_KEYS::DrawArcCenterStartEndMaxAngle,
|
||||
&m_drawArcCenterMaxAngle, 50.0, 0.0, 100000.0 ) );
|
||||
&m_DrawArcCenterMaxAngle, 50.0, 0.0, 100000.0 ) );
|
||||
|
||||
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::StrokeTriangulation,
|
||||
&m_DrawTriangulationOutlines, false ) );
|
||||
|
@ -40,8 +40,8 @@ BASE_SCREEN::BASE_SCREEN( EDA_ITEM* aParent, KICAD_T aType ) :
|
||||
m_pageCount = 1; // Hierarchy: Root: ScreenNumber = 1
|
||||
m_Center = true;
|
||||
|
||||
m_FlagModified = false; // Set when any change is made on board.
|
||||
m_FlagSave = false; // Used in auto save set when an auto save is required.
|
||||
m_flagModified = false; // Set when any change is made on board.
|
||||
m_flagSave = false; // Used in auto save set when an auto save is required.
|
||||
}
|
||||
|
||||
|
||||
|
@ -36,8 +36,8 @@
|
||||
BOARD_PRINTOUT_SETTINGS::BOARD_PRINTOUT_SETTINGS( const PAGE_INFO& aPageInfo )
|
||||
: PRINTOUT_SETTINGS( aPageInfo )
|
||||
{
|
||||
m_layerSet.set();
|
||||
m_mirror = false;
|
||||
m_LayerSet.set();
|
||||
m_Mirror = false;
|
||||
}
|
||||
|
||||
|
||||
@ -45,10 +45,10 @@ void BOARD_PRINTOUT_SETTINGS::Load( APP_SETTINGS_BASE* aConfig )
|
||||
{
|
||||
PRINTOUT_SETTINGS::Load( aConfig );
|
||||
|
||||
m_layerSet.reset();
|
||||
m_LayerSet.reset();
|
||||
|
||||
for( int layer : aConfig->m_Printing.layers )
|
||||
m_layerSet.set( layer, true );
|
||||
m_LayerSet.set( layer, true );
|
||||
}
|
||||
|
||||
|
||||
@ -58,8 +58,8 @@ void BOARD_PRINTOUT_SETTINGS::Save( APP_SETTINGS_BASE* aConfig )
|
||||
|
||||
aConfig->m_Printing.layers.clear();
|
||||
|
||||
for( unsigned layer = 0; layer < m_layerSet.size(); ++layer )
|
||||
if( m_layerSet.test( layer ) )
|
||||
for( unsigned layer = 0; layer < m_LayerSet.size(); ++layer )
|
||||
if( m_LayerSet.test( layer ) )
|
||||
aConfig->m_Printing.layers.push_back( layer );
|
||||
}
|
||||
|
||||
@ -126,7 +126,7 @@ void BOARD_PRINTOUT::DrawPage( const wxString& aLayerName, int aPageNum, int aPa
|
||||
}
|
||||
}
|
||||
|
||||
setupViewLayers( *view, m_settings.m_layerSet );
|
||||
setupViewLayers( *view, m_settings.m_LayerSet );
|
||||
setupPainter( *painter );
|
||||
|
||||
auto sheetSizeMils = m_settings.m_pageInfo.GetSizeMils();
|
||||
@ -203,5 +203,5 @@ void BOARD_PRINTOUT::setupPainter( KIGFX::PAINTER& aPainter )
|
||||
|
||||
void BOARD_PRINTOUT::setupGal( KIGFX::GAL* aGal )
|
||||
{
|
||||
aGal->SetFlip( m_settings.m_mirror, false );
|
||||
aGal->SetFlip( m_settings.m_Mirror, false );
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ DIALOG_SHIM::~DIALOG_SHIM()
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_SHIM::FinishDialogSettings()
|
||||
void DIALOG_SHIM::finishDialogSettings()
|
||||
{
|
||||
// must be called from the constructor of derived classes,
|
||||
// when all widgets are initialized, and therefore their size fixed
|
||||
@ -155,21 +155,21 @@ void DIALOG_SHIM::FinishDialogSettings()
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_SHIM::SetSizeInDU( int x, int y )
|
||||
void DIALOG_SHIM::setSizeInDU( int x, int y )
|
||||
{
|
||||
wxSize sz( x, y );
|
||||
SetSize( ConvertDialogToPixels( sz ) );
|
||||
}
|
||||
|
||||
|
||||
int DIALOG_SHIM::HorizPixelsFromDU( int x )
|
||||
int DIALOG_SHIM::horizPixelsFromDU( int x )
|
||||
{
|
||||
wxSize sz( x, 0 );
|
||||
return ConvertDialogToPixels( sz ).x;
|
||||
}
|
||||
|
||||
|
||||
int DIALOG_SHIM::VertPixelsFromDU( int y )
|
||||
int DIALOG_SHIM::vertPixelsFromDU( int y )
|
||||
{
|
||||
wxSize sz( 0, y );
|
||||
return ConvertDialogToPixels( sz ).y;
|
||||
@ -241,7 +241,7 @@ bool DIALOG_SHIM::Show( bool show )
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_SHIM::ResetSize()
|
||||
void DIALOG_SHIM::resetSize()
|
||||
{
|
||||
const char* hash_key;
|
||||
|
||||
|
@ -142,7 +142,7 @@ bool DIALOG_COLOR_PICKER::TransferDataToWindow()
|
||||
m_notebook->GetPage( 0 )->Layout();
|
||||
m_notebook->GetPage( 1 )->Layout();
|
||||
|
||||
FinishDialogSettings();
|
||||
finishDialogSettings();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -143,12 +143,12 @@ bool DIALOG_CONFIGURE_PATHS::TransferDataToWindow()
|
||||
|
||||
for( auto it = paths->begin(); it != paths->end(); ++it )
|
||||
{
|
||||
if ( !( *it ).m_alias.StartsWith( "${" ) && !( *it ).m_alias.StartsWith( "$(" ) )
|
||||
if ( !( *it ).m_Alias.StartsWith( "${" ) && !( *it ).m_Alias.StartsWith( "$(" ) )
|
||||
{
|
||||
AppendSearchPath( it->m_alias, it->m_pathvar, it->m_description );
|
||||
AppendSearchPath( it->m_Alias, it->m_Pathvar, it->m_Description );
|
||||
|
||||
if( m_curdir.IsEmpty() )
|
||||
m_curdir = it->m_pathexp;
|
||||
m_curdir = it->m_Pathexp;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -272,11 +272,11 @@ bool DIALOG_CONFIGURE_PATHS::TransferDataFromWindow()
|
||||
|
||||
for( int row = 0; row < m_SearchPaths->GetNumberRows(); ++row )
|
||||
{
|
||||
alias.m_alias = m_SearchPaths->GetCellValue( row, SP_ALIAS_COL );
|
||||
alias.m_pathvar = m_SearchPaths->GetCellValue( row, SP_PATH_COL );
|
||||
alias.m_description = m_SearchPaths->GetCellValue( row, SP_DESC_COL );
|
||||
alias.m_Alias = m_SearchPaths->GetCellValue( row, SP_ALIAS_COL );
|
||||
alias.m_Pathvar = m_SearchPaths->GetCellValue( row, SP_PATH_COL );
|
||||
alias.m_Description = m_SearchPaths->GetCellValue( row, SP_DESC_COL );
|
||||
|
||||
if( alias.m_alias.IsEmpty() )
|
||||
if( alias.m_Alias.IsEmpty() )
|
||||
{
|
||||
m_errorGrid = m_SearchPaths;
|
||||
m_errorRow = row;
|
||||
@ -284,7 +284,7 @@ bool DIALOG_CONFIGURE_PATHS::TransferDataFromWindow()
|
||||
m_errorMsg = _( "3D search path alias cannot be empty." );
|
||||
return false;
|
||||
}
|
||||
else if( alias.m_pathvar.IsEmpty() )
|
||||
else if( alias.m_Pathvar.IsEmpty() )
|
||||
{
|
||||
m_errorGrid = m_SearchPaths;
|
||||
m_errorRow = row;
|
||||
|
@ -57,7 +57,7 @@ void DIALOG_EDIT_LIBRARY_TABLES::InstallPanel( wxPanel* aPanel )
|
||||
|
||||
sdbSizerOK->SetDefault();
|
||||
|
||||
FinishDialogSettings();
|
||||
finishDialogSettings();
|
||||
|
||||
// On some windows manager (Unity, XFCE), this dialog is not always raised, depending
|
||||
// on how the dialog is run.
|
||||
|
@ -74,7 +74,7 @@ DIALOG_GLOBAL_LIB_TABLE_CONFIG::DIALOG_GLOBAL_LIB_TABLE_CONFIG( wxWindow* aParen
|
||||
if( okButton )
|
||||
okButton->SetDefault();
|
||||
|
||||
FinishDialogSettings();
|
||||
finishDialogSettings();
|
||||
}
|
||||
|
||||
|
||||
|
@ -68,7 +68,7 @@ DIALOG_GRID_SETTINGS::DIALOG_GRID_SETTINGS( EDA_DRAW_FRAME* aParent ):
|
||||
Layout();
|
||||
|
||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||
FinishDialogSettings();
|
||||
finishDialogSettings();
|
||||
}
|
||||
|
||||
|
||||
|
@ -50,7 +50,7 @@ DIALOG_LIST_HOTKEYS::DIALOG_LIST_HOTKEYS( EDA_BASE_FRAME* aParent, TOOL_MANAGER*
|
||||
|
||||
SetSizer( main_sizer );
|
||||
|
||||
FinishDialogSettings();
|
||||
finishDialogSettings();
|
||||
}
|
||||
|
||||
|
||||
|
@ -39,7 +39,7 @@ DIALOG_IMAGE_EDITOR::DIALOG_IMAGE_EDITOR( wxWindow* aParent, BITMAP_BASE* aItem
|
||||
msg.Printf( wxT( "%f" ), m_workingImage->GetScale() );
|
||||
m_textCtrlScale->SetValue( msg );
|
||||
|
||||
FinishDialogSettings();
|
||||
finishDialogSettings();
|
||||
m_sdbSizerOK->SetDefault();
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ DIALOG_PRINT_GENERIC::DIALOG_PRINT_GENERIC( EDA_DRAW_FRAME* aParent, PRINTOUT_SE
|
||||
m_sdbSizer1Apply->Hide();
|
||||
#endif
|
||||
|
||||
FinishDialogSettings();
|
||||
finishDialogSettings();
|
||||
Layout();
|
||||
initPrintData();
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ HTML_MESSAGE_BOX::HTML_MESSAGE_BOX( wxWindow* aParent, const wxString& aTitle,
|
||||
|
||||
// Gives a default logical size (the actual size depends on the display definition)
|
||||
if( aSize != wxDefaultSize )
|
||||
SetSizeInDU( aSize.x, aSize.y );
|
||||
setSizeInDU( aSize.x, aSize.y );
|
||||
|
||||
Center();
|
||||
|
||||
|
@ -84,7 +84,7 @@ EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* aParent, FRAME_T aFrameType,
|
||||
wxFrame( aParent, wxID_ANY, aTitle, aPos, aSize, aStyle, aFrameName ),
|
||||
TOOLS_HOLDER(),
|
||||
KIWAY_HOLDER( aKiway, KIWAY_HOLDER::FRAME ),
|
||||
m_Ident( aFrameType ),
|
||||
m_ident( aFrameType ),
|
||||
m_maximizeByDefault( false ),
|
||||
m_infoBar( nullptr ),
|
||||
m_settingsManager( nullptr ),
|
||||
@ -92,14 +92,14 @@ EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* aParent, FRAME_T aFrameType,
|
||||
m_hasAutoSave( false ),
|
||||
m_autoSaveState( false ),
|
||||
m_autoSaveInterval(-1 ),
|
||||
m_UndoRedoCountMax( DEFAULT_MAX_UNDO_ITEMS ),
|
||||
m_undoRedoCountMax( DEFAULT_MAX_UNDO_ITEMS ),
|
||||
m_userUnits( EDA_UNITS::MILLIMETRES ),
|
||||
m_isClosing( false ),
|
||||
m_isNonUserClose( false )
|
||||
{
|
||||
m_autoSaveTimer = new wxTimer( this, ID_AUTO_SAVE_TIMER );
|
||||
m_mruPath = wxStandardPaths::Get().GetDocumentsDir();
|
||||
m_FrameSize = wxSize( s_defaultSize_x, s_defaultSize_y );
|
||||
m_frameSize = wxSize( s_defaultSize_x, s_defaultSize_y );
|
||||
|
||||
m_auimgr.SetArtProvider( new WX_AUI_DOCK_ART() );
|
||||
|
||||
@ -109,7 +109,7 @@ EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* aParent, FRAME_T aFrameType,
|
||||
SetSizeHints( s_minsize_x, s_minsize_y, -1, -1, -1, -1 );
|
||||
|
||||
// Store dimensions of the user area of the main window.
|
||||
GetClientSize( &m_FrameSize.x, &m_FrameSize.y );
|
||||
GetClientSize( &m_frameSize.x, &m_frameSize.y );
|
||||
|
||||
Connect( ID_AUTO_SAVE_TIMER, wxEVT_TIMER,
|
||||
wxTimerEventHandler( EDA_BASE_FRAME::onAutoSaveTimer ) );
|
||||
@ -131,7 +131,7 @@ wxWindow* EDA_BASE_FRAME::findQuasiModalDialog()
|
||||
|
||||
// FIXME: CvPcb is currently implemented on top of KIWAY_PLAYER rather than DIALOG_SHIM,
|
||||
// so we have to look for it separately.
|
||||
if( m_Ident == FRAME_SCH )
|
||||
if( m_ident == FRAME_SCH )
|
||||
{
|
||||
wxWindow* cvpcb = wxWindow::FindWindowByName( "CvpcbFrame" );
|
||||
if( cvpcb )
|
||||
@ -450,22 +450,22 @@ void EDA_BASE_FRAME::LoadWindowState( const WINDOW_STATE& aState )
|
||||
{
|
||||
bool wasDefault = false;
|
||||
|
||||
m_FramePos.x = aState.pos_x;
|
||||
m_FramePos.y = aState.pos_y;
|
||||
m_FrameSize.x = aState.size_x;
|
||||
m_FrameSize.y = aState.size_y;
|
||||
m_framePos.x = aState.pos_x;
|
||||
m_framePos.y = aState.pos_y;
|
||||
m_frameSize.x = aState.size_x;
|
||||
m_frameSize.y = aState.size_y;
|
||||
|
||||
wxLogTrace( traceDisplayLocation, "Config position (%d, %d) with size (%d, %d)",
|
||||
m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
|
||||
m_framePos.x, m_framePos.y, m_frameSize.x, m_frameSize.y );
|
||||
|
||||
// Ensure minimum size is set if the stored config was zero-initialized
|
||||
if( m_FrameSize.x < s_minsize_x || m_FrameSize.y < s_minsize_y )
|
||||
if( m_frameSize.x < s_minsize_x || m_frameSize.y < s_minsize_y )
|
||||
{
|
||||
m_FrameSize.x = s_defaultSize_x;
|
||||
m_FrameSize.y = s_defaultSize_y;
|
||||
m_frameSize.x = s_defaultSize_x;
|
||||
m_frameSize.y = s_defaultSize_y;
|
||||
wasDefault = true;
|
||||
|
||||
wxLogTrace( traceDisplayLocation, "Using minimum size (%d, %d)", m_FrameSize.x, m_FrameSize.y );
|
||||
wxLogTrace( traceDisplayLocation, "Using minimum size (%d, %d)", m_frameSize.x, m_frameSize.y );
|
||||
}
|
||||
|
||||
wxLogTrace( traceDisplayLocation, "Number of displays: %d", wxDisplay::GetCount() );
|
||||
@ -480,19 +480,19 @@ void EDA_BASE_FRAME::LoadWindowState( const WINDOW_STATE& aState )
|
||||
wxDisplay display( index );
|
||||
wxRect clientSize = display.GetGeometry();
|
||||
|
||||
m_FramePos = wxDefaultPosition;
|
||||
m_framePos = wxDefaultPosition;
|
||||
|
||||
// Ensure the window fits on the display, since the other one could have been larger
|
||||
if( m_FrameSize.x > clientSize.width )
|
||||
m_FrameSize.x = clientSize.width;
|
||||
if( m_frameSize.x > clientSize.width )
|
||||
m_frameSize.x = clientSize.width;
|
||||
|
||||
if( m_FrameSize.y > clientSize.height )
|
||||
m_FrameSize.y = clientSize.height;
|
||||
if( m_frameSize.y > clientSize.height )
|
||||
m_frameSize.y = clientSize.height;
|
||||
}
|
||||
else
|
||||
{
|
||||
wxPoint upperRight( m_FramePos.x + m_FrameSize.x, m_FramePos.y );
|
||||
wxPoint upperLeft( m_FramePos.x, m_FramePos.y );
|
||||
wxPoint upperRight( m_framePos.x + m_frameSize.x, m_framePos.y );
|
||||
wxPoint upperLeft( m_framePos.x, m_framePos.y );
|
||||
|
||||
wxDisplay display( aState.display );
|
||||
wxRect clientSize = display.GetClientArea();
|
||||
@ -509,7 +509,7 @@ void EDA_BASE_FRAME::LoadWindowState( const WINDOW_STATE& aState )
|
||||
upperRight.x < xLimLeft || // Upper right corner too close to left edge of screen
|
||||
upperRight.y > yLim ) // Upper corner too close to the bottom of the screen
|
||||
{
|
||||
m_FramePos = wxDefaultPosition;
|
||||
m_framePos = wxDefaultPosition;
|
||||
wxLogTrace( traceDisplayLocation, "Resetting to default position" );
|
||||
}
|
||||
}
|
||||
@ -521,25 +521,25 @@ void EDA_BASE_FRAME::LoadWindowState( const WINDOW_STATE& aState )
|
||||
#else
|
||||
int Ypos_min = 0;
|
||||
#endif
|
||||
if( m_FramePos.y < Ypos_min )
|
||||
m_FramePos.y = Ypos_min;
|
||||
if( m_framePos.y < Ypos_min )
|
||||
m_framePos.y = Ypos_min;
|
||||
|
||||
wxLogTrace( traceDisplayLocation, "Final window position (%d, %d) with size (%d, %d)",
|
||||
m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
|
||||
m_framePos.x, m_framePos.y, m_frameSize.x, m_frameSize.y );
|
||||
|
||||
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
|
||||
SetSize( m_framePos.x, m_framePos.y, m_frameSize.x, m_frameSize.y );
|
||||
|
||||
// Center the window if we reset to default
|
||||
if( m_FramePos.x == -1 )
|
||||
if( m_framePos.x == -1 )
|
||||
{
|
||||
wxLogTrace( traceDisplayLocation, "Centering window" );
|
||||
Center();
|
||||
m_FramePos = GetPosition();
|
||||
m_framePos = GetPosition();
|
||||
}
|
||||
|
||||
// Record the frame sizes in an un-maximized state
|
||||
m_NormalFrameSize = m_FrameSize;
|
||||
m_NormalFramePos = m_FramePos;
|
||||
m_normalFrameSize = m_frameSize;
|
||||
m_normalFramePos = m_framePos;
|
||||
|
||||
// Maximize if we were maximized before
|
||||
if( aState.maximized || ( wasDefault && m_maximizeByDefault ) )
|
||||
@ -576,25 +576,25 @@ void EDA_BASE_FRAME::SaveWindowSettings( WINDOW_SETTINGS* aCfg )
|
||||
// If the window is maximized, we use the saved window size from before it was maximized
|
||||
if( IsMaximized() )
|
||||
{
|
||||
m_FramePos = m_NormalFramePos;
|
||||
m_FrameSize = m_NormalFrameSize;
|
||||
m_framePos = m_normalFramePos;
|
||||
m_frameSize = m_normalFrameSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_FrameSize = GetWindowSize();
|
||||
m_FramePos = GetPosition();
|
||||
m_frameSize = GetWindowSize();
|
||||
m_framePos = GetPosition();
|
||||
}
|
||||
|
||||
aCfg->state.pos_x = m_FramePos.x;
|
||||
aCfg->state.pos_y = m_FramePos.y;
|
||||
aCfg->state.size_x = m_FrameSize.x;
|
||||
aCfg->state.size_y = m_FrameSize.y;
|
||||
aCfg->state.pos_x = m_framePos.x;
|
||||
aCfg->state.pos_y = m_framePos.y;
|
||||
aCfg->state.size_x = m_frameSize.x;
|
||||
aCfg->state.size_y = m_frameSize.y;
|
||||
aCfg->state.maximized = IsMaximized();
|
||||
aCfg->state.display = wxDisplay::GetFromWindow( this );
|
||||
|
||||
wxLogTrace( traceDisplayLocation, "Saving window maximized: %s", IsMaximized() ? "true" : "false" );
|
||||
wxLogTrace( traceDisplayLocation, "Saving config position (%d, %d) with size (%d, %d)",
|
||||
m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
|
||||
m_framePos.x, m_framePos.y, m_frameSize.x, m_frameSize.y );
|
||||
|
||||
// TODO(JE) should auto-save in common settings be overwritten by every app?
|
||||
if( m_hasAutoSave )
|
||||
@ -928,9 +928,9 @@ void EDA_BASE_FRAME::PushCommandToUndoList( PICKED_ITEMS_LIST* aNewitem )
|
||||
m_undoList.PushCommand( aNewitem );
|
||||
|
||||
// Delete the extra items, if count max reached
|
||||
if( m_UndoRedoCountMax > 0 )
|
||||
if( m_undoRedoCountMax > 0 )
|
||||
{
|
||||
int extraitems = GetUndoCommandCount() - m_UndoRedoCountMax;
|
||||
int extraitems = GetUndoCommandCount() - m_undoRedoCountMax;
|
||||
|
||||
if( extraitems > 0 )
|
||||
ClearUndoORRedoList( UNDO_LIST, extraitems );
|
||||
@ -943,9 +943,9 @@ void EDA_BASE_FRAME::PushCommandToRedoList( PICKED_ITEMS_LIST* aNewitem )
|
||||
m_redoList.PushCommand( aNewitem );
|
||||
|
||||
// Delete the extra items, if count max reached
|
||||
if( m_UndoRedoCountMax > 0 )
|
||||
if( m_undoRedoCountMax > 0 )
|
||||
{
|
||||
int extraitems = GetRedoCommandCount() - m_UndoRedoCountMax;
|
||||
int extraitems = GetRedoCommandCount() - m_undoRedoCountMax;
|
||||
|
||||
if( extraitems > 0 )
|
||||
ClearUndoORRedoList( REDO_LIST, extraitems );
|
||||
@ -986,10 +986,10 @@ void EDA_BASE_FRAME::OnMaximize( wxMaximizeEvent& aEvent )
|
||||
if( !IsMaximized() )
|
||||
#endif
|
||||
{
|
||||
m_NormalFrameSize = GetWindowSize();
|
||||
m_NormalFramePos = GetPosition();
|
||||
m_normalFrameSize = GetWindowSize();
|
||||
m_normalFramePos = GetPosition();
|
||||
wxLogTrace( traceDisplayLocation, "Maximizing window - Saving position (%d, %d) with size (%d, %d)",
|
||||
m_NormalFramePos.x, m_NormalFramePos.y, m_NormalFrameSize.x, m_NormalFrameSize.y );
|
||||
m_normalFramePos.x, m_normalFramePos.y, m_normalFrameSize.x, m_normalFrameSize.y );
|
||||
}
|
||||
|
||||
// Skip event to actually maximize the window
|
||||
|
@ -135,12 +135,12 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
|
||||
SetStatusWidths( arrayDim( dims ), dims );
|
||||
|
||||
// Create child subwindows.
|
||||
GetClientSize( &m_FrameSize.x, &m_FrameSize.y );
|
||||
m_FramePos.x = m_FramePos.y = 0;
|
||||
m_FrameSize.y -= m_msgFrameHeight;
|
||||
GetClientSize( &m_frameSize.x, &m_frameSize.y );
|
||||
m_framePos.x = m_framePos.y = 0;
|
||||
m_frameSize.y -= m_msgFrameHeight;
|
||||
|
||||
m_messagePanel = new EDA_MSG_PANEL( this, -1, wxPoint( 0, m_FrameSize.y ),
|
||||
wxSize( m_FrameSize.x, m_msgFrameHeight ) );
|
||||
m_messagePanel = new EDA_MSG_PANEL( this, -1, wxPoint( 0, m_frameSize.y ),
|
||||
wxSize( m_frameSize.x, m_msgFrameHeight ) );
|
||||
|
||||
m_messagePanel->SetBackgroundColour( COLOR4D( LIGHTGRAY ).ToColour() );
|
||||
}
|
||||
@ -460,7 +460,7 @@ void EDA_DRAW_FRAME::AddStandardSubMenus( TOOL_MENU& aToolMenu )
|
||||
}
|
||||
|
||||
|
||||
void EDA_DRAW_FRAME::InitExitKey()
|
||||
void EDA_DRAW_FRAME::initExitKey()
|
||||
{
|
||||
wxAcceleratorEntry entries[1];
|
||||
entries[0].Set( wxACCEL_CTRL, int( 'Q' ), wxID_EXIT );
|
||||
@ -504,7 +504,7 @@ void EDA_DRAW_FRAME::DisplayUnitsMsg()
|
||||
|
||||
void EDA_DRAW_FRAME::OnSize( wxSizeEvent& SizeEv )
|
||||
{
|
||||
m_FrameSize = GetClientSize( );
|
||||
m_frameSize = GetClientSize( );
|
||||
|
||||
SizeEv.Skip();
|
||||
}
|
||||
@ -659,7 +659,7 @@ void EDA_DRAW_FRAME::SwitchCanvas( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType )
|
||||
}
|
||||
|
||||
|
||||
EDA_DRAW_PANEL_GAL::GAL_TYPE EDA_DRAW_FRAME::LoadCanvasTypeSetting()
|
||||
EDA_DRAW_PANEL_GAL::GAL_TYPE EDA_DRAW_FRAME::loadCanvasTypeSetting()
|
||||
{
|
||||
#ifdef __WXMAC__
|
||||
// Cairo renderer doesn't handle Retina displays so there's really only one game
|
||||
@ -706,7 +706,7 @@ bool EDA_DRAW_FRAME::saveCanvasTypeSetting( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvas
|
||||
|
||||
for( unsigned ii = 0; ii < arrayDim( allowed_frames ); ii++ )
|
||||
{
|
||||
if( m_Ident == allowed_frames[ii] )
|
||||
if( m_ident == allowed_frames[ii] )
|
||||
{
|
||||
allow_save = true;
|
||||
break;
|
||||
@ -992,9 +992,9 @@ void EDA_DRAW_FRAME::GetUnitPair( EDA_UNITS& aPrimaryUnit, EDA_UNITS& aSecondary
|
||||
}
|
||||
|
||||
|
||||
void EDA_DRAW_FRAME::ResolveCanvasType()
|
||||
void EDA_DRAW_FRAME::resolveCanvasType()
|
||||
{
|
||||
m_canvasType = LoadCanvasTypeSetting();
|
||||
m_canvasType = loadCanvasTypeSetting();
|
||||
|
||||
// Nudge user to switch to OpenGL if they are on legacy or Cairo
|
||||
if( m_firstRunDialogSetting < 1 )
|
||||
|
@ -70,7 +70,7 @@ bool FILENAME_RESOLVER::Set3DConfigDir( const wxString& aConfigDir )
|
||||
if( !cfgdir.DirExists() )
|
||||
return false;
|
||||
|
||||
m_ConfigDir = cfgdir.GetPath();
|
||||
m_configDir = cfgdir.GetPath();
|
||||
createPathList();
|
||||
|
||||
return true;
|
||||
@ -96,22 +96,22 @@ bool FILENAME_RESOLVER::SetProject( PROJECT* aProject, bool* flgChanged )
|
||||
if( flgChanged )
|
||||
*flgChanged = false;
|
||||
|
||||
if( m_Paths.empty() )
|
||||
if( m_paths.empty() )
|
||||
{
|
||||
SEARCH_PATH al;
|
||||
al.m_alias = "${KIPRJMOD}";
|
||||
al.m_pathvar = "${KIPRJMOD}";
|
||||
al.m_pathexp = m_curProjDir;
|
||||
m_Paths.push_back( al );
|
||||
al.m_Alias = "${KIPRJMOD}";
|
||||
al.m_Pathvar = "${KIPRJMOD}";
|
||||
al.m_Pathexp = m_curProjDir;
|
||||
m_paths.push_back( al );
|
||||
|
||||
if( flgChanged )
|
||||
*flgChanged = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( m_Paths.front().m_pathexp.Cmp( m_curProjDir ) )
|
||||
if( m_paths.front().m_Pathexp.Cmp( m_curProjDir ) )
|
||||
{
|
||||
m_Paths.front().m_pathexp = m_curProjDir;
|
||||
m_paths.front().m_Pathexp = m_curProjDir;
|
||||
|
||||
if( flgChanged )
|
||||
*flgChanged = true;
|
||||
@ -127,7 +127,7 @@ bool FILENAME_RESOLVER::SetProject( PROJECT* aProject, bool* flgChanged )
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
ostr << " * [INFO] changed project dir to ";
|
||||
ostr << m_Paths.front().m_pathexp.ToUTF8();
|
||||
ostr << m_paths.front().m_Pathexp.ToUTF8();
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
}
|
||||
#endif
|
||||
@ -146,18 +146,18 @@ void FILENAME_RESOLVER::SetProgramBase( PGM_BASE* aBase )
|
||||
{
|
||||
m_pgm = aBase;
|
||||
|
||||
if( !m_pgm || m_Paths.empty() )
|
||||
if( !m_pgm || m_paths.empty() )
|
||||
return;
|
||||
|
||||
// recreate the path list
|
||||
m_Paths.clear();
|
||||
m_paths.clear();
|
||||
createPathList();
|
||||
}
|
||||
|
||||
|
||||
bool FILENAME_RESOLVER::createPathList()
|
||||
{
|
||||
if( !m_Paths.empty() )
|
||||
if( !m_paths.empty() )
|
||||
return true;
|
||||
|
||||
wxString kmod;
|
||||
@ -167,10 +167,10 @@ bool FILENAME_RESOLVER::createPathList()
|
||||
// the user may change this later with a call to SetProjectDir()
|
||||
|
||||
SEARCH_PATH lpath;
|
||||
lpath.m_alias = "${KIPRJMOD}";
|
||||
lpath.m_pathvar = "${KIPRJMOD}";
|
||||
lpath.m_pathexp = m_curProjDir;
|
||||
m_Paths.push_back( lpath );
|
||||
lpath.m_Alias = "${KIPRJMOD}";
|
||||
lpath.m_Pathvar = "${KIPRJMOD}";
|
||||
lpath.m_Pathexp = m_curProjDir;
|
||||
m_paths.push_back( lpath );
|
||||
wxFileName fndummy;
|
||||
wxUniChar psep = fndummy.GetPathSeparator();
|
||||
std::list< wxString > epaths;
|
||||
@ -183,39 +183,39 @@ bool FILENAME_RESOLVER::createPathList()
|
||||
|
||||
if( pathVal.empty() )
|
||||
{
|
||||
lpath.m_pathexp.clear();
|
||||
lpath.m_Pathexp.clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
fndummy.Assign( pathVal, "" );
|
||||
fndummy.Normalize();
|
||||
lpath.m_pathexp = fndummy.GetFullPath();
|
||||
lpath.m_Pathexp = fndummy.GetFullPath();
|
||||
}
|
||||
|
||||
lpath.m_alias = curr_path;
|
||||
lpath.m_pathvar = curr_path;
|
||||
lpath.m_Alias = curr_path;
|
||||
lpath.m_Pathvar = curr_path;
|
||||
|
||||
if( !lpath.m_pathexp.empty() && psep == *lpath.m_pathexp.rbegin() )
|
||||
lpath.m_pathexp.erase( --lpath.m_pathexp.end() );
|
||||
if( !lpath.m_Pathexp.empty() && psep == *lpath.m_Pathexp.rbegin() )
|
||||
lpath.m_Pathexp.erase( --lpath.m_Pathexp.end() );
|
||||
|
||||
m_Paths.push_back( lpath );
|
||||
m_paths.push_back( lpath );
|
||||
}
|
||||
}
|
||||
|
||||
if( !m_ConfigDir.empty() )
|
||||
if( !m_configDir.empty() )
|
||||
readPathList();
|
||||
|
||||
if( m_Paths.empty() )
|
||||
if( m_paths.empty() )
|
||||
return false;
|
||||
|
||||
#ifdef DEBUG
|
||||
wxLogTrace( MASK_3D_RESOLVER, " * [3D model] search paths:\n" );
|
||||
std::list< SEARCH_PATH >::const_iterator sPL = m_Paths.begin();
|
||||
std::list< SEARCH_PATH >::const_iterator sPL = m_paths.begin();
|
||||
|
||||
while( sPL != m_Paths.end() )
|
||||
while( sPL != m_paths.end() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_RESOLVER, " + %s : '%s'\n", (*sPL).m_alias.GetData(),
|
||||
(*sPL).m_pathexp.GetData() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, " + %s : '%s'\n", (*sPL).m_Alias.GetData(),
|
||||
(*sPL).m_Pathexp.GetData() );
|
||||
++sPL;
|
||||
}
|
||||
#endif
|
||||
@ -228,8 +228,8 @@ bool FILENAME_RESOLVER::UpdatePathList( std::vector< SEARCH_PATH >& aPathList )
|
||||
{
|
||||
wxUniChar envMarker( '$' );
|
||||
|
||||
while( !m_Paths.empty() && envMarker != *m_Paths.back().m_alias.rbegin() )
|
||||
m_Paths.pop_back();
|
||||
while( !m_paths.empty() && envMarker != *m_paths.back().m_Alias.rbegin() )
|
||||
m_paths.pop_back();
|
||||
|
||||
size_t nI = aPathList.size();
|
||||
|
||||
@ -247,7 +247,7 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
||||
if( aFileName.empty() )
|
||||
return wxEmptyString;
|
||||
|
||||
if( m_Paths.empty() )
|
||||
if( m_paths.empty() )
|
||||
createPathList();
|
||||
|
||||
// first attempt to use the name as specified:
|
||||
@ -316,8 +316,8 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
||||
// a. an aliased shortened name or
|
||||
// b. cannot be determined
|
||||
|
||||
std::list< SEARCH_PATH >::const_iterator sPL = m_Paths.begin();
|
||||
std::list< SEARCH_PATH >::const_iterator ePL = m_Paths.end();
|
||||
std::list< SEARCH_PATH >::const_iterator sPL = m_paths.begin();
|
||||
std::list< SEARCH_PATH >::const_iterator ePL = m_paths.end();
|
||||
|
||||
// check the path relative to the current project directory;
|
||||
// note: this is not necessarily the same as the current working
|
||||
@ -326,9 +326,9 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
||||
// This check is performed before checking the path relative to
|
||||
// ${KISYS3DMOD} so that users can potentially override a model
|
||||
// within ${KISYS3DMOD}
|
||||
if( !sPL->m_pathexp.empty() && !tname.StartsWith( ":" ) )
|
||||
if( !sPL->m_Pathexp.empty() && !tname.StartsWith( ":" ) )
|
||||
{
|
||||
tmpFN.Assign( sPL->m_pathexp, "" );
|
||||
tmpFN.Assign( sPL->m_Pathexp, "" );
|
||||
wxString fullPath = tmpFN.GetPathWithSep() + tname;
|
||||
|
||||
fullPath = ExpandEnvVarSubstitutions( fullPath, m_project );
|
||||
@ -362,7 +362,7 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
||||
}
|
||||
|
||||
// ${ENV_VAR} paths have already been checked; skip them
|
||||
while( sPL != ePL && ( sPL->m_alias.StartsWith( "${" ) || sPL->m_alias.StartsWith( "$(" ) ) )
|
||||
while( sPL != ePL && ( sPL->m_Alias.StartsWith( "${" ) || sPL->m_Alias.StartsWith( "$(" ) ) )
|
||||
++sPL;
|
||||
|
||||
// at this point the filename must contain an alias or else it is invalid
|
||||
@ -388,9 +388,9 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
||||
|
||||
while( sPL != ePL )
|
||||
{
|
||||
if( !sPL->m_alias.Cmp( alias ) && !sPL->m_pathexp.empty() )
|
||||
if( !sPL->m_Alias.Cmp( alias ) && !sPL->m_Pathexp.empty() )
|
||||
{
|
||||
wxFileName fpath( wxFileName::DirName( sPL->m_pathexp ) );
|
||||
wxFileName fpath( wxFileName::DirName( sPL->m_Pathexp ) );
|
||||
wxString fullPath = fpath.GetPathWithSep() + relpath;
|
||||
|
||||
fullPath = ExpandEnvVarSubstitutions( fullPath, m_project );
|
||||
@ -425,7 +425,7 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
||||
|
||||
bool FILENAME_RESOLVER::addPath( const SEARCH_PATH& aPath )
|
||||
{
|
||||
if( aPath.m_alias.empty() || aPath.m_pathvar.empty() )
|
||||
if( aPath.m_Alias.empty() || aPath.m_Pathvar.empty() )
|
||||
return false;
|
||||
|
||||
std::lock_guard<std::mutex> lock( mutex_resolver );
|
||||
@ -433,14 +433,14 @@ bool FILENAME_RESOLVER::addPath( const SEARCH_PATH& aPath )
|
||||
SEARCH_PATH tpath = aPath;
|
||||
|
||||
#ifdef _WIN32
|
||||
while( tpath.m_pathvar.EndsWith( wxT( "\\" ) ) )
|
||||
tpath.m_pathvar.erase( tpath.m_pathvar.length() - 1 );
|
||||
while( tpath.m_Pathvar.EndsWith( wxT( "\\" ) ) )
|
||||
tpath.m_pathvar.erase( tpath.m_Pathvar.length() - 1 );
|
||||
#else
|
||||
while( tpath.m_pathvar.EndsWith( wxT( "/" ) ) && tpath.m_pathvar.length() > 1 )
|
||||
tpath.m_pathvar.erase( tpath.m_pathvar.length() - 1 );
|
||||
while( tpath.m_Pathvar.EndsWith( wxT( "/" ) ) && tpath.m_Pathvar.length() > 1 )
|
||||
tpath.m_Pathvar.erase( tpath.m_Pathvar.length() - 1 );
|
||||
#endif
|
||||
|
||||
wxFileName path( ExpandEnvVarSubstitutions( tpath.m_pathvar, m_project ), "" );
|
||||
wxFileName path( ExpandEnvVarSubstitutions( tpath.m_Pathvar, m_project ), "" );
|
||||
|
||||
path.Normalize();
|
||||
|
||||
@ -448,45 +448,45 @@ bool FILENAME_RESOLVER::addPath( const SEARCH_PATH& aPath )
|
||||
{
|
||||
// suppress the message if the missing pathvar is the
|
||||
// legacy KISYS3DMOD variable
|
||||
if( aPath.m_pathvar.compare( wxT( "${KISYS3DMOD}" ) ) )
|
||||
if( aPath.m_Pathvar.compare( wxT( "${KISYS3DMOD}" ) ) )
|
||||
{
|
||||
wxString msg = _( "The given path does not exist" );
|
||||
msg.append( wxT( "\n" ) );
|
||||
msg.append( tpath.m_pathvar );
|
||||
msg.append( tpath.m_Pathvar );
|
||||
wxMessageBox( msg, _( "3D model search path" ) );
|
||||
}
|
||||
|
||||
tpath.m_pathexp.clear();
|
||||
tpath.m_Pathexp.clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
tpath.m_pathexp = path.GetFullPath();
|
||||
tpath.m_Pathexp = path.GetFullPath();
|
||||
|
||||
#ifdef _WIN32
|
||||
while( tpath.m_pathexp.EndsWith( wxT( "\\" ) ) )
|
||||
tpath.m_pathexp.erase( tpath.m_pathexp.length() - 1 );
|
||||
#else
|
||||
while( tpath.m_pathexp.EndsWith( wxT( "/" ) ) && tpath.m_pathexp.length() > 1 )
|
||||
tpath.m_pathexp.erase( tpath.m_pathexp.length() - 1 );
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
while( tpath.m_Pathexp.EndsWith( wxT( "\\" ) ) )
|
||||
tpath.m_Pathexp.erase( tpath.m_Pathexp.length() - 1 );
|
||||
#else
|
||||
while( tpath.m_Pathexp.EndsWith( wxT( "/" ) ) && tpath.m_Pathexp.length() > 1 )
|
||||
tpath.m_Pathexp.erase( tpath.m_Pathexp.length() - 1 );
|
||||
#endif
|
||||
}
|
||||
|
||||
wxString pname = path.GetPath();
|
||||
std::list< SEARCH_PATH >::iterator sPL = m_Paths.begin();
|
||||
std::list< SEARCH_PATH >::iterator ePL = m_Paths.end();
|
||||
std::list< SEARCH_PATH >::iterator sPL = m_paths.begin();
|
||||
std::list< SEARCH_PATH >::iterator ePL = m_paths.end();
|
||||
|
||||
while( sPL != ePL )
|
||||
{
|
||||
if( !tpath.m_alias.Cmp( sPL->m_alias ) )
|
||||
if( !tpath.m_Alias.Cmp( sPL->m_Alias ) )
|
||||
{
|
||||
wxString msg = _( "Alias: " );
|
||||
msg.append( tpath.m_alias );
|
||||
msg.append( tpath.m_Alias );
|
||||
msg.append( wxT( "\n" ) );
|
||||
msg.append( _( "This path:" ) + wxS( " " ) );
|
||||
msg.append( tpath.m_pathvar );
|
||||
msg.append( tpath.m_Pathvar );
|
||||
msg.append( wxT( "\n" ) );
|
||||
msg.append( _( "Existing path:" ) + wxS( " " ) );
|
||||
msg.append( sPL->m_pathvar );
|
||||
msg.append( sPL->m_Pathvar );
|
||||
wxMessageBox( msg, _( "Bad alias (duplicate name)" ) );
|
||||
|
||||
return false;
|
||||
@ -495,14 +495,14 @@ bool FILENAME_RESOLVER::addPath( const SEARCH_PATH& aPath )
|
||||
++sPL;
|
||||
}
|
||||
|
||||
m_Paths.push_back( tpath );
|
||||
m_paths.push_back( tpath );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool FILENAME_RESOLVER::readPathList()
|
||||
{
|
||||
if( m_ConfigDir.empty() )
|
||||
if( m_configDir.empty() )
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
@ -512,11 +512,11 @@ bool FILENAME_RESOLVER::readPathList()
|
||||
return false;
|
||||
}
|
||||
|
||||
wxFileName cfgpath( m_ConfigDir, RESOLVER_CONFIG );
|
||||
wxFileName cfgpath( m_configDir, RESOLVER_CONFIG );
|
||||
cfgpath.Normalize();
|
||||
wxString cfgname = cfgpath.GetFullPath();
|
||||
|
||||
size_t nitems = m_Paths.size();
|
||||
size_t nitems = m_paths.size();
|
||||
|
||||
std::ifstream cfgFile;
|
||||
std::string cfgLine;
|
||||
@ -578,17 +578,17 @@ bool FILENAME_RESOLVER::readPathList()
|
||||
|
||||
idx = 0;
|
||||
|
||||
if( !getHollerith( cfgLine, idx, al.m_alias ) )
|
||||
if( !getHollerith( cfgLine, idx, al.m_Alias ) )
|
||||
continue;
|
||||
|
||||
// never add on KISYS3DMOD from a config file
|
||||
if( !al.m_alias.Cmp( wxT( "KISYS3DMOD" ) ) )
|
||||
if( !al.m_Alias.Cmp( wxT( "KISYS3DMOD" ) ) )
|
||||
continue;
|
||||
|
||||
if( !getHollerith( cfgLine, idx, al.m_pathvar ) )
|
||||
if( !getHollerith( cfgLine, idx, al.m_Pathvar ) )
|
||||
continue;
|
||||
|
||||
if( !getHollerith( cfgLine, idx, al.m_description ) )
|
||||
if( !getHollerith( cfgLine, idx, al.m_Description ) )
|
||||
continue;
|
||||
|
||||
addPath( al );
|
||||
@ -599,13 +599,13 @@ bool FILENAME_RESOLVER::readPathList()
|
||||
if( vnum < CFGFILE_VERSION )
|
||||
writePathList();
|
||||
|
||||
return( m_Paths.size() != nitems );
|
||||
return( m_paths.size() != nitems );
|
||||
}
|
||||
|
||||
|
||||
bool FILENAME_RESOLVER::writePathList()
|
||||
{
|
||||
if( m_ConfigDir.empty() )
|
||||
if( m_configDir.empty() )
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
@ -618,13 +618,13 @@ bool FILENAME_RESOLVER::writePathList()
|
||||
}
|
||||
|
||||
// skip all ${ENV_VAR} alias names
|
||||
std::list< SEARCH_PATH >::const_iterator sPL = m_Paths.begin();
|
||||
std::list< SEARCH_PATH >::const_iterator sPL = m_paths.begin();
|
||||
|
||||
while( sPL != m_Paths.end() &&
|
||||
( sPL->m_alias.StartsWith( "${" ) || sPL->m_alias.StartsWith( "$(" ) ) )
|
||||
while( sPL != m_paths.end() &&
|
||||
( sPL->m_Alias.StartsWith( "${" ) || sPL->m_Alias.StartsWith( "$(" ) ) )
|
||||
++sPL;
|
||||
|
||||
wxFileName cfgpath( m_ConfigDir, RESOLVER_CONFIG );
|
||||
wxFileName cfgpath( m_configDir, RESOLVER_CONFIG );
|
||||
wxString cfgname = cfgpath.GetFullPath();
|
||||
std::ofstream cfgFile;
|
||||
|
||||
@ -645,13 +645,13 @@ bool FILENAME_RESOLVER::writePathList()
|
||||
cfgFile << "#V" << CFGFILE_VERSION << "\n";
|
||||
std::string tstr;
|
||||
|
||||
while( sPL != m_Paths.end() )
|
||||
while( sPL != m_paths.end() )
|
||||
{
|
||||
tstr = sPL->m_alias.ToUTF8();
|
||||
tstr = sPL->m_Alias.ToUTF8();
|
||||
cfgFile << "\"" << tstr.size() << ":" << tstr << "\",";
|
||||
tstr = sPL->m_pathvar.ToUTF8();
|
||||
tstr = sPL->m_Pathvar.ToUTF8();
|
||||
cfgFile << "\"" << tstr.size() << ":" << tstr << "\",";
|
||||
tstr = sPL->m_description.ToUTF8();
|
||||
tstr = sPL->m_Description.ToUTF8();
|
||||
cfgFile << "\"" << tstr.size() << ":" << tstr << "\"\n";
|
||||
++sPL;
|
||||
}
|
||||
@ -694,24 +694,24 @@ void FILENAME_RESOLVER::checkEnvVarPath( const wxString& aPath )
|
||||
|
||||
// check if the alias exists; if not then add it to the end of the
|
||||
// env var section of the path list
|
||||
auto sPL = m_Paths.begin();
|
||||
auto ePL = m_Paths.end();
|
||||
auto sPL = m_paths.begin();
|
||||
auto ePL = m_paths.end();
|
||||
|
||||
while( sPL != ePL )
|
||||
{
|
||||
if( sPL->m_alias == envar )
|
||||
if( sPL->m_Alias == envar )
|
||||
return;
|
||||
|
||||
if( !sPL->m_alias.StartsWith( "${" ) )
|
||||
if( !sPL->m_Alias.StartsWith( "${" ) )
|
||||
break;
|
||||
|
||||
++sPL;
|
||||
}
|
||||
|
||||
SEARCH_PATH lpath;
|
||||
lpath.m_alias = envar;
|
||||
lpath.m_pathvar = lpath.m_alias;
|
||||
wxFileName tmpFN( ExpandEnvVarSubstitutions( lpath.m_alias, m_project ), "" );
|
||||
lpath.m_Alias = envar;
|
||||
lpath.m_Pathvar = lpath.m_Alias;
|
||||
wxFileName tmpFN( ExpandEnvVarSubstitutions( lpath.m_Alias, m_project ), "" );
|
||||
|
||||
wxUniChar psep = tmpFN.GetPathSeparator();
|
||||
tmpFN.Normalize();
|
||||
@ -719,15 +719,15 @@ void FILENAME_RESOLVER::checkEnvVarPath( const wxString& aPath )
|
||||
if( !tmpFN.DirExists() )
|
||||
return;
|
||||
|
||||
lpath.m_pathexp = tmpFN.GetFullPath();
|
||||
lpath.m_Pathexp = tmpFN.GetFullPath();
|
||||
|
||||
if( !lpath.m_pathexp.empty() && psep == *lpath.m_pathexp.rbegin() )
|
||||
lpath.m_pathexp.erase( --lpath.m_pathexp.end() );
|
||||
if( !lpath.m_Pathexp.empty() && psep == *lpath.m_Pathexp.rbegin() )
|
||||
lpath.m_Pathexp.erase( --lpath.m_Pathexp.end() );
|
||||
|
||||
if( lpath.m_pathexp.empty() )
|
||||
if( lpath.m_Pathexp.empty() )
|
||||
return;
|
||||
|
||||
m_Paths.insert( sPL, lpath );
|
||||
m_paths.insert( sPL, lpath );
|
||||
}
|
||||
|
||||
|
||||
@ -735,19 +735,19 @@ wxString FILENAME_RESOLVER::ShortenPath( const wxString& aFullPathName )
|
||||
{
|
||||
wxString fname = aFullPathName;
|
||||
|
||||
if( m_Paths.empty() )
|
||||
if( m_paths.empty() )
|
||||
createPathList();
|
||||
|
||||
std::lock_guard<std::mutex> lock( mutex_resolver );
|
||||
|
||||
std::list< SEARCH_PATH >::const_iterator sL = m_Paths.begin();
|
||||
std::list< SEARCH_PATH >::const_iterator sL = m_paths.begin();
|
||||
size_t idx;
|
||||
|
||||
while( sL != m_Paths.end() )
|
||||
while( sL != m_paths.end() )
|
||||
{
|
||||
// undefined paths do not participate in the
|
||||
// file name shortening procedure
|
||||
if( sL->m_pathexp.empty() )
|
||||
if( sL->m_Pathexp.empty() )
|
||||
{
|
||||
++sL;
|
||||
continue;
|
||||
@ -756,9 +756,9 @@ wxString FILENAME_RESOLVER::ShortenPath( const wxString& aFullPathName )
|
||||
wxFileName fpath;
|
||||
|
||||
// in the case of aliases, ensure that we use the most recent definition
|
||||
if( sL->m_alias.StartsWith( "${" ) || sL->m_alias.StartsWith( "$(" ) )
|
||||
if( sL->m_Alias.StartsWith( "${" ) || sL->m_Alias.StartsWith( "$(" ) )
|
||||
{
|
||||
wxString tpath = ExpandEnvVarSubstitutions( sL->m_alias, m_project );
|
||||
wxString tpath = ExpandEnvVarSubstitutions( sL->m_Alias, m_project );
|
||||
|
||||
if( tpath.empty() )
|
||||
{
|
||||
@ -770,7 +770,7 @@ wxString FILENAME_RESOLVER::ShortenPath( const wxString& aFullPathName )
|
||||
}
|
||||
else
|
||||
{
|
||||
fpath.Assign( sL->m_pathexp, wxT( "" ) );
|
||||
fpath.Assign( sL->m_Pathexp, wxT( "" ) );
|
||||
}
|
||||
|
||||
wxString fps = fpath.GetPathWithSep();
|
||||
@ -787,10 +787,10 @@ wxString FILENAME_RESOLVER::ShortenPath( const wxString& aFullPathName )
|
||||
fname.Replace( wxT( "\\" ), wxT( "/" ) );
|
||||
#endif
|
||||
|
||||
if( sL->m_alias.StartsWith( "${" ) || sL->m_alias.StartsWith( "$(" ) )
|
||||
if( sL->m_Alias.StartsWith( "${" ) || sL->m_Alias.StartsWith( "$(" ) )
|
||||
{
|
||||
// old style ENV_VAR
|
||||
tname = sL->m_alias;
|
||||
tname = sL->m_Alias;
|
||||
tname.Append( "/" );
|
||||
tname.append( fname );
|
||||
}
|
||||
@ -798,7 +798,7 @@ wxString FILENAME_RESOLVER::ShortenPath( const wxString& aFullPathName )
|
||||
{
|
||||
// new style alias
|
||||
tname = ":";
|
||||
tname.append( sL->m_alias );
|
||||
tname.append( sL->m_Alias );
|
||||
tname.append( ":" );
|
||||
tname.append( fname );
|
||||
}
|
||||
@ -824,7 +824,7 @@ wxString FILENAME_RESOLVER::ShortenPath( const wxString& aFullPathName )
|
||||
|
||||
const std::list< SEARCH_PATH >* FILENAME_RESOLVER::GetPaths()
|
||||
{
|
||||
return &m_Paths;
|
||||
return &m_paths;
|
||||
}
|
||||
|
||||
|
||||
|
@ -182,7 +182,7 @@ void FOOTPRINT_ASYNC_LOADER::Start( FP_LIB_TABLE* aTable, wxString const* aNickn
|
||||
aTable->Format( &sof, 0 );
|
||||
m_last_table = sof.GetString();
|
||||
|
||||
m_list->StartWorkers( aTable, aNickname, this, aNThreads );
|
||||
m_list->startWorkers( aTable, aNickname, this, aNThreads );
|
||||
}
|
||||
|
||||
|
||||
@ -190,7 +190,7 @@ bool FOOTPRINT_ASYNC_LOADER::Join()
|
||||
{
|
||||
if( m_list )
|
||||
{
|
||||
bool rv = m_list->JoinWorkers();
|
||||
bool rv = m_list->joinWorkers();
|
||||
m_list = nullptr;
|
||||
return rv;
|
||||
}
|
||||
@ -203,7 +203,7 @@ void FOOTPRINT_ASYNC_LOADER::Abort()
|
||||
{
|
||||
if( m_list )
|
||||
{
|
||||
m_list->StopWorkers();
|
||||
m_list->stopWorkers();
|
||||
m_list = nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ void PAGED_DIALOG::finishInitialization()
|
||||
m_treebook->Fit();
|
||||
m_treebook->Layout();
|
||||
|
||||
FinishDialogSettings();
|
||||
finishDialogSettings();
|
||||
}
|
||||
|
||||
|
||||
|
@ -70,7 +70,7 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||
m_tcFilterString = NULL;
|
||||
m_FootprintsList = FOOTPRINT_LIST::GetInstance( Kiway() );
|
||||
m_initialized = false;
|
||||
m_AboutTitle = "CvPcb";
|
||||
m_aboutTitle = "CvPcb";
|
||||
|
||||
// Give an icon
|
||||
wxIcon icon;
|
||||
@ -97,14 +97,14 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||
|
||||
m_auimgr.AddPane( m_libListBox, EDA_PANE().Palette().Name( "Libraries" ).Left().Layer(1)
|
||||
.Caption( _( "Footprint Libraries" ) )
|
||||
.BestSize( (int) ( m_FrameSize.x * 0.20 ), m_FrameSize.y ) );
|
||||
.BestSize((int) ( m_frameSize.x * 0.20 ), m_frameSize.y ) );
|
||||
|
||||
m_auimgr.AddPane( m_compListBox, EDA_PANE().Palette().Name( "Components" ).Center().Layer(0)
|
||||
.Caption( _( "Symbol : Footprint Assignments" ) ) );
|
||||
|
||||
m_auimgr.AddPane( m_footprintListBox, EDA_PANE().Palette().Name( "Footprints" ).Right().Layer(1)
|
||||
.Caption( _( "Filtered Footprints" ) )
|
||||
.BestSize( (int) ( m_FrameSize.x * 0.30 ), m_FrameSize.y ) );
|
||||
.BestSize((int) ( m_frameSize.x * 0.30 ), m_frameSize.y ) );
|
||||
|
||||
// Build the bottom panel, to display 2 status texts and the buttons:
|
||||
auto bottomPanel = new wxPanel( this );
|
||||
|
@ -82,7 +82,7 @@ DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( KIWAY* aKiway, wxWindow* aPa
|
||||
SetScreen( new PCB_SCREEN( GetPageSizeIU() ) );
|
||||
|
||||
// Create GAL canvas before loading settings
|
||||
auto* gal_drawPanel = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize,
|
||||
auto* gal_drawPanel = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_frameSize,
|
||||
GetGalDisplayOptions(),
|
||||
EDA_DRAW_PANEL_GAL::GAL_FALLBACK );
|
||||
SetCanvas( gal_drawPanel );
|
||||
|
@ -578,7 +578,7 @@ void SCH_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail )
|
||||
STRING_FORMATTER formatter;
|
||||
|
||||
// TODO remove once real-time connectivity is a given
|
||||
if( !ADVANCED_CFG::GetCfg().m_realTimeConnectivity || !CONNECTION_GRAPH::m_allowRealTime )
|
||||
if( !ADVANCED_CFG::GetCfg().m_RealTimeConnectivity || !CONNECTION_GRAPH::m_allowRealTime )
|
||||
// Ensure the netlist data is up to date:
|
||||
RecalculateConnections( NO_CLEANUP );
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user