Commit d2eac37d authored by stambaughw's avatar stambaughw

Comment translation complete, Yeah!!!!

parent 8d8bdc3e
...@@ -136,7 +136,7 @@ static void TriPinsModule( COMPONENT* CurrentCmp ) ...@@ -136,7 +136,7 @@ static void TriPinsModule( COMPONENT* CurrentCmp )
} }
/* **** JP translate **** /* ???
* *
* Change le NetName PinNet par un nom compose des 8 derniers codes de PinNet * Change le NetName PinNet par un nom compose des 8 derniers codes de PinNet
* suivi de _Xnnnnn ou nnnnn est un nom de 0 a 99999 * suivi de _Xnnnnn ou nnnnn est un nom de 0 a 99999
......
...@@ -162,7 +162,7 @@ void WriteFootprintFilterInfos( FILE* file, COMPONENT_LIST& list ) ...@@ -162,7 +162,7 @@ void WriteFootprintFilterInfos( FILE* file, COMPONENT_LIST& list )
} }
/* *** JP translate *** /* ???
* Change le NetName PinNet par un nom compose des 8 derniers codes de PinNet * Change le NetName PinNet par un nom compose des 8 derniers codes de PinNet
* suivi de _Xnnnnn ou nnnnn est un nom de 0 a 99999 * suivi de _Xnnnnn ou nnnnn est un nom de 0 a 99999
*/ */
......
...@@ -377,7 +377,7 @@ void WinEDA_SchematicFrame::HandleBlockEndByPopUp( int Command, wxDC* DC ) ...@@ -377,7 +377,7 @@ void WinEDA_SchematicFrame::HandleBlockEndByPopUp( int Command, wxDC* DC )
case BLOCK_DRAG: /* move to Drag */ case BLOCK_DRAG: /* move to Drag */
/* *JP translate* /* ???
* Effacement de la liste des structures de pointage, * Effacement de la liste des structures de pointage,
* qui est devenue erronnee * qui est devenue erronnee
*/ */
......
...@@ -145,7 +145,8 @@ void BreakSegment( SCH_SCREEN* aScreen, wxPoint aBreakpoint ) ...@@ -145,7 +145,8 @@ void BreakSegment( SCH_SCREEN* aScreen, wxPoint aBreakpoint )
if( !TestSegmentHit( aBreakpoint, segment->m_Start, segment->m_End, 0 ) ) if( !TestSegmentHit( aBreakpoint, segment->m_Start, segment->m_End, 0 ) )
continue; continue;
/* * JP translate * Segment connecte: doit etre coupe en 2 si px,py /* ???
* Segment connecte: doit etre coupe en 2 si px,py
* n'est * n'est
* pas une extremite */ * pas une extremite */
if( ( segment->m_Start == aBreakpoint ) if( ( segment->m_Start == aBreakpoint )
......
...@@ -891,8 +891,7 @@ static void PointToPointConnect( NETLIST_OBJECT* Ref, int IsBus, int start ) ...@@ -891,8 +891,7 @@ static void PointToPointConnect( NETLIST_OBJECT* Ref, int IsBus, int start )
* Search if a junction is connected to segments and include the Netcode * Search if a junction is connected to segments and include the Netcode
* objects connect to the junction. * objects connect to the junction.
* The junction must have a valid Netcode * The junction must have a valid Netcode
* The list of objects is SUPPOSED class by NumSheet *JP translate* * The list of objects is SUPPOSED class by NumSheet ??? Croissants,
* Croissants,
* And research is done from the start element, 1st element * And research is done from the start element, 1st element
* Leaf schema * Leaf schema
* (There can be no physical connection between elements of different sheets) * (There can be no physical connection between elements of different sheets)
......
/************************************************************/ /******************************************/
/* appl_wxstruct.h: */ /* appl_wxstruct.h */
/* descriptions des principales classes derivees utilisees: */ /* Base application class implementation. */
/* Class "EDA_Appl: classe de l'application generale */ /******************************************/
/************************************************************/
/* Ce fichier doit etre inclus dans "wxstruct.h"
*/
#ifndef APPL_WXSTRUCT_H #ifndef APPL_WXSTRUCT_H
#define APPL_WXSTRUCT_H #define APPL_WXSTRUCT_H
...@@ -39,8 +35,10 @@ class wxHtmlHelpController; ...@@ -39,8 +35,10 @@ class wxHtmlHelpController;
class WinEDA_App : public wxApp class WinEDA_App : public wxApp
{ {
public: public:
id_app_type m_Id; /* Used mainly to handle default paths libs id_app_type m_Id; /* Used mainly to handle
* m_Id = APP_TYPE_EESCHEMA, APP_TYPE_PCBNEW ... * default paths libs
* m_Id = APP_TYPE_EESCHEMA,
* APP_TYPE_PCBNEW ...
*/ */
wxString m_Project; wxString m_Project;
wxSingleInstanceChecker* m_Checker; wxSingleInstanceChecker* m_Checker;
...@@ -53,21 +51,20 @@ public: ...@@ -53,21 +51,20 @@ public:
wxFileConfig* m_ProjectConfig; wxFileConfig* m_ProjectConfig;
wxString m_HelpFileName; wxString m_HelpFileName;
wxString m_EditorName; wxString m_EditorName;
wxString m_CurrentOptionFile; // dernier fichier .cnf utilis wxString m_CurrentOptionFile;
wxString m_CurrentOptionFileDateAndTime; wxString m_CurrentOptionFileDateAndTime;
wxString m_BinDir; /* Chemin ou reside l'executable wxString m_BinDir; /* Kicad executable path.*/
* (utilis si KICAD non dfini)*/ wxString m_KicadEnv; /* environment variable KICAD */
wxString m_KicadEnv; /* Chemin de kicad dfini dans la bool m_Env_Defined; // TRUE if environment KICAD is
* variable d'environnement KICAD, // defined.
* typiquement /usr/local/kicad ou
* c:\kicad */ wxLocale* m_Locale; // The current locale.
bool m_Env_Defined; // TRUE si variable d'environnement KICAD definie int m_LanguageId; // The current language setting.
wxString m_PdfBrowser; // Name of the selected browser,
wxLocale* m_Locale; // Gestion de la localisation // for browsing pdf datasheets
int m_LanguageId; // indicateur de choix du langage ( 0 = defaut) bool m_PdfBrowserIsDefault; // True if the pdf browser is the
wxString m_PdfBrowser; // Name of the selected browser, for browsing pdf datasheets // default (m_PdfBrowser not used)
bool m_PdfBrowserIsDefault; // True if the pdf browser is the default (m_PdfBrowser not used)
wxPathList m_searchPaths; wxPathList m_searchPaths;
wxFileHistory m_fileHistory; wxFileHistory m_fileHistory;
...@@ -77,8 +74,7 @@ protected: ...@@ -77,8 +74,7 @@ protected:
wxFileName m_projectFileName; wxFileName m_projectFileName;
wxString m_LastVisitedLibPath; wxString m_LastVisitedLibPath;
public: public: WinEDA_App();
WinEDA_App();
~WinEDA_App(); ~WinEDA_App();
bool OnInit(); bool OnInit();
int OnRun(); int OnRun();
...@@ -87,7 +83,7 @@ public: ...@@ -87,7 +83,7 @@ public:
void SetDefaultSearchPaths( void ); void SetDefaultSearchPaths( void );
/** Function InitEDA_Appl /** Function InitEDA_Appl
* initialise some general parameters * initialize some general parameters
* - Default paths (help, libs, bin)and configuration files names * - Default paths (help, libs, bin)and configuration files names
* - Language and locale * - Language and locale
* - fonts * - fonts
...@@ -95,7 +91,8 @@ public: ...@@ -95,7 +91,8 @@ public:
* @param aId = flag : LIBRARY_TYPE_EESCHEMA or LIBRARY_TYPE_PCBNEW * @param aId = flag : LIBRARY_TYPE_EESCHEMA or LIBRARY_TYPE_PCBNEW
* used to choose what default library path must be used * used to choose what default library path must be used
*/ */
void InitEDA_Appl( const wxString& aName, id_app_type aId = APP_TYPE_UNKOWN); void InitEDA_Appl( const wxString& aName,
id_app_type aId = APP_TYPE_UNKOWN );
bool SetLanguage( bool first_time = FALSE ); bool SetLanguage( bool first_time = FALSE );
...@@ -104,8 +101,9 @@ public: ...@@ -104,8 +101,9 @@ public:
* Create menu list for language choice, and add it as submenu to a main * Create menu list for language choice, and add it as submenu to a main
* menu * menu
* *
* @param MasterMenu : The main menu. The sub menu list will be accessible * @param MasterMenu : The main menu. The sub menu list will be
* from the menu item with id ID_LANGUAGE_CHOICE * accessible from the menu item with id
* ID_LANGUAGE_CHOICE
* *
* @return the sub menu Language list * @return the sub menu Language list
*/ */
...@@ -114,13 +112,13 @@ public: ...@@ -114,13 +112,13 @@ public:
void SetLanguagePath( void ); void SetLanguagePath( void );
void InitOnLineHelp(); void InitOnLineHelp();
// Sauvegarde de configurations et options:
/** Function GetSettings /** Function GetSettings
* Get application settings * Get application settings
* @param aReopenLastUsedDirectory = true to switch to last opened directory, false to use current CWD * @param aReopenLastUsedDirectory = true to switch to last opened
* directory, false to use current CWD
* @return none * @return none
*/ */
void GetSettings(bool aReopenLastUsedDirectory); void GetSettings( bool aReopenLastUsedDirectory );
void SaveSettings(); void SaveSettings();
...@@ -133,7 +131,8 @@ public: ...@@ -133,7 +131,8 @@ public:
/** Function SaveCurrentSetupValues() /** Function SaveCurrentSetupValues()
* Save the current setup values in m_EDA_Config * Save the current setup values in m_EDA_Config
* saved parameters are parameters that have the .m_Setup member set to true * saved parameters are parameters that have the .m_Setup member set to
* true
* @param aList = array of PARAM_CFG_BASE pointers * @param aList = array of PARAM_CFG_BASE pointers
*/ */
void SaveCurrentSetupValues( PARAM_CFG_BASE** aList ); void SaveCurrentSetupValues( PARAM_CFG_BASE** aList );
...@@ -141,7 +140,8 @@ public: ...@@ -141,7 +140,8 @@ public:
/** Function ReadCurrentSetupValues() /** Function ReadCurrentSetupValues()
* Raed the current setup values previously saved, from m_EDA_Config * Raed the current setup values previously saved, from m_EDA_Config
* saved parameters are parameters that have the .m_Setup member set to true * saved parameters are parameters that have the .m_Setup member set to
* true
* @param aList = array of PARAM_CFG_BASE pointers * @param aList = array of PARAM_CFG_BASE pointers
*/ */
void ReadCurrentSetupValues( PARAM_CFG_BASE** aList ); void ReadCurrentSetupValues( PARAM_CFG_BASE** aList );
...@@ -188,24 +188,28 @@ public: ...@@ -188,24 +188,28 @@ public:
return FindLibraryPath( fileName.GetFullPath() ); return FindLibraryPath( fileName.GetFullPath() );
} }
/** ReturnLastVisitedLibraryPath /** ReturnLastVisitedLibraryPath
* Returns the last visited library directory, or (if void) the first * Returns the last visited library directory, or (if void) the first
* path in lib path list ( but not the CWD ) * path in lib path list ( but not the CWD )
* @param aSubPathToSearch = Prefered sub path to search in path list * @param aSubPathToSearch = Preferred sub path to search in path list
*/ */
wxString ReturnLastVisitedLibraryPath( const wxString & aSubPathToSearch = wxEmptyString); wxString ReturnLastVisitedLibraryPath(
void SaveLastVisitedLibraryPath( const wxString & aPath); const wxString& aSubPathToSearch = wxEmptyString );
void SaveLastVisitedLibraryPath( const wxString& aPath );
/** ReturnFilenameWithRelativePathInLibPath /** ReturnFilenameWithRelativePathInLibPath
* @return a short filename (with extension) with only a relative path if this filename * @return a short filename (with extension) with only a relative path if
* can be found in library paths * this filename can be found in library paths
* @param aFullFilename = filename with path and extension. * @param aFullFilename = filename with path and extension.
*/ */
wxString ReturnFilenameWithRelativePathInLibPath(const wxString & aFullFilename); wxString ReturnFilenameWithRelativePathInLibPath(
const wxString& aFullFilename );
/** Function RemoveLibraryPath /** Function RemoveLibraryPath
* Removes the given path(s) from the library path list * Removes the given path(s) from the library path list
* @param aPaths = path or path list to remove. paths must be separated by ";" * @param aPaths = path or path list to remove. paths must be separated by
* ";"
*/ */
void RemoveLibraryPath( const wxString& aPaths ); void RemoveLibraryPath( const wxString& aPaths );
......
This diff is collapsed.
// Largeur du toolbar vertical
#define VTOOLBAR_WIDTH 26 #define VTOOLBAR_WIDTH 26
// dimension d'un tool vertical
#define TOOL_SIZE 23 #define TOOL_SIZE 23
// Please keep list sorted alphabetically, ignoring case. // Please keep list sorted alphabetically, ignoring case.
......
/** /**
* This file is part of the common libary. * This file is part of the common library.
* @file block_commande.h * @file block_commande.h
* @see common.h * @see common.h
*/ */
...@@ -18,19 +18,22 @@ ...@@ -18,19 +18,22 @@
/**************************/ /**************************/
/* class BLOCK_SELECTOR */ /* class BLOCK_SELECTOR */
/**************************/ /**************************/
/** /**
* class BLOCK_SELECTOR is used to handle block selection and commands * class BLOCK_SELECTOR is used to handle block selection and commands
*/ */
/* Block state codes. */
typedef enum { typedef enum {
/* definition de l'etat du block */ STATE_NO_BLOCK,
STATE_NO_BLOCK, /* Block non initialise */ STATE_BLOCK_INIT,
STATE_BLOCK_INIT, /* Block initialise: 1er point defini */ STATE_BLOCK_END,
STATE_BLOCK_END, /* Block initialise: 2eme point defini */ STATE_BLOCK_MOVE,
STATE_BLOCK_MOVE, /* Block en deplacement */ STATE_BLOCK_STOP
STATE_BLOCK_STOP /* Block fixe (fin de deplacement) */
} BlockState; } BlockState;
/* codes des differentes commandes sur block: */
/* Block command codes. */
typedef enum { typedef enum {
BLOCK_IDLE, BLOCK_IDLE,
BLOCK_MOVE, BLOCK_MOVE,
...@@ -53,13 +56,20 @@ typedef enum { ...@@ -53,13 +56,20 @@ typedef enum {
class BLOCK_SELECTOR : public EDA_BaseStruct, public EDA_Rect class BLOCK_SELECTOR : public EDA_BaseStruct, public EDA_Rect
{ {
public: public:
BlockState m_State; /* Stae (enum BlockState) of the block */ BlockState m_State; /* State (enum BlockState)
CmdBlockType m_Command; /* Type (enum CmdBlockType) d'operation */ * of the block */
PICKED_ITEMS_LIST m_ItemsSelection; /* list of items selected in this block */ CmdBlockType m_Command; /* Type (enum CmdBlockType)
int m_Color; /* Block Color (for drawings) */ * operation */
wxPoint m_MoveVector; /* Move distance in move, drag, copy ... command */ PICKED_ITEMS_LIST m_ItemsSelection; /* list of items selected
wxPoint m_BlockLastCursorPosition; /* Last Mouse position in block command * in this block */
* = last cursor position in move commands int m_Color; /* Block Color (for
* drawings) */
wxPoint m_MoveVector; /* Move distance in move,
* drag, copy ... command */
wxPoint m_BlockLastCursorPosition; /* Last Mouse position in
* block command
* = last cursor position in
* move commands
* = 0,0 in block paste */ * = 0,0 in block paste */
public: public:
...@@ -67,9 +77,11 @@ public: ...@@ -67,9 +77,11 @@ public:
~BLOCK_SELECTOR(); ~BLOCK_SELECTOR();
/** function InitData /** function InitData
* Init the initial values of a BLOCK_SELECTOR, before starting a block command * Init the initial values of a BLOCK_SELECTOR, before starting a block
*command
*/ */
void InitData( WinEDA_DrawPanel* Panel, const wxPoint& startpos ); void InitData( WinEDA_DrawPanel* Panel, const wxPoint& startpos );
/** Function SetMessageBlock /** Function SetMessageBlock
* Displays the type of block command in the status bar of the window * Displays the type of block command in the status bar of the window
*/ */
...@@ -87,11 +99,13 @@ public: ...@@ -87,11 +99,13 @@ public:
void PushItem( ITEM_PICKER& aItem ); void PushItem( ITEM_PICKER& aItem );
/** Function ClearListAndDeleteItems /** Function ClearListAndDeleteItems
* delete only the list of EDA_BaseStruct * pointers, AND the data pinted by m_Item * delete only the list of EDA_BaseStruct * pointers, AND the data printed
* by m_Item
*/ */
void ClearListAndDeleteItems(); void ClearListAndDeleteItems();
void ClearItemsList(); void ClearItemsList();
unsigned GetCount() unsigned GetCount()
{ {
return m_ItemsSelection.GetCount(); return m_ItemsSelection.GetCount();
...@@ -100,12 +114,13 @@ public: ...@@ -100,12 +114,13 @@ public:
/* Cancel Current block operation. /* Cancel Current block operation.
*/ */
void AbortBlockCurrentCommand( WinEDA_DrawPanel* Panel, wxDC* DC ); void AbortBlockCurrentCommand( WinEDA_DrawPanel* Panel, wxDC* DC );
/* Redraw the outlines of the block which shows the search area for block commands /* Redraw the outlines of the block which shows the search area for block
* The first point of the rectangle showing the area is initialised * commands
* The first point of the rectangle showing the area is initialized
* by InitBlockLocateDatas(). * by InitBlockLocateDatas().
* The other point of the rectangle is the mouse cursor * The other point of the rectangle is the mouse cursor
*/ */
...@@ -113,4 +128,3 @@ void DrawAndSizingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool eras ...@@ -113,4 +128,3 @@ void DrawAndSizingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool eras
#endif /* __INCLUDE__BLOCK_COMMANDE_H__ */ #endif /* __INCLUDE__BLOCK_COMMANDE_H__ */
This diff is collapsed.
...@@ -3,9 +3,6 @@ ...@@ -3,9 +3,6 @@
* define class WinEDA_DrawPanel * define class WinEDA_DrawPanel
*************************************/ *************************************/
/* Doit etre inclus dans "wxstruch.h"
*/
#ifndef PANEL_WXSTRUCT_H #ifndef PANEL_WXSTRUCT_H
#define PANEL_WXSTRUCT_H #define PANEL_WXSTRUCT_H
...@@ -17,49 +14,64 @@ class BASE_SCREEN; ...@@ -17,49 +14,64 @@ class BASE_SCREEN;
class PCB_SCREEN; class PCB_SCREEN;
/****************************************************/
/* classe representant un ecran graphique de dessin */
/****************************************************/
class WinEDA_DrawPanel : public wxScrolledWindow class WinEDA_DrawPanel : public wxScrolledWindow
{ {
public: public:
WinEDA_DrawFrame* m_Parent; WinEDA_DrawFrame* m_Parent;
EDA_Rect m_ClipBox; // the clipbox used in screen redraw (usually gives the visible area in internal units) EDA_Rect m_ClipBox; // the clipbox used in screen
wxPoint m_CursorStartPos; // utile dans controles du mouvement curseur // redraw (usually gives the
int m_ScrollButt_unit; // Valeur de l'unite de scroll en pixels pour les boutons de scroll // visible area in internal units)
wxPoint m_CursorStartPos; // useful in testing the cursor
// movement
int m_ScrollButt_unit; // scroll bar pixels per unit value
bool m_AbortRequest; // Flag to abort long commands
bool m_AbortEnable; // TRUE if abort button or menu to
// be displayed
bool m_AbortRequest; // Flag d'arret de commandes longues
bool m_AbortEnable; // TRUE si menu ou bouton Abort doit etre affiche
bool m_AutoPAN_Enable; // TRUE to allow auto pan bool m_AutoPAN_Enable; // TRUE to allow auto pan
bool m_AutoPAN_Request; // TRUE to request an auto pan (will be made only if m_AutoPAN_Enable = true) bool m_AutoPAN_Request; // TRUE to request an auto pan
// (will be made only if
// m_AutoPAN_Enable = true)
int m_IgnoreMouseEvents; // when non-zero (true), then ignore mouse events int m_IgnoreMouseEvents; // when non-zero (true), then
// ignore mouse events
bool m_Block_Enable; // TRUE to accept Block Commands bool m_Block_Enable; // TRUE to accept Block Commands
int m_CanStartBlock; // >= 0 (or >= n) if a block can start int m_CanStartBlock; // >= 0 (or >= n) if a block can
bool m_PrintIsMirrored; // True when drawing in mirror mode. Used in draw arc function, // start
// because arcs are oriented, and in mirror mode, orientations are reversed bool m_PrintIsMirrored; // True when drawing in mirror
// usefull to avoid false start block in certain cases (like switch from a sheet to an other scheet // mode. Used in draw arc function,
int m_PanelDefaultCursor; // Current mouse cursor default shape id for this window // because arcs are oriented, and
int m_PanelCursor; // Current mouse cursor shape id for this window // in mirror mode, orientations are
int m_CursorLevel; // Index for cursor redraw in XOR mode // reversed
// useful to avoid false start block in certain cases (like switch from a
// sheet to an other sheet
int m_PanelDefaultCursor; // Current mouse cursor default
// shape id for this window
int m_PanelCursor; // Current mouse cursor shape id
// for this window
int m_CursorLevel; // Index for cursor redraw in XOR
// mode
/* Cursor management (used in editing functions) */ /* Cursor management (used in editing functions) */
void (*ManageCurseur)( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); /* Fonction d'affichage sur deplacement souris
* si erase : effacement ancien affichage */ /* Mouse capture move callback function prototype. */
void (*ForceCloseManageCurseur)( WinEDA_DrawPanel* panel, wxDC* DC ); /* Fonction de fermeture forc� void (*ManageCurseur)( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
* de la fonction ManageCurseur */
/* Abort managed cursor callback function prototype. */
void (*ForceCloseManageCurseur)( WinEDA_DrawPanel* panel, wxDC* DC );
public: public:
// Constructor and destructor
WinEDA_DrawPanel( WinEDA_DrawFrame* parent, int id, const wxPoint& pos, WinEDA_DrawPanel( WinEDA_DrawFrame* parent, int id, const wxPoint& pos,
const wxSize& size ); const wxSize& size );
~WinEDA_DrawPanel(); ~WinEDA_DrawPanel();
/****************************/
BASE_SCREEN* GetScreen(); BASE_SCREEN* GetScreen();
...@@ -69,7 +81,10 @@ public: ...@@ -69,7 +81,10 @@ public:
void OnSize( wxSizeEvent& event ); void OnSize( wxSizeEvent& event );
void SetBoundaryBox(); void SetBoundaryBox();
void ReDraw( wxDC* DC, bool erasebg = TRUE ); void ReDraw( wxDC* DC, bool erasebg = TRUE );
void PrintPage( wxDC* DC, bool Print_Sheet_Ref, int PrintMask, bool aPrintMirrorMode ); void PrintPage( wxDC* DC,
bool Print_Sheet_Ref,
int PrintMask,
bool aPrintMirrorMode );
void DrawBackGround( wxDC* DC ); void DrawBackGround( wxDC* DC );
void DrawAuxiliaryAxis( wxDC* DC, int drawmode ); void DrawAuxiliaryAxis( wxDC* DC, int drawmode );
void OnEraseBackground( wxEraseEvent& event ); void OnEraseBackground( wxEraseEvent& event );
...@@ -83,8 +98,6 @@ public: ...@@ -83,8 +98,6 @@ public:
void OnPan( wxCommandEvent& event ); void OnPan( wxCommandEvent& event );
/*************************/
void EraseScreen( wxDC* DC ); void EraseScreen( wxDC* DC );
void OnScrollWin( wxCommandEvent& event ); void OnScrollWin( wxCommandEvent& event );
void OnScroll( wxScrollWinEvent& event ); void OnScroll( wxScrollWinEvent& event );
...@@ -100,7 +113,7 @@ public: ...@@ -100,7 +113,7 @@ public:
/** Function CursorRealPosition /** Function CursorRealPosition
* @return the position in user units of location ScreenPos * @return the position in user units of location ScreenPos
* @param ScreenPos = the screen (in pixel) position co convert * @param ScreenPos = the screen (in pixel) position to convert
*/ */
wxPoint CursorRealPosition( const wxPoint& ScreenPos ); wxPoint CursorRealPosition( const wxPoint& ScreenPos );
...@@ -116,8 +129,8 @@ public: ...@@ -116,8 +129,8 @@ public:
* along with any other recently posted rectangles is redrawn. Conversion * along with any other recently posted rectangles is redrawn. Conversion
* to pixels is done in here. * to pixels is done in here.
* @param aRect The rectangle to append, it must be orthogonal * @param aRect The rectangle to append, it must be orthogonal
* (vertical and horizontal edges only), and it must be [,) in nature, i.e. * (vertical and horizontal edges only), and it must be [,) in nature,
* [pos, dim) == [inclusive, exclusive) * i.e. [pos, dim) == [inclusive, exclusive)
*/ */
void PostDirtyRect( EDA_Rect aRect ); void PostDirtyRect( EDA_Rect aRect );
...@@ -132,8 +145,9 @@ public: ...@@ -132,8 +145,9 @@ public:
/** /**
* Function ConvertPcbUnitsToPixelsUnits * Function ConvertPcbUnitsToPixelsUnits
* converts a given wxPoint position (in internal units) to units of pixels, * converts a given wxPoint position (in internal units) to units of
* relative to the current draw area (origin 0,0 is the left top visible * pixels, relative to the current draw area (origin 0,0 is the left
* top visible
* corner of draw area) according to the current scroll and zoom. * corner of draw area) according to the current scroll and zoom.
* @param aPosition = the position to convert * @param aPosition = the position to convert
*/ */
...@@ -144,9 +158,16 @@ public: ...@@ -144,9 +158,16 @@ public:
void MouseTo( const wxPoint& Mouse ); void MouseTo( const wxPoint& Mouse );
/* Cursor functions */ /* Cursor functions */
void Trace_Curseur( wxDC* DC, int color = WHITE ); // Draw the user cursor (grid cursor) void Trace_Curseur( wxDC* DC, int color = WHITE ); // Draw the
void CursorOff( wxDC* DC ); // remove the grid cursor from the display // user cursor
void CursorOn( wxDC* DC ); // display the grid cursor // (grid
// cursor)
void CursorOff( wxDC* DC ); // remove the
// grid cursor
// from the
// display
void CursorOn( wxDC* DC ); // display the
// grid cursor
/** /**
* Release managed cursor. * Release managed cursor.
......
/**************************************************************/ /****************/
/* pcbstruct.h : definition des structures de donnees type PCB */ /* pcbstruct.h */
/**************************************************************/ /****************/
#ifndef __CLASSPCB_SCREEN_H__ #ifndef __CLASSPCB_SCREEN_H__
#define __CLASSPCB_SCREEN_H__ #define __CLASSPCB_SCREEN_H__
#
/* Handle info to display a board */ /* Handle info to display a board */
class PCB_SCREEN : public BASE_SCREEN class PCB_SCREEN : public BASE_SCREEN
{ {
public: public:
int m_Active_Layer; /* ref couche active */ int m_Active_Layer;
int m_Route_Layer_TOP; /* ref couches actives */ int m_Route_Layer_TOP;
int m_Route_Layer_BOTTOM; /* pour placement vias et routage 2 couches */ int m_Route_Layer_BOTTOM;
public: public:
PCB_SCREEN(); PCB_SCREEN();
...@@ -29,10 +27,14 @@ public: ...@@ -29,10 +27,14 @@ public:
/** /**
* Function GetCurItem * Function GetCurItem
* returns the currently selected BOARD_ITEM, overriding BASE_SCREEN::GetCurItem(). * returns the currently selected BOARD_ITEM, overriding
*BASE_SCREEN::GetCurItem().
* @return BOARD_ITEM* - the one selected, or NULL. * @return BOARD_ITEM* - the one selected, or NULL.
*/ */
BOARD_ITEM* GetCurItem() const { return (BOARD_ITEM*) BASE_SCREEN::GetCurItem(); } BOARD_ITEM* GetCurItem() const
{
return (BOARD_ITEM*) BASE_SCREEN::GetCurItem();
}
/** /**
* Function SetCurItem * Function SetCurItem
...@@ -43,7 +45,7 @@ public: ...@@ -43,7 +45,7 @@ public:
/* Return true if a microvia can be put on board /* Return true if a microvia can be put on board
* A microvia 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 * because its is hole is made by laser which can penetrate only one layer
* It is mainly used to connect BGA to the first inner layer * It is mainly used to connect BGA to the first inner layer
* And it is allowed from an external layer to the first inner layer * And it is allowed from an external layer to the first inner layer
...@@ -51,6 +53,7 @@ public: ...@@ -51,6 +53,7 @@ public:
bool IsMicroViaAcceptable( void ); bool IsMicroViaAcceptable( void );
/* full undo redo management : */ /* full undo redo management : */
// use BASE_SCREEN::ClearUndoRedoList() // use BASE_SCREEN::ClearUndoRedoList()
// use BASE_SCREEN::PushCommandToUndoList( PICKED_ITEMS_LIST* aItem ) // use BASE_SCREEN::PushCommandToUndoList( PICKED_ITEMS_LIST* aItem )
// use BASE_SCREEN::PushCommandToRedoList( PICKED_ITEMS_LIST* aItem ) // use BASE_SCREEN::PushCommandToRedoList( PICKED_ITEMS_LIST* aItem )
...@@ -59,7 +62,8 @@ public: ...@@ -59,7 +62,8 @@ public:
* free the undo or redo list from List element * free the undo or redo list from List element
* Wrappers are deleted. * Wrappers are deleted.
* datas pointed by wrappers are deleted if not in use in schematic * datas pointed by wrappers are deleted if not in use in schematic
* i.e. when they are copy of a schematic item or they are no more in use (DELETED) * i.e. when they are copy of a schematic item or they are no more in use
* (DELETED)
* @param aList = the UNDO_REDO_CONTAINER to clear * @param aList = the UNDO_REDO_CONTAINER to clear
* @param aItemCount = the count of items to remove. < 0 for all items * @param aItemCount = the count of items to remove. < 0 for all items
* items are removed from the beginning of the list. * items are removed from the beginning of the list.
......
/********************/ /************/
/* Fichier colors.h */ /* colors.h */
/********************/ /************/
#ifndef _COLORS_H #ifndef _COLORS_H
#define _COLORS_H #define _COLORS_H
/* Definitions des Numeros des Couleurs ( palette de 32) */ /* Number of colors ( 32 bit palette. ) */
#define NBCOLOR 24 #define NBCOLOR 24
#define MASKCOLOR 31 ///< mask for color index into ColorRefs[] #define MASKCOLOR 31 ///< mask for color index into ColorRefs[]
/// bit indicateur d'affichage (vu / non vu) des items : (defini dans les valeurs des couleurs /// Flag bit display (seen / not seen) items: (defined in the color values
//IMB: Not used anymore #define ITEM_NOT_SHOW (1<<18) // 0x40000 //IMB: Not used anymore #define ITEM_NOT_SHOW (1<<18) // 0x40000
/// Definition du bit de surbrillance #define HIGHT_LIGHT_FLAG ( 1<<19 ) // 0x80000
#define HIGHT_LIGHT_FLAG (1<<19) // 0x80000
/** /**
...@@ -102,8 +101,7 @@ static inline wxColour MakeColour( int aColor ) ...@@ -102,8 +101,7 @@ static inline wxColour MakeColour( int aColor )
#endif #endif
int ndx = aColor & MASKCOLOR; int ndx = aColor & MASKCOLOR;
return wxColour( return wxColour( ColorRefs[ndx].m_Red,
ColorRefs[ndx].m_Red,
ColorRefs[ndx].m_Green, ColorRefs[ndx].m_Green,
ColorRefs[ndx].m_Blue ColorRefs[ndx].m_Blue
#if wxCHECK_VERSION(2,8,5) #if wxCHECK_VERSION(2,8,5)
......
...@@ -17,13 +17,17 @@ class WinEDA_DrawPanel; ...@@ -17,13 +17,17 @@ class WinEDA_DrawPanel;
/* Flag for special keys */ /* Flag for special keys */
#define GR_KB_RIGHTSHIFT 0x10000000 /* Keybd states: right shift key depressed */ #define GR_KB_RIGHTSHIFT 0x10000000 /* Keybd states: right
#define GR_KB_LEFTSHIFT 0x20000000 /* left shift key depressed */ * shift key depressed */
#define GR_KB_LEFTSHIFT 0x20000000 /* left shift key depressed
*/
#define GR_KB_CTRL 0x40000000 /* CTRL depressed */ #define GR_KB_CTRL 0x40000000 /* CTRL depressed */
#define GR_KB_ALT 0x80000000 /* ALT depressed */ #define GR_KB_ALT 0x80000000 /* ALT depressed */
#define GR_KB_SHIFT (GR_KB_LEFTSHIFT | GR_KB_RIGHTSHIFT) #define GR_KB_SHIFT (GR_KB_LEFTSHIFT | GR_KB_RIGHTSHIFT)
#define GR_KB_SHIFTCTRL (GR_KB_SHIFT | GR_KB_CTRL) #define GR_KB_SHIFTCTRL (GR_KB_SHIFT | GR_KB_CTRL)
#define MOUSE_MIDDLE 0x08000000 /* Middle button mouse flag for block commands */ #define MOUSE_MIDDLE 0x08000000 /* Middle button mouse
* flag for block commands
*/
#define NB_ITEMS 11 #define NB_ITEMS 11
...@@ -104,7 +108,7 @@ private: ...@@ -104,7 +108,7 @@ private:
}; };
/* Clsass to handle pages sizes: /* Class to handle pages sizes:
*/ */
class Ki_PageDescr class Ki_PageDescr
{ {
...@@ -144,7 +148,7 @@ extern wxString g_ProductName; ...@@ -144,7 +148,7 @@ extern wxString g_ProductName;
/* Default user lib path can be left void, if the standard lib path is used */ /* Default user lib path can be left void, if the standard lib path is used */
extern wxString g_UserLibDirBuffer; extern wxString g_UserLibDirBuffer;
extern int g_DebugLevel; // 0= Pas de debug */ extern int g_DebugLevel;
extern int g_MouseOldButtons; extern int g_MouseOldButtons;
extern int g_KeyPressed; extern int g_KeyPressed;
...@@ -169,6 +173,7 @@ extern const wxString AllFilesWildcard; ...@@ -169,6 +173,7 @@ extern const wxString AllFilesWildcard;
// Name of default configuration file. (kicad.pro) // Name of default configuration file. (kicad.pro)
extern wxString g_Prj_Default_Config_FullFilename; extern wxString g_Prj_Default_Config_FullFilename;
// Name of local configuration file. (<curr projet>.pro) // Name of local configuration file. (<curr projet>.pro)
extern wxString g_Prj_Config_LocalFilename; extern wxString g_Prj_Config_LocalFilename;
...@@ -187,41 +192,46 @@ extern BASE_SCREEN* ActiveScreen; ...@@ -187,41 +192,46 @@ extern BASE_SCREEN* ActiveScreen;
/* COMMON.CPP */ /* COMMON.CPP */
/** function SetLocaleTo_C_standard /** function SetLocaleTo_C_standard
because kicad is internationalized, switch internatization to "C" standard * because kicad is internationalized, switch internalization to "C" standard
i.e. uses the . (dot) as separator in print/read float numbers * i.e. uses the . (dot) as separator in print/read float numbers
(some contries (France, Germany ..) use , (comma) as separator) * (some countries (France, Germany ..) use , (comma) as separator)
This function must be called before read or write ascii files using float numbers in data * This function must be called before read or write ascii files using float
the SetLocaleTo_C_standard function must be called after reading or writing the file * numbers in data the SetLocaleTo_C_standard function must be called after
* reading or writing the file
This is wrapper to the C setlocale( LC_NUMERIC, "C" ) function, *
but could make more easier an optional use of locale in kicad * This is wrapper to the C setlocale( LC_NUMERIC, "C" ) function,
*/ * but could make more easier an optional use of locale in kicad
void SetLocaleTo_C_standard(void); */
void SetLocaleTo_C_standard( void );
/** function SetLocaleTo_Default /** function SetLocaleTo_Default
because kicad is internationalized, switch internatization to default * because kicad is internationalized, switch internalization to default
to use the default separator in print/read float numbers * to use the default separator in print/read float numbers
(. (dot) but some contries (France, Germany ..) use , (comma) as separator) * (. (dot) but some countries (France, Germany ..) use , (comma) as
This function must be called after a call to SetLocaleTo_C_standard * separator)
* This function must be called after a call to SetLocaleTo_C_standard
This is wrapper to the C setlocale( LC_NUMERIC, "" ) function, *
but could make more easier an optional use of locale in kicad * This is wrapper to the C setlocale( LC_NUMERIC, "" ) function,
*/ * but could make more easier an optional use of locale in kicad
void SetLocaleTo_Default(void); */
void SetLocaleTo_Default( void );
/** /**
* Function EnsureTextCtrlWidth * Function EnsureTextCtrlWidth
* sets the minimum pixel width on a text control in order to make a text string * sets the minimum pixel width on a text control in order to make a text
* be fully visible within it. The current font within the text control is considered. * string be fully visible within it. The current font within the text
* control is considered.
* The text can come either from the control or be given as an argument. * The text can come either from the control or be given as an argument.
* If the text control is larger than needed, then nothing is done. * If the text control is larger than needed, then nothing is done.
* @param aCtrl the text control to potentially make wider. * @param aCtrl the text control to potentially make wider.
* @param aString the text that is used in sizing the control's pixel width. If NULL, then * @param aString the text that is used in sizing the control's pixel width.
* If NULL, then
* the text already within the control is used. * the text already within the control is used.
* @return bool - true if the \a aCtrl had its size changed, else false. * @return bool - true if the \a aCtrl had its size changed, else false.
*/ */
bool EnsureTextCtrlWidth( wxTextCtrl* aCtrl, const wxString* aString = NULL ); bool EnsureTextCtrlWidth( wxTextCtrl* aCtrl,
const wxString* aString = NULL );
/** /**
...@@ -238,7 +248,8 @@ wxString& operator <<( wxString& aString, const wxPoint& aPoint ); ...@@ -238,7 +248,8 @@ wxString& operator <<( wxString& aString, const wxPoint& aPoint );
/** /**
* Function ProcessExecute * Function ProcessExecute
* runs a child process. * runs a child process.
* @param aCommandLine The process and any arguments to it all in a single string. * @param aCommandLine The process and any arguments to it all in a single
* string.
* @param aFlags The same args as allowed for wxExecute() * @param aFlags The same args as allowed for wxExecute()
* @return bool - true if success, else false * @return bool - true if success, else false
*/ */
...@@ -246,28 +257,29 @@ bool ProcessExecute( const wxString& aCommandLine, ...@@ -246,28 +257,29 @@ bool ProcessExecute( const wxString& aCommandLine,
int aFlags = wxEXEC_ASYNC ); int aFlags = wxEXEC_ASYNC );
/** /**
* Function ReturnPcbLayerName * Function ReturnPcbLayerName
* @return a wxString containing the name of the layer number "layer_number". * @return a wxString containing the name of the layer number "layer_number".
* @param layer_number the layer number of the layer * @param layer_number the layer number of the layer
* @param is_filename if TRUE, the name can be used for a file name (not * @param is_filename if TRUE, the name can be used for a file name (not
* internatinalized, no space) * internationalized, no space)
*/ */
wxString ReturnPcbLayerName( int layer_number, bool is_filename = FALSE ); wxString ReturnPcbLayerName( int layer_number,
bool is_filename = FALSE );
/*******************/ /*******************/
/* about_kicad.cpp */ /* about_kicad.cpp */
/*******************/ /*******************/
void InitKiCadAbout( wxAboutDialogInfo& info); void InitKiCadAbout( wxAboutDialogInfo& info );
/**************/ /**************/
/* common.cpp */ /* common.cpp */
/**************/ /**************/
wxString GetBuildVersion(); /* Return the build date */ wxString GetBuildVersion(); /* Return the build date */
wxString GetAboutBuildVersion(); /* Return custom build date for about dialog */ wxString GetAboutBuildVersion(); /* Return custom build date for about
* dialog */
/** /**
* function Affiche_1_Parametre * function Affiche_1_Parametre
...@@ -325,9 +337,12 @@ int ReturnValueFromString( int Units, const wxString& TextValue, ...@@ -325,9 +337,12 @@ int ReturnValueFromString( int Units, const wxString& TextValue,
* @param aValue = value in Internal_Unit * @param aValue = value in Internal_Unit
* @param aInternal_Unit = units per inch for Value * @param aInternal_Unit = units per inch for Value
* @param aAdd_unit_symbol = true to add symbol unit to the string value * @param aAdd_unit_symbol = true to add symbol unit to the string value
* @return a wxString what contains value and optionnaly the sumbol unit (like 2.000 mm) * @return a wxString what contains value and optionally the symbol unit (like
* 2.000 mm)
*/ */
wxString ReturnStringFromValue( int aUnits, int aValue, int aInternal_Unit, wxString ReturnStringFromValue( int aUnits,
int aValue,
int aInternal_Unit,
bool aAdd_unit_symbol = false ); bool aAdd_unit_symbol = false );
void AddUnitSymbol( wxStaticText& Stext, int Units = g_UnitMetric ); void AddUnitSymbol( wxStaticText& Stext, int Units = g_UnitMetric );
...@@ -338,24 +353,30 @@ void PutValueInLocalUnits( wxTextCtrl& TextCtr, int Value, ...@@ -338,24 +353,30 @@ void PutValueInLocalUnits( wxTextCtrl& TextCtr, int Value,
int Internal_Unit ); int Internal_Unit );
/* Convert the number Value in a string according to the internal units /* Convert the number Value in a string according to the internal units
* and the selected unit (g_UnitMetric) and put it in the wxTextCtrl TextCtrl */ * and the selected unit (g_UnitMetric) and put it in the wxTextCtrl TextCtrl
**/
int ReturnValueFromTextCtrl( const wxTextCtrl& TextCtr, int ReturnValueFromTextCtrl( const wxTextCtrl& TextCtr,
int Internal_Unit ); int Internal_Unit );
/* return a String List from a string, whith a specific splitter*/ /* return a String List from a string, with a specific splitter*/
wxArrayString* wxStringSplit(wxString txt, wxChar splitter); wxArrayString* wxStringSplit( wxString txt, wxChar splitter );
/** /**
* Function To_User_Unit * Function To_User_Unit
* Convert in inch or mm the variable "val" (double)given in internal units * Convert in inch or mm the variable "val" (double)given in internal units
* @return the converted value, in double * @return the converted value, in double
* @param is_metric : true if the result must be returned in mm , false if inches * @param is_metric : true if the result must be returned in mm , false if
* inches
* @param val : double : the given value * @param val : double : the given value
* @param internal_unit_value = internal units per inch * @param internal_unit_value = internal units per inch
*/ */
double To_User_Unit( bool is_metric, double val, int internal_unit_value ); double To_User_Unit( bool is_metric,
double val,
int internal_unit_value );
int From_User_Unit( bool is_metric, double val, int internal_unit_value ); int From_User_Unit( bool is_metric,
double val,
int internal_unit_value );
wxString GenDate(); wxString GenDate();
void MyFree( void* pt_mem ); void MyFree( void* pt_mem );
void* MyZMalloc( size_t nb_octets ); void* MyZMalloc( size_t nb_octets );
......
...@@ -9,27 +9,17 @@ ...@@ -9,27 +9,17 @@
#define __INCLUDE__CONFIRM_H__ 1 #define __INCLUDE__CONFIRM_H__ 1
void DisplayError( wxWindow* parent, const wxString& msg, int displaytime = 0 ); void DisplayError( wxWindow* parent, const wxString& msg,
void DisplayInfoMessage( wxWindow* parent, const wxString& msg, int displaytime = 0 ); int displaytime = 0 );
void DisplayInfoMessage( wxWindow* parent, const wxString& msg,
/* Routines d'affichage messages ( disparait au bout de displaytime 0.1 secondes) */ int displaytime = 0 );
bool IsOK( wxWindow* parent, const wxString& msg ); bool IsOK( wxWindow* parent, const wxString& msg );
/* Routine affichant la fenetre "CONFIRMATION"
* Retourne 1 ou 0 selon reponse Yes / No */
int Get_Message( const wxString& title, int Get_Message( const wxString& title,
const wxString& frame_caption, const wxString& frame_caption,
wxString& buffer, wxString& buffer,
wxWindow* frame ); wxWindow* frame );
/* Fonction d'installation du menu de Dialogue
* entree: titre = titre a afficher
* entree/sortie :buffer : contient la reponse
* si a l'appel buffer n'est pas vide, son contenu est aussi
* affiche, mais disparait a la 1ere correction */
#endif /* __INCLUDE__CONFIRM_H__ */ #endif /* __INCLUDE__CONFIRM_H__ */
/** /**
* This file is part of the common libary. * This file is part of the common library.
* @file eda_doc.h * @file eda_doc.h
* @see common.h * @see common.h
*/ */
...@@ -8,13 +8,11 @@ ...@@ -8,13 +8,11 @@
#define __INCLUDE__EDA_DOC_H__ 1 #define __INCLUDE__EDA_DOC_H__ 1
/* Search the text Database for found all the key words in the KeyList.
/* Recherche si dans le texte Database on retrouve tous les mots *
* cles donnes dans KeyList ( KeyList = suite de mots cles * Returns:
* separes par des espaces * 0 if no keyword is found
* Retourne: * 1 if keyword found.
* 0 si aucun mot cle trouve
* 1 si mot cle trouve
*/ */
int KeyWordOk( const wxString& KeyList, int KeyWordOk( const wxString& KeyList,
const wxString& Database ); const wxString& Database );
...@@ -23,7 +21,8 @@ int KeyWordOk( const wxString& KeyList, ...@@ -23,7 +21,8 @@ int KeyWordOk( const wxString& KeyList,
* open a document (file) with the suitable browser * open a document (file) with the suitable browser
* @param aFrame = main frame * @param aFrame = main frame
* @param aDocName = filename of file to open (Full filename or short filename) * @param aDocName = filename of file to open (Full filename or short filename)
* if DocName is starting by http: or ftp: or www. the default internet browser is launched * if DocName is starting by http: or ftp: or www. the default internet
* browser is launched
* @param aPaths = a wxPathList to explore. * @param aPaths = a wxPathList to explore.
* if NULL or aDocName is a full filename, aPath is not used. * if NULL or aDocName is a full filename, aPath is not used.
*/ */
...@@ -33,4 +32,3 @@ bool GetAssociatedDocument( wxFrame* aFrame, ...@@ -33,4 +32,3 @@ bool GetAssociatedDocument( wxFrame* aFrame,
#endif /* __INCLUDE__EDA_DOC_H__ */ #endif /* __INCLUDE__EDA_DOC_H__ */
/********************/ /********************/
/* includes systeme */ /* System includes. */
/********************/ /********************/
#ifndef FCTSYS_H #ifndef FCTSYS_H
#define FCTSYS_H #define FCTSYS_H
...@@ -56,7 +56,8 @@ ...@@ -56,7 +56,8 @@
#define USE_RESIZE_BORDER #define USE_RESIZE_BORDER
#if defined(__UNIX__) || defined(USE_RESIZE_BORDER) #if defined(__UNIX__) || defined(USE_RESIZE_BORDER)
#define MAYBE_RESIZE_BORDER wxRESIZE_BORDER // linux users like resizeable borders #define MAYBE_RESIZE_BORDER wxRESIZE_BORDER // linux users like resizeable
// borders
#else #else
#define MAYBE_RESIZE_BORDER 0 // no resizeable border #define MAYBE_RESIZE_BORDER 0 // no resizeable border
#endif #endif
......
/** /**
* This file is part of the common libary * This file is part of the common library
* TODO brief description * TODO brief description
* @file gestfich.h * @file gestfich.h
* @see common.h * @see common.h
...@@ -25,73 +25,52 @@ bool OpenPDF( const wxString& file ); ...@@ -25,73 +25,52 @@ bool OpenPDF( const wxString& file );
void OpenFile( const wxString& file ); void OpenFile( const wxString& file );
bool EDA_DirectorySelector( const wxString& Title, /* Titre de la fenetre */ bool EDA_DirectorySelector( const wxString& Title,
wxString& Path, /* Chemin par defaut */ wxString& Path,
int flag, /* reserve */ int flag, /* reserve */
wxWindow* Frame, /* parent frame */ wxWindow* Frame,
const wxPoint& Pos ); const wxPoint& Pos );
wxString EDA_FileSelector( const wxString &Title, /* Window title */ wxString EDA_FileSelector( const wxString& Title,
const wxString &Path, /* default path */ const wxString& Path,
const wxString &FileName, /* default filename */ const wxString& FileName,
const wxString &Ext, /* default extension */ const wxString& Ext,
const wxString &Mask, /* Display filename mask */ const wxString& Mask,
wxWindow * Frame, /* parent frame */ wxWindow* Frame,
int flag, /* wxSAVE, wxOPEN ..*/ int flag,
const bool keep_working_directory, /* true = do not change the C.W.D. */ const bool keep_working_directory,
const wxPoint& Pos = wxPoint( -1, -1 ) const wxPoint& Pos = wxPoint( -1, -1 ) );
);
/* Return file name without path or extension.
/* Calcule le nom complet d'un file d'apres les chaines
* dir = prefixe (chemin)
* shortname = nom avec ou sans chemin ou extension
* ext = extension
*
* si la chaine name possede deja un chemin ou une extension, elles
* ne seront pas modifiees
* *
* retourne la chaine calculee */ * If the path is in the default kicad path, ./ is prepended to the
* file name. If the file name has the default extension, the file
* name is returned without an extension.
*/
wxString MakeReducedFileName( const wxString& fullfilename, wxString MakeReducedFileName( const wxString& fullfilename,
const wxString& default_path, const wxString& default_path,
const wxString& default_ext ); const wxString& default_ext );
/* Calcule le nom "reduit" d'un file d'apres les chaines
* fullfilename = nom complet
* default_path = prefixe (chemin) par defaut
* default_ext = extension par defaut
*
* retourne le nom reduit, c'est a dire:
* sans le chemin si le chemin est default_path
* avec ./ si si le chemin est le chemin courant
* sans l'extension si l'extension est default_ext
*
* Renvoie un chemin en notation unix ('/' en separateur de repertoire)
*/
WinEDAListBox* GetFileNames( char* Directory, char* Mask ); WinEDAListBox* GetFileNames( char* Directory, char* Mask );
/* Change l'extension du "filename FullFileName" en NewExt.
* Retourne FullFileName */
int ExecuteFile( wxWindow* frame, const wxString& ExecFile, int ExecuteFile( wxWindow* frame, const wxString& ExecFile,
const wxString& param = wxEmptyString ); const wxString& param = wxEmptyString );
void AddDelimiterString( wxString& string ); void AddDelimiterString( wxString& string );
/* Find absolute path for kicad/help (or kicad/help/<language>) */
wxString FindKicadHelpPath(); wxString FindKicadHelpPath();
/* Find absolute path for kicad/help (or kicad/help/<language>) */
/* Return the kicad common data path. */
wxString ReturnKicadDatasPath(); wxString ReturnKicadDatasPath();
/* Retourne le chemin des donnees communes de kicad. */
wxString FindKicadFile( const wxString& shortname );
/* Search the executable file shortname in kicad binary path and return /* Search the executable file shortname in kicad binary path and return
* full file name if found or shortname */ * full file name if found or shortname */
wxString FindKicadFile( const wxString& shortname );
/** /**
...@@ -105,4 +84,3 @@ extern wxString QuoteFullPath( wxFileName& fn, ...@@ -105,4 +84,3 @@ extern wxString QuoteFullPath( wxFileName& fn,
wxPathFormat format = wxPATH_NATIVE ); wxPathFormat format = wxPATH_NATIVE );
#endif /* __INCLUDE__GESTFICH_H__ */ #endif /* __INCLUDE__GESTFICH_H__ */
This diff is collapsed.
/** /**
* This file is part of the common libary \n * This file is part of the common library \n
* Custom string manipulation routines. * Custom string manipulation routines.
* @file kicad_string.h * @file kicad_string.h
* @see common.h, string.cpp * @see common.h, string.cpp
...@@ -13,75 +13,71 @@ ...@@ -13,75 +13,71 @@
char* strupper( char* Text ); char* strupper( char* Text );
char* strlower( char* Text ); char* strlower( char* Text );
/* Read string delimited with (") character.
* Upload NbMaxChar max
* Returns the number of codes read in source
* dest is terminated by NULL
*/
int ReadDelimitedText( char* dest, int ReadDelimitedText( char* dest,
char* source, char* source,
int NbMaxChar ); int NbMaxChar );
/* lit et place dans dest la chaine de caractere trouvee dans source, /* Read one line line from a file.
* delimitee par " . * Returns the first useful line read by eliminating blank lines and comments.
* transfere NbMaxChar max */
* retourne le nombre de codes lus dans source
* dest est termine par NULL */
char* GetLine( FILE* File, char* GetLine( FILE* File,
char* Line, char* Line,
int* LineNum = NULL, int* LineNum = NULL,
int SizeLine = 255 ); int SizeLine = 255 );
/* Routine de lecture de 1 ligne utile /* Remove leading and trailing whitespace.
* retourne la 1ere ligne utile lue. */
* elimine lignes vides et commentaires */
char* StrPurge( char* text ); char* StrPurge( char* text );
/* Supprime les caracteres Space en debut de la ligne text
* retourne un pointeur sur le 1er caractere non Space de text */
/*Return a string giving the current date and time.
*/
char* DateAndTime( char* line ); char* DateAndTime( char* line );
wxString DateAndTime(); wxString DateAndTime();
/* Retourne la chaine de caractere donnant date+heure */
/*
* Routine (compatible with qsort ()) to sort by alphabetical order.
* Equivalent to strncmp () but the numbers are compared by their integer
* value not by their ASCII code.
*/
int StrLenNumCmp( const wxChar* str1, int StrLenNumCmp( const wxChar* str1,
const wxChar* str2, const wxChar* str2,
int NbMax ); int NbMax );
/* /*
* routine (compatible qsort() ) de comparaision pour classement alphab�tique * Routine (compatible with qsort ()) to sort by case insensitive alphabetical
* Analogue a strncmp() mais les nombres sont compar�s selon leur valeur num�rique * order.
* et non pas par leur code ascii */ * Equivalent to strnicmp () but the numbers are compared by their integer
* value not by their ASCII code.
*/
int StrNumICmp( const wxChar* str1, int StrNumICmp( const wxChar* str1,
const wxChar* str2 ); const wxChar* str2 );
/* routine (compatible qsort() ) de comparaison pour classement alphab�tique,
* avec lower case == upper case.
* Analogue a stricmp() mais les nombres sont compar�s selon leur valeur num�rique
* et non pas par leur code ascii */
int StrLenNumICmp( const wxChar* str1, int StrLenNumICmp( const wxChar* str1,
const wxChar* str2, const wxChar* str2,
int NbMax ); int NbMax );
/* routine (compatible qsort() ) de comparaison pour classement alphab�tique, /* Compare string against wild card pattern using the usual rules.
* avec lower case == upper case. * (Wildcards *,?).
* Analogue a stricmp() mais les nombres sont compar�s selon leur valeur num�rique * The reference string is "pattern"
* et non pas par leur code ascii */ * If case_sensitive == TRUE (default), exact comparison
* Returns TRUE if pattern matched otherwise FALSE.
*/
bool WildCompareString( const wxString& pattern, bool WildCompareString( const wxString& pattern,
const wxString& string_to_tst, const wxString& string_to_tst,
bool case_sensitive = TRUE ); bool case_sensitive = TRUE );
/* compare 2 noms de composants, selon regles usuelles /* Replaces decimal point with commas to generated international numbers.
* ( Jokers * , ? , autorises). */
* la chaine de reference est "pattern"
* si case_sensitive == TRUE (default), comparaison exacte
* retourne TRUE si match FALSE si differences */
char* to_point( char* Text ); char* to_point( char* Text );
/* convertit les , en . dans une chaine. utilise pour compenser la fct printf
* qui genere les flottants avec une virgule au lieu du point en mode international */
#endif /* __INCLUDE__KICAD_STRING_H__ */ #endif /* __INCLUDE__KICAD_STRING_H__ */
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include "pcbstruct.h" #include "pcbstruct.h"
#include "dlist.h" #include "dlist.h"
#define L_MIN_DESSIN 1 /* Min width segments to allow draws with tickness */ #define L_MIN_DESSIN 1 /* Min width segments to allow draws with thickness */
class DPAD; class DPAD;
class BOARD_ITEM; class BOARD_ITEM;
...@@ -44,8 +44,6 @@ extern int g_PadCUColor; ...@@ -44,8 +44,6 @@ extern int g_PadCUColor;
extern int g_PadCMPColor; extern int g_PadCMPColor;
/* variables generales */
extern int g_TimeOut; // Timer for automatic saving extern int g_TimeOut; // Timer for automatic saving
extern int g_SaveTime; // Time for next saving extern int g_SaveTime; // Time for next saving
...@@ -59,7 +57,7 @@ extern DLIST<TRACK> g_CurrentTrackList; ...@@ -59,7 +57,7 @@ extern DLIST<TRACK> g_CurrentTrackList;
#define g_FirstTrackSegment \ #define g_FirstTrackSegment \
g_CurrentTrackList.GetFirst() ///< first segment created g_CurrentTrackList.GetFirst() ///< first segment created
extern PCB_SCREEN* ScreenPcb; /* Ecran principal */ extern PCB_SCREEN* ScreenPcb;
extern BOARD* g_ModuleEditor_Pcb; extern BOARD* g_ModuleEditor_Pcb;
/* Pad editing */ /* Pad editing */
......
...@@ -9,50 +9,48 @@ ...@@ -9,50 +9,48 @@
#include "class_base_screen.h" #include "class_base_screen.h"
#include "class_board_item.h" #include "class_board_item.h"
// Definitions relatives aux libariries // Definitions relatives aux libraries
#define ENTETE_LIBRAIRIE "PCBNEW-LibModule-V1" #define ENTETE_LIBRAIRIE "PCBNEW-LibModule-V1"
#define ENTETE_LIBDOC "PCBNEW-LibDoc----V1" #define ENTETE_LIBDOC "PCBNEW-LibDoc----V1"
#define L_ENTETE_LIB 18 #define L_ENTETE_LIB 18
#define EXT_DOC wxT( "mdc" ) #define EXT_DOC wxT( "mdc" )
/* Bits indicateurs du membre .Status, pour pistes, modules... */ #define FLAG1 (1 << 13) /* flag for free local computations */
#define FLAG0 (1 << 12) /* flag for free local computations */
#define BEGIN_ONPAD (1 << 11) /* flag indicating a start of segment pad */
#define END_ONPAD (1 << 10) /* flag indicating an end of segment pad */
#define BUSY (1 << 9) /* flag indicating that the structure has
* already been edited, in some routines */
#define DELETED (1 << 8) /* flag indicating structures erased nd set
* string "DELETED" */
#define NO_TRACE (1 << 7) /* The element must not be displayed */
#define FLAG1 (1 << 13) /* flag libre pour calculs locaux */ #define SURBRILL (1 << 5) /* element highlighted */
#define FLAG0 (1 << 12) /* flag libre pour calculs locaux */ #define DRAG (1 << 4) /* segment in drag mode */
#define BEGIN_ONPAD (1 << 11) /* flag indiquant un debut de segment sur pad */ #define EDIT (1 << 3) /* element being edited */
#define END_ONPAD (1 << 10) /* flag indiquant une fin de segment sur pad */ #define SEGM_FIXE (1 << 2) /* segment fixed (not erase global) */
#define BUSY (1 << 9) /* flag indiquant que la structure a deja #define SEGM_AR (1 << 1) /* segment marked for auto routing */
* ete examinee, dans certaines routines */ #define CHAIN (1 << 0) /* mark segment */
#define DELETED (1 << 8) /* Bit flag de Status pour structures effacee
* et mises en chaine "DELETED" */
#define NO_TRACE (1 << 7) /* l'element ne doit pas etre affiche */
#define SURBRILL (1 << 5) /* element en surbrillance */
#define DRAG (1 << 4) /* segment en mode drag */
#define EDIT (1 << 3) /* element en cours d'edition */
#define SEGM_FIXE (1 << 2) /* segment FIXE ( pas d'effacement global ) */
#define SEGM_AR (1 << 1) /* segment Auto_Route */
#define CHAIN (1 << 0) /* segment marque */
/* Layer identification (layer number) */ /* Layer identification (layer number) */
#define FIRST_COPPER_LAYER 0 #define FIRST_COPPER_LAYER 0
#define COPPER_LAYER_N 0 #define COPPER_LAYER_N 0
#define LAYER_N_2 1 /* Numero layer 2 */ #define LAYER_N_2 1
#define LAYER_N_3 2 /* Numero layer 3 */ #define LAYER_N_3 2
#define LAYER_N_4 3 /* Numero layer 4 */ #define LAYER_N_4 3
#define LAYER_N_5 4 /* Numero layer 5 */ #define LAYER_N_5 4
#define LAYER_N_6 5 /* Numero layer 6 */ #define LAYER_N_6 5
#define LAYER_N_7 6 /* Numero layer 7 */ #define LAYER_N_7 6
#define LAYER_N_8 7 /* Numero layer 8 */ #define LAYER_N_8 7
#define LAYER_N_9 8 /* Numero layer 9 */ #define LAYER_N_9 8
#define LAYER_N_10 9 /* Numero layer 10 */ #define LAYER_N_10 9
#define LAYER_N_11 10 /* Numero layer 11 */ #define LAYER_N_11 10
#define LAYER_N_12 11 /* Numero layer 12 */ #define LAYER_N_12 11
#define LAYER_N_13 12 /* Numero layer 13 */ #define LAYER_N_13 12
#define LAYER_N_14 13 /* Numero layer 14 */ #define LAYER_N_14 13
#define LAYER_N_15 14 /* Numero layer 15 */ #define LAYER_N_15 14
#define LAYER_CMP_N 15 #define LAYER_CMP_N 15
#define CMP_N 15 #define CMP_N 15
#define LAST_COPPER_LAYER 15 #define LAST_COPPER_LAYER 15
...@@ -78,9 +76,6 @@ ...@@ -78,9 +76,6 @@
#define LAYER_COUNT 32 #define LAYER_COUNT 32
/*************************************/
/* constantes de gestion des couches */
/*************************************/
#define CUIVRE_LAYER (1 << COPPER_LAYER_N) ///< bit mask for copper layer #define CUIVRE_LAYER (1 << COPPER_LAYER_N) ///< bit mask for copper layer
#define LAYER_2 (1 << LAYER_N_2) ///< bit mask for layer 2 #define LAYER_2 (1 << LAYER_N_2) ///< bit mask for layer 2
#define LAYER_3 (1 << LAYER_N_3) ///< bit mask for layer 3 #define LAYER_3 (1 << LAYER_N_3) ///< bit mask for layer 3
...@@ -115,15 +110,14 @@ ...@@ -115,15 +110,14 @@
#define LAST_NON_COPPER_LAYER EDGE_N #define LAST_NON_COPPER_LAYER EDGE_N
// extra bits 0xE0000000 // extra bits 0xE0000000
/* Helpful global layers maks : */ /* Helpful global layers mask : */
#define ALL_LAYERS 0x1FFFFFFF // Pcbnew used 29 layers #define ALL_LAYERS 0x1FFFFFFF // Pcbnew used 29 layers
#define FULL_LAYERS 0xFFFFFFFF // Gerbview used 32 layers #define FULL_LAYERS 0xFFFFFFFF // Gerbview used 32 layers
#define ALL_NO_CU_LAYERS 0x1FFF0000 #define ALL_NO_CU_LAYERS 0x1FFF0000
#define ALL_CU_LAYERS 0x0000FFFF #define ALL_CU_LAYERS 0x0000FFFF
#define INTERNAL_LAYERS 0x00007FFE /* Bits layers internes */ #define INTERNAL_LAYERS 0x00007FFE
#define EXTERNAL_LAYERS 0x00008001 #define EXTERNAL_LAYERS 0x00008001
/* Forward declaration */
class NETINFO_ITEM; class NETINFO_ITEM;
class MARKER_PCB; class MARKER_PCB;
class RATSNEST_ITEM; class RATSNEST_ITEM;
...@@ -155,7 +149,7 @@ enum ELEMENTS_NUMBERS ...@@ -155,7 +149,7 @@ enum ELEMENTS_NUMBERS
* tests whether a given integer is a valid layer index * tests whether a given integer is a valid layer index
* @param aLayerIndex = Layer index to test * @param aLayerIndex = Layer index to test
* @return true if aLayerIndex is a valid layer index * @return true if aLayerIndex is a valid layer index
*/ */
inline bool IsValidLayerIndex( int aLayerIndex ) inline bool IsValidLayerIndex( int aLayerIndex )
{ {
return aLayerIndex >= 0 && aLayerIndex < NB_LAYERS; return aLayerIndex >= 0 && aLayerIndex < NB_LAYERS;
...@@ -166,10 +160,11 @@ inline bool IsValidLayerIndex( int aLayerIndex ) ...@@ -166,10 +160,11 @@ inline bool IsValidLayerIndex( int aLayerIndex )
* tests whether an integer is a valid copper layer index * tests whether an integer is a valid copper layer index
* @param aLayerIndex = Layer index to test * @param aLayerIndex = Layer index to test
* @return true if aLayerIndex is a valid copper layer index * @return true if aLayerIndex is a valid copper layer index
*/ */
inline bool IsValidCopperLayerIndex( int aLayerIndex ) inline bool IsValidCopperLayerIndex( int aLayerIndex )
{ {
return aLayerIndex >= FIRST_COPPER_LAYER && aLayerIndex <= LAST_COPPER_LAYER; return aLayerIndex >= FIRST_COPPER_LAYER
&& aLayerIndex <= LAST_COPPER_LAYER;
} }
/** /**
...@@ -177,10 +172,11 @@ inline bool IsValidCopperLayerIndex( int aLayerIndex ) ...@@ -177,10 +172,11 @@ inline bool IsValidCopperLayerIndex( int aLayerIndex )
* tests whether an integer is a valid non copper layer index * tests whether an integer is a valid non copper layer index
* @param aLayerIndex = Layer index to test * @param aLayerIndex = Layer index to test
* @return true if aLayerIndex is a valid non copper layer index * @return true if aLayerIndex is a valid non copper layer index
*/ */
inline bool IsValidNonCopperLayerIndex( int aLayerIndex ) inline bool IsValidNonCopperLayerIndex( int aLayerIndex )
{ {
return aLayerIndex >= FIRST_NO_COPPER_LAYER && aLayerIndex <= LAST_NO_COPPER_LAYER; return aLayerIndex >= FIRST_NO_COPPER_LAYER
&& aLayerIndex <= LAST_NO_COPPER_LAYER;
} }
...@@ -205,11 +201,6 @@ enum DisplayViaMode { ...@@ -205,11 +201,6 @@ enum DisplayViaMode {
#include "class_module.h" // Class for the footprint #include "class_module.h" // Class for the footprint
#include "class_netinfo.h" // Class for nets #include "class_netinfo.h" // Class for nets
/***********************************/
/* Description des elements du PCB */
/***********************************/
#include "class_drawsegment.h" #include "class_drawsegment.h"
#include "class_pcb_text.h" #include "class_pcb_text.h"
#include "class_cotation.h" #include "class_cotation.h"
...@@ -219,15 +210,23 @@ enum DisplayViaMode { ...@@ -219,15 +210,23 @@ enum DisplayViaMode {
#include "class_zone.h" #include "class_zone.h"
/* Values for DISPLAY_OPTIONS.ShowTrackClearanceMode parameter option /* Values for DISPLAY_OPTIONS.ShowTrackClearanceMode parameter option
* This parameter controls how to show tracks and vias clerance area * This parameter controls how to show tracks and vias clearance area
*/ */
enum ShowTrackClearanceModeList { enum ShowTrackClearanceModeList {
DO_NOT_SHOW_CLEARANCE = 0, // Do not show clearance areas DO_NOT_SHOW_CLEARANCE = 0, // Do not show clearance areas
SHOW_CLEARANCE_NEW_TRACKS, // Show clearance areas only for new track during track creation SHOW_CLEARANCE_NEW_TRACKS, /* Show clearance areas only
SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS, /* Show clrearance areas only for new track during track creation, * for new track during track
* and shows a via clearnce area at end of current new segment (guide to place a nev via * creation */
SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS, /* Show clearance areas only
* for new track during track
* creation, and shows a via
* clearance area at end of
* current new segment (guide
* to place a new via
*/
SHOW_CLEARANCE_ALWAYS /* Show Always clearance areas
* for track and vias
*/ */
SHOW_CLEARANCE_ALWAYS // Show Always clearance areas for track and vias
}; };
class DISPLAY_OPTIONS class DISPLAY_OPTIONS
...@@ -246,7 +245,9 @@ public: ...@@ -246,7 +245,9 @@ public:
* 0 = do not show clearance * 0 = do not show clearance
* 1 = show track clearance * 1 = show track clearance
* 2 = show clearance + via area * 2 = show clearance + via area
* (useful to know what clearance area is neede if we want to put a via on terminal track point) * (useful to know what clearance area is
* needed if we want to put a via on
* terminal track point)
*/ */
int m_DisplayViaMode; /* 0 do not show via hole, int m_DisplayViaMode; /* 0 do not show via hole,
......
...@@ -64,7 +64,7 @@ protected: ...@@ -64,7 +64,7 @@ protected:
public: public:
// Singletton handling: // Singleton handling:
static PyHandler* GetInstance(); static PyHandler* GetInstance();
~PyHandler(); ~PyHandler();
......
/****************************************************/ /*************/
/* TRIGO.H : Tables de fonctions trigonometriques */ /* trigo.h */
/* utilisees dans les rotations d'axes */ /*************/
/****************************************************/
#ifndef TRIGO_H #ifndef TRIGO_H
#define TRIGO_H #define TRIGO_H
/* Prototype des fonctions de trigo.cpp */
void RotatePoint( int *pX, int *pY, int angle ); void RotatePoint( int *pX, int *pY, int angle );
void RotatePoint( int *pX, int *pY, int cx, int cy, int angle ); void RotatePoint( int *pX, int *pY, int cx, int cy, int angle );
void RotatePoint( wxPoint* point, int angle ); void RotatePoint( wxPoint* point, int angle );
...@@ -15,11 +13,11 @@ void RotatePoint( wxPoint *point, const wxPoint & centre, int angle ); ...@@ -15,11 +13,11 @@ void RotatePoint( wxPoint *point, const wxPoint & centre, int angle );
void RotatePoint( double *pX, double *pY, int angle ); void RotatePoint( double *pX, double *pY, int angle );
void RotatePoint( double *pX, double *pY, double cx, double cy, int angle ); void RotatePoint( double *pX, double *pY, double cx, double cy, int angle );
/** function ArcTangente /* Return the arc tangent of 0.1 degrees coord vector dx, dy
Retourne l'arc tangente en 0.1 degres du vecteur de coord dx, dy * between -1800 and 1800
entre -1800 et 1800 * Equivalent to atan2 (but faster for calculations if
Analogue a atan2 ( mais plus rapide pour les caculs si * the angle is 0 to -1800, or + - 900
l'angle est souvent 0, -1800, ou +- 900 */ */
int ArcTangente( int dy, int dx ); int ArcTangente( int dy, int dx );
bool DistanceTest( int seuil, int dx, int dy, int spot_cX, int spot_cY ); bool DistanceTest( int seuil, int dx, int dy, int spot_cX, int spot_cY );
...@@ -33,20 +31,21 @@ bool DistanceTest( int seuil, int dx, int dy, int spot_cX, int spot_cY ); ...@@ -33,20 +31,21 @@ bool DistanceTest( int seuil, int dx, int dy, int spot_cX, int spot_cY );
* @param aEnd is the second end-point of the line segment * @param aEnd is the second end-point of the line segment
* @param aDist = maximum distance for hit * @param aDist = maximum distance for hit
*/ */
bool TestSegmentHit( wxPoint aRefPoint, wxPoint aStart, wxPoint aEnd, int aDist ); bool TestSegmentHit( wxPoint aRefPoint, wxPoint aStart, wxPoint aEnd,
int aDist );
/*******************/ /*******************/
/* Macro NEW_COORD */ /* Macro NEW_COORD */
/*******************/ /*******************/
/* Macro de calcul de novelles coordonnees par rotation d'axe /* Calculate coordinates to rotate around an axis
coord : xrot = y*sin + x*cos * coord: xrot = y + x * sin * cos
yrot = y*cos - x*sin * yrot = y * cos - sin * x
soit : xrot = (y*tg + x)*cos * either: xrot = (y + x * tg) * cos
yrot = (y - x*tg)*cos * yrot = (y - x * tg) * cos
*
les coeffs COS sont tabules en fct de tg sur 16 valeurs. * Cosine coefficients are loaded from a trigometric table by 16 bit values.
*/ */
#define NEW_COORD( x0, y0 ) \ #define NEW_COORD( x0, y0 ) \
do { \ do { \
int itmp; \ int itmp; \
......
/***************************************************/ /***************/
/* WORKSHEET.H: constantes pour trace du cartouche */ /* worksheet.h */
/***************************************************/ /***************/
/****************************/
/* Description du cartouche */
/****************************/
/* Values are in 1/1000 inch */ /* Values are in 1/1000 inch */
#ifndef __WORKSHEET_H__ #ifndef __WORKSHEET_H__
#define __WORKSHEET_H__ #define __WORKSHEET_H__
#define GRID_REF_W 70 /* hauteur de la bande de reference grille */ #define GRID_REF_W 70 /* height of the band reference grid */
#define SIZETEXT 60 /* Dimension des textes du cartouche */ #define SIZETEXT 60 /* worksheet text size */
#define SIZETEXT_REF 50 /* Dimension des lettres du marquage des reperes */ #define SIZETEXT_REF 50 /* worksheet frame reference text size */
#define PAS_REF 2000 /* pas des marquages de reference des reperes */ #define PAS_REF 2000 /* no reference markings on worksheet frame */
#define TEXT_VTAB_HEIGHT SIZETEXT * 2 #define TEXT_VTAB_HEIGHT SIZETEXT * 2
#if defined(KICAD_GOST) #if defined(KICAD_GOST)
/* Shtamp */
#define STAMP_OX 185 * 10000 / 254 #define STAMP_OX 185 * 10000 / 254
#define STAMP_OY 55 * 10000 / 254 #define STAMP_OY 55 * 10000 / 254
...@@ -69,8 +64,8 @@ ...@@ -69,8 +64,8 @@
#define STAMP_25 25 * 10000 / 254 #define STAMP_25 25 * 10000 / 254
#endif #endif
/* Les coord ci dessous sont relatives au coin bas - droit de la feuille, et /* The coordinates below are relative to the bottom right corner of page and
* seront soustraires de cette origine * will be subtracted from this origin.
*/ */
#define BLOCK_OX 4200 #define BLOCK_OX 4200
#define BLOCK_KICAD_VERSION_X BLOCK_OX - SIZETEXT #define BLOCK_KICAD_VERSION_X BLOCK_OX - SIZETEXT
...@@ -100,15 +95,15 @@ ...@@ -100,15 +95,15 @@
struct Ki_WorkSheetData struct Ki_WorkSheetData
{ {
public: public:
int m_Type; /* nombre permettant de reconnaitre la description */ int m_Type;
Ki_WorkSheetData* Pnext; Ki_WorkSheetData* Pnext;
int m_Posx, m_Posy; /* position de l'element ou point de depart du segment */ int m_Posx, m_Posy;
int m_Endx, m_Endy; /* extremite d'un element type segment ou cadre */ int m_Endx, m_Endy;
const wxChar* m_Legende; /* Pour m_Textes: texte a afficher avant le texte lui meme */ const wxChar* m_Legende;
const wxChar* m_Text; /* Pour m_Textes:pointeur sur le texte a afficher */ const wxChar* m_Text;
}; };
/* Type des descriptions Ki_WorkSheetData */ /* Work sheet structure type definitions. */
enum TypeKi_WorkSheetData { enum TypeKi_WorkSheetData {
WS_DATE, WS_DATE,
WS_REV, WS_REV,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment