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
d2eac37d
Commit
d2eac37d
authored
Nov 23, 2009
by
stambaughw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comment translation complete, Yeah!!!!
parent
8d8bdc3e
Changes
29
Show whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
1492 additions
and
1262 deletions
+1492
-1262
genorcad.cpp
cvpcb/genorcad.cpp
+1
-1
writenetlistpcbnew.cpp
cvpcb/writenetlistpcbnew.cpp
+1
-1
block.cpp
eeschema/block.cpp
+1
-1
cleanup.cpp
eeschema/cleanup.cpp
+2
-1
netlist.cpp
eeschema/netlist.cpp
+1
-2
appl_wxstruct.h
include/appl_wxstruct.h
+62
-58
base_struct.h
include/base_struct.h
+138
-102
bitmaps.h
include/bitmaps.h
+0
-2
block_commande.h
include/block_commande.h
+47
-33
class_base_screen.h
include/class_base_screen.h
+85
-68
class_collector.h
include/class_collector.h
+34
-34
class_drawpanel.h
include/class_drawpanel.h
+59
-38
class_pcb_screen.h
include/class_pcb_screen.h
+17
-13
colors.h
include/colors.h
+13
-15
common.h
include/common.h
+130
-109
confirm.h
include/confirm.h
+4
-14
eda_doc.h
include/eda_doc.h
+14
-16
fctsys.h
include/fctsys.h
+4
-3
gestfich.h
include/gestfich.h
+35
-57
gr_basic.h
include/gr_basic.h
+159
-120
kicad_string.h
include/kicad_string.h
+55
-59
pcbcommon.h
include/pcbcommon.h
+2
-4
pcbstruct.h
include/pcbstruct.h
+79
-78
pyhandler.h
include/pyhandler.h
+9
-9
trigo.h
include/trigo.h
+18
-19
worksheet.h
include/worksheet.h
+15
-20
wxBasePcbFrame.h
include/wxBasePcbFrame.h
+170
-124
wxPcbStruct.h
include/wxPcbStruct.h
+270
-194
wxstruct.h
include/wxstruct.h
+67
-67
No files found.
cvpcb/genorcad.cpp
View file @
d2eac37d
...
@@ -136,7 +136,7 @@ static void TriPinsModule( COMPONENT* CurrentCmp )
...
@@ -136,7 +136,7 @@ static void TriPinsModule( COMPONENT* CurrentCmp )
}
}
/*
**** JP translate ****
/*
???
*
*
* Change le NetName PinNet par un nom compose des 8 derniers codes de PinNet
* Change le NetName PinNet par un nom compose des 8 derniers codes de PinNet
* suivi de _Xnnnnn ou nnnnn est un nom de 0 a 99999
* suivi de _Xnnnnn ou nnnnn est un nom de 0 a 99999
...
...
cvpcb/writenetlistpcbnew.cpp
View file @
d2eac37d
...
@@ -162,7 +162,7 @@ void WriteFootprintFilterInfos( FILE* file, COMPONENT_LIST& list )
...
@@ -162,7 +162,7 @@ void WriteFootprintFilterInfos( FILE* file, COMPONENT_LIST& list )
}
}
/*
*** JP translate ***
/*
???
* Change le NetName PinNet par un nom compose des 8 derniers codes de PinNet
* Change le NetName PinNet par un nom compose des 8 derniers codes de PinNet
* suivi de _Xnnnnn ou nnnnn est un nom de 0 a 99999
* suivi de _Xnnnnn ou nnnnn est un nom de 0 a 99999
*/
*/
...
...
eeschema/block.cpp
View file @
d2eac37d
...
@@ -377,7 +377,7 @@ void WinEDA_SchematicFrame::HandleBlockEndByPopUp( int Command, wxDC* DC )
...
@@ -377,7 +377,7 @@ void WinEDA_SchematicFrame::HandleBlockEndByPopUp( int Command, wxDC* DC )
case
BLOCK_DRAG
:
/* move to Drag */
case
BLOCK_DRAG
:
/* move to Drag */
/*
*JP translate*
/*
???
* Effacement de la liste des structures de pointage,
* Effacement de la liste des structures de pointage,
* qui est devenue erronnee
* qui est devenue erronnee
*/
*/
...
...
eeschema/cleanup.cpp
View file @
d2eac37d
...
@@ -145,7 +145,8 @@ void BreakSegment( SCH_SCREEN* aScreen, wxPoint aBreakpoint )
...
@@ -145,7 +145,8 @@ void BreakSegment( SCH_SCREEN* aScreen, wxPoint aBreakpoint )
if
(
!
TestSegmentHit
(
aBreakpoint
,
segment
->
m_Start
,
segment
->
m_End
,
0
)
)
if
(
!
TestSegmentHit
(
aBreakpoint
,
segment
->
m_Start
,
segment
->
m_End
,
0
)
)
continue
;
continue
;
/* * JP translate * Segment connecte: doit etre coupe en 2 si px,py
/* ???
* Segment connecte: doit etre coupe en 2 si px,py
* n'est
* n'est
* pas une extremite */
* pas une extremite */
if
(
(
segment
->
m_Start
==
aBreakpoint
)
if
(
(
segment
->
m_Start
==
aBreakpoint
)
...
...
eeschema/netlist.cpp
View file @
d2eac37d
...
@@ -891,8 +891,7 @@ static void PointToPointConnect( NETLIST_OBJECT* Ref, int IsBus, int start )
...
@@ -891,8 +891,7 @@ static void PointToPointConnect( NETLIST_OBJECT* Ref, int IsBus, int start )
* Search if a junction is connected to segments and include the Netcode
* Search if a junction is connected to segments and include the Netcode
* objects connect to the junction.
* objects connect to the junction.
* The junction must have a valid Netcode
* The junction must have a valid Netcode
* The list of objects is SUPPOSED class by NumSheet *JP translate*
* The list of objects is SUPPOSED class by NumSheet ??? Croissants,
* Croissants,
* And research is done from the start element, 1st element
* And research is done from the start element, 1st element
* Leaf schema
* Leaf schema
* (There can be no physical connection between elements of different sheets)
* (There can be no physical connection between elements of different sheets)
...
...
include/appl_wxstruct.h
View file @
d2eac37d
/************************************************************/
/******************************************/
/* appl_wxstruct.h: */
/* appl_wxstruct.h */
/* descriptions des principales classes derivees utilisees: */
/* Base application class implementation. */
/* Class "EDA_Appl: classe de l'application generale */
/******************************************/
/************************************************************/
/* Ce fichier doit etre inclus dans "wxstruct.h"
*/
#ifndef APPL_WXSTRUCT_H
#ifndef APPL_WXSTRUCT_H
#define APPL_WXSTRUCT_H
#define APPL_WXSTRUCT_H
...
@@ -39,8 +35,10 @@ class wxHtmlHelpController;
...
@@ -39,8 +35,10 @@ class wxHtmlHelpController;
class
WinEDA_App
:
public
wxApp
class
WinEDA_App
:
public
wxApp
{
{
public
:
public
:
id_app_type
m_Id
;
/* Used mainly to handle default paths libs
id_app_type
m_Id
;
/* Used mainly to handle
* m_Id = APP_TYPE_EESCHEMA, APP_TYPE_PCBNEW ...
* default paths libs
* m_Id = APP_TYPE_EESCHEMA,
* APP_TYPE_PCBNEW ...
*/
*/
wxString
m_Project
;
wxString
m_Project
;
wxSingleInstanceChecker
*
m_Checker
;
wxSingleInstanceChecker
*
m_Checker
;
...
@@ -53,21 +51,20 @@ public:
...
@@ -53,21 +51,20 @@ public:
wxFileConfig
*
m_ProjectConfig
;
wxFileConfig
*
m_ProjectConfig
;
wxString
m_HelpFileName
;
wxString
m_HelpFileName
;
wxString
m_EditorName
;
wxString
m_EditorName
;
wxString
m_CurrentOptionFile
;
// dernier fichier .cnf utilis
wxString
m_CurrentOptionFile
;
wxString
m_CurrentOptionFileDateAndTime
;
wxString
m_CurrentOptionFileDateAndTime
;
wxString
m_BinDir
;
/* Chemin ou reside l'executable
wxString
m_BinDir
;
/* Kicad executable path.*/
* (utilis si KICAD non dfini)*/
wxString
m_KicadEnv
;
/* environment variable KICAD */
wxString
m_KicadEnv
;
/* Chemin de kicad dfini dans la
bool
m_Env_Defined
;
// TRUE if environment KICAD is
* variable d'environnement KICAD,
// defined.
* typiquement /usr/local/kicad ou
* c:\kicad */
wxLocale
*
m_Locale
;
// The current locale.
bool
m_Env_Defined
;
// TRUE si variable d'environnement KICAD definie
int
m_LanguageId
;
// The current language setting.
wxString
m_PdfBrowser
;
// Name of the selected browser,
wxLocale
*
m_Locale
;
// Gestion de la localisation
// for browsing pdf datasheets
int
m_LanguageId
;
// indicateur de choix du langage ( 0 = defaut)
bool
m_PdfBrowserIsDefault
;
// True if the pdf browser is the
wxString
m_PdfBrowser
;
// Name of the selected browser, for browsing pdf datasheets
// default (m_PdfBrowser not used)
bool
m_PdfBrowserIsDefault
;
// True if the pdf browser is the default (m_PdfBrowser not used)
wxPathList
m_searchPaths
;
wxPathList
m_searchPaths
;
wxFileHistory
m_fileHistory
;
wxFileHistory
m_fileHistory
;
...
@@ -77,8 +74,7 @@ protected:
...
@@ -77,8 +74,7 @@ protected:
wxFileName
m_projectFileName
;
wxFileName
m_projectFileName
;
wxString
m_LastVisitedLibPath
;
wxString
m_LastVisitedLibPath
;
public
:
public
:
WinEDA_App
();
WinEDA_App
();
~
WinEDA_App
();
~
WinEDA_App
();
bool
OnInit
();
bool
OnInit
();
int
OnRun
();
int
OnRun
();
...
@@ -87,7 +83,7 @@ public:
...
@@ -87,7 +83,7 @@ public:
void
SetDefaultSearchPaths
(
void
);
void
SetDefaultSearchPaths
(
void
);
/** Function InitEDA_Appl
/** Function InitEDA_Appl
* initiali
s
e some general parameters
* initiali
z
e some general parameters
* - Default paths (help, libs, bin)and configuration files names
* - Default paths (help, libs, bin)and configuration files names
* - Language and locale
* - Language and locale
* - fonts
* - fonts
...
@@ -95,7 +91,8 @@ public:
...
@@ -95,7 +91,8 @@ public:
* @param aId = flag : LIBRARY_TYPE_EESCHEMA or LIBRARY_TYPE_PCBNEW
* @param aId = flag : LIBRARY_TYPE_EESCHEMA or LIBRARY_TYPE_PCBNEW
* used to choose what default library path must be used
* used to choose what default library path must be used
*/
*/
void
InitEDA_Appl
(
const
wxString
&
aName
,
id_app_type
aId
=
APP_TYPE_UNKOWN
);
void
InitEDA_Appl
(
const
wxString
&
aName
,
id_app_type
aId
=
APP_TYPE_UNKOWN
);
bool
SetLanguage
(
bool
first_time
=
FALSE
);
bool
SetLanguage
(
bool
first_time
=
FALSE
);
...
@@ -104,8 +101,9 @@ public:
...
@@ -104,8 +101,9 @@ public:
* Create menu list for language choice, and add it as submenu to a main
* Create menu list for language choice, and add it as submenu to a main
* menu
* menu
*
*
* @param MasterMenu : The main menu. The sub menu list will be accessible
* @param MasterMenu : The main menu. The sub menu list will be
* from the menu item with id ID_LANGUAGE_CHOICE
* accessible from the menu item with id
* ID_LANGUAGE_CHOICE
*
*
* @return the sub menu Language list
* @return the sub menu Language list
*/
*/
...
@@ -114,13 +112,13 @@ public:
...
@@ -114,13 +112,13 @@ public:
void
SetLanguagePath
(
void
);
void
SetLanguagePath
(
void
);
void
InitOnLineHelp
();
void
InitOnLineHelp
();
// Sauvegarde de configurations et options:
/** Function GetSettings
/** Function GetSettings
* Get application settings
* Get application settings
* @param aReopenLastUsedDirectory = true to switch to last opened directory, false to use current CWD
* @param aReopenLastUsedDirectory = true to switch to last opened
* directory, false to use current CWD
* @return none
* @return none
*/
*/
void
GetSettings
(
bool
aReopenLastUsedDirectory
);
void
GetSettings
(
bool
aReopenLastUsedDirectory
);
void
SaveSettings
();
void
SaveSettings
();
...
@@ -133,7 +131,8 @@ public:
...
@@ -133,7 +131,8 @@ public:
/** Function SaveCurrentSetupValues()
/** Function SaveCurrentSetupValues()
* Save the current setup values in m_EDA_Config
* Save the current setup values in m_EDA_Config
* saved parameters are parameters that have the .m_Setup member set to true
* saved parameters are parameters that have the .m_Setup member set to
* true
* @param aList = array of PARAM_CFG_BASE pointers
* @param aList = array of PARAM_CFG_BASE pointers
*/
*/
void
SaveCurrentSetupValues
(
PARAM_CFG_BASE
**
aList
);
void
SaveCurrentSetupValues
(
PARAM_CFG_BASE
**
aList
);
...
@@ -141,7 +140,8 @@ public:
...
@@ -141,7 +140,8 @@ public:
/** Function ReadCurrentSetupValues()
/** Function ReadCurrentSetupValues()
* Raed the current setup values previously saved, from m_EDA_Config
* Raed the current setup values previously saved, from m_EDA_Config
* saved parameters are parameters that have the .m_Setup member set to true
* saved parameters are parameters that have the .m_Setup member set to
* true
* @param aList = array of PARAM_CFG_BASE pointers
* @param aList = array of PARAM_CFG_BASE pointers
*/
*/
void
ReadCurrentSetupValues
(
PARAM_CFG_BASE
**
aList
);
void
ReadCurrentSetupValues
(
PARAM_CFG_BASE
**
aList
);
...
@@ -188,24 +188,28 @@ public:
...
@@ -188,24 +188,28 @@ public:
return
FindLibraryPath
(
fileName
.
GetFullPath
()
);
return
FindLibraryPath
(
fileName
.
GetFullPath
()
);
}
}
/** ReturnLastVisitedLibraryPath
/** ReturnLastVisitedLibraryPath
* Returns the last visited library directory, or (if void) the first
* Returns the last visited library directory, or (if void) the first
* path in lib path list ( but not the CWD )
* path in lib path list ( but not the CWD )
* @param aSubPathToSearch = Prefered sub path to search in path list
* @param aSubPathToSearch = Prefer
r
ed sub path to search in path list
*/
*/
wxString
ReturnLastVisitedLibraryPath
(
const
wxString
&
aSubPathToSearch
=
wxEmptyString
);
wxString
ReturnLastVisitedLibraryPath
(
void
SaveLastVisitedLibraryPath
(
const
wxString
&
aPath
);
const
wxString
&
aSubPathToSearch
=
wxEmptyString
);
void
SaveLastVisitedLibraryPath
(
const
wxString
&
aPath
);
/** ReturnFilenameWithRelativePathInLibPath
/** ReturnFilenameWithRelativePathInLibPath
* @return a short filename (with extension) with only a relative path if
this filename
* @return a short filename (with extension) with only a relative path if
* can be found in library paths
*
this filename
can be found in library paths
* @param aFullFilename = filename with path and extension.
* @param aFullFilename = filename with path and extension.
*/
*/
wxString
ReturnFilenameWithRelativePathInLibPath
(
const
wxString
&
aFullFilename
);
wxString
ReturnFilenameWithRelativePathInLibPath
(
const
wxString
&
aFullFilename
);
/** Function RemoveLibraryPath
/** Function RemoveLibraryPath
* Removes the given path(s) from the library path list
* Removes the given path(s) from the library path list
* @param aPaths = path or path list to remove. paths must be separated by ";"
* @param aPaths = path or path list to remove. paths must be separated by
* ";"
*/
*/
void
RemoveLibraryPath
(
const
wxString
&
aPaths
);
void
RemoveLibraryPath
(
const
wxString
&
aPaths
);
...
...
include/base_struct.h
View file @
d2eac37d
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
#include "colors.h"
#include "colors.h"
#if defined
(DEBUG)
#if defined(DEBUG)
#include <iostream> // needed for Show()
#include <iostream> // needed for Show()
extern
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
wxSize
&
size
);
extern
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
wxSize
&
size
);
...
@@ -35,7 +35,8 @@ enum KICAD_T {
...
@@ -35,7 +35,8 @@ enum KICAD_T {
TYPE_EDGE_MODULE
,
// a footprint edge
TYPE_EDGE_MODULE
,
// a footprint edge
TYPE_TRACK
,
// a track segment (segment on a copper layer)
TYPE_TRACK
,
// a track segment (segment on a copper layer)
TYPE_VIA
,
// a via (like atrack segment on a copper layer)
TYPE_VIA
,
// a via (like atrack segment on a copper layer)
TYPE_ZONE
,
// a segment used to fill a zome area (segment on a copper layer)
TYPE_ZONE
,
// a segment used to fill a zone area (segment on a
// copper layer)
TYPE_MARKER_PCB
,
// a marker used to show something
TYPE_MARKER_PCB
,
// a marker used to show something
TYPE_COTATION
,
// a dimension (graphic item)
TYPE_COTATION
,
// a dimension (graphic item)
TYPE_MIRE
,
// a target (graphic item)
TYPE_MIRE
,
// a target (graphic item)
...
@@ -123,7 +124,8 @@ public:
...
@@ -123,7 +124,8 @@ public:
/**
/**
* Function Inspect
* Function Inspect
* is the examining function within the INSPECTOR which is passed to the
* is the examining function within the INSPECTOR which is passed to the
* Iterate function. It is used primarily for searching, but not limited to
* Iterate function. It is used primarily for searching, but not limited
*to
* that. It can also collect or modify the scanned objects.
* that. It can also collect or modify the scanned objects.
*
*
* @param testItem An EDA_BaseStruct to examine.
* @param testItem An EDA_BaseStruct to examine.
...
@@ -132,7 +134,7 @@ public:
...
@@ -132,7 +134,7 @@ public:
* @return SEARCH_RESULT - SEARCH_QUIT if the Iterator is to stop the scan,
* @return SEARCH_RESULT - SEARCH_QUIT if the Iterator is to stop the scan,
* else SCAN_CONTINUE;
* else SCAN_CONTINUE;
*/
*/
SEARCH_RESULT
virtual
Inspect
(
EDA_BaseStruct
*
testItem
,
SEARCH_RESULT
virtual
Inspect
(
EDA_BaseStruct
*
testItem
,
const
void
*
testData
)
=
0
;
const
void
*
testData
)
=
0
;
};
};
...
@@ -153,17 +155,19 @@ public:
...
@@ -153,17 +155,19 @@ public:
EDA_Rect
()
{
};
EDA_Rect
()
{
};
EDA_Rect
(
const
wxPoint
&
aPos
,
const
wxSize
&
aSize
)
:
EDA_Rect
(
const
wxPoint
&
aPos
,
const
wxSize
&
aSize
)
:
m_Pos
(
aPos
)
m_Pos
(
aPos
)
,
,
m_Size
(
aSize
)
m_Size
(
aSize
)
{
}
{
}
wxPoint
Centre
()
wxPoint
Centre
()
{
{
return
wxPoint
(
m_Pos
.
x
+
(
m_Size
.
x
>>
1
),
m_Pos
.
y
+
(
m_Size
.
y
>>
1
)
);
return
wxPoint
(
m_Pos
.
x
+
(
m_Size
.
x
>>
1
),
m_Pos
.
y
+
(
m_Size
.
y
>>
1
)
);
}
}
void
Normalize
();
// Ensure the height and width are >= 0
void
Normalize
();
// Ensure the height and width are
// >= 0
bool
Inside
(
const
wxPoint
&
point
);
// Return TRUE if point is in Rect
bool
Inside
(
const
wxPoint
&
point
);
// Return TRUE if point is in Rect
bool
Inside
(
int
x
,
int
y
)
{
return
Inside
(
wxPoint
(
x
,
y
)
);
}
bool
Inside
(
int
x
,
int
y
)
{
return
Inside
(
wxPoint
(
x
,
y
)
);
}
...
@@ -182,7 +186,8 @@ public:
...
@@ -182,7 +186,8 @@ public:
void
SetSize
(
const
wxSize
&
size
)
{
m_Size
=
size
;
}
void
SetSize
(
const
wxSize
&
size
)
{
m_Size
=
size
;
}
void
SetSize
(
int
w
,
int
h
)
{
m_Size
.
x
=
w
;
m_Size
.
y
=
h
;
}
void
SetSize
(
int
w
,
int
h
)
{
m_Size
.
x
=
w
;
m_Size
.
y
=
h
;
}
void
Offset
(
int
dx
,
int
dy
)
{
m_Pos
.
x
+=
dx
;
m_Pos
.
y
+=
dy
;
}
void
Offset
(
int
dx
,
int
dy
)
{
m_Pos
.
x
+=
dx
;
m_Pos
.
y
+=
dy
;
}
void
Offset
(
const
wxPoint
&
offset
)
{
m_Pos
.
x
+=
offset
.
x
;
m_Pos
.
y
+=
offset
.
y
;
}
void
Offset
(
const
wxPoint
&
offset
)
{
m_Pos
.
x
+=
offset
.
x
;
m_Pos
.
y
+=
offset
.
y
;
}
void
SetX
(
int
val
)
{
m_Pos
.
x
=
val
;
}
void
SetX
(
int
val
)
{
m_Pos
.
x
=
val
;
}
void
SetY
(
int
val
)
{
m_Pos
.
y
=
val
;
}
void
SetY
(
int
val
)
{
m_Pos
.
y
=
val
;
}
void
SetWidth
(
int
val
)
{
m_Size
.
x
=
val
;
}
void
SetWidth
(
int
val
)
{
m_Size
.
x
=
val
;
}
...
@@ -208,16 +213,16 @@ public:
...
@@ -208,16 +213,16 @@ public:
operator
wxRect
()
const
{
return
wxRect
(
m_Pos
,
m_Size
);
}
operator
wxRect
()
const
{
return
wxRect
(
m_Pos
,
m_Size
);
}
/** Inflate
/** Inflate
* Inflate this object: move each horizontal edge by dx and each vertical
edge by dy
* Inflate this object: move each horizontal edge by dx and each vertical
* toward rect outside
*
edge by dy
toward rect outside
* if dx and/or dy is negative, move toward rect inside (deflate)
* if dx and/or dy is negative, move toward rect inside (deflate)
* Works for positive and negative rect size
* Works for positive and negative rect size
*/
*/
EDA_Rect
&
Inflate
(
wxCoord
dx
,
wxCoord
dy
);
EDA_Rect
&
Inflate
(
wxCoord
dx
,
wxCoord
dy
);
/** Inflate
/** Inflate
* Inflate this object: move each horizontal edge and each vertical edge by
aDelta
* Inflate this object: move each horizontal edge and each vertical edge by
* toward rect outside
*
aDelta
toward rect outside
* if aDelta is negative, move toward rect inside (deflate)
* if aDelta is negative, move toward rect inside (deflate)
* Works for positive and negative rect size
* Works for positive and negative rect size
*/
*/
...
@@ -240,9 +245,12 @@ class DHEAD;
...
@@ -240,9 +245,12 @@ class DHEAD;
/**
/**
* Class EDA_BaseStruct
* Class EDA_BaseStruct
* is a base class for most all the kicad significant classes, used in schematics and boards.
* is a base class for most all the kicad significant classes, used in
* schematics and boards.
*/
*/
// These define are used for the .m_Flags and .m_UndoRedoStatus member of the class EDA_BaseStruct
// These define are used for the .m_Flags and .m_UndoRedoStatus member of the
// class EDA_BaseStruct
#define IS_CHANGED (1 << 0)
#define IS_CHANGED (1 << 0)
#define IS_LINKED (1 << 1)
#define IS_LINKED (1 << 1)
#define IN_EDIT (1 << 2)
#define IN_EDIT (1 << 2)
...
@@ -255,13 +263,22 @@ class DHEAD;
...
@@ -255,13 +263,22 @@ class DHEAD;
#define STARTPOINT (1 << 9)
#define STARTPOINT (1 << 9)
#define ENDPOINT (1 << 10)
#define ENDPOINT (1 << 10)
#define SELECTED (1 << 11)
#define SELECTED (1 << 11)
#define SELECTEDNODE (1 << 12) ///< flag indiquant que la structure a deja selectionnee
#define SELECTEDNODE (1 << 12) ///< flag indicating that the structure
#define STRUCT_DELETED (1 << 13) ///< Bit flag de Status pour structures effacee
// has already selected
#define CANDIDATE (1 << 14) ///< flag indiquant que la structure est connectee
#define SKIP_STRUCT (1 << 15) ///< flag indiquant que la structure ne doit pas etre traitee
#define STRUCT_DELETED (1 << 13) ///< flag indication structures to be
// erased
#define CANDIDATE (1 << 14) ///< flag indicating that the structure
// is connected
#define SKIP_STRUCT (1 << 15) ///< flag indicating that the structure
// should be ignored
#define DO_NOT_DRAW (1 << 16) ///< Used to disable draw function
#define DO_NOT_DRAW (1 << 16) ///< Used to disable draw function
#define DRAW_ERASED (1 << 17) ///< draw in background color, used by classs TRACK in gerbview
#define DRAW_ERASED (1 << 17) ///< draw in background color, used by
#define IS_CANCELLED (1 << 18) ///< flag set when edit dialogs are canceled when editing a new object
// class TRACK in gerbview
#define IS_CANCELLED (1 << 18) ///< flag set when edit dialogs are
// canceled when editing a new object
class
EDA_BaseStruct
class
EDA_BaseStruct
{
{
...
@@ -269,7 +286,8 @@ private:
...
@@ -269,7 +286,8 @@ private:
/**
/**
* Run time identification, _keep private_ so it can never be changed after
* Run time identification, _keep private_ so it can never be changed after
* a constructor sets it. See comment near SetType() regarding virtual functions.
* a constructor sets it. See comment near SetType() regarding virtual
*functions.
*/
*/
KICAD_T
m_StructType
;
KICAD_T
m_StructType
;
...
@@ -285,10 +303,12 @@ public:
...
@@ -285,10 +303,12 @@ public:
int
m_Flags
;
// flags for editing and other uses.
int
m_Flags
;
// flags for editing and other uses.
unsigned
long
m_TimeStamp
;
// Time stamp used for logical links
unsigned
long
m_TimeStamp
;
// Time stamp used for logical links
int
m_Selected
;
/* Used by block commands, and selective editing */
int
m_Selected
;
/* Used by block commands, and selective
* editing */
// member used in undo/redo function
// member used in undo/redo function
EDA_BaseStruct
*
m_Image
;
// Link to an image copy to save a copy of old parmeters values
EDA_BaseStruct
*
m_Image
;
// Link to an image copy to save a copy of
// old parameters values
private
:
private
:
int
m_Status
;
int
m_Status
;
...
@@ -306,8 +326,8 @@ public:
...
@@ -306,8 +326,8 @@ public:
/**
/**
* Function Type
* Function Type
* returns the type of object. This attribute should never be changed
after
* returns the type of object. This attribute should never be changed
* a constructor sets it, so there is no public "setter" method.
* a
fter a
constructor sets it, so there is no public "setter" method.
* @return KICAD_T - the type of object.
* @return KICAD_T - the type of object.
*/
*/
KICAD_T
Type
()
const
{
return
m_StructType
;
}
KICAD_T
Type
()
const
{
return
m_StructType
;
}
...
@@ -325,7 +345,6 @@ public:
...
@@ -325,7 +345,6 @@ public:
void
SetSon
(
EDA_BaseStruct
*
aSon
)
{
m_Son
=
aSon
;
}
void
SetSon
(
EDA_BaseStruct
*
aSon
)
{
m_Son
=
aSon
;
}
void
SetList
(
DHEAD
*
aList
)
{
m_List
=
aList
;
}
void
SetList
(
DHEAD
*
aList
)
{
m_List
=
aList
;
}
/* Gestion de l'etat (status) de la structure (active, deleted..) */
int
GetState
(
int
type
)
const
int
GetState
(
int
type
)
const
{
{
...
@@ -352,8 +371,8 @@ public:
...
@@ -352,8 +371,8 @@ public:
/**
/**
* Function DisplayInfo
* Function DisplayInfo
* has knowledge about the frame and how and where to put status
information
* has knowledge about the frame and how and where to put status
* about this object into the frame's message panel.
*
information
about this object into the frame's message panel.
* @param frame A WinEDA_DrawFrame in which to print status information.
* @param frame A WinEDA_DrawFrame in which to print status information.
*/
*/
virtual
void
DisplayInfo
(
WinEDA_DrawFrame
*
frame
)
virtual
void
DisplayInfo
(
WinEDA_DrawFrame
*
frame
)
...
@@ -375,7 +394,7 @@ public:
...
@@ -375,7 +394,7 @@ public:
/**
/**
* Function HitTest (overla
ye
d)
* Function HitTest (overla
i
d)
* tests if the given EDA_Rect intersect this object.
* tests if the given EDA_Rect intersect this object.
* For now, an ending point must be inside this rect.
* For now, an ending point must be inside this rect.
* @param refArea : the given EDA_Rect
* @param refArea : the given EDA_Rect
...
@@ -389,19 +408,23 @@ public:
...
@@ -389,19 +408,23 @@ public:
/**
/**
* Function GetBoundingBox
* Function GetBoundingBox
* returns the orthogonal, bounding box of this object for display purposes.
* returns the orthogonal, bounding box of this object for display
* purposes.
* This box should be an enclosing perimeter for visible components of this
* This box should be an enclosing perimeter for visible components of this
* object, and the units should be in the pcb or schematic coordinate system.
* object, and the units should be in the pcb or schematic coordinate
* system.
* It is OK to overestimate the size by a few counts.
* It is OK to overestimate the size by a few counts.
*/
*/
virtual
EDA_Rect
GetBoundingBox
()
virtual
EDA_Rect
GetBoundingBox
()
{
{
#if defined
(DEBUG)
#if defined(DEBUG)
printf
(
"Missing GetBoundingBox()
\n
"
);
printf
(
"Missing GetBoundingBox()
\n
"
);
Show
(
0
,
std
::
cout
);
// tell me which classes still need GetBoundingBox support
Show
(
0
,
std
::
cout
);
// tell me which classes still need
// GetBoundingBox support
#endif
#endif
// return a zero-sized box per default. derived classes should override this
// return a zero-sized box per default. derived classes should override
// this
return
EDA_Rect
(
wxPoint
(
0
,
0
),
wxSize
(
0
,
0
)
);
return
EDA_Rect
(
wxPoint
(
0
,
0
),
wxSize
(
0
,
0
)
);
}
}
...
@@ -433,7 +456,8 @@ public:
...
@@ -433,7 +456,8 @@ public:
* Function Visit
* Function Visit
* may be re-implemented for each derived class in order to handle
* may be re-implemented for each derived class in order to handle
* all the types given by its member data. Implementations should call
* all the types given by its member data. Implementations should call
* inspector->Inspect() on types in scanTypes[], and may use IterateForward()
* inspector->Inspect() on types in scanTypes[], and may use
* IterateForward()
* to do so on lists of such data.
* to do so on lists of such data.
* @param inspector An INSPECTOR instance to use in the inspection.
* @param inspector An INSPECTOR instance to use in the inspection.
* @param testData Arbitrary data used by the inspector.
* @param testData Arbitrary data used by the inspector.
...
@@ -457,7 +481,7 @@ public:
...
@@ -457,7 +481,7 @@ public:
}
}
#if defined
(DEBUG)
#if defined(DEBUG)
/**
/**
* Function Show
* Function Show
...
@@ -501,7 +525,8 @@ enum GRTextVertJustifyType {
...
@@ -501,7 +525,8 @@ enum GRTextVertJustifyType {
enum
GRTraceMode
{
enum
GRTraceMode
{
FILAIRE
=
0
,
// segments are drawn as lines
FILAIRE
=
0
,
// segments are drawn as lines
FILLED
,
// normal mode: segments have thickness
FILLED
,
// normal mode: segments have thickness
SKETCH
// skect mode: segments have thickness, but are not filled
SKETCH
// sketcg mode: segments have thickness, but are not
// filled
};
};
/**
/**
...
@@ -524,8 +549,8 @@ enum FILL_T {
...
@@ -524,8 +549,8 @@ enum FILL_T {
/**
/**
* Class EDA_TextStruct
* Class EDA_TextStruct
* is a basic class to handle texts (labels, texts on components or footprints
..)
* is a basic class to handle texts (labels, texts on components or footprints
* not used directly.
*
..)
not used directly.
* The text classes are derived from EDA_BaseStruct and EDA_TextStruct
* The text classes are derived from EDA_BaseStruct and EDA_TextStruct
*/
*/
class
EDA_TextStruct
class
EDA_TextStruct
...
@@ -538,12 +563,15 @@ public:
...
@@ -538,12 +563,15 @@ public:
int
m_Orient
;
/* Orient in 0.1 degrees */
int
m_Orient
;
/* Orient in 0.1 degrees */
bool
m_Mirror
;
/* Display Normal / mirror */
bool
m_Mirror
;
/* Display Normal / mirror */
int
m_Attributs
;
/* flags (visible...) */
int
m_Attributs
;
/* flags (visible...) */
bool
m_Italic
;
/* true to simulate (or use if exists) an italic font... */
bool
m_Italic
;
/* true to simulate (or use if exists)
* an italic font... */
bool
m_Bold
;
/* true to simulate a bold font ... */
bool
m_Bold
;
/* true to simulate a bold font ... */
GRTextHorizJustifyType
m_HJustify
;
/* Horiz justification */
GRTextHorizJustifyType
m_HJustify
;
/* Horiz justification */
GRTextVertJustifyType
m_VJustify
;
/* Vertical justification */
GRTextVertJustifyType
m_VJustify
;
/* Vertical justification */
bool
m_MultilineAllowed
;
/* true to use multiline option, false to use only single line text
bool
m_MultilineAllowed
;
/* true to use multiline option, false
* Single line is faster in calculations than multiline */
* to use only single line text
* Single line is faster in
* calculations than multiline */
public
:
public
:
EDA_TextStruct
(
const
wxString
&
text
=
wxEmptyString
);
EDA_TextStruct
(
const
wxString
&
text
=
wxEmptyString
);
...
@@ -558,7 +586,8 @@ public:
...
@@ -558,7 +586,8 @@ public:
* @param EDA_Colors aColor = text color
* @param EDA_Colors aColor = text color
* @param aDrawMode = GR_OR, GR_XOR.., -1 to use the current mode.
* @param aDrawMode = GR_OR, GR_XOR.., -1 to use the current mode.
* @param GRTraceMode aDisplay_mode = FILAIRE, FILLED or SKETCH
* @param GRTraceMode aDisplay_mode = FILAIRE, FILLED or SKETCH
* @param EDA_Colors aAnchor_color = anchor color ( UNSPECIFIED_COLOR = do not draw anchor ).
* @param EDA_Colors aAnchor_color = anchor color ( UNSPECIFIED_COLOR = do
* not draw anchor ).
*/
*/
void
Draw
(
WinEDA_DrawPanel
*
aPanel
,
wxDC
*
aDC
,
void
Draw
(
WinEDA_DrawPanel
*
aPanel
,
wxDC
*
aDC
,
const
wxPoint
&
aOffset
,
EDA_Colors
aColor
,
const
wxPoint
&
aOffset
,
EDA_Colors
aColor
,
...
@@ -566,6 +595,7 @@ public:
...
@@ -566,6 +595,7 @@ public:
EDA_Colors
aAnchor_color
=
UNSPECIFIED_COLOR
);
EDA_Colors
aAnchor_color
=
UNSPECIFIED_COLOR
);
private
:
private
:
/** Function DrawOneLineOfText
/** Function DrawOneLineOfText
* Draw a single text line.
* Draw a single text line.
* Used to draw each line of this EDA_TextStruct, that can be multiline
* Used to draw each line of this EDA_TextStruct, that can be multiline
...
@@ -575,7 +605,8 @@ private:
...
@@ -575,7 +605,8 @@ private:
* @param EDA_Colors aColor = text color
* @param EDA_Colors aColor = text color
* @param aDrawMode = GR_OR, GR_XOR.., -1 to use the current mode.
* @param aDrawMode = GR_OR, GR_XOR.., -1 to use the current mode.
* @param aFillMode = FILAIRE, FILLED or SKETCH
* @param aFillMode = FILAIRE, FILLED or SKETCH
* @param EDA_Colors aAnchor_color = anchor color ( UNSPECIFIED_COLOR = do not draw anchor ).
* @param EDA_Colors aAnchor_color = anchor color ( UNSPECIFIED_COLOR = do
* not draw anchor ).
* @param EDA_Colors aText = the single line of text to draw.
* @param EDA_Colors aText = the single line of text to draw.
* @param EDA_Colors aPos = the position of this line ).
* @param EDA_Colors aPos = the position of this line ).
*/
*/
...
@@ -584,7 +615,9 @@ private:
...
@@ -584,7 +615,9 @@ private:
int
aDrawMode
,
GRTraceMode
aFillMode
,
int
aDrawMode
,
GRTraceMode
aFillMode
,
EDA_Colors
aAnchor_color
,
wxString
&
aText
,
EDA_Colors
aAnchor_color
,
wxString
&
aText
,
wxPoint
aPos
);
wxPoint
aPos
);
public
:
public
:
/**
/**
* Function TextHitTest
* Function TextHitTest
* tests if the given wxPoint is within the bounds of this object.
* tests if the given wxPoint is within the bounds of this object.
...
@@ -594,7 +627,7 @@ public:
...
@@ -594,7 +627,7 @@ public:
bool
TextHitTest
(
const
wxPoint
&
ref_pos
);
bool
TextHitTest
(
const
wxPoint
&
ref_pos
);
/**
/**
* Function TextHitTest (overl
ay
ed)
* Function TextHitTest (overl
oad
ed)
* tests if the given EDA_Rect intersect this object.
* tests if the given EDA_Rect intersect this object.
* For now, the anchor must be inside this rect.
* For now, the anchor must be inside this rect.
* @param refArea : the given EDA_Rect
* @param refArea : the given EDA_Rect
...
@@ -604,21 +637,24 @@ public:
...
@@ -604,21 +637,24 @@ public:
/**
/**
* Function LenSize
* Function LenSize
* @return the text leng
ht
in internal units
* @return the text leng
th
in internal units
* @param aLine : the line of text to consider.
* @param aLine : the line of text to consider.
* For single line text, this parameter is always m_Text
* For single line text, this parameter is always m_Text
*/
*/
int
LenSize
(
const
wxString
&
aLine
)
const
;
int
LenSize
(
const
wxString
&
aLine
)
const
;
/** Function GetTextBox
/** Function GetTextBox
* useful in multiline texts to calculate the full text or a line area (for zones filling, locate functions....)
* useful in multiline texts to calculate the full text or a line area (for
* @return the rect containing the line of text (i.e. the position and the size of one line)
* zones filling, locate functions....)
* this rectangle is calculated for 0 orient text. if orient is not 0 the rect must be rotated to match the physical area
* @return the rect containing the line of text (i.e. the position and the
* size of one line)
* this rectangle is calculated for 0 orient text. if orient is not 0 the
* rect must be rotated to match the physical area
* @param aLine : the line of text to consider.
* @param aLine : the line of text to consider.
* for single line text, aLine is unused
* for single line text, aLine is unused
* If aLine == -1, the full area (considering all lines) is returned
* If aLine == -1, the full area (considering all lines) is returned
*/
*/
EDA_Rect
GetTextBox
(
int
aLine
=
-
1
);
EDA_Rect
GetTextBox
(
int
aLine
=
-
1
);
/** Function GetInterline
/** Function GetInterline
* return the distance between 2 text lines
* return the distance between 2 text lines
...
@@ -626,7 +662,7 @@ public:
...
@@ -626,7 +662,7 @@ public:
*/
*/
int
GetInterline
()
int
GetInterline
()
{
{
return
(
(
m_Size
.
y
*
13
)
/
10
)
+
m_Width
;
return
(
(
m_Size
.
y
*
13
)
/
10
)
+
m_Width
;
}
}
};
};
...
...
include/bitmaps.h
View file @
d2eac37d
// Largeur du toolbar vertical
#define VTOOLBAR_WIDTH 26
#define VTOOLBAR_WIDTH 26
// dimension d'un tool vertical
#define TOOL_SIZE 23
#define TOOL_SIZE 23
// Please keep list sorted alphabetically, ignoring case.
// Please keep list sorted alphabetically, ignoring case.
...
...
include/block_commande.h
View file @
d2eac37d
/**
/**
* This file is part of the common libary.
* This file is part of the common lib
r
ary.
* @file block_commande.h
* @file block_commande.h
* @see common.h
* @see common.h
*/
*/
...
@@ -18,19 +18,22 @@
...
@@ -18,19 +18,22 @@
/**************************/
/**************************/
/* class BLOCK_SELECTOR */
/* class BLOCK_SELECTOR */
/**************************/
/**************************/
/**
/**
* class BLOCK_SELECTOR is used to handle block selection and commands
* class BLOCK_SELECTOR is used to handle block selection and commands
*/
*/
/* Block state codes. */
typedef
enum
{
typedef
enum
{
/* definition de l'etat du block */
STATE_NO_BLOCK
,
STATE_NO_BLOCK
,
/* Block non initialise */
STATE_BLOCK_INIT
,
STATE_BLOCK_INIT
,
/* Block initialise: 1er point defini */
STATE_BLOCK_END
,
STATE_BLOCK_END
,
/* Block initialise: 2eme point defini */
STATE_BLOCK_MOVE
,
STATE_BLOCK_MOVE
,
/* Block en deplacement */
STATE_BLOCK_STOP
STATE_BLOCK_STOP
/* Block fixe (fin de deplacement) */
}
BlockState
;
}
BlockState
;
/* codes des differentes commandes sur block: */
/* Block command codes. */
typedef
enum
{
typedef
enum
{
BLOCK_IDLE
,
BLOCK_IDLE
,
BLOCK_MOVE
,
BLOCK_MOVE
,
...
@@ -53,13 +56,20 @@ typedef enum {
...
@@ -53,13 +56,20 @@ typedef enum {
class
BLOCK_SELECTOR
:
public
EDA_BaseStruct
,
public
EDA_Rect
class
BLOCK_SELECTOR
:
public
EDA_BaseStruct
,
public
EDA_Rect
{
{
public
:
public
:
BlockState
m_State
;
/* Stae (enum BlockState) of the block */
BlockState
m_State
;
/* State (enum BlockState)
CmdBlockType
m_Command
;
/* Type (enum CmdBlockType) d'operation */
* of the block */
PICKED_ITEMS_LIST
m_ItemsSelection
;
/* list of items selected in this block */
CmdBlockType
m_Command
;
/* Type (enum CmdBlockType)
int
m_Color
;
/* Block Color (for drawings) */
* operation */
wxPoint
m_MoveVector
;
/* Move distance in move, drag, copy ... command */
PICKED_ITEMS_LIST
m_ItemsSelection
;
/* list of items selected
wxPoint
m_BlockLastCursorPosition
;
/* Last Mouse position in block command
* in this block */
* = last cursor position in move commands
int
m_Color
;
/* Block Color (for
* drawings) */
wxPoint
m_MoveVector
;
/* Move distance in move,
* drag, copy ... command */
wxPoint
m_BlockLastCursorPosition
;
/* Last Mouse position in
* block command
* = last cursor position in
* move commands
* = 0,0 in block paste */
* = 0,0 in block paste */
public
:
public
:
...
@@ -67,9 +77,11 @@ public:
...
@@ -67,9 +77,11 @@ public:
~
BLOCK_SELECTOR
();
~
BLOCK_SELECTOR
();
/** function InitData
/** function InitData
* Init the initial values of a BLOCK_SELECTOR, before starting a block command
* Init the initial values of a BLOCK_SELECTOR, before starting a block
*command
*/
*/
void
InitData
(
WinEDA_DrawPanel
*
Panel
,
const
wxPoint
&
startpos
);
void
InitData
(
WinEDA_DrawPanel
*
Panel
,
const
wxPoint
&
startpos
);
/** Function SetMessageBlock
/** Function SetMessageBlock
* Displays the type of block command in the status bar of the window
* Displays the type of block command in the status bar of the window
*/
*/
...
@@ -87,11 +99,13 @@ public:
...
@@ -87,11 +99,13 @@ public:
void
PushItem
(
ITEM_PICKER
&
aItem
);
void
PushItem
(
ITEM_PICKER
&
aItem
);
/** Function ClearListAndDeleteItems
/** Function ClearListAndDeleteItems
* delete only the list of EDA_BaseStruct * pointers, AND the data pinted by m_Item
* delete only the list of EDA_BaseStruct * pointers, AND the data printed
* by m_Item
*/
*/
void
ClearListAndDeleteItems
();
void
ClearListAndDeleteItems
();
void
ClearItemsList
();
void
ClearItemsList
();
unsigned
GetCount
()
unsigned
GetCount
()
{
{
return
m_ItemsSelection
.
GetCount
();
return
m_ItemsSelection
.
GetCount
();
...
@@ -100,12 +114,13 @@ public:
...
@@ -100,12 +114,13 @@ public:
/* Cancel Current block operation.
/* Cancel Current block operation.
*/
*/
void
AbortBlockCurrentCommand
(
WinEDA_DrawPanel
*
Panel
,
wxDC
*
DC
);
void
AbortBlockCurrentCommand
(
WinEDA_DrawPanel
*
Panel
,
wxDC
*
DC
);
/* Redraw the outlines of the block which shows the search area for block commands
/* Redraw the outlines of the block which shows the search area for block
* The first point of the rectangle showing the area is initialised
* commands
* The first point of the rectangle showing the area is initialized
* by InitBlockLocateDatas().
* by InitBlockLocateDatas().
* The other point of the rectangle is the mouse cursor
* The other point of the rectangle is the mouse cursor
*/
*/
...
@@ -113,4 +128,3 @@ void DrawAndSizingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool eras
...
@@ -113,4 +128,3 @@ void DrawAndSizingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool eras
#endif
/* __INCLUDE__BLOCK_COMMANDE_H__ */
#endif
/* __INCLUDE__BLOCK_COMMANDE_H__ */
include/class_base_screen.h
View file @
d2eac37d
...
@@ -37,9 +37,10 @@ public:
...
@@ -37,9 +37,10 @@ public:
return
*
this
;
return
*
this
;
}
}
const
bool
operator
==
(
const
GRID_TYPE
&
item
)
const
const
bool
operator
==
(
const
GRID_TYPE
&
item
)
const
{
{
return
(
m_Size
==
item
.
m_Size
&&
m_Id
==
item
.
m_Id
)
;
return
m_Size
==
item
.
m_Size
&&
m_Id
==
item
.
m_Id
;
}
}
};
};
...
@@ -55,39 +56,45 @@ WX_DECLARE_OBJARRAY( GRID_TYPE, GridArray );
...
@@ -55,39 +56,45 @@ WX_DECLARE_OBJARRAY( GRID_TYPE, GridArray );
class
BASE_SCREEN
:
public
EDA_BaseStruct
class
BASE_SCREEN
:
public
EDA_BaseStruct
{
{
public
:
public
:
wxPoint
m_DrawOrg
;
/* offsets pour tracer le circuit sur l'ecran */
wxPoint
m_DrawOrg
;
/* offsets for drawing the circuit on the
wxPoint
m_Curseur
;
/* Screen cursor coordinate (on grid) in user units. */
* screen */
wxPoint
m_MousePosition
;
/* Mouse cursor coordinate (off grid) in user units. */
wxPoint
m_Curseur
;
/* Screen cursor coordinate (on grid) in user
* units. */
wxPoint
m_MousePosition
;
/* Mouse cursor coordinate (off grid) in user
* units. */
wxPoint
m_MousePositionInPixels
;
wxPoint
m_MousePositionInPixels
;
wxPoint
m_O_Curseur
;
/* Relative Screen cursor coordinate (on grid) in user units.
wxPoint
m_O_Curseur
;
/* Relative Screen cursor coordinate (on grid)
* in user units.
* (coordinates from last reset position)*/
* (coordinates from last reset position)*/
wxPoint
m_ScrollbarPos
;
// Position effective des Curseurs de scroll
wxPoint
m_ScrollbarPos
;
// Position effective des Curseurs de scroll
wxSize
m_ScrollbarNumber
;
/* Valeur effective des Nombres de Scroo
l
wxSize
m_ScrollbarNumber
;
/* Current scroll bar posiition in scrol
l
* c.a.d taille en unites de scroll de la
* units. */
* surface totale affichable */
wxPoint
m_StartVisu
;
/* Coordinates in drawing units of the current
wxPoint
m_StartVisu
;
/* Coord absolues du 1er pixel visualis�a
* view position (upper left corner of device)
*
l'ecran (en nombre de pixels) *
/
*/
wxSize
m_SizeVisu
;
/* taille en pixels de l'ecran (fenetre de visu
wxSize
m_SizeVisu
;
/* taille en pixels de l'ecran (fenetre de visu
* Utile pour recadrer les affichages lors de la
* Utile pour recadrer les affichages lors de la
* navigation dans la hierarchie */
* navigation dans la hierarchie */
bool
m_Center
;
/* fix the coordinate (0,0) position on
bool
m_Center
;
/* Center on screen. If TRUE (0.0) is centered
* screen : if TRUE (0,0) in centered on screen
* on screen coordinates can be < 0 and
* TRUE: when coordinates can be < 0 and
* > 0 except for schematics.
* > 0 all but schematic
* FALSE: when coordinates can only be >= 0
* FALSE: when coordinates can be only >= 0
* Schematic */
* Schematic */
bool
m_FirstRedraw
;
bool
m_FirstRedraw
;
SCH_ITEM
*
EEDrawList
;
/* Object list (main data) for schematic */
SCH_ITEM
*
EEDrawList
;
/* Object list (main data) for schematic */
// Undo/redo list of commands
// Undo/redo list of commands
UNDO_REDO_CONTAINER
m_UndoList
;
/* Objects list for the undo command (old data) */
UNDO_REDO_CONTAINER
m_UndoList
;
/* Objects list for the undo
UNDO_REDO_CONTAINER
m_RedoList
;
/* Objects list for the redo command (old data) */
* command (old data) */
UNDO_REDO_CONTAINER
m_RedoList
;
/* Objects list for the redo
* command (old data) */
unsigned
m_UndoRedoCountMax
;
// undo/Redo command Max depth
unsigned
m_UndoRedoCountMax
;
// undo/Redo command Max depth
/* block control */
/* block control */
BLOCK_SELECTOR
m_BlockLocate
;
/* Block description for block commands */
BLOCK_SELECTOR
m_BlockLocate
;
/* Block description for block
* commands */
/* Page description */
/* Page description */
Ki_PageDescr
*
m_CurrentSheetDesc
;
Ki_PageDescr
*
m_CurrentSheetDesc
;
...
@@ -95,31 +102,33 @@ public:
...
@@ -95,31 +102,33 @@ public:
int
m_NumberOfScreen
;
int
m_NumberOfScreen
;
wxString
m_FileName
;
wxString
m_FileName
;
wxString
m_Title
;
/* titre de la feuille */
wxString
m_Title
;
wxString
m_Date
;
/* date de mise a jour */
wxString
m_Date
;
wxString
m_Revision
;
/* code de revision */
wxString
m_Revision
;
wxString
m_Company
;
/* nom du proprietaire */
wxString
m_Company
;
wxString
m_Commentaire1
;
wxString
m_Commentaire1
;
wxString
m_Commentaire2
;
wxString
m_Commentaire2
;
wxString
m_Commentaire3
;
wxString
m_Commentaire3
;
wxString
m_Commentaire4
;
wxString
m_Commentaire4
;
private
:
private
:
/* indicateurs divers */
char
m_FlagRefreshReq
;
/* indicates that the screen should
char
m_FlagRefreshReq
;
/* indique que l'ecran doit redessine */
* be redrawn */
char
m_FlagModified
;
// indique modif du PCB,utilise pour eviter une sortie sans sauvegarde
char
m_FlagModified
;
// indicates current drawing has
char
m_FlagSave
;
// indique sauvegarde auto faite
// been modified
char
m_FlagSave
;
// Perform automatica file save.
EDA_BaseStruct
*
m_CurrentItem
;
///< Currently selected object
EDA_BaseStruct
*
m_CurrentItem
;
///< Currently selected object
GRID_TYPE
m_Grid
;
///< Current grid selection.
GRID_TYPE
m_Grid
;
///< Current grid selection.
/*
Valeurs du pas de grille et du zoom
*/
/*
Grid and zoom values.
*/
public
:
public
:
GridArray
m_GridList
;
GridArray
m_GridList
;
bool
m_UserGridIsON
;
bool
m_UserGridIsON
;
wxArrayInt
m_ZoomList
;
/* Array of standard zoom coefficients. */
wxArrayInt
m_ZoomList
;
/* Array of standard zoom coefficients. */
int
m_Zoom
;
/* Current zoom coefficient. */
int
m_Zoom
;
/* Current zoom coefficient. */
int
m_ZoomScalar
;
/* Allow zooming to non-integer increments. */
int
m_ZoomScalar
;
/* Allow zooming to non-integer increments.
*/
bool
m_IsPrinting
;
bool
m_IsPrinting
;
public
:
public
:
...
@@ -138,7 +147,7 @@ public:
...
@@ -138,7 +147,7 @@ public:
void
SetCurItem
(
EDA_BaseStruct
*
current
)
{
m_CurrentItem
=
current
;
}
void
SetCurItem
(
EDA_BaseStruct
*
current
)
{
m_CurrentItem
=
current
;
}
EDA_BaseStruct
*
GetCurItem
()
const
{
return
m_CurrentItem
;
}
EDA_BaseStruct
*
GetCurItem
()
const
{
return
m_CurrentItem
;
}
void
InitDatas
();
/* Inits completes des variables */
void
InitDatas
();
wxSize
ReturnPageSize
(
void
);
wxSize
ReturnPageSize
(
void
);
virtual
int
GetInternalUnits
(
void
);
virtual
int
GetInternalUnits
(
void
);
...
@@ -154,31 +163,38 @@ public:
...
@@ -154,31 +163,38 @@ public:
/** function ClearUndoORRedoList (virtual).
/** function ClearUndoORRedoList (virtual).
* this function must remove the aItemCount old commands from aList
* this function must remove the aItemCount old commands from aList
* and delete commands, pickers and picked items if needed
* and delete commands, pickers and picked items if needed
* Because picked items must be deleted only if they are not in use, this is a virtual pure
* Because picked items must be deleted only if they are not in use, this
* function that must be created for SCH_SCREEN and PCB_SCREEN
* is a virtual pure function that must be created for SCH_SCREEN and
* PCB_SCREEN
* @param aList = the UNDO_REDO_CONTAINER of commands
* @param aList = the UNDO_REDO_CONTAINER of commands
* @param aItemCount = number of old commands to delete. -1 to remove all
old commands
* @param aItemCount = number of old commands to delete. -1 to remove all
* this will empty the list of commands.
*
old commands
this will empty the list of commands.
* Commands are deleted from the older to the last.
* Commands are deleted from the older to the last.
*/
*/
virtual
void
ClearUndoORRedoList
(
UNDO_REDO_CONTAINER
&
aList
,
int
aItemCount
=
-
1
)
=
0
;
virtual
void
ClearUndoORRedoList
(
UNDO_REDO_CONTAINER
&
aList
,
int
aItemCount
=
-
1
)
=
0
;
/** Function ClearUndoRedoList
/** Function ClearUndoRedoList
* clear undo and redo list, using ClearUndoORRedoList()
* clear undo and redo list, using ClearUndoORRedoList()
* picked items are deleted by ClearUndoORRedoList() according to their status
* picked items are deleted by ClearUndoORRedoList() according to their
* status
*/
*/
virtual
void
ClearUndoRedoList
();
virtual
void
ClearUndoRedoList
();
/** function PushCommandToUndoList
/** function PushCommandToUndoList
* add a command to undo in undo list
* add a command to undo in undo list
* delete the very old commands when the max count of undo commands is reached
* delete the very old commands when the max count of undo commands is
* reached
* ( using ClearUndoORRedoList)
* ( using ClearUndoORRedoList)
*/
*/
virtual
void
PushCommandToUndoList
(
PICKED_ITEMS_LIST
*
aItem
);
virtual
void
PushCommandToUndoList
(
PICKED_ITEMS_LIST
*
aItem
);
/** function PushCommandToRedoList
/** function PushCommandToRedoList
* add a command to redo in redo list
* add a command to redo in redo list
* delete the very old commands when the max count of redo commands is reached
* delete the very old commands when the max count of redo commands is
* reached
* ( using ClearUndoORRedoList)
* ( using ClearUndoORRedoList)
*/
*/
virtual
void
PushCommandToRedoList
(
PICKED_ITEMS_LIST
*
aItem
);
virtual
void
PushCommandToRedoList
(
PICKED_ITEMS_LIST
*
aItem
);
...
@@ -207,7 +223,6 @@ public:
...
@@ -207,7 +223,6 @@ public:
}
}
/* Manipulation des flags */
void
SetRefreshReq
()
{
m_FlagRefreshReq
=
1
;
}
void
SetRefreshReq
()
{
m_FlagRefreshReq
=
1
;
}
void
ClrRefreshReq
()
{
m_FlagRefreshReq
=
0
;
}
void
ClrRefreshReq
()
{
m_FlagRefreshReq
=
0
;
}
void
SetModify
()
{
m_FlagModified
=
1
;
m_FlagSave
=
0
;
}
void
SetModify
()
{
m_FlagModified
=
1
;
m_FlagSave
=
0
;
}
...
@@ -219,7 +234,7 @@ public:
...
@@ -219,7 +234,7 @@ public:
int
IsSave
()
{
return
m_FlagSave
&
1
;
}
int
IsSave
()
{
return
m_FlagSave
&
1
;
}
//----<zoom stuff>---------------------------------------------------------
-
//----<zoom stuff>---------------------------------------------------------
/** Function GetScalingFactor
/** Function GetScalingFactor
* @return the the current scale used to draw items on screen
* @return the the current scale used to draw items on screen
...
@@ -253,7 +268,8 @@ public:
...
@@ -253,7 +268,8 @@ public:
/**
/**
* Function SetZoomList
* Function SetZoomList
* sets the list of zoom factors.
* sets the list of zoom factors.
* @param aZoomList An array of zoom factors in ascending order, zero terminated
* @param aZoomList An array of zoom factors in ascending order, zero
* terminated
*/
*/
void
SetZoomList
(
const
wxArrayInt
&
zoomlist
);
void
SetZoomList
(
const
wxArrayInt
&
zoomlist
);
...
@@ -267,12 +283,13 @@ public:
...
@@ -267,12 +283,13 @@ public:
void
Unscale
(
wxPoint
&
pt
);
void
Unscale
(
wxPoint
&
pt
);
void
Unscale
(
wxSize
&
sz
);
void
Unscale
(
wxSize
&
sz
);
bool
SetNextZoom
();
/* ajuste le prochain coeff de zoom */
bool
SetNextZoom
();
bool
SetPreviousZoom
();
/* ajuste le precedent coeff de zoom */
bool
SetPreviousZoom
();
bool
SetFirstZoom
();
/* ajuste le coeff de zoom a 1*/
bool
SetFirstZoom
();
bool
SetLastZoom
();
/* ajuste le coeff de zoom au max */
bool
SetLastZoom
();
//----<grid stuff>----------------------------------------------------------
//----<grid
// stuff>----------------------------------------------------------
/**
/**
* Return the command ID of the currently selected grid.
* Return the command ID of the currently selected grid.
...
...
include/class_collector.h
View file @
d2eac37d
include/class_drawpanel.h
View file @
d2eac37d
...
@@ -3,9 +3,6 @@
...
@@ -3,9 +3,6 @@
* define class WinEDA_DrawPanel
* define class WinEDA_DrawPanel
*************************************/
*************************************/
/* Doit etre inclus dans "wxstruch.h"
*/
#ifndef PANEL_WXSTRUCT_H
#ifndef PANEL_WXSTRUCT_H
#define PANEL_WXSTRUCT_H
#define PANEL_WXSTRUCT_H
...
@@ -17,49 +14,64 @@ class BASE_SCREEN;
...
@@ -17,49 +14,64 @@ class BASE_SCREEN;
class
PCB_SCREEN
;
class
PCB_SCREEN
;
/****************************************************/
/* classe representant un ecran graphique de dessin */
/****************************************************/
class
WinEDA_DrawPanel
:
public
wxScrolledWindow
class
WinEDA_DrawPanel
:
public
wxScrolledWindow
{
{
public
:
public
:
WinEDA_DrawFrame
*
m_Parent
;
WinEDA_DrawFrame
*
m_Parent
;
EDA_Rect
m_ClipBox
;
// the clipbox used in screen redraw (usually gives the visible area in internal units)
EDA_Rect
m_ClipBox
;
// the clipbox used in screen
wxPoint
m_CursorStartPos
;
// utile dans controles du mouvement curseur
// redraw (usually gives the
int
m_ScrollButt_unit
;
// Valeur de l'unite de scroll en pixels pour les boutons de scroll
// visible area in internal units)
wxPoint
m_CursorStartPos
;
// useful in testing the cursor
// movement
int
m_ScrollButt_unit
;
// scroll bar pixels per unit value
bool
m_AbortRequest
;
// Flag to abort long commands
bool
m_AbortEnable
;
// TRUE if abort button or menu to
// be displayed
bool
m_AbortRequest
;
// Flag d'arret de commandes longues
bool
m_AbortEnable
;
// TRUE si menu ou bouton Abort doit etre affiche
bool
m_AutoPAN_Enable
;
// TRUE to allow auto pan
bool
m_AutoPAN_Enable
;
// TRUE to allow auto pan
bool
m_AutoPAN_Request
;
// TRUE to request an auto pan (will be made only if m_AutoPAN_Enable = true)
bool
m_AutoPAN_Request
;
// TRUE to request an auto pan
// (will be made only if
// m_AutoPAN_Enable = true)
int
m_IgnoreMouseEvents
;
// when non-zero (true), then ignore mouse events
int
m_IgnoreMouseEvents
;
// when non-zero (true), then
// ignore mouse events
bool
m_Block_Enable
;
// TRUE to accept Block Commands
bool
m_Block_Enable
;
// TRUE to accept Block Commands
int
m_CanStartBlock
;
// >= 0 (or >= n) if a block can start
int
m_CanStartBlock
;
// >= 0 (or >= n) if a block can
bool
m_PrintIsMirrored
;
// True when drawing in mirror mode. Used in draw arc function,
// start
// because arcs are oriented, and in mirror mode, orientations are reversed
bool
m_PrintIsMirrored
;
// True when drawing in mirror
// usefull to avoid false start block in certain cases (like switch from a sheet to an other scheet
// mode. Used in draw arc function,
int
m_PanelDefaultCursor
;
// Current mouse cursor default shape id for this window
// because arcs are oriented, and
int
m_PanelCursor
;
// Current mouse cursor shape id for this window
// in mirror mode, orientations are
int
m_CursorLevel
;
// Index for cursor redraw in XOR mode
// reversed
// useful to avoid false start block in certain cases (like switch from a
// sheet to an other sheet
int
m_PanelDefaultCursor
;
// Current mouse cursor default
// shape id for this window
int
m_PanelCursor
;
// Current mouse cursor shape id
// for this window
int
m_CursorLevel
;
// Index for cursor redraw in XOR
// mode
/* Cursor management (used in editing functions) */
/* Cursor management (used in editing functions) */
void
(
*
ManageCurseur
)(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
bool
erase
);
/* Fonction d'affichage sur deplacement souris
* si erase : effacement ancien affichage */
/* Mouse capture move callback function prototype. */
void
(
*
ForceCloseManageCurseur
)(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
);
/* Fonction de fermeture forc�
void
(
*
ManageCurseur
)(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
bool
erase
);
* de la fonction ManageCurseur */
/* Abort managed cursor callback function prototype. */
void
(
*
ForceCloseManageCurseur
)(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
);
public
:
public
:
// Constructor and destructor
WinEDA_DrawPanel
(
WinEDA_DrawFrame
*
parent
,
int
id
,
const
wxPoint
&
pos
,
WinEDA_DrawPanel
(
WinEDA_DrawFrame
*
parent
,
int
id
,
const
wxPoint
&
pos
,
const
wxSize
&
size
);
const
wxSize
&
size
);
~
WinEDA_DrawPanel
();
~
WinEDA_DrawPanel
();
/****************************/
BASE_SCREEN
*
GetScreen
();
BASE_SCREEN
*
GetScreen
();
...
@@ -69,7 +81,10 @@ public:
...
@@ -69,7 +81,10 @@ public:
void
OnSize
(
wxSizeEvent
&
event
);
void
OnSize
(
wxSizeEvent
&
event
);
void
SetBoundaryBox
();
void
SetBoundaryBox
();
void
ReDraw
(
wxDC
*
DC
,
bool
erasebg
=
TRUE
);
void
ReDraw
(
wxDC
*
DC
,
bool
erasebg
=
TRUE
);
void
PrintPage
(
wxDC
*
DC
,
bool
Print_Sheet_Ref
,
int
PrintMask
,
bool
aPrintMirrorMode
);
void
PrintPage
(
wxDC
*
DC
,
bool
Print_Sheet_Ref
,
int
PrintMask
,
bool
aPrintMirrorMode
);
void
DrawBackGround
(
wxDC
*
DC
);
void
DrawBackGround
(
wxDC
*
DC
);
void
DrawAuxiliaryAxis
(
wxDC
*
DC
,
int
drawmode
);
void
DrawAuxiliaryAxis
(
wxDC
*
DC
,
int
drawmode
);
void
OnEraseBackground
(
wxEraseEvent
&
event
);
void
OnEraseBackground
(
wxEraseEvent
&
event
);
...
@@ -83,8 +98,6 @@ public:
...
@@ -83,8 +98,6 @@ public:
void
OnPan
(
wxCommandEvent
&
event
);
void
OnPan
(
wxCommandEvent
&
event
);
/*************************/
void
EraseScreen
(
wxDC
*
DC
);
void
EraseScreen
(
wxDC
*
DC
);
void
OnScrollWin
(
wxCommandEvent
&
event
);
void
OnScrollWin
(
wxCommandEvent
&
event
);
void
OnScroll
(
wxScrollWinEvent
&
event
);
void
OnScroll
(
wxScrollWinEvent
&
event
);
...
@@ -100,7 +113,7 @@ public:
...
@@ -100,7 +113,7 @@ public:
/** Function CursorRealPosition
/** Function CursorRealPosition
* @return the position in user units of location ScreenPos
* @return the position in user units of location ScreenPos
* @param ScreenPos = the screen (in pixel) position
c
o convert
* @param ScreenPos = the screen (in pixel) position
t
o convert
*/
*/
wxPoint
CursorRealPosition
(
const
wxPoint
&
ScreenPos
);
wxPoint
CursorRealPosition
(
const
wxPoint
&
ScreenPos
);
...
@@ -116,8 +129,8 @@ public:
...
@@ -116,8 +129,8 @@ public:
* along with any other recently posted rectangles is redrawn. Conversion
* along with any other recently posted rectangles is redrawn. Conversion
* to pixels is done in here.
* to pixels is done in here.
* @param aRect The rectangle to append, it must be orthogonal
* @param aRect The rectangle to append, it must be orthogonal
* (vertical and horizontal edges only), and it must be [,) in nature,
i.e.
* (vertical and horizontal edges only), and it must be [,) in nature,
* [pos, dim) == [inclusive, exclusive)
*
i.e.
[pos, dim) == [inclusive, exclusive)
*/
*/
void
PostDirtyRect
(
EDA_Rect
aRect
);
void
PostDirtyRect
(
EDA_Rect
aRect
);
...
@@ -132,8 +145,9 @@ public:
...
@@ -132,8 +145,9 @@ public:
/**
/**
* Function ConvertPcbUnitsToPixelsUnits
* Function ConvertPcbUnitsToPixelsUnits
* converts a given wxPoint position (in internal units) to units of pixels,
* converts a given wxPoint position (in internal units) to units of
* relative to the current draw area (origin 0,0 is the left top visible
* pixels, relative to the current draw area (origin 0,0 is the left
* top visible
* corner of draw area) according to the current scroll and zoom.
* corner of draw area) according to the current scroll and zoom.
* @param aPosition = the position to convert
* @param aPosition = the position to convert
*/
*/
...
@@ -144,9 +158,16 @@ public:
...
@@ -144,9 +158,16 @@ public:
void
MouseTo
(
const
wxPoint
&
Mouse
);
void
MouseTo
(
const
wxPoint
&
Mouse
);
/* Cursor functions */
/* Cursor functions */
void
Trace_Curseur
(
wxDC
*
DC
,
int
color
=
WHITE
);
// Draw the user cursor (grid cursor)
void
Trace_Curseur
(
wxDC
*
DC
,
int
color
=
WHITE
);
// Draw the
void
CursorOff
(
wxDC
*
DC
);
// remove the grid cursor from the display
// user cursor
void
CursorOn
(
wxDC
*
DC
);
// display the grid cursor
// (grid
// cursor)
void
CursorOff
(
wxDC
*
DC
);
// remove the
// grid cursor
// from the
// display
void
CursorOn
(
wxDC
*
DC
);
// display the
// grid cursor
/**
/**
* Release managed cursor.
* Release managed cursor.
...
...
include/class_pcb_screen.h
View file @
d2eac37d
/****************
**********************************************
/
/****************/
/* pcbstruct.h
: definition des structures de donnees type PCB
*/
/* pcbstruct.h */
/****************
**********************************************
/
/****************/
#ifndef __CLASSPCB_SCREEN_H__
#ifndef __CLASSPCB_SCREEN_H__
#define __CLASSPCB_SCREEN_H__
#define __CLASSPCB_SCREEN_H__
#
/* Handle info to display a board */
/* Handle info to display a board */
class
PCB_SCREEN
:
public
BASE_SCREEN
class
PCB_SCREEN
:
public
BASE_SCREEN
{
{
public
:
public
:
int
m_Active_Layer
;
/* ref couche active */
int
m_Active_Layer
;
int
m_Route_Layer_TOP
;
/* ref couches actives */
int
m_Route_Layer_TOP
;
int
m_Route_Layer_BOTTOM
;
/* pour placement vias et routage 2 couches */
int
m_Route_Layer_BOTTOM
;
public
:
public
:
PCB_SCREEN
();
PCB_SCREEN
();
...
@@ -29,10 +27,14 @@ public:
...
@@ -29,10 +27,14 @@ public:
/**
/**
* Function GetCurItem
* Function GetCurItem
* returns the currently selected BOARD_ITEM, overriding BASE_SCREEN::GetCurItem().
* returns the currently selected BOARD_ITEM, overriding
*BASE_SCREEN::GetCurItem().
* @return BOARD_ITEM* - the one selected, or NULL.
* @return BOARD_ITEM* - the one selected, or NULL.
*/
*/
BOARD_ITEM
*
GetCurItem
()
const
{
return
(
BOARD_ITEM
*
)
BASE_SCREEN
::
GetCurItem
();
}
BOARD_ITEM
*
GetCurItem
()
const
{
return
(
BOARD_ITEM
*
)
BASE_SCREEN
::
GetCurItem
();
}
/**
/**
* Function SetCurItem
* Function SetCurItem
...
@@ -43,7 +45,7 @@ public:
...
@@ -43,7 +45,7 @@ public:
/* Return true if a microvia can be put on board
/* Return true if a microvia can be put on board
* A microvia i
a a small via restricted to 2 near neighbou
r layers
* A microvia i
s a small via restricted to 2 near neighbo
r layers
* because its is hole is made by laser which can penetrate only one layer
* because its is hole is made by laser which can penetrate only one layer
* It is mainly used to connect BGA to the first inner layer
* It is mainly used to connect BGA to the first inner layer
* And it is allowed from an external layer to the first inner layer
* And it is allowed from an external layer to the first inner layer
...
@@ -51,6 +53,7 @@ public:
...
@@ -51,6 +53,7 @@ public:
bool
IsMicroViaAcceptable
(
void
);
bool
IsMicroViaAcceptable
(
void
);
/* full undo redo management : */
/* full undo redo management : */
// use BASE_SCREEN::ClearUndoRedoList()
// use BASE_SCREEN::ClearUndoRedoList()
// use BASE_SCREEN::PushCommandToUndoList( PICKED_ITEMS_LIST* aItem )
// use BASE_SCREEN::PushCommandToUndoList( PICKED_ITEMS_LIST* aItem )
// use BASE_SCREEN::PushCommandToRedoList( PICKED_ITEMS_LIST* aItem )
// use BASE_SCREEN::PushCommandToRedoList( PICKED_ITEMS_LIST* aItem )
...
@@ -59,7 +62,8 @@ public:
...
@@ -59,7 +62,8 @@ public:
* free the undo or redo list from List element
* free the undo or redo list from List element
* Wrappers are deleted.
* Wrappers are deleted.
* datas pointed by wrappers are deleted if not in use in schematic
* datas pointed by wrappers are deleted if not in use in schematic
* i.e. when they are copy of a schematic item or they are no more in use (DELETED)
* i.e. when they are copy of a schematic item or they are no more in use
* (DELETED)
* @param aList = the UNDO_REDO_CONTAINER to clear
* @param aList = the UNDO_REDO_CONTAINER to clear
* @param aItemCount = the count of items to remove. < 0 for all items
* @param aItemCount = the count of items to remove. < 0 for all items
* items are removed from the beginning of the list.
* items are removed from the beginning of the list.
...
...
include/colors.h
View file @
d2eac37d
/************
********
/
/************/
/*
Fichier
colors.h */
/* colors.h */
/************
********
/
/************/
#ifndef _COLORS_H
#ifndef _COLORS_H
#define _COLORS_H
#define _COLORS_H
/*
Definitions des Numeros des Couleurs ( palette de 32
) */
/*
Number of colors ( 32 bit palette.
) */
#define NBCOLOR 24
#define NBCOLOR 24
#define MASKCOLOR 31 ///< mask for color index into ColorRefs[]
#define MASKCOLOR 31 ///< mask for color index into ColorRefs[]
///
bit indicateur d'affichage (vu / non vu) des items : (defini dans les valeurs des couleur
s
///
Flag bit display (seen / not seen) items: (defined in the color value
s
//IMB: Not used anymore #define ITEM_NOT_SHOW (1<<18) // 0x40000
//IMB: Not used anymore #define ITEM_NOT_SHOW (1<<18) // 0x40000
/// Definition du bit de surbrillance
#define HIGHT_LIGHT_FLAG ( 1<<19 ) // 0x80000
#define HIGHT_LIGHT_FLAG (1<<19) // 0x80000
/**
/**
...
@@ -102,8 +101,7 @@ static inline wxColour MakeColour( int aColor )
...
@@ -102,8 +101,7 @@ static inline wxColour MakeColour( int aColor )
#endif
#endif
int
ndx
=
aColor
&
MASKCOLOR
;
int
ndx
=
aColor
&
MASKCOLOR
;
return
wxColour
(
return
wxColour
(
ColorRefs
[
ndx
].
m_Red
,
ColorRefs
[
ndx
].
m_Red
,
ColorRefs
[
ndx
].
m_Green
,
ColorRefs
[
ndx
].
m_Green
,
ColorRefs
[
ndx
].
m_Blue
ColorRefs
[
ndx
].
m_Blue
#if wxCHECK_VERSION(2,8,5)
#if wxCHECK_VERSION(2,8,5)
...
...
include/common.h
View file @
d2eac37d
...
@@ -17,13 +17,17 @@ class WinEDA_DrawPanel;
...
@@ -17,13 +17,17 @@ class WinEDA_DrawPanel;
/* Flag for special keys */
/* Flag for special keys */
#define GR_KB_RIGHTSHIFT 0x10000000
/* Keybd states: right shift key depressed */
#define GR_KB_RIGHTSHIFT 0x10000000
/* Keybd states: right
#define GR_KB_LEFTSHIFT 0x20000000
/* left shift key depressed */
* shift key depressed */
#define GR_KB_LEFTSHIFT 0x20000000
/* left shift key depressed
*/
#define GR_KB_CTRL 0x40000000
/* CTRL depressed */
#define GR_KB_CTRL 0x40000000
/* CTRL depressed */
#define GR_KB_ALT 0x80000000
/* ALT depressed */
#define GR_KB_ALT 0x80000000
/* ALT depressed */
#define GR_KB_SHIFT (GR_KB_LEFTSHIFT | GR_KB_RIGHTSHIFT)
#define GR_KB_SHIFT (GR_KB_LEFTSHIFT | GR_KB_RIGHTSHIFT)
#define GR_KB_SHIFTCTRL (GR_KB_SHIFT | GR_KB_CTRL)
#define GR_KB_SHIFTCTRL (GR_KB_SHIFT | GR_KB_CTRL)
#define MOUSE_MIDDLE 0x08000000
/* Middle button mouse flag for block commands */
#define MOUSE_MIDDLE 0x08000000
/* Middle button mouse
* flag for block commands
*/
#define NB_ITEMS 11
#define NB_ITEMS 11
...
@@ -104,7 +108,7 @@ private:
...
@@ -104,7 +108,7 @@ private:
};
};
/* Cl
s
ass to handle pages sizes:
/* Class to handle pages sizes:
*/
*/
class
Ki_PageDescr
class
Ki_PageDescr
{
{
...
@@ -144,7 +148,7 @@ extern wxString g_ProductName;
...
@@ -144,7 +148,7 @@ extern wxString g_ProductName;
/* Default user lib path can be left void, if the standard lib path is used */
/* Default user lib path can be left void, if the standard lib path is used */
extern
wxString
g_UserLibDirBuffer
;
extern
wxString
g_UserLibDirBuffer
;
extern
int
g_DebugLevel
;
// 0= Pas de debug */
extern
int
g_DebugLevel
;
extern
int
g_MouseOldButtons
;
extern
int
g_MouseOldButtons
;
extern
int
g_KeyPressed
;
extern
int
g_KeyPressed
;
...
@@ -169,6 +173,7 @@ extern const wxString AllFilesWildcard;
...
@@ -169,6 +173,7 @@ extern const wxString AllFilesWildcard;
// Name of default configuration file. (kicad.pro)
// Name of default configuration file. (kicad.pro)
extern
wxString
g_Prj_Default_Config_FullFilename
;
extern
wxString
g_Prj_Default_Config_FullFilename
;
// Name of local configuration file. (<curr projet>.pro)
// Name of local configuration file. (<curr projet>.pro)
extern
wxString
g_Prj_Config_LocalFilename
;
extern
wxString
g_Prj_Config_LocalFilename
;
...
@@ -187,41 +192,46 @@ extern BASE_SCREEN* ActiveScreen;
...
@@ -187,41 +192,46 @@ extern BASE_SCREEN* ActiveScreen;
/* COMMON.CPP */
/* COMMON.CPP */
/** function SetLocaleTo_C_standard
/** function SetLocaleTo_C_standard
because kicad is internationalized, switch internatization to "C" standard
* because kicad is internationalized, switch internalization to "C" standard
i.e. uses the . (dot) as separator in print/read float numbers
* i.e. uses the . (dot) as separator in print/read float numbers
(some contries (France, Germany ..) use , (comma) as separator)
* (some countries (France, Germany ..) use , (comma) as separator)
This function must be called before read or write ascii files using float numbers in data
* This function must be called before read or write ascii files using float
the SetLocaleTo_C_standard function must be called after reading or writing the file
* numbers in data the SetLocaleTo_C_standard function must be called after
* reading or writing the file
This is wrapper to the C setlocale( LC_NUMERIC, "C" ) function,
*
but could make more easier an optional use of locale in kicad
* This is wrapper to the C setlocale( LC_NUMERIC, "C" ) function,
*/
* but could make more easier an optional use of locale in kicad
void
SetLocaleTo_C_standard
(
void
);
*/
void
SetLocaleTo_C_standard
(
void
);
/** function SetLocaleTo_Default
/** function SetLocaleTo_Default
because kicad is internationalized, switch internatization to default
* because kicad is internationalized, switch internalization to default
to use the default separator in print/read float numbers
* to use the default separator in print/read float numbers
(. (dot) but some contries (France, Germany ..) use , (comma) as separator)
* (. (dot) but some countries (France, Germany ..) use , (comma) as
This function must be called after a call to SetLocaleTo_C_standard
* separator)
* This function must be called after a call to SetLocaleTo_C_standard
This is wrapper to the C setlocale( LC_NUMERIC, "" ) function,
*
but could make more easier an optional use of locale in kicad
* This is wrapper to the C setlocale( LC_NUMERIC, "" ) function,
*/
* but could make more easier an optional use of locale in kicad
void
SetLocaleTo_Default
(
void
);
*/
void
SetLocaleTo_Default
(
void
);
/**
/**
* Function EnsureTextCtrlWidth
* Function EnsureTextCtrlWidth
* sets the minimum pixel width on a text control in order to make a text string
* sets the minimum pixel width on a text control in order to make a text
* be fully visible within it. The current font within the text control is considered.
* string be fully visible within it. The current font within the text
* control is considered.
* The text can come either from the control or be given as an argument.
* The text can come either from the control or be given as an argument.
* If the text control is larger than needed, then nothing is done.
* If the text control is larger than needed, then nothing is done.
* @param aCtrl the text control to potentially make wider.
* @param aCtrl the text control to potentially make wider.
* @param aString the text that is used in sizing the control's pixel width. If NULL, then
* @param aString the text that is used in sizing the control's pixel width.
* If NULL, then
* the text already within the control is used.
* the text already within the control is used.
* @return bool - true if the \a aCtrl had its size changed, else false.
* @return bool - true if the \a aCtrl had its size changed, else false.
*/
*/
bool
EnsureTextCtrlWidth
(
wxTextCtrl
*
aCtrl
,
const
wxString
*
aString
=
NULL
);
bool
EnsureTextCtrlWidth
(
wxTextCtrl
*
aCtrl
,
const
wxString
*
aString
=
NULL
);
/**
/**
...
@@ -238,7 +248,8 @@ wxString& operator <<( wxString& aString, const wxPoint& aPoint );
...
@@ -238,7 +248,8 @@ wxString& operator <<( wxString& aString, const wxPoint& aPoint );
/**
/**
* Function ProcessExecute
* Function ProcessExecute
* runs a child process.
* runs a child process.
* @param aCommandLine The process and any arguments to it all in a single string.
* @param aCommandLine The process and any arguments to it all in a single
* string.
* @param aFlags The same args as allowed for wxExecute()
* @param aFlags The same args as allowed for wxExecute()
* @return bool - true if success, else false
* @return bool - true if success, else false
*/
*/
...
@@ -246,28 +257,29 @@ bool ProcessExecute( const wxString& aCommandLine,
...
@@ -246,28 +257,29 @@ bool ProcessExecute( const wxString& aCommandLine,
int
aFlags
=
wxEXEC_ASYNC
);
int
aFlags
=
wxEXEC_ASYNC
);
/**
/**
* Function ReturnPcbLayerName
* Function ReturnPcbLayerName
* @return a wxString containing the name of the layer number "layer_number".
* @return a wxString containing the name of the layer number "layer_number".
* @param layer_number the layer number of the layer
* @param layer_number the layer number of the layer
* @param is_filename if TRUE, the name can be used for a file name (not
* @param is_filename if TRUE, the name can be used for a file name (not
* internatinalized, no space)
* internati
o
nalized, no space)
*/
*/
wxString
ReturnPcbLayerName
(
int
layer_number
,
bool
is_filename
=
FALSE
);
wxString
ReturnPcbLayerName
(
int
layer_number
,
bool
is_filename
=
FALSE
);
/*******************/
/*******************/
/* about_kicad.cpp */
/* about_kicad.cpp */
/*******************/
/*******************/
void
InitKiCadAbout
(
wxAboutDialogInfo
&
info
);
void
InitKiCadAbout
(
wxAboutDialogInfo
&
info
);
/**************/
/**************/
/* common.cpp */
/* common.cpp */
/**************/
/**************/
wxString
GetBuildVersion
();
/* Return the build date */
wxString
GetBuildVersion
();
/* Return the build date */
wxString
GetAboutBuildVersion
();
/* Return custom build date for about dialog */
wxString
GetAboutBuildVersion
();
/* Return custom build date for about
* dialog */
/**
/**
* function Affiche_1_Parametre
* function Affiche_1_Parametre
...
@@ -325,9 +337,12 @@ int ReturnValueFromString( int Units, const wxString& TextValue,
...
@@ -325,9 +337,12 @@ int ReturnValueFromString( int Units, const wxString& TextValue,
* @param aValue = value in Internal_Unit
* @param aValue = value in Internal_Unit
* @param aInternal_Unit = units per inch for Value
* @param aInternal_Unit = units per inch for Value
* @param aAdd_unit_symbol = true to add symbol unit to the string value
* @param aAdd_unit_symbol = true to add symbol unit to the string value
* @return a wxString what contains value and optionnaly the sumbol unit (like 2.000 mm)
* @return a wxString what contains value and optionally the symbol unit (like
* 2.000 mm)
*/
*/
wxString
ReturnStringFromValue
(
int
aUnits
,
int
aValue
,
int
aInternal_Unit
,
wxString
ReturnStringFromValue
(
int
aUnits
,
int
aValue
,
int
aInternal_Unit
,
bool
aAdd_unit_symbol
=
false
);
bool
aAdd_unit_symbol
=
false
);
void
AddUnitSymbol
(
wxStaticText
&
Stext
,
int
Units
=
g_UnitMetric
);
void
AddUnitSymbol
(
wxStaticText
&
Stext
,
int
Units
=
g_UnitMetric
);
...
@@ -338,24 +353,30 @@ void PutValueInLocalUnits( wxTextCtrl& TextCtr, int Value,
...
@@ -338,24 +353,30 @@ void PutValueInLocalUnits( wxTextCtrl& TextCtr, int Value,
int
Internal_Unit
);
int
Internal_Unit
);
/* Convert the number Value in a string according to the internal units
/* Convert the number Value in a string according to the internal units
* and the selected unit (g_UnitMetric) and put it in the wxTextCtrl TextCtrl */
* and the selected unit (g_UnitMetric) and put it in the wxTextCtrl TextCtrl
**/
int
ReturnValueFromTextCtrl
(
const
wxTextCtrl
&
TextCtr
,
int
ReturnValueFromTextCtrl
(
const
wxTextCtrl
&
TextCtr
,
int
Internal_Unit
);
int
Internal_Unit
);
/* return a String List from a string, w
h
ith a specific splitter*/
/* return a String List from a string, with a specific splitter*/
wxArrayString
*
wxStringSplit
(
wxString
txt
,
wxChar
splitter
);
wxArrayString
*
wxStringSplit
(
wxString
txt
,
wxChar
splitter
);
/**
/**
* Function To_User_Unit
* Function To_User_Unit
* Convert in inch or mm the variable "val" (double)given in internal units
* Convert in inch or mm the variable "val" (double)given in internal units
* @return the converted value, in double
* @return the converted value, in double
* @param is_metric : true if the result must be returned in mm , false if inches
* @param is_metric : true if the result must be returned in mm , false if
* inches
* @param val : double : the given value
* @param val : double : the given value
* @param internal_unit_value = internal units per inch
* @param internal_unit_value = internal units per inch
*/
*/
double
To_User_Unit
(
bool
is_metric
,
double
val
,
int
internal_unit_value
);
double
To_User_Unit
(
bool
is_metric
,
double
val
,
int
internal_unit_value
);
int
From_User_Unit
(
bool
is_metric
,
double
val
,
int
internal_unit_value
);
int
From_User_Unit
(
bool
is_metric
,
double
val
,
int
internal_unit_value
);
wxString
GenDate
();
wxString
GenDate
();
void
MyFree
(
void
*
pt_mem
);
void
MyFree
(
void
*
pt_mem
);
void
*
MyZMalloc
(
size_t
nb_octets
);
void
*
MyZMalloc
(
size_t
nb_octets
);
...
...
include/confirm.h
View file @
d2eac37d
...
@@ -9,27 +9,17 @@
...
@@ -9,27 +9,17 @@
#define __INCLUDE__CONFIRM_H__ 1
#define __INCLUDE__CONFIRM_H__ 1
void
DisplayError
(
wxWindow
*
parent
,
const
wxString
&
msg
,
int
displaytime
=
0
);
void
DisplayError
(
wxWindow
*
parent
,
const
wxString
&
msg
,
void
DisplayInfoMessage
(
wxWindow
*
parent
,
const
wxString
&
msg
,
int
displaytime
=
0
);
int
displaytime
=
0
);
void
DisplayInfoMessage
(
wxWindow
*
parent
,
const
wxString
&
msg
,
/* Routines d'affichage messages ( disparait au bout de displaytime 0.1 secondes) */
int
displaytime
=
0
);
bool
IsOK
(
wxWindow
*
parent
,
const
wxString
&
msg
);
bool
IsOK
(
wxWindow
*
parent
,
const
wxString
&
msg
);
/* Routine affichant la fenetre "CONFIRMATION"
* Retourne 1 ou 0 selon reponse Yes / No */
int
Get_Message
(
const
wxString
&
title
,
int
Get_Message
(
const
wxString
&
title
,
const
wxString
&
frame_caption
,
const
wxString
&
frame_caption
,
wxString
&
buffer
,
wxString
&
buffer
,
wxWindow
*
frame
);
wxWindow
*
frame
);
/* Fonction d'installation du menu de Dialogue
* entree: titre = titre a afficher
* entree/sortie :buffer : contient la reponse
* si a l'appel buffer n'est pas vide, son contenu est aussi
* affiche, mais disparait a la 1ere correction */
#endif
/* __INCLUDE__CONFIRM_H__ */
#endif
/* __INCLUDE__CONFIRM_H__ */
include/eda_doc.h
View file @
d2eac37d
/**
/**
* This file is part of the common libary.
* This file is part of the common lib
r
ary.
* @file eda_doc.h
* @file eda_doc.h
* @see common.h
* @see common.h
*/
*/
...
@@ -8,13 +8,11 @@
...
@@ -8,13 +8,11 @@
#define __INCLUDE__EDA_DOC_H__ 1
#define __INCLUDE__EDA_DOC_H__ 1
/* Search the text Database for found all the key words in the KeyList.
/* Recherche si dans le texte Database on retrouve tous les mots
*
* cles donnes dans KeyList ( KeyList = suite de mots cles
* Returns:
* separes par des espaces
* 0 if no keyword is found
* Retourne:
* 1 if keyword found.
* 0 si aucun mot cle trouve
* 1 si mot cle trouve
*/
*/
int
KeyWordOk
(
const
wxString
&
KeyList
,
int
KeyWordOk
(
const
wxString
&
KeyList
,
const
wxString
&
Database
);
const
wxString
&
Database
);
...
@@ -23,7 +21,8 @@ int KeyWordOk( const wxString& KeyList,
...
@@ -23,7 +21,8 @@ int KeyWordOk( const wxString& KeyList,
* open a document (file) with the suitable browser
* open a document (file) with the suitable browser
* @param aFrame = main frame
* @param aFrame = main frame
* @param aDocName = filename of file to open (Full filename or short filename)
* @param aDocName = filename of file to open (Full filename or short filename)
* if DocName is starting by http: or ftp: or www. the default internet browser is launched
* if DocName is starting by http: or ftp: or www. the default internet
* browser is launched
* @param aPaths = a wxPathList to explore.
* @param aPaths = a wxPathList to explore.
* if NULL or aDocName is a full filename, aPath is not used.
* if NULL or aDocName is a full filename, aPath is not used.
*/
*/
...
@@ -33,4 +32,3 @@ bool GetAssociatedDocument( wxFrame* aFrame,
...
@@ -33,4 +32,3 @@ bool GetAssociatedDocument( wxFrame* aFrame,
#endif
/* __INCLUDE__EDA_DOC_H__ */
#endif
/* __INCLUDE__EDA_DOC_H__ */
include/fctsys.h
View file @
d2eac37d
/********************/
/********************/
/*
includes systeme
*/
/*
System includes.
*/
/********************/
/********************/
#ifndef FCTSYS_H
#ifndef FCTSYS_H
#define FCTSYS_H
#define FCTSYS_H
...
@@ -56,7 +56,8 @@
...
@@ -56,7 +56,8 @@
#define USE_RESIZE_BORDER
#define USE_RESIZE_BORDER
#if defined(__UNIX__) || defined(USE_RESIZE_BORDER)
#if defined(__UNIX__) || defined(USE_RESIZE_BORDER)
#define MAYBE_RESIZE_BORDER wxRESIZE_BORDER // linux users like resizeable borders
#define MAYBE_RESIZE_BORDER wxRESIZE_BORDER // linux users like resizeable
// borders
#else
#else
#define MAYBE_RESIZE_BORDER 0 // no resizeable border
#define MAYBE_RESIZE_BORDER 0 // no resizeable border
#endif
#endif
...
...
include/gestfich.h
View file @
d2eac37d
/**
/**
* This file is part of the common libary
* This file is part of the common lib
r
ary
* TODO brief description
* TODO brief description
* @file gestfich.h
* @file gestfich.h
* @see common.h
* @see common.h
...
@@ -25,73 +25,52 @@ bool OpenPDF( const wxString& file );
...
@@ -25,73 +25,52 @@ bool OpenPDF( const wxString& file );
void
OpenFile
(
const
wxString
&
file
);
void
OpenFile
(
const
wxString
&
file
);
bool
EDA_DirectorySelector
(
const
wxString
&
Title
,
/* Titre de la fenetre */
bool
EDA_DirectorySelector
(
const
wxString
&
Title
,
wxString
&
Path
,
/* Chemin par defaut */
wxString
&
Path
,
int
flag
,
/* reserve */
int
flag
,
/* reserve */
wxWindow
*
Frame
,
/* parent frame */
wxWindow
*
Frame
,
const
wxPoint
&
Pos
);
const
wxPoint
&
Pos
);
wxString
EDA_FileSelector
(
const
wxString
&
Title
,
/* Window title */
wxString
EDA_FileSelector
(
const
wxString
&
Title
,
const
wxString
&
Path
,
/* default path */
const
wxString
&
Path
,
const
wxString
&
FileName
,
/* default filename */
const
wxString
&
FileName
,
const
wxString
&
Ext
,
/* default extension */
const
wxString
&
Ext
,
const
wxString
&
Mask
,
/* Display filename mask */
const
wxString
&
Mask
,
wxWindow
*
Frame
,
/* parent frame */
wxWindow
*
Frame
,
int
flag
,
/* wxSAVE, wxOPEN ..*/
int
flag
,
const
bool
keep_working_directory
,
/* true = do not change the C.W.D. */
const
bool
keep_working_directory
,
const
wxPoint
&
Pos
=
wxPoint
(
-
1
,
-
1
)
const
wxPoint
&
Pos
=
wxPoint
(
-
1
,
-
1
)
);
);
/* Return file name without path or extension.
/* Calcule le nom complet d'un file d'apres les chaines
* dir = prefixe (chemin)
* shortname = nom avec ou sans chemin ou extension
* ext = extension
*
* si la chaine name possede deja un chemin ou une extension, elles
* ne seront pas modifiees
*
*
* retourne la chaine calculee */
* If the path is in the default kicad path, ./ is prepended to the
* file name. If the file name has the default extension, the file
* name is returned without an extension.
*/
wxString
MakeReducedFileName
(
const
wxString
&
fullfilename
,
wxString
MakeReducedFileName
(
const
wxString
&
fullfilename
,
const
wxString
&
default_path
,
const
wxString
&
default_path
,
const
wxString
&
default_ext
);
const
wxString
&
default_ext
);
/* Calcule le nom "reduit" d'un file d'apres les chaines
* fullfilename = nom complet
* default_path = prefixe (chemin) par defaut
* default_ext = extension par defaut
*
* retourne le nom reduit, c'est a dire:
* sans le chemin si le chemin est default_path
* avec ./ si si le chemin est le chemin courant
* sans l'extension si l'extension est default_ext
*
* Renvoie un chemin en notation unix ('/' en separateur de repertoire)
*/
WinEDAListBox
*
GetFileNames
(
char
*
Directory
,
char
*
Mask
);
WinEDAListBox
*
GetFileNames
(
char
*
Directory
,
char
*
Mask
);
/* Change l'extension du "filename FullFileName" en NewExt.
* Retourne FullFileName */
int
ExecuteFile
(
wxWindow
*
frame
,
const
wxString
&
ExecFile
,
int
ExecuteFile
(
wxWindow
*
frame
,
const
wxString
&
ExecFile
,
const
wxString
&
param
=
wxEmptyString
);
const
wxString
&
param
=
wxEmptyString
);
void
AddDelimiterString
(
wxString
&
string
);
void
AddDelimiterString
(
wxString
&
string
);
/* Find absolute path for kicad/help (or kicad/help/<language>) */
wxString
FindKicadHelpPath
();
wxString
FindKicadHelpPath
();
/* Find absolute path for kicad/help (or kicad/help/<language>) */
/* Return the kicad common data path. */
wxString
ReturnKicadDatasPath
();
wxString
ReturnKicadDatasPath
();
/* Retourne le chemin des donnees communes de kicad. */
wxString
FindKicadFile
(
const
wxString
&
shortname
);
/* Search the executable file shortname in kicad binary path and return
/* Search the executable file shortname in kicad binary path and return
* full file name if found or shortname */
* full file name if found or shortname */
wxString
FindKicadFile
(
const
wxString
&
shortname
);
/**
/**
...
@@ -105,4 +84,3 @@ extern wxString QuoteFullPath( wxFileName& fn,
...
@@ -105,4 +84,3 @@ extern wxString QuoteFullPath( wxFileName& fn,
wxPathFormat
format
=
wxPATH_NATIVE
);
wxPathFormat
format
=
wxPATH_NATIVE
);
#endif
/* __INCLUDE__GESTFICH_H__ */
#endif
/* __INCLUDE__GESTFICH_H__ */
include/gr_basic.h
View file @
d2eac37d
/**************/
/**************/
/* gr_basic.h */
/* gr_basic.h */
/**************/
/**************/
#ifndef GR_BASIC
#ifndef GR_BASIC
#define GR_BASIC
#define GR_BASIC
...
@@ -10,8 +10,6 @@
...
@@ -10,8 +10,6 @@
class
EDA_Rect
;
class
EDA_Rect
;
/* Constantes utiles */
#define GR_COPY 0
#define GR_COPY 0
#define GR_OR 0x01000000
#define GR_OR 0x01000000
#define GR_XOR 0x02000000
#define GR_XOR 0x02000000
...
@@ -26,105 +24,138 @@ class EDA_Rect;
...
@@ -26,105 +24,138 @@ class EDA_Rect;
#define GR_M_DCLICK 0x80000000
#define GR_M_DCLICK 0x80000000
/* variables generales */
extern
int
g_XorMode
;
extern
int
g_XorMode
;
extern
int
g_DrawBgColor
;
extern
int
g_DrawBgColor
;
typedef
enum
{
/* Line styles for Get/SetLineStyle. */
typedef
enum
{
/* Line styles for Get/SetLineStyle. */
GR_SOLID_LINE
=
0
,
GR_SOLID_LINE
=
0
,
GR_DOTTED_LINE
=
1
,
GR_DOTTED_LINE
=
1
,
GR_DASHED_LINE
=
3
GR_DASHED_LINE
=
3
}
GRLineStypeType
;
}
GRLineStypeType
;
/*******************************************************/
int
GRMapX
(
int
x
);
/* Prototypage des fonctions definies dans gr_basic.cc */
int
GRMapY
(
int
y
);
/*******************************************************/
int
GRMapX
(
int
x
);
int
GRMapY
(
int
y
);
class
WinEDA_DrawPanel
;
class
WinEDA_DrawPanel
;
/* routines generales */
void
GRSetDrawMode
(
wxDC
*
DC
,
int
mode
);
void
GRSetDrawMode
(
wxDC
*
DC
,
int
mode
);
int
GRGetDrawMode
(
wxDC
*
DC
);
int
GRGetDrawMode
(
wxDC
*
DC
);
void
GRResetPenAndBrush
(
wxDC
*
DC
);
void
GRResetPenAndBrush
(
wxDC
*
DC
);
void
GRSetColorPen
(
wxDC
*
DC
,
int
Color
,
int
width
=
1
,
int
stype
=
wxSOLID
);
void
GRSetColorPen
(
wxDC
*
DC
,
int
Color
,
int
width
=
1
,
int
stype
=
wxSOLID
);
void
GRSetBrush
(
wxDC
*
DC
,
int
Color
,
int
fill
=
0
);
void
GRSetBrush
(
wxDC
*
DC
,
int
Color
,
int
fill
=
0
);
/** function GRForceBlackPen
/** function GRForceBlackPen
* @param flagforce True to force a black pen whenever the asked color
* @param flagforce True to force a black pen whenever the asked color
*/
*/
void
GRForceBlackPen
(
bool
flagforce
);
void
GRForceBlackPen
(
bool
flagforce
);
/** function GetGRForceBlackPenState
/** function GetGRForceBlackPenState
* @return ForceBlackPen (True if a black pen was forced)
* @return ForceBlackPen (True if a black pen was forced)
*/
*/
bool
GetGRForceBlackPenState
(
void
);
bool
GetGRForceBlackPenState
(
void
);
void
SetPenMinWidth
(
int
minwidth
);
/* ajustage de la largeur mini de plume */
void
SetPenMinWidth
(
int
minwidth
);
void
GRLine
(
EDA_Rect
*
aClipBox
,
wxDC
*
aDC
,
wxPoint
aStart
,
wxPoint
aEnd
,
int
aWidth
,
int
aColor
);
void
GRLine
(
EDA_Rect
*
aClipBox
,
wxDC
*
aDC
,
wxPoint
aStart
,
wxPoint
aEnd
,
void
GRLine
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
width
,
int
Color
);
int
aWidth
,
int
aColor
);
void
GRMixedLine
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
width
,
int
Color
);
void
GRLine
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
void
GRSMixedLine
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
width
,
int
Color
);
int
y2
,
int
width
,
int
Color
);
void
GRDashedLine
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
width
,
int
Color
);
void
GRMixedLine
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
void
GRSDashedLine
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
width
,
int
Color
);
int
width
,
int
Color
);
void
GRDashedLineTo
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x2
,
int
y2
,
int
width
,
int
Color
);
void
GRSMixedLine
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
void
GRSDashedLineTo
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x2
,
int
y2
,
int
width
,
int
Color
);
int
width
,
int
Color
);
void
GRSLine
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
width
,
int
Color
);
void
GRDashedLine
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
void
GRMoveTo
(
int
x
,
int
y
);
int
width
,
int
Color
);
void
GRSMoveTo
(
int
x
,
int
y
);
void
GRSDashedLine
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
void
GRLineTo
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
width
,
int
Color
);
int
y2
,
int
width
,
int
Color
);
void
GRSLineTo
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
width
,
int
Color
);
void
GRDashedLineTo
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x2
,
int
y2
,
int
width
,
void
GRMoveRel
(
int
x
,
int
y
);
int
Color
);
void
GRSMoveRel
(
int
x
,
int
y
);
void
GRSDashedLineTo
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x2
,
int
y2
,
int
width
,
void
GRLineRel
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
width
,
int
Color
);
int
Color
);
void
GRSLineRel
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
width
,
int
Color
);
void
GRSLine
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
width
,
int
Color
);
void
GRMoveTo
(
int
x
,
int
y
);
void
GRPoly
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
n
,
wxPoint
Points
[],
bool
Fill
,
int
width
,
int
Color
,
int
BgColor
);
void
GRSMoveTo
(
int
x
,
int
y
);
void
GRLineTo
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
width
,
void
GRBezier
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
x3
,
int
y3
,
int
width
,
int
Color
);
int
Color
);
void
GRBezier
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
x3
,
int
y3
,
int
x4
,
int
y4
,
int
width
,
int
Color
);
void
GRSLineTo
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
width
,
int
Color
);
void
GRMoveRel
(
int
x
,
int
y
);
void
GRSMoveRel
(
int
x
,
int
y
);
void
GRLineRel
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
width
,
int
Color
);
void
GRSLineRel
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
width
,
int
Color
);
void
GRPoly
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
n
,
wxPoint
Points
[],
bool
Fill
,
int
width
,
int
Color
,
int
BgColor
);
void
GRBezier
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
x3
,
int
y3
,
int
width
,
int
Color
);
void
GRBezier
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
x3
,
int
y3
,
int
x4
,
int
y4
,
int
width
,
int
Color
);
/**
/**
* Function GRClosedPoly
* Function GRClosedPoly
* draws a closed polygon onto the drawing context \a aDC and optionally fills and/or
* draws a closed polygon onto the drawing context \a aDC and optionally fills
* draws a border around it.
* and/or draws a border around it.
* @param ClipBox defines a rectangular boundary outside of which no drawing will occur.
* @param ClipBox defines a rectangular boundary outside of which no drawing
* will occur.
* @param aDC the device context into which drawing should occur.
* @param aDC the device context into which drawing should occur.
* @param aPointCount the number of points in the array \a aPointArray.
* @param aPointCount the number of points in the array \a aPointArray.
* @param aPointArray an array holding the wxPoints in the polygon.
* @param aPointArray an array holding the wxPoints in the polygon.
* @param doFill true if polygon is to be filled, else false and only the boundary is drawn.
* @param doFill true if polygon is to be filled, else false and only the
* boundary is drawn.
* @param aPenColor the color index of the border.
* @param aPenColor the color index of the border.
* @param aFillColor the fill color of the polygon's interior.
* @param aFillColor the fill color of the polygon's interior.
*/
*/
void
GRClosedPoly
(
EDA_Rect
*
ClipBox
,
wxDC
*
aDC
,
int
aPointCount
,
wxPoint
aPoints
[],
bool
doFill
,
int
aPenColor
,
int
aFillColor
);
void
GRClosedPoly
(
EDA_Rect
*
ClipBox
,
wxDC
*
aDC
,
int
aPointCount
,
wxPoint
aPoints
[],
bool
doFill
,
int
aPenColor
,
int
aFillColor
);
// @todo could make these 2 closed polygons calls a single function and default the aPenWidth argument
// @todo could make these 2 closed polygons calls a single function and default
// the aPenWidth argument
/**
/**
* Function GRClosedPoly
* Function GRClosedPoly
* draws a closed polygon onto the drawing context \a aDC and optionally fills and/or
* draws a closed polygon onto the drawing context \a aDC and optionally fills
* draws a border around it.
* and/or draws a border around it.
* @param ClipBox defines a rectangular boundary outside of which no drawing will occur.
* @param ClipBox defines a rectangular boundary outside of which no drawing
* will occur.
* @param aDC the device context into which drawing should occur.
* @param aDC the device context into which drawing should occur.
* @param aPointCount the number of points in the array \a aPointArray.
* @param aPointCount the number of points in the array \a aPointArray.
* @param aPointArray an array holding the wxPoints in the polygon.
* @param aPointArray an array holding the wxPoints in the polygon.
* @param doFill true if polygon is to be filled, else false and only the boundary is drawn.
* @param doFill true if polygon is to be filled, else false and only the
* @param aPenWidth is the width of the pen to use on the perimeter, can be zero.
* boundary is drawn.
* @param aPenWidth is the width of the pen to use on the perimeter, can be
* zero.
* @param aPenColor the color index of the border.
* @param aPenColor the color index of the border.
* @param aFillColor the fill color of the polygon's interior.
* @param aFillColor the fill color of the polygon's interior.
*/
*/
void
GRClosedPoly
(
EDA_Rect
*
ClipBox
,
wxDC
*
aDC
,
int
aPointCount
,
wxPoint
aPoints
[],
bool
doFill
,
int
aPenWidth
,
int
aPenColor
,
int
aFillColor
);
void
GRClosedPoly
(
EDA_Rect
*
ClipBox
,
wxDC
*
aDC
,
int
aPointCount
,
wxPoint
aPoints
[],
bool
doFill
,
int
aPenWidth
,
int
aPenColor
,
int
aFillColor
);
/**
/**
* Function GRCircle
* Function GRCircle
* draws a circle onto the drawing context \a aDC centered at the user coordinates (x,y)
* draws a circle onto the drawing context \a aDC centered at the user
* coordinates (x,y)
*
*
* @param ClipBox defines a rectangular boundary outside of which no drawing will occur.
* @param ClipBox defines a rectangular boundary outside of which no drawing
* will occur.
* @param aDC the device context into which drawing should occur.
* @param aDC the device context into which drawing should occur.
* @param x The x coordinate in user space of the center of the circle.
* @param x The x coordinate in user space of the center of the circle.
* @param x The y coordinate in user space of the center of the circle.
* @param x The y coordinate in user space of the center of the circle.
...
@@ -132,58 +163,66 @@ void GRClosedPoly(EDA_Rect * ClipBox, wxDC* aDC, int aPointCount, wxPoint aPoint
...
@@ -132,58 +163,66 @@ void GRClosedPoly(EDA_Rect * ClipBox, wxDC* aDC, int aPointCount, wxPoint aPoint
* @param aColor is an index into our color table of RGB colors.
* @param aColor is an index into our color table of RGB colors.
* @see EDA_Colors and colors.h
* @see EDA_Colors and colors.h
*/
*/
void
GRCircle
(
EDA_Rect
*
ClipBox
,
wxDC
*
aDC
,
int
x
,
int
y
,
int
aRadius
,
int
aColor
);
void
GRCircle
(
EDA_Rect
*
ClipBox
,
wxDC
*
aDC
,
int
x
,
int
y
,
int
aRadius
,
int
aColor
);
void
GRCircle
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
r
,
int
width
,
int
Color
);
void
GRFilledCircle
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
r
,
void
GRCircle
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
r
,
int
width
,
int
width
,
int
Color
,
int
BgColor
);
int
Color
);
void
GRSCircle
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
r
,
int
width
,
int
Color
);
void
GRFilledCircle
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
r
,
void
GRSFilledCircle
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
r
,
int
width
,
int
Color
,
int
BgColor
);
int
width
,
int
Color
,
int
BgColor
);
void
GRSCircle
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
r
,
int
width
,
void
GRArc
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
StAngle
,
int
EndAngle
,
int
r
,
int
Color
);
int
Color
);
void
GRArc
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
StAngle
,
int
EndAngle
,
int
r
,
int
width
,
int
Color
);
void
GRSFilledCircle
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
r
,
void
GRArc1
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
width
,
int
Color
,
int
BgColor
);
int
xc
,
int
yc
,
int
Color
);
void
GRArc
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
StAngle
,
void
GRArc1
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
EndAngle
,
int
r
,
int
Color
);
int
xc
,
int
yc
,
int
width
,
int
Color
);
void
GRArc
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
StAngle
,
void
GRSArc1
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
EndAngle
,
int
r
,
int
width
,
int
Color
);
int
xc
,
int
yc
,
int
width
,
int
Color
);
void
GRArc1
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
void
GRSArc
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
StAngle
,
int
EndAngle
,
int
r
,
int
width
,
int
Color
);
int
xc
,
int
yc
,
int
Color
);
void
GRFilledArc
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
void
GRArc1
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
StAngle
,
int
EndAngle
,
int
r
,
int
Color
,
int
BgColor
);
int
xc
,
int
yc
,
int
width
,
int
Color
);
void
GRFilledArc
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
void
GRSArc1
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
StAngle
,
int
EndAngle
,
int
r
,
int
width
,
int
Color
,
int
BgColor
);
int
xc
,
int
yc
,
int
width
,
int
Color
);
void
GRSFilledArc
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
void
GRSArc
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
StAngle
,
int
StAngle
,
int
EndAngle
,
int
r
,
int
width
,
int
Color
,
int
BgColor
);
int
EndAngle
,
int
r
,
int
width
,
int
Color
);
void
GRCSegm
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
width
,
int
Color
);
void
GRFilledArc
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
void
GRFillCSegm
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
width
,
int
Color
);
int
StAngle
,
int
EndAngle
,
int
r
,
int
Color
,
int
BgColor
);
void
GRSCSegm
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
width
,
int
Color
);
void
GRFilledArc
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
StAngle
,
void
GRSFillCSegm
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
EndAngle
,
int
r
,
int
width
,
int
Color
,
int
BgColor
);
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
width
,
int
Color
);
void
GRSFilledArc
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
StAngle
,
int
EndAngle
,
int
r
,
int
width
,
int
Color
,
int
BgColor
);
void
GRSetColor
(
int
Color
);
void
GRCSegm
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
width
,
int
Color
);
void
GRFillCSegm
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
width
,
int
Color
);
void
GRSCSegm
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
width
,
int
Color
);
void
GRSFillCSegm
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
width
,
int
Color
);
void
GRSetColor
(
int
Color
);
void
GRSetDefaultPalette
();
void
GRSetDefaultPalette
();
int
GRGetColor
();
int
GRGetColor
();
void
GRPutPixel
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
color
);
void
GRPutPixel
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
color
);
void
GRSPutPixel
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
color
);
void
GRSPutPixel
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x
,
int
y
,
int
color
);
int
GRGetPixel
(
wxDC
*
DC
,
int
x
,
int
y
);
int
GRGetPixel
(
wxDC
*
DC
,
int
x
,
int
y
);
void
GRFilledRect
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
void
GRFilledRect
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
Color
,
int
BgColor
);
int
x2
,
int
y2
,
int
Color
,
int
BgColor
);
void
GRFilledRect
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
void
GRFilledRect
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
width
,
int
Color
,
int
BgColor
);
int
x2
,
int
y2
,
int
width
,
int
Color
,
int
BgColor
);
void
GRSFilledRect
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
void
GRSFilledRect
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
Color
,
int
BgColor
);
int
x2
,
int
y2
,
int
Color
,
int
BgColor
);
void
GRSFilledRect
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
void
GRSFilledRect
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
width
,
int
Color
,
int
BgColor
);
int
x2
,
int
y2
,
int
width
,
int
Color
,
int
BgColor
);
void
GRRect
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
void
GRRect
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
Color
);
int
x2
,
int
y2
,
int
Color
);
void
GRRect
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
void
GRRect
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
width
,
int
Color
);
int
x2
,
int
y2
,
int
width
,
int
Color
);
void
GRSRect
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
void
GRSRect
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
Color
);
int
x2
,
int
y2
,
int
Color
);
void
GRSRect
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
void
GRSRect
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
width
,
int
Color
);
int
x2
,
int
y2
,
int
width
,
int
Color
);
#endif
/* define GR_BASIC */
#endif
/* define GR_BASIC */
include/kicad_string.h
View file @
d2eac37d
/**
/**
* This file is part of the common libary \n
* This file is part of the common lib
r
ary \n
* Custom string manipulation routines.
* Custom string manipulation routines.
* @file kicad_string.h
* @file kicad_string.h
* @see common.h, string.cpp
* @see common.h, string.cpp
...
@@ -13,75 +13,71 @@
...
@@ -13,75 +13,71 @@
char
*
strupper
(
char
*
Text
);
char
*
strupper
(
char
*
Text
);
char
*
strlower
(
char
*
Text
);
char
*
strlower
(
char
*
Text
);
/* Read string delimited with (") character.
* Upload NbMaxChar max
* Returns the number of codes read in source
* dest is terminated by NULL
*/
int
ReadDelimitedText
(
char
*
dest
,
int
ReadDelimitedText
(
char
*
dest
,
char
*
source
,
char
*
source
,
int
NbMaxChar
);
int
NbMaxChar
);
/* lit et place dans dest la chaine de caractere trouvee dans source,
/* Read one line line from a file.
* delimitee par " .
* Returns the first useful line read by eliminating blank lines and comments.
* transfere NbMaxChar max
*/
* retourne le nombre de codes lus dans source
* dest est termine par NULL */
char
*
GetLine
(
FILE
*
File
,
char
*
GetLine
(
FILE
*
File
,
char
*
Line
,
char
*
Line
,
int
*
LineNum
=
NULL
,
int
*
LineNum
=
NULL
,
int
SizeLine
=
255
);
int
SizeLine
=
255
);
/* Routine de lecture de 1 ligne utile
/* Remove leading and trailing whitespace.
* retourne la 1ere ligne utile lue.
*/
* elimine lignes vides et commentaires */
char
*
StrPurge
(
char
*
text
);
char
*
StrPurge
(
char
*
text
);
/* Supprime les caracteres Space en debut de la ligne text
* retourne un pointeur sur le 1er caractere non Space de text */
/*Return a string giving the current date and time.
*/
char
*
DateAndTime
(
char
*
line
);
char
*
DateAndTime
(
char
*
line
);
wxString
DateAndTime
();
wxString
DateAndTime
();
/* Retourne la chaine de caractere donnant date+heure */
/*
* Routine (compatible with qsort ()) to sort by alphabetical order.
* Equivalent to strncmp () but the numbers are compared by their integer
* value not by their ASCII code.
*/
int
StrLenNumCmp
(
const
wxChar
*
str1
,
int
StrLenNumCmp
(
const
wxChar
*
str1
,
const
wxChar
*
str2
,
const
wxChar
*
str2
,
int
NbMax
);
int
NbMax
);
/*
/*
* routine (compatible qsort() ) de comparaision pour classement alphab�tique
* Routine (compatible with qsort ()) to sort by case insensitive alphabetical
* Analogue a strncmp() mais les nombres sont compar�s selon leur valeur num�rique
* order.
* et non pas par leur code ascii */
* Equivalent to strnicmp () but the numbers are compared by their integer
* value not by their ASCII code.
*/
int
StrNumICmp
(
const
wxChar
*
str1
,
int
StrNumICmp
(
const
wxChar
*
str1
,
const
wxChar
*
str2
);
const
wxChar
*
str2
);
/* routine (compatible qsort() ) de comparaison pour classement alphab�tique,
* avec lower case == upper case.
* Analogue a stricmp() mais les nombres sont compar�s selon leur valeur num�rique
* et non pas par leur code ascii */
int
StrLenNumICmp
(
const
wxChar
*
str1
,
int
StrLenNumICmp
(
const
wxChar
*
str1
,
const
wxChar
*
str2
,
const
wxChar
*
str2
,
int
NbMax
);
int
NbMax
);
/* routine (compatible qsort() ) de comparaison pour classement alphab�tique,
/* Compare string against wild card pattern using the usual rules.
* avec lower case == upper case.
* (Wildcards *,?).
* Analogue a stricmp() mais les nombres sont compar�s selon leur valeur num�rique
* The reference string is "pattern"
* et non pas par leur code ascii */
* If case_sensitive == TRUE (default), exact comparison
* Returns TRUE if pattern matched otherwise FALSE.
*/
bool
WildCompareString
(
const
wxString
&
pattern
,
bool
WildCompareString
(
const
wxString
&
pattern
,
const
wxString
&
string_to_tst
,
const
wxString
&
string_to_tst
,
bool
case_sensitive
=
TRUE
);
bool
case_sensitive
=
TRUE
);
/* compare 2 noms de composants, selon regles usuelles
/* Replaces decimal point with commas to generated international numbers.
* ( Jokers * , ? , autorises).
*/
* la chaine de reference est "pattern"
* si case_sensitive == TRUE (default), comparaison exacte
* retourne TRUE si match FALSE si differences */
char
*
to_point
(
char
*
Text
);
char
*
to_point
(
char
*
Text
);
/* convertit les , en . dans une chaine. utilise pour compenser la fct printf
* qui genere les flottants avec une virgule au lieu du point en mode international */
#endif
/* __INCLUDE__KICAD_STRING_H__ */
#endif
/* __INCLUDE__KICAD_STRING_H__ */
include/pcbcommon.h
View file @
d2eac37d
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#include "pcbstruct.h"
#include "pcbstruct.h"
#include "dlist.h"
#include "dlist.h"
#define L_MIN_DESSIN 1
/* Min width segments to allow draws with tickness */
#define L_MIN_DESSIN 1
/* Min width segments to allow draws with t
h
ickness */
class
DPAD
;
class
DPAD
;
class
BOARD_ITEM
;
class
BOARD_ITEM
;
...
@@ -44,8 +44,6 @@ extern int g_PadCUColor;
...
@@ -44,8 +44,6 @@ extern int g_PadCUColor;
extern
int
g_PadCMPColor
;
extern
int
g_PadCMPColor
;
/* variables generales */
extern
int
g_TimeOut
;
// Timer for automatic saving
extern
int
g_TimeOut
;
// Timer for automatic saving
extern
int
g_SaveTime
;
// Time for next saving
extern
int
g_SaveTime
;
// Time for next saving
...
@@ -59,7 +57,7 @@ extern DLIST<TRACK> g_CurrentTrackList;
...
@@ -59,7 +57,7 @@ extern DLIST<TRACK> g_CurrentTrackList;
#define g_FirstTrackSegment \
#define g_FirstTrackSegment \
g_CurrentTrackList.GetFirst() ///< first segment created
g_CurrentTrackList.GetFirst() ///< first segment created
extern
PCB_SCREEN
*
ScreenPcb
;
/* Ecran principal */
extern
PCB_SCREEN
*
ScreenPcb
;
extern
BOARD
*
g_ModuleEditor_Pcb
;
extern
BOARD
*
g_ModuleEditor_Pcb
;
/* Pad editing */
/* Pad editing */
...
...
include/pcbstruct.h
View file @
d2eac37d
...
@@ -9,50 +9,48 @@
...
@@ -9,50 +9,48 @@
#include "class_base_screen.h"
#include "class_base_screen.h"
#include "class_board_item.h"
#include "class_board_item.h"
// Definitions relatives aux lib
ari
ries
// Definitions relatives aux lib
ra
ries
#define ENTETE_LIBRAIRIE "PCBNEW-LibModule-V1"
#define ENTETE_LIBRAIRIE "PCBNEW-LibModule-V1"
#define ENTETE_LIBDOC "PCBNEW-LibDoc----V1"
#define ENTETE_LIBDOC "PCBNEW-LibDoc----V1"
#define L_ENTETE_LIB 18
#define L_ENTETE_LIB 18
#define EXT_DOC wxT( "mdc" )
#define EXT_DOC wxT( "mdc" )
/* Bits indicateurs du membre .Status, pour pistes, modules... */
#define FLAG1 (1 << 13)
/* flag for free local computations */
#define FLAG0 (1 << 12)
/* flag for free local computations */
#define BEGIN_ONPAD (1 << 11)
/* flag indicating a start of segment pad */
#define END_ONPAD (1 << 10)
/* flag indicating an end of segment pad */
#define BUSY (1 << 9)
/* flag indicating that the structure has
* already been edited, in some routines */
#define DELETED (1 << 8)
/* flag indicating structures erased nd set
* string "DELETED" */
#define NO_TRACE (1 << 7)
/* The element must not be displayed */
#define FLAG1 (1 << 13)
/* flag libre pour calculs locaux */
#define SURBRILL (1 << 5)
/* element highlighted */
#define FLAG0 (1 << 12)
/* flag libre pour calculs locaux */
#define DRAG (1 << 4)
/* segment in drag mode */
#define BEGIN_ONPAD (1 << 11)
/* flag indiquant un debut de segment sur pad */
#define EDIT (1 << 3)
/* element being edited */
#define END_ONPAD (1 << 10)
/* flag indiquant une fin de segment sur pad */
#define SEGM_FIXE (1 << 2)
/* segment fixed (not erase global) */
#define BUSY (1 << 9)
/* flag indiquant que la structure a deja
#define SEGM_AR (1 << 1)
/* segment marked for auto routing */
* ete examinee, dans certaines routines */
#define CHAIN (1 << 0)
/* mark segment */
#define DELETED (1 << 8)
/* Bit flag de Status pour structures effacee
* et mises en chaine "DELETED" */
#define NO_TRACE (1 << 7)
/* l'element ne doit pas etre affiche */
#define SURBRILL (1 << 5)
/* element en surbrillance */
#define DRAG (1 << 4)
/* segment en mode drag */
#define EDIT (1 << 3)
/* element en cours d'edition */
#define SEGM_FIXE (1 << 2)
/* segment FIXE ( pas d'effacement global ) */
#define SEGM_AR (1 << 1)
/* segment Auto_Route */
#define CHAIN (1 << 0)
/* segment marque */
/* Layer identification (layer number) */
/* Layer identification (layer number) */
#define FIRST_COPPER_LAYER 0
#define FIRST_COPPER_LAYER 0
#define COPPER_LAYER_N 0
#define COPPER_LAYER_N 0
#define LAYER_N_2 1
/* Numero layer 2 */
#define LAYER_N_2 1
#define LAYER_N_3 2
/* Numero layer 3 */
#define LAYER_N_3 2
#define LAYER_N_4 3
/* Numero layer 4 */
#define LAYER_N_4 3
#define LAYER_N_5 4
/* Numero layer 5 */
#define LAYER_N_5 4
#define LAYER_N_6 5
/* Numero layer 6 */
#define LAYER_N_6 5
#define LAYER_N_7 6
/* Numero layer 7 */
#define LAYER_N_7 6
#define LAYER_N_8 7
/* Numero layer 8 */
#define LAYER_N_8 7
#define LAYER_N_9 8
/* Numero layer 9 */
#define LAYER_N_9 8
#define LAYER_N_10 9
/* Numero layer 10 */
#define LAYER_N_10 9
#define LAYER_N_11 10
/* Numero layer 11 */
#define LAYER_N_11 10
#define LAYER_N_12 11
/* Numero layer 12 */
#define LAYER_N_12 11
#define LAYER_N_13 12
/* Numero layer 13 */
#define LAYER_N_13 12
#define LAYER_N_14 13
/* Numero layer 14 */
#define LAYER_N_14 13
#define LAYER_N_15 14
/* Numero layer 15 */
#define LAYER_N_15 14
#define LAYER_CMP_N 15
#define LAYER_CMP_N 15
#define CMP_N 15
#define CMP_N 15
#define LAST_COPPER_LAYER 15
#define LAST_COPPER_LAYER 15
...
@@ -78,9 +76,6 @@
...
@@ -78,9 +76,6 @@
#define LAYER_COUNT 32
#define LAYER_COUNT 32
/*************************************/
/* constantes de gestion des couches */
/*************************************/
#define CUIVRE_LAYER (1 << COPPER_LAYER_N) ///< bit mask for copper layer
#define CUIVRE_LAYER (1 << COPPER_LAYER_N) ///< bit mask for copper layer
#define LAYER_2 (1 << LAYER_N_2) ///< bit mask for layer 2
#define LAYER_2 (1 << LAYER_N_2) ///< bit mask for layer 2
#define LAYER_3 (1 << LAYER_N_3) ///< bit mask for layer 3
#define LAYER_3 (1 << LAYER_N_3) ///< bit mask for layer 3
...
@@ -115,15 +110,14 @@
...
@@ -115,15 +110,14 @@
#define LAST_NON_COPPER_LAYER EDGE_N
#define LAST_NON_COPPER_LAYER EDGE_N
// extra bits 0xE0000000
// extra bits 0xE0000000
/* Helpful global layers ma
ks
: */
/* Helpful global layers ma
sk
: */
#define ALL_LAYERS 0x1FFFFFFF // Pcbnew used 29 layers
#define ALL_LAYERS 0x1FFFFFFF // Pcbnew used 29 layers
#define FULL_LAYERS 0xFFFFFFFF // Gerbview used 32 layers
#define FULL_LAYERS 0xFFFFFFFF // Gerbview used 32 layers
#define ALL_NO_CU_LAYERS 0x1FFF0000
#define ALL_NO_CU_LAYERS 0x1FFF0000
#define ALL_CU_LAYERS 0x0000FFFF
#define ALL_CU_LAYERS 0x0000FFFF
#define INTERNAL_LAYERS 0x00007FFE
/* Bits layers internes */
#define INTERNAL_LAYERS 0x00007FFE
#define EXTERNAL_LAYERS 0x00008001
#define EXTERNAL_LAYERS 0x00008001
/* Forward declaration */
class
NETINFO_ITEM
;
class
NETINFO_ITEM
;
class
MARKER_PCB
;
class
MARKER_PCB
;
class
RATSNEST_ITEM
;
class
RATSNEST_ITEM
;
...
@@ -155,7 +149,7 @@ enum ELEMENTS_NUMBERS
...
@@ -155,7 +149,7 @@ enum ELEMENTS_NUMBERS
* tests whether a given integer is a valid layer index
* tests whether a given integer is a valid layer index
* @param aLayerIndex = Layer index to test
* @param aLayerIndex = Layer index to test
* @return true if aLayerIndex is a valid layer index
* @return true if aLayerIndex is a valid layer index
*/
*/
inline
bool
IsValidLayerIndex
(
int
aLayerIndex
)
inline
bool
IsValidLayerIndex
(
int
aLayerIndex
)
{
{
return
aLayerIndex
>=
0
&&
aLayerIndex
<
NB_LAYERS
;
return
aLayerIndex
>=
0
&&
aLayerIndex
<
NB_LAYERS
;
...
@@ -166,10 +160,11 @@ inline bool IsValidLayerIndex( int aLayerIndex )
...
@@ -166,10 +160,11 @@ inline bool IsValidLayerIndex( int aLayerIndex )
* tests whether an integer is a valid copper layer index
* tests whether an integer is a valid copper layer index
* @param aLayerIndex = Layer index to test
* @param aLayerIndex = Layer index to test
* @return true if aLayerIndex is a valid copper layer index
* @return true if aLayerIndex is a valid copper layer index
*/
*/
inline
bool
IsValidCopperLayerIndex
(
int
aLayerIndex
)
inline
bool
IsValidCopperLayerIndex
(
int
aLayerIndex
)
{
{
return
aLayerIndex
>=
FIRST_COPPER_LAYER
&&
aLayerIndex
<=
LAST_COPPER_LAYER
;
return
aLayerIndex
>=
FIRST_COPPER_LAYER
&&
aLayerIndex
<=
LAST_COPPER_LAYER
;
}
}
/**
/**
...
@@ -177,10 +172,11 @@ inline bool IsValidCopperLayerIndex( int aLayerIndex )
...
@@ -177,10 +172,11 @@ inline bool IsValidCopperLayerIndex( int aLayerIndex )
* tests whether an integer is a valid non copper layer index
* tests whether an integer is a valid non copper layer index
* @param aLayerIndex = Layer index to test
* @param aLayerIndex = Layer index to test
* @return true if aLayerIndex is a valid non copper layer index
* @return true if aLayerIndex is a valid non copper layer index
*/
*/
inline
bool
IsValidNonCopperLayerIndex
(
int
aLayerIndex
)
inline
bool
IsValidNonCopperLayerIndex
(
int
aLayerIndex
)
{
{
return
aLayerIndex
>=
FIRST_NO_COPPER_LAYER
&&
aLayerIndex
<=
LAST_NO_COPPER_LAYER
;
return
aLayerIndex
>=
FIRST_NO_COPPER_LAYER
&&
aLayerIndex
<=
LAST_NO_COPPER_LAYER
;
}
}
...
@@ -205,11 +201,6 @@ enum DisplayViaMode {
...
@@ -205,11 +201,6 @@ enum DisplayViaMode {
#include "class_module.h" // Class for the footprint
#include "class_module.h" // Class for the footprint
#include "class_netinfo.h" // Class for nets
#include "class_netinfo.h" // Class for nets
/***********************************/
/* Description des elements du PCB */
/***********************************/
#include "class_drawsegment.h"
#include "class_drawsegment.h"
#include "class_pcb_text.h"
#include "class_pcb_text.h"
#include "class_cotation.h"
#include "class_cotation.h"
...
@@ -219,15 +210,23 @@ enum DisplayViaMode {
...
@@ -219,15 +210,23 @@ enum DisplayViaMode {
#include "class_zone.h"
#include "class_zone.h"
/* Values for DISPLAY_OPTIONS.ShowTrackClearanceMode parameter option
/* Values for DISPLAY_OPTIONS.ShowTrackClearanceMode parameter option
* This parameter controls how to show tracks and vias clerance area
* This parameter controls how to show tracks and vias cle
a
rance area
*/
*/
enum
ShowTrackClearanceModeList
{
enum
ShowTrackClearanceModeList
{
DO_NOT_SHOW_CLEARANCE
=
0
,
// Do not show clearance areas
DO_NOT_SHOW_CLEARANCE
=
0
,
// Do not show clearance areas
SHOW_CLEARANCE_NEW_TRACKS
,
// Show clearance areas only for new track during track creation
SHOW_CLEARANCE_NEW_TRACKS
,
/* Show clearance areas only
SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS
,
/* Show clrearance areas only for new track during track creation,
* for new track during track
* and shows a via clearnce area at end of current new segment (guide to place a nev via
* creation */
SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS
,
/* Show clearance areas only
* for new track during track
* creation, and shows a via
* clearance area at end of
* current new segment (guide
* to place a new via
*/
SHOW_CLEARANCE_ALWAYS
/* Show Always clearance areas
* for track and vias
*/
*/
SHOW_CLEARANCE_ALWAYS
// Show Always clearance areas for track and vias
};
};
class
DISPLAY_OPTIONS
class
DISPLAY_OPTIONS
...
@@ -246,7 +245,9 @@ public:
...
@@ -246,7 +245,9 @@ public:
* 0 = do not show clearance
* 0 = do not show clearance
* 1 = show track clearance
* 1 = show track clearance
* 2 = show clearance + via area
* 2 = show clearance + via area
* (useful to know what clearance area is neede if we want to put a via on terminal track point)
* (useful to know what clearance area is
* needed if we want to put a via on
* terminal track point)
*/
*/
int
m_DisplayViaMode
;
/* 0 do not show via hole,
int
m_DisplayViaMode
;
/* 0 do not show via hole,
...
...
include/pyhandler.h
View file @
d2eac37d
...
@@ -64,7 +64,7 @@ protected:
...
@@ -64,7 +64,7 @@ protected:
public
:
public
:
// Singlet
t
on handling:
// Singleton handling:
static
PyHandler
*
GetInstance
();
static
PyHandler
*
GetInstance
();
~
PyHandler
();
~
PyHandler
();
...
...
include/trigo.h
View file @
d2eac37d
/****************************************************/
/*************/
/* TRIGO.H : Tables de fonctions trigonometriques */
/* trigo.h */
/* utilisees dans les rotations d'axes */
/*************/
/****************************************************/
#ifndef TRIGO_H
#ifndef TRIGO_H
#define TRIGO_H
#define TRIGO_H
/* Prototype des fonctions de trigo.cpp */
void
RotatePoint
(
int
*
pX
,
int
*
pY
,
int
angle
);
void
RotatePoint
(
int
*
pX
,
int
*
pY
,
int
angle
);
void
RotatePoint
(
int
*
pX
,
int
*
pY
,
int
cx
,
int
cy
,
int
angle
);
void
RotatePoint
(
int
*
pX
,
int
*
pY
,
int
cx
,
int
cy
,
int
angle
);
void
RotatePoint
(
wxPoint
*
point
,
int
angle
);
void
RotatePoint
(
wxPoint
*
point
,
int
angle
);
...
@@ -15,11 +13,11 @@ void RotatePoint( wxPoint *point, const wxPoint & centre, int angle );
...
@@ -15,11 +13,11 @@ void RotatePoint( wxPoint *point, const wxPoint & centre, int angle );
void
RotatePoint
(
double
*
pX
,
double
*
pY
,
int
angle
);
void
RotatePoint
(
double
*
pX
,
double
*
pY
,
int
angle
);
void
RotatePoint
(
double
*
pX
,
double
*
pY
,
double
cx
,
double
cy
,
int
angle
);
void
RotatePoint
(
double
*
pX
,
double
*
pY
,
double
cx
,
double
cy
,
int
angle
);
/*
* function ArcTangente
/*
Return the arc tangent of 0.1 degrees coord vector dx, dy
Retourne l'arc tangente en 0.1 degres du vecteur de coord dx, dy
* between -1800 and 1800
entre -1800 et 1800
* Equivalent to atan2 (but faster for calculations if
Analogue a atan2 ( mais plus rapide pour les caculs si
* the angle is 0 to -1800, or + - 900
l'angle est souvent 0, -1800, ou +- 900
*/
*/
int
ArcTangente
(
int
dy
,
int
dx
);
int
ArcTangente
(
int
dy
,
int
dx
);
bool
DistanceTest
(
int
seuil
,
int
dx
,
int
dy
,
int
spot_cX
,
int
spot_cY
);
bool
DistanceTest
(
int
seuil
,
int
dx
,
int
dy
,
int
spot_cX
,
int
spot_cY
);
...
@@ -33,20 +31,21 @@ bool DistanceTest( int seuil, int dx, int dy, int spot_cX, int spot_cY );
...
@@ -33,20 +31,21 @@ bool DistanceTest( int seuil, int dx, int dy, int spot_cX, int spot_cY );
* @param aEnd is the second end-point of the line segment
* @param aEnd is the second end-point of the line segment
* @param aDist = maximum distance for hit
* @param aDist = maximum distance for hit
*/
*/
bool
TestSegmentHit
(
wxPoint
aRefPoint
,
wxPoint
aStart
,
wxPoint
aEnd
,
int
aDist
);
bool
TestSegmentHit
(
wxPoint
aRefPoint
,
wxPoint
aStart
,
wxPoint
aEnd
,
int
aDist
);
/*******************/
/*******************/
/* Macro NEW_COORD */
/* Macro NEW_COORD */
/*******************/
/*******************/
/*
Macro de calcul de novelles coordonnees par rotation d'axe
/*
Calculate coordinates to rotate around an axis
coord : xrot = y*sin + x*
cos
* coord: xrot = y + x * sin *
cos
yrot = y*cos - x*sin
* yrot = y * cos - sin * x
soit : xrot = (y*tg + x)*
cos
* either: xrot = (y + x * tg) *
cos
yrot = (y - x*tg)*
cos
* yrot = (y - x * tg) *
cos
*
les coeffs COS sont tabules en fct de tg sur 16 valeur
s.
* Cosine coefficients are loaded from a trigometric table by 16 bit value
s.
*/
*/
#define NEW_COORD( x0, y0 ) \
#define NEW_COORD( x0, y0 ) \
do { \
do { \
int itmp; \
int itmp; \
...
...
include/worksheet.h
View file @
d2eac37d
/***************************************************/
/***************/
/* WORKSHEET.H: constantes pour trace du cartouche */
/* worksheet.h */
/***************************************************/
/***************/
/****************************/
/* Description du cartouche */
/****************************/
/* Values are in 1/1000 inch */
/* Values are in 1/1000 inch */
#ifndef __WORKSHEET_H__
#ifndef __WORKSHEET_H__
#define __WORKSHEET_H__
#define __WORKSHEET_H__
#define GRID_REF_W 70
/* h
auteur de la bande de reference grille
*/
#define GRID_REF_W 70
/* h
eight of the band reference grid
*/
#define SIZETEXT 60
/*
Dimension des textes du cartouch
e */
#define SIZETEXT 60
/*
worksheet text siz
e */
#define SIZETEXT_REF 50
/*
Dimension des lettres du marquage des reperes
*/
#define SIZETEXT_REF 50
/*
worksheet frame reference text size
*/
#define PAS_REF 2000
/*
pas des marquages de reference des reperes
*/
#define PAS_REF 2000
/*
no reference markings on worksheet frame
*/
#define TEXT_VTAB_HEIGHT SIZETEXT * 2
#define TEXT_VTAB_HEIGHT SIZETEXT * 2
#if defined(KICAD_GOST)
#if defined(KICAD_GOST)
/* Shtamp */
#define STAMP_OX 185 * 10000 / 254
#define STAMP_OX 185 * 10000 / 254
#define STAMP_OY 55 * 10000 / 254
#define STAMP_OY 55 * 10000 / 254
...
@@ -69,8 +64,8 @@
...
@@ -69,8 +64,8 @@
#define STAMP_25 25 * 10000 / 254
#define STAMP_25 25 * 10000 / 254
#endif
#endif
/*
Les coord ci dessous sont relatives au coin bas - droit de la feuille, et
/*
The coordinates below are relative to the bottom right corner of page and
*
seront soustraires de cette origine
*
will be subtracted from this origin.
*/
*/
#define BLOCK_OX 4200
#define BLOCK_OX 4200
#define BLOCK_KICAD_VERSION_X BLOCK_OX - SIZETEXT
#define BLOCK_KICAD_VERSION_X BLOCK_OX - SIZETEXT
...
@@ -100,15 +95,15 @@
...
@@ -100,15 +95,15 @@
struct
Ki_WorkSheetData
struct
Ki_WorkSheetData
{
{
public
:
public
:
int
m_Type
;
/* nombre permettant de reconnaitre la description */
int
m_Type
;
Ki_WorkSheetData
*
Pnext
;
Ki_WorkSheetData
*
Pnext
;
int
m_Posx
,
m_Posy
;
/* position de l'element ou point de depart du segment */
int
m_Posx
,
m_Posy
;
int
m_Endx
,
m_Endy
;
/* extremite d'un element type segment ou cadre */
int
m_Endx
,
m_Endy
;
const
wxChar
*
m_Legende
;
/* Pour m_Textes: texte a afficher avant le texte lui meme */
const
wxChar
*
m_Legende
;
const
wxChar
*
m_Text
;
/* Pour m_Textes:pointeur sur le texte a afficher */
const
wxChar
*
m_Text
;
};
};
/*
Type des descriptions Ki_WorkSheetData
*/
/*
Work sheet structure type definitions.
*/
enum
TypeKi_WorkSheetData
{
enum
TypeKi_WorkSheetData
{
WS_DATE
,
WS_DATE
,
WS_REV
,
WS_REV
,
...
...
include/wxBasePcbFrame.h
View file @
d2eac37d
...
@@ -56,7 +56,8 @@ public:
...
@@ -56,7 +56,8 @@ public:
int
m_DisplayModEdge
;
// How show module drawings
int
m_DisplayModEdge
;
// How show module drawings
int
m_DisplayModText
;
// How show module texts
int
m_DisplayModText
;
// How show module texts
bool
m_DisplayPcbTrackFill
;
/* FALSE : tracks are show in sketch mode, TRUE = filled */
bool
m_DisplayPcbTrackFill
;
/* FALSE : tracks are show in sketch mode,
* TRUE = filled */
int
m_UserGridUnits
;
int
m_UserGridUnits
;
wxRealPoint
m_UserGridSize
;
wxRealPoint
m_UserGridSize
;
...
@@ -96,15 +97,21 @@ public:
...
@@ -96,15 +97,21 @@ public:
virtual
void
RedrawActiveWindow
(
wxDC
*
DC
,
bool
EraseBg
)
{
}
virtual
void
RedrawActiveWindow
(
wxDC
*
DC
,
bool
EraseBg
)
{
}
virtual
void
ReCreateHToolbar
()
=
0
;
virtual
void
ReCreateHToolbar
()
=
0
;
virtual
void
ReCreateVToolbar
()
=
0
;
virtual
void
ReCreateVToolbar
()
=
0
;
virtual
void
OnLeftClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
)
=
0
;
virtual
void
OnLeftClick
(
wxDC
*
DC
,
virtual
void
OnLeftDClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
)
=
0
;
const
wxPoint
&
MousePos
)
=
0
;
virtual
bool
OnRightClick
(
const
wxPoint
&
MousePos
,
wxMenu
*
PopMenu
)
=
0
;
virtual
void
OnLeftDClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
)
=
0
;
virtual
bool
OnRightClick
(
const
wxPoint
&
MousePos
,
wxMenu
*
PopMenu
)
=
0
;
virtual
void
ReCreateMenuBar
();
virtual
void
ReCreateMenuBar
();
virtual
void
SetToolID
(
int
id
,
int
new_cursor_id
,
virtual
void
SetToolID
(
int
id
,
int
new_cursor_id
,
const
wxString
&
title
);
const
wxString
&
title
);
virtual
void
UpdateStatusBar
();
virtual
void
UpdateStatusBar
();
PCB_SCREEN
*
GetScreen
()
const
{
return
(
PCB_SCREEN
*
)
WinEDA_DrawFrame
::
GetBaseScreen
();
}
PCB_SCREEN
*
GetScreen
()
const
{
return
(
PCB_SCREEN
*
)
WinEDA_DrawFrame
::
GetBaseScreen
();
}
BASE_SCREEN
*
GetBaseScreen
()
const
;
BASE_SCREEN
*
GetBaseScreen
()
const
;
...
@@ -114,11 +121,13 @@ public:
...
@@ -114,11 +121,13 @@ public:
public
:
public
:
// Read/write f
o
nctions:
// Read/write f
u
nctions:
EDA_BaseStruct
*
ReadDrawSegmentDescr
(
FILE
*
File
,
int
*
LineNum
);
EDA_BaseStruct
*
ReadDrawSegmentDescr
(
FILE
*
File
,
int
*
LineNum
);
int
ReadListeSegmentDescr
(
FILE
*
File
,
int
ReadListeSegmentDescr
(
FILE
*
File
,
TRACK
*
PtSegm
,
int
StructType
,
TRACK
*
PtSegm
,
int
*
LineNum
,
int
NumSegm
);
int
StructType
,
int
*
LineNum
,
int
NumSegm
);
int
ReadSetup
(
FILE
*
File
,
int
*
LineNum
);
int
ReadSetup
(
FILE
*
File
,
int
*
LineNum
);
int
ReadGeneralDescrPcb
(
FILE
*
File
,
int
*
LineNum
);
int
ReadGeneralDescrPcb
(
FILE
*
File
,
int
*
LineNum
);
...
@@ -128,15 +137,16 @@ public:
...
@@ -128,15 +137,16 @@ public:
* Function PcbGeneralLocateAndDisplay
* Function PcbGeneralLocateAndDisplay
* searches for an item under the mouse cursor.
* searches for an item under the mouse cursor.
* Items are searched first on the current working layer.
* Items are searched first on the current working layer.
* If nothing found, an item will be searched without layer restriction. If
* If nothing found, an item will be searched without layer restriction.
* more than one item is found meeting the current working layer criterion, then
* If more than one item is found meeting the current working layer
* a popup menu is shown which allows the user to pick which item he/she is
* criterion, then a popup menu is shown which allows the user to pick
* interested in. Once an item is chosen, then it is make the "current item"
* which item he/she is interested in. Once an item is chosen, then it
* and the status window is updated to reflect this.
* is make the "current item" and the status window is updated to reflect
* this.
*
*
* @param aHotKeyCode The hotkey which relates to the caller and determines
the
* @param aHotKeyCode The hotkey which relates to the caller and determines
*
type of search to be performed. If zero, then the mouse tools will be
*
the type of search to be performed. If zero, then
* tested instead.
*
the mouse tools will be
tested instead.
*/
*/
BOARD_ITEM
*
PcbGeneralLocateAndDisplay
(
int
aHotKeyCode
=
0
);
BOARD_ITEM
*
PcbGeneralLocateAndDisplay
(
int
aHotKeyCode
=
0
);
...
@@ -150,53 +160,65 @@ public:
...
@@ -150,53 +160,65 @@ public:
* of "selecting" an item more formal, and to indivisibly tie the operation
* of "selecting" an item more formal, and to indivisibly tie the operation
* of selecting an item to displaying it using BOARD_ITEM::Display_Infos().
* of selecting an item to displaying it using BOARD_ITEM::Display_Infos().
* @param aItem The BOARD_ITEM to make the selected item or NULL if none.
* @param aItem The BOARD_ITEM to make the selected item or NULL if none.
* @param aDisplayInfo = true to display item info, false if not (default = true)
* @param aDisplayInfo = true to display item info, false if not (default =
*true)
*/
*/
void
SetCurItem
(
BOARD_ITEM
*
aItem
,
bool
aDisplayInfo
=
true
);
void
SetCurItem
(
BOARD_ITEM
*
aItem
,
bool
aDisplayInfo
=
true
);
BOARD_ITEM
*
GetCurItem
();
BOARD_ITEM
*
GetCurItem
();
/**
/**
* Function GetCollectorsGuide
* Function GetCollectorsGuide
* @return GENERAL_COLLECTORS_GUIDE - that considers the global configuration options.
* @return GENERAL_COLLECTORS_GUIDE - that considers the global
*configuration options.
*/
*/
GENERAL_COLLECTORS_GUIDE
GetCollectorsGuide
();
GENERAL_COLLECTORS_GUIDE
GetCollectorsGuide
();
/**
/**
* Function CursorGoto
* Function CursorGoto
* positions the cursor at a given coordinate and reframes the drawing if the
* positions the cursor at a given coordinate and reframes the drawing if
*the
* requested point is out of view.
* requested point is out of view.
* @param aPos The point to go to.
* @param aPos The point to go to.
*/
*/
void
CursorGoto
(
const
wxPoint
&
aPos
);
void
CursorGoto
(
const
wxPoint
&
aPos
);
/* Place un repere sur l'ecran au point de coordonnees PCB pos */
void
place_marqueur
(
wxDC
*
DC
,
void
place_marqueur
(
wxDC
*
DC
,
const
wxPoint
&
pos
,
char
*
pt_bitmap
,
const
wxPoint
&
pos
,
int
DrawMode
,
int
color
,
int
type
);
char
*
pt_bitmap
,
int
DrawMode
,
int
color
,
int
type
);
// Gestion des modules
MODULE
*
Copie_Module
(
MODULE
*
module
);
MODULE
*
Copie_Module
(
MODULE
*
module
);
/** Function Save_Module_In_Library
/** Function Save_Module_In_Library
* Save in an existing library a given footprint
* Save in an existing library a given footprint
* @param aLibName = name of the library to use
* @param aLibName = name of the library to use
* @param aModule = the given footprint
* @param aModule = the given footprint
* @param aOverwrite = true to overwrite an existing footprint, false to abort an existing footprint is found
* @param aOverwrite = true to overwrite an existing footprint, false to
* @param aDisplayDialog = true to display a dialog to enter or confirm the footprint name
* abort an existing footprint is found
* @param aDisplayDialog = true to display a dialog to enter or confirm the
* footprint name
* @param aCreateDocFile = true to creates the associated doc file
* @param aCreateDocFile = true to creates the associated doc file
* @return : 1 if OK,0 if abort
* @return : 1 if OK,0 if abort
*/
*/
int
Save_Module_In_Library
(
const
wxString
&
aLibName
,
int
Save_Module_In_Library
(
const
wxString
&
aLibName
,
MODULE
*
aModule
,
bool
aOverwrite
,
MODULE
*
aModule
,
bool
aDisplayDialog
,
bool
aCreateDocFile
);
bool
aOverwrite
,
bool
aDisplayDialog
,
bool
aCreateDocFile
);
void
Archive_Modules
(
const
wxString
&
LibName
,
bool
NewModulesOnly
);
void
Archive_Modules
(
const
wxString
&
LibName
,
bool
NewModulesOnly
);
MODULE
*
Select_1_Module_From_BOARD
(
BOARD
*
Pcb
);
MODULE
*
Select_1_Module_From_BOARD
(
BOARD
*
Pcb
);
MODULE
*
GetModuleByName
();
MODULE
*
GetModuleByName
();
// Modules (footprints)
// Modules (footprints)
MODULE
*
Create_1_Module
(
wxDC
*
DC
,
const
wxString
&
module_name
);
MODULE
*
Create_1_Module
(
wxDC
*
DC
,
const
wxString
&
module_name
);
void
Edit_Module
(
MODULE
*
module
,
wxDC
*
DC
);
void
Edit_Module
(
MODULE
*
module
,
wxDC
*
DC
);
void
Rotate_Module
(
wxDC
*
DC
,
void
Rotate_Module
(
wxDC
*
DC
,
MODULE
*
module
,
MODULE
*
module
,
...
@@ -210,13 +232,16 @@ public:
...
@@ -210,13 +232,16 @@ public:
void
RotateTextModule
(
TEXTE_MODULE
*
Text
,
wxDC
*
DC
);
void
RotateTextModule
(
TEXTE_MODULE
*
Text
,
wxDC
*
DC
);
void
DeleteTextModule
(
TEXTE_MODULE
*
Text
);
void
DeleteTextModule
(
TEXTE_MODULE
*
Text
);
void
PlaceTexteModule
(
TEXTE_MODULE
*
Text
,
wxDC
*
DC
);
void
PlaceTexteModule
(
TEXTE_MODULE
*
Text
,
wxDC
*
DC
);
void
StartMoveTexteModule
(
TEXTE_MODULE
*
Text
,
wxDC
*
DC
);
void
StartMoveTexteModule
(
TEXTE_MODULE
*
Text
,
wxDC
*
DC
);
TEXTE_MODULE
*
CreateTextModule
(
MODULE
*
Module
,
wxDC
*
DC
);
TEXTE_MODULE
*
CreateTextModule
(
MODULE
*
Module
,
wxDC
*
DC
);
void
InstallPadOptionsFrame
(
D_PAD
*
pad
,
wxDC
*
DC
,
const
wxPoint
&
pos
);
void
InstallPadOptionsFrame
(
D_PAD
*
pad
,
void
InstallTextModOptionsFrame
(
TEXTE_MODULE
*
TextMod
,
wxDC
*
DC
);
wxDC
*
DC
,
const
wxPoint
&
pos
);
void
InstallTextModOptionsFrame
(
TEXTE_MODULE
*
TextMod
,
wxDC
*
DC
);
// Pads sur modules
void
AddPad
(
MODULE
*
Module
,
bool
draw
);
void
AddPad
(
MODULE
*
Module
,
bool
draw
);
void
DeletePad
(
D_PAD
*
Pad
);
void
DeletePad
(
D_PAD
*
Pad
);
void
StartMovePad
(
D_PAD
*
Pad
,
wxDC
*
DC
);
void
StartMovePad
(
D_PAD
*
Pad
,
wxDC
*
DC
);
...
@@ -224,7 +249,8 @@ public:
...
@@ -224,7 +249,8 @@ public:
void
PlacePad
(
D_PAD
*
Pad
,
wxDC
*
DC
);
void
PlacePad
(
D_PAD
*
Pad
,
wxDC
*
DC
);
void
Export_Pad_Settings
(
D_PAD
*
aPad
);
void
Export_Pad_Settings
(
D_PAD
*
aPad
);
void
Import_Pad_Settings
(
D_PAD
*
aPad
,
bool
aDraw
);
void
Import_Pad_Settings
(
D_PAD
*
aPad
,
bool
aDraw
);
void
Global_Import_Pad_Settings
(
D_PAD
*
aPad
,
bool
aDraw
);
void
Global_Import_Pad_Settings
(
D_PAD
*
aPad
,
bool
aDraw
);
// loading footprints
// loading footprints
...
@@ -232,8 +258,9 @@ public:
...
@@ -232,8 +258,9 @@ public:
/** function Get_Librairie_Module
/** function Get_Librairie_Module
*
*
* Read active libraries or one library to find and load a given module
* Read active libraries or one library to find and load a given module
* If found the lodule is linked to the tail of linked list of modules
* If found the module is linked to the tail of linked list of modules
* @param aLibrary: the full filename of the library to read. If empty, all active libraries are read
* @param aLibrary: the full filename of the library to read. If empty,
* all active libraries are read
* @param aModuleName = module name to load
* @param aModuleName = module name to load
* @param aDisplayMessageError = true to display an error message if any.
* @param aDisplayMessageError = true to display an error message if any.
* @return a MODULE * pointer to the new module, or NULL
* @return a MODULE * pointer to the new module, or NULL
...
@@ -245,12 +272,16 @@ public:
...
@@ -245,12 +272,16 @@ public:
/** Function Select_1_Module_From_List
/** Function Select_1_Module_From_List
* Display a list of modules found in active libraries or a given library
* Display a list of modules found in active libraries or a given library
* @param aLibraryFullFilename = library to list (if aLibraryFullFilename == void, list all modules)
* @param aLibraryFullFilename = library to list (if aLibraryFullFilename
* @param aMask = Display filter (wildcart)( Mask = wxEmptyString if not used )
* == void, list all modules)
* @param aKeyWord = keyword list, to display a filtered list of module having one (or more) of these keyworks in their keywork list
* @param aMask = Display filter (wildcart)( Mask = wxEmptyString if not
* ( aKeyWord = wxEmptyString if not used )
* used )
* @param aKeyWord = keyword list, to display a filtered list of module
* having one (or more) of these keywords in their
* keyword list ( aKeyWord = wxEmptyString if not used )
*
*
* @return wxEmptyString if abort or fails, or the selected module name if Ok
* @return wxEmptyString if abort or fails, or the selected module name if
* Ok
*/
*/
wxString
Select_1_Module_From_List
(
wxString
Select_1_Module_From_List
(
WinEDA_DrawFrame
*
active_window
,
const
wxString
&
aLibraryFullFilename
,
WinEDA_DrawFrame
*
active_window
,
const
wxString
&
aLibraryFullFilename
,
...
@@ -259,7 +290,7 @@ public:
...
@@ -259,7 +290,7 @@ public:
MODULE
*
Load_Module_From_Library
(
const
wxString
&
library
,
wxDC
*
DC
);
MODULE
*
Load_Module_From_Library
(
const
wxString
&
library
,
wxDC
*
DC
);
// ratsnest functions
// ratsnest functions
void
Compile_Ratsnest
(
wxDC
*
DC
,
bool
affiche
);
/* Recalcul complet du chevelu */
void
Compile_Ratsnest
(
wxDC
*
DC
,
bool
affiche
);
int
Test_1_Net_Ratsnest
(
wxDC
*
DC
,
int
net_code
);
int
Test_1_Net_Ratsnest
(
wxDC
*
DC
,
int
net_code
);
void
build_ratsnest_module
(
wxDC
*
DC
,
MODULE
*
Module
);
void
build_ratsnest_module
(
wxDC
*
DC
,
MODULE
*
Module
);
void
trace_ratsnest_module
(
wxDC
*
DC
);
void
trace_ratsnest_module
(
wxDC
*
DC
);
...
@@ -278,28 +309,42 @@ public:
...
@@ -278,28 +309,42 @@ public:
/* Plotting functions:
/* Plotting functions:
*/
*/
void
ToPlotter
(
wxCommandEvent
&
event
);
void
ToPlotter
(
wxCommandEvent
&
event
);
void
Genere_GERBER
(
const
wxString
&
FullFileName
,
int
Layer
,
void
Genere_GERBER
(
const
wxString
&
FullFileName
,
bool
PlotOriginIsAuxAxis
,
GRTraceMode
trace_mode
);
int
Layer
,
void
Genere_HPGL
(
const
wxString
&
FullFileName
,
int
Layer
,
GRTraceMode
trace_mode
);
bool
PlotOriginIsAuxAxis
,
GRTraceMode
trace_mode
);
void
Genere_HPGL
(
const
wxString
&
FullFileName
,
int
Layer
,
GRTraceMode
trace_mode
);
void
Genere_PS
(
const
wxString
&
FullFileName
,
void
Genere_PS
(
const
wxString
&
FullFileName
,
int
Layer
,
int
Layer
,
bool
useA4
,
bool
useA4
,
GRTraceMode
trace_mode
);
GRTraceMode
trace_mode
);
void
Genere_DXF
(
const
wxString
&
FullFileName
,
int
Layer
,
GRTraceMode
trace_mode
);
void
Genere_DXF
(
const
wxString
&
FullFileName
,
void
Plot_Layer
(
PLOTTER
*
plotter
,
int
Layer
,
GRTraceMode
trace_mode
);
int
Layer
,
GRTraceMode
trace_mode
);
void
Plot_Layer
(
PLOTTER
*
plotter
,
int
Layer
,
GRTraceMode
trace_mode
);
void
Plot_Standard_Layer
(
PLOTTER
*
aPlotter
,
int
aLayerMask
,
void
Plot_Standard_Layer
(
PLOTTER
*
aPlotter
,
int
aLayerMask
,
bool
aPlotVia
,
GRTraceMode
aPlotMode
);
bool
aPlotVia
,
GRTraceMode
aPlotMode
);
void
Plot_Serigraphie
(
PLOTTER
*
plotter
,
int
masque_layer
,
GRTraceMode
trace_mode
);
void
Plot_Serigraphie
(
PLOTTER
*
plotter
,
int
masque_layer
,
GRTraceMode
trace_mode
);
/** function PlotDrillMark
/** function PlotDrillMark
* Draw a drill mark for pads and vias.
* Draw a drill mark for pads and vias.
* Must be called after all drawings, because it
* Must be called after all drawings, because it
* redraw the drill mark on a pad or via, as a negative (i.e. white) shape in FILLED plot mode
* redraw the drill mark on a pad or via, as a negative (i.e. white) shape
* in FILLED plot mode
* @param aPlotter = the PLOTTER
* @param aPlotter = the PLOTTER
* @param aTraceMode = the mode of plot (FILLED, SKETCH)
* @param aTraceMode = the mode of plot (FILLED, SKETCH)
* @param aSmallDrillShape = true to plot a small drill shape, false to plot the actual drill shape
* @param aSmallDrillShape = true to plot a small drill shape, false to
* plot the actual drill shape
*/
*/
void
PlotDrillMark
(
PLOTTER
*
aPlotter
,
GRTraceMode
aTraceMode
,
bool
aSmallDrillShape
);
void
PlotDrillMark
(
PLOTTER
*
aPlotter
,
GRTraceMode
aTraceMode
,
bool
aSmallDrillShape
);
/* Functions relative to Undo/redo commands:
/* Functions relative to Undo/redo commands:
*/
*/
...
@@ -314,7 +359,8 @@ public:
...
@@ -314,7 +359,8 @@ public:
*/
*/
virtual
void
SaveCopyInUndoList
(
BOARD_ITEM
*
aItemToCopy
,
virtual
void
SaveCopyInUndoList
(
BOARD_ITEM
*
aItemToCopy
,
UndoRedoOpType
aTypeCommand
,
UndoRedoOpType
aTypeCommand
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
)
=
0
;
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
)
=
0
;
/** Function SaveCopyInUndoList (virtual pure, overloaded).
/** Function SaveCopyInUndoList (virtual pure, overloaded).
* Creates a new entry in undo list of commands.
* Creates a new entry in undo list of commands.
...
@@ -326,7 +372,8 @@ public:
...
@@ -326,7 +372,8 @@ public:
*/
*/
virtual
void
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
virtual
void
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
UndoRedoOpType
aTypeCommand
,
UndoRedoOpType
aTypeCommand
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
)
=
0
;
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
)
=
0
;
// layerhandling:
// layerhandling:
...
@@ -337,7 +384,6 @@ public:
...
@@ -337,7 +384,6 @@ public:
void
SelectLayerPair
();
void
SelectLayerPair
();
virtual
void
SwitchLayer
(
wxDC
*
DC
,
int
layer
);
virtual
void
SwitchLayer
(
wxDC
*
DC
,
int
layer
);
// divers
void
InstallGridFrame
(
const
wxPoint
&
pos
);
void
InstallGridFrame
(
const
wxPoint
&
pos
);
/**
/**
...
...
include/wxPcbStruct.h
View file @
d2eac37d
...
@@ -40,22 +40,28 @@ class GENERAL_COLLECTORS_GUIDE;
...
@@ -40,22 +40,28 @@ class GENERAL_COLLECTORS_GUIDE;
/**
/**
* @info see also class WinEDA_BasePcbFrame: Basic class for pcbnew and
gerbview
* @info see also class WinEDA_BasePcbFrame: Basic class for pcbnew and
*/
*gerbview
*/
/*****************************************************/
/*****************************************************/
/* class WinEDA_PcbFrame: the main frame for Pcbnew */
/* class WinEDA_PcbFrame: the main frame for Pcbnew */
/*****************************************************/
/*****************************************************/
class
WinEDA_PcbFrame
:
public
WinEDA_BasePcbFrame
class
WinEDA_PcbFrame
:
public
WinEDA_BasePcbFrame
{
{
public
:
public
:
WinEDAChoiceBox
*
m_SelLayerBox
;
// a combo box to display and select active layer
WinEDAChoiceBox
*
m_SelLayerBox
;
// a combo box to display and
WinEDAChoiceBox
*
m_SelTrackWidthBox
;
// a combo box to display and select current track width
// select active layer
WinEDAChoiceBox
*
m_SelViaSizeBox
;
// a combo box to display and select current via diameter
WinEDAChoiceBox
*
m_SelTrackWidthBox
;
// a combo box to display and
wxTextCtrl
*
m_ClearanceBox
;
// a text ctrl to display the current tracks and vias clearance
// select current track width
wxTextCtrl
*
m_NetClassSelectedBox
;
// a text ctrl to display the current NetClass
WinEDAChoiceBox
*
m_SelViaSizeBox
;
// a combo box to display and
// select current via diameter
wxTextCtrl
*
m_ClearanceBox
;
// a text ctrl to display the
// current tracks and vias
// clearance
wxTextCtrl
*
m_NetClassSelectedBox
;
// a text ctrl to display the
// current NetClass
bool
m_TrackAndViasSizesList_Changed
;
bool
m_TrackAndViasSizesList_Changed
;
bool
m_show_microwave_tools
;
bool
m_show_microwave_tools
;
...
@@ -87,6 +93,7 @@ public:
...
@@ -87,6 +93,7 @@ public:
void
InstallConfigFrame
(
const
wxPoint
&
pos
);
void
InstallConfigFrame
(
const
wxPoint
&
pos
);
void
Process_Config
(
wxCommandEvent
&
event
);
void
Process_Config
(
wxCommandEvent
&
event
);
void
Update_config
(
wxWindow
*
displayframe
);
void
Update_config
(
wxWindow
*
displayframe
);
/** Function Read_Config
/** Function Read_Config
* Read the project configuration file
* Read the project configuration file
* @param projectFileName = the config filename
* @param projectFileName = the config filename
...
@@ -96,7 +103,9 @@ public:
...
@@ -96,7 +103,9 @@ public:
*/
*/
bool
Read_Config
(
const
wxString
&
projectFileName
);
bool
Read_Config
(
const
wxString
&
projectFileName
);
void
OnHotKey
(
wxDC
*
DC
,
int
hotkey
,
EDA_BaseStruct
*
DrawStruct
);
void
OnHotKey
(
wxDC
*
DC
,
int
hotkey
,
EDA_BaseStruct
*
DrawStruct
);
bool
OnHotkeyDeleteItem
(
wxDC
*
DC
,
EDA_BaseStruct
*
DrawStruct
);
bool
OnHotkeyDeleteItem
(
wxDC
*
DC
,
EDA_BaseStruct
*
DrawStruct
);
void
OnCloseWindow
(
wxCloseEvent
&
Event
);
void
OnCloseWindow
(
wxCloseEvent
&
Event
);
...
@@ -124,6 +133,7 @@ public:
...
@@ -124,6 +133,7 @@ public:
void
ShowDesignRulesEditor
(
wxCommandEvent
&
event
);
void
ShowDesignRulesEditor
(
wxCommandEvent
&
event
);
/* toolbars update UI functions: */
/* toolbars update UI functions: */
/**
/**
* Function UpdateToolbarLayerInfo
* Function UpdateToolbarLayerInfo
* updates the currently selected layer in the layer listbox and
* updates the currently selected layer in the layer listbox and
...
@@ -138,14 +148,14 @@ public:
...
@@ -138,14 +148,14 @@ public:
* update the displayed values on auxiliary horizontal toolbar
* update the displayed values on auxiliary horizontal toolbar
* (track width, via sizes, clearance ...
* (track width, via sizes, clearance ...
*/
*/
void
AuxiliaryToolBar_Update_UI
(
);
void
AuxiliaryToolBar_Update_UI
(
);
/**
/**
* Function AuxiliaryToolBar_DesignRules_Update_UI
* Function AuxiliaryToolBar_DesignRules_Update_UI
* update the displayed values: track width, via sizes, clearance
* update the displayed values: track width, via sizes, clearance
* used when a ne netclass is selected
* used when a ne
w
netclass is selected
*/
*/
void
AuxiliaryToolBar_DesignRules_Update_UI
(
);
void
AuxiliaryToolBar_DesignRules_Update_UI
(
);
/* mouse functions events: */
/* mouse functions events: */
void
OnLeftClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
);
void
OnLeftClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
);
...
@@ -153,7 +163,8 @@ public:
...
@@ -153,7 +163,8 @@ public:
/**
/**
* Function OnRightClick
* Function OnRightClick
* populates a popup menu with the choices appropriate for the current context.
* populates a popup menu with the choices appropriate for the current
*context.
* The caller will add the ZOOM menu choices afterwards.
* The caller will add the ZOOM menu choices afterwards.
* @param aMousePos The current mouse position
* @param aMousePos The current mouse position
* @param aPopMenu The menu to add to.
* @param aPopMenu The menu to add to.
...
@@ -168,51 +179,65 @@ public:
...
@@ -168,51 +179,65 @@ public:
* add a picker to handle aItemToCopy
* add a picker to handle aItemToCopy
* @param aItemToCopy = the board item modified by the command to undo
* @param aItemToCopy = the board item modified by the command to undo
* @param aTypeCommand = command type (see enum UndoRedoOpType)
* @param aTypeCommand = command type (see enum UndoRedoOpType)
* @param aTransformPoint = the reference point of the transformation, for commands like move
* @param aTransformPoint = the reference point of the transformation, for
*commands like move
*/
*/
virtual
void
SaveCopyInUndoList
(
BOARD_ITEM
*
aItemToCopy
,
UndoRedoOpType
aTypeCommand
,
virtual
void
SaveCopyInUndoList
(
BOARD_ITEM
*
aItemToCopy
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
);
UndoRedoOpType
aTypeCommand
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
);
/** Function SaveCopyInUndoList (overloaded).
/** Function SaveCopyInUndoList (overloaded).
* Creates a new entry in undo list of commands.
* Creates a new entry in undo list of commands.
* add a list of pickers to handle a list of items
* add a list of pickers to handle a list of items
* @param aItemsList = the list of items modified by the command to undo
* @param aItemsList = the list of items modified by the command to undo
* @param aTypeCommand = command type (see enum UndoRedoOpType)
* @param aTypeCommand = command type (see enum UndoRedoOpType)
* @param aTransformPoint = the reference point of the transformation, for commands like move
* @param aTransformPoint = the reference point of the transformation, for
*commands like move
*/
*/
virtual
void
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
UndoRedoOpType
aTypeCommand
,
virtual
void
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
);
UndoRedoOpType
aTypeCommand
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
);
/** Function PutDataInPreviousState()
/** Function PutDataInPreviousState()
* Used in undo or redo command.
* Used in undo or redo command.
* Put data pointed by List in the previous state, i.e. the state memorised by List
* Put data pointed by List in the previous state, i.e. the state memorized
* @param aList = a PICKED_ITEMS_LIST pointer to the list of items to undo/redo
* by List
* @param aList = a PICKED_ITEMS_LIST pointer to the list of items to
* undo/redo
* @param aRedoCommand = a bool: true for redo, false for undo
* @param aRedoCommand = a bool: true for redo, false for undo
* @param aRebuildRatsnet = a bool: true to rebuid ratsnet (normal use), false
* @param aRebuildRatsnet = a bool: true to rebuild ratsnet (normal use),
* to just retrieve las state (used in abort commands that do not need to rebuild ratsnest)
* false
* to just retrieve las state (used in abort commands that do not need to
* rebuild ratsnest)
*/
*/
void
PutDataInPreviousState
(
PICKED_ITEMS_LIST
*
aList
,
bool
aRedoCommand
,
bool
aRebuildRatsnet
=
true
);
void
PutDataInPreviousState
(
PICKED_ITEMS_LIST
*
aList
,
bool
aRedoCommand
,
bool
aRebuildRatsnet
=
true
);
/** Function GetBoardFromRedoList
/** Function GetBoardFromRedoList
* Redo the last edition:
* Redo the last edition:
* - Save the current board in Undo list
* - Save the current board in Undo list
* - Get an old version of the board from Redo list
* - Get an old version of the board from Redo list
* @return none
* @return none
*/
*/
void
GetBoardFromRedoList
(
wxCommandEvent
&
event
);
void
GetBoardFromRedoList
(
wxCommandEvent
&
event
);
/** Function GetBoardFromUndoList
/** Function GetBoardFromUndoList
* Undo the last edition:
* Undo the last edition:
* - Save the current board in Redo list
* - Save the current board in Redo list
* - Get an old version of the board from Undo list
* - Get an old version of the board from Undo list
* @return none
* @return none
*/
*/
void
GetBoardFromUndoList
(
wxCommandEvent
&
event
);
void
GetBoardFromUndoList
(
wxCommandEvent
&
event
);
/* Block operations: */
/* Gestion generale des operations sur block */
int
ReturnBlockCommand
(
int
key
);
int
ReturnBlockCommand
(
int
key
);
void
HandleBlockPlace
(
wxDC
*
DC
);
void
HandleBlockPlace
(
wxDC
*
DC
);
int
HandleBlockEnd
(
wxDC
*
DC
);
int
HandleBlockEnd
(
wxDC
*
DC
);
/* Block operations: */
/**
/**
* Function Block_SelectItems
* Function Block_SelectItems
* Uses GetScreen()->m_BlockLocate
* Uses GetScreen()->m_BlockLocate
...
@@ -220,53 +245,62 @@ public:
...
@@ -220,53 +245,62 @@ public:
* selected items are put in the pick list
* selected items are put in the pick list
* @param none
* @param none
*/
*/
void
Block_SelectItems
(
);
void
Block_SelectItems
(
);
/**
/**
* Function Block_Delete
* Function Block_Delete
* deletes all items within the selected block.
* deletes all items within the selected block.
* @param none
* @param none
*/
*/
void
Block_Delete
(
);
void
Block_Delete
();
/**
/**
* Function Block_Rotate
* Function Block_Rotate
* Rotate all items within the selected block.
* Rotate all items within the selected block.
* The rotation cent
re is the centre
of the block
* The rotation cent
er is the center
of the block
* @param none
* @param none
*/
*/
void
Block_Rotate
(
);
void
Block_Rotate
();
/**
/**
* Function Block_Flip
* Function Block_Flip
* Flip items within the selected block.
* Flip items within the selected block.
* The flip cent
re is the centre
of the block
* The flip cent
er is the center
of the block
* @param none
* @param none
*/
*/
void
Block_Flip
(
);
void
Block_Flip
();
/**
/**
* Function Block_Move
* Function Block_Move
* move all items within the selected block.
* move all items within the selected block.
* New location is determined by the current offset from the selected block's original location.
* New location is determined by the current offset from the selected
*block's original location.
* @param none
* @param none
*/
*/
void
Block_Move
(
);
void
Block_Move
();
/**
/**
* Function Block_Mirror_X
* Function Block_Mirror_X
* mirrors all items within the currently selected block in the X axis.
* mirrors all items within the currently selected block in the X axis.
* @param none
* @param none
*/
*/
void
Block_Mirror_X
(
);
void
Block_Mirror_X
();
/**
/**
* Function Block_Duplicate
* Function Block_Duplicate
* Duplicate all items within the selected block.
* Duplicate all items within the selected block.
* New location is determined by the current offset from the selected block's original location.
* New location is determined by the current offset from the selected
* block's original location.
* @param none
* @param none
*/
*/
void
Block_Duplicate
(
);
void
Block_Duplicate
(
);
void
SetToolbars
();
void
SetToolbars
();
void
Process_Settings
(
wxCommandEvent
&
event
);
void
Process_Settings
(
wxCommandEvent
&
event
);
void
InstallPcbOptionsFrame
(
const
wxPoint
&
pos
,
wxDC
*
DC
,
int
id
);
void
InstallPcbOptionsFrame
(
const
wxPoint
&
pos
,
wxDC
*
DC
,
int
id
);
void
InstallDisplayOptionsDialog
(
wxCommandEvent
&
aEvent
);
void
InstallDisplayOptionsDialog
(
wxCommandEvent
&
aEvent
);
void
InstallPcbGlobalDeleteFrame
(
const
wxPoint
&
pos
);
void
InstallPcbGlobalDeleteFrame
(
const
wxPoint
&
pos
);
...
@@ -284,17 +318,20 @@ public:
...
@@ -284,17 +318,20 @@ public:
bool
WriteGeneralDescrPcb
(
FILE
*
File
);
bool
WriteGeneralDescrPcb
(
FILE
*
File
);
// BOARD handling
// BOARD handling
/** function Clear_Pcb()
/** function Clear_Pcb()
* delete all and reinitialize the current board
* delete all and reinitialize the current board
* @param aQuery = true to prompt user for confirmation, false to initialize silently
* @param aQuery = true to prompt user for confirmation, false to
* initialize silently
*/
*/
bool
Clear_Pcb
(
bool
aQuery
);
bool
Clear_Pcb
(
bool
aQuery
);
// Drc control
// Drc control
/* function GetDrcController
/* function GetDrcController
* @return the DRC controller
* @return the DRC controller
*/
*/
DRC
*
GetDrcController
()
{
return
m_drc
;}
///< return the DRC controller, see drc.cpp
DRC
*
GetDrcController
()
{
return
m_drc
;
}
/**
/**
* Function RecreateBOMFileFromBoard
* Function RecreateBOMFileFromBoard
...
@@ -302,13 +339,13 @@ public:
...
@@ -302,13 +339,13 @@ public:
* this is the same as created by cvpcb.
* this is the same as created by cvpcb.
* can be used if this file is lost
* can be used if this file is lost
*/
*/
void
RecreateCmpFileFromBoard
(
wxCommandEvent
&
aEvent
);
void
RecreateCmpFileFromBoard
(
wxCommandEvent
&
aEvent
);
/**
/**
* Function RecreateBOMFileFromBoard
* Function RecreateBOMFileFromBoard
* Creates a BOM file from the current loaded board
* Creates a BOM file from the current loaded board
*/
*/
void
RecreateBOMFileFromBoard
(
wxCommandEvent
&
aEvent
);
void
RecreateBOMFileFromBoard
(
wxCommandEvent
&
aEvent
);
void
ExportToGenCAD
(
wxCommandEvent
&
event
);
void
ExportToGenCAD
(
wxCommandEvent
&
event
);
...
@@ -332,7 +369,8 @@ public:
...
@@ -332,7 +369,8 @@ public:
/**
/**
* Function ImportSpecctraDesign
* Function ImportSpecctraDesign
* will import a specctra *.dsn file and use it to replace an entire BOARD.
* will import a specctra *.dsn file and use it to replace an entire BOARD.
* The new board will not have any graphics, only components, tracks and vias.
* The new board will not have any graphics, only components, tracks and
* vias.
* See http://www.autotraxeda.com/docs/SPECCTRA/SPECCTRA.pdf for the
* See http://www.autotraxeda.com/docs/SPECCTRA/SPECCTRA.pdf for the
* specification.
* specification.
*/
*/
...
@@ -344,13 +382,12 @@ public:
...
@@ -344,13 +382,12 @@ public:
*/
*/
void
Access_to_External_Tool
(
wxCommandEvent
&
event
);
void
Access_to_External_Tool
(
wxCommandEvent
&
event
);
/* Fonctions specifiques */
MODULE
*
ListAndSelectModuleName
();
MODULE
*
ListAndSelectModuleName
();
/** Function ListNetsAndSelect
/** Function ListNetsAndSelect
* called by a command event
* called by a command event
* displays the sorted list of nets in a dialog frame
* displays the sorted list of nets in a dialog frame
* If a net is selected, it is high
t
lighted
* If a net is selected, it is highlighted
*/
*/
void
ListNetsAndSelect
(
wxCommandEvent
&
event
);
void
ListNetsAndSelect
(
wxCommandEvent
&
event
);
...
@@ -368,33 +405,38 @@ public:
...
@@ -368,33 +405,38 @@ public:
// Graphic Segments type DRAWSEGMENT
// Graphic Segments type DRAWSEGMENT
void
Start_Move_DrawItem
(
DRAWSEGMENT
*
drawitem
,
wxDC
*
DC
);
void
Start_Move_DrawItem
(
DRAWSEGMENT
*
drawitem
,
wxDC
*
DC
);
void
Place_DrawItem
(
DRAWSEGMENT
*
drawitem
,
wxDC
*
DC
);
void
Place_DrawItem
(
DRAWSEGMENT
*
drawitem
,
wxDC
*
DC
);
void
InstallGraphicItemPropertiesDialog
(
DRAWSEGMENT
*
aItem
,
wxDC
*
aDC
);
// Graphic items edition
void
InstallGraphicItemPropertiesDialog
(
DRAWSEGMENT
*
aItem
,
wxDC
*
aDC
);
// Footprint edition (see also WinEDA_BasePcbFrame)
// Footprint edition (see also WinEDA_BasePcbFrame)
void
InstallModuleOptionsFrame
(
MODULE
*
Module
,
wxDC
*
DC
);
void
InstallModuleOptionsFrame
(
MODULE
*
Module
,
wxDC
*
DC
);
void
StartMove_Module
(
MODULE
*
module
,
wxDC
*
DC
);
void
StartMove_Module
(
MODULE
*
module
,
wxDC
*
DC
);
bool
Delete_Module
(
MODULE
*
module
,
wxDC
*
DC
,
bool
aAskBeforeDeleting
);
bool
Delete_Module
(
MODULE
*
module
,
wxDC
*
DC
,
bool
aAskBeforeDeleting
);
void
Change_Side_Module
(
MODULE
*
Module
,
wxDC
*
DC
);
void
Change_Side_Module
(
MODULE
*
Module
,
wxDC
*
DC
);
void
InstallExchangeModuleFrame
(
MODULE
*
ExchangeModuleModule
);
void
InstallExchangeModuleFrame
(
MODULE
*
ExchangeModuleModule
);
/** function Exchange_Module
/** function Exchange_Module
* Replaces OldModule by NewModule, using OldModule settings:
* Replaces OldModule by NewModule, using OldModule settings:
* position, orientation, pad netnames ...)
* position, orientation, pad netnames ...)
* OldModule is deleted or put in undo list.
* OldModule is deleted or put in undo list.
* @param aOldModule = footprint to replace
* @param aOldModule = footprint to replace
* @param aNewModule = footprint to put
* @param aNewModule = footprint to put
* @param aUndoPickList = the undo list used to save OldModule. If null, OldModule is deleted
* @param aUndoPickList = the undo list used to save OldModule. If null,
* OldModule is deleted
*/
*/
void
Exchange_Module
(
MODULE
*
aOldModule
,
void
Exchange_Module
(
MODULE
*
aOldModule
,
MODULE
*
aNewModule
,
MODULE
*
aNewModule
,
PICKED_ITEMS_LIST
*
aUndoPickList
);
PICKED_ITEMS_LIST
*
aUndoPickList
);
// loading modules: see WinEDA_BasePcbFrame
// loading modules: see WinEDA_BasePcbFrame
// Board handling
// Board handling
void
RemoveStruct
(
BOARD_ITEM
*
Item
,
wxDC
*
DC
);
void
RemoveStruct
(
BOARD_ITEM
*
Item
,
wxDC
*
DC
);
// High
t
light functions:
// Highlight functions:
int
Select_High_Light
(
wxDC
*
DC
);
int
Select_High_Light
(
wxDC
*
DC
);
void
Hight_Light
(
wxDC
*
DC
);
void
Hight_Light
(
wxDC
*
DC
);
...
@@ -403,11 +445,11 @@ public:
...
@@ -403,11 +445,11 @@ public:
/**
/**
* Function Other_Layer_Route
* Function Other_Layer_Route
* operates in one of two ways. If argument track is NULL, then swap the
active
* operates in one of two ways. If argument track is NULL, then swap the
*
layer between m_Route_Layer_TOP and m_Route_Layer_BOTTOM. If a track is
*
active layer between m_Route_Layer_TOP and m_Route_Layer_BOTTOM. If a
*
in progress (track is not NULL), and if DRC allows it, place a via on the end
*
track is in progress (track is not NULL), and if DRC allows it, place
*
of the current track, and then swap the current active layer and start a new
*
a via on the end of the current track, and then swap the current active
* segment on the new layer.
*
layer and start a new
segment on the new layer.
* @param track A TRACK* to append the via to or NULL.
* @param track A TRACK* to append the via to or NULL.
* @param DC A device context to draw on.
* @param DC A device context to draw on.
* @return bool - true if the operation was successful, else false such as
* @return bool - true if the operation was successful, else false such as
...
@@ -427,19 +469,23 @@ public:
...
@@ -427,19 +469,23 @@ public:
* @param aTrack : bool true to modify tracks
* @param aTrack : bool true to modify tracks
* @param aVia : bool true to modify vias
* @param aVia : bool true to modify vias
*/
*/
bool
Reset_All_Tracks_And_Vias_To_Netclass_Values
(
bool
aTrack
,
bool
aVia
);
bool
Reset_All_Tracks_And_Vias_To_Netclass_Values
(
bool
aTrack
,
bool
aVia
);
/** function Change_Net_Tracks_And_Vias_Sizes
/** function Change_Net_Tracks_And_Vias_Sizes
* Reset all tracks width and vias diameters and drill
* Reset all tracks width and vias diameters and drill
* to their default Netclass value o
u
current values
* to their default Netclass value o
r
current values
* @param aNetcode : the netcode of the net to edit
* @param aNetcode : the netcode of the net to edit
* @param aUseNetclassValue : bool. True to use netclass values, false to use current values
* @param aUseNetclassValue : bool. True to use netclass values, false to
* use current values
*/
*/
bool
Change_Net_Tracks_And_Vias_Sizes
(
int
aNetcode
,
bool
aUseNetclassValue
);
bool
Change_Net_Tracks_And_Vias_Sizes
(
int
aNetcode
,
bool
aUseNetclassValue
);
/** Function Edit_Track_Width
/** Function Edit_Track_Width
* Modify a full track width (using DRC control).
* Modify a full track width (using DRC control).
* a full track is the set of track segments between 2 ends: pads or a point that has more than 2 segments ends connected
* a full track is the set of track segments between 2 ends: pads or a
* point that has more than 2 segments ends connected
* @param DC = the curred device context (can be NULL)
* @param DC = the curred device context (can be NULL)
* @param aTrackSegment = a segment or via on the track to change
* @param aTrackSegment = a segment or via on the track to change
*/
*/
...
@@ -467,34 +513,45 @@ public:
...
@@ -467,34 +513,45 @@ public:
/** function EraseRedundantTrack
/** function EraseRedundantTrack
* Called after creating a track
* Called after creating a track
* Remove (if exists) the old track that have the same starting and the same ending point as the new created track
* Remove (if exists) the old track that have the same starting and the
* same ending point as the new created track
* (this is the redunding track)
* (this is the redunding track)
* @param aDC = the current device context (can be NULL)
* @param aDC = the current device context (can be NULL)
* @param aNewTrack = the new created track (a pointer to a segment of the track list)
* @param aNewTrack = the new created track (a pointer to a segment of the
* track list)
* @param aNewTrackSegmentsCount = number of segments in this new track
* @param aNewTrackSegmentsCount = number of segments in this new track
* @param aItemsListPicker = the list picker to use for an undo command (can be NULL)
* @param aItemsListPicker = the list picker to use for an undo command
* (can be NULL)
*/
*/
int
EraseRedundantTrack
(
wxDC
*
aDC
,
TRACK
*
aNewTrack
,
int
aNewTrackSegmentsCount
,
int
EraseRedundantTrack
(
wxDC
*
aDC
,
TRACK
*
aNewTrack
,
int
aNewTrackSegmentsCount
,
PICKED_ITEMS_LIST
*
aItemsListPicker
);
PICKED_ITEMS_LIST
*
aItemsListPicker
);
/** Function SetTrackSegmentWidth
/** Function SetTrackSegmentWidth
* Modify one track segment width or one via diameter (using DRC control).
* Modify one track segment width or one via diameter (using DRC control).
* Basic routine used by other routines when editing tracks or vias
* Basic routine used by other routines when editing tracks or vias
* @param aTrackItem = the track segment or via to modify
* @param aTrackItem = the track segment or via to modify
* @param aItemsListPicker = the list picker to use for an undo command (can be NULL)
* @param aItemsListPicker = the list picker to use for an undo command
* @param aUseNetclassValue = true to use NetClass value, false to use g_DesignSettings value
* (can be NULL)
* @param aUseNetclassValue = true to use NetClass value, false to use
* g_DesignSettings value
* @return true if done, false if no not change (because DRC error)
* @return true if done, false if no not change (because DRC error)
*/
*/
bool
SetTrackSegmentWidth
(
TRACK
*
aTrackItem
,
PICKED_ITEMS_LIST
*
aItemsListPicker
,
bool
aUseNetclassValue
);
bool
SetTrackSegmentWidth
(
TRACK
*
aTrackItem
,
PICKED_ITEMS_LIST
*
aItemsListPicker
,
bool
aUseNetclassValue
);
// zone handling
// zone handling
/** Function Delete_Zone_Fill
/** Function Delete_Zone_Fill
* Remove the zone filling which include the segment aZone, or the zone which have the given time stamp.
* Remove the zone filling which include the segment aZone, or the zone
* A zone is a group of segments which have the same TimeStamp
* which have the given time stamp. A zone is a group of segments which
* have the same TimeStamp
* @param aZone = zone segment within the zone to delete. Can be NULL
* @param aZone = zone segment within the zone to delete. Can be NULL
* @param aTimestamp = Timestamp for the zone to delete, used if aZone == NULL
* @param aTimestamp = Timestamp for the zone to delete, used if aZone ==
* NULL
*/
*/
void
Delete_Zone_Fill
(
SEGZONE
*
Track
,
long
aTimestamp
=
0
);
void
Delete_Zone_Fill
(
SEGZONE
*
Track
,
long
aTimestamp
=
0
);
...
@@ -552,7 +609,7 @@ public:
...
@@ -552,7 +609,7 @@ public:
/**
/**
* Function Add_Similar_Zone
* Function Add_Similar_Zone
* Add a zone to a given zone outline.
* Add a zone to a given zone outline.
* if the zones are overlapp
e
ing they will be merged
* if the zones are overlapping they will be merged
* @param DC = current Device Context
* @param DC = current Device Context
* @param zone_container = parent zone outline
* @param zone_container = parent zone outline
*/
*/
...
@@ -579,8 +636,10 @@ public:
...
@@ -579,8 +636,10 @@ public:
* Function Start_Move_Zone_Corner
* Function Start_Move_Zone_Corner
* Prepares a drag edge in an existing zone outline,
* Prepares a drag edge in an existing zone outline,
*/
*/
void
Start_Move_Zone_Drag_Outline_Edge
(
wxDC
*
DC
,
void
Start_Move_Zone_Drag_Outline_Edge
(
ZONE_CONTAINER
*
zone_container
,
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
,
int
corner_id
);
int
corner_id
);
/**
/**
...
@@ -589,7 +648,10 @@ public:
...
@@ -589,7 +648,10 @@ public:
* @param DC = current Device Context (can be NULL)
* @param DC = current Device Context (can be NULL)
* @param zone_container: the given zone
* @param zone_container: the given zone
*/
*/
void
End_Move_Zone_Corner_Or_Outlines
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
);
void
End_Move_Zone_Corner_Or_Outlines
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
);
/**
/**
* Function End_Move_Zone_Corner_Or_Outlines
* Function End_Move_Zone_Corner_Or_Outlines
...
@@ -599,8 +661,9 @@ public:
...
@@ -599,8 +661,9 @@ public:
void
Remove_Zone_Corner
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
);
void
Remove_Zone_Corner
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
);
/** Function Delete_Zone
/** Function Delete_Zone
* Remove the zone which include the segment aZone, or the zone which have the given time stamp.
* Remove the zone which include the segment aZone, or the zone which have
* A zone is a group of segments which have the same TimeStamp
* the given time stamp. A zone is a group of segments which have the
* same TimeStamp
* @param DC = current Device Context (can be NULL)
* @param DC = current Device Context (can be NULL)
* @param zone_container = zone to modify
* @param zone_container = zone to modify
* the member .m_CornerSelection is used to find the outline to remove.
* the member .m_CornerSelection is used to find the outline to remove.
...
@@ -611,18 +674,21 @@ public:
...
@@ -611,18 +674,21 @@ public:
/**
/**
* Function Start_Move_Zone_Outlines
* Function Start_Move_Zone_Outlines
* Initiali
se parametre
s to move an existing zone outlines.
* Initiali
ze parameter
s to move an existing zone outlines.
* @param DC = current Device Context (can be NULL)
* @param DC = current Device Context (can be NULL)
* @param zone_container: the given zone to move
* @param zone_container: the given zone to move
*/
*/
void
Start_Move_Zone_Outlines
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
);
void
Start_Move_Zone_Outlines
(
wxDC
*
DC
,
ZONE_CONTAINER
*
zone_container
);
// Target handling
// Target handling
MIREPCB
*
Create_Mire
(
wxDC
*
DC
);
MIREPCB
*
Create_Mire
(
wxDC
*
DC
);
void
Delete_Mire
(
MIREPCB
*
MirePcb
,
wxDC
*
DC
);
void
Delete_Mire
(
MIREPCB
*
MirePcb
,
wxDC
*
DC
);
void
StartMove_Mire
(
MIREPCB
*
MirePcb
,
wxDC
*
DC
);
void
StartMove_Mire
(
MIREPCB
*
MirePcb
,
wxDC
*
DC
);
void
Place_Mire
(
MIREPCB
*
MirePcb
,
wxDC
*
DC
);
void
Place_Mire
(
MIREPCB
*
MirePcb
,
wxDC
*
DC
);
void
InstallMireOptionsFrame
(
MIREPCB
*
MirePcb
,
wxDC
*
DC
,
const
wxPoint
&
pos
);
void
InstallMireOptionsFrame
(
MIREPCB
*
MirePcb
,
wxDC
*
DC
,
const
wxPoint
&
pos
);
// Graphic segments type DRAWSEGMENT handling:
// Graphic segments type DRAWSEGMENT handling:
DRAWSEGMENT
*
Begin_DrawSegment
(
DRAWSEGMENT
*
Segment
,
int
shape
,
wxDC
*
DC
);
DRAWSEGMENT
*
Begin_DrawSegment
(
DRAWSEGMENT
*
Segment
,
int
shape
,
wxDC
*
DC
);
...
@@ -631,7 +697,9 @@ public:
...
@@ -631,7 +697,9 @@ public:
void
Delete_Drawings_All_Layer
(
int
aLayer
);
void
Delete_Drawings_All_Layer
(
int
aLayer
);
// Dimension handling:
// Dimension handling:
void
Install_Edit_Cotation
(
COTATION
*
Cotation
,
wxDC
*
DC
,
const
wxPoint
&
pos
);
void
Install_Edit_Cotation
(
COTATION
*
Cotation
,
wxDC
*
DC
,
const
wxPoint
&
pos
);
COTATION
*
Begin_Cotation
(
COTATION
*
Cotation
,
wxDC
*
DC
);
COTATION
*
Begin_Cotation
(
COTATION
*
Cotation
,
wxDC
*
DC
);
void
Delete_Cotation
(
COTATION
*
Cotation
,
wxDC
*
DC
);
void
Delete_Cotation
(
COTATION
*
Cotation
,
wxDC
*
DC
);
...
@@ -643,7 +711,7 @@ public:
...
@@ -643,7 +711,7 @@ public:
void
AutoPlace
(
wxCommandEvent
&
event
);
void
AutoPlace
(
wxCommandEvent
&
event
);
/** function OnOrientFootprints
/** function OnOrientFootprints
* install the dialog box for the comm
a
n Orient Footprints
* install the dialog box for the comm
o
n Orient Footprints
*/
*/
void
OnOrientFootprints
(
void
);
void
OnOrientFootprints
(
void
);
...
@@ -672,7 +740,6 @@ public:
...
@@ -672,7 +740,6 @@ public:
void
ReadAutoroutedTracks
(
wxDC
*
DC
);
void
ReadAutoroutedTracks
(
wxDC
*
DC
);
void
GlobalRoute
(
wxDC
*
DC
);
void
GlobalRoute
(
wxDC
*
DC
);
// divers
void
Show_1_Ratsnest
(
EDA_BaseStruct
*
item
,
wxDC
*
DC
);
void
Show_1_Ratsnest
(
EDA_BaseStruct
*
item
,
wxDC
*
DC
);
void
Ratsnest_On_Off
(
wxDC
*
DC
);
void
Ratsnest_On_Off
(
wxDC
*
DC
);
void
Clean_Pcb
(
wxDC
*
DC
);
void
Clean_Pcb
(
wxDC
*
DC
);
...
@@ -683,7 +750,8 @@ public:
...
@@ -683,7 +750,8 @@ public:
* Function SendMessageToEESCHEMA
* Function SendMessageToEESCHEMA
* sends a message to the schematic editor so that it may move its cursor
* sends a message to the schematic editor so that it may move its cursor
* to a part with the same reference as the objectToSync
* to a part with the same reference as the objectToSync
* @param objectToSync The object whose reference is used to syncronize eeschema.
* @param objectToSync The object whose reference is used to synchronize
* eeschema.
*/
*/
void
SendMessageToEESCHEMA
(
BOARD_ITEM
*
objectToSync
);
void
SendMessageToEESCHEMA
(
BOARD_ITEM
*
objectToSync
);
...
@@ -767,9 +835,11 @@ public:
...
@@ -767,9 +835,11 @@ public:
void
ToPrinter
(
wxCommandEvent
&
event
);
void
ToPrinter
(
wxCommandEvent
&
event
);
// BOARD handling
// BOARD handling
/** function Clear_Pcb()
/** function Clear_Pcb()
* delete all and reinitialize the current board
* delete all and reinitialize the current board
* @param aQuery = true to prompt user for confirmation, false to initialize silently
* @param aQuery = true to prompt user for confirmation, false to
* initialize silently
*/
*/
bool
Clear_Pcb
(
bool
aQuery
);
bool
Clear_Pcb
(
bool
aQuery
);
...
@@ -782,29 +852,36 @@ public:
...
@@ -782,29 +852,36 @@ public:
/* Undo and redo functions */
/* Undo and redo functions */
public
:
public
:
/** Function SaveCopyInUndoList.
/** Function SaveCopyInUndoList.
* Creates a new entry in undo list of commands.
* Creates a new entry in undo list of commands.
* add a picker to handle aItemToCopy
* add a picker to handle aItemToCopy
* @param aItem = the board item modified by the command to undo
* @param aItem = the board item modified by the command to undo
* @param aTypeCommand = command type (see enum UndoRedoOpType)
* @param aTypeCommand = command type (see enum UndoRedoOpType)
* @param aTransformPoint = the reference point of the transformation, for commands like move
* @param aTransformPoint = the reference point of the transformation, for
* commands like move
*/
*/
virtual
void
SaveCopyInUndoList
(
BOARD_ITEM
*
aItem
,
UndoRedoOpType
aTypeCommand
,
virtual
void
SaveCopyInUndoList
(
BOARD_ITEM
*
aItem
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
);
UndoRedoOpType
aTypeCommand
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
);
/** Function SaveCopyInUndoList (overloaded).
/** Function SaveCopyInUndoList (overloaded).
* Creates a new entry in undo list of commands.
* Creates a new entry in undo list of commands.
* add a list of pickers to handle a list of items
* add a list of pickers to handle a list of items
* @param aItemsList = the list of items modified by the command to undo
* @param aItemsList = the list of items modified by the command to undo
* @param aTypeCommand = command type (see enum UndoRedoOpType)
* @param aTypeCommand = command type (see enum UndoRedoOpType)
* @param aTransformPoint = the reference point of the transformation, for commands like move
* @param aTransformPoint = the reference point of the transformation, for
* commands like move
*/
*/
virtual
void
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
UndoRedoOpType
aTypeCommand
,
virtual
void
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
);
UndoRedoOpType
aTypeCommand
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
);
private
:
private
:
void
GetComponentFromUndoList
(
wxCommandEvent
&
event
);
void
GetComponentFromUndoList
(
wxCommandEvent
&
event
);
void
GetComponentFromRedoList
(
wxCommandEvent
&
event
);
void
GetComponentFromRedoList
(
wxCommandEvent
&
event
);
public
:
public
:
...
@@ -820,7 +897,6 @@ public:
...
@@ -820,7 +897,6 @@ public:
// functions to edit footprint edges
// functions to edit footprint edges
/**
/**
* Function Edit_Edge_Width
* Function Edit_Edge_Width
* changes the width of module perimeter lines, EDGE_MODULEs.
* changes the width of module perimeter lines, EDGE_MODULEs.
...
...
include/wxstruct.h
View file @
d2eac37d
/***********************************************************/
/****************/
/* wxstruct.h: */
/* wxstruct.h */
/* descriptions des principales classes derivees utilisees */
/****************/
/***********************************************************/
#ifndef WXSTRUCT_H
#ifndef WXSTRUCT_H
#define WXSTRUCT_H
#define WXSTRUCT_H
...
@@ -32,13 +31,11 @@
...
@@ -32,13 +31,11 @@
#endif
#endif
// Option for dialog boxes
// Option for dialog boxes
// #define DIALOG_STYLE wxDEFAULT_DIALOG_STYLE|wxFRAME_FLOAT_ON_PARENT|wxSTAY_ON_TOP
#define DIALOG_STYLE wxDEFAULT_DIALOG_STYLE | wxFRAME_FLOAT_ON_PARENT | \
#define DIALOG_STYLE wxDEFAULT_DIALOG_STYLE | wxFRAME_FLOAT_ON_PARENT | \
MAYBE_RESIZE_BORDER
MAYBE_RESIZE_BORDER
#define KICAD_DEFAULT_DRAWFRAME_STYLE wxDEFAULT_FRAME_STYLE | wxWANTS_CHARS
#define KICAD_DEFAULT_DRAWFRAME_STYLE wxDEFAULT_FRAME_STYLE | wxWANTS_CHARS
/* Forward declarations of classes. */
class
EDA_BaseStruct
;
class
EDA_BaseStruct
;
class
EDA_Rect
;
class
EDA_Rect
;
class
WinEDA_DrawPanel
;
class
WinEDA_DrawPanel
;
...
@@ -110,8 +107,6 @@ public:
...
@@ -110,8 +107,6 @@ public:
#endif
#endif
public
:
public
:
// Constructor and destructor
WinEDA_BasicFrame
(
wxWindow
*
father
,
int
idtype
,
WinEDA_BasicFrame
(
wxWindow
*
father
,
int
idtype
,
const
wxString
&
title
,
const
wxString
&
title
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
...
@@ -152,22 +147,31 @@ class WinEDA_DrawFrame : public WinEDA_BasicFrame
...
@@ -152,22 +147,31 @@ class WinEDA_DrawFrame : public WinEDA_BasicFrame
{
{
public
:
public
:
WinEDA_DrawPanel
*
DrawPanel
;
// Draw area
WinEDA_DrawPanel
*
DrawPanel
;
// Draw area
WinEDA_MsgPanel
*
MsgPanel
;
// Panel used to display some info (bottom of the screen)
WinEDA_MsgPanel
*
MsgPanel
;
// Panel used to display some
// info (bottom of the screen)
WinEDA_Toolbar
*
m_VToolBar
;
// Vertical (right side) Toolbar
WinEDA_Toolbar
*
m_VToolBar
;
// Vertical (right side) Toolbar
WinEDA_Toolbar
*
m_AuxVToolBar
;
// Auxiliary Vertical (right side) Toolbar
WinEDA_Toolbar
*
m_AuxVToolBar
;
// Auxiliary Vertical (right side)
// Toolbar
WinEDA_Toolbar
*
m_OptionsToolBar
;
// Options Toolbar (left side)
WinEDA_Toolbar
*
m_OptionsToolBar
;
// Options Toolbar (left side)
WinEDA_Toolbar
*
m_AuxiliaryToolBar
;
// Toolbar auxiliaire (utilis� dans pcbnew)
WinEDA_Toolbar
*
m_AuxiliaryToolBar
;
// Auxiliay Toolbar used in pcbnew
WinEDAChoiceBox
*
m_SelGridBox
;
// Dialog box to choose the grid size
WinEDAChoiceBox
*
m_SelGridBox
;
// Choice box to choose the grid
WinEDAChoiceBox
*
m_SelZoomBox
;
// Dialog box to choose the Zoom value
// size
WinEDAChoiceBox
*
m_SelZoomBox
;
// Choice box to choose the zoom
int
m_CursorShape
;
// shape for cursor (0 = default cursor)
// value
int
m_ID_current_state
;
// Id of active button on the vertical toolbar
int
m_ID_last_state
;
// Id of previous active button on the vertical toolbar
int
m_CursorShape
;
// shape for cursor (0 = default
int
m_HTOOL_current_state
;
// Id of active button on horizontal toolbar
// cursor)
int
m_ID_current_state
;
// Id of active button on the
// vertical toolbar
int
m_ID_last_state
;
// Id of previous active button
// on the vertical toolbar
int
m_HTOOL_current_state
;
// Id of active button on
// horizontal toolbar
int
m_InternalUnits
;
// Internal units count in 1 inch
int
m_InternalUnits
;
// Internal units count in 1 inch
// = 1000 for eeschema, = 10000 for PCBnew and Gerbview
// = 1000 for eeschema, = 10000
// for PCBnew and Gerbview
int
m_UnitType
;
// Internal Unit type (0 = inch)
int
m_UnitType
;
// Internal Unit type (0 = inch)
bool
m_Draw_Axis
;
// TRUE to show X and Y axis
bool
m_Draw_Axis
;
// TRUE to show X and Y axis
...
@@ -175,8 +179,11 @@ public:
...
@@ -175,8 +179,11 @@ public:
bool
m_Draw_Sheet_Ref
;
// TRUE to show frame references
bool
m_Draw_Sheet_Ref
;
// TRUE to show frame references
bool
m_Print_Sheet_Ref
;
// TRUE to print frame references
bool
m_Print_Sheet_Ref
;
// TRUE to print frame references
bool
m_Draw_Auxiliary_Axis
;
/* TRUE to show auxiliary axis. Used in pcbnew:
bool
m_Draw_Auxiliary_Axis
;
/* TRUE to show auxiliary axis.
* the auxiliary axis is the origin of coordinates for drill, gerber and component position files
* Used in pcbnew: the auxiliary
* axis is the origin of
* coordinates for drill, gerber
* and component position files
*/
*/
wxPoint
m_Auxiliary_Axis_Position
;
/* position of the auxiliary axis */
wxPoint
m_Auxiliary_Axis_Position
;
/* position of the auxiliary axis */
...
@@ -187,11 +194,12 @@ private:
...
@@ -187,11 +194,12 @@ private:
BASE_SCREEN
*
m_CurrentScreen
;
///< current used SCREEN
BASE_SCREEN
*
m_CurrentScreen
;
///< current used SCREEN
protected
:
protected
:
void
SetBaseScreen
(
BASE_SCREEN
*
aScreen
)
{
m_CurrentScreen
=
aScreen
;
}
void
SetBaseScreen
(
BASE_SCREEN
*
aScreen
)
{
m_CurrentScreen
=
aScreen
;
}
public
:
public
:
// Constructor and destructor
WinEDA_DrawFrame
(
wxWindow
*
father
,
int
idtype
,
WinEDA_DrawFrame
(
wxWindow
*
father
,
int
idtype
,
const
wxString
&
title
,
const
wxString
&
title
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
...
@@ -247,7 +255,9 @@ public:
...
@@ -247,7 +255,9 @@ public:
virtual
void
OnZoom
(
wxCommandEvent
&
event
);
virtual
void
OnZoom
(
wxCommandEvent
&
event
);
void
OnGrid
(
int
grid_type
);
void
OnGrid
(
int
grid_type
);
void
Recadre_Trace
(
bool
ToMouse
);
void
Recadre_Trace
(
bool
ToMouse
);
void
PutOnGrid
(
wxPoint
*
coord
);
/* set the coordiante "coord" to the nearest grid coordinate */
void
PutOnGrid
(
wxPoint
*
coord
);
/* set the coordinate to
* the nearest grid
* coordinate */
void
Zoom_Automatique
(
bool
move_mouse_cursor
);
void
Zoom_Automatique
(
bool
move_mouse_cursor
);
/* Set the zoom level to show the area Rect */
/* Set the zoom level to show the area Rect */
...
@@ -271,9 +281,11 @@ public:
...
@@ -271,9 +281,11 @@ public:
* Return the X,Y sheet references where the point position is located
* Return the X,Y sheet references where the point position is located
* @param aScreen = screen to use
* @param aScreen = screen to use
* @param aPosition = position to identify by YX ref
* @param aPosition = position to identify by YX ref
* @return a wxString containing the message locator like A3 or B6 (or ?? if out of page limits)
* @return a wxString containing the message locator like A3 or B6
* (or ?? if out of page limits)
*/
*/
wxString
GetXYSheetReferences
(
BASE_SCREEN
*
aScreen
,
const
wxPoint
&
aPosition
);
wxString
GetXYSheetReferences
(
BASE_SCREEN
*
aScreen
,
const
wxPoint
&
aPosition
);
void
DisplayToolMsg
(
const
wxString
&
msg
);
void
DisplayToolMsg
(
const
wxString
&
msg
);
void
Process_Zoom
(
wxCommandEvent
&
event
);
void
Process_Zoom
(
wxCommandEvent
&
event
);
...
@@ -281,7 +293,8 @@ public:
...
@@ -281,7 +293,8 @@ public:
virtual
void
RedrawActiveWindow
(
wxDC
*
DC
,
bool
EraseBg
)
=
0
;
virtual
void
RedrawActiveWindow
(
wxDC
*
DC
,
bool
EraseBg
)
=
0
;
virtual
void
OnLeftClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
)
=
0
;
virtual
void
OnLeftClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
)
=
0
;
virtual
void
OnLeftDClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
);
virtual
void
OnLeftDClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
);
virtual
bool
OnRightClick
(
const
wxPoint
&
MousePos
,
wxMenu
*
PopMenu
)
=
0
;
virtual
bool
OnRightClick
(
const
wxPoint
&
MousePos
,
wxMenu
*
PopMenu
)
=
0
;
virtual
void
ToolOnRightClick
(
wxCommandEvent
&
event
);
virtual
void
ToolOnRightClick
(
wxCommandEvent
&
event
);
void
AdjustScrollBars
();
void
AdjustScrollBars
();
...
@@ -295,8 +308,8 @@ public:
...
@@ -295,8 +308,8 @@ public:
* a drawing function per se, but rather updates lines of text held by
* a drawing function per se, but rather updates lines of text held by
* the components within the status bar which is owned by the wxFrame.
* the components within the status bar which is owned by the wxFrame.
* <p>
* <p>
* On a MAC, be careful about calling this function when there is an
existing
* On a MAC, be careful about calling this function when there is an
* wxDC in existence on a sibling window.
*
existing
wxDC in existence on a sibling window.
*/
*/
virtual
void
UpdateStatusBar
();
virtual
void
UpdateStatusBar
();
...
@@ -305,7 +318,8 @@ public:
...
@@ -305,7 +318,8 @@ public:
/* Handlers for block commands */
/* Handlers for block commands */
virtual
int
ReturnBlockCommand
(
int
key
);
virtual
int
ReturnBlockCommand
(
int
key
);
virtual
void
InitBlockPasteInfos
();
virtual
void
InitBlockPasteInfos
();
virtual
bool
HandleBlockBegin
(
wxDC
*
DC
,
int
cmd_type
,
const
wxPoint
&
startpos
);
virtual
bool
HandleBlockBegin
(
wxDC
*
DC
,
int
cmd_type
,
const
wxPoint
&
startpos
);
virtual
void
HandleBlockPlace
(
wxDC
*
DC
);
virtual
void
HandleBlockPlace
(
wxDC
*
DC
);
virtual
int
HandleBlockEnd
(
wxDC
*
DC
);
virtual
int
HandleBlockEnd
(
wxDC
*
DC
);
...
@@ -342,10 +356,6 @@ public:
...
@@ -342,10 +356,6 @@ public:
};
};
/****************************************************/
/* classe representant un ecran graphique de dessin */
/****************************************************/
/*********************************************************
/*********************************************************
* class WinEDA_MsgPanel : this is a panel to display various infos
* class WinEDA_MsgPanel : this is a panel to display various infos
* and messages on items in eeschema an pcbnew
* and messages on items in eeschema an pcbnew
...
@@ -410,12 +420,11 @@ protected:
...
@@ -410,12 +420,11 @@ protected:
public
:
public
:
WinEDA_DrawFrame
*
m_Parent
;
WinEDA_DrawFrame
*
m_Parent
;
int
m_BgColor
;
// couleur de fond
int
m_BgColor
;
public
:
public
:
WinEDA_MsgPanel
(
WinEDA_DrawFrame
*
parent
,
int
id
,
const
wxPoint
&
pos
,
// Constructor and destructor
const
wxSize
&
size
);
WinEDA_MsgPanel
(
WinEDA_DrawFrame
*
parent
,
int
id
,
const
wxPoint
&
pos
,
const
wxSize
&
size
);
~
WinEDA_MsgPanel
();
~
WinEDA_MsgPanel
();
...
@@ -465,8 +474,6 @@ private:
...
@@ -465,8 +474,6 @@ private:
wxStaticText
*
m_Title
;
wxStaticText
*
m_Title
;
public
:
public
:
// Constructor and destructor
WinEDA_EnterText
(
wxWindow
*
parent
,
const
wxString
&
Title
,
WinEDA_EnterText
(
wxWindow
*
parent
,
const
wxString
&
Title
,
const
wxString
&
TextToEdit
,
wxBoxSizer
*
BoxSizer
,
const
wxString
&
TextToEdit
,
wxBoxSizer
*
BoxSizer
,
const
wxSize
&
Size
,
bool
Multiline
=
false
);
const
wxSize
&
Size
,
bool
Multiline
=
false
);
...
@@ -489,6 +496,7 @@ public:
...
@@ -489,6 +496,7 @@ public:
}
}
};
};
/************************************************************************/
/************************************************************************/
/* Class to edit/enter a graphic text and its dimension ( INCHES or MM )*/
/* Class to edit/enter a graphic text and its dimension ( INCHES or MM )*/
/************************************************************************/
/************************************************************************/
...
@@ -503,8 +511,6 @@ private:
...
@@ -503,8 +511,6 @@ private:
wxStaticText
*
m_Title
;
wxStaticText
*
m_Title
;
public
:
public
:
// Constructor and destructor
WinEDA_GraphicTextCtrl
(
wxWindow
*
parent
,
const
wxString
&
Title
,
WinEDA_GraphicTextCtrl
(
wxWindow
*
parent
,
const
wxString
&
Title
,
const
wxString
&
TextToEdit
,
int
textsize
,
const
wxString
&
TextToEdit
,
int
textsize
,
int
units
,
wxBoxSizer
*
BoxSizer
,
int
framelen
=
200
,
int
units
,
wxBoxSizer
*
BoxSizer
,
int
framelen
=
200
,
...
@@ -527,13 +533,15 @@ public:
...
@@ -527,13 +533,15 @@ public:
*/
*/
static
wxString
FormatSize
(
int
internalUnit
,
int
units
,
int
textSize
);
static
wxString
FormatSize
(
int
internalUnit
,
int
units
,
int
textSize
);
static
int
ParseSize
(
const
wxString
&
sizeText
,
int
internalUnit
,
int
units
);
static
int
ParseSize
(
const
wxString
&
sizeText
,
int
internalUnit
,
int
units
);
};
};
/*************************************************************************************/
/**************************************************************************/
/*Class to edit/enter a coordinate (pair of values) ( INCHES or MM ) in dialog boxes */
/* Class to edit/enter a coordinate (pair of values) ( INCHES or MM ) in */
/*************************************************************************************/
/* dialog boxes, */
/**************************************************************************/
class
WinEDA_PositionCtrl
class
WinEDA_PositionCtrl
{
{
public
:
public
:
...
@@ -546,8 +554,6 @@ private:
...
@@ -546,8 +554,6 @@ private:
wxStaticText
*
m_TextX
,
*
m_TextY
;
wxStaticText
*
m_TextX
,
*
m_TextY
;
public
:
public
:
// Constructor and destructor
WinEDA_PositionCtrl
(
wxWindow
*
parent
,
const
wxString
&
title
,
WinEDA_PositionCtrl
(
wxWindow
*
parent
,
const
wxString
&
title
,
const
wxPoint
&
pos_to_edit
,
const
wxPoint
&
pos_to_edit
,
int
units
,
wxBoxSizer
*
BoxSizer
,
int
units
,
wxBoxSizer
*
BoxSizer
,
...
@@ -560,6 +566,7 @@ public:
...
@@ -560,6 +566,7 @@ public:
wxPoint
GetValue
();
wxPoint
GetValue
();
};
};
/*************************************************************
/*************************************************************
* Class to edit/enter a size (pair of values for X and Y size)
* Class to edit/enter a size (pair of values for X and Y size)
* ( INCHES or MM ) in dialog boxes
* ( INCHES or MM ) in dialog boxes
...
@@ -567,8 +574,6 @@ public:
...
@@ -567,8 +574,6 @@ public:
class
WinEDA_SizeCtrl
:
public
WinEDA_PositionCtrl
class
WinEDA_SizeCtrl
:
public
WinEDA_PositionCtrl
{
{
public
:
public
:
// Constructor and destructor
WinEDA_SizeCtrl
(
wxWindow
*
parent
,
const
wxString
&
title
,
WinEDA_SizeCtrl
(
wxWindow
*
parent
,
const
wxString
&
title
,
const
wxSize
&
size_to_edit
,
const
wxSize
&
size_to_edit
,
int
units
,
wxBoxSizer
*
BoxSizer
,
int
units
,
wxBoxSizer
*
BoxSizer
,
...
@@ -582,11 +587,6 @@ public:
...
@@ -582,11 +587,6 @@ public:
/****************************************************************/
/****************************************************************/
/* Class to edit/enter a value ( INCHES or MM ) in dialog boxes */
/* Class to edit/enter a value ( INCHES or MM ) in dialog boxes */
/****************************************************************/
/****************************************************************/
/* internal_unit est le nombre d'unites internes par inch
* - 1000 sur EESchema
* - 10000 sur PcbNew
*/
class
WinEDA_ValueCtrl
class
WinEDA_ValueCtrl
{
{
public
:
public
:
...
@@ -598,8 +598,6 @@ private:
...
@@ -598,8 +598,6 @@ private:
wxStaticText
*
m_Text
;
wxStaticText
*
m_Text
;
public
:
public
:
// Constructor and destructor
WinEDA_ValueCtrl
(
wxWindow
*
parent
,
const
wxString
&
title
,
int
value
,
WinEDA_ValueCtrl
(
wxWindow
*
parent
,
const
wxString
&
title
,
int
value
,
int
units
,
wxBoxSizer
*
BoxSizer
,
int
units
,
wxBoxSizer
*
BoxSizer
,
int
internal_unit
=
EESCHEMA_INTERNAL_UNIT
);
int
internal_unit
=
EESCHEMA_INTERNAL_UNIT
);
...
@@ -616,6 +614,7 @@ public:
...
@@ -616,6 +614,7 @@ public:
}
}
};
};
/************************************************************************/
/************************************************************************/
/* Class to edit/enter a pair of float (double) values in dialog boxes */
/* Class to edit/enter a pair of float (double) values in dialog boxes */
/************************************************************************/
/************************************************************************/
...
@@ -628,8 +627,6 @@ private:
...
@@ -628,8 +627,6 @@ private:
wxStaticText
*
m_Text
;
wxStaticText
*
m_Text
;
public
:
public
:
// Constructor and destructor
WinEDA_DFloatValueCtrl
(
wxWindow
*
parent
,
const
wxString
&
title
,
WinEDA_DFloatValueCtrl
(
wxWindow
*
parent
,
const
wxString
&
title
,
double
value
,
wxBoxSizer
*
BoxSizer
);
double
value
,
wxBoxSizer
*
BoxSizer
);
...
@@ -671,13 +668,16 @@ public:
...
@@ -671,13 +668,16 @@ public:
#if defined(KICAD_AUITOOLBAR)
#if defined(KICAD_AUITOOLBAR)
bool
GetToolState
(
int
toolId
)
{
return
GetToolToggled
(
toolId
);
};
bool
GetToolState
(
int
toolId
)
{
return
GetToolToggled
(
toolId
);
};
void
AddRadioTool
(
int
toolid
,
const
wxString
&
label
,
const
wxBitmap
&
bitmap
,
void
AddRadioTool
(
int
toolid
,
const
wxString
&
label
,
const
wxBitmap
&
bitmap
,
const
wxBitmap
&
bmpDisabled
=
wxNullBitmap
,
const
wxBitmap
&
bmpDisabled
=
wxNullBitmap
,
const
wxString
&
shortHelp
=
wxEmptyString
,
const
wxString
&
shortHelp
=
wxEmptyString
,
const
wxString
&
longHelp
=
wxEmptyString
,
const
wxString
&
longHelp
=
wxEmptyString
,
wxObject
*
data
=
NULL
)
wxObject
*
data
=
NULL
)
{
{
AddTool
(
toolid
,
label
,
bitmap
,
bmpDisabled
,
wxITEM_CHECK
,
shortHelp
,
longHelp
,
data
);
AddTool
(
toolid
,
label
,
bitmap
,
bmpDisabled
,
wxITEM_CHECK
,
shortHelp
,
longHelp
,
data
);
};
};
void
SetToolNormalBitmap
(
int
id
,
const
wxBitmap
&
bitmap
)
{};
void
SetToolNormalBitmap
(
int
id
,
const
wxBitmap
&
bitmap
)
{};
...
...
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