Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
f34be930
Commit
f34be930
authored
Mar 24, 2008
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure graphic and footprint texts have a sufficient size to be seen on screen.(bug 1909165).
parent
58c7bafe
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
396 additions
and
322 deletions
+396
-322
change_log.txt
change_log.txt
+6
-0
base_screen.cpp
common/base_screen.cpp
+13
-15
base_struct.cpp
common/base_struct.cpp
+1
-1
kicad.mo
internat/fr/kicad.mo
+0
-0
kicad.po
internat/fr/kicad.po
+31
-72
class_module.cpp
pcbnew/class_module.cpp
+8
-5
class_pcb_text.cpp
pcbnew/class_pcb_text.cpp
+3
-0
dialog_edit_mod_text.cpp
pcbnew/dialog_edit_mod_text.cpp
+295
-211
pcbcfg.h
pcbnew/pcbcfg.h
+16
-16
pcbnew.h
pcbnew/pcbnew.h
+5
-1
pcbtexte.cpp
pcbnew/pcbtexte.cpp
+18
-1
No files found.
change_log.txt
View file @
f34be930
...
@@ -5,6 +5,12 @@ Started 2007-June-11
...
@@ -5,6 +5,12 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
Please add newer entries at the top, list the date and your name with
email address.
email address.
2008-Mar-24 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+pcbnew
Ensure graphic and footprint texts have a sufficient size to be seen on screen.
(bug 1909165, due to text on edge layer with a 0 value for X size)
2008-Mar-22 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
2008-Mar-22 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
================================================================================
+pcbnew
+pcbnew
...
...
common/base_screen.cpp
View file @
f34be930
/***************************************************************
***
/
/***************************************************************/
/*
drawpanel.cpp - fonctions des classes du type WinEDA_DrawPanel
*/
/*
base_screen.cpp - fonctions des classes du type BASE_SCREEN
*/
/***************************************************************
***
/
/***************************************************************/
#ifdef __GNUG__
#ifdef __GNUG__
#pragma implementation
#pragma implementation
...
@@ -49,17 +49,17 @@ BASE_SCREEN::~BASE_SCREEN()
...
@@ -49,17 +49,17 @@ BASE_SCREEN::~BASE_SCREEN()
void
BASE_SCREEN
::
InitDatas
()
void
BASE_SCREEN
::
InitDatas
()
/*******************************/
/*******************************/
{
{
m_ScreenNumber
=
m_NumberOfScreen
=
1
;
/*
gestion hierarchie
: Root: ScreenNumber = 1 */
m_ScreenNumber
=
m_NumberOfScreen
=
1
;
/*
Hierarchy
: Root: ScreenNumber = 1 */
m_Zoom
=
32
;
m_Zoom
=
32
;
m_Grid
=
wxSize
(
50
,
50
);
/*
pas de la grill
e */
m_Grid
=
wxSize
(
50
,
50
);
/*
Default grid siz
e */
m_UserGrid
=
g_UserGrid
;
/*
pas de la grille "utilisateur"
*/
m_UserGrid
=
g_UserGrid
;
/*
User Default grid size
*/
m_UserGridIsON
=
FALSE
;
m_UserGridIsON
=
FALSE
;
m_UserGridUnit
=
g_UserGrid_Unit
;
m_UserGridUnit
=
g_UserGrid_Unit
;
m_Diviseur_Grille
=
1
;
m_Diviseur_Grille
=
1
;
m_Center
=
TRUE
;
m_Center
=
TRUE
;
/*
offsets pour tracer le circuit sur l'ecran
*/
/*
Init draw offset and default page size
*/
switch
(
m_Type
)
// Init taille sheet par defaut
switch
(
m_Type
)
{
{
case
SCHEMATIC_FRAME
:
case
SCHEMATIC_FRAME
:
m_Center
=
FALSE
;
m_Center
=
FALSE
;
...
@@ -100,9 +100,9 @@ void BASE_SCREEN::InitDatas()
...
@@ -100,9 +100,9 @@ void BASE_SCREEN::InitDatas()
SetCurItem
(
NULL
);
SetCurItem
(
NULL
);
/* indicateurs divers */
/* indicateurs divers */
m_FlagRefreshReq
=
0
;
/*
indique que l'ecran doit redessine
*/
m_FlagRefreshReq
=
0
;
/*
Redraw screen requste flag
*/
m_FlagModified
=
0
;
//
indique modif du PCB,utilise pour eviter une sortie sans sauvegarde
m_FlagModified
=
0
;
//
Set when any change is made on borad
m_FlagSave
=
1
;
//
indique sauvegarde auto fait
e
m_FlagSave
=
1
;
//
Used in auto save: set when an auto save is mad
e
}
}
...
@@ -148,8 +148,8 @@ int BASE_SCREEN::GetInternalUnits()
...
@@ -148,8 +148,8 @@ int BASE_SCREEN::GetInternalUnits()
wxSize
BASE_SCREEN
::
ReturnPageSize
()
wxSize
BASE_SCREEN
::
ReturnPageSize
()
/*****************************************/
/*****************************************/
/* Ret
ourne en unites internes la taille de la feuille de dessin
/* Ret
urn in internal units the page size
*
(la taille de la feuille est connue en 1/1000 ")
*
Note: the page size is handled in 1/1000 ", not in internal units
*/
*/
{
{
wxSize
PageSize
;
wxSize
PageSize
;
...
@@ -208,7 +208,6 @@ void BASE_SCREEN::SetZoomList( const int* zoomlist )
...
@@ -208,7 +208,6 @@ void BASE_SCREEN::SetZoomList( const int* zoomlist )
/***********************************/
/***********************************/
void
BASE_SCREEN
::
SetFirstZoom
()
void
BASE_SCREEN
::
SetFirstZoom
()
/***********************************/
/***********************************/
/* ajuste le coeff de zoom a 1*/
{
{
m_Zoom
=
1
;
m_Zoom
=
1
;
}
}
...
@@ -225,7 +224,6 @@ int BASE_SCREEN::GetZoom() const
...
@@ -225,7 +224,6 @@ int BASE_SCREEN::GetZoom() const
/***********************************/
/***********************************/
void
BASE_SCREEN
::
SetZoom
(
int
coeff
)
void
BASE_SCREEN
::
SetZoom
(
int
coeff
)
/***********************************/
/***********************************/
/* ajuste le coeff de zoom a coeff */
{
{
m_Zoom
=
coeff
;
m_Zoom
=
coeff
;
if
(
m_Zoom
<
1
)
if
(
m_Zoom
<
1
)
...
...
common/base_struct.cpp
View file @
f34be930
...
@@ -559,7 +559,7 @@ void EDA_TextStruct::CreateDrawData()
...
@@ -559,7 +559,7 @@ void EDA_TextStruct::CreateDrawData()
/* lorsque les chars sont trop petits pour etre dessines,
/* lorsque les chars sont trop petits pour etre dessines,
* le texte est symbolise par une barre */
* le texte est symbolise par une barre */
m_ZoomLevelDrawable
=
m_Size
.
x
/
3
;
m_ZoomLevelDrawable
=
MAX
(
ABS
(
m_Size
.
x
),
ABS
(
m_Size
.
y
)
)
/
3
;
dx
=
(
espacement
*
nbchar
)
/
2
;
dx
=
(
espacement
*
nbchar
)
/
2
;
dy
=
size_v
/
2
;
/* Decalage du debut du texte / centre */
dy
=
size_v
/
2
;
/* Decalage du debut du texte / centre */
...
...
internat/fr/kicad.mo
View file @
f34be930
No preview for this file type
internat/fr/kicad.po
View file @
f34be930
...
@@ -2,8 +2,8 @@ msgid ""
...
@@ -2,8 +2,8 @@ msgid ""
msgstr ""
msgstr ""
"Project-Id-Version: kicad\n"
"Project-Id-Version: kicad\n"
"Report-Msgid-Bugs-To: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-03-2
2 20:45
+0100\n"
"POT-Creation-Date: 2008-03-2
3 20:53
+0100\n"
"PO-Revision-Date: 2008-03-2
2 21:33
+0100\n"
"PO-Revision-Date: 2008-03-2
3 21:06
+0100\n"
"Last-Translator: \n"
"Last-Translator: \n"
"Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n"
"Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n"
"MIME-Version: 1.0\n"
"MIME-Version: 1.0\n"
...
@@ -156,12 +156,10 @@ msgid "Spot min"
...
@@ -156,12 +156,10 @@ msgid "Spot min"
msgstr "Spot min"
msgstr "Spot min"
#: pcbnew/pcbplot.cpp:209
#: pcbnew/pcbplot.cpp:209
#, fuzzy
msgid "Pen size"
msgid "Pen size"
msgstr "Diam plume"
msgstr "Diam plume"
#: pcbnew/pcbplot.cpp:214
#: pcbnew/pcbplot.cpp:214
#, fuzzy
msgid "Pen speed (cm/s)"
msgid "Pen speed (cm/s)"
msgstr "Vitesse plume (cm/s)"
msgstr "Vitesse plume (cm/s)"
...
@@ -170,7 +168,6 @@ msgid "Set pen speed in cm/s"
...
@@ -170,7 +168,6 @@ msgid "Set pen speed in cm/s"
msgstr "Ajuster Vitesse plume en centimetres par seconde"
msgstr "Ajuster Vitesse plume en centimetres par seconde"
#: pcbnew/pcbplot.cpp:220
#: pcbnew/pcbplot.cpp:220
#, fuzzy
msgid "Pen ovr"
msgid "Pen ovr"
msgstr "Recouvrement"
msgstr "Recouvrement"
...
@@ -179,12 +176,10 @@ msgid "Set plot overlay for filling"
...
@@ -179,12 +176,10 @@ msgid "Set plot overlay for filling"
msgstr "Ajuste recouvrement des tracés pour les remplissages"
msgstr "Ajuste recouvrement des tracés pour les remplissages"
#: pcbnew/pcbplot.cpp:226
#: pcbnew/pcbplot.cpp:226
#, fuzzy
msgid "Lines width"
msgid "Lines width"
msgstr "Epaiss. lignes"
msgstr "Epaiss. lignes"
#: pcbnew/pcbplot.cpp:230
#: pcbnew/pcbplot.cpp:230
#, fuzzy
msgid "Set width for lines in line plot mode"
msgid "Set width for lines in line plot mode"
msgstr "Ajuster l'épaisseur des traits en Mode tracé filaire"
msgstr "Ajuster l'épaisseur des traits en Mode tracé filaire"
...
@@ -197,12 +192,10 @@ msgid "Auxiliary axis"
...
@@ -197,12 +192,10 @@ msgid "Auxiliary axis"
msgstr "Axe Auxiliaire"
msgstr "Axe Auxiliaire"
#: pcbnew/pcbplot.cpp:237
#: pcbnew/pcbplot.cpp:237
#, fuzzy
msgid "Plot origin"
msgid "Plot origin"
msgstr "Origine des coord de tracé"
msgstr "Origine des coord de tracé"
#: pcbnew/pcbplot.cpp:257
#: pcbnew/pcbplot.cpp:257
#, fuzzy
msgid "X scale adjust"
msgid "X scale adjust"
msgstr "Ajustage Echelle X"
msgstr "Ajustage Echelle X"
...
@@ -211,7 +204,6 @@ msgid "Set X scale adjust for exact scale plotting"
...
@@ -211,7 +204,6 @@ msgid "Set X scale adjust for exact scale plotting"
msgstr "Ajuster échelle X pour traçage à l'échelle exacte"
msgstr "Ajuster échelle X pour traçage à l'échelle exacte"
#: pcbnew/pcbplot.cpp:262
#: pcbnew/pcbplot.cpp:262
#, fuzzy
msgid "Y scale adjust"
msgid "Y scale adjust"
msgstr "Ajustage Echelle Y"
msgstr "Ajustage Echelle Y"
...
@@ -220,12 +212,10 @@ msgid "Set Y scale adjust for exact scale plotting"
...
@@ -220,12 +212,10 @@ msgid "Set Y scale adjust for exact scale plotting"
msgstr "Ajuster échelle Y pour traçage à l'échelle exacte"
msgstr "Ajuster échelle Y pour traçage à l'échelle exacte"
#: pcbnew/pcbplot.cpp:266
#: pcbnew/pcbplot.cpp:266
#, fuzzy
msgid "Plot negative"
msgid "Plot negative"
msgstr "Tracé en Negatif"
msgstr "Tracé en Negatif"
#: pcbnew/pcbplot.cpp:276
#: pcbnew/pcbplot.cpp:276
#, fuzzy
msgid "Save Options"
msgid "Save Options"
msgstr "Sauver options"
msgstr "Sauver options"
...
@@ -238,32 +228,26 @@ msgid "Close"
...
@@ -238,32 +228,26 @@ msgid "Close"
msgstr "Fermer"
msgstr "Fermer"
#: pcbnew/pcbplot.cpp:328
#: pcbnew/pcbplot.cpp:328
#, fuzzy
msgid "Exclude Edges_Pcb layer"
msgid "Exclude Edges_Pcb layer"
msgstr "Exclure Couche Contours PCB"
msgstr "Exclure Couche Contours PCB"
#: pcbnew/pcbplot.cpp:332
#: pcbnew/pcbplot.cpp:332
#, fuzzy
msgid "Exclude contents of Edges_Pcb layer from all other layers"
msgid "Exclude contents of Edges_Pcb layer from all other layers"
msgstr "Exclure les tracés contour PCB des autres couches"
msgstr "Exclure les tracés contour PCB des autres couches"
#: pcbnew/pcbplot.cpp:338
#: pcbnew/pcbplot.cpp:338
#, fuzzy
msgid "Print sheet ref"
msgid "Print sheet ref"
msgstr "Imprimer cartouche"
msgstr "Imprimer cartouche"
#: pcbnew/pcbplot.cpp:348
#: pcbnew/pcbplot.cpp:348
#, fuzzy
msgid "Print pads on silkscreen"
msgid "Print pads on silkscreen"
msgstr "Pads sur Sérigraphie"
msgstr "Pads sur Sérigraphie"
#: pcbnew/pcbplot.cpp:353
#: pcbnew/pcbplot.cpp:353
#, fuzzy
msgid "Enable/disable print/plot pads on silkscreen layers"
msgid "Enable/disable print/plot pads on silkscreen layers"
msgstr "Active/désactive tracé des pastilles sur les couches de sérigraphie"
msgstr "Active/désactive tracé des pastilles sur les couches de sérigraphie"
#: pcbnew/pcbplot.cpp:357
#: pcbnew/pcbplot.cpp:357
#, fuzzy
msgid "Always print pads"
msgid "Always print pads"
msgstr "Toujour tracer pads"
msgstr "Toujour tracer pads"
...
@@ -272,47 +256,38 @@ msgid "Force print/plot pads on ALL layers"
...
@@ -272,47 +256,38 @@ msgid "Force print/plot pads on ALL layers"
msgstr "Force le tracé des pastilles sur TOUTES les couches"
msgstr "Force le tracé des pastilles sur TOUTES les couches"
#: pcbnew/pcbplot.cpp:365
#: pcbnew/pcbplot.cpp:365
#, fuzzy
msgid "Print module value"
msgid "Print module value"
msgstr "Imprimer Valeur Module"
msgstr "Imprimer Valeur Module"
#: pcbnew/pcbplot.cpp:369
#: pcbnew/pcbplot.cpp:369
#, fuzzy
msgid "Enable/disable print/plot module value on silkscreen layers"
msgid "Enable/disable print/plot module value on silkscreen layers"
msgstr "Active/désactive le tracé des textes valeurs des modules sur couches de sérigraphie"
msgstr "Active/désactive le tracé des textes valeurs des modules sur couches de sérigraphie"
#: pcbnew/pcbplot.cpp:372
#: pcbnew/pcbplot.cpp:372
#, fuzzy
msgid "Print module reference"
msgid "Print module reference"
msgstr "Imprimer Référence Module"
msgstr "Imprimer Référence Module"
#: pcbnew/pcbplot.cpp:376
#: pcbnew/pcbplot.cpp:376
#, fuzzy
msgid "Enable/disable print/plot module reference on silkscreen layers"
msgid "Enable/disable print/plot module reference on silkscreen layers"
msgstr "Active/désactive le tracé des textes référence des modules sur couches de sérigraphie"
msgstr "Active/désactive le tracé des textes référence des modules sur couches de sérigraphie"
#: pcbnew/pcbplot.cpp:380
#: pcbnew/pcbplot.cpp:380
#, fuzzy
msgid "Print other module texts"
msgid "Print other module texts"
msgstr "Imprimer autres textes module"
msgstr "Imprimer autres textes module"
#: pcbnew/pcbplot.cpp:384
#: pcbnew/pcbplot.cpp:384
#, fuzzy
msgid "Enable/disable print/plot module field texts on silkscreen layers"
msgid "Enable/disable print/plot module field texts on silkscreen layers"
msgstr "Active/désactive le tracé des textes des champs des modules sur couches de sérigraphie"
msgstr "Active/désactive le tracé des textes des champs des modules sur couches de sérigraphie"
#: pcbnew/pcbplot.cpp:389
#: pcbnew/pcbplot.cpp:389
#, fuzzy
msgid "Force print invisible texts"
msgid "Force print invisible texts"
msgstr "Force tracé textes invisibles"
msgstr "Force tracé textes invisibles"
#: pcbnew/pcbplot.cpp:393
#: pcbnew/pcbplot.cpp:393
#, fuzzy
msgid "Force print/plot module invisible texts on silkscreen layers"
msgid "Force print/plot module invisible texts on silkscreen layers"
msgstr "Force le tracé des textes invisibles sur couches de sérigraphie"
msgstr "Force le tracé des textes invisibles sur couches de sérigraphie"
#: pcbnew/pcbplot.cpp:397
#: pcbnew/pcbplot.cpp:397
#, fuzzy
msgid "No drill mark"
msgid "No drill mark"
msgstr "Pas de marque"
msgstr "Pas de marque"
...
@@ -321,7 +296,6 @@ msgid "Small mark"
...
@@ -321,7 +296,6 @@ msgid "Small mark"
msgstr "Petite marque"
msgstr "Petite marque"
#: pcbnew/pcbplot.cpp:397
#: pcbnew/pcbplot.cpp:397
#, fuzzy
msgid "Real drill"
msgid "Real drill"
msgstr "Perçage réel"
msgstr "Perçage réel"
...
@@ -370,12 +344,10 @@ msgid "Plot Mode"
...
@@ -370,12 +344,10 @@ msgid "Plot Mode"
msgstr "Mode de Tracé"
msgstr "Mode de Tracé"
#: pcbnew/pcbplot.cpp:425
#: pcbnew/pcbplot.cpp:425
#, fuzzy
msgid "Plot mirror"
msgid "Plot mirror"
msgstr "Tracé Miroir"
msgstr "Tracé Miroir"
#: pcbnew/pcbplot.cpp:431
#: pcbnew/pcbplot.cpp:431
#, fuzzy
msgid "Vias on mask"
msgid "Vias on mask"
msgstr "Vias sur masque"
msgstr "Vias sur masque"
...
@@ -1498,47 +1470,44 @@ msgid "Display Warnings"
...
@@ -1498,47 +1470,44 @@ msgid "Display Warnings"
msgstr "Affiche warnings"
msgstr "Affiche warnings"
#: pcbnew/dialog_netlist.cpp:200
#: pcbnew/dialog_netlist.cpp:200
#, fuzzy
msgid "Remove Extra Footprints"
msgid "Remove Extra Footprints"
msgstr "S
el et Dépl.t module
"
msgstr "S
upprimer empreintes suppl.
"
#: pcbnew/dialog_netlist.cpp:203
#: pcbnew/dialog_netlist.cpp:203
msgid ""
msgid ""
"Remove footprints found on the Board but not in netlist\n"
"Remove footprints found on the Board but not in netlist\n"
"Note: only not locked footprints will be removed"
"Note: only not locked footprints will be removed"
msgstr ""
msgstr ""
"Supprimer lse empreintes trouvées sur le C.I. mais non en netliste\n"
"Note: seuls les empreintes non verrouillées seront supprimées"
#: pcbnew/dialog_netlist.cpp:211
#: pcbnew/dialog_netlist.cpp:211
#, fuzzy
msgid "Browse Netlist Files"
msgid "Browse Netlist Files"
msgstr "
&Examen Fichier
s"
msgstr "
Examen Fichiers Netliste
s"
#: pcbnew/dialog_netlist.cpp:215
#: pcbnew/dialog_netlist.cpp:215
#, fuzzy
msgid "Read Current Netlist"
msgid "Read Current Netlist"
msgstr "Lire Netliste"
msgstr "Lire Netliste
Courante
"
#: pcbnew/dialog_netlist.cpp:219
#: pcbnew/dialog_netlist.cpp:219
#, fuzzy
msgid "Footprints Test"
msgid "Footprints Test"
msgstr "
Empreinte:
"
msgstr "
Test Empreintes
"
#: pcbnew/dialog_netlist.cpp:221
#: pcbnew/dialog_netlist.cpp:221
msgid "Read the current neltist file and list missing and extra footprints"
msgid "Read the current neltist file and list missing and extra footprints"
msgstr ""
msgstr "
Lire la netliste courante et lister les empreintes manquantes et supplémentaires
"
#: pcbnew/dialog_netlist.cpp:225
#: pcbnew/dialog_netlist.cpp:225
msgid "Rebuild Board Connectivity"
msgid "Rebuild Board Connectivity"
msgstr ""
msgstr "
Recalculer les connexions du C.I.
"
#: pcbnew/dialog_netlist.cpp:227
#: pcbnew/dialog_netlist.cpp:227
msgid "Rebuild the full ratsnest (usefull after a manual pad netname edition)"
msgid "Rebuild the full ratsnest (usefull after a manual pad netname edition)"
msgstr ""
msgstr "
Recalculer le chevelu complet ( utile après une edition manuelle de nom de net sur pad)
"
#: pcbnew/dialog_netlist.cpp:231
#: pcbnew/dialog_netlist.cpp:231
#, fuzzy
msgid "Netlist File:"
msgid "Netlist File:"
msgstr "Fichier
s Netlist
:"
msgstr "Fichier
Netliste
:"
#: pcbnew/dialog_netlist.cpp:248
#: pcbnew/dialog_netlist.cpp:248
msgid "&Close"
msgid "&Close"
...
@@ -3293,9 +3262,8 @@ msgid "Read Netlist "
...
@@ -3293,9 +3262,8 @@ msgid "Read Netlist "
msgstr "Lire Netliste"
msgstr "Lire Netliste"
#: pcbnew/netlist.cpp:347
#: pcbnew/netlist.cpp:347
#, fuzzy
msgid "Ok to delete footprints not in netlist ?"
msgid "Ok to delete footprints not in netlist ?"
msgstr "Ok pour effacer l
a LISTE des filtres de modules
"
msgstr "Ok pour effacer l
es empreintes non en netliste
"
#: pcbnew/netlist.cpp:497
#: pcbnew/netlist.cpp:497
#, c-format
#, c-format
...
@@ -4256,7 +4224,7 @@ msgstr "Forme via inconnue: \"%s\""
...
@@ -4256,7 +4224,7 @@ msgstr "Forme via inconnue: \"%s\""
#: pcbnew/specctra_import.cpp:339
#: pcbnew/specctra_import.cpp:339
msgid "Session file is missing the \"session\" section"
msgid "Session file is missing the \"session\" section"
msgstr ""
msgstr "
Session file is missing the \"session\" section
"
#: pcbnew/specctra_import.cpp:342
#: pcbnew/specctra_import.cpp:342
msgid "Session file is missing the \"placement\" section"
msgid "Session file is missing the \"placement\" section"
...
@@ -4273,7 +4241,7 @@ msgstr ""
...
@@ -4273,7 +4241,7 @@ msgstr ""
#: pcbnew/specctra_import.cpp:378
#: pcbnew/specctra_import.cpp:378
#, c-format
#, c-format
msgid "Session file has 'reference' to non-existent component \"%s\""
msgid "Session file has 'reference' to non-existent component \"%s\""
msgstr ""
msgstr "
Le fichier Session a une 'reference' a un composant non existant \"%s\"
"
#: pcbnew/specctra_import.cpp:522
#: pcbnew/specctra_import.cpp:522
#, c-format
#, c-format
...
@@ -4642,7 +4610,7 @@ msgstr "Erreur. Vous devez choisir une équipotentielle"
...
@@ -4642,7 +4610,7 @@ msgstr "Erreur. Vous devez choisir une équipotentielle"
#: pcbnew/dialog_freeroute_exchange.cpp:187
#: pcbnew/dialog_freeroute_exchange.cpp:187
#: pcbnew/_dialog_freeroute_exchange.cpp:177
#: pcbnew/_dialog_freeroute_exchange.cpp:177
msgid "Export a Specctra Design (*.dsn) File"
msgid "Export a Specctra Design (*.dsn) File"
msgstr ""
msgstr "
Exporter un fichier de conception Specctra (*.dsn)
"
#: pcbnew/dialog_freeroute_exchange.cpp:189
#: pcbnew/dialog_freeroute_exchange.cpp:189
#: pcbnew/_dialog_freeroute_exchange.cpp:179
#: pcbnew/_dialog_freeroute_exchange.cpp:179
...
@@ -4656,7 +4624,7 @@ msgstr "Lancer FreeRouter via Java Web Start"
...
@@ -4656,7 +4624,7 @@ msgstr "Lancer FreeRouter via Java Web Start"
#: pcbnew/dialog_freeroute_exchange.cpp:194
#: pcbnew/dialog_freeroute_exchange.cpp:194
msgid "Use Java Web Start function to run FreeRouter via Internet (or your Browser if not found)"
msgid "Use Java Web Start function to run FreeRouter via Internet (or your Browser if not found)"
msgstr ""
msgstr "
Utiliser Java Web Start function pour lancer FreeRouter via Internet (ou votre Navigateur si non trouvé)
"
#: pcbnew/dialog_freeroute_exchange.cpp:197
#: pcbnew/dialog_freeroute_exchange.cpp:197
#: pcbnew/_dialog_freeroute_exchange.cpp:187
#: pcbnew/_dialog_freeroute_exchange.cpp:187
...
@@ -5179,9 +5147,8 @@ msgid "Place the pin sheet (imported hierarchical label from sheet)"
...
@@ -5179,9 +5147,8 @@ msgid "Place the pin sheet (imported hierarchical label from sheet)"
msgstr "Placer la pin hiérarchique ( Importer un label hiérarchique vers la feuille)"
msgstr "Placer la pin hiérarchique ( Importer un label hiérarchique vers la feuille)"
#: eeschema/tool_sch.cpp:223
#: eeschema/tool_sch.cpp:223
#, fuzzy
msgid "Place the hierachical pin to sheet"
msgid "Place the hierachical pin to sheet"
msgstr "
Addition de pins de hierarchie dans les symboles de hierarchi
e"
msgstr "
Place une pin de hierarchie dans la feuill
e"
#: eeschema/tool_sch.cpp:228
#: eeschema/tool_sch.cpp:228
msgid "Place the graphic line or polygon"
msgid "Place the graphic line or polygon"
...
@@ -6487,9 +6454,8 @@ msgid "Imported hierarchical label"
...
@@ -6487,9 +6454,8 @@ msgid "Imported hierarchical label"
msgstr "Importer label hiérarchique"
msgstr "Importer label hiérarchique"
#: eeschema/menubar.cpp:326
#: eeschema/menubar.cpp:326
#, fuzzy
msgid "Hierarchical pin to sheet"
msgid "Hierarchical pin to sheet"
msgstr "
Addition de pins de hierarchie dans les symboles de hierarchi
e"
msgstr "
Ppins de hierarchie vers feuill
e"
#: eeschema/menubar.cpp:327
#: eeschema/menubar.cpp:327
msgid "Place the hierarchical pin to sheet"
msgid "Place the hierarchical pin to sheet"
...
@@ -7028,12 +6994,11 @@ msgstr "Ok pour nettoyer cette feuille"
...
@@ -7028,12 +6994,11 @@ msgstr "Ok pour nettoyer cette feuille"
#: eeschema/class_drawsheet.cpp:486
#: eeschema/class_drawsheet.cpp:486
#, c-format
#, c-format
msgid "A Sub Hierarchy named %s exists, Use it (The data in this sheet will be replaced)?"
msgid "A Sub Hierarchy named %s exists, Use it (The data in this sheet will be replaced)?"
msgstr ""
msgstr "
Une sous Hiérarchie nommée %s existe, L'utiliser (Les données de cette page seront remplacées)?
"
#: eeschema/class_drawsheet.cpp:490
#: eeschema/class_drawsheet.cpp:490
#, fuzzy
msgid "Sheet Filename Renaming Aborted"
msgid "Sheet Filename Renaming Aborted"
msgstr "
Pas de Nom de Fichier! Abandon
"
msgstr "
Renommage de Fichier de Feuille Abandonné
"
#: eeschema/class_drawsheet.cpp:498
#: eeschema/class_drawsheet.cpp:498
#, c-format
#, c-format
...
@@ -7046,7 +7011,7 @@ msgstr "Cette feuille utilise des données partagées dans une hiérarchie compl
...
@@ -7046,7 +7011,7 @@ msgstr "Cette feuille utilise des données partagées dans une hiérarchie compl
#: eeschema/class_drawsheet.cpp:515
#: eeschema/class_drawsheet.cpp:515
msgid "Do we convert it in a simple hierarchical sheet (otherwise delete current sheet data)"
msgid "Do we convert it in a simple hierarchical sheet (otherwise delete current sheet data)"
msgstr ""
msgstr "
Doit on la convertir en une feuille de hiérarchie simple (autrement supprimer les données courantes)
"
#: eeschema/class_drawsheet.cpp:776
#: eeschema/class_drawsheet.cpp:776
#, c-format
#, c-format
...
@@ -7377,23 +7342,23 @@ msgid "Failed to open file "
...
@@ -7377,23 +7342,23 @@ msgid "Failed to open file "
msgstr "Erreur ouverture "
msgstr "Erreur ouverture "
#: eeschema/dialog_build_BOM.cpp:806
#: eeschema/dialog_build_BOM.cpp:806
#,
fuzzy,
c-format
#, c-format
msgid ""
msgid ""
"\n"
"\n"
"#Global, Hierarchical Labels and PinSheets ( order = Sheet Number ) count = %d\n"
"#Global, Hierarchical Labels and PinSheets ( order = Sheet Number ) count = %d\n"
msgstr ""
msgstr ""
"\n"
"\n"
"#
Glob labels
( ordre = Numéro de feuiller ) nombre = %d\n"
"#
Labels globaux, hiérarchiques et pins de feuille
( ordre = Numéro de feuiller ) nombre = %d\n"
#: eeschema/dialog_build_BOM.cpp:817
#: eeschema/dialog_build_BOM.cpp:817
#,
fuzzy,
c-format
#, c-format
msgid ""
msgid ""
"\n"
"\n"
"#Global, Hierarchical Labels and PinSheets ( order = Alphab. ) count = %d\n"
"#Global, Hierarchical Labels and PinSheets ( order = Alphab. ) count = %d\n"
"\n"
"\n"
msgstr ""
msgstr ""
"\n"
"\n"
"#
Glob labels
( ordre = Alphab. ) nombre = %d\n"
"#
#Labels globaux, hiérarchiques et pins de feuille
( ordre = Alphab. ) nombre = %d\n"
#: eeschema/dialog_build_BOM.cpp:824
#: eeschema/dialog_build_BOM.cpp:824
msgid ""
msgid ""
...
@@ -7435,9 +7400,9 @@ msgid "> %-28.28s %s (Sheet %s) pos: %3.3f, %3.3f\n"
...
@@ -7435,9 +7400,9 @@ msgid "> %-28.28s %s (Sheet %s) pos: %3.3f, %3.3f\n"
msgstr "> %-28.28s %s (Feuille %s) pos: %3.3f, %3.3f\n"
msgstr "> %-28.28s %s (Feuille %s) pos: %3.3f, %3.3f\n"
#: eeschema/dialog_build_BOM.cpp:1421
#: eeschema/dialog_build_BOM.cpp:1421
#,
fuzzy,
c-format
#, c-format
msgid "> %-28.28s PinSheet %-7.7s (Sheet %s) pos: %3.3f, %3.3f\n"
msgid "> %-28.28s PinSheet %-7.7s (Sheet %s) pos: %3.3f, %3.3f\n"
msgstr "> %-28.28s Sheet %-7.7s (Feuillet %s) pos: %3.3f, %3.3f\n"
msgstr "> %-28.28s
Pin
Sheet %-7.7s (Feuillet %s) pos: %3.3f, %3.3f\n"
#: eeschema/dialog_build_BOM.cpp:1436
#: eeschema/dialog_build_BOM.cpp:1436
msgid "#End labels\n"
msgid "#End labels\n"
...
@@ -7759,12 +7724,8 @@ msgid "No Filename! Aborted"
...
@@ -7759,12 +7724,8 @@ msgid "No Filename! Aborted"
msgstr "Pas de Nom de Fichier! Abandon"
msgstr "Pas de Nom de Fichier! Abandon"
#: eeschema/sheet.cpp:305
#: eeschema/sheet.cpp:305
#, fuzzy
msgid "Changing a Filename can change all the schematic structure and cannot be undone"
msgid "Changing a Filename can change all the schematic structure and cannot be undone"
msgstr ""
msgstr "Cette opération changera l'annotation actuelle et ne pourra être annulée."
"\n"
"\n"
"Cette opération changera l'annotation actuelle et ne pourra être annulée."
#: eeschema/sheet.cpp:307
#: eeschema/sheet.cpp:307
msgid "Ok to continue renaming?"
msgid "Ok to continue renaming?"
...
@@ -9772,9 +9733,8 @@ msgid "Color Print:"
...
@@ -9772,9 +9733,8 @@ msgid "Color Print:"
msgstr "Impression Couleurs:"
msgstr "Impression Couleurs:"
#: share/dialog_print.cpp:190
#: share/dialog_print.cpp:190
#, fuzzy
msgid "1 Page per Layer"
msgid "1 Page per Layer"
msgstr "1
p
age par couche"
msgstr "1
P
age par couche"
#: share/dialog_print.cpp:191
#: share/dialog_print.cpp:191
msgid "Single Page"
msgid "Single Page"
...
@@ -9912,9 +9872,8 @@ msgid "DRC Control"
...
@@ -9912,9 +9872,8 @@ msgid "DRC Control"
msgstr "Controle ERC"
msgstr "Controle ERC"
#: pcbnew/dialog_netlist.h:54
#: pcbnew/dialog_netlist.h:54
#, fuzzy
msgid "Netlist Dialog"
msgid "Netlist Dialog"
msgstr "
Fichiers Netlist
"
msgstr "
Dialogue Netliste
"
#: pcbnew/dialog_zones_by_polygon.h:53
#: pcbnew/dialog_zones_by_polygon.h:53
msgid "Fill Zones Options"
msgid "Fill Zones Options"
...
...
pcbnew/class_module.cpp
View file @
f34be930
...
@@ -23,8 +23,6 @@
...
@@ -23,8 +23,6 @@
#include "3d_struct.h"
#include "3d_struct.h"
#include "protos.h"
#include "protos.h"
#define MAX_WIDTH 10000 // Epaisseur (en 1/10000 ") max raisonnable des traits, textes...
/*********************************************************************************/
/*********************************************************************************/
void
MODULE
::
DrawAncre
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
const
wxPoint
&
offset
,
void
MODULE
::
DrawAncre
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
const
wxPoint
&
offset
,
int
dim_ancre
,
int
draw_mode
)
int
dim_ancre
,
int
draw_mode
)
...
@@ -738,11 +736,16 @@ int MODULE::ReadDescr( FILE* File, int* LineNum )
...
@@ -738,11 +736,16 @@ int MODULE::ReadDescr( FILE* File, int* LineNum )
ReadDelimitedText
(
BufLine
,
Line
,
sizeof
(
BufLine
)
);
ReadDelimitedText
(
BufLine
,
Line
,
sizeof
(
BufLine
)
);
DrawText
->
m_Text
=
CONV_FROM_UTF8
(
BufLine
);
DrawText
->
m_Text
=
CONV_FROM_UTF8
(
BufLine
);
//
Controle d'epaisseur raisonnable
:
//
Test for a reasonnable width
:
if
(
DrawText
->
m_Width
<=
1
)
if
(
DrawText
->
m_Width
<=
1
)
DrawText
->
m_Width
=
1
;
DrawText
->
m_Width
=
1
;
if
(
DrawText
->
m_Width
>
MAX_WIDTH
)
if
(
DrawText
->
m_Width
>
TEXTS_MAX_WIDTH
)
DrawText
->
m_Width
=
MAX_WIDTH
;
DrawText
->
m_Width
=
TEXTS_MAX_WIDTH
;
// Test for a reasonnable size:
if
(
DrawText
->
m_Size
.
x
<
TEXTS_MIN_SIZE
)
DrawText
->
m_Size
.
x
=
TEXTS_MIN_SIZE
;
if
(
DrawText
->
m_Size
.
y
<
TEXTS_MIN_SIZE
)
DrawText
->
m_Size
.
y
=
TEXTS_MIN_SIZE
;
break
;
break
;
case
'D'
:
/* lecture du contour */
case
'D'
:
/* lecture du contour */
...
...
pcbnew/class_pcb_text.cpp
View file @
f34be930
...
@@ -93,6 +93,9 @@ int TEXTE_PCB::ReadTextePcbDescr( FILE* File, int* LineNum )
...
@@ -93,6 +93,9 @@ int TEXTE_PCB::ReadTextePcbDescr( FILE* File, int* LineNum )
sscanf
(
Line
+
2
,
" %d %d %d %d %d %d"
,
sscanf
(
Line
+
2
,
" %d %d %d %d %d %d"
,
&
m_Pos
.
x
,
&
m_Pos
.
y
,
&
m_Size
.
x
,
&
m_Size
.
y
,
&
m_Pos
.
x
,
&
m_Pos
.
y
,
&
m_Size
.
x
,
&
m_Size
.
y
,
&
m_Width
,
&
m_Orient
);
&
m_Width
,
&
m_Orient
);
// Ensure the text has minimal size to see this text on screen:
if
(
m_Size
.
x
<
5
)
m_Size
.
x
=
5
;
if
(
m_Size
.
y
<
5
)
m_Size
.
y
=
5
;
continue
;
continue
;
}
}
if
(
strncmp
(
Line
,
"De"
,
2
)
==
0
)
if
(
strncmp
(
Line
,
"De"
,
2
)
==
0
)
...
...
pcbnew/dialog_edit_mod_text.cpp
View file @
f34be930
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Name: edtxtmod.cpp
// Name: edtxtmod.cpp
// Purpose:
// Purpose:
// Author: jean-pierre Charras
// Author: jean-pierre Charras
// Modified by:
// Modified by:
// Created: 09/02/2006 18:17:15
// Created: 09/02/2006 18:17:15
// RCS-ID:
// RCS-ID:
// Copyright: License GNU
// Copyright: License GNU
// Licence:
// Licence:
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 09/02/2006 18:17:15
// Generated by DialogBlocks (unregistered), 09/02/2006 18:17:15
#if defined
(__GNUG__) && !defined
(NO_GCC_PRAGMA)
#if defined
(__GNUG__) && !defined
(NO_GCC_PRAGMA)
#pragma implementation "edtxtmod.h"
#pragma implementation "edtxtmod.h"
#endif
#endif
...
@@ -37,24 +38,25 @@
...
@@ -37,24 +38,25 @@
#include "dialog_edit_mod_text.h"
#include "dialog_edit_mod_text.h"
extern
wxPoint
MoveVector
;
// Move vector for move edge, imported from dialog_edit mod_text.cpp
extern
wxPoint
MoveVector
;
// Move vector for move edge, imported from dialog_edit mod_text.cpp
////@begin XPM images
////@begin XPM images
////@end XPM images
////@end XPM images
/***************************************************************************/
/***************************************************************************/
void
WinEDA_BasePcbFrame
::
InstallTextModOptionsFrame
(
TEXTE_MODULE
*
TextMod
,
void
WinEDA_BasePcbFrame
::
InstallTextModOptionsFrame
(
TEXTE_MODULE
*
TextMod
,
wxDC
*
DC
,
const
wxPoint
&
pos
)
wxDC
*
DC
,
const
wxPoint
&
pos
)
/***************************************************************************/
/***************************************************************************/
{
{
DrawPanel
->
m_IgnoreMouseEvents
=
TRUE
;
DrawPanel
->
m_IgnoreMouseEvents
=
TRUE
;
WinEDA_TextModPropertiesFrame
*
frame
=
new
WinEDA_TextModPropertiesFrame
(
this
,
WinEDA_TextModPropertiesFrame
*
frame
=
new
WinEDA_TextModPropertiesFrame
(
this
,
TextMod
,
DC
);
TextMod
,
DC
);
frame
->
ShowModal
();
frame
->
Destroy
();
frame
->
ShowModal
();
frame
->
Destroy
();
DrawPanel
->
MouseToCursorSchema
();
DrawPanel
->
MouseToCursorSchema
();
DrawPanel
->
m_IgnoreMouseEvents
=
FALSE
;
DrawPanel
->
m_IgnoreMouseEvents
=
FALSE
;
}
}
/*!
/*!
* WinEDA_TextModPropertiesFrame type definition
* WinEDA_TextModPropertiesFrame type definition
*/
*/
...
@@ -68,9 +70,9 @@ IMPLEMENT_DYNAMIC_CLASS( WinEDA_TextModPropertiesFrame, wxDialog )
...
@@ -68,9 +70,9 @@ IMPLEMENT_DYNAMIC_CLASS( WinEDA_TextModPropertiesFrame, wxDialog )
BEGIN_EVENT_TABLE
(
WinEDA_TextModPropertiesFrame
,
wxDialog
)
BEGIN_EVENT_TABLE
(
WinEDA_TextModPropertiesFrame
,
wxDialog
)
////@begin WinEDA_TextModPropertiesFrame event table entries
////@begin WinEDA_TextModPropertiesFrame event table entries
EVT_BUTTON
(
wxID_OK
,
WinEDA_TextModPropertiesFrame
::
OnOkClick
)
EVT_BUTTON
(
wxID_OK
,
WinEDA_TextModPropertiesFrame
::
OnOkClick
)
EVT_BUTTON
(
wxID_CANCEL
,
WinEDA_TextModPropertiesFrame
::
OnCancelClick
)
EVT_BUTTON
(
wxID_CANCEL
,
WinEDA_TextModPropertiesFrame
::
OnCancelClick
)
////@end WinEDA_TextModPropertiesFrame event table entries
////@end WinEDA_TextModPropertiesFrame event table entries
...
@@ -80,173 +82,232 @@ END_EVENT_TABLE()
...
@@ -80,173 +82,232 @@ END_EVENT_TABLE()
* WinEDA_TextModPropertiesFrame constructors
* WinEDA_TextModPropertiesFrame constructors
*/
*/
WinEDA_TextModPropertiesFrame
::
WinEDA_TextModPropertiesFrame
(
)
WinEDA_TextModPropertiesFrame
::
WinEDA_TextModPropertiesFrame
()
{
{
}
}
WinEDA_TextModPropertiesFrame
::
WinEDA_TextModPropertiesFrame
(
WinEDA_BasePcbFrame
*
parent
,
WinEDA_TextModPropertiesFrame
::
WinEDA_TextModPropertiesFrame
(
WinEDA_BasePcbFrame
*
parent
,
TEXTE_MODULE
*
TextMod
,
wxDC
*
DC
,
TEXTE_MODULE
*
TextMod
,
wxWindowID
id
,
const
wxString
&
caption
,
const
wxPoint
&
pos
,
wxDC
*
DC
,
const
wxSize
&
size
,
long
style
)
wxWindowID
id
,
const
wxString
&
caption
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
long
style
)
{
{
m_Parent
=
parent
;
m_Parent
=
parent
;
m_DC
=
DC
;
m_DC
=
DC
;
m_Module
=
NULL
;
m_Module
=
NULL
;
m_CurrentTextMod
=
TextMod
;
m_CurrentTextMod
=
TextMod
;
if
(
m_CurrentTextMod
)
if
(
m_CurrentTextMod
)
{
{
m_Module
=
(
MODULE
*
)
m_CurrentTextMod
->
m_Parent
;
m_Module
=
(
MODULE
*
)
m_CurrentTextMod
->
m_Parent
;
}
}
Create
(
parent
,
id
,
caption
,
pos
,
size
,
style
);
Create
(
parent
,
id
,
caption
,
pos
,
size
,
style
);
}
}
/*!
/*!
* WinEDA_TextModPropertiesFrame creator
* WinEDA_TextModPropertiesFrame creator
*/
*/
bool
WinEDA_TextModPropertiesFrame
::
Create
(
wxWindow
*
parent
,
wxWindowID
id
,
const
wxString
&
caption
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
long
style
)
bool
WinEDA_TextModPropertiesFrame
::
Create
(
wxWindow
*
parent
,
wxWindowID
id
,
const
wxString
&
caption
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
long
style
)
{
{
////@begin WinEDA_TextModPropertiesFrame member initialisation
////@begin WinEDA_TextModPropertiesFrame member initialisation
m_ModuleInfoText
=
NULL
;
m_ModuleInfoText
=
NULL
;
m_TextDataTitle
=
NULL
;
m_TextDataTitle
=
NULL
;
m_Name
=
NULL
;
m_Name
=
NULL
;
m_SizeXTitle
=
NULL
;
m_SizeXTitle
=
NULL
;
m_TxtSizeCtrlX
=
NULL
;
m_TxtSizeCtrlX
=
NULL
;
m_SizeYTitle
=
NULL
;
m_SizeYTitle
=
NULL
;
m_TxtSizeCtrlY
=
NULL
;
m_TxtSizeCtrlY
=
NULL
;
m_PosXTitle
=
NULL
;
m_PosXTitle
=
NULL
;
m_TxtPosCtrlX
=
NULL
;
m_TxtPosCtrlX
=
NULL
;
m_PosYTitle
=
NULL
;
m_PosYTitle
=
NULL
;
m_TxtPosCtrlY
=
NULL
;
m_TxtPosCtrlY
=
NULL
;
m_WidthTitle
=
NULL
;
m_WidthTitle
=
NULL
;
m_TxtWidthCtlr
=
NULL
;
m_TxtWidthCtlr
=
NULL
;
m_Orient
=
NULL
;
m_Orient
=
NULL
;
m_Show
=
NULL
;
m_Show
=
NULL
;
////@end WinEDA_TextModPropertiesFrame member initialisation
////@end WinEDA_TextModPropertiesFrame member initialisation
////@begin WinEDA_TextModPropertiesFrame creation
////@begin WinEDA_TextModPropertiesFrame creation
SetExtraStyle
(
GetExtraStyle
()
|
wxWS_EX_BLOCK_EVENTS
);
SetExtraStyle
(
GetExtraStyle
()
|
wxWS_EX_BLOCK_EVENTS
);
wxDialog
::
Create
(
parent
,
id
,
caption
,
pos
,
size
,
style
);
wxDialog
::
Create
(
parent
,
id
,
caption
,
pos
,
size
,
style
);
CreateControls
();
CreateControls
();
GetSizer
()
->
Fit
(
this
);
GetSizer
()
->
Fit
(
this
);
GetSizer
()
->
SetSizeHints
(
this
);
GetSizer
()
->
SetSizeHints
(
this
);
Centre
();
Centre
();
////@end WinEDA_TextModPropertiesFrame creation
////@end WinEDA_TextModPropertiesFrame creation
return
true
;
return
true
;
}
}
/*!
/*!
* Control creation for WinEDA_TextModPropertiesFrame
* Control creation for WinEDA_TextModPropertiesFrame
*/
*/
void
WinEDA_TextModPropertiesFrame
::
CreateControls
()
void
WinEDA_TextModPropertiesFrame
::
CreateControls
()
{
{
SetFont
(
*
g_DialogFont
);
SetFont
(
*
g_DialogFont
);
////@begin WinEDA_TextModPropertiesFrame content construction
////@begin WinEDA_TextModPropertiesFrame content construction
// Generated by DialogBlocks, 09/02/2006 19:51:49 (unregistered)
// Generated by DialogBlocks, 09/02/2006 19:51:49 (unregistered)
WinEDA_TextModPropertiesFrame
*
itemDialog1
=
this
;
WinEDA_TextModPropertiesFrame
*
itemDialog1
=
this
;
wxBoxSizer
*
itemBoxSizer2
=
new
wxBoxSizer
(
wxVERTICAL
);
wxBoxSizer
*
itemBoxSizer2
=
new
wxBoxSizer
(
wxVERTICAL
);
itemDialog1
->
SetSizer
(
itemBoxSizer2
);
itemDialog1
->
SetSizer
(
itemBoxSizer2
);
m_ModuleInfoText
=
new
wxStaticText
(
itemDialog1
,
wxID_STATIC
,
_
(
"Module %s (%s) orient %.1f"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_ModuleInfoText
=
new
wxStaticText
(
itemDialog1
,
wxID_STATIC
,
_
(
m_ModuleInfoText
->
SetForegroundColour
(
wxColour
(
0
,
0
,
255
));
"Module %s (%s) orient %.1f"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemBoxSizer2
->
Add
(
m_ModuleInfoText
,
0
,
wxALIGN_CENTER_HORIZONTAL
|
wxALL
|
wxADJUST_MINSIZE
,
5
);
m_ModuleInfoText
->
SetForegroundColour
(
wxColour
(
0
,
0
,
255
)
);
itemBoxSizer2
->
Add
(
m_ModuleInfoText
,
wxStaticLine
*
itemStaticLine4
=
new
wxStaticLine
(
itemDialog1
,
wxID_STATIC
,
wxDefaultPosition
,
wxDefaultSize
,
wxLI_HORIZONTAL
);
0
,
itemBoxSizer2
->
Add
(
itemStaticLine4
,
0
,
wxGROW
|
wxALL
,
5
);
wxALIGN_CENTER_HORIZONTAL
|
wxALL
|
wxADJUST_MINSIZE
,
5
);
m_TextDataTitle
=
new
wxStaticText
(
itemDialog1
,
wxID_STATIC
,
_
(
"Reference:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemBoxSizer2
->
Add
(
m_TextDataTitle
,
0
,
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxTOP
|
wxADJUST_MINSIZE
,
5
);
wxStaticLine
*
itemStaticLine4
=
new
wxStaticLine
(
itemDialog1
,
wxID_STATIC
,
m_Name
=
new
wxTextCtrl
(
itemDialog1
,
ID_TEXTCTRL
,
_T
(
""
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
wxDefaultPosition
,
itemBoxSizer2
->
Add
(
m_Name
,
0
,
wxGROW
|
wxLEFT
|
wxRIGHT
|
wxBOTTOM
,
5
);
wxDefaultSize
,
wxLI_HORIZONTAL
);
wxBoxSizer
*
itemBoxSizer7
=
new
wxBoxSizer
(
wxHORIZONTAL
);
itemBoxSizer2
->
Add
(
itemStaticLine4
,
0
,
wxGROW
|
wxALL
,
5
);
itemBoxSizer2
->
Add
(
itemBoxSizer7
,
0
,
wxALIGN_CENTER_HORIZONTAL
|
wxALL
,
5
);
m_TextDataTitle
=
new
wxStaticText
(
itemDialog1
,
wxID_STATIC
,
_
(
wxBoxSizer
*
itemBoxSizer8
=
new
wxBoxSizer
(
wxVERTICAL
);
"Reference:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemBoxSizer7
->
Add
(
itemBoxSizer8
,
0
,
wxGROW
|
wxALL
,
5
);
itemBoxSizer2
->
Add
(
m_TextDataTitle
,
0
,
m_SizeXTitle
=
new
wxStaticText
(
itemDialog1
,
wxID_STATIC
,
_
(
"Size X"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxTOP
|
wxADJUST_MINSIZE
,
itemBoxSizer8
->
Add
(
m_SizeXTitle
,
0
,
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxTOP
|
wxADJUST_MINSIZE
,
5
);
5
);
m_TxtSizeCtrlX
=
new
wxTextCtrl
(
itemDialog1
,
ID_TEXTCTRL1
,
_T
(
""
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_Name
=
new
wxTextCtrl
(
itemDialog1
,
ID_TEXTCTRL
,
_T
(
itemBoxSizer8
->
Add
(
m_TxtSizeCtrlX
,
0
,
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxBOTTOM
,
5
);
""
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemBoxSizer2
->
Add
(
m_Name
,
0
,
wxGROW
|
wxLEFT
|
wxRIGHT
|
wxBOTTOM
,
5
);
m_SizeYTitle
=
new
wxStaticText
(
itemDialog1
,
wxID_STATIC
,
_
(
"Size Y"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemBoxSizer8
->
Add
(
m_SizeYTitle
,
0
,
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxTOP
|
wxADJUST_MINSIZE
,
5
);
wxBoxSizer
*
itemBoxSizer7
=
new
wxBoxSizer
(
wxHORIZONTAL
);
itemBoxSizer2
->
Add
(
itemBoxSizer7
,
0
,
wxALIGN_CENTER_HORIZONTAL
|
wxALL
,
5
);
m_TxtSizeCtrlY
=
new
wxTextCtrl
(
itemDialog1
,
ID_TEXTCTRL2
,
_T
(
""
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemBoxSizer8
->
Add
(
m_TxtSizeCtrlY
,
0
,
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxBOTTOM
,
5
);
wxBoxSizer
*
itemBoxSizer8
=
new
wxBoxSizer
(
wxVERTICAL
);
itemBoxSizer7
->
Add
(
itemBoxSizer8
,
0
,
wxGROW
|
wxALL
,
5
);
itemBoxSizer8
->
Add
(
5
,
5
,
0
,
wxALIGN_CENTER_HORIZONTAL
|
wxALL
,
5
);
m_SizeXTitle
=
new
wxStaticText
(
itemDialog1
,
wxID_STATIC
,
_
(
m_PosXTitle
=
new
wxStaticText
(
itemDialog1
,
wxID_STATIC
,
_
(
"Offset X"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
"Size X"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemBoxSizer8
->
Add
(
m_PosXTitle
,
0
,
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxTOP
|
wxADJUST_MINSIZE
,
5
);
itemBoxSizer8
->
Add
(
m_SizeXTitle
,
0
,
m_TxtPosCtrlX
=
new
wxTextCtrl
(
itemDialog1
,
ID_TEXTCTRL3
,
_T
(
""
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxTOP
|
wxADJUST_MINSIZE
,
itemBoxSizer8
->
Add
(
m_TxtPosCtrlX
,
0
,
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxBOTTOM
,
5
);
5
);
m_PosYTitle
=
new
wxStaticText
(
itemDialog1
,
wxID_STATIC
,
_
(
"Offset Y"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_TxtSizeCtrlX
=
new
wxTextCtrl
(
itemDialog1
,
ID_TEXTCTRL1
,
_T
(
itemBoxSizer8
->
Add
(
m_PosYTitle
,
0
,
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxTOP
|
wxADJUST_MINSIZE
,
5
);
""
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemBoxSizer8
->
Add
(
m_TxtSizeCtrlX
,
0
,
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxBOTTOM
,
5
);
m_TxtPosCtrlY
=
new
wxTextCtrl
(
itemDialog1
,
ID_TEXTCTRL4
,
_T
(
""
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemBoxSizer8
->
Add
(
m_TxtPosCtrlY
,
0
,
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxBOTTOM
,
5
);
m_SizeYTitle
=
new
wxStaticText
(
itemDialog1
,
wxID_STATIC
,
_
(
"Size Y"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
wxBoxSizer
*
itemBoxSizer18
=
new
wxBoxSizer
(
wxVERTICAL
);
itemBoxSizer8
->
Add
(
m_SizeYTitle
,
itemBoxSizer7
->
Add
(
itemBoxSizer18
,
0
,
wxGROW
|
wxALL
,
5
);
0
,
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxTOP
|
wxADJUST_MINSIZE
,
m_WidthTitle
=
new
wxStaticText
(
itemDialog1
,
wxID_STATIC
,
_
(
"Width"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
5
);
itemBoxSizer18
->
Add
(
m_WidthTitle
,
0
,
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxTOP
|
wxADJUST_MINSIZE
,
5
);
m_TxtSizeCtrlY
=
new
wxTextCtrl
(
itemDialog1
,
ID_TEXTCTRL2
,
_T
(
m_TxtWidthCtlr
=
new
wxTextCtrl
(
itemDialog1
,
ID_TEXTCTRL5
,
_T
(
""
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
""
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemBoxSizer18
->
Add
(
m_TxtWidthCtlr
,
0
,
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxBOTTOM
,
5
);
itemBoxSizer8
->
Add
(
m_TxtSizeCtrlY
,
0
,
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxBOTTOM
,
5
);
wxBoxSizer
*
itemBoxSizer21
=
new
wxBoxSizer
(
wxVERTICAL
);
itemBoxSizer8
->
Add
(
5
,
5
,
0
,
wxALIGN_CENTER_HORIZONTAL
|
wxALL
,
5
);
itemBoxSizer7
->
Add
(
itemBoxSizer21
,
0
,
wxGROW
|
wxALL
,
5
);
m_PosXTitle
=
new
wxStaticText
(
itemDialog1
,
wxID_STATIC
,
_
(
wxButton
*
itemButton22
=
new
wxButton
(
itemDialog1
,
wxID_OK
,
_
(
"&OK"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
"Offset X"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemButton22
->
SetForegroundColour
(
wxColour
(
198
,
0
,
0
));
itemBoxSizer8
->
Add
(
m_PosXTitle
,
itemBoxSizer21
->
Add
(
itemButton22
,
0
,
wxGROW
|
wxALL
,
5
);
0
,
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxTOP
|
wxADJUST_MINSIZE
,
wxButton
*
itemButton23
=
new
wxButton
(
itemDialog1
,
wxID_CANCEL
,
_
(
"&Cancel"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
5
);
itemButton23
->
SetForegroundColour
(
wxColour
(
0
,
0
,
255
));
itemBoxSizer21
->
Add
(
itemButton23
,
0
,
wxGROW
|
wxALL
,
5
);
m_TxtPosCtrlX
=
new
wxTextCtrl
(
itemDialog1
,
ID_TEXTCTRL3
,
_T
(
""
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemBoxSizer8
->
Add
(
m_TxtPosCtrlX
,
0
,
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxBOTTOM
,
5
);
m_PosYTitle
=
new
wxStaticText
(
itemDialog1
,
wxID_STATIC
,
_
(
"Offset Y"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemBoxSizer8
->
Add
(
m_PosYTitle
,
0
,
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxTOP
|
wxADJUST_MINSIZE
,
5
);
m_TxtPosCtrlY
=
new
wxTextCtrl
(
itemDialog1
,
ID_TEXTCTRL4
,
_T
(
""
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemBoxSizer8
->
Add
(
m_TxtPosCtrlY
,
0
,
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxBOTTOM
,
5
);
wxBoxSizer
*
itemBoxSizer18
=
new
wxBoxSizer
(
wxVERTICAL
);
itemBoxSizer7
->
Add
(
itemBoxSizer18
,
0
,
wxGROW
|
wxALL
,
5
);
m_WidthTitle
=
new
wxStaticText
(
itemDialog1
,
wxID_STATIC
,
_
(
"Width"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemBoxSizer18
->
Add
(
m_WidthTitle
,
0
,
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxTOP
|
wxADJUST_MINSIZE
,
5
);
m_TxtWidthCtlr
=
new
wxTextCtrl
(
itemDialog1
,
ID_TEXTCTRL5
,
_T
(
""
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemBoxSizer18
->
Add
(
m_TxtWidthCtlr
,
0
,
wxALIGN_LEFT
|
wxLEFT
|
wxRIGHT
|
wxBOTTOM
,
5
);
wxBoxSizer
*
itemBoxSizer21
=
new
wxBoxSizer
(
wxVERTICAL
);
itemBoxSizer7
->
Add
(
itemBoxSizer21
,
0
,
wxGROW
|
wxALL
,
5
);
wxButton
*
itemButton22
=
new
wxButton
(
itemDialog1
,
wxID_OK
,
_
(
"&OK"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemButton22
->
SetForegroundColour
(
wxColour
(
198
,
0
,
0
)
);
itemBoxSizer21
->
Add
(
itemButton22
,
0
,
wxGROW
|
wxALL
,
5
);
wxButton
*
itemButton23
=
new
wxButton
(
itemDialog1
,
wxID_CANCEL
,
_
(
"&Cancel"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemButton23
->
SetForegroundColour
(
wxColour
(
0
,
0
,
255
)
);
itemBoxSizer21
->
Add
(
itemButton23
,
0
,
wxGROW
|
wxALL
,
5
);
wxString
m_OrientStrings
[]
=
{
wxString
m_OrientStrings
[]
=
{
_
(
"horiz"
),
_
(
"horiz"
),
_
(
"vertical"
)
_
(
"vertical"
)
};
};
m_Orient
=
new
wxRadioBox
(
itemDialog1
,
ID_RADIOBOX
,
_
(
"Orientation"
),
wxDefaultPosition
,
wxDefaultSize
,
2
,
m_OrientStrings
,
1
,
wxRA_SPECIFY_COLS
);
m_Orient
=
new
wxRadioBox
(
itemDialog1
,
ID_RADIOBOX
,
_
(
itemBoxSizer21
->
Add
(
m_Orient
,
0
,
wxALIGN_CENTER_HORIZONTAL
|
wxALL
,
5
);
"Orientation"
),
wxDefaultPosition
,
wxDefaultSize
,
2
,
m_OrientStrings
,
1
,
wxRA_SPECIFY_COLS
);
itemBoxSizer21
->
Add
(
m_Orient
,
0
,
wxALIGN_CENTER_HORIZONTAL
|
wxALL
,
5
);
wxString
m_ShowStrings
[]
=
{
wxString
m_ShowStrings
[]
=
{
_
(
"show"
),
_
(
"show"
),
_
(
"no show"
)
_
(
"no show"
)
};
};
m_Show
=
new
wxRadioBox
(
itemDialog1
,
ID_RADIOBOX1
,
_
(
"Display"
),
wxDefaultPosition
,
wxDefaultSize
,
2
,
m_ShowStrings
,
1
,
wxRA_SPECIFY_COLS
);
m_Show
=
new
wxRadioBox
(
itemDialog1
,
ID_RADIOBOX1
,
_
(
itemBoxSizer21
->
Add
(
m_Show
,
0
,
wxALIGN_CENTER_HORIZONTAL
|
wxALL
,
5
);
"Display"
),
wxDefaultPosition
,
wxDefaultSize
,
2
,
m_ShowStrings
,
1
,
wxRA_SPECIFY_COLS
);
itemBoxSizer21
->
Add
(
m_Show
,
0
,
wxALIGN_CENTER_HORIZONTAL
|
wxALL
,
5
);
////@end WinEDA_TextModPropertiesFrame content construction
////@end WinEDA_TextModPropertiesFrame content construction
/* Setup titles and datas */
/* Setup titles and datas */
SetDisplayValue
();
SetDisplayValue
();
}
}
/*!
/*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
*/
*/
void
WinEDA_TextModPropertiesFrame
::
OnOkClick
(
wxCommandEvent
&
event
)
void
WinEDA_TextModPropertiesFrame
::
OnOkClick
(
wxCommandEvent
&
event
)
{
{
TextModPropertiesAccept
(
event
);
TextModPropertiesAccept
(
event
);
}
}
/*!
/*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
*/
*/
...
@@ -256,9 +317,11 @@ void WinEDA_TextModPropertiesFrame::OnCancelClick( wxCommandEvent& event )
...
@@ -256,9 +317,11 @@ void WinEDA_TextModPropertiesFrame::OnCancelClick( wxCommandEvent& event )
////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_TextModPropertiesFrame.
////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_TextModPropertiesFrame.
// Before editing this code, remove the block markers.
// Before editing this code, remove the block markers.
event
.
Skip
();
event
.
Skip
();
////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_TextModPropertiesFrame.
////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_TextModPropertiesFrame.
}
}
/*!
/*!
* Should we show tooltips?
* Should we show tooltips?
*/
*/
...
@@ -268,6 +331,7 @@ bool WinEDA_TextModPropertiesFrame::ShowToolTips()
...
@@ -268,6 +331,7 @@ bool WinEDA_TextModPropertiesFrame::ShowToolTips()
return
true
;
return
true
;
}
}
/*!
/*!
* Get bitmap resources
* Get bitmap resources
*/
*/
...
@@ -276,11 +340,13 @@ wxBitmap WinEDA_TextModPropertiesFrame::GetBitmapResource( const wxString& name
...
@@ -276,11 +340,13 @@ wxBitmap WinEDA_TextModPropertiesFrame::GetBitmapResource( const wxString& name
{
{
// Bitmap retrieval
// Bitmap retrieval
////@begin WinEDA_TextModPropertiesFrame bitmap retrieval
////@begin WinEDA_TextModPropertiesFrame bitmap retrieval
wxUnusedVar
(
name
);
wxUnusedVar
(
name
);
return
wxNullBitmap
;
return
wxNullBitmap
;
////@end WinEDA_TextModPropertiesFrame bitmap retrieval
////@end WinEDA_TextModPropertiesFrame bitmap retrieval
}
}
/*!
/*!
* Get icon resources
* Get icon resources
*/
*/
...
@@ -289,102 +355,120 @@ wxIcon WinEDA_TextModPropertiesFrame::GetIconResource( const wxString& name )
...
@@ -289,102 +355,120 @@ wxIcon WinEDA_TextModPropertiesFrame::GetIconResource( const wxString& name )
{
{
// Icon retrieval
// Icon retrieval
////@begin WinEDA_TextModPropertiesFrame icon retrieval
////@begin WinEDA_TextModPropertiesFrame icon retrieval
wxUnusedVar
(
name
);
wxUnusedVar
(
name
);
return
wxNullIcon
;
return
wxNullIcon
;
////@end WinEDA_TextModPropertiesFrame icon retrieval
////@end WinEDA_TextModPropertiesFrame icon retrieval
}
}
/********************************************************/
/********************************************************/
void
WinEDA_TextModPropertiesFrame
::
SetDisplayValue
()
void
WinEDA_TextModPropertiesFrame
::
SetDisplayValue
()
/********************************************************/
/********************************************************/
{
{
wxString
msg
;
wxString
msg
;
if
(
m_Module
)
if
(
m_Module
)
{
{
wxString
format
=
m_ModuleInfoText
->
GetLabel
();
wxString
format
=
m_ModuleInfoText
->
GetLabel
();
msg
.
Printf
(
format
,
msg
.
Printf
(
format
,
m_Module
->
m_Reference
->
m_Text
.
GetData
(),
m_Module
->
m_Reference
->
m_Text
.
GetData
(),
m_Module
->
m_Value
->
m_Text
.
GetData
(),
m_Module
->
m_Value
->
m_Text
.
GetData
(),
(
float
)(
m_Module
->
m_Orient
/
10
)
);
(
float
)
(
m_Module
->
m_Orient
/
10
)
);
m_ModuleInfoText
->
SetLabel
(
msg
);
m_ModuleInfoText
->
SetLabel
(
msg
);
}
}
if
(
m_CurrentTextMod
->
m_Type
==
TEXT_is_VALUE
)
m_TextDataTitle
->
SetLabel
(
_
(
"Value:"
));
if
(
m_CurrentTextMod
->
m_Type
==
TEXT_is_VALUE
)
else
if
(
m_CurrentTextMod
->
m_Type
==
TEXT_is_DIVERS
)
m_TextDataTitle
->
SetLabel
(
_
(
"Text:"
));
m_TextDataTitle
->
SetLabel
(
_
(
"Value:"
)
);
else
if
(
m_CurrentTextMod
->
m_Type
!=
TEXT_is_REFERENCE
)
m_TextDataTitle
->
SetLabel
(
wxT
(
"???"
));
else
if
(
m_CurrentTextMod
->
m_Type
==
TEXT_is_DIVERS
)
m_TextDataTitle
->
SetLabel
(
_
(
"Text:"
)
);
m_Name
->
SetValue
(
m_CurrentTextMod
->
m_Text
);
else
if
(
m_CurrentTextMod
->
m_Type
!=
TEXT_is_REFERENCE
)
m_TextDataTitle
->
SetLabel
(
wxT
(
"???"
)
);
AddUnitSymbol
(
*
m_SizeXTitle
);
PutValueInLocalUnits
(
*
m_TxtSizeCtrlX
,
m_CurrentTextMod
->
m_Size
.
x
,
m_Name
->
SetValue
(
m_CurrentTextMod
->
m_Text
);
m_Parent
->
m_InternalUnits
);
AddUnitSymbol
(
*
m_SizeXTitle
);
AddUnitSymbol
(
*
m_SizeYTitle
);
PutValueInLocalUnits
(
*
m_TxtSizeCtrlX
,
m_CurrentTextMod
->
m_Size
.
x
,
PutValueInLocalUnits
(
*
m_TxtSizeCtrlY
,
m_CurrentTextMod
->
m_Size
.
y
,
m_Parent
->
m_InternalUnits
);
m_Parent
->
m_InternalUnits
);
AddUnitSymbol
(
*
m_SizeYTitle
);
AddUnitSymbol
(
*
m_PosXTitle
);
PutValueInLocalUnits
(
*
m_TxtSizeCtrlY
,
m_CurrentTextMod
->
m_Size
.
y
,
PutValueInLocalUnits
(
*
m_TxtPosCtrlX
,
m_CurrentTextMod
->
m_Pos0
.
x
,
m_Parent
->
m_InternalUnits
);
m_Parent
->
m_InternalUnits
);
AddUnitSymbol
(
*
m_PosXTitle
);
AddUnitSymbol
(
*
m_PosYTitle
);
PutValueInLocalUnits
(
*
m_TxtPosCtrlX
,
m_CurrentTextMod
->
m_Pos0
.
x
,
PutValueInLocalUnits
(
*
m_TxtPosCtrlY
,
m_CurrentTextMod
->
m_Pos0
.
y
,
m_Parent
->
m_InternalUnits
);
m_Parent
->
m_InternalUnits
);
AddUnitSymbol
(
*
m_PosYTitle
);
AddUnitSymbol
(
*
m_WidthTitle
);
PutValueInLocalUnits
(
*
m_TxtPosCtrlY
,
m_CurrentTextMod
->
m_Pos0
.
y
,
PutValueInLocalUnits
(
*
m_TxtWidthCtlr
,
m_CurrentTextMod
->
m_Width
,
m_Parent
->
m_InternalUnits
);
m_Parent
->
m_InternalUnits
);
AddUnitSymbol
(
*
m_WidthTitle
);
if
(
(
m_CurrentTextMod
->
m_Orient
!=
0
)
&&
(
m_CurrentTextMod
->
m_Orient
!=
1800
)
&&
PutValueInLocalUnits
(
*
m_TxtWidthCtlr
,
m_CurrentTextMod
->
m_Width
,
(
m_CurrentTextMod
->
m_Orient
!=
-
1800
)
)
m_Parent
->
m_InternalUnits
);
m_Orient
->
SetSelection
(
1
);;
if
(
(
m_CurrentTextMod
->
m_Orient
!=
0
)
&&
(
m_CurrentTextMod
->
m_Orient
!=
1800
)
if
(
m_CurrentTextMod
->
m_NoShow
)
m_Show
->
SetSelection
(
1
);;
&&
(
m_CurrentTextMod
->
m_Orient
!=
-
1800
)
)
m_Orient
->
SetSelection
(
1
);;
if
(
m_CurrentTextMod
->
m_NoShow
)
m_Show
->
SetSelection
(
1
);;
}
}
/*********************************************************************************/
/*********************************************************************************/
void
WinEDA_TextModPropertiesFrame
::
TextModPropertiesAccept
(
wxCommandEvent
&
event
)
void
WinEDA_TextModPropertiesFrame
::
TextModPropertiesAccept
(
wxCommandEvent
&
event
)
/*********************************************************************************/
/*********************************************************************************/
{
{
wxString
msg
;
wxString
msg
;
m_Parent
->
SaveCopyInUndoList
(
m_Parent
->
m_Pcb
->
m_Modules
);
m_Parent
->
SaveCopyInUndoList
(
m_Parent
->
m_Pcb
->
m_Modules
);
if
(
m_DC
)
// Effacement ancien texte
if
(
m_DC
)
// Effacement ancien texte
{
{
m_CurrentTextMod
->
Draw
(
m_Parent
->
DrawPanel
,
m_DC
,
m_CurrentTextMod
->
Draw
(
m_Parent
->
DrawPanel
,
m_DC
,
(
m_CurrentTextMod
->
m_Flags
&
IS_MOVED
)
?
MoveVector
:
wxPoint
(
0
,
0
),
GR_XOR
);
(
m_CurrentTextMod
->
m_Flags
&
IS_MOVED
)
?
MoveVector
:
wxPoint
(
0
,
0
),
GR_XOR
);
}
}
m_CurrentTextMod
->
m_Text
=
m_Name
->
GetValue
();
m_CurrentTextMod
->
m_Text
=
m_Name
->
GetValue
();
msg
=
m_TxtPosCtrlX
->
GetValue
();
msg
=
m_TxtPosCtrlX
->
GetValue
();
m_CurrentTextMod
->
m_Pos0
.
x
=
ReturnValueFromString
(
g_UnitMetric
,
msg
,
m_CurrentTextMod
->
m_Pos0
.
x
=
ReturnValueFromString
(
g_UnitMetric
,
msg
,
m_Parent
->
m_InternalUnits
);
m_Parent
->
m_InternalUnits
);
msg
=
m_TxtPosCtrlY
->
GetValue
();
msg
=
m_TxtPosCtrlY
->
GetValue
();
m_CurrentTextMod
->
m_Pos0
.
y
=
ReturnValueFromString
(
g_UnitMetric
,
msg
,
m_CurrentTextMod
->
m_Pos0
.
y
=
ReturnValueFromString
(
g_UnitMetric
,
msg
,
m_Parent
->
m_InternalUnits
);
m_Parent
->
m_InternalUnits
);
msg
=
m_TxtSizeCtrlX
->
GetValue
();
msg
=
m_TxtSizeCtrlX
->
GetValue
();
m_CurrentTextMod
->
m_Size
.
x
=
ReturnValueFromString
(
g_UnitMetric
,
msg
,
m_CurrentTextMod
->
m_Size
.
x
=
ReturnValueFromString
(
g_UnitMetric
,
msg
,
m_Parent
->
m_InternalUnits
);
m_Parent
->
m_InternalUnits
);
msg
=
m_TxtSizeCtrlY
->
GetValue
();
msg
=
m_TxtSizeCtrlY
->
GetValue
();
m_CurrentTextMod
->
m_Size
.
y
=
ReturnValueFromString
(
g_UnitMetric
,
msg
,
m_CurrentTextMod
->
m_Size
.
y
=
ReturnValueFromString
(
g_UnitMetric
,
msg
,
m_Parent
->
m_InternalUnits
);
m_Parent
->
m_InternalUnits
);
msg
=
m_TxtWidthCtlr
->
GetValue
();
// Test for a reasonnable size:
m_CurrentTextMod
->
SetWidth
(
ReturnValueFromString
(
g_UnitMetric
,
msg
,
if
(
m_CurrentTextMod
->
m_Size
.
x
<
TEXTS_MIN_SIZE
)
m_Parent
->
m_InternalUnits
)
);
m_CurrentTextMod
->
m_Size
.
x
=
TEXTS_MIN_SIZE
;
if
(
m_CurrentTextMod
->
m_Size
.
y
<
TEXTS_MIN_SIZE
)
m_CurrentTextMod
->
m_NoShow
=
(
m_Show
->
GetSelection
()
==
0
)
?
0
:
1
;
m_CurrentTextMod
->
m_Size
.
y
=
TEXTS_MIN_SIZE
;
m_CurrentTextMod
->
m_Orient
=
(
m_Orient
->
GetSelection
()
==
0
)
?
0
:
900
;
m_CurrentTextMod
->
SetDrawCoord
();
msg
=
m_TxtWidthCtlr
->
GetValue
();
if
(
m_DC
)
// Affichage nouveau texte
int
width
=
ReturnValueFromString
(
g_UnitMetric
,
msg
,
m_Parent
->
m_InternalUnits
);
{
m_CurrentTextMod
->
Draw
(
m_Parent
->
DrawPanel
,
m_DC
,
// Test for a reasonnable width:
(
m_CurrentTextMod
->
m_Flags
&
IS_MOVED
)
?
MoveVector
:
wxPoint
(
0
,
0
),
GR_XOR
);
if
(
width
<=
1
)
}
width
=
1
;
m_Parent
->
GetScreen
()
->
SetModify
();
if
(
width
>
TEXTS_MAX_WIDTH
)
((
MODULE
*
)
m_CurrentTextMod
->
m_Parent
)
->
m_LastEdit_Time
=
time
(
NULL
);
width
=
TEXTS_MAX_WIDTH
;
Close
(
TRUE
);
m_CurrentTextMod
->
SetWidth
(
width
);
m_CurrentTextMod
->
m_NoShow
=
(
m_Show
->
GetSelection
()
==
0
)
?
0
:
1
;
m_CurrentTextMod
->
m_Orient
=
(
m_Orient
->
GetSelection
()
==
0
)
?
0
:
900
;
m_CurrentTextMod
->
SetDrawCoord
();
if
(
m_DC
)
// Display new text
{
m_CurrentTextMod
->
Draw
(
m_Parent
->
DrawPanel
,
m_DC
,
(
m_CurrentTextMod
->
m_Flags
&
IS_MOVED
)
?
MoveVector
:
wxPoint
(
0
,
0
),
GR_XOR
);
}
m_Parent
->
GetScreen
()
->
SetModify
();
(
(
MODULE
*
)
m_CurrentTextMod
->
m_Parent
)
->
m_LastEdit_Time
=
time
(
NULL
);
Close
(
TRUE
);
}
}
pcbnew/pcbcfg.h
View file @
f34be930
...
@@ -92,7 +92,7 @@ static PARAM_CFG_INT MicroViaDiametreCfg
...
@@ -92,7 +92,7 @@ static PARAM_CFG_INT MicroViaDiametreCfg
wxT
(
"MViaDia"
),
/* Keyword */
wxT
(
"MViaDia"
),
/* Keyword */
&
g_DesignSettings
.
m_CurrentMicroViaSize
,
/* Parameter address */
&
g_DesignSettings
.
m_CurrentMicroViaSize
,
/* Parameter address */
200
,
/* Default value */
200
,
/* Default value */
0
,
1000
/* Valeurs extremes */
0
,
1000
/* Valeurs extremes */
);
);
static
PARAM_CFG_INT
MicroViaDrillCfg
static
PARAM_CFG_INT
MicroViaDrillCfg
...
@@ -100,7 +100,7 @@ static PARAM_CFG_INT MicroViaDrillCfg
...
@@ -100,7 +100,7 @@ static PARAM_CFG_INT MicroViaDrillCfg
wxT
(
"MViaDrl"
),
/* Keyword */
wxT
(
"MViaDrl"
),
/* Keyword */
&
g_DesignSettings
.
m_MicroViaDrill
,
/* Parameter address */
&
g_DesignSettings
.
m_MicroViaDrill
,
/* Parameter address */
80
,
/* Default value */
80
,
/* Default value */
0
,
800
/* Valeurs extremes */
0
,
800
/* Valeurs extremes */
);
);
static
PARAM_CFG_INT
ViaShowHoleCfg
static
PARAM_CFG_INT
ViaShowHoleCfg
...
@@ -257,18 +257,18 @@ static PARAM_CFG_BOOL SegmPcb45Cfg // Force 45 degrees for segments
...
@@ -257,18 +257,18 @@ static PARAM_CFG_BOOL SegmPcb45Cfg // Force 45 degrees for segments
static
PARAM_CFG_INT
TextePcbDimVCfg
static
PARAM_CFG_INT
TextePcbDimVCfg
(
(
wxT
(
"TxtPcbV"
),
/* Keyword */
wxT
(
"TxtPcbV"
),
/* Keyword */
&
g_DesignSettings
.
m_PcbTextSize
.
y
,
/* Parameter address */
&
g_DesignSettings
.
m_PcbTextSize
.
y
,
/* Parameter address */
600
,
/* Default value */
600
,
/* Default value */
10
,
2000
/* Valeurs extremes */
TEXTS_MIN_SIZE
,
TEXTS_MAX_SIZE
/* Valeurs extremes */
);
);
static
PARAM_CFG_INT
TextePcbDimHCfg
static
PARAM_CFG_INT
TextePcbDimHCfg
(
(
wxT
(
"TxtPcbH"
),
/* Keyword */
wxT
(
"TxtPcbH"
),
/* Keyword */
&
g_DesignSettings
.
m_PcbTextSize
.
x
,
/* Parameter address */
&
g_DesignSettings
.
m_PcbTextSize
.
x
,
/* Parameter address */
600
,
/* Default value */
600
,
/* Default value */
10
,
2000
/* Valeurs extremes */
TEXTS_MIN_SIZE
,
TEXTS_MAX_SIZE
/* Valeurs extremes */
);
);
static
PARAM_CFG_SETCOLOR
ColorLayer0Cfg
// CU Layer Color
static
PARAM_CFG_SETCOLOR
ColorLayer0Cfg
// CU Layer Color
...
@@ -553,10 +553,10 @@ static PARAM_CFG_SETCOLOR VisibleTxtModCfg
...
@@ -553,10 +553,10 @@ static PARAM_CFG_SETCOLOR VisibleTxtModCfg
static
PARAM_CFG_INT
TexteModDimVCfg
static
PARAM_CFG_INT
TexteModDimVCfg
(
(
wxT
(
"TxtModV"
),
/* Keyword */
wxT
(
"TxtModV"
),
/* Keyword */
&
ModuleTextSize
.
y
,
/* Parameter address */
&
ModuleTextSize
.
y
,
/* Parameter address */
500
,
/* Default value */
500
,
/* Default value */
1
,
20000
/* Valeurs extremes */
TEXTS_MIN_SIZE
,
TEXTS_MAX_SIZE
/* Valeurs extremes */
);
);
static
PARAM_CFG_INT
TexteModDimHCfg
static
PARAM_CFG_INT
TexteModDimHCfg
...
@@ -564,7 +564,7 @@ static PARAM_CFG_INT TexteModDimHCfg
...
@@ -564,7 +564,7 @@ static PARAM_CFG_INT TexteModDimHCfg
wxT
(
"TxtModH"
),
/* Keyword */
wxT
(
"TxtModH"
),
/* Keyword */
&
ModuleTextSize
.
x
,
/* Parameter address */
&
ModuleTextSize
.
x
,
/* Parameter address */
500
,
/* Default value */
500
,
/* Default value */
1
,
20000
/* Valeurs extremes */
TEXTS_MIN_SIZE
,
TEXTS_MAX_SIZE
/* Valeurs extremes */
);
);
static
PARAM_CFG_INT
TexteModWidthCfg
static
PARAM_CFG_INT
TexteModWidthCfg
...
@@ -572,7 +572,7 @@ static PARAM_CFG_INT TexteModWidthCfg
...
@@ -572,7 +572,7 @@ static PARAM_CFG_INT TexteModWidthCfg
wxT
(
"TxtModW"
),
/* Keyword */
wxT
(
"TxtModW"
),
/* Keyword */
&
ModuleTextWidth
,
/* Parameter address */
&
ModuleTextWidth
,
/* Parameter address */
100
,
/* Default value */
100
,
/* Default value */
1
,
10000
/* Valeurs extremes */
1
,
TEXTS_MAX_WIDTH
/* Valeurs extremes */
);
);
static
PARAM_CFG_SETCOLOR
ColorAncreModCfg
static
PARAM_CFG_SETCOLOR
ColorAncreModCfg
...
...
pcbnew/pcbnew.h
View file @
f34be930
...
@@ -27,7 +27,11 @@
...
@@ -27,7 +27,11 @@
#define END 1
#define END 1
#define DIM_ANCRE_MODULE 3
/* Anchor size (footprint centre) */
#define DIM_ANCRE_MODULE 3
/* Anchor size (footprint centre) */
#define DIM_ANCRE_TEXTE 2
/* nchor size (Text centre) */
#define DIM_ANCRE_TEXTE 2
/* Anchor size (Text centre) */
#define TEXTS_MIN_SIZE 50 // Min size in pcbnew units value (50 * 0.0001 mils)
#define TEXTS_MAX_SIZE 100000 // Min size in pcbnew units value (1 inch) )
#define TEXTS_MAX_WIDTH 5000 // Max width in pcbnew units value (0.5 inches)
/* Used in Zoom menu */
/* Used in Zoom menu */
#define ZOOM_PLUS -1
#define ZOOM_PLUS -1
...
...
pcbnew/pcbtexte.cpp
View file @
f34be930
...
@@ -202,6 +202,17 @@ void WinEDA_TextPCBPropertiesFrame::OnCancelClick( wxCommandEvent& WXUNUSED (eve
...
@@ -202,6 +202,17 @@ void WinEDA_TextPCBPropertiesFrame::OnCancelClick( wxCommandEvent& WXUNUSED (eve
void
WinEDA_TextPCBPropertiesFrame
::
OnOkClick
(
wxCommandEvent
&
event
)
void
WinEDA_TextPCBPropertiesFrame
::
OnOkClick
(
wxCommandEvent
&
event
)
/**************************************************************************************/
/**************************************************************************************/
{
{
// test for acceptable values for parameters:
wxSize
newsize
=
m_TxtSizeCtrl
->
GetValue
();
if
(
newsize
.
x
<
TEXTS_MIN_SIZE
)
newsize
.
x
=
TEXTS_MIN_SIZE
;
if
(
newsize
.
y
<
TEXTS_MIN_SIZE
)
newsize
.
y
=
TEXTS_MIN_SIZE
;
if
(
newsize
.
x
>
TEXTS_MAX_WIDTH
)
newsize
.
x
=
TEXTS_MAX_WIDTH
;
if
(
newsize
.
y
>
TEXTS_MAX_WIDTH
)
newsize
.
y
=
TEXTS_MAX_WIDTH
;
if
(
m_DC
)
// Effacement ancien texte
if
(
m_DC
)
// Effacement ancien texte
{
{
CurrentTextPCB
->
Draw
(
m_Parent
->
DrawPanel
,
m_DC
,
wxPoint
(
0
,
0
),
GR_XOR
);
CurrentTextPCB
->
Draw
(
m_Parent
->
DrawPanel
,
m_DC
,
wxPoint
(
0
,
0
),
GR_XOR
);
...
@@ -212,12 +223,18 @@ void WinEDA_TextPCBPropertiesFrame::OnOkClick( wxCommandEvent& event )
...
@@ -212,12 +223,18 @@ void WinEDA_TextPCBPropertiesFrame::OnOkClick( wxCommandEvent& event )
CurrentTextPCB
->
m_Text
=
m_Name
->
GetValue
();
CurrentTextPCB
->
m_Text
=
m_Name
->
GetValue
();
}
}
CurrentTextPCB
->
m_Pos
=
m_TxtPosCtrl
->
GetValue
();
CurrentTextPCB
->
m_Pos
=
m_TxtPosCtrl
->
GetValue
();
CurrentTextPCB
->
m_Size
=
m_TxtSizeCtrl
->
GetValue
();
CurrentTextPCB
->
m_Size
=
newsize
;
CurrentTextPCB
->
m_Width
=
m_TxtWidthCtlr
->
GetValue
();
CurrentTextPCB
->
m_Width
=
m_TxtWidthCtlr
->
GetValue
();
// test for acceptable values for parameters:
if
(
CurrentTextPCB
->
m_Width
>
TEXTS_MAX_WIDTH
)
CurrentTextPCB
->
m_Width
=
TEXTS_MAX_WIDTH
;
CurrentTextPCB
->
m_Miroir
=
(
m_Mirror
->
GetSelection
()
==
0
)
?
1
:
0
;
CurrentTextPCB
->
m_Miroir
=
(
m_Mirror
->
GetSelection
()
==
0
)
?
1
:
0
;
CurrentTextPCB
->
m_Orient
=
m_Orient
->
GetSelection
()
*
900
;
CurrentTextPCB
->
m_Orient
=
m_Orient
->
GetSelection
()
*
900
;
CurrentTextPCB
->
SetLayer
(
m_SelLayerBox
->
GetChoice
()
);
CurrentTextPCB
->
SetLayer
(
m_SelLayerBox
->
GetChoice
()
);
CurrentTextPCB
->
CreateDrawData
();
CurrentTextPCB
->
CreateDrawData
();
if
(
m_DC
)
// Affichage nouveau texte
if
(
m_DC
)
// Affichage nouveau texte
{
{
/* Redessin du Texte */
/* Redessin du Texte */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment