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;
wxMenuBar* menuBar = GetMenuBar();
wxMenuItem* item;
if( ! menuBar )
if( !menuBar )
{
menuBar = new wxMenuBar();
/////////////////////////////
// Ajustage de dimensions: //
/////////////////////////////
wxMenu * sizes_menu = new wxMenu;
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_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_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);
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;
wxMenu* helpMenu = new wxMenu;
// Contents
item = new wxMenuItem(helpMenu ,
item = new wxMenuItem( helpMenu,
ID_GENERAL_HELP,
_("&Contents"), // Menu entry name
_("Open the pcbnew manual")); // Statusbar message
item->SetBitmap(help_xpm);
helpMenu->Append(item);
_( "&Contents" ),
_( "Open the pcbnew manual" ) );
item->SetBitmap( help_xpm );
helpMenu->Append( item );
// About pcbnew
item = new wxMenuItem(helpMenu ,
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);
_( "&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"));
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);
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 );
......@@ -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);
int id = event.GetId();
wxClientDC dc( DrawPanel );
DrawPanel->CursorOff( &dc);
DrawPanel->PrepareGraphicContext(&dc);
switch ( id )
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);
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 )
if( id == ID_TB_OPTIONS_SELECT_UNIT_INCH )
g_UnitMetric = INCHES;
UpdateStatusBar(); /* Reaffichage des coord curseur */
UpdateStatusBar();
ReCreateAuxiliaryToolbar();
break;
case ID_TB_OPTIONS_SHOW_POLAR_COORD:
Affiche_Message(wxEmptyString);
DisplayOpt.DisplayPolarCood = m_OptionsToolBar->GetToolState(id);
UpdateStatusBar(); /* Reaffichage des coord curseur */
Affiche_Message( wxEmptyString );
DisplayOpt.DisplayPolarCood = m_OptionsToolBar->GetToolState( id );
UpdateStatusBar();
break;
case ID_TB_OPTIONS_SELECT_CURSOR:
m_CursorShape = m_OptionsToolBar->GetToolState(id);
m_CursorShape = m_OptionsToolBar->GetToolState( id );
break;
case ID_TB_OPTIONS_SHOW_PADS_SKETCH:
m_DisplayPadFill = ! m_OptionsToolBar->GetToolState(id);
DrawPanel->ReDraw(&dc, TRUE);
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);
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);
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);
m_OptionsToolBar->GetToolState( id ) ? SKETCH : FILLED;
DrawPanel->ReDraw( &dc, TRUE );
break;
default:
DisplayError(this, wxT("WinEDA_ModuleEditFrame::OnSelectOptionToolbar error") );
DisplayError( this,
wxT( "WinEDA_ModuleEditFrame::OnSelectOptionToolbar error" ) );
break;
}
SetToolbars();
DrawPanel->CursorOn(&dc);
DrawPanel->CursorOn( &dc );
}
This diff is collapsed.
This diff is collapsed.
/*************************/
/* Edition des Pastilles */
/*************************/
/************************/
/* Edit footprint pads. */
/************************/
#include "fctsys.h"
#include "gr_basic.h"
......@@ -15,21 +15,14 @@
#include "protos.h"
/* Routines Locales */
/* Variables locales */
static D_PAD* s_CurrentSelectedPad; /* pointeur sur le pad selecte pour edition */
static D_PAD* s_CurrentSelectedPad;
static wxPoint Pad_OldPos;
/************************************************************/
static void Exit_Move_Pad( WinEDA_DrawPanel* Panel, wxDC* DC )
/************************************************************/
/* Routine de sortie du menu EDIT PADS.
* Sortie simple si pad de pad en mouvement
* Remise en etat des conditions initiales avant move si move en cours
/* Cancel move pad command.
*/
static void Exit_Move_Pad( WinEDA_DrawPanel* Panel, wxDC* DC )
{
D_PAD* pad = s_CurrentSelectedPad;
......@@ -42,10 +35,10 @@ static void Exit_Move_Pad( WinEDA_DrawPanel* Panel, wxDC* DC )
pad->m_Flags = 0;
pad->m_Pos = Pad_OldPos;
pad->Draw( Panel, DC, GR_XOR );
/* Pad Move en cours : remise a l'etat d'origine */
/* Pad move in progress: the restore origin. */
if( g_Drag_Pistes_On )
{
/* Effacement des segments dragges */
DRAG_SEGM* pt_drag = g_DragSegmentList;
for( ; pt_drag != NULL; pt_drag = pt_drag->Pnext )
{
......@@ -63,10 +56,9 @@ static void Exit_Move_Pad( WinEDA_DrawPanel* Panel, wxDC* DC )
}
/*************************************************************************/
/* Draw in drag mode when moving a pad.
*/
static void Show_Pad_Move( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
/*************************************************************************/
/* Affiche le pad et les pistes en mode drag lors des deplacements du pad */
{
TRACK* Track;
DRAG_SEGM* pt_drag;
......@@ -82,7 +74,6 @@ static void Show_Pad_Move( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
if( !g_Drag_Pistes_On )
return;
/* Tracage des segments dragges */
pt_drag = g_DragSegmentList;
for( ; pt_drag != NULL; pt_drag = pt_drag->Pnext )
{
......@@ -102,12 +93,9 @@ static void Show_Pad_Move( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
}
/*************************************************************/
void WinEDA_BasePcbFrame::Export_Pad_Settings( D_PAD* pt_pad )
/*************************************************************/
/* Charge en liste des caracteristiques par defaut celles du pad selecte
/* Load list of features for default pad selection.
*/
void WinEDA_BasePcbFrame::Export_Pad_Settings( D_PAD* pt_pad )
{
MODULE* Module;
......@@ -133,15 +121,12 @@ void WinEDA_BasePcbFrame::Export_Pad_Settings( D_PAD* pt_pad )
}
/***********************************************************************/
void WinEDA_BasePcbFrame::Import_Pad_Settings( D_PAD* aPad, bool aDraw )
/***********************************************************************/
/* Met a jour les nouvelles valeurs de dimensions du pad pointe par pt_pad
* - Source : valeurs choisies des caracteristiques generales
* - les dimensions sont modifiees
* - la position et les noms ne sont pas touches
/* Imports the new values of dimensions of the pad edge by pt_pad
* - Source: selected values of general characteristics
* - Measurements are modified
* - The position, names, and keys are not.
*/
void WinEDA_BasePcbFrame::Import_Pad_Settings( D_PAD* aPad, bool aDraw )
{
if( aDraw )
{
......@@ -161,7 +146,6 @@ void WinEDA_BasePcbFrame::Import_Pad_Settings( D_PAD* aPad, bool aDraw )
aPad->m_Drill = g_Pad_Master.m_Drill;
aPad->m_DrillShape = g_Pad_Master.m_DrillShape;
/* Traitement des cas particuliers : */
switch( g_Pad_Master.m_PadShape )
{
case PAD_TRAPEZOID:
......@@ -186,14 +170,14 @@ void WinEDA_BasePcbFrame::Import_Pad_Settings( D_PAD* aPad, bool aDraw )
if( aDraw )
DrawPanel->PostDirtyRect( aPad->GetBoundingBox() );
( (MODULE*) aPad->GetParent() )->m_LastEdit_Time = time( NULL );
}
/***********************************************************/
/* Add a pad on the selected module.
*/
void WinEDA_BasePcbFrame::AddPad( MODULE* Module, bool draw )
/***********************************************************/
/* Routine d'ajout d'un pad sur l'module selectionnee */
{
D_PAD* Pad;
int rX, rY;
......@@ -203,10 +187,10 @@ void WinEDA_BasePcbFrame::AddPad( MODULE* Module, bool draw )
Pad = new D_PAD( Module );
/* Chainage de la structure en fin de liste des pads : */
/* Add the new pad to end of the module pad list. */
Module->m_Pads.PushBack( Pad );
/* Mise a jour des caract de la pastille : */
/* Update the pad properties. */
Import_Pad_Settings( Pad, false );
Pad->SetNetname( wxEmptyString );
......@@ -220,12 +204,14 @@ void WinEDA_BasePcbFrame::AddPad( MODULE* Module, bool draw )
Pad->m_Pos0.x = rX;
Pad->m_Pos0.y = rY;
/* Increment automatique de la reference courante Current_PadName */
long num = 0; int ponder = 1;
/* Automatically increment the current pad number and name. */
long num = 0;
int ponder = 1;
while( g_Current_PadName.Len() && g_Current_PadName.Last() >= '0'
&& g_Current_PadName.Last() <= '9' )
{
num += (g_Current_PadName.Last() - '0') * ponder;
num += ( g_Current_PadName.Last() - '0' ) * ponder;
g_Current_PadName.RemoveLast();
ponder *= 10;
}
......@@ -234,7 +220,6 @@ void WinEDA_BasePcbFrame::AddPad( MODULE* Module, bool draw )
g_Current_PadName << num;
Pad->SetPadName( g_Current_PadName );
/* Redessin du module */
Module->Set_Rectangle_Encadrement();
Pad->DisplayInfo( this );
if( draw )
......@@ -242,10 +227,8 @@ void WinEDA_BasePcbFrame::AddPad( MODULE* Module, bool draw )
}
/*********************************************************/
/* Function to delete the pad. */
void WinEDA_BasePcbFrame::DeletePad( D_PAD* Pad )
/*********************************************************/
/* Function to delete the pad "pad" */
{
MODULE* Module;
wxString line;
......@@ -274,10 +257,8 @@ void WinEDA_BasePcbFrame::DeletePad( D_PAD* Pad )
}
/*************************************************************/
/* Function to initialize the "move pad" command */
void WinEDA_BasePcbFrame::StartMovePad( D_PAD* Pad, wxDC* DC )
/*************************************************************/
/* Function to initialise the "move pad" command */
{
MODULE* Module;
......@@ -305,10 +286,8 @@ void WinEDA_BasePcbFrame::StartMovePad( D_PAD* Pad, wxDC* DC )
}
/*********************************************************/
/* Routine to place a moved pad. */
void WinEDA_BasePcbFrame::PlacePad( D_PAD* Pad, wxDC* DC )
/*********************************************************/
/* Routine to Place a moved pad */
{
int dX, dY;
TRACK* Track;
......@@ -323,7 +302,9 @@ void WinEDA_BasePcbFrame::PlacePad( D_PAD* Pad, wxDC* DC )
PICKED_ITEMS_LIST pickList;
/* Save dragged track segments in undo list */
for( DRAG_SEGM* pt_drag = g_DragSegmentList; pt_drag; pt_drag = pt_drag->Pnext )
for( DRAG_SEGM* pt_drag = g_DragSegmentList;
pt_drag;
pt_drag = pt_drag->Pnext )
{
Track = pt_drag->m_Segm;
......@@ -355,13 +336,13 @@ void WinEDA_BasePcbFrame::PlacePad( D_PAD* Pad, wxDC* DC )
if( g_DragSegmentList )
SaveCopyInUndoList( pickList, UR_CHANGED );
/* Placement du pad */
Pad->m_Pos = pad_curr_position;
Pad->Draw( DrawPanel, DC, GR_XOR );
/* Redraw dragged track segments */
for( DRAG_SEGM* pt_drag = g_DragSegmentList; pt_drag; pt_drag = pt_drag->Pnext )
for( DRAG_SEGM* pt_drag = g_DragSegmentList;
pt_drag;
pt_drag = pt_drag->Pnext )
{
Track = pt_drag->m_Segm;
......@@ -376,7 +357,8 @@ void WinEDA_BasePcbFrame::PlacePad( D_PAD* Pad, wxDC* DC )
Track->Draw( DrawPanel, DC, GR_OR );
}
/* Compute local coordinates (i.e refer to Module position and for Module orient = 0)*/
/* Compute local coordinates (i.e refer to Module position and for Module
* orient = 0) */
dX = Pad->m_Pos.x - Pad_OldPos.x;
dY = Pad->m_Pos.y - Pad_OldPos.y;
RotatePoint( &dX, &dY, -Module->m_Orient );
......@@ -392,23 +374,18 @@ void WinEDA_BasePcbFrame::PlacePad( D_PAD* Pad, wxDC* DC )
Module->Set_Rectangle_Encadrement();
Module->m_LastEdit_Time = time( NULL );
EraseDragListe();
GetScreen()->SetModify();
DrawPanel->ManageCurseur = NULL;
DrawPanel->ForceCloseManageCurseur = NULL;
m_Pcb->m_Status_Pcb &= ~( LISTE_RATSNEST_ITEM_OK | CONNEXION_OK);
m_Pcb->m_Status_Pcb &= ~( LISTE_RATSNEST_ITEM_OK | CONNEXION_OK );
}
/**********************************************************/
void WinEDA_BasePcbFrame::RotatePad( D_PAD* Pad, wxDC* DC )
/**********************************************************/
/* Tourne de 90 degres le pad selectionne :
* c.a.d intervertit dim X et Y et offsets
/* Rotate selected pad 90 degrees.
*/
void WinEDA_BasePcbFrame::RotatePad( D_PAD* Pad, wxDC* DC )
{
MODULE* Module;
......@@ -429,12 +406,10 @@ void WinEDA_BasePcbFrame::RotatePad( D_PAD* Pad, wxDC* DC )
Pad->m_Offset.y = -Pad->m_Offset.y;
EXCHG( Pad->m_DeltaSize.x, Pad->m_DeltaSize.y );
Pad->m_DeltaSize.x = -Pad->m_DeltaSize.x; /* ceci est la variation
* de la dim Y sur l'axe X */
Pad->m_DeltaSize.x = -Pad->m_DeltaSize.x;
Module->Set_Rectangle_Encadrement();
Pad->DisplayInfo( this );
if( DC )
Module->Draw( DrawPanel, DC, GR_OR );
}
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,62 +14,60 @@
#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;
switch ( id ) // Arret eventuel de la commande de dplacement en cours
switch( id ) // End any command in progress.
{
case ID_POPUP_COPY_BLOCK:
break;
default: // Arret de la commande de dplacement en cours
if( DrawPanel->ManageCurseur &&
DrawPanel->ForceCloseManageCurseur )
default: // End block command in progress.
if( DrawPanel->ManageCurseur
&& DrawPanel->ForceCloseManageCurseur )
{
DrawPanel->ForceCloseManageCurseur(DrawPanel, &dc);
DrawPanel->ForceCloseManageCurseur( DrawPanel, &dc );
}
SetToolID(0, wxCURSOR_ARROW,wxEmptyString);
SetToolID( 0, wxCURSOR_ARROW, wxEmptyString );
break;
}
switch ( id ) // Traitement des commandes
switch( id )
{
case ID_PCB_MUWAVE_TOOL_SELF_CMD:
SetToolID( id, wxCURSOR_PENCIL, _("Add Line"));
SetToolID( id, wxCURSOR_PENCIL, _( "Add Line" ) );
break;
case ID_PCB_MUWAVE_TOOL_GAP_CMD:
SetToolID( id, wxCURSOR_PENCIL, _("Add Gap"));
SetToolID( id, wxCURSOR_PENCIL, _( "Add Gap" ) );
break;
case ID_PCB_MUWAVE_TOOL_STUB_CMD:
SetToolID( id, wxCURSOR_PENCIL, _("Add Stub"));
SetToolID( id, wxCURSOR_PENCIL, _( "Add Stub" ) );
break;
case ID_PCB_MUWAVE_TOOL_STUB_ARC_CMD:
SetToolID( id, wxCURSOR_PENCIL, _("Add Arc Stub"));
SetToolID( id, wxCURSOR_PENCIL, _( "Add Arc Stub" ) );
break;
case ID_PCB_MUWAVE_TOOL_FUNCTION_SHAPE_CMD:
SetToolID( id, wxCURSOR_PENCIL, _("Add Polynomial Shape"));
SetToolID( id, wxCURSOR_PENCIL, _( "Add Polynomial Shape" ) );
break;
default:
DisplayError(this, wxT("WinEDA_PcbFrame::ProcessMuWaveFunctions() id error"));
DisplayError( this,
wxT( "WinEDA_PcbFrame::ProcessMuWaveFunctions() id error" ) );
break;
}
......@@ -77,45 +75,42 @@ wxClientDC dc(DrawPanel);
}
/***************************************************************************/
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 )
switch( m_ID_current_state )
{
case ID_PCB_MUWAVE_TOOL_SELF_CMD:
Begin_Self(DC);
Begin_Self( DC );
break;
case ID_PCB_MUWAVE_TOOL_GAP_CMD:
module = Create_MuWaveComponent( 0);
module = Create_MuWaveComponent( 0 );
break;
case ID_PCB_MUWAVE_TOOL_STUB_CMD:
module = Create_MuWaveComponent( 1);
module = Create_MuWaveComponent( 1 );
break;
case ID_PCB_MUWAVE_TOOL_STUB_ARC_CMD:
module = Create_MuWaveComponent( 2);
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);
default:
DrawPanel->SetCursor( wxCURSOR_ARROW );
DisplayError( this, wxT( "WinEDA_PcbFrame::MuWaveCommand() id error" ) );
SetToolID( 0, wxCURSOR_ARROW, wxEmptyString );
break;
}
if ( module )
if( module )
{
StartMove_Module( module, DC );
}
DrawPanel->MouseToCursorSchema();
}
This diff is collapsed.
This diff is collapsed.
/***********************************/
/** pcbcfg() : configuration **/
/***********************************/
/* lit ou met a jour la configuration de PCBNEW */
/****************************************/
/** pcbnew_config.cpp : configuration **/
/****************************************/
#include "fctsys.h"
#include "appl_wxstruct.h"
......@@ -24,12 +22,10 @@
#include "dialog_general_options.h"
#define HOTKEY_FILENAME wxT( "pcbnew" )
/***********************************************************/
void WinEDA_PcbFrame::Process_Config( wxCommandEvent& event )
/***********************************************************/
{
int id = event.GetId();
wxPoint pos;
......@@ -54,7 +50,7 @@ void WinEDA_PcbFrame::Process_Config( wxCommandEvent& event )
DisplayDialogLayerSetup( this );
break;
case ID_CONFIG_REQ: // Creation de la fenetre de configuration
case ID_CONFIG_REQ:
InstallConfigFrame( pos );
break;
......@@ -147,13 +143,10 @@ void WinEDA_PcbFrame::Process_Config( wxCommandEvent& event )
}
/***************************************************************/
bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
/***************************************************************/
/*
* Read the hotkey files config for pcbnew and module_edit
*/
bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
{
wxString FullFileName = ReturnHotkeyConfigFilePath(
g_ConfigFileLocationChoice );
......@@ -183,7 +176,7 @@ bool WinEDA_PcbFrame::Read_Config( const wxString& projectFileName )
wxGetApp().RemoveLibraryPath( g_UserLibDirBuffer );
/* Init des valeurs par defaut */
/* Initialize default values. */
g_LibName_List.Clear();
wxGetApp().ReadProjectConfig( fn.GetFullPath(),
......@@ -217,10 +210,7 @@ bool WinEDA_PcbFrame::Read_Config( const wxString& projectFileName )
}
/**********************************************************/
void WinEDA_PcbFrame::Update_config( wxWindow* displayframe )
/***********************************************************/
/* enregistrement de la config */
{
wxFileName fn;
......@@ -234,7 +224,6 @@ void WinEDA_PcbFrame::Update_config( wxWindow* displayframe )
if( dlg.ShowModal() == wxID_CANCEL )
return;
/* ecriture de la configuration */
wxGetApp().WriteProjectConfig( fn.GetFullPath(), wxT( "/pcbnew" ),
ParamCfgList );
}
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