Commit 1a139a7f authored by stambaughw's avatar stambaughw

More comment translation and capitalization fixes.

parent 0acb404f
/***********************************************************************/
/* menubarmodedit.cpp - creation du menu general de l'editeur de module*/
/***********************************************************************/
/************************************************/
/* menubarmodedit.cpp - Module editor menu bar. */
/************************************************/
#include "fctsys.h"
#include "common.h"
......@@ -13,80 +13,74 @@
#include "pcbnew_id.h"
/***********************************************/
void WinEDA_ModuleEditFrame::ReCreateMenuBar()
/***********************************************/
/* Cree ou reinitialise le menu du haut d'ecran
*/
{
wxMenuBar * menuBar = GetMenuBar();
wxMenuItem * item;
if( ! menuBar )
{
menuBar = new wxMenuBar();
/////////////////////////////
// Ajustage de dimensions: //
/////////////////////////////
wxMenu * sizes_menu = new wxMenu;
item = new wxMenuItem(sizes_menu, ID_PCB_DRAWINGS_WIDTHS_SETUP,
_("Sizes and Widths"),
_("Adjust width for texts and drawings"));
item->SetBitmap(options_text_xpm);
sizes_menu->Append(item);
item = new wxMenuItem(sizes_menu, ID_PCB_PAD_SETUP, _("Pad Settings"),
_("Adjust size,shape,layers... for Pads"));
item->SetBitmap(pad_xpm);
sizes_menu->Append(item);
item = new wxMenuItem(sizes_menu, ID_PCB_USER_GRID_SETUP, _("User Grid Size"),
_("Adjust User Grid"));
item->SetBitmap(grid_xpm);
sizes_menu->Append(item);
////////////////
// Menu Help: //
////////////////
wxMenu *helpMenu = new wxMenu;
// Contents
item = new wxMenuItem(helpMenu ,
ID_GENERAL_HELP,
_("&Contents"), // Menu entry name
_("Open the pcbnew manual")); // Statusbar message
item->SetBitmap(help_xpm);
helpMenu->Append(item);
// About pcbnew
item = new wxMenuItem(helpMenu ,
ID_KICAD_ABOUT,
_("&About pcbnew"), // Menu entry name
_("About pcbnew PCB designer")); // Statusbar message
item->SetBitmap(info_xpm);
helpMenu->Append(item);
//////////////////////
// Menu Display 3D: //
//////////////////////
wxMenu *Display3DMenu = new wxMenu;
item = new wxMenuItem(Display3DMenu , ID_MENU_PCB_SHOW_3D_FRAME, _("3D Display"), _("Show board in 3D viewer"));
item->SetBitmap(show_3d_xpm);
Display3DMenu->Append(item);
menuBar->Append(sizes_menu, _("&Dimensions"));
menuBar->Append(Display3DMenu, _("&3D Display"));
menuBar->Append(helpMenu, _("&Help"));
// Associate the menu bar with the frame
SetMenuBar(menuBar);
}
wxMenuBar* menuBar = GetMenuBar();
wxMenuItem* item;
if( !menuBar )
{
menuBar = new wxMenuBar();
wxMenu* sizes_menu = new wxMenu;
item = new wxMenuItem( sizes_menu, ID_PCB_DRAWINGS_WIDTHS_SETUP,
_( "Sizes and Widths" ),
_( "Adjust width for texts and drawings" ) );
item->SetBitmap( options_text_xpm );
sizes_menu->Append( item );
item = new wxMenuItem( sizes_menu, ID_PCB_PAD_SETUP, _( "Pad Settings" ),
_( "Adjust size, shape, layers... for pads" ) );
item->SetBitmap( pad_xpm );
sizes_menu->Append( item );
item =
new wxMenuItem( sizes_menu, ID_PCB_USER_GRID_SETUP,
_( "User Grid Size" ),
_( "Adjust user grid" ) );
item->SetBitmap( grid_xpm );
sizes_menu->Append( item );
////////////////
// Menu Help: //
////////////////
wxMenu* helpMenu = new wxMenu;
// Contents
item = new wxMenuItem( helpMenu,
ID_GENERAL_HELP,
_( "&Contents" ),
_( "Open the pcbnew manual" ) );
item->SetBitmap( help_xpm );
helpMenu->Append( item );
// About pcbnew
item = new wxMenuItem( helpMenu,
ID_KICAD_ABOUT,
_( "&About pcbnew" ),
_( "About pcbnew PCB designer" ) );
item->SetBitmap( info_xpm );
helpMenu->Append( item );
//////////////////////
// Menu Display 3D: //
//////////////////////
wxMenu* Display3DMenu = new wxMenu;
item = new wxMenuItem( Display3DMenu,
ID_MENU_PCB_SHOW_3D_FRAME,
_( "3D Display" ),
_( "Show board in 3D viewer" ) );
item->SetBitmap( show_3d_xpm );
Display3DMenu->Append( item );
menuBar->Append( sizes_menu, _( "&Dimensions" ) );
menuBar->Append( Display3DMenu, _( "&3D Display" ) );
menuBar->Append( helpMenu, _( "&Help" ) );
// Associate the menu bar with the frame
SetMenuBar( menuBar );
}
}
/******************************************************************/
/* menubarpcb.cpp - creation du menu general de l'editeur de board*/
/******************************************************************/
/*****************************************/
/* menubarpcb.cpp - PCB editor menu bar. */
/*****************************************/
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "common.h"
......@@ -11,12 +11,8 @@
#include "hotkeys.h"
#include "pcbnew_id.h"
/***********************************************/
void WinEDA_PcbFrame::ReCreateMenuBar()
/***********************************************/
/* Cree ou reinitialise le menu du haut d'ecran
*/
void WinEDA_PcbFrame::ReCreateMenuBar()
{
wxMenuItem* item;
wxMenuBar* menuBar = GetMenuBar();
......@@ -62,7 +58,8 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
// Add save menu
filesMenu->AppendSeparator();
item = new wxMenuItem( filesMenu, ID_SAVE_BOARD,
_( "&Save Board\tCtrl-S" ), _( "Save current board" ) );
_( "&Save Board\tCtrl-S" ),
_( "Save current board" ) );
item->SetBitmap( save_xpm );
filesMenu->Append( item );
......@@ -86,7 +83,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
// Add plot menu
item = new wxMenuItem( filesMenu, ID_GEN_PLOT, _( "&Plot" ),
_( "Plot (HPGL, PostScript, or Gerber format)" ) );
_( "Plot (HPGL, PostScript, or Gerber format)" ) );
item->SetBitmap( plot_xpm );
filesMenu->Append( item );
......@@ -96,7 +93,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
item = new wxMenuItem( submenuexport, ID_GEN_EXPORT_SPECCTRA,
_( "&Specctra DSN" ),
_( "Export the current board to a \"Specctra DSN\" file" ) );
_( "Export the current board to a \"Specctra DSN\" file" ) );
item->SetBitmap( export_xpm );
submenuexport->Append( item );
......@@ -125,7 +122,8 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
item->SetBitmap( import_xpm ); // @todo need better bitmap
submenuImport->Append( item );
/* would be implemented in WinEDA_PcbFrame::ImportSpecctraDesign() in specctra_import.cpp
/* would be implemented in WinEDA_PcbFrame::ImportSpecctraDesign() in
* specctra_import.cpp
* item = new wxMenuItem(submenuImport, ID_GEN_IMPORT_SPECCTRA_DESIGN,
* _("&Specctra Design"), _("Import a \"Specctra Design\" (*.dsn) file") );
* item->SetBitmap(export_xpm); // @todo need better bitmap
......@@ -167,7 +165,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
wxGetApp().m_fileHistory.AddFilesToMenu( filesMenu );
///////////////////////////////////
// Preferences an configuration //
// Preferences and configuration //
///////////////////////////////////
wxMenu* configmenu = new wxMenu;
item = new wxMenuItem( configmenu, ID_CONFIG_REQ, _( "&Library" ),
......@@ -175,8 +173,9 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
item->SetBitmap( library_xpm );
configmenu->Append( item );
item = new wxMenuItem( configmenu, ID_COLORS_SETUP, _( "&Colors and Visibility" ),
_( "Select colors and visibilty of layers and some items" ) );
item = new wxMenuItem( configmenu, ID_COLORS_SETUP,
_( "&Colors and Visibility" ),
_( "Select colors and visibility of layers and some items" ) );
item->SetBitmap( palette_xpm );
configmenu->Append( item );
......@@ -185,7 +184,8 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
item->SetBitmap( preference_xpm );
configmenu->Append( item );
item = new wxMenuItem( configmenu, ID_PCB_DISPLAY_OPTIONS_SETUP, _( "&Display" ),
item = new wxMenuItem( configmenu, ID_PCB_DISPLAY_OPTIONS_SETUP,
_( "&Display" ),
_( "Select how items (pads, tracks texts ... ) are displayed" ) );
item->SetBitmap( display_options_xpm );
configmenu->Append( item );
......@@ -206,13 +206,13 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
configmenu->Append( item );
////////////////////////////////////////////////////////////
// Add access to the Design Rules Dialog and layers setup //
////////////////////////////////////////////////////////////
wxMenu* designRulesMenu = new wxMenu;
item = new wxMenuItem( designRulesMenu, ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG,
_( "Design Rules" ), _( "Open the design rules dialog editor" ) );
_( "Design Rules" ),
_( "Open the design rules dialog editor" ) );
item->SetBitmap( hammer_xpm );
designRulesMenu->Append( item );
......@@ -255,9 +255,6 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
item->SetBitmap( save_xpm );
sizes_menu->Append( item );
//////////////////////////////////////////////////////////////////
// Menu postprocess ( generation fichiers percage, placement... //
//////////////////////////////////////////////////////////////////
wxMenu* postprocess_menu = new wxMenu;
item = new wxMenuItem( postprocess_menu, ID_PCB_GEN_POS_MODULES_FILE,
_( "Generate &Modules Position" ),
......@@ -283,9 +280,6 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
item->SetBitmap( tools_xpm );
postprocess_menu->Append( item );
//////////////////////////
// Menu d'outils divers //
//////////////////////////
wxMenu* miscellaneous_menu = new wxMenu;
item = new wxMenuItem( miscellaneous_menu, ID_PCB_GLOBAL_DELETE,
_( "Global &Deletions" ),
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*******************************************************/
/* PCBNEW - Gestion des Options et Reglages de modeedit*/
/*******************************************************/
/* Fichier modeditoptions.cpp */
/*
Affichage et modifications des parametres de travail de Modedit
*/
/***********************************************/
/* PCBNEW - Footprint (module) editor options. */
/***********************************************/
#include "fctsys.h"
#include "common.h"
......@@ -21,70 +15,68 @@
#include "protos.h"
/***********************************************************************/
void WinEDA_ModuleEditFrame::OnSelectOptionToolbar(wxCommandEvent& event)
/***********************************************************************/
void WinEDA_ModuleEditFrame::OnSelectOptionToolbar( wxCommandEvent& event )
{
int id = event.GetId();
wxClientDC dc(DrawPanel);
DrawPanel->CursorOff( &dc);
DrawPanel->PrepareGraphicContext(&dc);
switch ( id )
{
case ID_TB_OPTIONS_SHOW_GRID:
m_Draw_Grid = m_OptionsToolBar->GetToolState(id);
DrawPanel->ReDraw(&dc, TRUE);
break;
case ID_TB_OPTIONS_SELECT_UNIT_MM:
g_UnitMetric = MILLIMETRE;
case ID_TB_OPTIONS_SELECT_UNIT_INCH:
if ( id == ID_TB_OPTIONS_SELECT_UNIT_INCH )
g_UnitMetric = INCHES;
UpdateStatusBar(); /* Reaffichage des coord curseur */
ReCreateAuxiliaryToolbar();
break;
case ID_TB_OPTIONS_SHOW_POLAR_COORD:
Affiche_Message(wxEmptyString);
DisplayOpt.DisplayPolarCood = m_OptionsToolBar->GetToolState(id);
UpdateStatusBar(); /* Reaffichage des coord curseur */
break;
case ID_TB_OPTIONS_SELECT_CURSOR:
m_CursorShape = m_OptionsToolBar->GetToolState(id);
break;
case ID_TB_OPTIONS_SHOW_PADS_SKETCH:
m_DisplayPadFill = ! m_OptionsToolBar->GetToolState(id);
DrawPanel->ReDraw(&dc, TRUE);
break;
case ID_TB_OPTIONS_SHOW_VIAS_SKETCH:
m_DisplayViaFill = ! m_OptionsToolBar->GetToolState(id);
DrawPanel->ReDraw(&dc, TRUE);
break;
case ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH:
m_DisplayModText =
m_OptionsToolBar->GetToolState(id) ? SKETCH : FILLED;
DrawPanel->ReDraw(&dc, TRUE);
break;
case ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH:
m_DisplayModEdge =
m_OptionsToolBar->GetToolState(id) ? SKETCH : FILLED;
DrawPanel->ReDraw(&dc, TRUE);
break;
default:
DisplayError(this, wxT("WinEDA_ModuleEditFrame::OnSelectOptionToolbar error") );
break;
}
SetToolbars();
DrawPanel->CursorOn(&dc);
int id = event.GetId();
wxClientDC dc( DrawPanel );
DrawPanel->CursorOff( &dc );
DrawPanel->PrepareGraphicContext( &dc );
switch( id )
{
case ID_TB_OPTIONS_SHOW_GRID:
m_Draw_Grid = m_OptionsToolBar->GetToolState( id );
DrawPanel->ReDraw( &dc, TRUE );
break;
case ID_TB_OPTIONS_SELECT_UNIT_MM:
g_UnitMetric = MILLIMETRE;
case ID_TB_OPTIONS_SELECT_UNIT_INCH:
if( id == ID_TB_OPTIONS_SELECT_UNIT_INCH )
g_UnitMetric = INCHES;
UpdateStatusBar();
ReCreateAuxiliaryToolbar();
break;
case ID_TB_OPTIONS_SHOW_POLAR_COORD:
Affiche_Message( wxEmptyString );
DisplayOpt.DisplayPolarCood = m_OptionsToolBar->GetToolState( id );
UpdateStatusBar();
break;
case ID_TB_OPTIONS_SELECT_CURSOR:
m_CursorShape = m_OptionsToolBar->GetToolState( id );
break;
case ID_TB_OPTIONS_SHOW_PADS_SKETCH:
m_DisplayPadFill = !m_OptionsToolBar->GetToolState( id );
DrawPanel->ReDraw( &dc, TRUE );
break;
case ID_TB_OPTIONS_SHOW_VIAS_SKETCH:
m_DisplayViaFill = !m_OptionsToolBar->GetToolState( id );
DrawPanel->ReDraw( &dc, TRUE );
break;
case ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH:
m_DisplayModText =
m_OptionsToolBar->GetToolState( id ) ? SKETCH : FILLED;
DrawPanel->ReDraw( &dc, TRUE );
break;
case ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH:
m_DisplayModEdge =
m_OptionsToolBar->GetToolState( id ) ? SKETCH : FILLED;
DrawPanel->ReDraw( &dc, TRUE );
break;
default:
DisplayError( this,
wxT( "WinEDA_ModuleEditFrame::OnSelectOptionToolbar error" ) );
break;
}
SetToolbars();
DrawPanel->CursorOn( &dc );
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*****************************************************/
/* muwave_command.cpp: micro wave functions commands */
/*****************************************************/
/*****************************************************/
/* muwave_command.cpp: micro wave functions commands */
/*****************************************************/
#include "fctsys.h"
#include "common.h"
......@@ -14,108 +14,103 @@
#include "protos.h"
/*********************************************************************/
void WinEDA_PcbFrame::ProcessMuWaveFunctions(wxCommandEvent& event)
/*********************************************************************/
/* Traite les selections d'outils et les commandes appelees du menu POPUP
*/
/* Handle microwave commands.
*/
void WinEDA_PcbFrame::ProcessMuWaveFunctions( wxCommandEvent& event )
{
int id = event.GetId();
wxPoint pos;
wxClientDC dc(DrawPanel);
int id = event.GetId();
wxPoint pos;
wxClientDC dc( DrawPanel );
DrawPanel->PrepareGraphicContext(&dc);
DrawPanel->PrepareGraphicContext( &dc );
wxGetMousePosition(&pos.x, &pos.y);
wxGetMousePosition( &pos.x, &pos.y );
pos.y += 20;
pos.y += 20;
switch ( id ) // Arret eventuel de la commande de dplacement en cours
{
case ID_POPUP_COPY_BLOCK:
break;
default: // Arret de la commande de dplacement en cours
if( DrawPanel->ManageCurseur &&
DrawPanel->ForceCloseManageCurseur )
{
DrawPanel->ForceCloseManageCurseur(DrawPanel, &dc);
}
SetToolID(0, wxCURSOR_ARROW,wxEmptyString);
break;
}
switch ( id ) // Traitement des commandes
{
case ID_PCB_MUWAVE_TOOL_SELF_CMD:
SetToolID( id, wxCURSOR_PENCIL, _("Add Line"));
break;
case ID_PCB_MUWAVE_TOOL_GAP_CMD:
SetToolID( id, wxCURSOR_PENCIL, _("Add Gap"));
break;
case ID_PCB_MUWAVE_TOOL_STUB_CMD:
SetToolID( id, wxCURSOR_PENCIL, _("Add Stub"));
break;
case ID_PCB_MUWAVE_TOOL_STUB_ARC_CMD:
SetToolID( id, wxCURSOR_PENCIL, _("Add Arc Stub"));
break;
case ID_PCB_MUWAVE_TOOL_FUNCTION_SHAPE_CMD:
SetToolID( id, wxCURSOR_PENCIL, _("Add Polynomial Shape"));
break;
switch( id ) // End any command in progress.
{
case ID_POPUP_COPY_BLOCK:
break;
default: // End block command in progress.
if( DrawPanel->ManageCurseur
&& DrawPanel->ForceCloseManageCurseur )
{
DrawPanel->ForceCloseManageCurseur( DrawPanel, &dc );
}
SetToolID( 0, wxCURSOR_ARROW, wxEmptyString );
break;
}
default:
DisplayError(this, wxT("WinEDA_PcbFrame::ProcessMuWaveFunctions() id error"));
break;
}
switch( id )
{
case ID_PCB_MUWAVE_TOOL_SELF_CMD:
SetToolID( id, wxCURSOR_PENCIL, _( "Add Line" ) );
break;
case ID_PCB_MUWAVE_TOOL_GAP_CMD:
SetToolID( id, wxCURSOR_PENCIL, _( "Add Gap" ) );
break;
case ID_PCB_MUWAVE_TOOL_STUB_CMD:
SetToolID( id, wxCURSOR_PENCIL, _( "Add Stub" ) );
break;
case ID_PCB_MUWAVE_TOOL_STUB_ARC_CMD:
SetToolID( id, wxCURSOR_PENCIL, _( "Add Arc Stub" ) );
break;
case ID_PCB_MUWAVE_TOOL_FUNCTION_SHAPE_CMD:
SetToolID( id, wxCURSOR_PENCIL, _( "Add Polynomial Shape" ) );
break;
default:
DisplayError( this,
wxT( "WinEDA_PcbFrame::ProcessMuWaveFunctions() id error" ) );
break;
}
SetToolbars();
SetToolbars();
}
/***************************************************************************/
void WinEDA_PcbFrame::MuWaveCommand(wxDC * DC, const wxPoint& MousePos)
/***************************************************************************/
void WinEDA_PcbFrame::MuWaveCommand( wxDC* DC, const wxPoint& MousePos )
{
MODULE* module = NULL;
switch ( m_ID_current_state )
{
case ID_PCB_MUWAVE_TOOL_SELF_CMD:
Begin_Self(DC);
break;
case ID_PCB_MUWAVE_TOOL_GAP_CMD:
module = Create_MuWaveComponent( 0);
break;
case ID_PCB_MUWAVE_TOOL_STUB_CMD:
module = Create_MuWaveComponent( 1);
break;
case ID_PCB_MUWAVE_TOOL_STUB_ARC_CMD:
module = Create_MuWaveComponent( 2);
break;
case ID_PCB_MUWAVE_TOOL_FUNCTION_SHAPE_CMD:
module = Create_MuWavePolygonShape();
break;
default :
DrawPanel->SetCursor(wxCURSOR_ARROW);
DisplayError(this, wxT("WinEDA_PcbFrame::MuWaveCommand() id error"));
SetToolID(0, wxCURSOR_ARROW,wxEmptyString);
break;
}
if ( module )
switch( m_ID_current_state )
{
case ID_PCB_MUWAVE_TOOL_SELF_CMD:
Begin_Self( DC );
break;
case ID_PCB_MUWAVE_TOOL_GAP_CMD:
module = Create_MuWaveComponent( 0 );
break;
case ID_PCB_MUWAVE_TOOL_STUB_CMD:
module = Create_MuWaveComponent( 1 );
break;
case ID_PCB_MUWAVE_TOOL_STUB_ARC_CMD:
module = Create_MuWaveComponent( 2 );
break;
case ID_PCB_MUWAVE_TOOL_FUNCTION_SHAPE_CMD:
module = Create_MuWavePolygonShape();
break;
default:
DrawPanel->SetCursor( wxCURSOR_ARROW );
DisplayError( this, wxT( "WinEDA_PcbFrame::MuWaveCommand() id error" ) );
SetToolID( 0, wxCURSOR_ARROW, wxEmptyString );
break;
}
if( module )
{
StartMove_Module( module, DC );
}
DrawPanel->MouseToCursorSchema();
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment