diff --git a/eeschema/dialog_print_using_printer.cpp b/eeschema/dialog_print_using_printer.cpp index e07eaa9350..f56059d345 100644 --- a/eeschema/dialog_print_using_printer.cpp +++ b/eeschema/dialog_print_using_printer.cpp @@ -116,7 +116,9 @@ void WinEDA_SchematicFrame::OnPrint( wxCommandEvent& event ) fn = g_RootSheet->m_AssociatedScreen->m_FileName; - if( fn.GetFullName() != wxT( "noname.sch" ) ) + wxString default_name = NAMELESS_PROJECT; + default_name += wxT( ".sch" ); + if( fn.GetFullName() != default_name ) { fn.SetExt( ProjectFileExtension ); wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters() ); diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp index c72240d0d3..53158d7720 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -109,7 +109,8 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName, screen->m_CurrentSheetDesc = &g_Sheet_A4; screen->SetZoom( 32 ); screen->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId ); - screen->m_Title = wxT( "noname.sch" ); + screen->m_Title = NAMELESS_PROJECT; + screen->m_Title += wxT( ".sch" ); GetScreen()->m_FileName = screen->m_Title; screen->m_Company.Empty(); screen->m_Commentaire1.Empty(); diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index ca80ddebf7..8461b67e51 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -155,7 +155,8 @@ WinEDA_SchematicFrame::WinEDA_SchematicFrame( wxWindow* father, m_TextFieldSize = DEFAULT_SIZE_TEXT; m_LibeditFrame = NULL; // Component editor frame. m_ViewlibFrame = NULL; // Frame for browsing component libraries - m_DefaultSchematicFileName = wxT( "noname.sch" ); + m_DefaultSchematicFileName = NAMELESS_PROJECT; + m_DefaultSchematicFileName += wxT( ".sch" ); m_ShowAllPins = false; m_previewPosition = wxDefaultPosition; m_previewSize = wxDefaultSize; diff --git a/include/common.h b/include/common.h index 3971b5c6ee..7e062d650c 100644 --- a/include/common.h +++ b/include/common.h @@ -29,6 +29,9 @@ class WinEDA_DrawPanel; * flag for block commands */ +// default name for nameless projects +#define NAMELESS_PROJECT wxT("noname") + #define NB_ITEMS 11 /* Pseudo key codes for command panning */ diff --git a/internat/fr/kicad.mo b/internat/fr/kicad.mo index b9c9520ad1..a2e28baf60 100644 Binary files a/internat/fr/kicad.mo and b/internat/fr/kicad.mo differ diff --git a/internat/fr/kicad.po b/internat/fr/kicad.po index 5d2cd51ab9..d21982e4f5 100644 --- a/internat/fr/kicad.po +++ b/internat/fr/kicad.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: kicad\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-02-22 20:56+0100\n" -"PO-Revision-Date: 2010-02-22 20:58+0100\n" +"POT-Creation-Date: 2010-02-24 17:18+0100\n" +"PO-Revision-Date: 2010-02-24 17:18+0100\n" "Last-Translator: \n" "Language-Team: kicad team \n" "MIME-Version: 1.0\n" @@ -1308,23 +1308,23 @@ msgstr "Ecriture fichier CI: " msgid "Failed to create " msgstr "Impossible de créer fichier " -#: pcbnew/pcbframe.cpp:336 +#: pcbnew/pcbframe.cpp:337 msgid "Visibles" msgstr "Visibles" -#: pcbnew/pcbframe.cpp:422 +#: pcbnew/pcbframe.cpp:423 msgid "Board modified, Save before exit ?" msgstr "Circuit Imprimé modifié, Sauver avant de quitter ?" -#: pcbnew/pcbframe.cpp:423 +#: pcbnew/pcbframe.cpp:424 msgid "Confirmation" msgstr "Confirmation" -#: pcbnew/pcbframe.cpp:462 +#: pcbnew/pcbframe.cpp:463 msgid "3D Frame already opened" msgstr "Fenêtre 3D déjà ouverte" -#: pcbnew/pcbframe.cpp:466 +#: pcbnew/pcbframe.cpp:467 msgid "3D Viewer" msgstr "Visu 3D" @@ -1948,24 +1948,24 @@ msgstr "Nb Segms" msgid "Error: Unexpected end of file !" msgstr "Erreur: Fin de fichier inattendue !" -#: pcbnew/pcbnew.cpp:107 +#: pcbnew/pcbnew.cpp:109 msgid "Pcbnew is already running, Continue?" msgstr "Pcbnew est en cours d'exécution. Continuer ?" -#: pcbnew/pcbplot.cpp:558 +#: pcbnew/pcbplot.cpp:560 msgid "Warning: Scale option set to a very small value" msgstr "Attention: option d'échelle ajustée à une valeur très petite" -#: pcbnew/pcbplot.cpp:561 +#: pcbnew/pcbplot.cpp:563 msgid "Warning: Scale option set to a very large value" msgstr "Attention: option d'échelle ajustée à une valeur très grande" -#: pcbnew/pcbplot.cpp:690 +#: pcbnew/pcbplot.cpp:692 #, c-format msgid "Plot file <%s> created" msgstr "Fichier de tracé <%s> créé" -#: pcbnew/pcbplot.cpp:702 +#: pcbnew/pcbplot.cpp:704 msgid "No layer selected" msgstr "Pas de couche sélectionnée" @@ -3362,50 +3362,6 @@ msgstr "Non" msgid " Yes" msgstr "Oui" -#: pcbnew/dialog_graphic_items_options.cpp:194 -msgid "Graphics:" -msgstr "Eléments graphiques;" - -#: pcbnew/dialog_graphic_items_options.cpp:200 -msgid "Graphic segm Width" -msgstr "Epaisseur segm graphique" - -#: pcbnew/dialog_graphic_items_options.cpp:217 -msgid "Board Edges Width" -msgstr "Epaiss. contour pcb" - -#: pcbnew/dialog_graphic_items_options.cpp:234 -msgid "Copper Text Width" -msgstr "Epaisseur Texte sur cuivre" - -#: pcbnew/dialog_graphic_items_options.cpp:251 -msgid "Text Size V" -msgstr "Hauteur texte" - -#: pcbnew/dialog_graphic_items_options.cpp:268 -msgid "Text Size H" -msgstr "Largeur texte" - -#: pcbnew/dialog_graphic_items_options.cpp:287 -msgid "Modules:" -msgstr "Modules: " - -#: pcbnew/dialog_graphic_items_options.cpp:293 -msgid "Edges Module Width" -msgstr "Epaiss. contour module" - -#: pcbnew/dialog_graphic_items_options.cpp:313 -msgid "Text Module Width" -msgstr "Epaisseur Texte Module" - -#: pcbnew/dialog_graphic_items_options.cpp:334 -msgid "Text Module Size V" -msgstr "Hauteur Texte Module" - -#: pcbnew/dialog_graphic_items_options.cpp:355 -msgid "Text Module Size H" -msgstr "Largeur Texte Module" - #: pcbnew/dialog_edit_module_text_base.cpp:19 #, c-format msgid "Module %s (%s) orient %.1f" @@ -3596,8 +3552,8 @@ msgid "Set Y scale adjust for exact scale plotting" msgstr "Ajuster échelle Y pour traçage à l'échelle exacte" #: pcbnew/dialog_print_using_printer_base.cpp:78 -msgid "Default Pen Size:" -msgstr "Dimension Plume par Défaut:" +msgid "Default pen size:" +msgstr "Dimension plume par défaut:" #: pcbnew/dialog_print_using_printer_base.cpp:80 msgid "" @@ -3656,7 +3612,7 @@ msgid "Preview" msgstr "Prévisualisation" #: pcbnew/dialog_print_using_printer_base.cpp:134 -#: pcbnew/dialog_print_using_printer.cpp:500 +#: pcbnew/dialog_print_using_printer.cpp:504 msgid "Print" msgstr "Imprimer" @@ -4469,19 +4425,19 @@ msgstr "" "Chemins (chemins système et chemins utilisateurs) utilisés pour chercher et charger les fichiers libriries et documentation des composants.\n" "Triés par ordre de priorité décroissante." -#: pcbnew/dialog_print_using_printer.cpp:99 +#: pcbnew/dialog_print_using_printer.cpp:102 msgid "Error Init Printer info" msgstr "Erreur Init info imprimante" -#: pcbnew/dialog_print_using_printer.cpp:430 +#: pcbnew/dialog_print_using_printer.cpp:434 msgid "Printer Problem!" msgstr "Problème d'imprimante" -#: pcbnew/dialog_print_using_printer.cpp:444 +#: pcbnew/dialog_print_using_printer.cpp:448 msgid "Print Preview" msgstr "Prévisualisation" -#: pcbnew/dialog_print_using_printer.cpp:511 +#: pcbnew/dialog_print_using_printer.cpp:515 msgid "There was a problem printing" msgstr "Il y a un problème d'impression" @@ -5193,11 +5149,11 @@ msgstr "Mots Clés" msgid "inch" msgstr "Pouce" -#: pcbnew/dialog_SVG_print.cpp:206 +#: pcbnew/dialog_SVG_print.cpp:209 msgid "Create file " msgstr "Créer Fichier " -#: pcbnew/dialog_SVG_print.cpp:208 +#: pcbnew/dialog_SVG_print.cpp:211 msgid " error" msgstr " erreur" @@ -5884,7 +5840,7 @@ msgstr "Net Code" msgid "Net Length" msgstr "Long. Net" -#: pcbnew/dialog_print_for_modedit.cpp:202 +#: pcbnew/dialog_print_for_modedit.cpp:203 msgid "Print Footprint" msgstr "Imprimer Module" @@ -6239,7 +6195,7 @@ msgid "Setting libraries, directories and others..." msgstr "Sélectionner les librairies, répertoires et autres" #: pcbnew/menubar_pcbframe.cpp:376 -#: pcbnew/dialog_general_options.cpp:251 +#: pcbnew/dialog_general_options.cpp:222 msgid "Hide &Layers Manager" msgstr "Cacher le &Gestionnaire de Couches" @@ -6403,27 +6359,27 @@ msgstr "Curseur" msgid "Main cursor shape selection (small cross or large cursor)" msgstr "Sélection de l'aspect du curseur principal (petite croix ou grand curseur)" -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:60 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:51 msgid "Max Links:" msgstr "Liens max:" -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:65 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:56 msgid "Adjust the number of ratsnets shown from cursor to closest pads" msgstr "Ajuster le nombre de ratsnets montré du curseur aux pads les plus prêts" -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:69 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:60 msgid "Auto Save (minutes):" msgstr "Sauveg. Auto (minutes)" -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:74 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:65 msgid "Delay after the first change to create a backup file of the board on disk." msgstr "Délai après le premier changement pour créer un fichier de sauvegarde du circuit imprimé sur disque" -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:83 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:74 msgid "Drc ON" msgstr "Drc ACTIVE" -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:86 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:77 msgid "" "Enable/disable the DRC control.\n" "When DRC is disable, all connections are allowed." @@ -6431,19 +6387,19 @@ msgstr "" "Active/désactive le contrôle DRC (Design Rule Check).\n" "Lorsque de DRC est désactivé, toutes les connexions sont autorisées." -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:90 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:81 msgid "Show Ratsnest" msgstr "Montrer le chevelu général" -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:92 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:83 msgid "Show (or not) the full rastnest." msgstr "Montrer(ou non) le chevelu complet" -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:96 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:87 msgid "Show Mod Ratsnest" msgstr "Montrer le chevelu du module" -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:98 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:89 msgid "" "Shows (or not) the local ratsnest relative to a footprint, when moving it.\n" "This ratsnest is useful to place a footprint." @@ -6451,64 +6407,64 @@ msgstr "" "Montre (ou non) le chevelu local relatif à un module, lorsque on le déplace.\n" "Ce chevelu est utile pour placer un module." -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:102 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:93 msgid "Tracks Auto Del" msgstr "Auto Supp. Pistes" -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:104 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:95 msgid "Enable/disable the automatic track deletion when recreating a track." msgstr "Active/désactive l'effacement de piste automatique lorsque l'on recrée une piste." -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:108 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:99 msgid "Track only 45 degrees" msgstr "Piste à 45° seulement" -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:110 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:101 msgid "If enabled, force tracks directions to H, V or 45 degrees, when creating a track." msgstr "Si activé, force la direction des pistes à H, V ou 45° en création de piste" -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:114 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:105 msgid "Segments 45 Only" msgstr "Segments 45° seulement" -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:116 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:107 msgid "If enabled, force segments directions to H, V or 45 degrees, when creating a segment on technical layers." msgstr "Si activé, force la direction des segments à H, V ou 45° en création de segments sur couches techniques" -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:120 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:111 msgid "Auto PAN" msgstr "Auto PAN" -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:122 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:113 msgid "Allows auto pan when creating a track, or moving an item." msgstr "Autorise l'autopan en création de piste, ou lorsque on déplace un élément." -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:126 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:117 msgid "Double Segm Track" msgstr "2 segments pour piste" -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:128 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:119 msgid "If enabled, uses two track segments, with 45 degrees angle between them when creating a new track " msgstr "Si activé, utiliser 2 segments de piste, avec un angle de 45 degrés entre eux, pour créer une nouvelle piste" -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:137 -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:145 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:128 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:136 msgid "When creating tracks" msgstr "En création de pistes" -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:139 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:130 msgid "Magnetic Pads" msgstr " Pads magnétiques" -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:141 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:132 msgid "control the capture of the pcb cursor when the mouse cursor enters a pad area" msgstr "Contrôle la capture du curseur pcb quand le curseur souris est sur un pad" -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:147 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:138 msgid "Magnetic Tracks" msgstr "Pistes Magnétiques" -#: pcbnew/dialog_general_options_BoardEditor_base.cpp:149 +#: pcbnew/dialog_general_options_BoardEditor_base.cpp:140 msgid "Control the capture of the pcb cursor when the mouse cursor enters a track" msgstr "Contrôle la capture du curseur pcb quand le curseur souris passe sur une piste" @@ -6746,27 +6702,23 @@ msgstr "Vias sur masque" msgid "Print/plot vias on mask layers. They are in this case not protected" msgstr "Trace vias sur vernis épargne. Elles seront non protégées" -#: pcbnew/dialog_plot_base.cpp:174 -msgid "Line width" -msgstr "Epaisseur ligne" - -#: pcbnew/dialog_plot_base.cpp:184 +#: pcbnew/dialog_plot_base.cpp:186 msgid "X scale adjust" msgstr "Ajustage Echelle X" -#: pcbnew/dialog_plot_base.cpp:193 +#: pcbnew/dialog_plot_base.cpp:195 msgid "Y scale adjust" msgstr "Ajustage Echelle Y" -#: pcbnew/dialog_plot_base.cpp:203 +#: pcbnew/dialog_plot_base.cpp:205 msgid "Plot" msgstr "Tracer" -#: pcbnew/dialog_plot_base.cpp:207 +#: pcbnew/dialog_plot_base.cpp:209 msgid "Save Options" msgstr "Sauver Options" -#: pcbnew/dialog_plot_base.cpp:210 +#: pcbnew/dialog_plot_base.cpp:212 msgid "Generate drill file" msgstr "Créer Fichier de perçage" @@ -6863,7 +6815,7 @@ msgstr "Mode d'affichage contraste normal" msgid "High contrast display mode" msgstr "Mode d'affichage haut contraste" -#: pcbnew/dialog_general_options.cpp:254 +#: pcbnew/dialog_general_options.cpp:225 msgid "Show &Layers Manager" msgstr "Affiche le &Gestionnaire de Couches" @@ -6945,6 +6897,54 @@ msgstr "Pistes sur Couches Cuivre seulement" msgid "Cotation not authorized on Copper layers" msgstr "Cotation non autorisée sur Couches Cuivre" +#: pcbnew/dialog_graphic_items_options_base.cpp:23 +msgid "Graphics:" +msgstr "Eléments graphiques;" + +#: pcbnew/dialog_graphic_items_options_base.cpp:25 +msgid "Graphic segm Width" +msgstr "Epaisseur segm graphique" + +#: pcbnew/dialog_graphic_items_options_base.cpp:32 +msgid "Board Edges Width" +msgstr "Epaiss. contour pcb" + +#: pcbnew/dialog_graphic_items_options_base.cpp:39 +msgid "Copper Text Width" +msgstr "Epaisseur Texte sur cuivre" + +#: pcbnew/dialog_graphic_items_options_base.cpp:46 +msgid "Text Size V" +msgstr "Hauteur texte" + +#: pcbnew/dialog_graphic_items_options_base.cpp:53 +msgid "Text Size H" +msgstr "Largeur texte" + +#: pcbnew/dialog_graphic_items_options_base.cpp:63 +msgid "Modules:" +msgstr "Modules: " + +#: pcbnew/dialog_graphic_items_options_base.cpp:65 +msgid "Edges Module Width" +msgstr "Epaiss. contour module" + +#: pcbnew/dialog_graphic_items_options_base.cpp:72 +msgid "Text Module Width" +msgstr "Epaisseur Texte Module" + +#: pcbnew/dialog_graphic_items_options_base.cpp:79 +msgid "Text Module Size V" +msgstr "Hauteur Texte Module" + +#: pcbnew/dialog_graphic_items_options_base.cpp:86 +msgid "Text Module Size H" +msgstr "Largeur Texte Module" + +#: pcbnew/dialog_graphic_items_options_base.cpp:96 +msgid "General:" +msgstr "Général :" + #: eeschema/plotps.cpp:165 msgid "Page Size A4" msgstr "Feuille A4" @@ -7243,27 +7243,27 @@ msgstr "Description" msgid "Key words" msgstr "Mots clé" -#: eeschema/schframe.cpp:358 +#: eeschema/schframe.cpp:359 msgid "Schematic modified, Save before exit ?" msgstr "Schématique modifiée, Sauver avant de quitter ?" -#: eeschema/schframe.cpp:514 +#: eeschema/schframe.cpp:515 msgid "Draw wires and buses in any direction" msgstr "Tracer les fils et bus avec direction quelconque" -#: eeschema/schframe.cpp:515 +#: eeschema/schframe.cpp:516 msgid "Draw horizontal and vertical wires and buses only" msgstr "Autoriser fils et bus verticaux et horizontaux seulement" -#: eeschema/schframe.cpp:525 +#: eeschema/schframe.cpp:526 msgid "Do not show hidden pins" msgstr "Ne pas affichager les pins invisibles" -#: eeschema/schframe.cpp:526 +#: eeschema/schframe.cpp:527 msgid "Show hidden pins" msgstr "Force affichage des pins invisibles" -#: eeschema/schframe.cpp:617 +#: eeschema/schframe.cpp:618 msgid "Schematic" msgstr "Schématique" @@ -7479,7 +7479,6 @@ msgid "key search criteria <" msgstr "critère de recherche par clé <" #: eeschema/database.cpp:65 -#: eeschema/selpart.cpp:78 msgid "Select Component" msgstr "Sélection Composant" @@ -10016,19 +10015,19 @@ msgstr "Imprimer en &noir et blanc seulement" msgid "Page Setup" msgstr "Options Page" -#: eeschema/dialog_print_using_printer.cpp:241 +#: eeschema/dialog_print_using_printer.cpp:243 msgid "Print Schematic" msgstr "Impression Schématique" -#: eeschema/dialog_print_using_printer.cpp:246 +#: eeschema/dialog_print_using_printer.cpp:248 msgid "An error occurred attempting to print the schematic." msgstr "Une erreur s'est produite lors de l'impression." -#: eeschema/dialog_print_using_printer.cpp:247 +#: eeschema/dialog_print_using_printer.cpp:249 msgid "Printing" msgstr "Impression" -#: eeschema/dialog_print_using_printer.cpp:260 +#: eeschema/dialog_print_using_printer.cpp:262 #, c-format msgid "Print page %d" msgstr "Imprimer page %d" @@ -10055,6 +10054,16 @@ msgstr "oui" msgid "arc only had %d parameters of the required 8" msgstr "l'arc a seulement %d paramètres sur les 8 requis" +#: eeschema/classes_body_items.cpp:535 +#: eeschema/classes_body_items.cpp:795 +#: eeschema/classes_body_items.cpp:1022 +#: eeschema/classes_body_items.cpp:1274 +#: eeschema/classes_body_items.cpp:1691 +#: eeschema/classes_body_items.cpp:2061 +#: eeschema/class_BodyItem_Text.cpp:330 +msgid "Line width" +msgstr "Epaisseur ligne" + #: eeschema/classes_body_items.cpp:540 #: eeschema/classes_body_items.cpp:804 #: eeschema/classes_body_items.cpp:1279 @@ -10459,9 +10468,6 @@ msgstr "Taille du te&xte:" #: eeschema/dialog_sch_sheet_props_base.cpp:42 #: eeschema/dialog_sch_sheet_props_base.cpp:63 -#: eeschema/dialog_lib_edit_pin_base.cpp:41 -#: eeschema/dialog_lib_edit_pin_base.cpp:64 -#: eeschema/dialog_lib_edit_pin_base.cpp:87 msgid "units" msgstr "unités" @@ -11177,7 +11183,7 @@ msgid "File <" msgstr "Fichier <" #: cvpcb/readschematicnetlist.cpp:115 -#: kicad/prjconfig.cpp:106 +#: kicad/prjconfig.cpp:108 msgid "> not found" msgstr "> non trouvé" @@ -11426,16 +11432,16 @@ msgstr "Créer un Nouveau Projet" msgid "Open Existing Project" msgstr "Ouvrir un Projet Existant" -#: kicad/prjconfig.cpp:105 +#: kicad/prjconfig.cpp:107 msgid "Kicad project file <" msgstr "Fichier projet Kicad <" -#: kicad/prjconfig.cpp:119 +#: kicad/prjconfig.cpp:121 #: kicad/kicad.cpp:74 msgid "Working dir: " msgstr "Répertoire de travail: " -#: kicad/prjconfig.cpp:120 +#: kicad/prjconfig.cpp:122 #: kicad/kicad.cpp:75 msgid "" "\n" @@ -11444,10 +11450,6 @@ msgstr "" "\n" "Projet: " -#: kicad/kicad.cpp:102 -msgid "noname" -msgstr "noname" - #: kicad/files-io.cpp:50 msgid "Unzip Project" msgstr "Décompresser Projet" @@ -11636,15 +11638,11 @@ msgstr "Créer un Nouveau Fichier" msgid "Create New Directory" msgstr "Créer un nouveau Répertoire" -#: kicad/tree_project_frame.cpp:521 -msgid "noname." -msgstr "noname." - -#: kicad/tree_project_frame.cpp:1055 +#: kicad/tree_project_frame.cpp:1057 msgid "Change filename: " msgstr "Changer Nom Fichier: " -#: kicad/tree_project_frame.cpp:1057 +#: kicad/tree_project_frame.cpp:1059 msgid "Change filename" msgstr "Changer Nom Fichier" @@ -12838,7 +12836,7 @@ msgstr "Propriétés du Pad" msgid "Footprint text properties" msgstr "Propriétés du texte du module" -#: pcbnew/dialog_general_options_BoardEditor_base.h:80 +#: pcbnew/dialog_general_options_BoardEditor_base.h:78 msgid "General settings" msgstr "Options Générales" @@ -13015,6 +13013,10 @@ msgstr "Options d'Affichage" msgid "Page Settings" msgstr "Ajustage opt Page" +#~ msgid "noname" +#~ msgstr "noname" +#~ msgid "noname." +#~ msgstr "noname." #~ msgid "Pen Width Mini" #~ msgstr "Epaiss Plume Mini" #~ msgid "no kicad files found in this directory" diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index 5e6fcf0467..446aca6cfb 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -99,7 +99,7 @@ bool WinEDA_App::OnInit() GetSettings(reopenLastUsedDirectory); /* Make nameless project translatable */ - wxFileName namelessProject( wxGetCwd(), _( "noname" ), ProjectFileExtension ); + wxFileName namelessProject( wxGetCwd(), NAMELESS_PROJECT, ProjectFileExtension ); frame = new WinEDA_MainFrame( NULL, wxT( "KiCad" ), wxPoint( 30, 20 ), wxSize( 600, 400 ) ); diff --git a/kicad/prjconfig.cpp b/kicad/prjconfig.cpp index a347a77b38..588b347b14 100644 --- a/kicad/prjconfig.cpp +++ b/kicad/prjconfig.cpp @@ -100,7 +100,9 @@ void WinEDA_MainFrame::OnLoadProject( wxCommandEvent& event ) /* Check if project file exists and if it is not noname.pro */ wxString filename = m_ProjectFileName.GetFullName(); - if( !m_ProjectFileName.FileExists() && !filename.IsSameAs(wxT("noname.pro"))) + wxString nameless_prj = NAMELESS_PROJECT; + nameless_prj += wxT(".pro"); + if( !m_ProjectFileName.FileExists() && !filename.IsSameAs(nameless_prj)) { DisplayError( this, _( "Kicad project file <" ) + m_ProjectFileName.GetFullPath() + _( "> not found" ) ); diff --git a/kicad/tree_project_frame.cpp b/kicad/tree_project_frame.cpp index 85b46bbc9d..c40c44cff3 100644 --- a/kicad/tree_project_frame.cpp +++ b/kicad/tree_project_frame.cpp @@ -518,7 +518,9 @@ void TREE_PROJECT_FRAME::NewFile( TreeFileType type ) dir = wxGetCwd() + wxFileName().GetPathSeparator() + treeData->GetDir(); // Ask for the new file name - wxFileDialog dlg( this, title, dir, _( "noname." ) + mask, + wxString nameless_prj = NAMELESS_PROJECT; + nameless_prj += wxT(".") + mask; + wxFileDialog dlg( this, title, dir, nameless_prj, wildcard, wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); if( dlg.ShowModal() == wxID_CANCEL ) @@ -863,7 +865,7 @@ void TREE_PROJECT_FRAME::ReCreateTreePrj() { fn.Clear(); fn.SetPath( ::wxGetCwd() ); - fn.SetName( wxT( "noname" ) ); + fn.SetName( NAMELESS_PROJECT ); fn.SetExt( ProjectFileExtension ); } else diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 66a8cc4ec8..ddc7329141 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -59,7 +59,8 @@ set(PCBNEW_SRCS dialog_global_edit_tracks_and_vias.cpp dialog_global_edit_tracks_and_vias_base.cpp dialog_global_pads_edition_base.cpp -# dialog_graphic_items_options.cpp + dialog_graphic_items_options.cpp + dialog_graphic_items_options_base.cpp dialog_graphic_item_properties.cpp dialog_graphic_item_properties_base.cpp # dialog_initpcb.cpp diff --git a/pcbnew/dialog_SVG_print.cpp b/pcbnew/dialog_SVG_print.cpp index f268b554ea..07b48dda29 100644 --- a/pcbnew/dialog_SVG_print.cpp +++ b/pcbnew/dialog_SVG_print.cpp @@ -27,6 +27,8 @@ #define WIDTH_MAX_VALUE 500 #define WIDTH_MIN_VALUE 1 +extern int g_DrawDefaultLineThickness; + // Local variables: static PRINT_PARAMETERS s_Parameters; static long s_SelectedLayers = LAYER_BACK | LAYER_FRONT | @@ -88,10 +90,10 @@ void DIALOG_SVG_PRINT::OnInitDialog( wxInitDialogEvent& event ) m_ImageXSize_mm = 270; if( m_Config ) { - m_Config->Read( OPTKEY_PLOT_LINEWIDTH_VALUE, &s_Parameters.m_PenDefaultSize ); m_Config->Read( PLOTSVGMODECOLOR_KEY, &s_Parameters.m_Print_Black_and_White ); } + s_Parameters.m_PenDefaultSize = g_DrawDefaultLineThickness; AddUnitSymbol( *m_TextPenWidth, g_UnitMetric ); m_DialogPenWidth->SetValue( ReturnStringFromValue( g_UnitMetric, s_Parameters.m_PenDefaultSize, @@ -159,6 +161,7 @@ void DIALOG_SVG_PRINT::SetPenWidth() s_Parameters.m_PenDefaultSize = WIDTH_MIN_VALUE; } + g_DrawDefaultLineThickness = s_Parameters.m_PenDefaultSize; m_DialogPenWidth->SetValue( ReturnStringFromValue( g_UnitMetric, s_Parameters.m_PenDefaultSize, m_Parent->m_InternalUnits ) ); @@ -303,7 +306,6 @@ void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event ) s_Parameters.m_Print_Black_and_White = m_ModeColorOption->GetSelection(); if( m_Config ) { - m_Config->Write( OPTKEY_PLOT_LINEWIDTH_VALUE, s_Parameters.m_PenDefaultSize ); m_Config->Write( PLOTSVGMODECOLOR_KEY, s_Parameters.m_Print_Black_and_White ); wxString layerKey; for( int layer = 0; layerSetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bMainSizer; - bMainSizer = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bLeftSizer; - bLeftSizer = new wxBoxSizer( wxVERTICAL ); - - wxString m_PolarDisplayChoices[] = { _("No Display"), _("Display") }; - int m_PolarDisplayNChoices = sizeof( m_PolarDisplayChoices ) / sizeof( wxString ); - m_PolarDisplay = new wxRadioBox( this, wxID_POLAR_CTRL, _("Display Polar Coord"), wxDefaultPosition, wxDefaultSize, m_PolarDisplayNChoices, m_PolarDisplayChoices, 1, wxRA_SPECIFY_COLS ); - m_PolarDisplay->SetSelection( 1 ); - m_PolarDisplay->SetToolTip( _("Activates the display of relative coordinates from relative origin (set by the space key)\nto the cursor, in polar coordinates (angle and distance)") ); - - bLeftSizer->Add( m_PolarDisplay, 0, wxALL|wxEXPAND, 5 ); - - wxString m_UnitsSelectionChoices[] = { _("Inches"), _("Millimeters") }; - int m_UnitsSelectionNChoices = sizeof( m_UnitsSelectionChoices ) / sizeof( wxString ); - m_UnitsSelection = new wxRadioBox( this, wxID_UNITS, _("Units"), wxDefaultPosition, wxDefaultSize, m_UnitsSelectionNChoices, m_UnitsSelectionChoices, 1, wxRA_SPECIFY_COLS ); - m_UnitsSelection->SetSelection( 1 ); - m_UnitsSelection->SetToolTip( _("Selection of units used to display dimensions and positions of items") ); - - bLeftSizer->Add( m_UnitsSelection, 0, wxALL|wxEXPAND, 5 ); - - wxString m_CursorShapeChoices[] = { _("Small cross"), _("Full screen cursor") }; - int m_CursorShapeNChoices = sizeof( m_CursorShapeChoices ) / sizeof( wxString ); - m_CursorShape = new wxRadioBox( this, wxID_CURSOR_SHAPE, _("Cursor"), wxDefaultPosition, wxDefaultSize, m_CursorShapeNChoices, m_CursorShapeChoices, 1, wxRA_SPECIFY_COLS ); - m_CursorShape->SetSelection( 0 ); - m_CursorShape->SetToolTip( _("Main cursor shape selection (small cross or large cursor)") ); - - bLeftSizer->Add( m_CursorShape, 0, wxALL|wxEXPAND, 5 ); - - bMainSizer->Add( bLeftSizer, 1, wxEXPAND, 5 ); - - wxBoxSizer* bMiddleLeftSizer; - bMiddleLeftSizer = new wxBoxSizer( wxVERTICAL ); - -/* - wxString m_LayerNumberChoices[] = { _("1"), _("2"), _("4"), _("6"), _("8"), _("10"), _("12"), _("14"), _("16") }; - int m_LayerNumberNChoices = sizeof( m_LayerNumberChoices ) / sizeof( wxString ); - m_LayerNumber = new wxRadioBox( this, wxID_LAYER_NUMBER, _("Layers:"), wxDefaultPosition, wxDefaultSize, m_LayerNumberNChoices, m_LayerNumberChoices, 3, wxRA_SPECIFY_COLS ); - m_LayerNumber->SetSelection( 1 ); - m_LayerNumber->SetToolTip( _("Active copper layers count selection") ); - - bMiddleLeftSizer->Add( m_LayerNumber, 0, wxALL|wxEXPAND, 5 ); -*/ - m_staticTextmaxlinks = new wxStaticText( this, wxID_ANY, _("Max Links:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextmaxlinks->Wrap( -1 ); - bMiddleLeftSizer->Add( m_staticTextmaxlinks, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_MaxShowLinks = new wxSpinCtrl( this, wxID_ANY, wxT("1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 5, 1 ); - m_MaxShowLinks->SetToolTip( _("Adjust the number of ratsnets shown from cursor to closest pads") ); - - bMiddleLeftSizer->Add( m_MaxShowLinks, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - m_staticTextautosave = new wxStaticText( this, wxID_ANY, _("Auto Save (minutes):"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextautosave->Wrap( -1 ); - bMiddleLeftSizer->Add( m_staticTextautosave, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - m_SaveTime = new wxSpinCtrl( this, wxID_ANY, wxT("0"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 60, 0 ); - m_SaveTime->SetToolTip( _("Delay after the first change to create a backup file of the board on disk.") ); - - bMiddleLeftSizer->Add( m_SaveTime, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - bMainSizer->Add( bMiddleLeftSizer, 1, wxEXPAND, 5 ); - - wxStaticBoxSizer* bMiddleRightBoxSizer; - bMiddleRightBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options:") ), wxVERTICAL ); - - m_DrcOn = new wxCheckBox( this, wxID_DRC_ONOFF, _("Drc ON"), wxDefaultPosition, wxDefaultSize, 0 ); - m_DrcOn->SetValue(true); - - m_DrcOn->SetToolTip( _("Enable/disable the DRC control.\nWhen DRC is disable, all connections are allowed.") ); - - bMiddleRightBoxSizer->Add( m_DrcOn, 0, wxALL|wxEXPAND, 5 ); - - m_ShowGlobalRatsnest = new wxCheckBox( this, wxID_GENERAL_RATSNEST, _("Show Ratsnest"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_ShowGlobalRatsnest->SetToolTip( _("Show (or not) the full rastnest.") ); - - bMiddleRightBoxSizer->Add( m_ShowGlobalRatsnest, 0, wxALL, 5 ); - - m_ShowModuleRatsnest = new wxCheckBox( this, wxID_RATSNEST_MODULE, _("Show Mod Ratsnest"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_ShowModuleRatsnest->SetToolTip( _("Shows (or not) the local ratsnest relative to a footprint, when moving it.\nThis ratsnest is useful to place a footprint.") ); - - bMiddleRightBoxSizer->Add( m_ShowModuleRatsnest, 0, wxALL, 5 ); - - m_TrackAutodel = new wxCheckBox( this, wxID_TRACK_AUTODEL, _("Tracks Auto Del"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_TrackAutodel->SetToolTip( _("Enable/disable the automatic track deletion when recreating a track.") ); - - bMiddleRightBoxSizer->Add( m_TrackAutodel, 0, wxALL, 5 ); - - m_Track_45_Only_Ctrl = new wxCheckBox( this, wxID_TRACKS45, _("Track only 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_Track_45_Only_Ctrl->SetToolTip( _("If enabled, force tracks directions to H, V or 45 degrees, when creating a track.") ); - - bMiddleRightBoxSizer->Add( m_Track_45_Only_Ctrl, 0, wxALL, 5 ); - - m_Segments_45_Only_Ctrl = new wxCheckBox( this, wxID_SEGMENTS45, _("Segments 45 Only"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_Segments_45_Only_Ctrl->SetToolTip( _("If enabled, force segments directions to H, V or 45 degrees, when creating a segment on technical layers.") ); - - bMiddleRightBoxSizer->Add( m_Segments_45_Only_Ctrl, 0, wxALL, 5 ); - - m_AutoPANOpt = new wxCheckBox( this, wxID_AUTOPAN, _("Auto PAN"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_AutoPANOpt->SetToolTip( _("Allows auto pan when creating a track, or moving an item.") ); - - bMiddleRightBoxSizer->Add( m_AutoPANOpt, 0, wxALL, 5 ); - - m_Track_DoubleSegm_Ctrl = new wxCheckBox( this, wxID_ANY, _("Double Segm Track"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_Track_DoubleSegm_Ctrl->SetToolTip( _("If enabled, uses two track segments, with 45 degrees angle between them when creating a new track ") ); - - bMiddleRightBoxSizer->Add( m_Track_DoubleSegm_Ctrl, 0, wxALL, 5 ); - - bMainSizer->Add( bMiddleRightBoxSizer, 1, 0, 5 ); - - wxBoxSizer* bRightSizer; - bRightSizer = new wxBoxSizer( wxVERTICAL ); - - wxString m_MagneticPadOptCtrlChoices[] = { _("Never"), _("When creating tracks"), _("Always") }; - int m_MagneticPadOptCtrlNChoices = sizeof( m_MagneticPadOptCtrlChoices ) / sizeof( wxString ); - m_MagneticPadOptCtrl = new wxRadioBox( this, wxID_ANY, _("Magnetic Pads"), wxDefaultPosition, wxDefaultSize, m_MagneticPadOptCtrlNChoices, m_MagneticPadOptCtrlChoices, 1, wxRA_SPECIFY_COLS ); - m_MagneticPadOptCtrl->SetSelection( 0 ); - m_MagneticPadOptCtrl->SetToolTip( _("control the capture of the pcb cursor when the mouse cursor enters a pad area") ); - - bRightSizer->Add( m_MagneticPadOptCtrl, 0, wxALL|wxEXPAND, 5 ); - - wxString m_MagneticTrackOptCtrlChoices[] = { _("Never"), _("When creating tracks"), _("Always") }; - int m_MagneticTrackOptCtrlNChoices = sizeof( m_MagneticTrackOptCtrlChoices ) / sizeof( wxString ); - m_MagneticTrackOptCtrl = new wxRadioBox( this, wxID_MAGNETIC_TRACKS, _("Magnetic Tracks"), wxDefaultPosition, wxDefaultSize, m_MagneticTrackOptCtrlNChoices, m_MagneticTrackOptCtrlChoices, 1, wxRA_SPECIFY_COLS ); - m_MagneticTrackOptCtrl->SetSelection( 0 ); - m_MagneticTrackOptCtrl->SetToolTip( _("Control the capture of the pcb cursor when the mouse cursor enters a track") ); - - bRightSizer->Add( m_MagneticTrackOptCtrl, 0, wxALL|wxEXPAND, 5 ); - - m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); - m_buttonOK->SetDefault(); - bRightSizer->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_buttonCANCEL = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - bRightSizer->Add( m_buttonCANCEL, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - - bMainSizer->Add( bRightSizer, 1, wxEXPAND, 5 ); - - this->SetSizer( bMainSizer ); - this->Layout(); - - // Connect Events - m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnOkClick ), NULL, this ); - m_buttonCANCEL->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnCancelClick ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bMainSizer; + bMainSizer = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bLeftSizer; + bLeftSizer = new wxBoxSizer( wxVERTICAL ); + + wxString m_PolarDisplayChoices[] = { _("No Display"), _("Display") }; + int m_PolarDisplayNChoices = sizeof( m_PolarDisplayChoices ) / sizeof( wxString ); + m_PolarDisplay = new wxRadioBox( this, wxID_POLAR_CTRL, _("Display Polar Coord"), wxDefaultPosition, wxDefaultSize, m_PolarDisplayNChoices, m_PolarDisplayChoices, 1, wxRA_SPECIFY_COLS ); + m_PolarDisplay->SetSelection( 1 ); + m_PolarDisplay->SetToolTip( _("Activates the display of relative coordinates from relative origin (set by the space key)\nto the cursor, in polar coordinates (angle and distance)") ); + + bLeftSizer->Add( m_PolarDisplay, 0, wxALL|wxEXPAND, 5 ); + + wxString m_UnitsSelectionChoices[] = { _("Inches"), _("Millimeters") }; + int m_UnitsSelectionNChoices = sizeof( m_UnitsSelectionChoices ) / sizeof( wxString ); + m_UnitsSelection = new wxRadioBox( this, wxID_UNITS, _("Units"), wxDefaultPosition, wxDefaultSize, m_UnitsSelectionNChoices, m_UnitsSelectionChoices, 1, wxRA_SPECIFY_COLS ); + m_UnitsSelection->SetSelection( 1 ); + m_UnitsSelection->SetToolTip( _("Selection of units used to display dimensions and positions of items") ); + + bLeftSizer->Add( m_UnitsSelection, 0, wxALL|wxEXPAND, 5 ); + + wxString m_CursorShapeChoices[] = { _("Small cross"), _("Full screen cursor") }; + int m_CursorShapeNChoices = sizeof( m_CursorShapeChoices ) / sizeof( wxString ); + m_CursorShape = new wxRadioBox( this, wxID_CURSOR_SHAPE, _("Cursor"), wxDefaultPosition, wxDefaultSize, m_CursorShapeNChoices, m_CursorShapeChoices, 1, wxRA_SPECIFY_COLS ); + m_CursorShape->SetSelection( 0 ); + m_CursorShape->SetToolTip( _("Main cursor shape selection (small cross or large cursor)") ); + + bLeftSizer->Add( m_CursorShape, 0, wxALL|wxEXPAND, 5 ); + + bMainSizer->Add( bLeftSizer, 1, wxEXPAND, 5 ); + + wxBoxSizer* bMiddleLeftSizer; + bMiddleLeftSizer = new wxBoxSizer( wxVERTICAL ); + + m_staticTextmaxlinks = new wxStaticText( this, wxID_ANY, _("Max Links:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextmaxlinks->Wrap( -1 ); + bMiddleLeftSizer->Add( m_staticTextmaxlinks, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_MaxShowLinks = new wxSpinCtrl( this, wxID_ANY, wxT("1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 5, 1 ); + m_MaxShowLinks->SetToolTip( _("Adjust the number of ratsnets shown from cursor to closest pads") ); + + bMiddleLeftSizer->Add( m_MaxShowLinks, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + m_staticTextautosave = new wxStaticText( this, wxID_ANY, _("Auto Save (minutes):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextautosave->Wrap( -1 ); + bMiddleLeftSizer->Add( m_staticTextautosave, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + m_SaveTime = new wxSpinCtrl( this, wxID_ANY, wxT("0"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 60, 0 ); + m_SaveTime->SetToolTip( _("Delay after the first change to create a backup file of the board on disk.") ); + + bMiddleLeftSizer->Add( m_SaveTime, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + bMainSizer->Add( bMiddleLeftSizer, 1, wxEXPAND, 5 ); + + wxStaticBoxSizer* bMiddleRightBoxSizer; + bMiddleRightBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options:") ), wxVERTICAL ); + + m_DrcOn = new wxCheckBox( this, wxID_DRC_ONOFF, _("Drc ON"), wxDefaultPosition, wxDefaultSize, 0 ); + m_DrcOn->SetValue(true); + + m_DrcOn->SetToolTip( _("Enable/disable the DRC control.\nWhen DRC is disable, all connections are allowed.") ); + + bMiddleRightBoxSizer->Add( m_DrcOn, 0, wxALL|wxEXPAND, 5 ); + + m_ShowGlobalRatsnest = new wxCheckBox( this, wxID_GENERAL_RATSNEST, _("Show Ratsnest"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_ShowGlobalRatsnest->SetToolTip( _("Show (or not) the full rastnest.") ); + + bMiddleRightBoxSizer->Add( m_ShowGlobalRatsnest, 0, wxALL, 5 ); + + m_ShowModuleRatsnest = new wxCheckBox( this, wxID_RATSNEST_MODULE, _("Show Mod Ratsnest"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_ShowModuleRatsnest->SetToolTip( _("Shows (or not) the local ratsnest relative to a footprint, when moving it.\nThis ratsnest is useful to place a footprint.") ); + + bMiddleRightBoxSizer->Add( m_ShowModuleRatsnest, 0, wxALL, 5 ); + + m_TrackAutodel = new wxCheckBox( this, wxID_TRACK_AUTODEL, _("Tracks Auto Del"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_TrackAutodel->SetToolTip( _("Enable/disable the automatic track deletion when recreating a track.") ); + + bMiddleRightBoxSizer->Add( m_TrackAutodel, 0, wxALL, 5 ); + + m_Track_45_Only_Ctrl = new wxCheckBox( this, wxID_TRACKS45, _("Track only 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_Track_45_Only_Ctrl->SetToolTip( _("If enabled, force tracks directions to H, V or 45 degrees, when creating a track.") ); + + bMiddleRightBoxSizer->Add( m_Track_45_Only_Ctrl, 0, wxALL, 5 ); + + m_Segments_45_Only_Ctrl = new wxCheckBox( this, wxID_SEGMENTS45, _("Segments 45 Only"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_Segments_45_Only_Ctrl->SetToolTip( _("If enabled, force segments directions to H, V or 45 degrees, when creating a segment on technical layers.") ); + + bMiddleRightBoxSizer->Add( m_Segments_45_Only_Ctrl, 0, wxALL, 5 ); + + m_AutoPANOpt = new wxCheckBox( this, wxID_AUTOPAN, _("Auto PAN"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_AutoPANOpt->SetToolTip( _("Allows auto pan when creating a track, or moving an item.") ); + + bMiddleRightBoxSizer->Add( m_AutoPANOpt, 0, wxALL, 5 ); + + m_Track_DoubleSegm_Ctrl = new wxCheckBox( this, wxID_ANY, _("Double Segm Track"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_Track_DoubleSegm_Ctrl->SetToolTip( _("If enabled, uses two track segments, with 45 degrees angle between them when creating a new track ") ); + + bMiddleRightBoxSizer->Add( m_Track_DoubleSegm_Ctrl, 0, wxALL, 5 ); + + bMainSizer->Add( bMiddleRightBoxSizer, 1, 0, 5 ); + + wxBoxSizer* bRightSizer; + bRightSizer = new wxBoxSizer( wxVERTICAL ); + + wxString m_MagneticPadOptCtrlChoices[] = { _("Never"), _("When creating tracks"), _("Always") }; + int m_MagneticPadOptCtrlNChoices = sizeof( m_MagneticPadOptCtrlChoices ) / sizeof( wxString ); + m_MagneticPadOptCtrl = new wxRadioBox( this, wxID_ANY, _("Magnetic Pads"), wxDefaultPosition, wxDefaultSize, m_MagneticPadOptCtrlNChoices, m_MagneticPadOptCtrlChoices, 1, wxRA_SPECIFY_COLS ); + m_MagneticPadOptCtrl->SetSelection( 0 ); + m_MagneticPadOptCtrl->SetToolTip( _("control the capture of the pcb cursor when the mouse cursor enters a pad area") ); + + bRightSizer->Add( m_MagneticPadOptCtrl, 0, wxALL|wxEXPAND, 5 ); + + wxString m_MagneticTrackOptCtrlChoices[] = { _("Never"), _("When creating tracks"), _("Always") }; + int m_MagneticTrackOptCtrlNChoices = sizeof( m_MagneticTrackOptCtrlChoices ) / sizeof( wxString ); + m_MagneticTrackOptCtrl = new wxRadioBox( this, wxID_MAGNETIC_TRACKS, _("Magnetic Tracks"), wxDefaultPosition, wxDefaultSize, m_MagneticTrackOptCtrlNChoices, m_MagneticTrackOptCtrlChoices, 1, wxRA_SPECIFY_COLS ); + m_MagneticTrackOptCtrl->SetSelection( 0 ); + m_MagneticTrackOptCtrl->SetToolTip( _("Control the capture of the pcb cursor when the mouse cursor enters a track") ); + + bRightSizer->Add( m_MagneticTrackOptCtrl, 0, wxALL|wxEXPAND, 5 ); + + m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonOK->SetDefault(); + bRightSizer->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_buttonCANCEL = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bRightSizer->Add( m_buttonCANCEL, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + bMainSizer->Add( bRightSizer, 1, wxEXPAND, 5 ); + + this->SetSizer( bMainSizer ); + this->Layout(); + + // Connect Events + m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnOkClick ), NULL, this ); + m_buttonCANCEL->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnCancelClick ), NULL, this ); } DialogGeneralOptionsBoardEditor_base::~DialogGeneralOptionsBoardEditor_base() { - // Disconnect Events - m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnOkClick ), NULL, this ); - m_buttonCANCEL->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnCancelClick ), NULL, this ); + // Disconnect Events + m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnOkClick ), NULL, this ); + m_buttonCANCEL->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnCancelClick ), NULL, this ); } diff --git a/pcbnew/dialog_general_options_BoardEditor_base.fbp b/pcbnew/dialog_general_options_BoardEditor_base.fbp index f521572d8a..cbae000860 100644 --- a/pcbnew/dialog_general_options_BoardEditor_base.fbp +++ b/pcbnew/dialog_general_options_BoardEditor_base.fbp @@ -257,60 +257,6 @@ bMiddleLeftSizer wxVERTICAL none - - 5 - wxALL|wxEXPAND - 0 - - - "1" "2" "4" "6" "8" "10" "12" "14" "16" - - 1 - - - 0 - wxID_LAYER_NUMBER - Layers: - 3 - - - m_LayerNumber - protected - - 1 - - wxRA_SPECIFY_COLS - - Active copper layers count selection - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 wxTOP|wxRIGHT|wxLEFT diff --git a/pcbnew/dialog_general_options_BoardEditor_base.h b/pcbnew/dialog_general_options_BoardEditor_base.h index acfd5a2a0a..f1988c92cf 100644 --- a/pcbnew/dialog_general_options_BoardEditor_base.h +++ b/pcbnew/dialog_general_options_BoardEditor_base.h @@ -31,55 +31,53 @@ /////////////////////////////////////////////////////////////////////////////// class DialogGeneralOptionsBoardEditor_base : public wxDialog { - private: - - protected: - enum - { - wxID_POLAR_CTRL = 1000, - wxID_UNITS, - wxID_CURSOR_SHAPE, -// wxID_LAYER_NUMBER, - wxID_DRC_ONOFF, - wxID_GENERAL_RATSNEST, - wxID_RATSNEST_MODULE, - wxID_TRACK_AUTODEL, - wxID_TRACKS45, - wxID_SEGMENTS45, - wxID_AUTOPAN, - wxID_MAGNETIC_TRACKS, - }; - - wxRadioBox* m_PolarDisplay; - wxRadioBox* m_UnitsSelection; - wxRadioBox* m_CursorShape; - //wxRadioBox* m_LayerNumber; - wxStaticText* m_staticTextmaxlinks; - wxSpinCtrl* m_MaxShowLinks; - wxStaticText* m_staticTextautosave; - wxSpinCtrl* m_SaveTime; - wxCheckBox* m_DrcOn; - wxCheckBox* m_ShowGlobalRatsnest; - wxCheckBox* m_ShowModuleRatsnest; - wxCheckBox* m_TrackAutodel; - wxCheckBox* m_Track_45_Only_Ctrl; - wxCheckBox* m_Segments_45_Only_Ctrl; - wxCheckBox* m_AutoPANOpt; - wxCheckBox* m_Track_DoubleSegm_Ctrl; - wxRadioBox* m_MagneticPadOptCtrl; - wxRadioBox* m_MagneticTrackOptCtrl; - wxButton* m_buttonOK; - wxButton* m_buttonCANCEL; - - // Virtual event handlers, overide them in your derived class - virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); } - - - public: - DialogGeneralOptionsBoardEditor_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("General settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 585,280 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~DialogGeneralOptionsBoardEditor_base(); - + private: + + protected: + enum + { + wxID_POLAR_CTRL = 1000, + wxID_UNITS, + wxID_CURSOR_SHAPE, + wxID_DRC_ONOFF, + wxID_GENERAL_RATSNEST, + wxID_RATSNEST_MODULE, + wxID_TRACK_AUTODEL, + wxID_TRACKS45, + wxID_SEGMENTS45, + wxID_AUTOPAN, + wxID_MAGNETIC_TRACKS, + }; + + wxRadioBox* m_PolarDisplay; + wxRadioBox* m_UnitsSelection; + wxRadioBox* m_CursorShape; + wxStaticText* m_staticTextmaxlinks; + wxSpinCtrl* m_MaxShowLinks; + wxStaticText* m_staticTextautosave; + wxSpinCtrl* m_SaveTime; + wxCheckBox* m_DrcOn; + wxCheckBox* m_ShowGlobalRatsnest; + wxCheckBox* m_ShowModuleRatsnest; + wxCheckBox* m_TrackAutodel; + wxCheckBox* m_Track_45_Only_Ctrl; + wxCheckBox* m_Segments_45_Only_Ctrl; + wxCheckBox* m_AutoPANOpt; + wxCheckBox* m_Track_DoubleSegm_Ctrl; + wxRadioBox* m_MagneticPadOptCtrl; + wxRadioBox* m_MagneticTrackOptCtrl; + wxButton* m_buttonOK; + wxButton* m_buttonCANCEL; + + // Virtual event handlers, overide them in your derived class + virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); } + + + public: + DialogGeneralOptionsBoardEditor_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("General settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 585,280 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DialogGeneralOptionsBoardEditor_base(); + }; #endif //__dialog_general_options_BoardEditor_base__ diff --git a/pcbnew/dialog_graphic_items_options.cpp b/pcbnew/dialog_graphic_items_options.cpp index 043ed5d015..76c145fa65 100644 --- a/pcbnew/dialog_graphic_items_options.cpp +++ b/pcbnew/dialog_graphic_items_options.cpp @@ -4,23 +4,65 @@ #include "fctsys.h" -#include "gr_basic.h" #include "common.h" #include "pcbnew.h" -#include "pcbplot.h" -#include "autorout.h" +#include "wxPcbStruct.h" #include "pcbnew_id.h" -#include "protos.h" - #include "dialog_graphic_items_options.h" -#include +extern int g_DrawDefaultLineThickness; -void WinEDA_GraphicItemsOptionsDialog::SetDisplayValue() +void WinEDA_PcbFrame::InstallPcbOptionsFrame( int id ) +{ + switch( id ) + { + case ID_PCB_DRAWINGS_WIDTHS_SETUP: + { + DIALOG_GRAPHIC_ITEMS_OPTIONS dlg( this ); + dlg.ShowModal(); + } + break; + + default: + wxMessageBox( wxT( "InstallPcbOptionsFrame() id error" ) ); + break; + } +} + + +void WinEDA_ModuleEditFrame::InstallOptionsFrame( const wxPoint& pos ) +{ + DIALOG_GRAPHIC_ITEMS_OPTIONS dlg( this ); + dlg.ShowModal(); +} + + +/* + * DIALOG_GRAPHIC_ITEMS_OPTIONS constructor + */ + +DIALOG_GRAPHIC_ITEMS_OPTIONS::DIALOG_GRAPHIC_ITEMS_OPTIONS( WinEDA_BasePcbFrame* parent ) + : DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( parent ) +{ + m_Parent = parent; + m_BrdSettings = m_Parent->GetBoard()->GetBoardDesignSettings(); + initValues( ); + + GetSizer()->SetSizeHints( this ); + + Centre(); +} + +DIALOG_GRAPHIC_ITEMS_OPTIONS::~DIALOG_GRAPHIC_ITEMS_OPTIONS( ) +{ +} + + +void DIALOG_GRAPHIC_ITEMS_OPTIONS::initValues() { /* Drawings width */ AddUnitSymbol( *m_GraphicSegmWidthTitle ); @@ -64,10 +106,14 @@ void WinEDA_GraphicItemsOptionsDialog::SetDisplayValue() AddUnitSymbol( *m_TextModSizeHTitle ); PutValueInLocalUnits( *m_OptModuleTextHSize, ModuleTextSize.x, PCB_INTERNAL_UNIT ); + + AddUnitSymbol( *m_DefaultPenSizeTitle ); + PutValueInLocalUnits( *m_DefaultPenSizeCtrl, + g_DrawDefaultLineThickness, PCB_INTERNAL_UNIT ); } -void WinEDA_GraphicItemsOptionsDialog::AcceptOptions( wxCommandEvent& event ) +void DIALOG_GRAPHIC_ITEMS_OPTIONS::OnOkClick( wxCommandEvent& event ) { m_BrdSettings->m_DrawSegmentWidth = ReturnValueFromTextCtrl( *m_OptPcbSegmWidth, PCB_INTERNAL_UNIT ); @@ -88,372 +134,23 @@ void WinEDA_GraphicItemsOptionsDialog::AcceptOptions( wxCommandEvent& event ) ReturnValueFromTextCtrl( *m_OptModuleTextVSize, PCB_INTERNAL_UNIT ); ModuleTextSize.x = ReturnValueFromTextCtrl( *m_OptModuleTextHSize, PCB_INTERNAL_UNIT ); + + g_DrawDefaultLineThickness = + ReturnValueFromTextCtrl( *m_DefaultPenSizeCtrl, PCB_INTERNAL_UNIT ); + + if( g_DrawDefaultLineThickness < 0 ) + g_DrawDefaultLineThickness = 0; EndModal( 1 ); } -/*! - * WinEDA_GraphicItemsOptionsDialog event table definition - */ - -BEGIN_EVENT_TABLE( WinEDA_GraphicItemsOptionsDialog, wxDialog ) - -////@begin WinEDA_GraphicItemsOptionsDialog event table entries -EVT_BUTTON( wxID_OK, WinEDA_GraphicItemsOptionsDialog::OnOkClick ) - -EVT_BUTTON( wxID_CANCEL, WinEDA_GraphicItemsOptionsDialog::OnCancelClick ) - -////@end WinEDA_GraphicItemsOptionsDialog event table entries - -END_EVENT_TABLE() -/*! - * WinEDA_GraphicItemsOptionsDialog constructor - */ - -WinEDA_GraphicItemsOptionsDialog::WinEDA_GraphicItemsOptionsDialog( - WinEDA_BasePcbFrame* parent, - wxWindowID id, - const wxString& caption, - const wxPoint& pos, - const wxSize& size, - long style ) -{ - m_Parent = parent; - m_BrdSettings = m_Parent->GetBoard()->GetBoardDesignSettings(); - Create( parent, id, caption, pos, size, style ); -} - - -/*! - * WinEDA_GraphicItemsOptionsDialog creator - */ - -bool WinEDA_GraphicItemsOptionsDialog::Create( wxWindow* parent, - wxWindowID id, - const wxString& caption, - const wxPoint& pos, - const wxSize& size, - long style ) -{ -////@begin WinEDA_GraphicItemsOptionsDialog member initialisation - m_GraphicSegmWidthTitle = NULL; - m_OptPcbSegmWidth = NULL; - m_BoardEdgesWidthTitle = NULL; - m_OptPcbEdgesWidth = NULL; - m_CopperTextWidthTitle = NULL; - m_OptPcbTextWidth = NULL; - m_TextSizeVTitle = NULL; - m_OptPcbTextVSize = NULL; - m_TextSizeHTitle = NULL; - m_OptPcbTextHSize = NULL; - m_EdgeModWidthTitle = NULL; - m_OptModuleEdgesWidth = NULL; - m_TextModWidthTitle = NULL; - m_OptModuleTextWidth = NULL; - m_TextModSizeVTitle = NULL; - m_OptModuleTextVSize = NULL; - m_TextModSizeHTitle = NULL; - m_OptModuleTextHSize = NULL; - -////@end WinEDA_GraphicItemsOptionsDialog member initialisation - -////@begin WinEDA_GraphicItemsOptionsDialog creation - SetExtraStyle( wxWS_EX_BLOCK_EVENTS ); - wxDialog::Create( parent, id, caption, pos, size, style ); - - CreateControls(); - if( GetSizer() ) - { - GetSizer()->SetSizeHints( this ); - } - Centre(); - -////@end WinEDA_GraphicItemsOptionsDialog creation - return true; -} - - -/*! - * Control creation for WinEDA_GraphicItemsOptionsDialog - */ - -void WinEDA_GraphicItemsOptionsDialog::CreateControls() -{ -////@begin WinEDA_GraphicItemsOptionsDialog content construction - // Generated by DialogBlocks, 29/04/2009 15:15:02 (unregistered) - - WinEDA_GraphicItemsOptionsDialog* itemDialog1 = this; - - wxBoxSizer* itemBoxSizer2 = new wxBoxSizer( wxHORIZONTAL ); - - itemDialog1->SetSizer( itemBoxSizer2 ); - - wxStaticBox* itemStaticBoxSizer3Static = - new wxStaticBox(itemDialog1, wxID_ANY, _( "Graphics:" ) ); - wxStaticBoxSizer* itemStaticBoxSizer3 = - new wxStaticBoxSizer( itemStaticBoxSizer3Static, wxVERTICAL ); - itemBoxSizer2->Add( itemStaticBoxSizer3, 0, wxGROW | wxALL, 5 ); - - m_GraphicSegmWidthTitle = - new wxStaticText( itemDialog1, wxID_STATIC, _( "Graphic segm Width" ), - wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer3->Add( m_GraphicSegmWidthTitle, - 0, - wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | - wxADJUST_MINSIZE, - 5 ); - - m_OptPcbSegmWidth = new wxTextCtrl( itemDialog1, ID_TEXTCTRL_SEGW, - _T( "" ), wxDefaultPosition, - wxDefaultSize, 0 ); - itemStaticBoxSizer3->Add( m_OptPcbSegmWidth, - 0, - wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, - 5 ); - - m_BoardEdgesWidthTitle = - new wxStaticText( itemDialog1, wxID_STATIC, _( "Board Edges Width" ), - wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer3->Add( m_BoardEdgesWidthTitle, - 0, - wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | - wxADJUST_MINSIZE, - 5 ); - - m_OptPcbEdgesWidth = - new wxTextCtrl( itemDialog1, ID_TEXTCTRL_EDGES, _T( "" ), - wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer3->Add( m_OptPcbEdgesWidth, - 0, - wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, - 5 ); - - m_CopperTextWidthTitle = - new wxStaticText( itemDialog1, wxID_STATIC, _( "Copper Text Width" ), - wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer3->Add( m_CopperTextWidthTitle, - 0, - wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | - wxADJUST_MINSIZE, - 5 ); - - m_OptPcbTextWidth = new wxTextCtrl( itemDialog1, ID_TEXTCTRL_TEXTW, - _T( "" ), wxDefaultPosition, - wxDefaultSize, 0 ); - itemStaticBoxSizer3->Add( m_OptPcbTextWidth, - 0, - wxALIGN_LEFT | wxLEFT | wxRIGHT | wxBOTTOM, - 5 ); - - m_TextSizeVTitle = new wxStaticText( itemDialog1, wxID_STATIC, - _( "Text Size V" ), wxDefaultPosition, - wxDefaultSize, 0 ); - itemStaticBoxSizer3->Add( m_TextSizeVTitle, - 0, - wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | - wxADJUST_MINSIZE, - 5 ); - - m_OptPcbTextVSize = new wxTextCtrl( itemDialog1, ID_TEXTCTRL_TEXTV, - _T( "" ), wxDefaultPosition, - wxDefaultSize, 0 ); - itemStaticBoxSizer3->Add( m_OptPcbTextVSize, - 0, - wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, - 5 ); - - m_TextSizeHTitle = new wxStaticText( itemDialog1, wxID_STATIC, - _( "Text Size H" ), wxDefaultPosition, - wxDefaultSize, 0 ); - itemStaticBoxSizer3->Add( m_TextSizeHTitle, - 0, - wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | - wxADJUST_MINSIZE, - 5 ); - - m_OptPcbTextHSize = new wxTextCtrl( itemDialog1, ID_TEXTCTRL_TEXTH, - _T( "" ), wxDefaultPosition, - wxDefaultSize, 0 ); - itemStaticBoxSizer3->Add( m_OptPcbTextHSize, - 0, - wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, - 5 ); - - itemBoxSizer2->Add( 5, 5, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 ); - - wxStaticBox* itemStaticBoxSizer15Static = - new wxStaticBox( itemDialog1, wxID_ANY, _( "Modules:" ) ); - wxStaticBoxSizer* itemStaticBoxSizer15 = - new wxStaticBoxSizer( itemStaticBoxSizer15Static, wxVERTICAL ); - itemBoxSizer2->Add( itemStaticBoxSizer15, 0, wxGROW | wxALL, 5 ); - - m_EdgeModWidthTitle = - new wxStaticText( itemDialog1, wxID_STATIC, _( "Edges Module Width" ), - wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer15->Add( m_EdgeModWidthTitle, - 0, - wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | - wxADJUST_MINSIZE, - 5 ); - - m_OptModuleEdgesWidth = new wxTextCtrl( itemDialog1, - ID_TEXTCTRL_EDGEMOD_W, - _T( "" ), - wxDefaultPosition, - wxDefaultSize, - 0 ); - itemStaticBoxSizer15->Add( m_OptModuleEdgesWidth, - 0, - wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, - 5 ); - - m_TextModWidthTitle = new wxStaticText( itemDialog1, wxID_STATIC, - _( "Text Module Width" ), - wxDefaultPosition, - wxDefaultSize, 0 ); - itemStaticBoxSizer15->Add( m_TextModWidthTitle, - 0, - wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | - wxADJUST_MINSIZE, - 5 ); - - m_OptModuleTextWidth = new wxTextCtrl( itemDialog1, - ID_TEXTCTRL_TXTMOD_W, - _T( "" ), - wxDefaultPosition, - wxDefaultSize, - 0 ); - itemStaticBoxSizer15->Add( m_OptModuleTextWidth, - 0, - wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, - 5 ); - - m_TextModSizeVTitle = new wxStaticText( itemDialog1, wxID_STATIC, - _( "Text Module Size V" ), - wxDefaultPosition, - wxDefaultSize, 0 ); - itemStaticBoxSizer15->Add( m_TextModSizeVTitle, - 0, - wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | - wxADJUST_MINSIZE, - 5 ); - - m_OptModuleTextVSize = new wxTextCtrl( itemDialog1, - ID_TEXTCTRL_TXTMOD_V, - _T( "" ), - wxDefaultPosition, - wxDefaultSize, - 0 ); - itemStaticBoxSizer15->Add( m_OptModuleTextVSize, - 0, - wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, - 5 ); - - m_TextModSizeHTitle = new wxStaticText( itemDialog1, wxID_STATIC, - _( "Text Module Size H" ), - wxDefaultPosition, - wxDefaultSize, 0 ); - itemStaticBoxSizer15->Add( m_TextModSizeHTitle, - 0, - wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | - wxADJUST_MINSIZE, - 5 ); - - m_OptModuleTextHSize = new wxTextCtrl( itemDialog1, - ID_TEXTCTRL_TXTMOD_H, - _T( "" ), - wxDefaultPosition, - wxDefaultSize, - 0 ); - itemStaticBoxSizer15->Add( m_OptModuleTextHSize, - 0, - wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, - 5 ); - - itemBoxSizer2->Add( 5, 5, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 ); - - wxBoxSizer* itemBoxSizer25 = new wxBoxSizer( wxVERTICAL ); - itemBoxSizer2->Add( itemBoxSizer25, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 ); - - wxButton* itemButton26 = new wxButton( itemDialog1, wxID_OK, _( "&OK" ), - wxDefaultPosition, - wxDefaultSize, 0 ); - itemBoxSizer25->Add( itemButton26, 0, wxGROW | wxALL, 5 ); - - wxButton* itemButton27 = new wxButton( itemDialog1, wxID_CANCEL, - _( "&Cancel" ), wxDefaultPosition, - wxDefaultSize, 0 ); - itemBoxSizer25->Add( itemButton27, 0, wxGROW | wxALL, 5 ); - -////@end WinEDA_GraphicItemsOptionsDialog content construction - SetDisplayValue(); -} - - -/*! - * Should we show tooltips? - */ - -bool WinEDA_GraphicItemsOptionsDialog::ShowToolTips() -{ - return true; -} - - -/*! - * Get bitmap resources - */ - -wxBitmap WinEDA_GraphicItemsOptionsDialog::GetBitmapResource( - const wxString& name ) -{ - // Bitmap retrieval -////@begin WinEDA_GraphicItemsOptionsDialog bitmap retrieval - wxUnusedVar( name ); - return wxNullBitmap; - -////@end WinEDA_GraphicItemsOptionsDialog bitmap retrieval -} - - -/*! - * Get icon resources - */ - -wxIcon WinEDA_GraphicItemsOptionsDialog::GetIconResource( const wxString& name ) -{ - // Icon retrieval -////@begin WinEDA_GraphicItemsOptionsDialog icon retrieval - wxUnusedVar( name ); - return wxNullIcon; - -////@end WinEDA_GraphicItemsOptionsDialog icon retrieval -} - - -/*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK - */ - -void WinEDA_GraphicItemsOptionsDialog::OnOkClick( wxCommandEvent& event ) -{ - AcceptOptions( event ); -} - - /*! * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL */ -void WinEDA_GraphicItemsOptionsDialog::OnCancelClick( wxCommandEvent& event ) +void DIALOG_GRAPHIC_ITEMS_OPTIONS::OnCancelClick( wxCommandEvent& event ) { -////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in -// WinEDA_GraphicItemsOptionsDialog. - // Before editing this code, remove the block markers. event.Skip(); - -////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in -// WinEDA_GraphicItemsOptionsDialog. } diff --git a/pcbnew/dialog_graphic_items_options.h b/pcbnew/dialog_graphic_items_options.h index f9a09a5e6f..742677564e 100644 --- a/pcbnew/dialog_graphic_items_options.h +++ b/pcbnew/dialog_graphic_items_options.h @@ -1,128 +1,53 @@ ///////////////////////////////////////////////////////////////////////////// // Name: dialog_graphic_items_options.h -// Purpose: -// Author: jean-pierre Charras -// Modified by: -// Created: 25/02/2006 09:53:27 -// RCS-ID: -// Copyright: License GNU -// Licence: -///////////////////////////////////////////////////////////////////////////// - -// Generated by DialogBlocks (unregistered), 25/02/2006 09:53:27 - +//////////////////////////////////////////////////////////////////////////////* + /* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 1992-2010 jean-pierre.charras@gipsa-lab.inpg.fr + * Copyright (C) 1992-2010 Kicad Developers, see change_log.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #ifndef _DIALOG_GRAPHIC_ITEMS_OPTIONS_H_ #define _DIALOG_GRAPHIC_ITEMS_OPTIONS_H_ -/*! - * Includes - */ - -////@begin includes -////@end includes +#include "dialog_graphic_items_options_base.h" /*! - * Forward declarations + * DIALOG_GRAPHIC_ITEMS_OPTIONS class declaration */ -////@begin forward declarations -////@end forward declarations - -/*! - * Control identifiers - */ - -////@begin control identifiers -#define ID_DIALOG 10000 -#define ID_TEXTCTRL_SEGW 10001 -#define ID_TEXTCTRL_EDGES 10002 -#define ID_TEXTCTRL_TEXTW 10003 -#define ID_TEXTCTRL_TEXTV 10004 -#define ID_TEXTCTRL_TEXTH 10005 -#define ID_TEXTCTRL_EDGEMOD_W 10006 -#define ID_TEXTCTRL_TXTMOD_W 10007 -#define ID_TEXTCTRL_TXTMOD_V 10008 -#define ID_TEXTCTRL_TXTMOD_H 10009 -#define SYMBOL_WINEDA_GRAPHICITEMSOPTIONSDIALOG_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER -#define SYMBOL_WINEDA_GRAPHICITEMSOPTIONSDIALOG_TITLE _("Texts and Drawings") -#define SYMBOL_WINEDA_GRAPHICITEMSOPTIONSDIALOG_IDNAME ID_DIALOG -#define SYMBOL_WINEDA_GRAPHICITEMSOPTIONSDIALOG_SIZE wxSize(400, 300) -#define SYMBOL_WINEDA_GRAPHICITEMSOPTIONSDIALOG_POSITION wxDefaultPosition -////@end control identifiers - -/*! - * Compatibility - */ - -#ifndef wxCLOSE_BOX -#define wxCLOSE_BOX 0x1000 -#endif - -/*! - * WinEDA_GraphicItemsOptionsDialog class declaration - */ - -class WinEDA_GraphicItemsOptionsDialog: public wxDialog +class DIALOG_GRAPHIC_ITEMS_OPTIONS: public DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE { - DECLARE_EVENT_TABLE() - public: BOARD_DESIGN_SETTINGS* m_BrdSettings; - - /// Constructors - WinEDA_GraphicItemsOptionsDialog( WinEDA_BasePcbFrame* parent, wxWindowID id = SYMBOL_WINEDA_GRAPHICITEMSOPTIONSDIALOG_IDNAME, const wxString& caption = SYMBOL_WINEDA_GRAPHICITEMSOPTIONSDIALOG_TITLE, const wxPoint& pos = SYMBOL_WINEDA_GRAPHICITEMSOPTIONSDIALOG_POSITION, const wxSize& size = SYMBOL_WINEDA_GRAPHICITEMSOPTIONSDIALOG_SIZE, long style = SYMBOL_WINEDA_GRAPHICITEMSOPTIONSDIALOG_STYLE ); - - /// Creation - bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_GRAPHICITEMSOPTIONSDIALOG_IDNAME, const wxString& caption = SYMBOL_WINEDA_GRAPHICITEMSOPTIONSDIALOG_TITLE, const wxPoint& pos = SYMBOL_WINEDA_GRAPHICITEMSOPTIONSDIALOG_POSITION, const wxSize& size = SYMBOL_WINEDA_GRAPHICITEMSOPTIONSDIALOG_SIZE, long style = SYMBOL_WINEDA_GRAPHICITEMSOPTIONSDIALOG_STYLE ); - - /// Creates the controls and sizers - void CreateControls(); - -////@begin WinEDA_GraphicItemsOptionsDialog event handler declarations - - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK - void OnOkClick( wxCommandEvent& event ); - - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL - void OnCancelClick( wxCommandEvent& event ); - -////@end WinEDA_GraphicItemsOptionsDialog event handler declarations - -////@begin WinEDA_GraphicItemsOptionsDialog member function declarations - - /// Retrieves bitmap resources - wxBitmap GetBitmapResource( const wxString& name ); - - /// Retrieves icon resources - wxIcon GetIconResource( const wxString& name ); -////@end WinEDA_GraphicItemsOptionsDialog member function declarations - - /// Should we show tooltips? - static bool ShowToolTips(); - void AcceptOptions(wxCommandEvent& event); - void SetDisplayValue(); - -////@begin WinEDA_GraphicItemsOptionsDialog member variables - wxStaticText* m_GraphicSegmWidthTitle; - wxTextCtrl* m_OptPcbSegmWidth; - wxStaticText* m_BoardEdgesWidthTitle; - wxTextCtrl* m_OptPcbEdgesWidth; - wxStaticText* m_CopperTextWidthTitle; - wxTextCtrl* m_OptPcbTextWidth; - wxStaticText* m_TextSizeVTitle; - wxTextCtrl* m_OptPcbTextVSize; - wxStaticText* m_TextSizeHTitle; - wxTextCtrl* m_OptPcbTextHSize; - wxStaticText* m_EdgeModWidthTitle; - wxTextCtrl* m_OptModuleEdgesWidth; - wxStaticText* m_TextModWidthTitle; - wxTextCtrl* m_OptModuleTextWidth; - wxStaticText* m_TextModSizeVTitle; - wxTextCtrl* m_OptModuleTextVSize; - wxStaticText* m_TextModSizeHTitle; - wxTextCtrl* m_OptModuleTextHSize; -////@end WinEDA_GraphicItemsOptionsDialog member variables WinEDA_BasePcbFrame * m_Parent; + +public: + DIALOG_GRAPHIC_ITEMS_OPTIONS( WinEDA_BasePcbFrame* parent ); + ~DIALOG_GRAPHIC_ITEMS_OPTIONS( ); + +private: + void initValues( ); + void OnOkClick( wxCommandEvent& event ); + void OnCancelClick( wxCommandEvent& event ); }; #endif diff --git a/pcbnew/dialog_graphic_items_options.pjd b/pcbnew/dialog_graphic_items_options.pjd deleted file mode 100644 index d85b123590..0000000000 --- a/pcbnew/dialog_graphic_items_options.pjd +++ /dev/null @@ -1,2002 +0,0 @@ - - -
- 0 - "" - "" - "" - "" - "" - 0 - 0 - 0 - 1 - 1 - 1 - 1 - 0 - "jean-pierre Charras" - "License GNU" - "" - 0 - 0 - 0 - "<All platforms>" - "<Any>" - "///////////////////////////////////////////////////////////////////////////// -// Name: %HEADER-FILENAME% -// Purpose: -// Author: %AUTHOR% -// Modified by: -// Created: %DATE% -// RCS-ID: -// Copyright: %COPYRIGHT% -// Licence: -///////////////////////////////////////////////////////////////////////////// - -" - "///////////////////////////////////////////////////////////////////////////// -// Name: %SOURCE-FILENAME% -// Purpose: -// Author: %AUTHOR% -// Modified by: -// Created: %DATE% -// RCS-ID: -// Copyright: %COPYRIGHT% -// Licence: -///////////////////////////////////////////////////////////////////////////// - -" - "///////////////////////////////////////////////////////////////////////////// -// Name: %SYMBOLS-FILENAME% -// Purpose: Symbols file -// Author: %AUTHOR% -// Modified by: -// Created: %DATE% -// RCS-ID: -// Copyright: %COPYRIGHT% -// Licence: -///////////////////////////////////////////////////////////////////////////// - -" - "#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma interface "%HEADER-FILENAME%" -#endif - -" - "#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "%HEADER-FILENAME%" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -" - " /// %BODY% -" - " -/*! - * %BODY% - */ - -" - "app_resources.h" - "app_resources.cpp" - "AppResources" - "app.h" - "app.cpp" - "Application" - 0 - "" - "<None>" - "<System>" - "utf-8" - "<System>" - "" - 0 - 0 - 4 - " " - "" - 0 - 0 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 -
- - - "" - "data-document" - "" - "" - 0 - 1 - 0 - 0 - - "Configurations" - "config-data-document" - "" - "" - 0 - 1 - 0 - 0 - "" - 1 - 0 - "" - "Debug" - "ANSI" - "Static" - "Modular" - "GUI" - "wxMSW" - "Dynamic" - "Yes" - "No" - "No" - "%WXVERSION%" - "%EXECUTABLE%" - "" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - 0 - 1 - "" - - - - - - - "Projects" - "root-document" - "" - "project" - 1 - 1 - 0 - 1 - - "Windows" - "html-document" - "" - "dialogsfolder" - 1 - 1 - 0 - 1 - - "Texts and Drawings" - "dialog-document" - "" - "dialog" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbDialogProxy" - 10000 - 0 - "" - 0 - "" - 0 - 0 - "ID_DIALOG" - 10000 - "WinEDA_GraphicItemsOptionsDialog" - "wxDialog" - "wxDialog" - "dialog_graphic_items_options.cpp" - "dialog_graphic_items_options.h" - "" - "Texts and Drawings" - 1 - "" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "Tiled" - 0 - 1 - 0 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - "MAYBE_RESIZE_BORDER" - 0 - 1 - -1 - -1 - 400 - 300 - 0 - "" - - "wxBoxSizer H" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "wbBoxSizerProxy" - "Horizontal" - "" - 0 - 0 - 0 - "<Any platform>" - - "wxStaticBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbStaticBoxSizerProxy" - "wxID_ANY" - "-1" - "Graphics:" - "" - "" - "" - "" - 0 - 1 - "wxStaticBox" - "Vertical" - "Centre" - "Expand" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxStaticText: wxID_STATIC" - "dialog-control-document" - "" - "statictext" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbStaticTextProxy" - "wxID_STATIC" - 5105 - "" - "wxStaticText" - "wxStaticText" - 1 - 0 - "" - "" - "m_GraphicSegmWidthTitle" - "Graphic segm Width" - -1 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - "" - "" - - - "wxTextCtrl: ID_TEXTCTRL_SEGW" - "dialog-control-document" - "" - "textctrl" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbTextCtrlProxy" - "ID_TEXTCTRL_SEGW" - 10001 - "" - "wxTextCtrl" - "wxTextCtrl" - 1 - 0 - "" - "" - "m_OptPcbSegmWidth" - "" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - "" - "" - 0 - - - "wxStaticText: wxID_STATIC" - "dialog-control-document" - "" - "statictext" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbStaticTextProxy" - "wxID_STATIC" - 5105 - "" - "wxStaticText" - "wxStaticText" - 1 - 0 - "" - "" - "m_BoardEdgesWidthTitle" - "Board Edges Width" - -1 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - "" - "" - - - "wxTextCtrl: ID_TEXTCTRL_EDGES" - "dialog-control-document" - "" - "textctrl" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbTextCtrlProxy" - "ID_TEXTCTRL_EDGES" - 10002 - "" - "wxTextCtrl" - "wxTextCtrl" - 1 - 0 - "" - "" - "m_OptPcbEdgesWidth" - "" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - "" - "" - 0 - - - "wxStaticText: wxID_STATIC" - "dialog-control-document" - "" - "statictext" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbStaticTextProxy" - "wxID_STATIC" - 5105 - "" - "wxStaticText" - "wxStaticText" - 1 - 0 - "" - "" - "m_CopperTextWidthTitle" - "Copper Text Width" - -1 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - "" - "" - - - "wxTextCtrl: ID_TEXTCTRL_TEXTW" - "dialog-control-document" - "" - "textctrl" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbTextCtrlProxy" - "ID_TEXTCTRL_TEXTW" - 10003 - "" - "wxTextCtrl" - "wxTextCtrl" - 1 - 0 - "" - "" - "m_OptPcbTextWidth" - "" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - "" - "" - 0 - - - "wxStaticText: wxID_STATIC" - "dialog-control-document" - "" - "statictext" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbStaticTextProxy" - "wxID_STATIC" - 5105 - "" - "wxStaticText" - "wxStaticText" - 1 - 0 - "" - "" - "m_TextSizeVTitle" - "Text Size V" - -1 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - "" - "" - - - "wxTextCtrl: ID_TEXTCTRL_TEXTV" - "dialog-control-document" - "" - "textctrl" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbTextCtrlProxy" - "ID_TEXTCTRL_TEXTV" - 10004 - "" - "wxTextCtrl" - "wxTextCtrl" - 1 - 0 - "" - "" - "m_OptPcbTextVSize" - "" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - "" - "" - 0 - - - "wxStaticText: wxID_STATIC" - "dialog-control-document" - "" - "statictext" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbStaticTextProxy" - "wxID_STATIC" - 5105 - "" - "wxStaticText" - "wxStaticText" - 1 - 0 - "" - "" - "m_TextSizeHTitle" - "Text Size H" - -1 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - "" - "" - - - "wxTextCtrl: ID_TEXTCTRL_TEXTH" - "dialog-control-document" - "" - "textctrl" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbTextCtrlProxy" - "ID_TEXTCTRL_TEXTH" - 10005 - "" - "wxTextCtrl" - "wxTextCtrl" - 1 - 0 - "" - "" - "m_OptPcbTextHSize" - "" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - "" - "" - 0 - - - - "Spacer" - "dialog-control-document" - "" - "spacer" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbSpacerProxy" - 5 - 5 - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - - "wxStaticBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbStaticBoxSizerProxy" - "wxID_ANY" - "-1" - "Modules:" - "" - "" - "" - "" - 0 - 1 - "wxStaticBox" - "Vertical" - "Centre" - "Expand" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxStaticText: wxID_STATIC" - "dialog-control-document" - "" - "statictext" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbStaticTextProxy" - "wxID_STATIC" - 5105 - "" - "wxStaticText" - "wxStaticText" - 1 - 0 - "" - "" - "m_EdgeModWidthTitle" - "Edges Module Width" - -1 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - "" - "" - - - "wxTextCtrl: ID_TEXTCTRL_EDGEMOD_W" - "dialog-control-document" - "" - "textctrl" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbTextCtrlProxy" - "ID_TEXTCTRL_EDGEMOD_W" - 10006 - "" - "wxTextCtrl" - "wxTextCtrl" - 1 - 0 - "" - "" - "m_OptModuleEdgesWidth" - "" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - "" - "" - 0 - - - "wxStaticText: wxID_STATIC" - "dialog-control-document" - "" - "statictext" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbStaticTextProxy" - "wxID_STATIC" - 5105 - "" - "wxStaticText" - "wxStaticText" - 1 - 0 - "" - "" - "m_TextModWidthTitle" - "Text Module Width" - -1 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - "" - "" - - - "wxTextCtrl: ID_TEXTCTRL_TXTMOD_W" - "dialog-control-document" - "" - "textctrl" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbTextCtrlProxy" - "ID_TEXTCTRL_TXTMOD_W" - 10007 - "" - "wxTextCtrl" - "wxTextCtrl" - 1 - 0 - "" - "" - "m_OptModuleTextWidth" - "" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - "" - "" - 0 - - - "wxStaticText: wxID_STATIC" - "dialog-control-document" - "" - "statictext" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbStaticTextProxy" - "wxID_STATIC" - 5105 - "" - "wxStaticText" - "wxStaticText" - 1 - 0 - "" - "" - "m_TextModSizeVTitle" - "Text Module Size V" - -1 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - "" - "" - - - "wxTextCtrl: ID_TEXTCTRL_TXTMOD_V" - "dialog-control-document" - "" - "textctrl" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbTextCtrlProxy" - "ID_TEXTCTRL_TXTMOD_V" - 10008 - "" - "wxTextCtrl" - "wxTextCtrl" - 1 - 0 - "" - "" - "m_OptModuleTextVSize" - "" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - "" - "" - 0 - - - "wxStaticText: wxID_STATIC" - "dialog-control-document" - "" - "statictext" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbStaticTextProxy" - "wxID_STATIC" - 5105 - "" - "wxStaticText" - "wxStaticText" - 1 - 0 - "" - "" - "m_TextModSizeHTitle" - "Text Module Size H" - -1 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - "" - "" - - - "wxTextCtrl: ID_TEXTCTRL_TXTMOD_H" - "dialog-control-document" - "" - "textctrl" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbTextCtrlProxy" - "ID_TEXTCTRL_TXTMOD_H" - 10009 - "" - "wxTextCtrl" - "wxTextCtrl" - 1 - 0 - "" - "" - "m_OptModuleTextHSize" - "" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - "" - "" - 0 - - - - "Spacer" - "dialog-control-document" - "" - "spacer" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbSpacerProxy" - 5 - 5 - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - - "wxBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbBoxSizerProxy" - "Vertical" - "" - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxButton: wxID_OK" - "dialog-control-document" - "" - "dialogcontrol" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbButtonProxy" - "wxEVT_COMMAND_BUTTON_CLICKED|OnOkClick" - "wxID_OK" - 5100 - "" - "wxButton" - "wxButton" - 1 - 0 - "" - "" - "" - "&OK" - 0 - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxButton: wxID_CANCEL" - "dialog-control-document" - "" - "dialogcontrol" - 0 - 1 - 0 - 0 - "25/6/2006" - "wbButtonProxy" - "wxEVT_COMMAND_BUTTON_CLICKED|OnCancelClick" - "wxID_CANCEL" - 5101 - "" - "wxButton" - "wxButton" - 1 - 0 - "" - "" - "" - "&Cancel" - 0 - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - - - - - "Sources" - "html-document" - "" - "sourcesfolder" - 1 - 1 - 0 - 1 - - "dialog_graphic_items_options.rc" - "source-editor-document" - "dialog_graphic_items_options.rc" - "source-editor" - 0 - 0 - 1 - 0 - "25/6/2006" - "" - - - - "Images" - "html-document" - "" - "bitmapsfolder" - 1 - 1 - 0 - 1 - - - - -
diff --git a/pcbnew/dialog_graphic_items_options.rc b/pcbnew/dialog_graphic_items_options.rc deleted file mode 100644 index b86c4e2265..0000000000 --- a/pcbnew/dialog_graphic_items_options.rc +++ /dev/null @@ -1 +0,0 @@ -#include "wx/msw/wx.rc" diff --git a/pcbnew/dialog_graphic_items_options_base.cpp b/pcbnew/dialog_graphic_items_options_base.cpp new file mode 100644 index 0000000000..968c932edc --- /dev/null +++ b/pcbnew/dialog_graphic_items_options_base.cpp @@ -0,0 +1,132 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 16 2008) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_graphic_items_options_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizerMain; + bSizerMain = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizerUpper; + bSizerUpper = new wxBoxSizer( wxHORIZONTAL ); + + wxStaticBoxSizer* sbSizerLeft; + sbSizerLeft = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Graphics:") ), wxVERTICAL ); + + m_GraphicSegmWidthTitle = new wxStaticText( this, wxID_ANY, _("Graphic segm Width"), wxDefaultPosition, wxDefaultSize, 0 ); + m_GraphicSegmWidthTitle->Wrap( -1 ); + sbSizerLeft->Add( m_GraphicSegmWidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_OptPcbSegmWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizerLeft->Add( m_OptPcbSegmWidth, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_BoardEdgesWidthTitle = new wxStaticText( this, wxID_ANY, _("Board Edges Width"), wxDefaultPosition, wxDefaultSize, 0 ); + m_BoardEdgesWidthTitle->Wrap( -1 ); + sbSizerLeft->Add( m_BoardEdgesWidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_OptPcbEdgesWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizerLeft->Add( m_OptPcbEdgesWidth, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_CopperTextWidthTitle = new wxStaticText( this, wxID_ANY, _("Copper Text Width"), wxDefaultPosition, wxDefaultSize, 0 ); + m_CopperTextWidthTitle->Wrap( -1 ); + sbSizerLeft->Add( m_CopperTextWidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_OptPcbTextWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizerLeft->Add( m_OptPcbTextWidth, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_TextSizeVTitle = new wxStaticText( this, wxID_ANY, _("Text Size V"), wxDefaultPosition, wxDefaultSize, 0 ); + m_TextSizeVTitle->Wrap( -1 ); + sbSizerLeft->Add( m_TextSizeVTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_OptPcbTextVSize = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizerLeft->Add( m_OptPcbTextVSize, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_TextSizeHTitle = new wxStaticText( this, wxID_ANY, _("Text Size H"), wxDefaultPosition, wxDefaultSize, 0 ); + m_TextSizeHTitle->Wrap( -1 ); + sbSizerLeft->Add( m_TextSizeHTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_OptPcbTextHSize = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizerLeft->Add( m_OptPcbTextHSize, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + bSizerUpper->Add( sbSizerLeft, 1, wxEXPAND|wxALL, 5 ); + + wxStaticBoxSizer* sbSizerMiddle; + sbSizerMiddle = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Modules:") ), wxVERTICAL ); + + m_EdgeModWidthTitle = new wxStaticText( this, wxID_ANY, _("Edges Module Width"), wxDefaultPosition, wxDefaultSize, 0 ); + m_EdgeModWidthTitle->Wrap( -1 ); + sbSizerMiddle->Add( m_EdgeModWidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_OptModuleEdgesWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizerMiddle->Add( m_OptModuleEdgesWidth, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_TextModWidthTitle = new wxStaticText( this, wxID_ANY, _("Text Module Width"), wxDefaultPosition, wxDefaultSize, 0 ); + m_TextModWidthTitle->Wrap( -1 ); + sbSizerMiddle->Add( m_TextModWidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_OptModuleTextWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizerMiddle->Add( m_OptModuleTextWidth, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + m_TextModSizeVTitle = new wxStaticText( this, wxID_ANY, _("Text Module Size V"), wxDefaultPosition, wxDefaultSize, 0 ); + m_TextModSizeVTitle->Wrap( -1 ); + sbSizerMiddle->Add( m_TextModSizeVTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_OptModuleTextVSize = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizerMiddle->Add( m_OptModuleTextVSize, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + m_TextModSizeHTitle = new wxStaticText( this, wxID_ANY, _("Text Module Size H"), wxDefaultPosition, wxDefaultSize, 0 ); + m_TextModSizeHTitle->Wrap( -1 ); + sbSizerMiddle->Add( m_TextModSizeHTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_OptModuleTextHSize = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizerMiddle->Add( m_OptModuleTextHSize, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + bSizerUpper->Add( sbSizerMiddle, 1, wxEXPAND|wxALL, 5 ); + + wxStaticBoxSizer* sbSizerRight; + sbSizerRight = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("General:") ), wxVERTICAL ); + + m_DefaultPenSizeTitle = new wxStaticText( this, wxID_ANY, _("Default pen size:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_DefaultPenSizeTitle->Wrap( -1 ); + m_DefaultPenSizeTitle->SetToolTip( _("Pen size used to draw items that have no pen size specified.\nUsed mainly to draw items in sketch mode.") ); + + sbSizerRight->Add( m_DefaultPenSizeTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_DefaultPenSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizerRight->Add( m_DefaultPenSizeCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + bSizerUpper->Add( sbSizerRight, 1, wxEXPAND|wxALL, 5 ); + + bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 ); + + m_sdbSizer1 = new wxStdDialogButtonSizer(); + m_sdbSizer1OK = new wxButton( this, wxID_OK ); + m_sdbSizer1->AddButton( m_sdbSizer1OK ); + m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL ); + m_sdbSizer1->AddButton( m_sdbSizer1Cancel ); + m_sdbSizer1->Realize(); + bSizerMain->Add( m_sdbSizer1, 0, wxALIGN_RIGHT|wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + this->SetSizer( bSizerMain ); + this->Layout(); + + // Connect Events + m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::OnCancelClick ), NULL, this ); + m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::OnOkClick ), NULL, this ); +} + +DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::~DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE() +{ + // Disconnect Events + m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::OnCancelClick ), NULL, this ); + m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::OnOkClick ), NULL, this ); +} diff --git a/pcbnew/dialog_graphic_items_options_base.fbp b/pcbnew/dialog_graphic_items_options_base.fbp new file mode 100644 index 0000000000..56cf674822 --- /dev/null +++ b/pcbnew/dialog_graphic_items_options_base.fbp @@ -0,0 +1,1220 @@ + + + + + + C++ + 1 + UTF-8 + connect + dialog_graphic_items_options_base + 1000 + none + 1 + dialog_graphic_items_options + + . + + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE + + 459,315 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + + Texts and Drawings + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizerMain + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + bSizerUpper + wxHORIZONTAL + none + + 5 + wxEXPAND|wxALL + 1 + + wxID_ANY + Graphics: + + sbSizerLeft + wxVERTICAL + none + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Graphic segm Width + + + m_GraphicSegmWidthTitle + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_OptPcbSegmWidth + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Board Edges Width + + + m_BoardEdgesWidthTitle + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_OptPcbEdgesWidth + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Copper Text Width + + + m_CopperTextWidthTitle + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_OptPcbTextWidth + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Text Size V + + + m_TextSizeVTitle + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_OptPcbTextVSize + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Text Size H + + + m_TextSizeHTitle + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_OptPcbTextHSize + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALL + 1 + + wxID_ANY + Modules: + + sbSizerMiddle + wxVERTICAL + none + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Edges Module Width + + + m_EdgeModWidthTitle + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_OptModuleEdgesWidth + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Text Module Width + + + m_TextModWidthTitle + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_OptModuleTextWidth + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Text Module Size V + + + m_TextModSizeVTitle + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_OptModuleTextVSize + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Text Module Size H + + + m_TextModSizeHTitle + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_OptModuleTextHSize + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALL + 1 + + wxID_ANY + General: + + sbSizerRight + wxVERTICAL + none + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Default pen size: + + + m_DefaultPenSizeTitle + protected + + + + + Pen size used to draw items that have no pen size specified. Used mainly to draw items in sketch mode. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_DefaultPenSizeCtrl + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT|wxEXPAND|wxTOP|wxBOTTOM + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_sdbSizer1 + protected + + OnCancelClick + + + + OnOkClick + + + + + + + + diff --git a/pcbnew/dialog_graphic_items_options_base.h b/pcbnew/dialog_graphic_items_options_base.h new file mode 100644 index 0000000000..e44e4c5f7d --- /dev/null +++ b/pcbnew/dialog_graphic_items_options_base.h @@ -0,0 +1,71 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 16 2008) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __dialog_graphic_items_options_base__ +#define __dialog_graphic_items_options_base__ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE : public wxDialog +{ + private: + + protected: + wxStaticText* m_GraphicSegmWidthTitle; + wxTextCtrl* m_OptPcbSegmWidth; + wxStaticText* m_BoardEdgesWidthTitle; + wxTextCtrl* m_OptPcbEdgesWidth; + wxStaticText* m_CopperTextWidthTitle; + wxTextCtrl* m_OptPcbTextWidth; + wxStaticText* m_TextSizeVTitle; + wxTextCtrl* m_OptPcbTextVSize; + wxStaticText* m_TextSizeHTitle; + wxTextCtrl* m_OptPcbTextHSize; + wxStaticText* m_EdgeModWidthTitle; + wxTextCtrl* m_OptModuleEdgesWidth; + wxStaticText* m_TextModWidthTitle; + wxTextCtrl* m_OptModuleTextWidth; + wxStaticText* m_TextModSizeVTitle; + wxTextCtrl* m_OptModuleTextVSize; + wxStaticText* m_TextModSizeHTitle; + wxTextCtrl* m_OptModuleTextHSize; + wxStaticText* m_DefaultPenSizeTitle; + wxTextCtrl* m_DefaultPenSizeCtrl; + wxStdDialogButtonSizer* m_sdbSizer1; + wxButton* m_sdbSizer1OK; + wxButton* m_sdbSizer1Cancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); } + virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); } + + + public: + DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Texts and Drawings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 459,315 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE(); + +}; + +#endif //__dialog_graphic_items_options_base__ diff --git a/pcbnew/dialog_plot_base.cpp b/pcbnew/dialog_plot_base.cpp index 56e6b45ddd..78f2229d1b 100644 --- a/pcbnew/dialog_plot_base.cpp +++ b/pcbnew/dialog_plot_base.cpp @@ -171,8 +171,10 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr bButtonsSizer->Add( m_PlotNoViaOnMaskOpt, 0, wxALL, 5 ); - m_staticText6 = new wxStaticText( this, wxID_ANY, _("Line width"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText6 = new wxStaticText( this, wxID_ANY, _("Default pen size:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText6->Wrap( -1 ); + m_staticText6->SetToolTip( _("Pen size used to draw items that have no pen size specified.\nUsed mainly to draw items in sketch mode.") ); + bButtonsSizer->Add( m_staticText6, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_LinesWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); diff --git a/pcbnew/dialog_plot_base.fbp b/pcbnew/dialog_plot_base.fbp index d406696954..422bd64fe8 100644 --- a/pcbnew/dialog_plot_base.fbp +++ b/pcbnew/dialog_plot_base.fbp @@ -1368,7 +1368,7 @@ 0 wxID_ANY - Line width + Default pen size: m_staticText6 @@ -1377,7 +1377,7 @@ - + Pen size used to draw items that have no pen size specified. Used mainly to draw items in sketch mode. diff --git a/pcbnew/dialog_print_for_modedit.cpp b/pcbnew/dialog_print_for_modedit.cpp index d8de32b469..4dee1258cd 100644 --- a/pcbnew/dialog_print_for_modedit.cpp +++ b/pcbnew/dialog_print_for_modedit.cpp @@ -102,11 +102,12 @@ void DIALOG_PRINT_FOR_MODEDIT::InitValues( ) int scale_Select = 3; // default selected scale = ScaleList[3] = 1 if( m_Config ) { - m_Config->Read( OPTKEY_PLOT_LINEWIDTH_VALUE, &s_Parameters.m_PenDefaultSize ); m_Config->Read( OPTKEY_PRINT_MODULE_SCALE, &scale_Select ); m_Config->Read( OPTKEY_PRINT_MONOCHROME_MODE, &s_Parameters.m_Print_Black_and_White, 1); } + extern int g_DrawDefaultLineThickness; + s_Parameters.m_PenDefaultSize = g_DrawDefaultLineThickness; m_ScaleOption->SetSelection( scale_Select ); if( s_Parameters.m_Print_Black_and_White ) diff --git a/pcbnew/dialog_print_using_printer.cpp b/pcbnew/dialog_print_using_printer.cpp index cbda306f6a..008ac72748 100644 --- a/pcbnew/dialog_print_using_printer.cpp +++ b/pcbnew/dialog_print_using_printer.cpp @@ -22,6 +22,10 @@ #define WIDTH_MAX_VALUE 1000 #define WIDTH_MIN_VALUE 1 + +extern int g_DrawDefaultLineThickness; + +// Local variables static long s_SelectedLayers; static double s_ScaleList[] = { 0, 0.5, 0.7, 0.999, 1.0, 1.4, 2.0, 3.0, 4.0 }; @@ -33,7 +37,6 @@ static double s_ScaleList[] = // static print data and page setup data, to remember settings during the session static wxPrintData* g_PrintData; -// Variables locales static PRINT_PARAMETERS s_Parameters; @@ -190,7 +193,6 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) if( m_Config ) { - m_Config->Read( OPTKEY_PLOT_LINEWIDTH_VALUE, &s_Parameters.m_PenDefaultSize ); m_Config->Read( OPTKEY_PRINT_X_FINESCALE_ADJ, &s_Parameters.m_XScaleAdjust ); m_Config->Read( OPTKEY_PRINT_Y_FINESCALE_ADJ, &s_Parameters.m_YScaleAdjust ); m_Config->Read( OPTKEY_PRINT_SCALE, &scale_idx ); @@ -241,6 +243,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) else m_ModeColorOption->SetSelection( 0 ); + s_Parameters.m_PenDefaultSize = g_DrawDefaultLineThickness; AddUnitSymbol( *m_TextPenWidth, g_UnitMetric ); m_DialogPenWidth->SetValue( ReturnStringFromValue( g_UnitMetric, s_Parameters.m_PenDefaultSize, m_Parent->m_InternalUnits ) ); @@ -321,7 +324,6 @@ void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event ) if( m_Config ) { - m_Config->Write( OPTKEY_PLOT_LINEWIDTH_VALUE, s_Parameters.m_PenDefaultSize ); m_Config->Write( OPTKEY_PRINT_X_FINESCALE_ADJ, s_Parameters.m_XScaleAdjust ); m_Config->Write( OPTKEY_PRINT_Y_FINESCALE_ADJ, s_Parameters.m_YScaleAdjust ); m_Config->Write( OPTKEY_PRINT_SCALE, m_ScaleOption->GetSelection() ); @@ -404,6 +406,8 @@ void DIALOG_PRINT_USING_PRINTER::SetPenWidth() s_Parameters.m_PenDefaultSize = WIDTH_MIN_VALUE; } + g_DrawDefaultLineThickness = s_Parameters.m_PenDefaultSize; + m_DialogPenWidth->SetValue( ReturnStringFromValue( g_UnitMetric, s_Parameters.m_PenDefaultSize, m_Parent->m_InternalUnits ) ); } diff --git a/pcbnew/dialog_print_using_printer_base.cpp b/pcbnew/dialog_print_using_printer_base.cpp index 90678f16ff..8aece2c5c0 100644 --- a/pcbnew/dialog_print_using_printer_base.cpp +++ b/pcbnew/dialog_print_using_printer_base.cpp @@ -75,7 +75,7 @@ DIALOG_PRINT_USING_PRINTER_base::DIALOG_PRINT_USING_PRINTER_base( wxWindow* pare wxStaticBoxSizer* sbOptionsSizer; sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options:") ), wxVERTICAL ); - m_TextPenWidth = new wxStaticText( this, wxID_ANY, _("Default Pen Size:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_TextPenWidth = new wxStaticText( this, wxID_ANY, _("Default pen size:"), wxDefaultPosition, wxDefaultSize, 0 ); m_TextPenWidth->Wrap( -1 ); m_TextPenWidth->SetToolTip( _("Pen size used to draw items that have no pen size specified.\nUsed mainly to draw items in sketch mode.") ); @@ -135,6 +135,7 @@ DIALOG_PRINT_USING_PRINTER_base::DIALOG_PRINT_USING_PRINTER_base( wxWindow* pare bbuttonsSizer->Add( m_buttonPrint, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonQuit->SetDefault(); bbuttonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); diff --git a/pcbnew/dialog_print_using_printer_base.fbp b/pcbnew/dialog_print_using_printer_base.fbp index e79b26459c..da4e49693a 100644 --- a/pcbnew/dialog_print_using_printer_base.fbp +++ b/pcbnew/dialog_print_using_printer_base.fbp @@ -490,7 +490,7 @@ 0 wxID_ANY - Default Pen Size: + Default pen size: m_TextPenWidth diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index b65996b6d5..a6c8124423 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -48,9 +48,10 @@ #include "class_pcb_layer_widget.h" #include "hotkeys.h" - +extern int g_DrawDefaultLineThickness; // Keys used in read/write config +#define OPTKEY_DEFAULT_LINEWIDTH_VALUE wxT( "PlotLineWidth" ) #define PCB_SHOW_FULL_RATSNET_OPT wxT( "PcbFulRatsnest" ) #define PCB_MAGNETIC_PADS_OPT wxT( "PcbMagPadOpt" ) #define PCB_MAGNETIC_TRACKS_OPT wxT( "PcbMagTrackOpt" ) @@ -494,6 +495,7 @@ void WinEDA_PcbFrame::LoadSettings() WinEDA_BasePcbFrame::LoadSettings(); long tmp; + config->Read( OPTKEY_DEFAULT_LINEWIDTH_VALUE, &g_DrawDefaultLineThickness ); config->Read( PCB_SHOW_FULL_RATSNET_OPT, &tmp ); GetBoard()->SetElementVisibility(RATSNEST_VISIBLE, tmp); config->Read( PCB_MAGNETIC_PADS_OPT, &g_MagneticPadOption ); @@ -514,6 +516,7 @@ void WinEDA_PcbFrame::SaveSettings() wxRealPoint GridSize = GetScreen()->GetGridSize(); + config->Write( OPTKEY_DEFAULT_LINEWIDTH_VALUE, g_DrawDefaultLineThickness ); long tmp = GetBoard()->IsElementVisible(RATSNEST_VISIBLE); config->Write( PCB_SHOW_FULL_RATSNET_OPT, tmp ); config->Write( PCB_MAGNETIC_PADS_OPT, (long) g_MagneticPadOption ); diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index ed9a7294c1..ae57184605 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -31,10 +31,13 @@ // Colors for layers and items COLORS_DESIGN_SETTINGS g_ColorsSettings; +int g_DrawDefaultLineThickness = 60; /* Default line thickness in PCBNEW units used to + * draw/plot items having a + * default thickness line value (Frame references) + * (i.e. = 0 ). 0 = single pixel line width */ bool Drc_On = true; bool g_AutoDeleteOldTrack = true; -bool g_No_Via_Route; bool g_Drag_Pistes_On; bool g_Show_Module_Ratsnest; bool g_Show_Pads_Module_in_Move = true; @@ -45,7 +48,6 @@ bool g_TwoSegmentTrackBuild = true; bool g_HighLight_Status; extern PARAM_CFG_BASE* ParamCfgList[]; -int Angle_Rot_Module; int ModuleSegmentWidth; int ModuleTextWidth; int Route_Layer_TOP; @@ -77,7 +79,7 @@ IMPLEMENT_APP( WinEDA_App ) void WinEDA_App::MacOpenFile(const wxString &fileName) { wxFileName filename = fileName; WinEDA_PcbFrame * frame = ((WinEDA_PcbFrame*) GetTopWindow()); - + if(!filename.FileExists()) return; diff --git a/pcbnew/pcbnew.h b/pcbnew/pcbnew.h index b869ad5722..b1ee5dc5ae 100644 --- a/pcbnew/pcbnew.h +++ b/pcbnew/pcbnew.h @@ -52,7 +52,6 @@ /* variables */ extern bool Drc_On; extern bool g_AutoDeleteOldTrack; -extern bool g_No_Via_Route; extern bool g_Drag_Pistes_On; extern bool g_Show_Module_Ratsnest; extern bool g_Show_Pads_Module_in_Move; @@ -67,7 +66,6 @@ extern wxString g_Shapes3DExtBuffer; extern wxString g_DocModulesFileName; /* Variables used in footprint handling */ -extern int Angle_Rot_Module; extern wxSize ModuleTextSize; /* Default footprint texts size */ extern int ModuleTextWidth; extern int ModuleSegmentWidth; diff --git a/pcbnew/pcbplot.cpp b/pcbnew/pcbplot.cpp index 48cf9e2d8c..b1c717fc76 100644 --- a/pcbnew/pcbplot.cpp +++ b/pcbnew/pcbplot.cpp @@ -55,6 +55,8 @@ static bool s_PlotOriginIsAuxAxis = FALSE; /* The group of plot options - sadly global XXX */ PCB_Plot_Options g_pcb_plot_options; +extern int g_DrawDefaultLineThickness; + /*******************************/ /* Dialog box for plot control */ @@ -140,12 +142,12 @@ void DIALOG_PLOT::Init_Dialog() BOARD* board = m_Parent->GetBoard(); m_Config->Read( OPTKEY_OUTPUT_FORMAT, &g_pcb_plot_options.PlotFormat ); - m_Config->Read( OPTKEY_PLOT_LINEWIDTH_VALUE, &g_pcb_plot_options.PlotLine_Width ); m_Config->Read( OPTKEY_EDGELAYER_GERBER, &g_pcb_plot_options.Exclude_Edges_Pcb ); m_Config->Read( OPTKEY_XFINESCALE_ADJ, &m_XScaleAdjust ); m_Config->Read( OPTKEY_YFINESCALE_ADJ, &m_YScaleAdjust ); m_PlotFormatOpt->SetSelection( g_pcb_plot_options.PlotFormat ); + g_pcb_plot_options.PlotLine_Width = g_DrawDefaultLineThickness; // Set units and value for HPGL pen speed. @@ -455,6 +457,8 @@ void DIALOG_PLOT::SaveOptPlot( wxCommandEvent& event ) msg = m_LinesWidth->GetValue(); tmp = ReturnValueFromString( g_UnitMetric, msg, PCB_INTERNAL_UNIT ); g_pcb_plot_options.PlotLine_Width = tmp; + g_DrawDefaultLineThickness = g_pcb_plot_options.PlotLine_Width; + msg = m_FineAdjustXscaleOpt->GetValue(); msg.ToDouble( &m_XScaleAdjust ); @@ -472,8 +476,6 @@ void DIALOG_PLOT::SaveOptPlot( wxCommandEvent& event ) int formatNdx = m_PlotFormatOpt->GetSelection(); m_Config->Write( OPTKEY_OUTPUT_FORMAT, formatNdx ); - m_Config->Write( OPTKEY_PLOT_LINEWIDTH_VALUE, - g_pcb_plot_options.PlotLine_Width ); wxString layerKey; for( int layer = 0; layerDrawBackGround( DC ); - TraceWorkSheet( DC, GetScreen(), 0 ); + TraceWorkSheet( DC, GetScreen(), g_DrawDefaultLineThickness ); GetBoard()->Draw( DrawPanel, DC, GR_OR );