Commit d2eac37d authored by stambaughw's avatar stambaughw

Comment translation complete, Yeah!!!!

parent 8d8bdc3e
......@@ -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)
......
/************************************************************/
/* 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,8 +35,10 @@ 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 ...
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;
......@@ -53,21 +51,20 @@ 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 dfini)*/
wxString m_KicadEnv; /* Chemin de kicad dfini dans la
* variable d'environnement KICAD,
* typiquement /usr/local/kicad ou
* c:\kicad */
bool m_Env_Defined; // TRUE si variable d'environnement KICAD definie
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)
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; // 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;
......@@ -77,8 +74,7 @@ protected:
wxFileName m_projectFileName;
wxString m_LastVisitedLibPath;
public:
WinEDA_App();
public: WinEDA_App();
~WinEDA_App();
bool OnInit();
int OnRun();
......@@ -87,7 +83,7 @@ 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
......@@ -95,7 +91,8 @@ public:
* @param aId = flag : LIBRARY_TYPE_EESCHEMA or LIBRARY_TYPE_PCBNEW
* 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,7 +140,8 @@ 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 );
......@@ -188,24 +188,28 @@ 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 );
......
This diff is collapsed.
// Largeur du toolbar vertical
#define VTOOLBAR_WIDTH 26
// dimension d'un tool vertical
#define TOOL_SIZE 23
// 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
* @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,13 +56,20 @@ 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
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:
......@@ -67,9 +77,11 @@ public:
~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
*/
......@@ -87,11 +99,13 @@ public:
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 ClearItemsList();
unsigned GetCount()
{
return m_ItemsSelection.GetCount();
......@@ -100,12 +114,13 @@ public:
/* Cancel Current block operation.
*/
*/
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
*/
......@@ -113,4 +128,3 @@ void DrawAndSizingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool eras
#endif /* __INCLUDE__BLOCK_COMMANDE_H__ */
This diff is collapsed.
......@@ -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�
* 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.
......
/**************************************************************/
/* 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,7 +62,8 @@ 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.
......
/********************/
/* 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[]
/// 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
/// 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 )
#endif
int ndx = aColor & MASKCOLOR;
return wxColour(
ColorRefs[ndx].m_Red,
return wxColour( ColorRefs[ndx].m_Red,
ColorRefs[ndx].m_Green,
ColorRefs[ndx].m_Blue
#if wxCHECK_VERSION(2,8,5)
......
......@@ -17,13 +17,17 @@ 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_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 MOUSE_MIDDLE 0x08000000 /* Middle button mouse
* flag for block commands
*/
#define NB_ITEMS 11
......@@ -104,7 +108,7 @@ private:
};
/* Clsass to handle pages sizes:
/* Class to handle pages sizes:
*/
class Ki_PageDescr
{
......@@ -144,7 +148,7 @@ extern wxString g_ProductName;
/* Default user lib path can be left void, if the standard lib path is used */
extern wxString g_UserLibDirBuffer;
extern int g_DebugLevel; // 0= Pas de debug */
extern int g_DebugLevel;
extern int g_MouseOldButtons;
extern int g_KeyPressed;
......@@ -169,6 +173,7 @@ 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;
......@@ -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 );
/**
......@@ -238,7 +248,8 @@ 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
*/
......@@ -246,28 +257,29 @@ bool ProcessExecute( const wxString& aCommandLine,
int aFlags = wxEXEC_ASYNC );
/**
* Function ReturnPcbLayerName
* @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 GetAboutBuildVersion(); /* Return custom build date for about
* dialog */
/**
* function Affiche_1_Parametre
......@@ -325,9 +337,12 @@ 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,
wxString ReturnStringFromValue( int aUnits,
int aValue,
int aInternal_Unit,
bool aAdd_unit_symbol = false );
void AddUnitSymbol( wxStaticText& Stext, int Units = g_UnitMetric );
......@@ -338,24 +353,30 @@ 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 */
* 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 );
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 );
......
......@@ -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__ */
/**
* This file is part of the common libary.
* This file is part of the common library.
* @file eda_doc.h
* @see common.h
*/
......@@ -8,13 +8,11 @@
#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 );
......@@ -23,7 +21,8 @@ int KeyWordOk( const wxString& KeyList,
* 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.
*/
......@@ -33,4 +32,3 @@ bool GetAssociatedDocument( wxFrame* aFrame,
#endif /* __INCLUDE__EDA_DOC_H__ */
/********************/
/* includes systeme */
/* System includes. */
/********************/
#ifndef FCTSYS_H
#define FCTSYS_H
......@@ -56,7 +56,8 @@
#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
#endif
......
/**
* 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
......@@ -25,73 +25,52 @@ bool OpenPDF( const wxString& file );
void OpenFile( const wxString& file );
bool EDA_DirectorySelector( const wxString& Title, /* Titre de la fenetre */
wxString& Path, /* Chemin par defaut */
bool EDA_DirectorySelector( const wxString& Title,
wxString& Path,
int flag, /* reserve */
wxWindow* Frame, /* parent frame */
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 )
);
/* 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
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 ) );
/* Return file name without path or extension.
*
* 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,
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)
*/
WinEDAListBox* GetFileNames( char* Directory, char* Mask );
/* Change l'extension du "filename FullFileName" en NewExt.
* Retourne FullFileName */
int ExecuteFile( wxWindow* frame, const wxString& ExecFile,
const wxString& param = wxEmptyString );
void AddDelimiterString( wxString& string );
/* Find absolute path for kicad/help (or kicad/help/<language>) */
wxString FindKicadHelpPath();
/* Find absolute path for kicad/help (or kicad/help/<language>) */
/* Return the kicad common data path. */
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
* 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__ */
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.
* @file kicad_string.h
* @see common.h, string.cpp
......@@ -13,75 +13,71 @@
char* strupper( 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,
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 );
/* Routine de lecture de 1 ligne utile
* retourne la 1ere ligne utile lue.
* elimine lignes vides et commentaires */
/* Remove leading and trailing whitespace.
*/
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();
/* 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,
const wxChar* str2,
int NbMax );
/*
* routine (compatible qsort() ) de comparaision pour classement alphab�tique
* Analogue a strncmp() mais les nombres sont compar�s selon leur valeur num�rique
* et non pas par leur code ascii */
* 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�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,
const wxChar* str2,
int NbMax );
/* 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 */
/* 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 );
/* 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 */
/* Replaces decimal point with commas to generated international numbers.
*/
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__ */
......@@ -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,9 +76,6 @@
#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
......@@ -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_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
*/
SHOW_CLEARANCE_ALWAYS // Show Always clearance areas for track and vias
};
class DISPLAY_OPTIONS
......@@ -246,7 +245,9 @@ public:
* 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)
* (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,
......
......@@ -64,7 +64,7 @@ protected:
public:
// Singletton handling:
// Singleton handling:
static PyHandler* GetInstance();
~PyHandler();
......
/****************************************************/
/* 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; \
......
/***************************************************/
/* 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,
......
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