Comment translation complete, Yeah!!!!
This commit is contained in:
parent
8d8bdc3e97
commit
d2eac37ddf
|
@ -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
|
||||
* suivi de _Xnnnnn ou nnnnn est un nom de 0 a 99999
|
||||
|
|
|
@ -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
|
||||
* suivi de _Xnnnnn ou nnnnn est un nom de 0 a 99999
|
||||
*/
|
||||
|
|
|
@ -377,7 +377,7 @@ void WinEDA_SchematicFrame::HandleBlockEndByPopUp( int Command, wxDC* DC )
|
|||
|
||||
case BLOCK_DRAG: /* move to Drag */
|
||||
|
||||
/* *JP translate*
|
||||
/* ???
|
||||
* Effacement de la liste des structures de pointage,
|
||||
* qui est devenue erronnee
|
||||
*/
|
||||
|
|
|
@ -145,7 +145,8 @@ void BreakSegment( SCH_SCREEN* aScreen, wxPoint aBreakpoint )
|
|||
if( !TestSegmentHit( aBreakpoint, segment->m_Start, segment->m_End, 0 ) )
|
||||
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
|
||||
* pas une extremite */
|
||||
if( ( segment->m_Start == aBreakpoint )
|
||||
|
|
|
@ -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
|
||||
* objects connect to the junction.
|
||||
* The junction must have a valid Netcode
|
||||
* The list of objects is SUPPOSED class by NumSheet *JP translate*
|
||||
* Croissants,
|
||||
* The list of objects is SUPPOSED class by NumSheet ??? Croissants,
|
||||
* And research is done from the start element, 1st element
|
||||
* Leaf schema
|
||||
* (There can be no physical connection between elements of different sheets)
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
/************************************************************/
|
||||
/* appl_wxstruct.h: */
|
||||
/* descriptions des principales classes derivees utilisees: */
|
||||
/* Class "EDA_Appl: classe de l'application generale */
|
||||
/************************************************************/
|
||||
|
||||
/* Ce fichier doit etre inclus dans "wxstruct.h"
|
||||
*/
|
||||
/******************************************/
|
||||
/* appl_wxstruct.h */
|
||||
/* Base application class implementation. */
|
||||
/******************************************/
|
||||
|
||||
#ifndef APPL_WXSTRUCT_H
|
||||
#define APPL_WXSTRUCT_H
|
||||
|
@ -39,10 +35,12 @@ class wxHtmlHelpController;
|
|||
class WinEDA_App : public wxApp
|
||||
{
|
||||
public:
|
||||
id_app_type m_Id; /* Used mainly to handle default paths libs
|
||||
* m_Id = APP_TYPE_EESCHEMA, APP_TYPE_PCBNEW ...
|
||||
*/
|
||||
wxString m_Project;
|
||||
id_app_type m_Id; /* Used mainly to handle
|
||||
* default paths libs
|
||||
* m_Id = APP_TYPE_EESCHEMA,
|
||||
* APP_TYPE_PCBNEW ...
|
||||
*/
|
||||
wxString m_Project;
|
||||
wxSingleInstanceChecker* m_Checker;
|
||||
|
||||
wxPoint m_HelpPos;
|
||||
|
@ -53,32 +51,30 @@ public:
|
|||
wxFileConfig* m_ProjectConfig;
|
||||
wxString m_HelpFileName;
|
||||
wxString m_EditorName;
|
||||
wxString m_CurrentOptionFile; // dernier fichier .cnf utilisé
|
||||
wxString m_CurrentOptionFile;
|
||||
wxString m_CurrentOptionFileDateAndTime;
|
||||
|
||||
wxString m_BinDir; /* Chemin ou reside l'executable
|
||||
* (utilisé si KICAD non défini)*/
|
||||
wxString m_KicadEnv; /* Chemin de kicad défini dans la
|
||||
* variable d'environnement KICAD,
|
||||
* typiquement /usr/local/kicad ou
|
||||
* c:\kicad */
|
||||
bool m_Env_Defined; // TRUE si variable d'environnement KICAD definie
|
||||
wxString m_BinDir; /* Kicad executable path.*/
|
||||
wxString m_KicadEnv; /* environment variable KICAD */
|
||||
bool m_Env_Defined; // TRUE if environment KICAD is
|
||||
// defined.
|
||||
|
||||
wxLocale* m_Locale; // Gestion de la localisation
|
||||
int m_LanguageId; // indicateur de choix du langage ( 0 = defaut)
|
||||
wxString m_PdfBrowser; // Name of the selected browser, for browsing pdf datasheets
|
||||
bool m_PdfBrowserIsDefault; // True if the pdf browser is the default (m_PdfBrowser not used)
|
||||
wxPathList m_searchPaths;
|
||||
wxFileHistory m_fileHistory;
|
||||
wxLocale* m_Locale; // The current locale.
|
||||
int m_LanguageId; // The current language setting.
|
||||
wxString m_PdfBrowser; // Name of the selected browser,
|
||||
// for browsing pdf datasheets
|
||||
bool m_PdfBrowserIsDefault; // True if the pdf browser is the
|
||||
// default (m_PdfBrowser not used)
|
||||
wxPathList m_searchPaths;
|
||||
wxFileHistory m_fileHistory;
|
||||
|
||||
protected:
|
||||
wxString m_Title;
|
||||
wxPathList m_libSearchPaths;
|
||||
wxFileName m_projectFileName;
|
||||
wxString m_LastVisitedLibPath;
|
||||
wxString m_Title;
|
||||
wxPathList m_libSearchPaths;
|
||||
wxFileName m_projectFileName;
|
||||
wxString m_LastVisitedLibPath;
|
||||
|
||||
public:
|
||||
WinEDA_App();
|
||||
public: WinEDA_App();
|
||||
~WinEDA_App();
|
||||
bool OnInit();
|
||||
int OnRun();
|
||||
|
@ -87,15 +83,16 @@ public:
|
|||
void SetDefaultSearchPaths( void );
|
||||
|
||||
/** Function InitEDA_Appl
|
||||
* initialise some general parameters
|
||||
* initialize some general parameters
|
||||
* - Default paths (help, libs, bin)and configuration files names
|
||||
* - Language and locale
|
||||
* - fonts
|
||||
* @param aName : used as paths in configuration files
|
||||
* @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 );
|
||||
|
||||
|
@ -104,8 +101,9 @@ public:
|
|||
* Create menu list for language choice, and add it as submenu to a main
|
||||
* menu
|
||||
*
|
||||
* @param MasterMenu : The main menu. The sub menu list will be accessible
|
||||
* from the menu item with id ID_LANGUAGE_CHOICE
|
||||
* @param MasterMenu : The main menu. The sub menu list will be
|
||||
* accessible from the menu item with id
|
||||
* ID_LANGUAGE_CHOICE
|
||||
*
|
||||
* @return the sub menu Language list
|
||||
*/
|
||||
|
@ -114,13 +112,13 @@ public:
|
|||
void SetLanguagePath( void );
|
||||
void InitOnLineHelp();
|
||||
|
||||
// Sauvegarde de configurations et options:
|
||||
/** Function GetSettings
|
||||
* 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
|
||||
*/
|
||||
void GetSettings(bool aReopenLastUsedDirectory);
|
||||
void GetSettings( bool aReopenLastUsedDirectory );
|
||||
|
||||
void SaveSettings();
|
||||
|
||||
|
@ -133,7 +131,8 @@ public:
|
|||
|
||||
/** Function SaveCurrentSetupValues()
|
||||
* 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
|
||||
*/
|
||||
void SaveCurrentSetupValues( PARAM_CFG_BASE** aList );
|
||||
|
@ -141,20 +140,21 @@ public:
|
|||
|
||||
/** Function ReadCurrentSetupValues()
|
||||
* 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
|
||||
*/
|
||||
void ReadCurrentSetupValues( PARAM_CFG_BASE** aList );
|
||||
void ReadCurrentSetupValues( PARAM_CFG_ARRAY& List );
|
||||
|
||||
bool ReadProjectConfig( const wxString& local_config_filename,
|
||||
const wxString& GroupName,
|
||||
bool ReadProjectConfig( const wxString& local_config_filename,
|
||||
const wxString& GroupName,
|
||||
PARAM_CFG_BASE** List,
|
||||
bool Load_Only_if_New );
|
||||
bool ReadProjectConfig( const wxString& local_config_filename,
|
||||
const wxString& GroupName,
|
||||
bool Load_Only_if_New );
|
||||
bool ReadProjectConfig( const wxString& local_config_filename,
|
||||
const wxString& GroupName,
|
||||
PARAM_CFG_ARRAY& List,
|
||||
bool Load_Only_if_New );
|
||||
bool Load_Only_if_New );
|
||||
bool ReCreatePrjConfig( const wxString& local_config_filename,
|
||||
const wxString& GroupName,
|
||||
bool ForceUseLocalConfig );
|
||||
|
@ -188,33 +188,37 @@ public:
|
|||
return FindLibraryPath( fileName.GetFullPath() );
|
||||
}
|
||||
|
||||
|
||||
/** ReturnLastVisitedLibraryPath
|
||||
* Returns the last visited library directory, or (if void) the first
|
||||
* path in lib path list ( but not the CWD )
|
||||
* @param aSubPathToSearch = Prefered sub path to search in path list
|
||||
* @param aSubPathToSearch = Preferred sub path to search in path list
|
||||
*/
|
||||
wxString ReturnLastVisitedLibraryPath( const wxString & aSubPathToSearch = wxEmptyString);
|
||||
void SaveLastVisitedLibraryPath( const wxString & aPath);
|
||||
wxString ReturnLastVisitedLibraryPath(
|
||||
const wxString& aSubPathToSearch = wxEmptyString );
|
||||
void SaveLastVisitedLibraryPath( const wxString& aPath );
|
||||
|
||||
/** ReturnFilenameWithRelativePathInLibPath
|
||||
* @return a short filename (with extension) with only a relative path if this filename
|
||||
* can be found in library paths
|
||||
* @return a short filename (with extension) with only a relative path if
|
||||
* this filename can be found in library paths
|
||||
* @param aFullFilename = filename with path and extension.
|
||||
*/
|
||||
wxString ReturnFilenameWithRelativePathInLibPath(const wxString & aFullFilename);
|
||||
wxString ReturnFilenameWithRelativePathInLibPath(
|
||||
const wxString& aFullFilename );
|
||||
|
||||
/** Function RemoveLibraryPath
|
||||
* 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 );
|
||||
|
||||
/** Function InsertLibraryPath
|
||||
* insert path(s) int lib paths list.
|
||||
* @param aPaths = path or path list to add. paths must be separated by ";"
|
||||
* @param aIndex = insertion point
|
||||
*/
|
||||
void InsertLibraryPath( const wxString& aPaths, size_t aIndex );
|
||||
void InsertLibraryPath( const wxString& aPaths, size_t aIndex );
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
|
||||
#include "colors.h"
|
||||
|
||||
#if defined (DEBUG)
|
||||
#if defined(DEBUG)
|
||||
#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 );
|
||||
|
||||
extern std::ostream& operator <<( std::ostream& out, const wxPoint& pt );
|
||||
extern std::ostream& operator <<( std::ostream& out, const wxPoint& pt );
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -35,7 +35,8 @@ enum KICAD_T {
|
|||
TYPE_EDGE_MODULE, // a footprint edge
|
||||
TYPE_TRACK, // a track segment (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_COTATION, // a dimension (graphic item)
|
||||
TYPE_MIRE, // a target (graphic item)
|
||||
|
@ -123,7 +124,8 @@ public:
|
|||
/**
|
||||
* Function Inspect
|
||||
* 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.
|
||||
*
|
||||
* @param testItem An EDA_BaseStruct to examine.
|
||||
|
@ -132,8 +134,8 @@ public:
|
|||
* @return SEARCH_RESULT - SEARCH_QUIT if the Iterator is to stop the scan,
|
||||
* else SCAN_CONTINUE;
|
||||
*/
|
||||
SEARCH_RESULT virtual Inspect( EDA_BaseStruct * testItem,
|
||||
const void* testData ) = 0;
|
||||
SEARCH_RESULT virtual Inspect( EDA_BaseStruct* testItem,
|
||||
const void* testData ) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
@ -153,18 +155,20 @@ public:
|
|||
EDA_Rect() { };
|
||||
|
||||
EDA_Rect( const wxPoint& aPos, const wxSize& aSize ) :
|
||||
m_Pos( aPos )
|
||||
, m_Size( aSize )
|
||||
m_Pos( aPos ),
|
||||
m_Size( aSize )
|
||||
{ }
|
||||
|
||||
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
|
||||
bool Inside( const wxPoint& point ); // Return TRUE if point is in Rect
|
||||
void Normalize(); // Ensure the height and width are
|
||||
// >= 0
|
||||
bool Inside( const wxPoint& point ); // Return TRUE if point is in Rect
|
||||
|
||||
bool Inside( int x, int y ) { return Inside( wxPoint( x, y ) ); }
|
||||
wxSize GetSize() { return m_Size; }
|
||||
|
@ -182,7 +186,8 @@ public:
|
|||
void SetSize( const wxSize& size ) { m_Size = size; }
|
||||
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( 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 SetY( int val ) { m_Pos.y = val; }
|
||||
void SetWidth( int val ) { m_Size.x = val; }
|
||||
|
@ -208,27 +213,27 @@ public:
|
|||
operator wxRect() const { return wxRect( m_Pos, m_Size ); }
|
||||
|
||||
/** Inflate
|
||||
* Inflate this object: move each horizontal edge by dx and each vertical edge by dy
|
||||
* toward rect outside
|
||||
* Inflate this object: move each horizontal edge by dx and each vertical
|
||||
* edge by dy toward rect outside
|
||||
* if dx and/or dy is negative, move toward rect inside (deflate)
|
||||
* Works for positive and negative rect size
|
||||
*/
|
||||
EDA_Rect& Inflate( wxCoord dx, wxCoord dy );
|
||||
EDA_Rect& Inflate( wxCoord dx, wxCoord dy );
|
||||
|
||||
/** Inflate
|
||||
* Inflate this object: move each horizontal edge and each vertical edge by aDelta
|
||||
* toward rect outside
|
||||
* Inflate this object: move each horizontal edge and each vertical edge by
|
||||
* aDelta toward rect outside
|
||||
* if aDelta is negative, move toward rect inside (deflate)
|
||||
* Works for positive and negative rect size
|
||||
*/
|
||||
EDA_Rect& Inflate( int aDelta );
|
||||
EDA_Rect& Inflate( int aDelta );
|
||||
|
||||
/** Function Merge
|
||||
* Modify Position and Size of this in order to contain the given rect
|
||||
* mainly used to calculate bounding boxes
|
||||
* @param aRect = given rect to merge with this
|
||||
*/
|
||||
void Merge( const EDA_Rect& aRect );
|
||||
void Merge( const EDA_Rect& aRect );
|
||||
};
|
||||
|
||||
|
||||
|
@ -240,28 +245,40 @@ class DHEAD;
|
|||
|
||||
/**
|
||||
* 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
|
||||
#define IS_CHANGED (1 << 0)
|
||||
#define IS_LINKED (1 << 1)
|
||||
#define IN_EDIT (1 << 2)
|
||||
#define IS_MOVED (1 << 3)
|
||||
#define IS_NEW (1 << 4)
|
||||
#define IS_RESIZED (1 << 5)
|
||||
#define IS_DRAGGED (1 << 6)
|
||||
#define IS_DELETED (1 << 7)
|
||||
#define IS_WIRE_IMAGE (1 << 8)
|
||||
#define STARTPOINT (1 << 9)
|
||||
#define ENDPOINT (1 << 10)
|
||||
#define SELECTED (1 << 11)
|
||||
#define SELECTEDNODE (1 << 12) ///< flag indiquant que la structure a deja selectionnee
|
||||
#define STRUCT_DELETED (1 << 13) ///< Bit flag de Status pour structures effacee
|
||||
#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 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 IS_CANCELLED (1 << 18) ///< flag set when edit dialogs are canceled when editing a new object
|
||||
|
||||
// These define are used for the .m_Flags and .m_UndoRedoStatus member of the
|
||||
// class EDA_BaseStruct
|
||||
#define IS_CHANGED (1 << 0)
|
||||
#define IS_LINKED (1 << 1)
|
||||
#define IN_EDIT (1 << 2)
|
||||
#define IS_MOVED (1 << 3)
|
||||
#define IS_NEW (1 << 4)
|
||||
#define IS_RESIZED (1 << 5)
|
||||
#define IS_DRAGGED (1 << 6)
|
||||
#define IS_DELETED (1 << 7)
|
||||
#define IS_WIRE_IMAGE (1 << 8)
|
||||
#define STARTPOINT (1 << 9)
|
||||
#define ENDPOINT (1 << 10)
|
||||
#define SELECTED (1 << 11)
|
||||
#define SELECTEDNODE (1 << 12) ///< flag indicating that the structure
|
||||
// has already selected
|
||||
|
||||
#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 DRAW_ERASED (1 << 17) ///< draw in background color, used by
|
||||
// class TRACK in gerbview
|
||||
#define IS_CANCELLED (1 << 18) ///< flag set when edit dialogs are
|
||||
// canceled when editing a new object
|
||||
|
||||
class EDA_BaseStruct
|
||||
{
|
||||
|
@ -269,26 +286,29 @@ private:
|
|||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
protected:
|
||||
EDA_BaseStruct* Pnext; /* Linked list: Link (next struct) */
|
||||
EDA_BaseStruct* Pback; /* Linked list: Link (previous struct) */
|
||||
EDA_BaseStruct* m_Parent; /* Linked list: Link (parent struct) */
|
||||
EDA_BaseStruct* m_Son; /* Linked list: Link (son struct) */
|
||||
DHEAD* m_List; ///< which DLIST I am on.
|
||||
EDA_BaseStruct* Pnext; /* Linked list: Link (next struct) */
|
||||
EDA_BaseStruct* Pback; /* Linked list: Link (previous struct) */
|
||||
EDA_BaseStruct* m_Parent; /* Linked list: Link (parent struct) */
|
||||
EDA_BaseStruct* m_Son; /* Linked list: Link (son struct) */
|
||||
DHEAD* m_List; ///< which DLIST I am on.
|
||||
|
||||
|
||||
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
|
||||
int m_Selected; /* Used by block commands, and selective editing */
|
||||
unsigned long m_TimeStamp; // Time stamp used for logical links
|
||||
int m_Selected; /* Used by block commands, and selective
|
||||
* editing */
|
||||
|
||||
// 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:
|
||||
int m_Status;
|
||||
|
@ -306,8 +326,8 @@ public:
|
|||
|
||||
/**
|
||||
* Function Type
|
||||
* returns the type of object. This attribute should never be changed after
|
||||
* a constructor sets it, so there is no public "setter" method.
|
||||
* returns the type of object. This attribute should never be changed
|
||||
* after a constructor sets it, so there is no public "setter" method.
|
||||
* @return KICAD_T - the type of object.
|
||||
*/
|
||||
KICAD_T Type() const { return m_StructType; }
|
||||
|
@ -325,7 +345,6 @@ public:
|
|||
void SetSon( EDA_BaseStruct* aSon ) { m_Son = aSon; }
|
||||
void SetList( DHEAD* aList ) { m_List = aList; }
|
||||
|
||||
/* Gestion de l'etat (status) de la structure (active, deleted..) */
|
||||
|
||||
int GetState( int type ) const
|
||||
{
|
||||
|
@ -352,8 +371,8 @@ public:
|
|||
|
||||
/**
|
||||
* Function DisplayInfo
|
||||
* has knowledge about the frame and how and where to put status information
|
||||
* about this object into the frame's message panel.
|
||||
* has knowledge about the frame and how and where to put status
|
||||
* information about this object into the frame's message panel.
|
||||
* @param frame A WinEDA_DrawFrame in which to print status information.
|
||||
*/
|
||||
virtual void DisplayInfo( WinEDA_DrawFrame* frame )
|
||||
|
@ -375,7 +394,7 @@ public:
|
|||
|
||||
|
||||
/**
|
||||
* Function HitTest (overlayed)
|
||||
* Function HitTest (overlaid)
|
||||
* tests if the given EDA_Rect intersect this object.
|
||||
* For now, an ending point must be inside this rect.
|
||||
* @param refArea : the given EDA_Rect
|
||||
|
@ -389,19 +408,23 @@ public:
|
|||
|
||||
/**
|
||||
* 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
|
||||
* 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.
|
||||
*/
|
||||
virtual EDA_Rect GetBoundingBox()
|
||||
{
|
||||
#if defined (DEBUG)
|
||||
#if defined(DEBUG)
|
||||
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
|
||||
|
||||
// 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 ) );
|
||||
}
|
||||
|
||||
|
@ -423,17 +446,18 @@ public:
|
|||
* @return SEARCH_RESULT - SEARCH_QUIT if the called INSPECTOR returned
|
||||
* SEARCH_QUIT, else SCAN_CONTINUE;
|
||||
*/
|
||||
static SEARCH_RESULT IterateForward( EDA_BaseStruct* listStart,
|
||||
INSPECTOR* inspector,
|
||||
const void* testData,
|
||||
const KICAD_T scanTypes[] );
|
||||
static SEARCH_RESULT IterateForward( EDA_BaseStruct* listStart,
|
||||
INSPECTOR* inspector,
|
||||
const void* testData,
|
||||
const KICAD_T scanTypes[] );
|
||||
|
||||
|
||||
/**
|
||||
* Function Visit
|
||||
* may be re-implemented for each derived class in order to handle
|
||||
* 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.
|
||||
* @param inspector An INSPECTOR instance to use in the inspection.
|
||||
* @param testData Arbitrary data used by the inspector.
|
||||
|
@ -442,8 +466,8 @@ public:
|
|||
* @return SEARCH_RESULT - SEARCH_QUIT if the Iterator is to stop the scan,
|
||||
* else SCAN_CONTINUE, and determined by the inspector.
|
||||
*/
|
||||
virtual SEARCH_RESULT Visit( INSPECTOR* inspector, const void* testData,
|
||||
const KICAD_T scanTypes[] );
|
||||
virtual SEARCH_RESULT Visit( INSPECTOR* inspector, const void* testData,
|
||||
const KICAD_T scanTypes[] );
|
||||
|
||||
|
||||
/**
|
||||
|
@ -457,7 +481,7 @@ public:
|
|||
}
|
||||
|
||||
|
||||
#if defined (DEBUG)
|
||||
#if defined(DEBUG)
|
||||
|
||||
/**
|
||||
* Function Show
|
||||
|
@ -466,7 +490,7 @@ public:
|
|||
* of nesting of this object within the overall tree.
|
||||
* @param os The ostream& to output to.
|
||||
*/
|
||||
virtual void Show( int nestLevel, std::ostream& os );
|
||||
virtual void Show( int nestLevel, std::ostream& os );
|
||||
|
||||
|
||||
/**
|
||||
|
@ -476,7 +500,7 @@ public:
|
|||
* @param os The ostream&, where to output
|
||||
* @return std::ostream& - for continuation.
|
||||
**/
|
||||
static std::ostream& NestedSpace( int nestLevel, std::ostream& os );
|
||||
static std::ostream& NestedSpace( int nestLevel, std::ostream& os );
|
||||
|
||||
#endif
|
||||
};
|
||||
|
@ -492,16 +516,17 @@ enum GRTextHorizJustifyType {
|
|||
|
||||
|
||||
enum GRTextVertJustifyType {
|
||||
GR_TEXT_VJUSTIFY_TOP = -1,
|
||||
GR_TEXT_VJUSTIFY_TOP = -1,
|
||||
GR_TEXT_VJUSTIFY_CENTER = 0,
|
||||
GR_TEXT_VJUSTIFY_BOTTOM = 1
|
||||
};
|
||||
|
||||
/* Options to show solid segments (segments, texts...) */
|
||||
enum GRTraceMode {
|
||||
FILAIRE = 0, // segments are drawn as lines
|
||||
FILLED, // normal mode: segments have thickness
|
||||
SKETCH // skect mode: segments have thickness, but are not filled
|
||||
FILAIRE = 0, // segments are drawn as lines
|
||||
FILLED, // normal mode: segments have thickness
|
||||
SKETCH // sketcg mode: segments have thickness, but are not
|
||||
// filled
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -524,8 +549,8 @@ enum FILL_T {
|
|||
|
||||
/**
|
||||
* Class EDA_TextStruct
|
||||
* is a basic class to handle texts (labels, texts on components or footprints ..)
|
||||
* not used directly.
|
||||
* is a basic class to handle texts (labels, texts on components or footprints
|
||||
* ..) not used directly.
|
||||
* The text classes are derived from EDA_BaseStruct and EDA_TextStruct
|
||||
*/
|
||||
class EDA_TextStruct
|
||||
|
@ -538,12 +563,15 @@ public:
|
|||
int m_Orient; /* Orient in 0.1 degrees */
|
||||
bool m_Mirror; /* Display Normal / mirror */
|
||||
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 ... */
|
||||
GRTextHorizJustifyType m_HJustify; /* Horiz justification */
|
||||
GRTextVertJustifyType m_VJustify; /* Vertical justification */
|
||||
bool m_MultilineAllowed; /* true to use multiline option, false to use only single line text
|
||||
* Single line is faster in calculations than multiline */
|
||||
bool m_MultilineAllowed; /* true to use multiline option, false
|
||||
* to use only single line text
|
||||
* Single line is faster in
|
||||
* calculations than multiline */
|
||||
|
||||
public:
|
||||
EDA_TextStruct( const wxString& text = wxEmptyString );
|
||||
|
@ -558,14 +586,16 @@ public:
|
|||
* @param EDA_Colors aColor = text color
|
||||
* @param aDrawMode = GR_OR, GR_XOR.., -1 to use the current mode.
|
||||
* @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,
|
||||
const wxPoint& aOffset, EDA_Colors aColor,
|
||||
int aDrawMode, GRTraceMode aDisplay_mode = FILAIRE,
|
||||
EDA_Colors aAnchor_color = UNSPECIFIED_COLOR );
|
||||
void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC,
|
||||
const wxPoint& aOffset, EDA_Colors aColor,
|
||||
int aDrawMode, GRTraceMode aDisplay_mode = FILAIRE,
|
||||
EDA_Colors aAnchor_color = UNSPECIFIED_COLOR );
|
||||
|
||||
private:
|
||||
|
||||
/** Function DrawOneLineOfText
|
||||
* Draw a single text line.
|
||||
* Used to draw each line of this EDA_TextStruct, that can be multiline
|
||||
|
@ -575,50 +605,56 @@ private:
|
|||
* @param EDA_Colors aColor = text color
|
||||
* @param aDrawMode = GR_OR, GR_XOR.., -1 to use the current mode.
|
||||
* @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 aPos = the position of this line ).
|
||||
*/
|
||||
void DrawOneLineOfText( WinEDA_DrawPanel* aPanel, wxDC* aDC,
|
||||
const wxPoint& aOffset, EDA_Colors aColor,
|
||||
int aDrawMode, GRTraceMode aFillMode,
|
||||
EDA_Colors aAnchor_color, wxString& aText,
|
||||
wxPoint aPos );
|
||||
void DrawOneLineOfText( WinEDA_DrawPanel* aPanel, wxDC* aDC,
|
||||
const wxPoint& aOffset, EDA_Colors aColor,
|
||||
int aDrawMode, GRTraceMode aFillMode,
|
||||
EDA_Colors aAnchor_color, wxString& aText,
|
||||
wxPoint aPos );
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Function TextHitTest
|
||||
* tests if the given wxPoint is within the bounds of this object.
|
||||
* @param ref_pos A wxPoint to test
|
||||
* @return bool - true if a hit, else false
|
||||
*/
|
||||
bool TextHitTest( const wxPoint& ref_pos );
|
||||
bool TextHitTest( const wxPoint& ref_pos );
|
||||
|
||||
/**
|
||||
* Function TextHitTest (overlayed)
|
||||
* Function TextHitTest (overloaded)
|
||||
* tests if the given EDA_Rect intersect this object.
|
||||
* For now, the anchor must be inside this rect.
|
||||
* @param refArea : the given EDA_Rect
|
||||
* @return bool - true if a hit, else false
|
||||
*/
|
||||
bool TextHitTest( EDA_Rect& refArea );
|
||||
bool TextHitTest( EDA_Rect& refArea );
|
||||
|
||||
/**
|
||||
* Function LenSize
|
||||
* @return the text lenght in internal units
|
||||
* @return the text length in internal units
|
||||
* @param aLine : the line of text to consider.
|
||||
* For single line text, this parameter is always m_Text
|
||||
*/
|
||||
int LenSize(const wxString & aLine) const;
|
||||
int LenSize( const wxString& aLine ) const;
|
||||
|
||||
/** Function GetTextBox
|
||||
* useful in multiline texts to calculate the full text or a line area (for zones filling, locate functions....)
|
||||
* @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
|
||||
* useful in multiline texts to calculate the full text or a line area (for
|
||||
* zones filling, locate functions....)
|
||||
* @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.
|
||||
* for single line text, aLine is unused
|
||||
* 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
|
||||
* return the distance between 2 text lines
|
||||
|
@ -626,7 +662,7 @@ public:
|
|||
*/
|
||||
int GetInterline()
|
||||
{
|
||||
return (( m_Size.y * 13 ) / 10) + m_Width;
|
||||
return ( ( m_Size.y * 13 ) / 10 ) + m_Width;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
|
||||
// Largeur du toolbar vertical
|
||||
#define VTOOLBAR_WIDTH 26
|
||||
|
||||
// dimension d'un tool vertical
|
||||
#define TOOL_SIZE 23
|
||||
|
||||
// Please keep list sorted alphabetically, ignoring case.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* This file is part of the common libary.
|
||||
* This file is part of the common library.
|
||||
* @file block_commande.h
|
||||
* @see common.h
|
||||
*/
|
||||
|
@ -18,19 +18,22 @@
|
|||
/**************************/
|
||||
/* class BLOCK_SELECTOR */
|
||||
/**************************/
|
||||
|
||||
/**
|
||||
* class BLOCK_SELECTOR is used to handle block selection and commands
|
||||
*/
|
||||
|
||||
/* Block state codes. */
|
||||
typedef enum {
|
||||
/* definition de l'etat du block */
|
||||
STATE_NO_BLOCK, /* Block non initialise */
|
||||
STATE_BLOCK_INIT, /* Block initialise: 1er point defini */
|
||||
STATE_BLOCK_END, /* Block initialise: 2eme point defini */
|
||||
STATE_BLOCK_MOVE, /* Block en deplacement */
|
||||
STATE_BLOCK_STOP /* Block fixe (fin de deplacement) */
|
||||
STATE_NO_BLOCK,
|
||||
STATE_BLOCK_INIT,
|
||||
STATE_BLOCK_END,
|
||||
STATE_BLOCK_MOVE,
|
||||
STATE_BLOCK_STOP
|
||||
} BlockState;
|
||||
|
||||
/* codes des differentes commandes sur block: */
|
||||
|
||||
/* Block command codes. */
|
||||
typedef enum {
|
||||
BLOCK_IDLE,
|
||||
BLOCK_MOVE,
|
||||
|
@ -53,45 +56,56 @@ typedef enum {
|
|||
class BLOCK_SELECTOR : public EDA_BaseStruct, public EDA_Rect
|
||||
{
|
||||
public:
|
||||
BlockState m_State; /* Stae (enum BlockState) of the block */
|
||||
CmdBlockType m_Command; /* Type (enum CmdBlockType) d'operation */
|
||||
PICKED_ITEMS_LIST m_ItemsSelection; /* list of items selected in this block */
|
||||
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 */
|
||||
BlockState m_State; /* State (enum BlockState)
|
||||
* of the block */
|
||||
CmdBlockType m_Command; /* Type (enum CmdBlockType)
|
||||
* operation */
|
||||
PICKED_ITEMS_LIST m_ItemsSelection; /* list of items selected
|
||||
* in this block */
|
||||
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 */
|
||||
|
||||
public:
|
||||
BLOCK_SELECTOR();
|
||||
~BLOCK_SELECTOR();
|
||||
|
||||
/** 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 );
|
||||
|
||||
/** Function SetMessageBlock
|
||||
* Displays the type of block command in the status bar of the window
|
||||
*/
|
||||
void SetMessageBlock( WinEDA_DrawFrame* frame );
|
||||
*/
|
||||
void SetMessageBlock( WinEDA_DrawFrame* frame );
|
||||
|
||||
void Draw( WinEDA_DrawPanel* aPanel,
|
||||
wxDC* aDC, const wxPoint& aOffset,
|
||||
int aDrawMode,
|
||||
int aColor );
|
||||
void Draw( WinEDA_DrawPanel* aPanel,
|
||||
wxDC* aDC, const wxPoint& aOffset,
|
||||
int aDrawMode,
|
||||
int aColor );
|
||||
|
||||
/** Function PushItem
|
||||
* Add aItem to the list of items
|
||||
* @param aItem = an ITEM_PICKER to add to the list
|
||||
*/
|
||||
void PushItem( ITEM_PICKER& aItem );
|
||||
void PushItem( ITEM_PICKER& aItem );
|
||||
|
||||
/** 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()
|
||||
{
|
||||
return m_ItemsSelection.GetCount();
|
||||
|
@ -100,17 +114,17 @@ public:
|
|||
|
||||
|
||||
/* 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
|
||||
* The first point of the rectangle showing the area is initialised
|
||||
/* Redraw the outlines of the block which shows the search area for block
|
||||
* commands
|
||||
* The first point of the rectangle showing the area is initialized
|
||||
* by InitBlockLocateDatas().
|
||||
* The other point of the rectangle is the mouse cursor
|
||||
*/
|
||||
void DrawAndSizingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
|
||||
void DrawAndSizingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
|
||||
|
||||
|
||||
#endif /* __INCLUDE__BLOCK_COMMANDE_H__ */
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**********************
|
||||
* class_base_screen.h
|
||||
* class_base_screen.h
|
||||
**********************/
|
||||
|
||||
/* define :
|
||||
|
@ -30,16 +30,17 @@ public:
|
|||
{
|
||||
if( this != &item )
|
||||
{
|
||||
m_Id = item.m_Id;
|
||||
m_Id = item.m_Id;
|
||||
m_Size = item.m_Size;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
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,72 +56,80 @@ WX_DECLARE_OBJARRAY( GRID_TYPE, GridArray );
|
|||
class BASE_SCREEN : public EDA_BaseStruct
|
||||
{
|
||||
public:
|
||||
wxPoint m_DrawOrg; /* offsets pour tracer le circuit sur l'ecran */
|
||||
wxPoint m_Curseur; /* Screen cursor coordinate (on grid) in user units. */
|
||||
wxPoint m_MousePosition; /* Mouse cursor coordinate (off grid) in user units. */
|
||||
wxPoint m_DrawOrg; /* offsets for drawing the circuit on the
|
||||
* screen */
|
||||
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_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)*/
|
||||
wxPoint m_ScrollbarPos; // Position effective des Curseurs de scroll
|
||||
wxSize m_ScrollbarNumber; /* Valeur effective des Nombres de Scrool
|
||||
* c.a.d taille en unites de scroll de la
|
||||
* surface totale affichable */
|
||||
wxPoint m_StartVisu; /* Coord absolues du 1er pixel visualis<69>a
|
||||
* l'ecran (en nombre de pixels) */
|
||||
wxPoint m_ScrollbarPos; // Position effective des Curseurs de scroll
|
||||
wxSize m_ScrollbarNumber; /* Current scroll bar posiition in scroll
|
||||
* units. */
|
||||
wxPoint m_StartVisu; /* Coordinates in drawing units of the current
|
||||
* view position (upper left corner of device)
|
||||
*/
|
||||
|
||||
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
|
||||
* navigation dans la hierarchie */
|
||||
bool m_Center; /* fix the coordinate (0,0) position on
|
||||
* screen : if TRUE (0,0) in centered on screen
|
||||
* TRUE: when coordinates can be < 0 and
|
||||
* > 0 all but schematic
|
||||
* FALSE: when coordinates can be only >= 0
|
||||
bool m_Center; /* Center on screen. If TRUE (0.0) is centered
|
||||
* on screen coordinates can be < 0 and
|
||||
* > 0 except for schematics.
|
||||
* FALSE: when coordinates can only be >= 0
|
||||
* Schematic */
|
||||
bool m_FirstRedraw;
|
||||
bool m_FirstRedraw;
|
||||
|
||||
SCH_ITEM* EEDrawList; /* Object list (main data) for schematic */
|
||||
|
||||
// Undo/redo list of commands
|
||||
UNDO_REDO_CONTAINER m_UndoList; /* Objects list for the undo command (old data) */
|
||||
UNDO_REDO_CONTAINER m_RedoList; /* Objects list for the redo command (old data) */
|
||||
unsigned m_UndoRedoCountMax; // undo/Redo command Max depth
|
||||
UNDO_REDO_CONTAINER m_UndoList; /* Objects list for the undo
|
||||
* command (old data) */
|
||||
UNDO_REDO_CONTAINER m_RedoList; /* Objects list for the redo
|
||||
* command (old data) */
|
||||
unsigned m_UndoRedoCountMax; // undo/Redo command Max depth
|
||||
|
||||
/* block control */
|
||||
BLOCK_SELECTOR m_BlockLocate; /* Block description for block commands */
|
||||
BLOCK_SELECTOR m_BlockLocate; /* Block description for block
|
||||
* commands */
|
||||
|
||||
/* Page description */
|
||||
Ki_PageDescr* m_CurrentSheetDesc;
|
||||
int m_ScreenNumber;
|
||||
int m_NumberOfScreen;
|
||||
int m_ScreenNumber;
|
||||
int m_NumberOfScreen;
|
||||
|
||||
wxString m_FileName;
|
||||
wxString m_Title; /* titre de la feuille */
|
||||
wxString m_Date; /* date de mise a jour */
|
||||
wxString m_Revision; /* code de revision */
|
||||
wxString m_Company; /* nom du proprietaire */
|
||||
wxString m_Commentaire1;
|
||||
wxString m_Commentaire2;
|
||||
wxString m_Commentaire3;
|
||||
wxString m_Commentaire4;
|
||||
wxString m_FileName;
|
||||
wxString m_Title;
|
||||
wxString m_Date;
|
||||
wxString m_Revision;
|
||||
wxString m_Company;
|
||||
wxString m_Commentaire1;
|
||||
wxString m_Commentaire2;
|
||||
wxString m_Commentaire3;
|
||||
wxString m_Commentaire4;
|
||||
|
||||
private:
|
||||
/* indicateurs divers */
|
||||
char m_FlagRefreshReq; /* indique que l'ecran doit redessine */
|
||||
char m_FlagModified; // indique modif du PCB,utilise pour eviter une sortie sans sauvegarde
|
||||
char m_FlagSave; // indique sauvegarde auto faite
|
||||
char m_FlagRefreshReq; /* indicates that the screen should
|
||||
* be redrawn */
|
||||
char m_FlagModified; // indicates current drawing has
|
||||
// been modified
|
||||
char m_FlagSave; // Perform automatica file save.
|
||||
EDA_BaseStruct* m_CurrentItem; ///< Currently selected object
|
||||
GRID_TYPE m_Grid; ///< Current grid selection.
|
||||
|
||||
/* Valeurs du pas de grille et du zoom */
|
||||
/* Grid and zoom values. */
|
||||
public:
|
||||
GridArray m_GridList;
|
||||
bool m_UserGridIsON;
|
||||
GridArray m_GridList;
|
||||
bool m_UserGridIsON;
|
||||
|
||||
wxArrayInt m_ZoomList; /* Array of standard zoom coefficients. */
|
||||
int m_Zoom; /* Current zoom coefficient. */
|
||||
int m_ZoomScalar; /* Allow zooming to non-integer increments. */
|
||||
bool m_IsPrinting;
|
||||
wxArrayInt m_ZoomList; /* Array of standard zoom coefficients. */
|
||||
int m_Zoom; /* Current zoom coefficient. */
|
||||
int m_ZoomScalar; /* Allow zooming to non-integer increments.
|
||||
*/
|
||||
bool m_IsPrinting;
|
||||
|
||||
public:
|
||||
BASE_SCREEN( KICAD_T aType = SCREEN_STRUCT_TYPE );
|
||||
|
@ -138,47 +147,54 @@ public:
|
|||
void SetCurItem( EDA_BaseStruct* current ) { m_CurrentItem = current; }
|
||||
EDA_BaseStruct* GetCurItem() const { return m_CurrentItem; }
|
||||
|
||||
void InitDatas(); /* Inits completes des variables */
|
||||
void InitDatas();
|
||||
|
||||
wxSize ReturnPageSize( void );
|
||||
virtual int GetInternalUnits( void );
|
||||
wxSize ReturnPageSize( void );
|
||||
virtual int GetInternalUnits( void );
|
||||
|
||||
/** Function CursorRealPosition
|
||||
* @return the position in user units of location ScreenPos
|
||||
* @param ScreenPos = the screen (in pixel) position co convert
|
||||
*/
|
||||
wxPoint CursorRealPosition( const wxPoint& ScreenPos );
|
||||
wxPoint CursorRealPosition( const wxPoint& ScreenPos );
|
||||
|
||||
/* general Undo/Redo command control */
|
||||
|
||||
/** function ClearUndoORRedoList (virtual).
|
||||
* this function must remove the aItemCount old commands from aList
|
||||
* 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
|
||||
* function that must be created for SCH_SCREEN and PCB_SCREEN
|
||||
* Because picked items must be deleted only if they are not in use, this
|
||||
* is a virtual pure function that must be created for SCH_SCREEN and
|
||||
* PCB_SCREEN
|
||||
* @param aList = the UNDO_REDO_CONTAINER of commands
|
||||
* @param aItemCount = number of old commands to delete. -1 to remove all old commands
|
||||
* this will empty the list of commands.
|
||||
* @param aItemCount = number of old commands to delete. -1 to remove all
|
||||
* old commands this will empty the list of commands.
|
||||
* 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
|
||||
* 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();
|
||||
|
||||
/** function PushCommandToUndoList
|
||||
* 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)
|
||||
*/
|
||||
virtual void PushCommandToUndoList( PICKED_ITEMS_LIST* aItem );
|
||||
|
||||
/** function PushCommandToRedoList
|
||||
* 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)
|
||||
*/
|
||||
virtual void PushCommandToRedoList( PICKED_ITEMS_LIST* aItem );
|
||||
|
@ -207,7 +223,6 @@ public:
|
|||
}
|
||||
|
||||
|
||||
/* Manipulation des flags */
|
||||
void SetRefreshReq() { m_FlagRefreshReq = 1; }
|
||||
void ClrRefreshReq() { m_FlagRefreshReq = 0; }
|
||||
void SetModify() { m_FlagModified = 1; m_FlagSave = 0; }
|
||||
|
@ -219,7 +234,7 @@ public:
|
|||
int IsSave() { return m_FlagSave & 1; }
|
||||
|
||||
|
||||
//----<zoom stuff>----------------------------------------------------------
|
||||
//----<zoom stuff>---------------------------------------------------------
|
||||
|
||||
/** Function GetScalingFactor
|
||||
* @return the the current scale used to draw items on screen
|
||||
|
@ -253,7 +268,8 @@ public:
|
|||
/**
|
||||
* Function SetZoomList
|
||||
* 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 );
|
||||
|
||||
|
@ -267,12 +283,13 @@ public:
|
|||
void Unscale( wxPoint& pt );
|
||||
void Unscale( wxSize& sz );
|
||||
|
||||
bool SetNextZoom(); /* ajuste le prochain coeff de zoom */
|
||||
bool SetPreviousZoom(); /* ajuste le precedent coeff de zoom */
|
||||
bool SetFirstZoom(); /* ajuste le coeff de zoom a 1*/
|
||||
bool SetLastZoom(); /* ajuste le coeff de zoom au max */
|
||||
bool SetNextZoom();
|
||||
bool SetPreviousZoom();
|
||||
bool SetFirstZoom();
|
||||
bool SetLastZoom();
|
||||
|
||||
//----<grid stuff>----------------------------------------------------------
|
||||
//----<grid
|
||||
// stuff>----------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Return the command ID of the currently selected grid.
|
||||
|
|
|
@ -3,22 +3,22 @@
|
|||
*
|
||||
* Copyright (C) 2007-2008 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 2004-2007 Kicad Developers, see change_log.txt for contributors.
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
|
@ -37,14 +37,14 @@ class EDA_BaseStruct;
|
|||
|
||||
/**
|
||||
* Class COLLECTOR
|
||||
* is an abstract class that will find and hold all the objects according to
|
||||
* is an abstract class that will find and hold all the objects according to
|
||||
* an inspection done by the Inspect() function which must be implemented by
|
||||
* any derived class. When Inspect() finds an object that it wants to collect,
|
||||
* i.e. one that it "likes", then it only has to do an Append( testItem )
|
||||
* i.e. one that it "likes", then it only has to do an Append( testItem )
|
||||
* on it to add it to its collection, but in all cases for the scan to continue,
|
||||
* Inspect() must return SEARCH_CONTINUE.
|
||||
*
|
||||
* Later, after collection, the user can iterate through all the objects
|
||||
* Later, after collection, the user can iterate through all the objects
|
||||
* in the remembered collection using GetCount() and the [int] operator.
|
||||
*/
|
||||
class COLLECTOR : public INSPECTOR
|
||||
|
@ -61,11 +61,11 @@ protected:
|
|||
|
||||
/// A bounding box to test against, and that was used to make the collection.
|
||||
EDA_Rect m_RefBox;
|
||||
|
||||
|
||||
/// The time at which the collection was made.
|
||||
int m_TimeAtCollection;
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
COLLECTOR()
|
||||
|
@ -77,7 +77,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Function GetCount
|
||||
* returns the number of objects in the list
|
||||
|
@ -87,7 +87,7 @@ public:
|
|||
return (int) m_List.size();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Function Empty
|
||||
* sets the list to empty
|
||||
|
@ -97,7 +97,7 @@ public:
|
|||
m_List.clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Function Append
|
||||
* adds an item to the end of the list.
|
||||
|
@ -142,7 +142,7 @@ public:
|
|||
return &m_List[0];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Function SetScanTypes
|
||||
* records the list of KICAD_T types to consider for collection by
|
||||
|
@ -154,7 +154,7 @@ public:
|
|||
{
|
||||
m_ScanTypes = scanTypes;
|
||||
}
|
||||
|
||||
|
||||
void SetTimeNow()
|
||||
{
|
||||
m_TimeAtCollection = GetTimeStamp();
|
||||
|
@ -169,12 +169,12 @@ public:
|
|||
|
||||
void SetBoundingBox( const EDA_Rect& aRefBox ) { m_RefBox = aRefBox; }
|
||||
const EDA_Rect& GetBoundingBox() const { return m_RefBox; }
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Function IsSimilarPointAndTime
|
||||
* returns true if the given reference point is "similar" (defined here)
|
||||
* to the internal reference point and the current time is within a few
|
||||
* returns true if the given reference point is "similar" (defined here)
|
||||
* to the internal reference point and the current time is within a few
|
||||
* seconds of the internal m_TimeAtCollection.
|
||||
*
|
||||
* @param aRefPos A wxPoint to compare to.
|
||||
|
@ -184,21 +184,21 @@ public:
|
|||
{
|
||||
const int distMax = 2; // adjust these here
|
||||
const int timeMax = 3; // seconds, I think
|
||||
|
||||
|
||||
int dx = abs( aRefPos.x - m_RefPos.x );
|
||||
int dy = abs( aRefPos.y - m_RefPos.y );
|
||||
|
||||
if( dx <= distMax && dy <= distMax
|
||||
|
||||
if( dx <= distMax && dy <= distMax
|
||||
&& GetTimeStamp()-m_TimeAtCollection <= timeMax )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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
|
||||
* that. It can also collect or modify the scanned objects.
|
||||
*
|
||||
|
@ -209,14 +209,14 @@ public:
|
|||
* else SCAN_CONTINUE;
|
||||
*
|
||||
* implement in derived class:
|
||||
SEARCH_RESULT virtual Inspect( EDA_BaseStruct* testItem,
|
||||
SEARCH_RESULT virtual Inspect( EDA_BaseStruct* testItem,
|
||||
const void* testData ) = 0;
|
||||
*/
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Function Collect
|
||||
* scans an EDA_BaseStruct using this class's Inspector method, which does
|
||||
* scans an EDA_BaseStruct using this class's Inspector method, which does
|
||||
* the collection.
|
||||
* @param container An EDA_BaseStruct to scan, including those items it contains.
|
||||
* @param aRefPos A wxPoint to use in hit-testing.
|
||||
|
@ -226,14 +226,14 @@ public:
|
|||
virtual void Collect( EDA_BaseStruct* container, const wxPoint& aRefPos )
|
||||
{
|
||||
example implementation:
|
||||
|
||||
|
||||
SetRefPos( aRefPos ); // remember where the snapshot was taken from
|
||||
|
||||
|
||||
Empty(); // empty the collection
|
||||
|
||||
|
||||
// visit the board with the INSPECTOR (me).
|
||||
container->Visit( this, // INSPECTOR* inspector
|
||||
NULL, // const void* testData,
|
||||
NULL, // const void* testData,
|
||||
m_ScanTypes);
|
||||
SetTimeNow(); // when it was taken
|
||||
}
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
* define class WinEDA_DrawPanel
|
||||
*************************************/
|
||||
|
||||
/* Doit etre inclus dans "wxstruch.h"
|
||||
*/
|
||||
|
||||
#ifndef PANEL_WXSTRUCT_H
|
||||
#define PANEL_WXSTRUCT_H
|
||||
|
||||
|
@ -17,49 +14,64 @@ class BASE_SCREEN;
|
|||
class PCB_SCREEN;
|
||||
|
||||
|
||||
/****************************************************/
|
||||
/* classe representant un ecran graphique de dessin */
|
||||
/****************************************************/
|
||||
|
||||
class WinEDA_DrawPanel : public wxScrolledWindow
|
||||
{
|
||||
public:
|
||||
WinEDA_DrawFrame* m_Parent;
|
||||
EDA_Rect m_ClipBox; // the clipbox used in screen redraw (usually gives the visible area in internal units)
|
||||
wxPoint m_CursorStartPos; // utile dans controles du mouvement curseur
|
||||
int m_ScrollButt_unit; // Valeur de l'unite de scroll en pixels pour les boutons de scroll
|
||||
EDA_Rect m_ClipBox; // the clipbox used in screen
|
||||
// redraw (usually gives the
|
||||
// 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_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
|
||||
int m_CanStartBlock; // >= 0 (or >= n) if a block can start
|
||||
bool m_PrintIsMirrored; // True when drawing in mirror mode. Used in draw arc function,
|
||||
// because arcs are oriented, and in mirror mode, orientations are reversed
|
||||
// usefull to avoid false start block in certain cases (like switch from a sheet to an other scheet
|
||||
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
|
||||
int m_CanStartBlock; // >= 0 (or >= n) if a block can
|
||||
// start
|
||||
bool m_PrintIsMirrored; // True when drawing in mirror
|
||||
// mode. Used in draw arc function,
|
||||
// because arcs are oriented, and
|
||||
// in mirror mode, orientations are
|
||||
// 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) */
|
||||
void (*ManageCurseur)( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); /* Fonction d'affichage sur deplacement souris
|
||||
* si erase : effacement ancien affichage */
|
||||
void (*ForceCloseManageCurseur)( WinEDA_DrawPanel* panel, wxDC* DC ); /* Fonction de fermeture forc<72>
|
||||
* de la fonction ManageCurseur */
|
||||
|
||||
/* Mouse capture move callback function prototype. */
|
||||
void (*ManageCurseur)( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
|
||||
|
||||
/* Abort managed cursor callback function prototype. */
|
||||
void (*ForceCloseManageCurseur)( WinEDA_DrawPanel* panel, wxDC* DC );
|
||||
|
||||
public:
|
||||
|
||||
// Constructor and destructor
|
||||
WinEDA_DrawPanel( WinEDA_DrawFrame* parent, int id, const wxPoint& pos,
|
||||
const wxSize& size );
|
||||
~WinEDA_DrawPanel();
|
||||
|
||||
/****************************/
|
||||
BASE_SCREEN* GetScreen();
|
||||
|
||||
|
||||
|
@ -69,7 +81,10 @@ public:
|
|||
void OnSize( wxSizeEvent& event );
|
||||
void SetBoundaryBox();
|
||||
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 DrawAuxiliaryAxis( wxDC* DC, int drawmode );
|
||||
void OnEraseBackground( wxEraseEvent& event );
|
||||
|
@ -83,8 +98,6 @@ public:
|
|||
|
||||
void OnPan( wxCommandEvent& event );
|
||||
|
||||
/*************************/
|
||||
|
||||
void EraseScreen( wxDC* DC );
|
||||
void OnScrollWin( wxCommandEvent& event );
|
||||
void OnScroll( wxScrollWinEvent& event );
|
||||
|
@ -100,7 +113,7 @@ public:
|
|||
|
||||
/** Function CursorRealPosition
|
||||
* @return the position in user units of location ScreenPos
|
||||
* @param ScreenPos = the screen (in pixel) position co convert
|
||||
* @param ScreenPos = the screen (in pixel) position to convert
|
||||
*/
|
||||
wxPoint CursorRealPosition( const wxPoint& ScreenPos );
|
||||
|
||||
|
@ -116,8 +129,8 @@ public:
|
|||
* along with any other recently posted rectangles is redrawn. Conversion
|
||||
* to pixels is done in here.
|
||||
* @param aRect The rectangle to append, it must be orthogonal
|
||||
* (vertical and horizontal edges only), and it must be [,) in nature, i.e.
|
||||
* [pos, dim) == [inclusive, exclusive)
|
||||
* (vertical and horizontal edges only), and it must be [,) in nature,
|
||||
* i.e. [pos, dim) == [inclusive, exclusive)
|
||||
*/
|
||||
void PostDirtyRect( EDA_Rect aRect );
|
||||
|
||||
|
@ -132,8 +145,9 @@ public:
|
|||
|
||||
/**
|
||||
* Function ConvertPcbUnitsToPixelsUnits
|
||||
* converts a given wxPoint position (in internal units) to units of pixels,
|
||||
* relative to the current draw area (origin 0,0 is the left top visible
|
||||
* converts a given wxPoint position (in internal units) to units of
|
||||
* 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.
|
||||
* @param aPosition = the position to convert
|
||||
*/
|
||||
|
@ -144,9 +158,16 @@ public:
|
|||
void MouseTo( const wxPoint& Mouse );
|
||||
|
||||
/* Cursor functions */
|
||||
void Trace_Curseur( wxDC* DC, int color = WHITE ); // Draw the user cursor (grid cursor)
|
||||
void CursorOff( wxDC* DC ); // remove the grid cursor from the display
|
||||
void CursorOn( wxDC* DC ); // display the grid cursor
|
||||
void Trace_Curseur( wxDC* DC, int color = WHITE ); // Draw the
|
||||
// user 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.
|
||||
|
|
|
@ -1,19 +1,17 @@
|
|||
/**************************************************************/
|
||||
/* pcbstruct.h : definition des structures de donnees type PCB */
|
||||
/**************************************************************/
|
||||
/****************/
|
||||
/* pcbstruct.h */
|
||||
/****************/
|
||||
|
||||
#ifndef __CLASSPCB_SCREEN_H__
|
||||
#define __CLASSPCB_SCREEN_H__
|
||||
|
||||
#
|
||||
|
||||
/* Handle info to display a board */
|
||||
class PCB_SCREEN : public BASE_SCREEN
|
||||
{
|
||||
public:
|
||||
int m_Active_Layer; /* ref couche active */
|
||||
int m_Route_Layer_TOP; /* ref couches actives */
|
||||
int m_Route_Layer_BOTTOM; /* pour placement vias et routage 2 couches */
|
||||
int m_Active_Layer;
|
||||
int m_Route_Layer_TOP;
|
||||
int m_Route_Layer_BOTTOM;
|
||||
|
||||
public:
|
||||
PCB_SCREEN();
|
||||
|
@ -29,10 +27,14 @@ public:
|
|||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
BOARD_ITEM* GetCurItem() const { return (BOARD_ITEM*) BASE_SCREEN::GetCurItem(); }
|
||||
BOARD_ITEM* GetCurItem() const
|
||||
{
|
||||
return (BOARD_ITEM*) BASE_SCREEN::GetCurItem();
|
||||
}
|
||||
|
||||
/**
|
||||
* Function SetCurItem
|
||||
|
@ -43,7 +45,7 @@ public:
|
|||
|
||||
|
||||
/* Return true if a microvia can be put on board
|
||||
* A microvia ia a small via restricted to 2 near neighbour layers
|
||||
* A microvia is a small via restricted to 2 near neighbor layers
|
||||
* 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
|
||||
* And it is allowed from an external layer to the first inner layer
|
||||
|
@ -51,6 +53,7 @@ public:
|
|||
bool IsMicroViaAcceptable( void );
|
||||
|
||||
/* full undo redo management : */
|
||||
|
||||
// use BASE_SCREEN::ClearUndoRedoList()
|
||||
// use BASE_SCREEN::PushCommandToUndoList( PICKED_ITEMS_LIST* aItem )
|
||||
// use BASE_SCREEN::PushCommandToRedoList( PICKED_ITEMS_LIST* aItem )
|
||||
|
@ -59,13 +62,14 @@ public:
|
|||
* free the undo or redo list from List element
|
||||
* Wrappers are deleted.
|
||||
* 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 aItemCount = the count of items to remove. < 0 for all items
|
||||
* items are removed from the beginning of the list.
|
||||
* So this function can be called to remove old commands
|
||||
*/
|
||||
void ClearUndoORRedoList( UNDO_REDO_CONTAINER& aList, int aItemCount = -1 );
|
||||
void ClearUndoORRedoList( UNDO_REDO_CONTAINER& aList, int aItemCount = -1 );
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1,20 +1,19 @@
|
|||
/********************/
|
||||
/* Fichier colors.h */
|
||||
/********************/
|
||||
/************/
|
||||
/* colors.h */
|
||||
/************/
|
||||
|
||||
#ifndef _COLORS_H
|
||||
#define _COLORS_H
|
||||
|
||||
/* Definitions des Numeros des Couleurs ( palette de 32) */
|
||||
/* Number of colors ( 32 bit palette. ) */
|
||||
#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 couleurs
|
||||
//IMB: Not used anymore #define ITEM_NOT_SHOW (1<<18) // 0x40000
|
||||
/// Flag bit display (seen / not seen) items: (defined in the color values
|
||||
//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,14 +101,13 @@ static inline wxColour MakeColour( int aColor )
|
|||
#endif
|
||||
int ndx = aColor & MASKCOLOR;
|
||||
|
||||
return wxColour(
|
||||
ColorRefs[ndx].m_Red,
|
||||
ColorRefs[ndx].m_Green,
|
||||
ColorRefs[ndx].m_Blue
|
||||
return wxColour( ColorRefs[ndx].m_Red,
|
||||
ColorRefs[ndx].m_Green,
|
||||
ColorRefs[ndx].m_Blue
|
||||
#if wxCHECK_VERSION(2,8,5)
|
||||
,(unsigned char) alpha
|
||||
,(unsigned char) alpha
|
||||
#endif
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
#endif /* ifndef _COLORS_H */
|
||||
|
|
237
include/common.h
237
include/common.h
|
@ -17,15 +17,19 @@ class WinEDA_DrawPanel;
|
|||
|
||||
|
||||
/* Flag for special keys */
|
||||
#define GR_KB_RIGHTSHIFT 0x10000000 /* Keybd states: right shift key depressed */
|
||||
#define GR_KB_LEFTSHIFT 0x20000000 /* left shift key depressed */
|
||||
#define GR_KB_CTRL 0x40000000 /* CTRL depressed */
|
||||
#define GR_KB_ALT 0x80000000 /* ALT depressed */
|
||||
#define GR_KB_SHIFT (GR_KB_LEFTSHIFT | GR_KB_RIGHTSHIFT)
|
||||
#define GR_KB_SHIFTCTRL (GR_KB_SHIFT | GR_KB_CTRL)
|
||||
#define MOUSE_MIDDLE 0x08000000 /* Middle button mouse flag for block commands */
|
||||
#define GR_KB_RIGHTSHIFT 0x10000000 /* Keybd states: right
|
||||
* shift key depressed */
|
||||
#define GR_KB_LEFTSHIFT 0x20000000 /* left shift key depressed
|
||||
*/
|
||||
#define GR_KB_CTRL 0x40000000 /* CTRL depressed */
|
||||
#define GR_KB_ALT 0x80000000 /* ALT depressed */
|
||||
#define GR_KB_SHIFT (GR_KB_LEFTSHIFT | GR_KB_RIGHTSHIFT)
|
||||
#define GR_KB_SHIFTCTRL (GR_KB_SHIFT | GR_KB_CTRL)
|
||||
#define MOUSE_MIDDLE 0x08000000 /* Middle button mouse
|
||||
* flag for block commands
|
||||
*/
|
||||
|
||||
#define NB_ITEMS 11
|
||||
#define NB_ITEMS 11
|
||||
|
||||
/* Pseudo key codes for command panning */
|
||||
enum pseudokeys {
|
||||
|
@ -62,8 +66,8 @@ enum pseudokeys {
|
|||
|
||||
|
||||
/* Graphic Texts Orientation in 0.1 degree*/
|
||||
#define TEXT_ORIENT_HORIZ 0
|
||||
#define TEXT_ORIENT_VERT 900
|
||||
#define TEXT_ORIENT_HORIZ 0
|
||||
#define TEXT_ORIENT_VERT 900
|
||||
|
||||
#define ON 1
|
||||
#define OFF 0
|
||||
|
@ -73,10 +77,10 @@ enum pseudokeys {
|
|||
#define CENTIMETRE 2
|
||||
|
||||
#if defined(KICAD_GOST)
|
||||
#define LEFTMARGIN 800 /* 20mm */
|
||||
#define RIGHTMARGIN 200 /* 5mm */
|
||||
#define TOPMARGIN 200 /* 5mm */
|
||||
#define BOTTOMMARGIN 200 /* 5mm */
|
||||
#define LEFTMARGIN 800 /* 20mm */
|
||||
#define RIGHTMARGIN 200 /* 5mm */
|
||||
#define TOPMARGIN 200 /* 5mm */
|
||||
#define BOTTOMMARGIN 200 /* 5mm */
|
||||
|
||||
#endif
|
||||
/* forward declarations: */
|
||||
|
@ -94,17 +98,17 @@ private:
|
|||
|
||||
public:
|
||||
WinEDA_TextFrame( wxWindow* parent, const wxString& title );
|
||||
void Append( const wxString& text );
|
||||
void Append( const wxString& text );
|
||||
|
||||
private:
|
||||
void D_ClickOnList( wxCommandEvent& event );
|
||||
void OnClose( wxCloseEvent& event );
|
||||
void D_ClickOnList( wxCommandEvent& event );
|
||||
void OnClose( wxCloseEvent& event );
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
||||
/* Clsass to handle pages sizes:
|
||||
/* Class to handle pages sizes:
|
||||
*/
|
||||
class Ki_PageDescr
|
||||
{
|
||||
|
@ -124,31 +128,31 @@ public:
|
|||
};
|
||||
|
||||
|
||||
extern Ki_PageDescr g_Sheet_A4;
|
||||
extern Ki_PageDescr g_Sheet_A3;
|
||||
extern Ki_PageDescr g_Sheet_A2;
|
||||
extern Ki_PageDescr g_Sheet_A1;
|
||||
extern Ki_PageDescr g_Sheet_A0;
|
||||
extern Ki_PageDescr g_Sheet_A;
|
||||
extern Ki_PageDescr g_Sheet_B;
|
||||
extern Ki_PageDescr g_Sheet_C;
|
||||
extern Ki_PageDescr g_Sheet_D;
|
||||
extern Ki_PageDescr g_Sheet_E;
|
||||
extern Ki_PageDescr g_Sheet_GERBER;
|
||||
extern Ki_PageDescr g_Sheet_user;
|
||||
extern Ki_PageDescr* g_SheetSizeList[];
|
||||
extern Ki_PageDescr g_Sheet_A4;
|
||||
extern Ki_PageDescr g_Sheet_A3;
|
||||
extern Ki_PageDescr g_Sheet_A2;
|
||||
extern Ki_PageDescr g_Sheet_A1;
|
||||
extern Ki_PageDescr g_Sheet_A0;
|
||||
extern Ki_PageDescr g_Sheet_A;
|
||||
extern Ki_PageDescr g_Sheet_B;
|
||||
extern Ki_PageDescr g_Sheet_C;
|
||||
extern Ki_PageDescr g_Sheet_D;
|
||||
extern Ki_PageDescr g_Sheet_E;
|
||||
extern Ki_PageDescr g_Sheet_GERBER;
|
||||
extern Ki_PageDescr g_Sheet_user;
|
||||
extern Ki_PageDescr* g_SheetSizeList[];
|
||||
|
||||
|
||||
extern wxString g_ProductName;
|
||||
extern wxString g_ProductName;
|
||||
|
||||
/* 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_MouseOldButtons;
|
||||
extern int g_KeyPressed;
|
||||
extern int g_DebugLevel;
|
||||
extern int g_MouseOldButtons;
|
||||
extern int g_KeyPressed;
|
||||
|
||||
extern bool g_ShowPageLimits; // TRUE to display the page limits
|
||||
extern bool g_ShowPageLimits; // TRUE to display the page limits
|
||||
|
||||
/* File name extension definitions. */
|
||||
extern const wxString ProjectFileExtension;
|
||||
|
@ -168,17 +172,18 @@ extern const wxString AllFilesWildcard;
|
|||
|
||||
|
||||
// Name of default configuration file. (kicad.pro)
|
||||
extern wxString g_Prj_Default_Config_FullFilename;
|
||||
// Name of local configuration file. (<curr projet>.pro)
|
||||
extern wxString g_Prj_Config_LocalFilename;
|
||||
extern wxString g_Prj_Default_Config_FullFilename;
|
||||
|
||||
extern int g_UnitMetric; // display units mm = 1, inches = 0, cm = 2
|
||||
// Name of local configuration file. (<curr projet>.pro)
|
||||
extern wxString g_Prj_Config_LocalFilename;
|
||||
|
||||
extern int g_UnitMetric; // display units mm = 1, inches = 0, cm = 2
|
||||
|
||||
/* Draw color for moving objects: */
|
||||
extern int g_GhostColor;
|
||||
extern int g_GhostColor;
|
||||
|
||||
/* Draw color for grid: */
|
||||
extern int g_GridColor;
|
||||
extern int g_GridColor;
|
||||
|
||||
/* Current used screen: (not used in eeshema)*/
|
||||
extern BASE_SCREEN* ActiveScreen;
|
||||
|
@ -187,41 +192,46 @@ extern BASE_SCREEN* ActiveScreen;
|
|||
/* COMMON.CPP */
|
||||
|
||||
/** function SetLocaleTo_C_standard
|
||||
because kicad is internationalized, switch internatization to "C" standard
|
||||
i.e. uses the . (dot) as separator in print/read float numbers
|
||||
(some contries (France, Germany ..) use , (comma) as separator)
|
||||
This function must be called before read or write ascii files using float 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
|
||||
*/
|
||||
void SetLocaleTo_C_standard(void);
|
||||
* because kicad is internationalized, switch internalization to "C" standard
|
||||
* i.e. uses the . (dot) as separator in print/read float numbers
|
||||
* (some countries (France, Germany ..) use , (comma) as separator)
|
||||
* This function must be called before read or write ascii files using float
|
||||
* 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
|
||||
*/
|
||||
void SetLocaleTo_C_standard( void );
|
||||
|
||||
/** function SetLocaleTo_Default
|
||||
because kicad is internationalized, switch internatization to default
|
||||
to use the default separator in print/read float numbers
|
||||
(. (dot) but some contries (France, Germany ..) use , (comma) as 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
|
||||
*/
|
||||
void SetLocaleTo_Default(void);
|
||||
* because kicad is internationalized, switch internalization to default
|
||||
* to use the default separator in print/read float numbers
|
||||
* (. (dot) but some countries (France, Germany ..) use , (comma) as
|
||||
* 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
|
||||
*/
|
||||
void SetLocaleTo_Default( void );
|
||||
|
||||
|
||||
/**
|
||||
* Function EnsureTextCtrlWidth
|
||||
* sets the minimum pixel width on a text control in order to make a text string
|
||||
* be fully visible within it. The current font within the text control is considered.
|
||||
* sets the minimum pixel width on a text control in order to make a text
|
||||
* 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.
|
||||
* If the text control is larger than needed, then nothing is done.
|
||||
* @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.
|
||||
* @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 );
|
||||
|
||||
|
||||
/**
|
||||
|
@ -232,19 +242,19 @@ bool EnsureTextCtrlWidth( wxTextCtrl* aCtrl, const wxString* aString = NULL );
|
|||
* @param aPoint The point to output.
|
||||
* @return wxString& - the input string
|
||||
*/
|
||||
wxString& operator <<( wxString& aString, const wxPoint& aPoint );
|
||||
wxString& operator <<( wxString& aString, const wxPoint& aPoint );
|
||||
|
||||
|
||||
/**
|
||||
* Function ProcessExecute
|
||||
* 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()
|
||||
* @return bool - true if success, else false
|
||||
*/
|
||||
bool ProcessExecute( const wxString& aCommandLine,
|
||||
int aFlags = wxEXEC_ASYNC );
|
||||
|
||||
bool ProcessExecute( const wxString& aCommandLine,
|
||||
int aFlags = wxEXEC_ASYNC );
|
||||
|
||||
|
||||
/**
|
||||
|
@ -252,22 +262,24 @@ bool ProcessExecute( const wxString& aCommandLine,
|
|||
* @return a wxString containing the name of the layer number "layer_number".
|
||||
* @param layer_number the layer number of the layer
|
||||
* @param is_filename if TRUE, the name can be used for a file name (not
|
||||
* internatinalized, no space)
|
||||
* internationalized, no space)
|
||||
*/
|
||||
wxString ReturnPcbLayerName( int layer_number, bool is_filename = FALSE );
|
||||
wxString ReturnPcbLayerName( int layer_number,
|
||||
bool is_filename = FALSE );
|
||||
|
||||
|
||||
/*******************/
|
||||
/* about_kicad.cpp */
|
||||
/*******************/
|
||||
void InitKiCadAbout( wxAboutDialogInfo& info);
|
||||
void InitKiCadAbout( wxAboutDialogInfo& info );
|
||||
|
||||
|
||||
/**************/
|
||||
/* common.cpp */
|
||||
/**************/
|
||||
wxString GetBuildVersion(); /* Return the build date */
|
||||
wxString GetAboutBuildVersion(); /* Return custom build date for about dialog */
|
||||
wxString GetBuildVersion(); /* Return the build date */
|
||||
wxString GetAboutBuildVersion(); /* Return custom build date for about
|
||||
* dialog */
|
||||
|
||||
/**
|
||||
* function Affiche_1_Parametre
|
||||
|
@ -281,18 +293,18 @@ wxString GetAboutBuildVersion(); /* Return custom build date for about dialog
|
|||
* If "by posting on this line
|
||||
* Color = color display
|
||||
*/
|
||||
void Affiche_1_Parametre( WinEDA_DrawFrame* frame,
|
||||
int pos_X,
|
||||
const wxString& texte_H,
|
||||
const wxString& texte_L,
|
||||
int color );
|
||||
void Affiche_1_Parametre( WinEDA_DrawFrame* frame,
|
||||
int pos_X,
|
||||
const wxString& texte_H,
|
||||
const wxString& texte_L,
|
||||
int color );
|
||||
|
||||
int GetTimeStamp();
|
||||
int GetTimeStamp();
|
||||
|
||||
int DisplayColorFrame( wxWindow* parent, int OldColor );
|
||||
int GetCommandOptions( const int argc, const char** argv,
|
||||
const char* stringtst, const char** optarg,
|
||||
int* optind );
|
||||
int DisplayColorFrame( wxWindow* parent, int OldColor );
|
||||
int GetCommandOptions( const int argc, const char** argv,
|
||||
const char* stringtst, const char** optarg,
|
||||
int* optind );
|
||||
|
||||
|
||||
/* Returns to display the value of a parameter, by type of units selected
|
||||
|
@ -302,7 +314,7 @@ int GetCommandOptions( const int argc, const char** argv,
|
|||
*/
|
||||
const wxString& valeur_param( int valeur, wxString& buf_texte );
|
||||
|
||||
wxString ReturnUnitSymbol( int Units = g_UnitMetric );
|
||||
wxString ReturnUnitSymbol( int Units = g_UnitMetric );
|
||||
|
||||
/**
|
||||
* Get a human readable units string.
|
||||
|
@ -313,10 +325,10 @@ wxString ReturnUnitSymbol( int Units = g_UnitMetric );
|
|||
* @param units - The units text to return.
|
||||
* @return The human readable units string.
|
||||
*/
|
||||
wxString GetUnitsLabel( int units );
|
||||
wxString GetUnitsLabel( int units );
|
||||
|
||||
int ReturnValueFromString( int Units, const wxString& TextValue,
|
||||
int Internal_Unit );
|
||||
int ReturnValueFromString( int Units, const wxString& TextValue,
|
||||
int Internal_Unit );
|
||||
|
||||
/** Function ReturnStringFromValue
|
||||
* Return the string from Value, according to units (inch, mm ...) for display,
|
||||
|
@ -325,40 +337,49 @@ int ReturnValueFromString( int Units, const wxString& TextValue,
|
|||
* @param aValue = value in Internal_Unit
|
||||
* @param aInternal_Unit = units per inch for 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,
|
||||
bool aAdd_unit_symbol = false );
|
||||
wxString ReturnStringFromValue( int aUnits,
|
||||
int aValue,
|
||||
int aInternal_Unit,
|
||||
bool aAdd_unit_symbol = false );
|
||||
|
||||
void AddUnitSymbol( wxStaticText& Stext, int Units = g_UnitMetric );
|
||||
void AddUnitSymbol( wxStaticText& Stext, int Units = g_UnitMetric );
|
||||
|
||||
/* Add string " (mm):" or " ("):" to the static text Stext.
|
||||
* Used in dialog boxes for entering values depending on selected units */
|
||||
void PutValueInLocalUnits( wxTextCtrl& TextCtr, int Value,
|
||||
int Internal_Unit );
|
||||
void PutValueInLocalUnits( wxTextCtrl& TextCtr, int Value,
|
||||
int Internal_Unit );
|
||||
|
||||
/* 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 */
|
||||
int ReturnValueFromTextCtrl( const wxTextCtrl& TextCtr,
|
||||
int Internal_Unit );
|
||||
* and the selected unit (g_UnitMetric) and put it in the wxTextCtrl TextCtrl
|
||||
**/
|
||||
int ReturnValueFromTextCtrl( const wxTextCtrl& TextCtr,
|
||||
int Internal_Unit );
|
||||
|
||||
/* return a String List from a string, whith a specific splitter*/
|
||||
wxArrayString* wxStringSplit(wxString txt, wxChar splitter);
|
||||
/* return a String List from a string, with a specific splitter*/
|
||||
wxArrayString* wxStringSplit( wxString txt, wxChar splitter );
|
||||
|
||||
/**
|
||||
* Function To_User_Unit
|
||||
* Convert in inch or mm the variable "val" (double)given in internal units
|
||||
* @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 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 );
|
||||
wxString GenDate();
|
||||
void MyFree( void* pt_mem );
|
||||
void* MyZMalloc( size_t nb_octets );
|
||||
void* MyMalloc( size_t nb_octets );
|
||||
int From_User_Unit( bool is_metric,
|
||||
double val,
|
||||
int internal_unit_value );
|
||||
wxString GenDate();
|
||||
void MyFree( void* pt_mem );
|
||||
void* MyZMalloc( size_t nb_octets );
|
||||
void* MyMalloc( size_t nb_octets );
|
||||
|
||||
#endif /* __INCLUDE__COMMON_H__ */
|
||||
|
|
|
@ -9,27 +9,17 @@
|
|||
#define __INCLUDE__CONFIRM_H__ 1
|
||||
|
||||
|
||||
void DisplayError( wxWindow* parent, const wxString& msg, int displaytime = 0 );
|
||||
void DisplayInfoMessage( wxWindow* parent, const wxString& msg, int displaytime = 0 );
|
||||
|
||||
/* Routines d'affichage messages ( disparait au bout de displaytime 0.1 secondes) */
|
||||
void DisplayError( wxWindow* parent, const wxString& msg,
|
||||
int displaytime = 0 );
|
||||
void DisplayInfoMessage( wxWindow* parent, const wxString& msg,
|
||||
int displaytime = 0 );
|
||||
|
||||
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,
|
||||
const wxString& frame_caption,
|
||||
wxString& buffer,
|
||||
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__ */
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* This file is part of the common libary.
|
||||
* This file is part of the common library.
|
||||
* @file eda_doc.h
|
||||
* @see common.h
|
||||
*/
|
||||
|
@ -8,29 +8,27 @@
|
|||
#define __INCLUDE__EDA_DOC_H__ 1
|
||||
|
||||
|
||||
|
||||
/* Recherche si dans le texte Database on retrouve tous les mots
|
||||
* cles donnes dans KeyList ( KeyList = suite de mots cles
|
||||
* separes par des espaces
|
||||
* Retourne:
|
||||
* 0 si aucun mot cle trouve
|
||||
* 1 si mot cle trouve
|
||||
/* Search the text Database for found all the key words in the KeyList.
|
||||
*
|
||||
* Returns:
|
||||
* 0 if no keyword is found
|
||||
* 1 if keyword found.
|
||||
*/
|
||||
int KeyWordOk( const wxString& KeyList,
|
||||
const wxString& Database );
|
||||
int KeyWordOk( const wxString& KeyList,
|
||||
const wxString& Database );
|
||||
|
||||
/** Function GetAssociatedDocument
|
||||
* open a document (file) with the suitable browser
|
||||
* @param aFrame = main frame
|
||||
* @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.
|
||||
* if NULL or aDocName is a full filename, aPath is not used.
|
||||
*/
|
||||
bool GetAssociatedDocument( wxFrame* aFrame,
|
||||
const wxString& aDocName,
|
||||
const wxPathList* aPaths = NULL );
|
||||
*/
|
||||
bool GetAssociatedDocument( wxFrame* aFrame,
|
||||
const wxString& aDocName,
|
||||
const wxPathList* aPaths = NULL );
|
||||
|
||||
|
||||
#endif /* __INCLUDE__EDA_DOC_H__ */
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************/
|
||||
/* includes systeme */
|
||||
/* System includes. */
|
||||
/********************/
|
||||
#ifndef FCTSYS_H
|
||||
#define FCTSYS_H
|
||||
|
@ -56,9 +56,10 @@
|
|||
|
||||
#define 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
|
||||
#define MAYBE_RESIZE_BORDER 0 // no resizeable border
|
||||
#define MAYBE_RESIZE_BORDER 0 // no resizeable border
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* This file is part of the common libary
|
||||
* This file is part of the common library
|
||||
* TODO brief description
|
||||
* @file gestfich.h
|
||||
* @see common.h
|
||||
|
@ -21,77 +21,56 @@ class WinEDAListBox;
|
|||
* @param file = PDF file to open
|
||||
* @return true is success, false if no PDF viewer found
|
||||
*/
|
||||
bool OpenPDF( const wxString& file );
|
||||
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 */
|
||||
wxString& Path, /* Chemin par defaut */
|
||||
int flag, /* reserve */
|
||||
wxWindow* Frame, /* parent frame */
|
||||
const wxPoint& Pos );
|
||||
bool EDA_DirectorySelector( const wxString& Title,
|
||||
wxString& Path,
|
||||
int flag, /* reserve */
|
||||
wxWindow* Frame,
|
||||
const wxPoint& Pos );
|
||||
|
||||
wxString EDA_FileSelector( const wxString &Title, /* Window title */
|
||||
const wxString &Path, /* default path */
|
||||
const wxString &FileName, /* default filename */
|
||||
const wxString &Ext, /* default extension */
|
||||
const wxString &Mask, /* Display filename mask */
|
||||
wxWindow * Frame, /* parent frame */
|
||||
int flag, /* wxSAVE, wxOPEN ..*/
|
||||
const bool keep_working_directory, /* true = do not change the C.W.D. */
|
||||
const wxPoint& Pos = wxPoint( -1, -1 )
|
||||
);
|
||||
wxString EDA_FileSelector( const wxString& Title,
|
||||
const wxString& Path,
|
||||
const wxString& FileName,
|
||||
const wxString& Ext,
|
||||
const wxString& Mask,
|
||||
wxWindow* Frame,
|
||||
int flag,
|
||||
const bool keep_working_directory,
|
||||
const wxPoint& Pos = wxPoint( -1, -1 ) );
|
||||
|
||||
|
||||
/* Calcule le nom complet d'un file d'apres les chaines
|
||||
* dir = prefixe (chemin)
|
||||
* shortname = nom avec ou sans chemin ou extension
|
||||
* ext = extension
|
||||
/* Return file name without path or extension.
|
||||
*
|
||||
* si la chaine name possede deja un chemin ou une extension, elles
|
||||
* ne seront pas modifiees
|
||||
*
|
||||
* retourne la chaine calculee */
|
||||
|
||||
wxString MakeReducedFileName( const wxString& fullfilename,
|
||||
const wxString& default_path,
|
||||
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)
|
||||
* 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.
|
||||
*/
|
||||
|
||||
WinEDAListBox* GetFileNames( char* Directory, char* Mask );
|
||||
wxString MakeReducedFileName( const wxString& fullfilename,
|
||||
const wxString& default_path,
|
||||
const wxString& default_ext );
|
||||
|
||||
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 );
|
||||
void AddDelimiterString( wxString& string );
|
||||
|
||||
wxString FindKicadHelpPath();
|
||||
void AddDelimiterString( wxString& string );
|
||||
|
||||
/* Find absolute path for kicad/help (or kicad/help/<language>) */
|
||||
wxString FindKicadHelpPath();
|
||||
|
||||
wxString ReturnKicadDatasPath();
|
||||
|
||||
/* Retourne le chemin des donnees communes de kicad. */
|
||||
/* Return the kicad common data path. */
|
||||
wxString ReturnKicadDatasPath();
|
||||
|
||||
wxString FindKicadFile( const wxString& shortname );
|
||||
|
||||
/* 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,
|
|||
wxPathFormat format = wxPATH_NATIVE );
|
||||
|
||||
#endif /* __INCLUDE__GESTFICH_H__ */
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**************/
|
||||
/* gr_basic.h */
|
||||
/**************/
|
||||
/**************/
|
||||
/* gr_basic.h */
|
||||
/**************/
|
||||
|
||||
#ifndef GR_BASIC
|
||||
#define GR_BASIC
|
||||
|
@ -10,121 +10,152 @@
|
|||
class EDA_Rect;
|
||||
|
||||
|
||||
/* Constantes utiles */
|
||||
#define GR_COPY 0
|
||||
#define GR_OR 0x01000000
|
||||
#define GR_XOR 0x02000000
|
||||
#define GR_AND 0x04000000
|
||||
#define GR_NXOR 0x08000000
|
||||
|
||||
#define GR_COPY 0
|
||||
#define GR_OR 0x01000000
|
||||
#define GR_XOR 0x02000000
|
||||
#define GR_AND 0x04000000
|
||||
#define GR_NXOR 0x08000000
|
||||
#define GR_SURBRILL 0x80000000
|
||||
|
||||
#define GR_SURBRILL 0x80000000
|
||||
|
||||
#define GR_M_LEFT_DOWN 0x10000000
|
||||
#define GR_M_RIGHT_DOWN 0x20000000
|
||||
#define GR_M_MIDDLE_DOWN 0x40000000
|
||||
#define GR_M_DCLICK 0x80000000
|
||||
#define GR_M_LEFT_DOWN 0x10000000
|
||||
#define GR_M_RIGHT_DOWN 0x20000000
|
||||
#define GR_M_MIDDLE_DOWN 0x40000000
|
||||
#define GR_M_DCLICK 0x80000000
|
||||
|
||||
|
||||
/* variables generales */
|
||||
extern int g_XorMode;
|
||||
extern int g_DrawBgColor;
|
||||
|
||||
|
||||
typedef enum { /* Line styles for Get/SetLineStyle. */
|
||||
typedef enum {
|
||||
/* Line styles for Get/SetLineStyle. */
|
||||
GR_SOLID_LINE = 0,
|
||||
GR_DOTTED_LINE = 1,
|
||||
GR_DASHED_LINE = 3
|
||||
} GRLineStypeType;
|
||||
|
||||
|
||||
/*******************************************************/
|
||||
/* Prototypage des fonctions definies dans gr_basic.cc */
|
||||
/*******************************************************/
|
||||
int GRMapX(int x);
|
||||
int GRMapY(int y);
|
||||
int GRMapX( int x );
|
||||
int GRMapY( int y );
|
||||
|
||||
class WinEDA_DrawPanel;
|
||||
|
||||
/* routines generales */
|
||||
void GRSetDrawMode(wxDC * DC, int mode);
|
||||
int GRGetDrawMode(wxDC * DC);
|
||||
void GRResetPenAndBrush(wxDC * DC);
|
||||
void GRSetColorPen(wxDC * DC, int Color , int width = 1, int stype = wxSOLID);
|
||||
void GRSetBrush(wxDC * DC, int Color , int fill = 0);
|
||||
void GRSetDrawMode( wxDC* DC, int mode );
|
||||
int GRGetDrawMode( wxDC* DC );
|
||||
void GRResetPenAndBrush( wxDC* DC );
|
||||
void GRSetColorPen( wxDC* DC, int Color, int width = 1, int stype = wxSOLID );
|
||||
void GRSetBrush( wxDC* DC, int Color, int fill = 0 );
|
||||
|
||||
/** function GRForceBlackPen
|
||||
* @param flagforce True to force a black pen whenever the asked color
|
||||
*/
|
||||
void GRForceBlackPen(bool flagforce );
|
||||
void GRForceBlackPen( bool flagforce );
|
||||
|
||||
/** function GetGRForceBlackPenState
|
||||
* @return ForceBlackPen (True if a black pen was forced)
|
||||
* @return ForceBlackPen (True if a black pen was forced)
|
||||
*/
|
||||
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 * 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, int width, int Color);
|
||||
void GRSMixedLine(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, int width, int Color);
|
||||
void GRSDashedLine(EDA_Rect * ClipBox, wxDC * DC, int x1, int y1, int x2, int y2, int width, int Color);
|
||||
void GRDashedLineTo(EDA_Rect * ClipBox,wxDC * DC, int x2, int y2, int width, int Color);
|
||||
void GRSDashedLineTo(EDA_Rect * ClipBox,wxDC * DC, int x2, int y2, 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 GRSMoveTo(int x, int y);
|
||||
void GRLineTo(EDA_Rect * ClipBox, wxDC * DC, int x, int y, 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 GRLine( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd,
|
||||
int aWidth, int aColor );
|
||||
void GRLine( 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,
|
||||
int width, int Color );
|
||||
void GRSMixedLine( 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,
|
||||
int width, int Color );
|
||||
void GRSDashedLine( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2,
|
||||
int y2, int width, int Color );
|
||||
void GRDashedLineTo( EDA_Rect* ClipBox, wxDC* DC, int x2, int y2, int width,
|
||||
int Color );
|
||||
void GRSDashedLineTo( EDA_Rect* ClipBox, wxDC* DC, int x2, int y2, 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 GRSMoveTo( int x, int y );
|
||||
void GRLineTo( EDA_Rect* ClipBox, wxDC* DC, int x, int y, 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 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);
|
||||
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
|
||||
* draws a closed polygon onto the drawing context \a aDC and optionally fills and/or
|
||||
* draws a border around it.
|
||||
* @param ClipBox defines a rectangular boundary outside of which no drawing will occur.
|
||||
* draws a closed polygon onto the drawing context \a aDC and optionally fills
|
||||
* and/or draws a border around it.
|
||||
* @param ClipBox defines a rectangular boundary outside of which no drawing
|
||||
* will occur.
|
||||
* @param aDC the device context into which drawing should occur.
|
||||
* @param aPointCount the number of points in the array \a aPointArray.
|
||||
* @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 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
|
||||
* draws a closed polygon onto the drawing context \a aDC and optionally fills and/or
|
||||
* draws a border around it.
|
||||
* @param ClipBox defines a rectangular boundary outside of which no drawing will occur.
|
||||
* draws a closed polygon onto the drawing context \a aDC and optionally fills
|
||||
* and/or draws a border around it.
|
||||
* @param ClipBox defines a rectangular boundary outside of which no drawing
|
||||
* will occur.
|
||||
* @param aDC the device context into which drawing should occur.
|
||||
* @param aPointCount the number of points in the array \a aPointArray.
|
||||
* @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 aPenWidth is the width of the pen to use on the perimeter, can be zero.
|
||||
* @param doFill true if polygon is to be filled, else false and only the
|
||||
* 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 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
|
||||
* 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 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.
|
||||
|
@ -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.
|
||||
* @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,
|
||||
int width, int Color, int BgColor);
|
||||
void GRSCircle(EDA_Rect * ClipBox, wxDC * DC, int x, int y, int r, int width, int Color);
|
||||
void GRSFilledCircle(EDA_Rect * ClipBox, wxDC * DC, int x, int y, int r,
|
||||
int width, int Color, int BgColor);
|
||||
void GRArc(EDA_Rect * ClipBox, wxDC * DC, int x, int y, int StAngle, int EndAngle, int r, int Color);
|
||||
void GRArc(EDA_Rect * ClipBox, wxDC * DC, int x, int y, int StAngle, int EndAngle, int r, int width, int Color);
|
||||
void GRArc1(EDA_Rect * ClipBox,wxDC * DC, int x1, int y1, int x2, int y2,
|
||||
int xc, int yc, int Color);
|
||||
void GRArc1(EDA_Rect * ClipBox,wxDC * DC, int x1, int y1, int x2, int y2,
|
||||
int xc, int yc, int width, int Color);
|
||||
void GRSArc1(EDA_Rect * ClipBox,wxDC * DC, int x1, int y1, int x2, int y2,
|
||||
int xc, int yc, int width, int Color);
|
||||
void GRSArc(EDA_Rect * ClipBox, wxDC * DC, int x, int y, int StAngle, int EndAngle, int r, int width, int Color);
|
||||
void GRFilledArc(EDA_Rect * ClipBox, wxDC * DC, int x, int y,
|
||||
int StAngle, int EndAngle, int r, int Color, int BgColor);
|
||||
void GRFilledArc(EDA_Rect * ClipBox, wxDC * DC, int x, int y,
|
||||
int StAngle, int EndAngle, int r, int width, int Color, int BgColor);
|
||||
void GRSFilledArc(EDA_Rect * ClipBox, wxDC * DC, int x, int y,
|
||||
int StAngle, int EndAngle, int r, int width, int Color, int BgColor);
|
||||
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 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,
|
||||
int width, int Color, int BgColor );
|
||||
void GRSCircle( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int r, int width,
|
||||
int Color );
|
||||
void GRSFilledCircle( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int r,
|
||||
int width, int Color, int BgColor );
|
||||
void GRArc( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int StAngle,
|
||||
int EndAngle, int r, int Color );
|
||||
void GRArc( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int StAngle,
|
||||
int EndAngle, int r, int width, int Color );
|
||||
void GRArc1( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
|
||||
int xc, int yc, int Color );
|
||||
void GRArc1( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
|
||||
int xc, int yc, int width, int Color );
|
||||
void GRSArc1( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
|
||||
int xc, int yc, int width, int Color );
|
||||
void GRSArc( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int StAngle,
|
||||
int EndAngle, int r, int width, int Color );
|
||||
void GRFilledArc( EDA_Rect* ClipBox, wxDC* DC, int x, int y,
|
||||
int StAngle, int EndAngle, int r, int Color, int BgColor );
|
||||
void GRFilledArc( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int StAngle,
|
||||
int EndAngle, int r, int width, int Color, int BgColor );
|
||||
void GRSFilledArc( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int StAngle,
|
||||
int EndAngle, int r, int width, int Color, int BgColor );
|
||||
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 GRSetColor( int Color );
|
||||
void GRSetDefaultPalette();
|
||||
int GRGetColor();
|
||||
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);
|
||||
int GRGetPixel(wxDC * DC, int x, int y);
|
||||
void GRFilledRect(EDA_Rect * ClipBox, wxDC * DC, int x1, int y1,
|
||||
int x2, int y2, int Color, int BgColor);
|
||||
void GRFilledRect(EDA_Rect * ClipBox, wxDC * DC, int x1, int y1,
|
||||
int x2, int y2, int width, int Color, int BgColor);
|
||||
void GRSFilledRect(EDA_Rect * ClipBox, wxDC * DC, int x1, int y1,
|
||||
int x2, int y2, int Color, int BgColor);
|
||||
void GRSFilledRect(EDA_Rect * ClipBox, wxDC * DC, int x1, int y1,
|
||||
int x2, int y2, int width, int Color, int BgColor);
|
||||
void GRRect(EDA_Rect * ClipBox, wxDC * DC, int x1, int y1,
|
||||
int x2, int y2, int Color);
|
||||
void GRRect(EDA_Rect * ClipBox, wxDC * DC, int x1, int y1,
|
||||
int x2, int y2, int width, int Color);
|
||||
void GRSRect(EDA_Rect * ClipBox, wxDC * DC, int x1, int y1,
|
||||
int x2, int y2, int Color);
|
||||
void GRSRect(EDA_Rect * ClipBox, wxDC * DC, int x1, int y1,
|
||||
int x2, int y2, int width, int Color);
|
||||
int GRGetColor();
|
||||
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 );
|
||||
int GRGetPixel( wxDC* DC, int x, int y );
|
||||
void GRFilledRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1,
|
||||
int x2, int y2, int Color, int BgColor );
|
||||
void GRFilledRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1,
|
||||
int x2, int y2, int width, int Color, int BgColor );
|
||||
void GRSFilledRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1,
|
||||
int x2, int y2, int Color, int BgColor );
|
||||
void GRSFilledRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1,
|
||||
int x2, int y2, int width, int Color, int BgColor );
|
||||
void GRRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1,
|
||||
int x2, int y2, int Color );
|
||||
void GRRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1,
|
||||
int x2, int y2, int width, int Color );
|
||||
void GRSRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1,
|
||||
int x2, int y2, int Color );
|
||||
void GRSRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1,
|
||||
int x2, int y2, int width, int Color );
|
||||
|
||||
|
||||
#endif /* define GR_BASIC */
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* This file is part of the common libary \n
|
||||
* This file is part of the common library \n
|
||||
* Custom string manipulation routines.
|
||||
* @file kicad_string.h
|
||||
* @see common.h, string.cpp
|
||||
|
@ -10,78 +10,74 @@
|
|||
#define __INCLUDE__KICAD_STRING_H__ 1
|
||||
|
||||
|
||||
char* strupper( char* Text );
|
||||
char* strlower( char* Text );
|
||||
char* strupper( char* Text );
|
||||
char* strlower( char* Text );
|
||||
|
||||
int ReadDelimitedText( char* dest,
|
||||
char* source,
|
||||
int NbMaxChar );
|
||||
/* 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,
|
||||
char* source,
|
||||
int NbMaxChar );
|
||||
|
||||
/* lit et place dans dest la chaine de caractere trouvee dans source,
|
||||
* delimitee par " .
|
||||
* transfere NbMaxChar max
|
||||
* retourne le nombre de codes lus dans source
|
||||
* dest est termine par NULL */
|
||||
/* Read one line line from a file.
|
||||
* Returns the first useful line read by eliminating blank lines and comments.
|
||||
*/
|
||||
char* GetLine( FILE* File,
|
||||
char* Line,
|
||||
int* LineNum = NULL,
|
||||
int SizeLine = 255 );
|
||||
|
||||
char* GetLine( FILE* File,
|
||||
char* Line,
|
||||
int* LineNum = NULL,
|
||||
int SizeLine = 255 );
|
||||
/* Remove leading and trailing whitespace.
|
||||
*/
|
||||
char* StrPurge( char* text );
|
||||
|
||||
/* Routine de lecture de 1 ligne utile
|
||||
* retourne la 1ere ligne utile lue.
|
||||
* elimine lignes vides et commentaires */
|
||||
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 );
|
||||
wxString DateAndTime();
|
||||
|
||||
char* DateAndTime( char* line );
|
||||
wxString DateAndTime();
|
||||
|
||||
/* Retourne la chaine de caractere donnant date+heure */
|
||||
|
||||
int StrLenNumCmp( const wxChar* str1,
|
||||
const wxChar* str2,
|
||||
int NbMax );
|
||||
|
||||
/*
|
||||
* routine (compatible qsort() ) de comparaision pour classement alphab<EFBFBD>tique
|
||||
* Analogue a strncmp() mais les nombres sont compar<EFBFBD>s selon leur valeur num<EFBFBD>rique
|
||||
* et non pas par leur code ascii */
|
||||
* 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,
|
||||
const wxChar* str2,
|
||||
int NbMax );
|
||||
|
||||
int StrNumICmp( const wxChar* str1,
|
||||
const wxChar* str2 );
|
||||
/*
|
||||
* Routine (compatible with qsort ()) to sort by case insensitive alphabetical
|
||||
* order.
|
||||
* Equivalent to strnicmp () but the numbers are compared by their integer
|
||||
* value not by their ASCII code.
|
||||
*/
|
||||
int StrNumICmp( const wxChar* str1,
|
||||
const wxChar* str2 );
|
||||
|
||||
/* routine (compatible qsort() ) de comparaison pour classement alphab<61>tique,
|
||||
* avec lower case == upper case.
|
||||
* Analogue a stricmp() mais les nombres sont compar<EFBFBD>s selon leur valeur num<EFBFBD>rique
|
||||
* et non pas par leur code ascii */
|
||||
|
||||
int StrLenNumICmp( const wxChar* str1,
|
||||
const wxChar* str2,
|
||||
int NbMax );
|
||||
int StrLenNumICmp( const wxChar* str1,
|
||||
const wxChar* str2,
|
||||
int NbMax );
|
||||
|
||||
/* routine (compatible qsort() ) de comparaison pour classement alphab<61>tique,
|
||||
* avec lower case == upper case.
|
||||
* Analogue a stricmp() mais les nombres sont compar<EFBFBD>s selon leur valeur num<EFBFBD>rique
|
||||
* et non pas par leur code ascii */
|
||||
/* Compare string against wild card pattern using the usual rules.
|
||||
* (Wildcards *,?).
|
||||
* The reference string is "pattern"
|
||||
* If case_sensitive == TRUE (default), exact comparison
|
||||
* Returns TRUE if pattern matched otherwise FALSE.
|
||||
*/
|
||||
|
||||
bool WildCompareString( const wxString& pattern,
|
||||
const wxString& string_to_tst,
|
||||
bool case_sensitive = TRUE );
|
||||
bool WildCompareString( const wxString& pattern,
|
||||
const wxString& string_to_tst,
|
||||
bool case_sensitive = TRUE );
|
||||
|
||||
/* compare 2 noms de composants, selon regles usuelles
|
||||
* ( 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 );
|
||||
|
||||
/* 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 */
|
||||
/* Replaces decimal point with commas to generated international numbers.
|
||||
*/
|
||||
char* to_point( char* Text );
|
||||
|
||||
|
||||
#endif /* __INCLUDE__KICAD_STRING_H__ */
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "pcbstruct.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 thickness */
|
||||
|
||||
class DPAD;
|
||||
class BOARD_ITEM;
|
||||
|
@ -44,8 +44,6 @@ extern int g_PadCUColor;
|
|||
extern int g_PadCMPColor;
|
||||
|
||||
|
||||
|
||||
/* variables generales */
|
||||
extern int g_TimeOut; // Timer for automatic saving
|
||||
extern int g_SaveTime; // Time for next saving
|
||||
|
||||
|
@ -59,7 +57,7 @@ extern DLIST<TRACK> g_CurrentTrackList;
|
|||
#define g_FirstTrackSegment \
|
||||
g_CurrentTrackList.GetFirst() ///< first segment created
|
||||
|
||||
extern PCB_SCREEN* ScreenPcb; /* Ecran principal */
|
||||
extern PCB_SCREEN* ScreenPcb;
|
||||
extern BOARD* g_ModuleEditor_Pcb;
|
||||
|
||||
/* Pad editing */
|
||||
|
|
|
@ -9,50 +9,48 @@
|
|||
#include "class_base_screen.h"
|
||||
#include "class_board_item.h"
|
||||
|
||||
// Definitions relatives aux libariries
|
||||
// Definitions relatives aux libraries
|
||||
#define ENTETE_LIBRAIRIE "PCBNEW-LibModule-V1"
|
||||
#define ENTETE_LIBDOC "PCBNEW-LibDoc----V1"
|
||||
#define L_ENTETE_LIB 18
|
||||
#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 FLAG0 (1 << 12) /* flag libre pour calculs locaux */
|
||||
#define BEGIN_ONPAD (1 << 11) /* flag indiquant un debut de segment sur pad */
|
||||
#define END_ONPAD (1 << 10) /* flag indiquant une fin de segment sur pad */
|
||||
#define BUSY (1 << 9) /* flag indiquant que la structure a deja
|
||||
* ete examinee, dans certaines routines */
|
||||
#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 */
|
||||
#define SURBRILL (1 << 5) /* element highlighted */
|
||||
#define DRAG (1 << 4) /* segment in drag mode */
|
||||
#define EDIT (1 << 3) /* element being edited */
|
||||
#define SEGM_FIXE (1 << 2) /* segment fixed (not erase global) */
|
||||
#define SEGM_AR (1 << 1) /* segment marked for auto routing */
|
||||
#define CHAIN (1 << 0) /* mark segment */
|
||||
|
||||
|
||||
/* Layer identification (layer number) */
|
||||
#define FIRST_COPPER_LAYER 0
|
||||
#define COPPER_LAYER_N 0
|
||||
#define LAYER_N_2 1 /* Numero layer 2 */
|
||||
#define LAYER_N_3 2 /* Numero layer 3 */
|
||||
#define LAYER_N_4 3 /* Numero layer 4 */
|
||||
#define LAYER_N_5 4 /* Numero layer 5 */
|
||||
#define LAYER_N_6 5 /* Numero layer 6 */
|
||||
#define LAYER_N_7 6 /* Numero layer 7 */
|
||||
#define LAYER_N_8 7 /* Numero layer 8 */
|
||||
#define LAYER_N_9 8 /* Numero layer 9 */
|
||||
#define LAYER_N_10 9 /* Numero layer 10 */
|
||||
#define LAYER_N_11 10 /* Numero layer 11 */
|
||||
#define LAYER_N_12 11 /* Numero layer 12 */
|
||||
#define LAYER_N_13 12 /* Numero layer 13 */
|
||||
#define LAYER_N_14 13 /* Numero layer 14 */
|
||||
#define LAYER_N_15 14 /* Numero layer 15 */
|
||||
#define LAYER_N_2 1
|
||||
#define LAYER_N_3 2
|
||||
#define LAYER_N_4 3
|
||||
#define LAYER_N_5 4
|
||||
#define LAYER_N_6 5
|
||||
#define LAYER_N_7 6
|
||||
#define LAYER_N_8 7
|
||||
#define LAYER_N_9 8
|
||||
#define LAYER_N_10 9
|
||||
#define LAYER_N_11 10
|
||||
#define LAYER_N_12 11
|
||||
#define LAYER_N_13 12
|
||||
#define LAYER_N_14 13
|
||||
#define LAYER_N_15 14
|
||||
#define LAYER_CMP_N 15
|
||||
#define CMP_N 15
|
||||
#define LAST_COPPER_LAYER 15
|
||||
|
@ -78,25 +76,22 @@
|
|||
#define LAYER_COUNT 32
|
||||
|
||||
|
||||
/*************************************/
|
||||
/* constantes de gestion des couches */
|
||||
/*************************************/
|
||||
#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_3 (1 << LAYER_N_3) ///< bit mask for layer 3
|
||||
#define LAYER_4 (1 << LAYER_N_4) ///< bit mask for layer 4
|
||||
#define LAYER_5 (1 << LAYER_N_5) ///< bit mask for layer 5
|
||||
#define LAYER_6 (1 << LAYER_N_6) ///< bit mask for layer 6
|
||||
#define LAYER_7 (1 << LAYER_N_7) ///< bit mask for layer 7
|
||||
#define LAYER_8 (1 << LAYER_N_8) ///< bit mask for layer 8
|
||||
#define LAYER_9 (1 << LAYER_N_9) ///< bit mask for layer 9
|
||||
#define LAYER_10 (1 << LAYER_N_10) ///< bit mask for layer 10
|
||||
#define LAYER_11 (1 << LAYER_N_11) ///< bit mask for layer 11
|
||||
#define LAYER_12 (1 << LAYER_N_12) ///< bit mask for layer 12
|
||||
#define LAYER_13 (1 << LAYER_N_13) ///< bit mask for layer 13
|
||||
#define LAYER_14 (1 << LAYER_N_14) ///< bit mask for layer 14
|
||||
#define LAYER_15 (1 << LAYER_N_15) ///< bit mask for layer 15
|
||||
#define CMP_LAYER (1 << LAYER_CMP_N) ///< bit mask for component 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_3 (1 << LAYER_N_3) ///< bit mask for layer 3
|
||||
#define LAYER_4 (1 << LAYER_N_4) ///< bit mask for layer 4
|
||||
#define LAYER_5 (1 << LAYER_N_5) ///< bit mask for layer 5
|
||||
#define LAYER_6 (1 << LAYER_N_6) ///< bit mask for layer 6
|
||||
#define LAYER_7 (1 << LAYER_N_7) ///< bit mask for layer 7
|
||||
#define LAYER_8 (1 << LAYER_N_8) ///< bit mask for layer 8
|
||||
#define LAYER_9 (1 << LAYER_N_9) ///< bit mask for layer 9
|
||||
#define LAYER_10 (1 << LAYER_N_10) ///< bit mask for layer 10
|
||||
#define LAYER_11 (1 << LAYER_N_11) ///< bit mask for layer 11
|
||||
#define LAYER_12 (1 << LAYER_N_12) ///< bit mask for layer 12
|
||||
#define LAYER_13 (1 << LAYER_N_13) ///< bit mask for layer 13
|
||||
#define LAYER_14 (1 << LAYER_N_14) ///< bit mask for layer 14
|
||||
#define LAYER_15 (1 << LAYER_N_15) ///< bit mask for layer 15
|
||||
#define CMP_LAYER (1 << LAYER_CMP_N) ///< bit mask for component layer
|
||||
#define ADHESIVE_LAYER_CU (1 << ADHESIVE_N_CU)
|
||||
#define ADHESIVE_LAYER_CMP (1 << ADHESIVE_N_CMP)
|
||||
#define SOLDERPASTE_LAYER_CU (1 << SOLDERPASTE_N_CU)
|
||||
|
@ -115,15 +110,14 @@
|
|||
#define LAST_NON_COPPER_LAYER EDGE_N
|
||||
|
||||
// extra bits 0xE0000000
|
||||
/* Helpful global layers maks : */
|
||||
/* Helpful global layers mask : */
|
||||
#define ALL_LAYERS 0x1FFFFFFF // Pcbnew used 29 layers
|
||||
#define FULL_LAYERS 0xFFFFFFFF // Gerbview used 32 layers
|
||||
#define ALL_NO_CU_LAYERS 0x1FFF0000
|
||||
#define ALL_CU_LAYERS 0x0000FFFF
|
||||
#define INTERNAL_LAYERS 0x00007FFE /* Bits layers internes */
|
||||
#define INTERNAL_LAYERS 0x00007FFE
|
||||
#define EXTERNAL_LAYERS 0x00008001
|
||||
|
||||
/* Forward declaration */
|
||||
class NETINFO_ITEM;
|
||||
class MARKER_PCB;
|
||||
class RATSNEST_ITEM;
|
||||
|
@ -155,7 +149,7 @@ enum ELEMENTS_NUMBERS
|
|||
* tests whether a given integer is a valid layer index
|
||||
* @param aLayerIndex = Layer index to test
|
||||
* @return true if aLayerIndex is a valid layer index
|
||||
*/
|
||||
*/
|
||||
inline bool IsValidLayerIndex( int aLayerIndex )
|
||||
{
|
||||
return aLayerIndex >= 0 && aLayerIndex < NB_LAYERS;
|
||||
|
@ -166,10 +160,11 @@ inline bool IsValidLayerIndex( int aLayerIndex )
|
|||
* tests whether an integer is a valid copper layer index
|
||||
* @param aLayerIndex = Layer index to test
|
||||
* @return true if aLayerIndex is a valid copper layer index
|
||||
*/
|
||||
*/
|
||||
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 )
|
|||
* tests whether an integer is a valid non copper layer index
|
||||
* @param aLayerIndex = Layer index to test
|
||||
* @return true if aLayerIndex is a valid non copper layer index
|
||||
*/
|
||||
*/
|
||||
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 {
|
|||
#include "class_module.h" // Class for the footprint
|
||||
#include "class_netinfo.h" // Class for nets
|
||||
|
||||
|
||||
/***********************************/
|
||||
/* Description des elements du PCB */
|
||||
/***********************************/
|
||||
|
||||
#include "class_drawsegment.h"
|
||||
#include "class_pcb_text.h"
|
||||
#include "class_cotation.h"
|
||||
|
@ -219,15 +210,23 @@ enum DisplayViaMode {
|
|||
#include "class_zone.h"
|
||||
|
||||
/* 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 clearance area
|
||||
*/
|
||||
enum ShowTrackClearanceModeList {
|
||||
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_AND_VIA_AREAS, /* Show clrearance areas only for new track during track creation,
|
||||
* and shows a via clearnce area at end of current new segment (guide to place a nev via
|
||||
*/
|
||||
SHOW_CLEARANCE_ALWAYS // Show Always clearance areas for track and vias
|
||||
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_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
|
||||
*/
|
||||
};
|
||||
|
||||
class DISPLAY_OPTIONS
|
||||
|
@ -241,13 +240,15 @@ public:
|
|||
|
||||
int DisplayModEdge;
|
||||
int DisplayModText;
|
||||
bool DisplayPcbTrackFill; /* FALSE = sketch , TRUE = filled */
|
||||
int ShowTrackClearanceMode; /* = 0 , 1 or 2
|
||||
* 0 = do not show clearance
|
||||
* 1 = show track clearance
|
||||
* 2 = show clearance + via area
|
||||
* (useful to know what clearance area is neede if we want to put a via on terminal track point)
|
||||
*/
|
||||
bool DisplayPcbTrackFill; /* FALSE = sketch , TRUE = filled */
|
||||
int ShowTrackClearanceMode; /* = 0 , 1 or 2
|
||||
* 0 = do not show clearance
|
||||
* 1 = show track clearance
|
||||
* 2 = show clearance + via area
|
||||
* (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,
|
||||
* 1 show via hole for non default value
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************/
|
||||
/* pyhandler.h */
|
||||
/* pyhandler.h */
|
||||
/****************************/
|
||||
|
||||
#ifndef PYHANDLER_H
|
||||
|
@ -37,15 +37,15 @@ protected:
|
|||
wxString name;
|
||||
std::vector< initfunc_t > registry;
|
||||
|
||||
ModuleRecord( const wxString &modName ) :
|
||||
name( modName )
|
||||
ModuleRecord( const wxString &modName ) :
|
||||
name( modName )
|
||||
{
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
std::vector< ModuleRecord > m_ModuleRegistry;
|
||||
|
||||
|
||||
void DoInitModules();
|
||||
|
||||
// Events
|
||||
|
@ -54,17 +54,17 @@ protected:
|
|||
wxString key;
|
||||
std::vector< boost::python::object > functors;
|
||||
|
||||
Event( const wxString &strKey ) :
|
||||
key( strKey )
|
||||
Event( const wxString &strKey ) :
|
||||
key( strKey )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
std::vector< Event > m_EventRegistry;
|
||||
|
||||
public:
|
||||
|
||||
// Singletton handling:
|
||||
// Singleton handling:
|
||||
static PyHandler* GetInstance();
|
||||
|
||||
~PyHandler();
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
/****************************************************/
|
||||
/* TRIGO.H : Tables de fonctions trigonometriques */
|
||||
/* utilisees dans les rotations d'axes */
|
||||
/****************************************************/
|
||||
/*************/
|
||||
/* trigo.h */
|
||||
/*************/
|
||||
|
||||
#ifndef 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 cx, int cy, int angle );
|
||||
void RotatePoint( wxPoint* point, 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, double cx, double cy, int angle );
|
||||
|
||||
/** function ArcTangente
|
||||
Retourne l'arc tangente en 0.1 degres du vecteur de coord dx, dy
|
||||
entre -1800 et 1800
|
||||
Analogue a atan2 ( mais plus rapide pour les caculs si
|
||||
l'angle est souvent 0, -1800, ou +- 900 */
|
||||
/* Return the arc tangent of 0.1 degrees coord vector dx, dy
|
||||
* between -1800 and 1800
|
||||
* Equivalent to atan2 (but faster for calculations if
|
||||
* the angle is 0 to -1800, or + - 900
|
||||
*/
|
||||
int ArcTangente( int dy, int dx );
|
||||
|
||||
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 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 de calcul de novelles coordonnees par rotation d'axe
|
||||
coord : xrot = y*sin + x*cos
|
||||
yrot = y*cos - x*sin
|
||||
soit : xrot = (y*tg + x)*cos
|
||||
yrot = (y - x*tg)*cos
|
||||
|
||||
les coeffs COS sont tabules en fct de tg sur 16 valeurs.
|
||||
*/
|
||||
/* Calculate coordinates to rotate around an axis
|
||||
* coord: xrot = y + x * sin * cos
|
||||
* yrot = y * cos - sin * x
|
||||
* either: xrot = (y + x * tg) * cos
|
||||
* yrot = (y - x * tg) * cos
|
||||
*
|
||||
* Cosine coefficients are loaded from a trigometric table by 16 bit values.
|
||||
*/
|
||||
#define NEW_COORD( x0, y0 ) \
|
||||
do { \
|
||||
int itmp; \
|
||||
|
|
|
@ -1,24 +1,19 @@
|
|||
/***************************************************/
|
||||
/* WORKSHEET.H: constantes pour trace du cartouche */
|
||||
/***************************************************/
|
||||
|
||||
/****************************/
|
||||
/* Description du cartouche */
|
||||
/****************************/
|
||||
/***************/
|
||||
/* worksheet.h */
|
||||
/***************/
|
||||
|
||||
/* Values are in 1/1000 inch */
|
||||
|
||||
#ifndef __WORKSHEET_H__
|
||||
#define __WORKSHEET_H__
|
||||
|
||||
#define GRID_REF_W 70 /* hauteur de la bande de reference grille */
|
||||
#define SIZETEXT 60 /* Dimension des textes du cartouche */
|
||||
#define SIZETEXT_REF 50 /* Dimension des lettres du marquage des reperes */
|
||||
#define PAS_REF 2000 /* pas des marquages de reference des reperes */
|
||||
#define GRID_REF_W 70 /* height of the band reference grid */
|
||||
#define SIZETEXT 60 /* worksheet text size */
|
||||
#define SIZETEXT_REF 50 /* worksheet frame reference text size */
|
||||
#define PAS_REF 2000 /* no reference markings on worksheet frame */
|
||||
#define TEXT_VTAB_HEIGHT SIZETEXT * 2
|
||||
|
||||
#if defined(KICAD_GOST)
|
||||
/* Shtamp */
|
||||
#define STAMP_OX 185 * 10000 / 254
|
||||
#define STAMP_OY 55 * 10000 / 254
|
||||
|
||||
|
@ -69,8 +64,8 @@
|
|||
#define STAMP_25 25 * 10000 / 254
|
||||
#endif
|
||||
|
||||
/* Les coord ci dessous sont relatives au coin bas - droit de la feuille, et
|
||||
* seront soustraires de cette origine
|
||||
/* The coordinates below are relative to the bottom right corner of page and
|
||||
* will be subtracted from this origin.
|
||||
*/
|
||||
#define BLOCK_OX 4200
|
||||
#define BLOCK_KICAD_VERSION_X BLOCK_OX - SIZETEXT
|
||||
|
@ -100,15 +95,15 @@
|
|||
struct Ki_WorkSheetData
|
||||
{
|
||||
public:
|
||||
int m_Type; /* nombre permettant de reconnaitre la description */
|
||||
int m_Type;
|
||||
Ki_WorkSheetData* Pnext;
|
||||
int m_Posx, m_Posy; /* position de l'element ou point de depart du segment */
|
||||
int m_Endx, m_Endy; /* extremite d'un element type segment ou cadre */
|
||||
const wxChar* m_Legende; /* Pour m_Textes: texte a afficher avant le texte lui meme */
|
||||
const wxChar* m_Text; /* Pour m_Textes:pointeur sur le texte a afficher */
|
||||
int m_Posx, m_Posy;
|
||||
int m_Endx, m_Endy;
|
||||
const wxChar* m_Legende;
|
||||
const wxChar* m_Text;
|
||||
};
|
||||
|
||||
/* Type des descriptions Ki_WorkSheetData */
|
||||
/* Work sheet structure type definitions. */
|
||||
enum TypeKi_WorkSheetData {
|
||||
WS_DATE,
|
||||
WS_REV,
|
||||
|
|
|
@ -54,10 +54,11 @@ public:
|
|||
bool m_DisplayViaFill; // How show vias
|
||||
bool m_DisplayPadNum; // show pads numbers
|
||||
|
||||
int m_DisplayModEdge; // How show module drawings
|
||||
int m_DisplayModText; // How show module texts
|
||||
bool m_DisplayPcbTrackFill; /* FALSE : tracks are show in sketch mode, TRUE = filled */
|
||||
int m_UserGridUnits;
|
||||
int m_DisplayModEdge; // How show module drawings
|
||||
int m_DisplayModText; // How show module texts
|
||||
bool m_DisplayPcbTrackFill; /* FALSE : tracks are show in sketch mode,
|
||||
* TRUE = filled */
|
||||
int m_UserGridUnits;
|
||||
wxRealPoint m_UserGridSize;
|
||||
|
||||
WinEDA3D_DrawFrame* m_Draw3DFrame;
|
||||
|
@ -91,52 +92,61 @@ public:
|
|||
|
||||
|
||||
// General
|
||||
virtual void OnCloseWindow( wxCloseEvent& Event ) = 0;
|
||||
virtual void OnCloseWindow( wxCloseEvent& Event ) = 0;
|
||||
|
||||
virtual void RedrawActiveWindow( wxDC* DC, bool EraseBg ) { }
|
||||
virtual void ReCreateHToolbar() = 0;
|
||||
virtual void ReCreateVToolbar() = 0;
|
||||
virtual void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) = 0;
|
||||
virtual void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) = 0;
|
||||
virtual bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ) = 0;
|
||||
virtual void ReCreateMenuBar();
|
||||
virtual void SetToolID( int id, int new_cursor_id,
|
||||
const wxString& title );
|
||||
virtual void UpdateStatusBar();
|
||||
virtual void RedrawActiveWindow( wxDC* DC, bool EraseBg ) { }
|
||||
virtual void ReCreateHToolbar() = 0;
|
||||
virtual void ReCreateVToolbar() = 0;
|
||||
virtual void OnLeftClick( wxDC* DC,
|
||||
const wxPoint& MousePos ) = 0;
|
||||
virtual void OnLeftDClick( wxDC* DC,
|
||||
const wxPoint& MousePos ) = 0;
|
||||
virtual bool OnRightClick( const wxPoint& MousePos,
|
||||
wxMenu* PopMenu ) = 0;
|
||||
virtual void ReCreateMenuBar();
|
||||
virtual void SetToolID( int id, int new_cursor_id,
|
||||
const wxString& title );
|
||||
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;
|
||||
|
||||
int BestZoom();
|
||||
int BestZoom();
|
||||
|
||||
virtual void Show3D_Frame( wxCommandEvent& event );
|
||||
virtual void Show3D_Frame( wxCommandEvent& event );
|
||||
|
||||
public:
|
||||
|
||||
// Read/write fonctions:
|
||||
EDA_BaseStruct* ReadDrawSegmentDescr( FILE* File, int* LineNum );
|
||||
int ReadListeSegmentDescr( FILE* File,
|
||||
TRACK* PtSegm, int StructType,
|
||||
int* LineNum, int NumSegm );
|
||||
// Read/write functions:
|
||||
EDA_BaseStruct* ReadDrawSegmentDescr( FILE* File, int* LineNum );
|
||||
int ReadListeSegmentDescr( FILE* File,
|
||||
TRACK* PtSegm,
|
||||
int StructType,
|
||||
int* LineNum,
|
||||
int NumSegm );
|
||||
|
||||
int ReadSetup( FILE* File, int* LineNum );
|
||||
int ReadGeneralDescrPcb( FILE* File, int* LineNum );
|
||||
int ReadSetup( FILE* File, int* LineNum );
|
||||
int ReadGeneralDescrPcb( FILE* File, int* LineNum );
|
||||
|
||||
|
||||
/**
|
||||
* Function PcbGeneralLocateAndDisplay
|
||||
* searches for an item under the mouse cursor.
|
||||
* Items are searched first on the current working layer.
|
||||
* If nothing found, an item will be searched without layer restriction. If
|
||||
* more than one item is found meeting the current working layer criterion, then
|
||||
* a popup menu is shown which allows the user to pick which item he/she is
|
||||
* interested in. Once an item is chosen, then it is make the "current item"
|
||||
* and the status window is updated to reflect this.
|
||||
* If nothing found, an item will be searched without layer restriction.
|
||||
* If more than one item is found meeting the current working layer
|
||||
* criterion, then a popup menu is shown which allows the user to pick
|
||||
* which item he/she is interested in. Once an item is chosen, then it
|
||||
* 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
|
||||
* type of search to be performed. If zero, then the mouse tools will be
|
||||
* tested instead.
|
||||
* @param aHotKeyCode The hotkey which relates to the caller and determines
|
||||
* the type of search to be performed. If zero, then
|
||||
* the mouse tools will be tested instead.
|
||||
*/
|
||||
BOARD_ITEM* PcbGeneralLocateAndDisplay( int aHotKeyCode = 0 );
|
||||
|
||||
|
@ -150,81 +160,97 @@ public:
|
|||
* of "selecting" an item more formal, and to indivisibly tie the operation
|
||||
* 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 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();
|
||||
|
||||
/**
|
||||
* 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();
|
||||
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* @param aPos The point to go to.
|
||||
*/
|
||||
void CursorGoto( const wxPoint& aPos );
|
||||
|
||||
|
||||
/* Place un repere sur l'ecran au point de coordonnees PCB pos */
|
||||
void place_marqueur( wxDC* DC, const wxPoint& pos, char* pt_bitmap,
|
||||
int DrawMode, int color, int type );
|
||||
void place_marqueur( wxDC* DC,
|
||||
const wxPoint& pos,
|
||||
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
|
||||
* Save in an existing library a given footprint
|
||||
* @param aLibName = name of the library to use
|
||||
* @param aModule = the given footprint
|
||||
* @param aOverwrite = true to overwrite an existing footprint, false to abort an existing footprint is found
|
||||
* @param aDisplayDialog = true to display a dialog to enter or confirm the footprint name
|
||||
* @param aOverwrite = true to overwrite an existing footprint, false to
|
||||
* 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
|
||||
* @return : 1 if OK,0 if abort
|
||||
*/
|
||||
int Save_Module_In_Library( const wxString& aLibName,
|
||||
MODULE* aModule, bool aOverwrite,
|
||||
bool aDisplayDialog, bool aCreateDocFile );
|
||||
int Save_Module_In_Library( const wxString& aLibName,
|
||||
MODULE* aModule,
|
||||
bool aOverwrite,
|
||||
bool aDisplayDialog,
|
||||
bool aCreateDocFile );
|
||||
|
||||
void Archive_Modules( const wxString& LibName, bool NewModulesOnly );
|
||||
MODULE* Select_1_Module_From_BOARD( BOARD* Pcb );
|
||||
MODULE* GetModuleByName();
|
||||
void Archive_Modules( const wxString& LibName,
|
||||
bool NewModulesOnly );
|
||||
MODULE* Select_1_Module_From_BOARD( BOARD* Pcb );
|
||||
MODULE* GetModuleByName();
|
||||
|
||||
// Modules (footprints)
|
||||
MODULE* Create_1_Module( wxDC* DC, const wxString& module_name );
|
||||
void Edit_Module( MODULE* module, wxDC* DC );
|
||||
void Rotate_Module( wxDC* DC,
|
||||
MODULE* module,
|
||||
int angle,
|
||||
bool incremental );
|
||||
void Place_Module( MODULE* module,
|
||||
wxDC* DC,
|
||||
bool aDoNotRecreateRatsnest = false );
|
||||
MODULE* Create_1_Module( wxDC* DC,
|
||||
const wxString& module_name );
|
||||
void Edit_Module( MODULE* module, wxDC* DC );
|
||||
void Rotate_Module( wxDC* DC,
|
||||
MODULE* module,
|
||||
int angle,
|
||||
bool incremental );
|
||||
void Place_Module( MODULE* module,
|
||||
wxDC* DC,
|
||||
bool aDoNotRecreateRatsnest = false );
|
||||
|
||||
// module texts
|
||||
void RotateTextModule( TEXTE_MODULE* Text, wxDC* DC );
|
||||
void DeleteTextModule( TEXTE_MODULE* Text );
|
||||
void PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC );
|
||||
void StartMoveTexteModule( TEXTE_MODULE* Text, wxDC* DC );
|
||||
TEXTE_MODULE* CreateTextModule( MODULE* Module, wxDC* DC );
|
||||
void RotateTextModule( TEXTE_MODULE* Text, wxDC* DC );
|
||||
void DeleteTextModule( TEXTE_MODULE* Text );
|
||||
void PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC );
|
||||
void StartMoveTexteModule( TEXTE_MODULE* Text,
|
||||
wxDC* DC );
|
||||
TEXTE_MODULE* CreateTextModule( MODULE* Module, wxDC* DC );
|
||||
|
||||
void InstallPadOptionsFrame( D_PAD* pad, wxDC* DC, const wxPoint& pos );
|
||||
void InstallTextModOptionsFrame( TEXTE_MODULE* TextMod, wxDC* DC );
|
||||
void InstallPadOptionsFrame( D_PAD* pad,
|
||||
wxDC* DC,
|
||||
const wxPoint& pos );
|
||||
void InstallTextModOptionsFrame( TEXTE_MODULE* TextMod,
|
||||
wxDC* DC );
|
||||
|
||||
// Pads sur modules
|
||||
void AddPad( MODULE* Module, bool draw );
|
||||
void DeletePad( D_PAD* Pad );
|
||||
void StartMovePad( D_PAD* Pad, wxDC* DC );
|
||||
void RotatePad( D_PAD* Pad, wxDC* DC );
|
||||
void PlacePad( D_PAD* Pad, wxDC* DC );
|
||||
void Export_Pad_Settings( D_PAD* aPad );
|
||||
void Import_Pad_Settings( D_PAD* aPad, bool aDraw );
|
||||
void Global_Import_Pad_Settings( D_PAD* aPad, bool aDraw );
|
||||
void AddPad( MODULE* Module, bool draw );
|
||||
void DeletePad( D_PAD* Pad );
|
||||
void StartMovePad( D_PAD* Pad, wxDC* DC );
|
||||
void RotatePad( D_PAD* Pad, wxDC* DC );
|
||||
void PlacePad( D_PAD* Pad, wxDC* DC );
|
||||
void Export_Pad_Settings( D_PAD* aPad );
|
||||
void Import_Pad_Settings( D_PAD* aPad, bool aDraw );
|
||||
void Global_Import_Pad_Settings( D_PAD* aPad,
|
||||
bool aDraw );
|
||||
|
||||
|
||||
// loading footprints
|
||||
|
@ -232,74 +258,93 @@ public:
|
|||
/** function Get_Librairie_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
|
||||
* @param aLibrary: the full filename of the library to read. If empty, all active libraries are read
|
||||
* 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 aModuleName = module name to load
|
||||
* @param aDisplayMessageError = true to display an error message if any.
|
||||
* @return a MODULE * pointer to the new module, or NULL
|
||||
*
|
||||
*/
|
||||
MODULE* Get_Librairie_Module( const wxString& aLibraryFullFilename,
|
||||
const wxString& aModuleName,
|
||||
bool aDisplayMessageError );
|
||||
MODULE* Get_Librairie_Module( const wxString& aLibraryFullFilename,
|
||||
const wxString& aModuleName,
|
||||
bool aDisplayMessageError );
|
||||
|
||||
/** Function Select_1_Module_From_List
|
||||
* 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 aMask = Display filter (wildcart)( Mask = wxEmptyString if not used )
|
||||
* @param aKeyWord = keyword list, to display a filtered list of module having one (or more) of these keyworks in their keywork list
|
||||
* ( aKeyWord = wxEmptyString if not used )
|
||||
* @param aLibraryFullFilename = library to list (if aLibraryFullFilename
|
||||
* == void, list all modules)
|
||||
* @param aMask = Display filter (wildcart)( Mask = wxEmptyString if not
|
||||
* 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,
|
||||
const wxString& aMask, const wxString& aKeyWord );
|
||||
|
||||
MODULE* Load_Module_From_Library( const wxString& library, wxDC* DC );
|
||||
MODULE* Load_Module_From_Library( const wxString& library, wxDC* DC );
|
||||
|
||||
// ratsnest functions
|
||||
void Compile_Ratsnest( wxDC* DC, bool affiche ); /* Recalcul complet du chevelu */
|
||||
int Test_1_Net_Ratsnest( wxDC* DC, int net_code );
|
||||
void build_ratsnest_module( wxDC* DC, MODULE* Module );
|
||||
void trace_ratsnest_module( wxDC* DC );
|
||||
void Build_Board_Ratsnest( wxDC* DC );
|
||||
void DrawGeneralRatsnest( wxDC* DC, int net_code = 0 );
|
||||
void trace_ratsnest_pad( wxDC* DC );
|
||||
void build_ratsnest_pad( BOARD_ITEM* ref,
|
||||
const wxPoint& refpos,
|
||||
bool init );
|
||||
void Compile_Ratsnest( wxDC* DC, bool affiche );
|
||||
int Test_1_Net_Ratsnest( wxDC* DC, int net_code );
|
||||
void build_ratsnest_module( wxDC* DC, MODULE* Module );
|
||||
void trace_ratsnest_module( wxDC* DC );
|
||||
void Build_Board_Ratsnest( wxDC* DC );
|
||||
void DrawGeneralRatsnest( wxDC* DC, int net_code = 0 );
|
||||
void trace_ratsnest_pad( wxDC* DC );
|
||||
void build_ratsnest_pad( BOARD_ITEM* ref,
|
||||
const wxPoint& refpos,
|
||||
bool init );
|
||||
|
||||
void Tst_Ratsnest( wxDC* DC, int ref_netcode );
|
||||
void test_connexions( wxDC* DC );
|
||||
void test_1_net_connexion( wxDC* DC, int net_code );
|
||||
void RecalculateAllTracksNetcode();
|
||||
void Tst_Ratsnest( wxDC* DC, int ref_netcode );
|
||||
void test_connexions( wxDC* DC );
|
||||
void test_1_net_connexion( wxDC* DC, int net_code );
|
||||
void RecalculateAllTracksNetcode();
|
||||
|
||||
/* Plotting functions:
|
||||
*/
|
||||
void ToPlotter( wxCommandEvent& event );
|
||||
void Genere_GERBER( const wxString& FullFileName, int Layer,
|
||||
bool PlotOriginIsAuxAxis, GRTraceMode trace_mode );
|
||||
void Genere_HPGL( const wxString& FullFileName, int Layer, GRTraceMode trace_mode );
|
||||
void Genere_PS( const wxString& FullFileName,
|
||||
void ToPlotter( wxCommandEvent& event );
|
||||
void Genere_GERBER( const wxString& FullFileName,
|
||||
int Layer,
|
||||
bool useA4,
|
||||
bool PlotOriginIsAuxAxis,
|
||||
GRTraceMode trace_mode );
|
||||
void Genere_DXF( const wxString& FullFileName, int Layer, GRTraceMode trace_mode );
|
||||
void Plot_Layer( PLOTTER* plotter, int Layer, GRTraceMode trace_mode );
|
||||
void Plot_Standard_Layer( PLOTTER* aPlotter, int aLayerMask,
|
||||
bool aPlotVia, GRTraceMode aPlotMode );
|
||||
void Plot_Serigraphie( PLOTTER* plotter, int masque_layer, GRTraceMode trace_mode );
|
||||
void Genere_HPGL( const wxString& FullFileName,
|
||||
int Layer,
|
||||
GRTraceMode trace_mode );
|
||||
void Genere_PS( const wxString& FullFileName,
|
||||
int Layer,
|
||||
bool useA4,
|
||||
GRTraceMode trace_mode );
|
||||
void Genere_DXF( const wxString& FullFileName,
|
||||
int Layer,
|
||||
GRTraceMode trace_mode );
|
||||
void Plot_Layer( PLOTTER* plotter,
|
||||
int Layer,
|
||||
GRTraceMode trace_mode );
|
||||
void Plot_Standard_Layer( PLOTTER* aPlotter, int aLayerMask,
|
||||
bool aPlotVia, GRTraceMode aPlotMode );
|
||||
void Plot_Serigraphie( PLOTTER* plotter,
|
||||
int masque_layer,
|
||||
GRTraceMode trace_mode );
|
||||
|
||||
/** function PlotDrillMark
|
||||
* Draw a drill mark for pads and vias.
|
||||
* 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 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:
|
||||
*/
|
||||
|
@ -314,7 +359,8 @@ public:
|
|||
*/
|
||||
virtual void SaveCopyInUndoList( BOARD_ITEM* aItemToCopy,
|
||||
UndoRedoOpType aTypeCommand,
|
||||
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ) = 0;
|
||||
const wxPoint& aTransformPoint =
|
||||
wxPoint( 0, 0 ) ) = 0;
|
||||
|
||||
/** Function SaveCopyInUndoList (virtual pure, overloaded).
|
||||
* Creates a new entry in undo list of commands.
|
||||
|
@ -326,7 +372,8 @@ public:
|
|||
*/
|
||||
virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
||||
UndoRedoOpType aTypeCommand,
|
||||
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ) = 0;
|
||||
const wxPoint& aTransformPoint =
|
||||
wxPoint( 0, 0 ) ) = 0;
|
||||
|
||||
|
||||
// layerhandling:
|
||||
|
@ -337,7 +384,6 @@ public:
|
|||
void SelectLayerPair();
|
||||
virtual void SwitchLayer( wxDC* DC, int layer );
|
||||
|
||||
// divers
|
||||
void InstallGridFrame( const wxPoint& pos );
|
||||
|
||||
/**
|
||||
|
|
|
@ -40,29 +40,35 @@ 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: public WinEDA_BasePcbFrame
|
||||
class WinEDA_PcbFrame : public WinEDA_BasePcbFrame
|
||||
{
|
||||
public:
|
||||
WinEDAChoiceBox* m_SelLayerBox; // a combo box to display and select active layer
|
||||
WinEDAChoiceBox* m_SelTrackWidthBox; // a combo box to display and select current track width
|
||||
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;
|
||||
WinEDAChoiceBox* m_SelLayerBox; // a combo box to display and
|
||||
// select active layer
|
||||
WinEDAChoiceBox* m_SelTrackWidthBox; // a combo box to display and
|
||||
// select current track width
|
||||
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_show_microwave_tools;
|
||||
bool m_show_microwave_tools;
|
||||
|
||||
private:
|
||||
|
||||
DRC* m_drc; ///< the DRC controller, see drc.cpp
|
||||
DRC* m_drc; ///< the DRC controller, see drc.cpp
|
||||
|
||||
// we'll use lower case function names for private member functions.
|
||||
void createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu* aPopMenu );
|
||||
|
@ -87,6 +93,7 @@ public:
|
|||
void InstallConfigFrame( const wxPoint& pos );
|
||||
void Process_Config( wxCommandEvent& event );
|
||||
void Update_config( wxWindow* displayframe );
|
||||
|
||||
/** Function Read_Config
|
||||
* Read the project configuration file
|
||||
* @param projectFileName = the config filename
|
||||
|
@ -96,7 +103,9 @@ public:
|
|||
*/
|
||||
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 );
|
||||
|
||||
void OnCloseWindow( wxCloseEvent& Event );
|
||||
|
@ -124,6 +133,7 @@ public:
|
|||
void ShowDesignRulesEditor( wxCommandEvent& event );
|
||||
|
||||
/* toolbars update UI functions: */
|
||||
|
||||
/**
|
||||
* Function UpdateToolbarLayerInfo
|
||||
* updates the currently selected layer in the layer listbox and
|
||||
|
@ -138,14 +148,14 @@ public:
|
|||
* update the displayed values on auxiliary horizontal toolbar
|
||||
* (track width, via sizes, clearance ...
|
||||
*/
|
||||
void AuxiliaryToolBar_Update_UI( );
|
||||
void AuxiliaryToolBar_Update_UI();
|
||||
|
||||
/**
|
||||
* Function AuxiliaryToolBar_DesignRules_Update_UI
|
||||
* update the displayed values: track width, via sizes, clearance
|
||||
* used when a ne netclass is selected
|
||||
* used when a new netclass is selected
|
||||
*/
|
||||
void AuxiliaryToolBar_DesignRules_Update_UI( );
|
||||
void AuxiliaryToolBar_DesignRules_Update_UI();
|
||||
|
||||
/* mouse functions events: */
|
||||
void OnLeftClick( wxDC* DC, const wxPoint& MousePos );
|
||||
|
@ -153,7 +163,8 @@ public:
|
|||
|
||||
/**
|
||||
* 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.
|
||||
* @param aMousePos The current mouse position
|
||||
* @param aPopMenu The menu to add to.
|
||||
|
@ -163,56 +174,70 @@ public:
|
|||
void OnSelectOptionToolbar( wxCommandEvent& event );
|
||||
void ToolOnRightClick( wxCommandEvent& event );
|
||||
|
||||
/** Function SaveCopyInUndoList.
|
||||
/** Function SaveCopyInUndoList.
|
||||
* Creates a new entry in undo list of commands.
|
||||
* add a picker to handle aItemToCopy
|
||||
* @param aItemToCopy = the board item modified by the command to undo
|
||||
* @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,
|
||||
const wxPoint& aTransformPoint = wxPoint(0,0) );
|
||||
virtual void SaveCopyInUndoList( BOARD_ITEM* aItemToCopy,
|
||||
UndoRedoOpType aTypeCommand,
|
||||
const wxPoint& aTransformPoint =
|
||||
wxPoint( 0, 0 ) );
|
||||
|
||||
/** Function SaveCopyInUndoList (overloaded).
|
||||
* Creates a new entry in undo list of commands.
|
||||
* add a list of pickers to handle a list of items
|
||||
* @param aItemsList = the list of items modified by the command to undo
|
||||
* @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,
|
||||
const wxPoint& aTransformPoint = wxPoint(0,0) );
|
||||
virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
||||
UndoRedoOpType aTypeCommand,
|
||||
const wxPoint& aTransformPoint =
|
||||
wxPoint( 0, 0 ) );
|
||||
|
||||
/** Function PutDataInPreviousState()
|
||||
* Used in undo or redo command.
|
||||
* Put data pointed by List in the previous state, i.e. the state memorised by List
|
||||
* @param aList = a PICKED_ITEMS_LIST pointer to the list of items to undo/redo
|
||||
* Put data pointed by List in the previous state, i.e. the state memorized
|
||||
* 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 aRebuildRatsnet = a bool: true to rebuid ratsnet (normal use), false
|
||||
* to just retrieve las state (used in abort commands that do not need to rebuild ratsnest)
|
||||
* @param aRebuildRatsnet = a bool: true to rebuild ratsnet (normal use),
|
||||
* 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
|
||||
* Redo the last edition:
|
||||
* - Save the current board in Undo list
|
||||
* - Get an old version of the board from Redo list
|
||||
* @return none
|
||||
*/
|
||||
void GetBoardFromRedoList(wxCommandEvent& event);
|
||||
void GetBoardFromRedoList( wxCommandEvent& event );
|
||||
|
||||
/** Function GetBoardFromUndoList
|
||||
* Undo the last edition:
|
||||
* - Save the current board in Redo list
|
||||
* - Get an old version of the board from Undo list
|
||||
* @return none
|
||||
*/
|
||||
void GetBoardFromUndoList(wxCommandEvent& event);
|
||||
|
||||
/* Gestion generale des operations sur block */
|
||||
int ReturnBlockCommand( int key );
|
||||
void HandleBlockPlace( wxDC* DC );
|
||||
int HandleBlockEnd( wxDC* DC );
|
||||
void GetBoardFromUndoList( wxCommandEvent& event );
|
||||
|
||||
/* Block operations: */
|
||||
|
||||
int ReturnBlockCommand( int key );
|
||||
void HandleBlockPlace( wxDC* DC );
|
||||
int HandleBlockEnd( wxDC* DC );
|
||||
|
||||
/**
|
||||
* Function Block_SelectItems
|
||||
* Uses GetScreen()->m_BlockLocate
|
||||
|
@ -220,81 +245,93 @@ public:
|
|||
* selected items are put in the pick list
|
||||
* @param none
|
||||
*/
|
||||
void Block_SelectItems( );
|
||||
void Block_SelectItems();
|
||||
|
||||
/**
|
||||
* Function Block_Delete
|
||||
* deletes all items within the selected block.
|
||||
* @param none
|
||||
*/
|
||||
void Block_Delete( );
|
||||
void Block_Delete();
|
||||
|
||||
/**
|
||||
* Function Block_Rotate
|
||||
* Rotate all items within the selected block.
|
||||
* The rotation centre is the centre of the block
|
||||
* The rotation center is the center of the block
|
||||
* @param none
|
||||
*/
|
||||
void Block_Rotate( );
|
||||
void Block_Rotate();
|
||||
|
||||
/**
|
||||
* Function Block_Flip
|
||||
* Flip items within the selected block.
|
||||
* The flip centre is the centre of the block
|
||||
* The flip center is the center of the block
|
||||
* @param none
|
||||
*/
|
||||
void Block_Flip( );
|
||||
void Block_Flip();
|
||||
|
||||
/**
|
||||
* Function Block_Move
|
||||
* 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
|
||||
*/
|
||||
void Block_Move( );
|
||||
void Block_Move();
|
||||
|
||||
/**
|
||||
* Function Block_Mirror_X
|
||||
* mirrors all items within the currently selected block in the X axis.
|
||||
* @param none
|
||||
*/
|
||||
void Block_Mirror_X( );
|
||||
void Block_Mirror_X();
|
||||
|
||||
/**
|
||||
* Function Block_Duplicate
|
||||
* 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
|
||||
*/
|
||||
void Block_Duplicate( );
|
||||
void Block_Duplicate();
|
||||
|
||||
|
||||
void SetToolbars();
|
||||
void Process_Settings( wxCommandEvent& event );
|
||||
void InstallPcbOptionsFrame( const wxPoint& pos, wxDC* DC, int id );
|
||||
void InstallDisplayOptionsDialog( wxCommandEvent& aEvent );
|
||||
void InstallPcbGlobalDeleteFrame( const wxPoint& pos );
|
||||
void SetToolbars();
|
||||
void Process_Settings( wxCommandEvent& event );
|
||||
void InstallPcbOptionsFrame( const wxPoint& pos,
|
||||
wxDC* DC,
|
||||
int id );
|
||||
void InstallDisplayOptionsDialog( wxCommandEvent& aEvent );
|
||||
void InstallPcbGlobalDeleteFrame( const wxPoint& pos );
|
||||
|
||||
void GenModulesPosition( wxCommandEvent& event );
|
||||
void GenModuleReport( wxCommandEvent& event );
|
||||
void InstallDrillFrame( wxCommandEvent& event );
|
||||
void ToPostProcess( wxCommandEvent& event );
|
||||
void GenModulesPosition( wxCommandEvent& event );
|
||||
void GenModuleReport( wxCommandEvent& event );
|
||||
void InstallDrillFrame( wxCommandEvent& event );
|
||||
void ToPostProcess( wxCommandEvent& event );
|
||||
|
||||
void OnFileHistory( wxCommandEvent& event );
|
||||
void Files_io( wxCommandEvent& event );
|
||||
bool LoadOnePcbFile( const wxString& FileName, bool Append );
|
||||
int ReadPcbFile( FILE* File, bool Append );
|
||||
bool SavePcbFile( const wxString& FileName );
|
||||
int SavePcbFormatAscii( FILE* File );
|
||||
bool WriteGeneralDescrPcb( FILE* File );
|
||||
void OnFileHistory( wxCommandEvent& event );
|
||||
void Files_io( wxCommandEvent& event );
|
||||
bool LoadOnePcbFile( const wxString& FileName, bool Append );
|
||||
int ReadPcbFile( FILE* File, bool Append );
|
||||
bool SavePcbFile( const wxString& FileName );
|
||||
int SavePcbFormatAscii( FILE* File );
|
||||
bool WriteGeneralDescrPcb( FILE* File );
|
||||
|
||||
// BOARD handling
|
||||
|
||||
/** function Clear_Pcb()
|
||||
* 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
|
||||
|
||||
/* function GetDrcController
|
||||
* @return the DRC controller
|
||||
*/
|
||||
DRC* GetDrcController() {return m_drc;} ///< return the DRC controller, see drc.cpp
|
||||
DRC* GetDrcController() { return m_drc; }
|
||||
|
||||
/**
|
||||
* Function RecreateBOMFileFromBoard
|
||||
|
@ -302,15 +339,15 @@ public:
|
|||
* this is the same as created by cvpcb.
|
||||
* can be used if this file is lost
|
||||
*/
|
||||
void RecreateCmpFileFromBoard(wxCommandEvent & aEvent);
|
||||
void RecreateCmpFileFromBoard( wxCommandEvent& aEvent );
|
||||
|
||||
/**
|
||||
* Function RecreateBOMFileFromBoard
|
||||
* 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 );
|
||||
|
||||
/**
|
||||
* Function ExporttoSPECCTRA
|
||||
|
@ -318,7 +355,7 @@ public:
|
|||
* See http://www.autotraxeda.com/docs/SPECCTRA/SPECCTRA.pdf for the
|
||||
* specification.
|
||||
*/
|
||||
void ExportToSpecctra( wxCommandEvent& event );
|
||||
void ExportToSpecctra( wxCommandEvent& event );
|
||||
|
||||
/**
|
||||
* Function ImportSpecctraSession
|
||||
|
@ -327,99 +364,104 @@ public:
|
|||
* See http://www.autotraxeda.com/docs/SPECCTRA/SPECCTRA.pdf for the
|
||||
* specification.
|
||||
*/
|
||||
void ImportSpecctraSession( wxCommandEvent& event );
|
||||
void ImportSpecctraSession( wxCommandEvent& event );
|
||||
|
||||
/**
|
||||
* Function ImportSpecctraDesign
|
||||
* 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
|
||||
* specification.
|
||||
*/
|
||||
void ImportSpecctraDesign( wxCommandEvent& event );
|
||||
void ImportSpecctraDesign( wxCommandEvent& event );
|
||||
|
||||
/**
|
||||
* Function Access_to_External_Tool
|
||||
* Run an external tool (like freeroute )
|
||||
*/
|
||||
void Access_to_External_Tool( wxCommandEvent& event );
|
||||
void Access_to_External_Tool( wxCommandEvent& event );
|
||||
|
||||
/* Fonctions specifiques */
|
||||
MODULE* ListAndSelectModuleName();
|
||||
MODULE* ListAndSelectModuleName();
|
||||
|
||||
/** Function ListNetsAndSelect
|
||||
* called by a command event
|
||||
* displays the sorted list of nets in a dialog frame
|
||||
* If a net is selected, it is hightlighted
|
||||
* If a net is selected, it is highlighted
|
||||
*/
|
||||
void ListNetsAndSelect( wxCommandEvent& event );
|
||||
void ListNetsAndSelect( wxCommandEvent& event );
|
||||
|
||||
void Swap_Layers( wxCommandEvent& event );
|
||||
void Install_Test_DRC_Frame( wxDC* DC );
|
||||
void Swap_Layers( wxCommandEvent& event );
|
||||
void Install_Test_DRC_Frame( wxDC* DC );
|
||||
|
||||
// Handling texts on the board
|
||||
void Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
|
||||
TEXTE_PCB* Create_Texte_Pcb( wxDC* DC );
|
||||
void Delete_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
|
||||
void StartMoveTextePcb( TEXTE_PCB* TextePcb, wxDC* DC );
|
||||
void Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
|
||||
void InstallTextPCBOptionsFrame( TEXTE_PCB* TextPCB, wxDC* DC );
|
||||
void Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
|
||||
TEXTE_PCB* Create_Texte_Pcb( wxDC* DC );
|
||||
void Delete_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
|
||||
void StartMoveTextePcb( TEXTE_PCB* TextePcb, wxDC* DC );
|
||||
void Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
|
||||
void InstallTextPCBOptionsFrame( TEXTE_PCB* TextPCB, wxDC* DC );
|
||||
|
||||
// Graphic Segments type DRAWSEGMENT
|
||||
void Start_Move_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC );
|
||||
void Place_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC );
|
||||
void InstallGraphicItemPropertiesDialog( DRAWSEGMENT* aItem, wxDC* aDC ); // Graphic items edition
|
||||
void Start_Move_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC );
|
||||
void Place_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC );
|
||||
void InstallGraphicItemPropertiesDialog( DRAWSEGMENT* aItem,
|
||||
wxDC* aDC );
|
||||
|
||||
// Footprint edition (see also WinEDA_BasePcbFrame)
|
||||
void InstallModuleOptionsFrame( MODULE* Module, wxDC * DC );
|
||||
void StartMove_Module( MODULE* module, wxDC* DC );
|
||||
bool Delete_Module( MODULE* module, wxDC* DC, bool aAskBeforeDeleting );
|
||||
void Change_Side_Module( MODULE* Module, wxDC* DC );
|
||||
void InstallModuleOptionsFrame( MODULE* Module, wxDC* DC );
|
||||
void StartMove_Module( MODULE* module, wxDC* DC );
|
||||
bool Delete_Module( MODULE* module,
|
||||
wxDC* DC,
|
||||
bool aAskBeforeDeleting );
|
||||
void Change_Side_Module( MODULE* Module, wxDC* DC );
|
||||
|
||||
void InstallExchangeModuleFrame( MODULE* ExchangeModuleModule );
|
||||
|
||||
void InstallExchangeModuleFrame( MODULE* ExchangeModuleModule );
|
||||
/** function Exchange_Module
|
||||
* Replaces OldModule by NewModule, using OldModule settings:
|
||||
* position, orientation, pad netnames ...)
|
||||
* OldModule is deleted or put in undo list.
|
||||
* @param aOldModule = footprint to replace
|
||||
* @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,
|
||||
MODULE* aNewModule,
|
||||
PICKED_ITEMS_LIST* aUndoPickList);
|
||||
void Exchange_Module( MODULE* aOldModule,
|
||||
MODULE* aNewModule,
|
||||
PICKED_ITEMS_LIST* aUndoPickList );
|
||||
|
||||
// loading modules: see WinEDA_BasePcbFrame
|
||||
|
||||
// Board handling
|
||||
void RemoveStruct( BOARD_ITEM* Item, wxDC* DC );
|
||||
void RemoveStruct( BOARD_ITEM* Item, wxDC* DC );
|
||||
|
||||
// Hightlight functions:
|
||||
int Select_High_Light( wxDC* DC );
|
||||
void Hight_Light( wxDC* DC );
|
||||
// Highlight functions:
|
||||
int Select_High_Light( wxDC* DC );
|
||||
void Hight_Light( wxDC* DC );
|
||||
|
||||
// Track and via edition:
|
||||
void Via_Edit_Control( wxCommandEvent& event );
|
||||
void Via_Edit_Control( wxCommandEvent& event );
|
||||
|
||||
/**
|
||||
* Function Other_Layer_Route
|
||||
* operates in one of two ways. If argument track is NULL, then swap the active
|
||||
* layer between m_Route_Layer_TOP and m_Route_Layer_BOTTOM. If a track is
|
||||
* in progress (track is not NULL), and if DRC allows it, place a via on the end
|
||||
* of the current track, and then swap the current active layer and start a new
|
||||
* segment on the new layer.
|
||||
* operates in one of two ways. If argument track is NULL, then swap the
|
||||
* active layer between m_Route_Layer_TOP and m_Route_Layer_BOTTOM. If a
|
||||
* track is in progress (track is not NULL), and if DRC allows it, place
|
||||
* a via on the end of the current track, and then swap the current active
|
||||
* layer and start a new segment on the new layer.
|
||||
* @param track A TRACK* to append the via to or NULL.
|
||||
* @param DC A device context to draw on.
|
||||
* @return bool - true if the operation was successful, else false such as
|
||||
* the case where DRC would not allow a via.
|
||||
* the case where DRC would not allow a via.
|
||||
*/
|
||||
bool Other_Layer_Route( TRACK* track, wxDC* DC );
|
||||
void Affiche_PadsNoConnect( wxDC* DC );
|
||||
void Affiche_Status_Net( wxDC* DC );
|
||||
TRACK* Delete_Segment( wxDC* DC, TRACK* Track );
|
||||
void Delete_Track( wxDC* DC, TRACK* Track );
|
||||
void Delete_net( wxDC* DC, TRACK* Track );
|
||||
void Remove_One_Track( wxDC* DC, TRACK* pt_segm );
|
||||
bool Other_Layer_Route( TRACK* track, wxDC* DC );
|
||||
void Affiche_PadsNoConnect( wxDC* DC );
|
||||
void Affiche_Status_Net( wxDC* DC );
|
||||
TRACK* Delete_Segment( wxDC* DC, TRACK* Track );
|
||||
void Delete_Track( wxDC* DC, TRACK* Track );
|
||||
void Delete_net( wxDC* DC, TRACK* Track );
|
||||
void Remove_One_Track( wxDC* DC, TRACK* pt_segm );
|
||||
|
||||
/** function Reset_All_Tracks_And_Vias_To_Netclass_Values
|
||||
* Reset all tracks width and/or vias diameters and drill
|
||||
|
@ -427,76 +469,91 @@ public:
|
|||
* @param aTrack : bool true to modify tracks
|
||||
* @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
|
||||
* Reset all tracks width and vias diameters and drill
|
||||
* to their default Netclass value ou current values
|
||||
* to their default Netclass value or current values
|
||||
* @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
|
||||
* 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 aTrackSegment = a segment or via on the track to change
|
||||
*/
|
||||
void Edit_Track_Width( wxDC* DC, TRACK* Track );
|
||||
void Edit_Track_Width( wxDC* DC, TRACK* Track );
|
||||
|
||||
/** Function Edit_TrackSegm_Width
|
||||
* Modify one track segment width or one via diameter (using DRC control).
|
||||
* @param DC = the current device context (can be NULL)
|
||||
* @param aTrackItem = the track segment or via to modify
|
||||
*/
|
||||
void Edit_TrackSegm_Width( wxDC* DC, TRACK* segm );
|
||||
TRACK* Begin_Route( TRACK* track, wxDC* DC );
|
||||
void End_Route( TRACK* track, wxDC* DC );
|
||||
void ExChange_Track_Layer( TRACK* pt_segm, wxDC* DC );
|
||||
void Attribut_Segment( TRACK* track, wxDC* DC, bool Flag_On );
|
||||
void Attribut_Track( TRACK* track, wxDC* DC, bool Flag_On );
|
||||
void Attribut_net( wxDC* DC, int net_code, bool Flag_On );
|
||||
void Start_MoveOneNodeOrSegment( TRACK* track, wxDC* DC, int command );
|
||||
bool PlaceDraggedOrMovedTrackSegment( TRACK* Track, wxDC* DC );
|
||||
bool MergeCollinearTracks( TRACK* track, wxDC* DC, int end );
|
||||
void Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC );
|
||||
void SwitchLayer( wxDC* DC, int layer );
|
||||
bool Add_45_degrees_Segment( wxDC* DC );
|
||||
bool Genere_Pad_Connexion( wxDC* DC, int layer );
|
||||
void Edit_TrackSegm_Width( wxDC* DC, TRACK* segm );
|
||||
TRACK* Begin_Route( TRACK* track, wxDC* DC );
|
||||
void End_Route( TRACK* track, wxDC* DC );
|
||||
void ExChange_Track_Layer( TRACK* pt_segm, wxDC* DC );
|
||||
void Attribut_Segment( TRACK* track, wxDC* DC, bool Flag_On );
|
||||
void Attribut_Track( TRACK* track, wxDC* DC, bool Flag_On );
|
||||
void Attribut_net( wxDC* DC, int net_code, bool Flag_On );
|
||||
void Start_MoveOneNodeOrSegment( TRACK* track, wxDC* DC, int command );
|
||||
bool PlaceDraggedOrMovedTrackSegment( TRACK* Track, wxDC* DC );
|
||||
bool MergeCollinearTracks( TRACK* track, wxDC* DC, int end );
|
||||
void Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC );
|
||||
void SwitchLayer( wxDC* DC, int layer );
|
||||
bool Add_45_degrees_Segment( wxDC* DC );
|
||||
bool Genere_Pad_Connexion( wxDC* DC, int layer );
|
||||
|
||||
/** function EraseRedundantTrack
|
||||
* 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)
|
||||
* @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 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,
|
||||
PICKED_ITEMS_LIST* aItemsListPicker );
|
||||
int EraseRedundantTrack( wxDC* aDC,
|
||||
TRACK* aNewTrack,
|
||||
int aNewTrackSegmentsCount,
|
||||
PICKED_ITEMS_LIST* aItemsListPicker );
|
||||
|
||||
/** Function SetTrackSegmentWidth
|
||||
* Modify one track segment width or one via diameter (using DRC control).
|
||||
* Basic routine used by other routines when editing tracks or vias
|
||||
* @param aTrackItem = the track segment or via to modify
|
||||
* @param aItemsListPicker = the list picker to use for an undo command (can be NULL)
|
||||
* @param aUseNetclassValue = true to use NetClass value, false to use g_DesignSettings value
|
||||
* @param aItemsListPicker = the list picker to use for an undo command
|
||||
* (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)
|
||||
*/
|
||||
bool SetTrackSegmentWidth( TRACK* aTrackItem, PICKED_ITEMS_LIST* aItemsListPicker, bool aUseNetclassValue );
|
||||
bool SetTrackSegmentWidth( TRACK* aTrackItem,
|
||||
PICKED_ITEMS_LIST* aItemsListPicker,
|
||||
bool aUseNetclassValue );
|
||||
|
||||
|
||||
// zone handling
|
||||
|
||||
/** Function Delete_Zone_Fill
|
||||
* Remove the zone filling which include the segment aZone, or the zone which have the given time stamp.
|
||||
* A zone is a group of segments which have the same TimeStamp
|
||||
* Remove the zone filling which include the segment aZone, or the zone
|
||||
* 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 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 );
|
||||
|
||||
|
||||
/** Function Delete_LastCreatedCorner
|
||||
|
@ -504,14 +561,14 @@ public:
|
|||
* Remove and delete the current outline segment in progress
|
||||
* @return 0 if no corner in list, or corner number
|
||||
*/
|
||||
int Delete_LastCreatedCorner( wxDC* DC );
|
||||
int Delete_LastCreatedCorner( wxDC* DC );
|
||||
|
||||
/**
|
||||
* Function Begin_Zone
|
||||
* initiates a zone edge creation process,
|
||||
* or terminates the current zone edge and creates a new zone edge stub
|
||||
*/
|
||||
int Begin_Zone( wxDC* DC );
|
||||
int Begin_Zone( wxDC* DC );
|
||||
|
||||
/**
|
||||
* Function End_Zone
|
||||
|
@ -519,7 +576,7 @@ public:
|
|||
* @param DC = current Device Context
|
||||
* @return true if Ok, false if DRC error
|
||||
*/
|
||||
bool End_Zone( wxDC* DC );
|
||||
bool End_Zone( wxDC* DC );
|
||||
|
||||
/** Function Fill_Zone()
|
||||
* Calculate the zone filling for the outline zone_container
|
||||
|
@ -530,7 +587,7 @@ public:
|
|||
* @param verbose = true to show error messages
|
||||
* @return error level (0 = no error)
|
||||
*/
|
||||
int Fill_Zone( ZONE_CONTAINER* zone_container, bool verbose = TRUE );
|
||||
int Fill_Zone( ZONE_CONTAINER* zone_container, bool verbose = TRUE );
|
||||
|
||||
/** Function Fill_All_Zones()
|
||||
* Fill all zones on the board
|
||||
|
@ -538,7 +595,7 @@ public:
|
|||
* @param verbose = true to show error messages
|
||||
* @return error level (0 = no error)
|
||||
*/
|
||||
int Fill_All_Zones( bool verbose = TRUE );
|
||||
int Fill_All_Zones( bool verbose = TRUE );
|
||||
|
||||
|
||||
/**
|
||||
|
@ -547,22 +604,22 @@ public:
|
|||
* @param DC = current Device Context
|
||||
* @param zone_container = parent zone outline
|
||||
*/
|
||||
void Add_Zone_Cutout( wxDC* DC, ZONE_CONTAINER* zone_container );
|
||||
void Add_Zone_Cutout( wxDC* DC, ZONE_CONTAINER* zone_container );
|
||||
|
||||
/**
|
||||
* Function Add_Similar_Zone
|
||||
* Add a zone to a given zone outline.
|
||||
* if the zones are overlappeing they will be merged
|
||||
* if the zones are overlapping they will be merged
|
||||
* @param DC = current Device Context
|
||||
* @param zone_container = parent zone outline
|
||||
*/
|
||||
void Add_Similar_Zone( wxDC* DC, ZONE_CONTAINER* zone_container );
|
||||
void Add_Similar_Zone( wxDC* DC, ZONE_CONTAINER* zone_container );
|
||||
|
||||
/**
|
||||
* Function Edit_Zone_Params
|
||||
* Edit params (layer, clearance, ...) for a zone outline
|
||||
*/
|
||||
void Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* zone_container );
|
||||
void Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* zone_container );
|
||||
|
||||
/**
|
||||
* Function Start_Move_Zone_Corner
|
||||
|
@ -570,18 +627,20 @@ public:
|
|||
* called from a move corner command (IsNewCorner = false),
|
||||
* or a create new cornet command (IsNewCorner = true )
|
||||
*/
|
||||
void Start_Move_Zone_Corner( wxDC* DC,
|
||||
ZONE_CONTAINER* zone_container,
|
||||
int corner_id,
|
||||
bool IsNewCorner );
|
||||
void Start_Move_Zone_Corner( wxDC* DC,
|
||||
ZONE_CONTAINER* zone_container,
|
||||
int corner_id,
|
||||
bool IsNewCorner );
|
||||
|
||||
/**
|
||||
* Function Start_Move_Zone_Corner
|
||||
* Prepares a drag edge in an existing zone outline,
|
||||
*/
|
||||
void Start_Move_Zone_Drag_Outline_Edge( wxDC* DC,
|
||||
ZONE_CONTAINER* zone_container,
|
||||
int corner_id );
|
||||
void Start_Move_Zone_Drag_Outline_Edge(
|
||||
wxDC* DC,
|
||||
ZONE_CONTAINER*
|
||||
zone_container,
|
||||
int corner_id );
|
||||
|
||||
/**
|
||||
* Function End_Move_Zone_Corner_Or_Outlines
|
||||
|
@ -589,7 +648,10 @@ public:
|
|||
* @param DC = current Device Context (can be NULL)
|
||||
* @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
|
||||
|
@ -599,8 +661,9 @@ public:
|
|||
void Remove_Zone_Corner( wxDC* DC, ZONE_CONTAINER* zone_container );
|
||||
|
||||
/** Function Delete_Zone
|
||||
* Remove the zone which include the segment aZone, or the zone which have the given time stamp.
|
||||
* A zone is a group of segments which have the same TimeStamp
|
||||
* Remove the zone which include the segment aZone, or the zone which have
|
||||
* 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 zone_container = zone to modify
|
||||
* the member .m_CornerSelection is used to find the outline to remove.
|
||||
|
@ -611,18 +674,21 @@ public:
|
|||
|
||||
/**
|
||||
* Function Start_Move_Zone_Outlines
|
||||
* Initialise parametres to move an existing zone outlines.
|
||||
* Initialize parameters to move an existing zone outlines.
|
||||
* @param DC = current Device Context (can be NULL)
|
||||
* @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
|
||||
MIREPCB* Create_Mire( wxDC* DC );
|
||||
void Delete_Mire( MIREPCB* MirePcb, wxDC* DC );
|
||||
void StartMove_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:
|
||||
DRAWSEGMENT* Begin_DrawSegment( DRAWSEGMENT* Segment, int shape, wxDC* DC );
|
||||
|
@ -631,7 +697,9 @@ public:
|
|||
void Delete_Drawings_All_Layer( int aLayer );
|
||||
|
||||
// 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 );
|
||||
void Delete_Cotation( COTATION* Cotation, wxDC* DC );
|
||||
|
||||
|
@ -643,7 +711,7 @@ public:
|
|||
void AutoPlace( wxCommandEvent& event );
|
||||
|
||||
/** function OnOrientFootprints
|
||||
* install the dialog box for the comman Orient Footprints
|
||||
* install the dialog box for the common Orient Footprints
|
||||
*/
|
||||
void OnOrientFootprints( void );
|
||||
|
||||
|
@ -672,7 +740,6 @@ public:
|
|||
void ReadAutoroutedTracks( wxDC* DC );
|
||||
void GlobalRoute( wxDC* DC );
|
||||
|
||||
// divers
|
||||
void Show_1_Ratsnest( EDA_BaseStruct* item, wxDC* DC );
|
||||
void Ratsnest_On_Off( wxDC* DC );
|
||||
void Clean_Pcb( wxDC* DC );
|
||||
|
@ -683,7 +750,8 @@ public:
|
|||
* Function SendMessageToEESCHEMA
|
||||
* sends a message to the schematic editor so that it may move its cursor
|
||||
* 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 );
|
||||
|
||||
|
@ -767,11 +835,13 @@ public:
|
|||
void ToPrinter( wxCommandEvent& event );
|
||||
|
||||
// BOARD handling
|
||||
|
||||
/** function Clear_Pcb()
|
||||
* 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 );
|
||||
|
||||
/* handlers for block commands */
|
||||
int ReturnBlockCommand( int key );
|
||||
|
@ -782,51 +852,57 @@ public:
|
|||
|
||||
/* Undo and redo functions */
|
||||
public:
|
||||
/** Function SaveCopyInUndoList.
|
||||
|
||||
/** Function SaveCopyInUndoList.
|
||||
* Creates a new entry in undo list of commands.
|
||||
* add a picker to handle aItemToCopy
|
||||
* @param aItem = the board item modified by the command to undo
|
||||
* @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,
|
||||
const wxPoint& aTransformPoint = wxPoint(0,0) );
|
||||
virtual void SaveCopyInUndoList( BOARD_ITEM* aItem,
|
||||
UndoRedoOpType aTypeCommand,
|
||||
const wxPoint& aTransformPoint =
|
||||
wxPoint( 0, 0 ) );
|
||||
|
||||
/** Function SaveCopyInUndoList (overloaded).
|
||||
* Creates a new entry in undo list of commands.
|
||||
* add a list of pickers to handle a list of items
|
||||
* @param aItemsList = the list of items modified by the command to undo
|
||||
* @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,
|
||||
const wxPoint& aTransformPoint = wxPoint(0,0) );
|
||||
virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
||||
UndoRedoOpType aTypeCommand,
|
||||
const wxPoint& aTransformPoint =
|
||||
wxPoint( 0, 0 ) );
|
||||
|
||||
private:
|
||||
void GetComponentFromUndoList(wxCommandEvent& event);
|
||||
void GetComponentFromRedoList(wxCommandEvent& event);
|
||||
void GetComponentFromUndoList( wxCommandEvent& event );
|
||||
void GetComponentFromRedoList( wxCommandEvent& event );
|
||||
|
||||
public:
|
||||
|
||||
// Footprint edition
|
||||
void Place_Ancre( MODULE* module );
|
||||
void RemoveStruct( EDA_BaseStruct* Item );
|
||||
void Transform( MODULE* module, int transform );
|
||||
void Place_Ancre( MODULE* module );
|
||||
void RemoveStruct( EDA_BaseStruct* Item );
|
||||
void Transform( MODULE* module, int transform );
|
||||
|
||||
// loading Footprint
|
||||
MODULE* Import_Module( wxDC* DC );
|
||||
void Export_Module( MODULE* ptmod, bool createlib );
|
||||
void Load_Module_From_BOARD( MODULE* Module );
|
||||
MODULE* Import_Module( wxDC* DC );
|
||||
void Export_Module( MODULE* ptmod, bool createlib );
|
||||
void Load_Module_From_BOARD( MODULE* Module );
|
||||
|
||||
// functions to edit footprint edges
|
||||
|
||||
|
||||
/**
|
||||
* Function Edit_Edge_Width
|
||||
* changes the width of module perimeter lines, EDGE_MODULEs.
|
||||
* @param ModuleSegmentWidth (global) = new width
|
||||
* @param Edge = edge to edit, or NULL. If Edge == NULL change
|
||||
* the width of all the footprint's edges
|
||||
* the width of all the footprint's edges
|
||||
* @param DC = current Device Context
|
||||
*/
|
||||
void Edit_Edge_Width( EDGE_MODULE* Edge );
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/***********************************************************/
|
||||
/* wxstruct.h: */
|
||||
/* descriptions des principales classes derivees utilisees */
|
||||
/***********************************************************/
|
||||
/****************/
|
||||
/* wxstruct.h */
|
||||
/****************/
|
||||
|
||||
#ifndef WXSTRUCT_H
|
||||
#define WXSTRUCT_H
|
||||
|
@ -32,13 +31,11 @@
|
|||
#endif
|
||||
|
||||
// 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 | \
|
||||
MAYBE_RESIZE_BORDER
|
||||
|
||||
#define KICAD_DEFAULT_DRAWFRAME_STYLE wxDEFAULT_FRAME_STYLE | wxWANTS_CHARS
|
||||
|
||||
/* Forward declarations of classes. */
|
||||
class EDA_BaseStruct;
|
||||
class EDA_Rect;
|
||||
class WinEDA_DrawPanel;
|
||||
|
@ -110,8 +107,6 @@ public:
|
|||
#endif
|
||||
|
||||
public:
|
||||
|
||||
// Constructor and destructor
|
||||
WinEDA_BasicFrame( wxWindow* father, int idtype,
|
||||
const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size,
|
||||
|
@ -152,22 +147,31 @@ class WinEDA_DrawFrame : public WinEDA_BasicFrame
|
|||
{
|
||||
public:
|
||||
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_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_AuxiliaryToolBar; // Toolbar auxiliaire (utilis<69> dans pcbnew)
|
||||
WinEDA_Toolbar* m_AuxiliaryToolBar; // Auxiliay Toolbar used in pcbnew
|
||||
|
||||
WinEDAChoiceBox* m_SelGridBox; // Dialog box to choose the grid size
|
||||
WinEDAChoiceBox* m_SelZoomBox; // Dialog box to choose the Zoom value
|
||||
WinEDAChoiceBox* m_SelGridBox; // Choice box to choose the grid
|
||||
// size
|
||||
WinEDAChoiceBox* m_SelZoomBox; // Choice box to choose the zoom
|
||||
// value
|
||||
|
||||
int m_CursorShape; // shape for cursor (0 = default 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_CursorShape; // shape for cursor (0 = default
|
||||
// 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
|
||||
// = 1000 for eeschema, = 10000 for PCBnew and Gerbview
|
||||
// = 1000 for eeschema, = 10000
|
||||
// for PCBnew and Gerbview
|
||||
|
||||
int m_UnitType; // Internal Unit type (0 = inch)
|
||||
bool m_Draw_Axis; // TRUE to show X and Y axis
|
||||
|
@ -175,8 +179,11 @@ public:
|
|||
bool m_Draw_Sheet_Ref; // TRUE to show 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:
|
||||
* the auxiliary axis is the origin of coordinates for drill, gerber and component position files
|
||||
bool m_Draw_Auxiliary_Axis; /* TRUE to show auxiliary axis.
|
||||
* 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 */
|
||||
|
||||
|
@ -187,11 +194,12 @@ private:
|
|||
BASE_SCREEN* m_CurrentScreen; ///< current used SCREEN
|
||||
|
||||
protected:
|
||||
void SetBaseScreen( BASE_SCREEN* aScreen ) { m_CurrentScreen = aScreen; }
|
||||
void SetBaseScreen( BASE_SCREEN* aScreen )
|
||||
{
|
||||
m_CurrentScreen = aScreen;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
// Constructor and destructor
|
||||
WinEDA_DrawFrame( wxWindow* father, int idtype,
|
||||
const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size,
|
||||
|
@ -247,7 +255,9 @@ public:
|
|||
virtual void OnZoom( wxCommandEvent& event );
|
||||
void OnGrid( int grid_type );
|
||||
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 );
|
||||
|
||||
/* Set the zoom level to show the area Rect */
|
||||
|
@ -271,9 +281,11 @@ public:
|
|||
* Return the X,Y sheet references where the point position is located
|
||||
* @param aScreen = screen to use
|
||||
* @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 Process_Zoom( wxCommandEvent& event );
|
||||
|
@ -281,7 +293,8 @@ public:
|
|||
virtual void RedrawActiveWindow( wxDC* DC, bool EraseBg ) = 0;
|
||||
virtual void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) = 0;
|
||||
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 );
|
||||
void AdjustScrollBars();
|
||||
|
||||
|
@ -295,8 +308,8 @@ public:
|
|||
* 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.
|
||||
* <p>
|
||||
* On a MAC, be careful about calling this function when there is an existing
|
||||
* wxDC in existence on a sibling window.
|
||||
* On a MAC, be careful about calling this function when there is an
|
||||
* existing wxDC in existence on a sibling window.
|
||||
*/
|
||||
virtual void UpdateStatusBar();
|
||||
|
||||
|
@ -305,7 +318,8 @@ public:
|
|||
/* Handlers for block commands */
|
||||
virtual int ReturnBlockCommand( int key );
|
||||
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 int HandleBlockEnd( wxDC* DC );
|
||||
|
||||
|
@ -342,10 +356,6 @@ public:
|
|||
};
|
||||
|
||||
|
||||
/****************************************************/
|
||||
/* classe representant un ecran graphique de dessin */
|
||||
/****************************************************/
|
||||
|
||||
/*********************************************************
|
||||
* class WinEDA_MsgPanel : this is a panel to display various infos
|
||||
* and messages on items in eeschema an pcbnew
|
||||
|
@ -410,12 +420,11 @@ protected:
|
|||
|
||||
public:
|
||||
WinEDA_DrawFrame* m_Parent;
|
||||
int m_BgColor; // couleur de fond
|
||||
int m_BgColor;
|
||||
|
||||
public:
|
||||
|
||||
// Constructor and destructor
|
||||
WinEDA_MsgPanel( WinEDA_DrawFrame* parent, int id, const wxPoint& pos, const wxSize& size );
|
||||
WinEDA_MsgPanel( WinEDA_DrawFrame* parent, int id, const wxPoint& pos,
|
||||
const wxSize& size );
|
||||
~WinEDA_MsgPanel();
|
||||
|
||||
|
||||
|
@ -465,8 +474,6 @@ private:
|
|||
wxStaticText* m_Title;
|
||||
|
||||
public:
|
||||
|
||||
// Constructor and destructor
|
||||
WinEDA_EnterText( wxWindow* parent, const wxString& Title,
|
||||
const wxString& TextToEdit, wxBoxSizer* BoxSizer,
|
||||
const wxSize& Size, bool Multiline = false );
|
||||
|
@ -489,6 +496,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* Class to edit/enter a graphic text and its dimension ( INCHES or MM )*/
|
||||
/************************************************************************/
|
||||
|
@ -503,8 +511,6 @@ private:
|
|||
wxStaticText* m_Title;
|
||||
|
||||
public:
|
||||
|
||||
// Constructor and destructor
|
||||
WinEDA_GraphicTextCtrl( wxWindow* parent, const wxString& Title,
|
||||
const wxString& TextToEdit, int textsize,
|
||||
int units, wxBoxSizer* BoxSizer, int framelen = 200,
|
||||
|
@ -527,13 +533,15 @@ public:
|
|||
*/
|
||||
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
|
||||
{
|
||||
public:
|
||||
|
@ -546,8 +554,6 @@ private:
|
|||
wxStaticText* m_TextX, * m_TextY;
|
||||
|
||||
public:
|
||||
|
||||
// Constructor and destructor
|
||||
WinEDA_PositionCtrl( wxWindow* parent, const wxString& title,
|
||||
const wxPoint& pos_to_edit,
|
||||
int units, wxBoxSizer* BoxSizer,
|
||||
|
@ -560,6 +566,7 @@ public:
|
|||
wxPoint GetValue();
|
||||
};
|
||||
|
||||
|
||||
/*************************************************************
|
||||
* Class to edit/enter a size (pair of values for X and Y size)
|
||||
* ( INCHES or MM ) in dialog boxes
|
||||
|
@ -567,8 +574,6 @@ public:
|
|||
class WinEDA_SizeCtrl : public WinEDA_PositionCtrl
|
||||
{
|
||||
public:
|
||||
|
||||
// Constructor and destructor
|
||||
WinEDA_SizeCtrl( wxWindow* parent, const wxString& title,
|
||||
const wxSize& size_to_edit,
|
||||
int units, wxBoxSizer* BoxSizer,
|
||||
|
@ -582,11 +587,6 @@ public:
|
|||
/****************************************************************/
|
||||
/* 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
|
||||
{
|
||||
public:
|
||||
|
@ -598,8 +598,6 @@ private:
|
|||
wxStaticText* m_Text;
|
||||
|
||||
public:
|
||||
|
||||
// Constructor and destructor
|
||||
WinEDA_ValueCtrl( wxWindow* parent, const wxString& title, int value,
|
||||
int units, wxBoxSizer* BoxSizer,
|
||||
int internal_unit = EESCHEMA_INTERNAL_UNIT );
|
||||
|
@ -616,6 +614,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* Class to edit/enter a pair of float (double) values in dialog boxes */
|
||||
/************************************************************************/
|
||||
|
@ -628,8 +627,6 @@ private:
|
|||
wxStaticText* m_Text;
|
||||
|
||||
public:
|
||||
|
||||
// Constructor and destructor
|
||||
WinEDA_DFloatValueCtrl( wxWindow* parent, const wxString& title,
|
||||
double value, wxBoxSizer* BoxSizer );
|
||||
|
||||
|
@ -671,13 +668,16 @@ public:
|
|||
#if defined(KICAD_AUITOOLBAR)
|
||||
bool GetToolState( int toolId ) { return GetToolToggled(toolId); };
|
||||
|
||||
void AddRadioTool( int toolid, const wxString& label, const wxBitmap& bitmap,
|
||||
const wxBitmap& bmpDisabled = wxNullBitmap,
|
||||
const wxString& shortHelp = wxEmptyString,
|
||||
const wxString& longHelp = wxEmptyString,
|
||||
wxObject *data = NULL )
|
||||
void AddRadioTool( int toolid,
|
||||
const wxString& label,
|
||||
const wxBitmap& bitmap,
|
||||
const wxBitmap& bmpDisabled = wxNullBitmap,
|
||||
const wxString& shortHelp = wxEmptyString,
|
||||
const wxString& longHelp = wxEmptyString,
|
||||
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 ) {};
|
||||
|
|
Loading…
Reference in New Issue