void WinEDA_GerberFrame::Process_Config(wxCommandEvent& event) /*************************************************************/ { int id = event.GetId(); wxPoint pos; pos = GetPosition(); pos.x += 20; pos.y += 20; switch( id ) { case ID_COLORS_SETUP : DisplayColorSetupFrame(this, pos); break; case ID_CONFIG_REQ : // Creation de la fenetre de configuration { InstallConfigFrame(pos); break; } case ID_PCB_TRACK_SIZE_SETUP: case ID_PCB_LOOK_SETUP: case ID_OPTIONS_SETUP: InstallPcbOptionsFrame(pos, id); break; case ID_CONFIG_SAVE: Update_config(); break; default: DisplayError(this, wxT("WinEDA_GerberFrame::Process_Config internal error")); } }
void WinEDA_PcbFrame::Process_Config(wxCommandEvent& event) /***********************************************************/ { int id = event.GetId(); wxPoint pos; wxClientDC dc(DrawPanel); DrawPanel->PrepareGraphicContext(&dc); pos = GetPosition(); pos.x += 20; pos.y += 20; switch( id ) { case ID_COLORS_SETUP : DisplayColorSetupFrame(this, pos); break; case ID_CONFIG_REQ : // Creation de la fenetre de configuration { InstallConfigFrame(pos); break; } case ID_PCB_TRACK_SIZE_SETUP: case ID_PCB_LOOK_SETUP: case ID_OPTIONS_SETUP: case ID_PCB_DRAWINGS_WIDTHS_SETUP: InstallPcbOptionsFrame(pos, &dc, id); break; case ID_PCB_PAD_SETUP: InstallPadOptionsFrame( NULL, NULL, pos); break; case ID_CONFIG_SAVE: Update_config(this); break; case ID_CONFIG_READ: { wxString FullFileName = GetScreen()->m_FileName.AfterLast('/'); ChangeFileNameExt(FullFileName, g_Prj_Config_Filename_ext); FullFileName = EDA_FileSelector(_("Read config file"), wxPathOnly(GetScreen()->m_FileName),/* Chemin par defaut */ FullFileName, /* nom fichier par defaut */ g_Prj_Config_Filename_ext, /* extension par defaut */ FullFileName, /* Masque d'affichage */ this, wxOPEN, TRUE /* ne change pas de repertoire courant */ ); if ( FullFileName == "") break; if ( ! wxFileExists(FullFileName) ) { wxString msg; msg.Printf(_("File %s not found"), FullFileName.GetData()); DisplayError(this, msg); break; } Read_Config(FullFileName ); } break; default: DisplayError(this, "WinEDA_PcbFrame::Process_Config internal error"); } }
void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) { int id = event.GetId(); wxFileName fn; switch( id ) { case ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG: m_show_layer_manager_tools = ! m_show_layer_manager_tools; m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( m_show_layer_manager_tools ); m_auimgr.Update(); GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG, m_show_layer_manager_tools ? _("Hide &Layers Manager" ) : _("Show &Layers Manager" )); break; case ID_PCB_LAYERS_SETUP: InstallDialogLayerSetup(); break; case ID_CONFIG_REQ: InstallConfigFrame(); break; case ID_PCB_MASK_CLEARANCE: { DIALOG_PADS_MASK_CLEARANCE dlg( this ); dlg.ShowModal(); } break; case wxID_PREFERENCES: { Dialog_GeneralOptions dlg( this ); dlg.ShowModal(); } break; case ID_PCB_PAD_SETUP: InstallPadOptionsFrame( NULL ); break; case ID_CONFIG_SAVE: SaveProjectSettings(); break; case ID_CONFIG_READ: { fn = GetScreen()->GetFileName(); fn.SetExt( ProjectFileExtension ); wxFileDialog dlg( this, _( "Read Project File" ), fn.GetPath(), fn.GetFullName(), ProjectFileWildcard, wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_CHANGE_DIR ); if( dlg.ShowModal() == wxID_CANCEL ) break; if( !wxFileExists( dlg.GetPath() ) ) { wxString msg; msg.Printf( _( "File %s not found" ), GetChars( dlg.GetPath() ) ); DisplayError( this, msg ); break; } LoadProjectSettings( dlg.GetPath() ); } break; // Hotkey IDs case ID_PREFERENCES_HOTKEY_EXPORT_CONFIG: ExportHotkeyConfigToFile( g_Board_Editor_Hokeys_Descr ); break; case ID_PREFERENCES_HOTKEY_IMPORT_CONFIG: ImportHotkeyConfigFromFile( g_Board_Editor_Hokeys_Descr ); break; case ID_PREFERENCES_HOTKEY_SHOW_EDITOR: InstallHotkeyFrame( this, g_Board_Editor_Hokeys_Descr ); break; case ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST: // Display current hotkey list for Pcbnew. DisplayHotkeyList( this, g_Board_Editor_Hokeys_Descr ); break; // Macros IDs case ID_PREFRENCES_MACROS_SAVE: SaveMacros(); break; case ID_PREFRENCES_MACROS_READ: ReadMacros(); break; default: DisplayError( this, wxT( "PCB_EDIT_FRAME::Process_Config error" ) ); } }