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)
......
This diff is collapsed.
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,45 +56,56 @@ typedef enum { ...@@ -53,45 +56,56 @@ 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
* = 0,0 in block paste */ * 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: public:
BLOCK_SELECTOR(); BLOCK_SELECTOR();
~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
*/ */
void SetMessageBlock( WinEDA_DrawFrame* frame ); void SetMessageBlock( WinEDA_DrawFrame* frame );
void Draw( WinEDA_DrawPanel* aPanel, void Draw( WinEDA_DrawPanel* aPanel,
wxDC* aDC, const wxPoint& aOffset, wxDC* aDC, const wxPoint& aOffset,
int aDrawMode, int aDrawMode,
int aColor ); int aColor );
/** Function PushItem /** Function PushItem
* Add aItem to the list of items * Add aItem to the list of items
* @param aItem = an ITEM_PICKER to add to the list * @param aItem = an ITEM_PICKER to add to the list
*/ */
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,17 +114,17 @@ public: ...@@ -100,17 +114,17 @@ 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
*/ */
void DrawAndSizingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); void DrawAndSizingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
#endif /* __INCLUDE__BLOCK_COMMANDE_H__ */ #endif /* __INCLUDE__BLOCK_COMMANDE_H__ */
This diff is collapsed.
...@@ -3,22 +3,22 @@ ...@@ -3,22 +3,22 @@
* *
* Copyright (C) 2007-2008 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com> * Copyright (C) 2007-2008 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2004-2007 Kicad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2007 Kicad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here: * along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license, * or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc., * or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
...@@ -37,14 +37,14 @@ class EDA_BaseStruct; ...@@ -37,14 +37,14 @@ class EDA_BaseStruct;
/** /**
* Class COLLECTOR * Class COLLECTOR
* is an abstract class that will find and hold all the objects according to * is an abstract class that will find and hold all the objects according to
* an inspection done by the Inspect() function which must be implemented by * an inspection done by the Inspect() function which must be implemented by
* any derived class. When Inspect() finds an object that it wants to collect, * any derived class. When Inspect() finds an object that it wants to collect,
* i.e. one that it "likes", then it only has to do an Append( testItem ) * i.e. one that it "likes", then it only has to do an Append( testItem )
* on it to add it to its collection, but in all cases for the scan to continue, * on it to add it to its collection, but in all cases for the scan to continue,
* Inspect() must return SEARCH_CONTINUE. * Inspect() must return SEARCH_CONTINUE.
* *
* Later, after collection, the user can iterate through all the objects * Later, after collection, the user can iterate through all the objects
* in the remembered collection using GetCount() and the [int] operator. * in the remembered collection using GetCount() and the [int] operator.
*/ */
class COLLECTOR : public INSPECTOR class COLLECTOR : public INSPECTOR
...@@ -61,11 +61,11 @@ protected: ...@@ -61,11 +61,11 @@ protected:
/// A bounding box to test against, and that was used to make the collection. /// A bounding box to test against, and that was used to make the collection.
EDA_Rect m_RefBox; EDA_Rect m_RefBox;
/// The time at which the collection was made. /// The time at which the collection was made.
int m_TimeAtCollection; int m_TimeAtCollection;
public: public:
COLLECTOR() COLLECTOR()
...@@ -77,7 +77,7 @@ public: ...@@ -77,7 +77,7 @@ public:
{ {
} }
/** /**
* Function GetCount * Function GetCount
* returns the number of objects in the list * returns the number of objects in the list
...@@ -87,7 +87,7 @@ public: ...@@ -87,7 +87,7 @@ public:
return (int) m_List.size(); return (int) m_List.size();
} }
/** /**
* Function Empty * Function Empty
* sets the list to empty * sets the list to empty
...@@ -97,7 +97,7 @@ public: ...@@ -97,7 +97,7 @@ public:
m_List.clear(); m_List.clear();
} }
/** /**
* Function Append * Function Append
* adds an item to the end of the list. * adds an item to the end of the list.
...@@ -142,7 +142,7 @@ public: ...@@ -142,7 +142,7 @@ public:
return &m_List[0]; return &m_List[0];
} }
/** /**
* Function SetScanTypes * Function SetScanTypes
* records the list of KICAD_T types to consider for collection by * records the list of KICAD_T types to consider for collection by
...@@ -154,7 +154,7 @@ public: ...@@ -154,7 +154,7 @@ public:
{ {
m_ScanTypes = scanTypes; m_ScanTypes = scanTypes;
} }
void SetTimeNow() void SetTimeNow()
{ {
m_TimeAtCollection = GetTimeStamp(); m_TimeAtCollection = GetTimeStamp();
...@@ -169,12 +169,12 @@ public: ...@@ -169,12 +169,12 @@ public:
void SetBoundingBox( const EDA_Rect& aRefBox ) { m_RefBox = aRefBox; } void SetBoundingBox( const EDA_Rect& aRefBox ) { m_RefBox = aRefBox; }
const EDA_Rect& GetBoundingBox() const { return m_RefBox; } const EDA_Rect& GetBoundingBox() const { return m_RefBox; }
/** /**
* Function IsSimilarPointAndTime * Function IsSimilarPointAndTime
* returns true if the given reference point is "similar" (defined here) * returns true if the given reference point is "similar" (defined here)
* to the internal reference point and the current time is within a few * to the internal reference point and the current time is within a few
* seconds of the internal m_TimeAtCollection. * seconds of the internal m_TimeAtCollection.
* *
* @param aRefPos A wxPoint to compare to. * @param aRefPos A wxPoint to compare to.
...@@ -184,21 +184,21 @@ public: ...@@ -184,21 +184,21 @@ public:
{ {
const int distMax = 2; // adjust these here const int distMax = 2; // adjust these here
const int timeMax = 3; // seconds, I think const int timeMax = 3; // seconds, I think
int dx = abs( aRefPos.x - m_RefPos.x ); int dx = abs( aRefPos.x - m_RefPos.x );
int dy = abs( aRefPos.y - m_RefPos.y ); int dy = abs( aRefPos.y - m_RefPos.y );
if( dx <= distMax && dy <= distMax if( dx <= distMax && dy <= distMax
&& GetTimeStamp()-m_TimeAtCollection <= timeMax ) && GetTimeStamp()-m_TimeAtCollection <= timeMax )
return true; return true;
else else
return false; return false;
} }
/** /**
* Function Inspect * Function Inspect
* is the examining function within the INSPECTOR which is passed to the * is the examining function within the INSPECTOR which is passed to the
* Iterate function. It is used primarily for searching, but not limited to * Iterate function. It is used primarily for searching, but not limited to
* that. It can also collect or modify the scanned objects. * that. It can also collect or modify the scanned objects.
* *
...@@ -209,14 +209,14 @@ public: ...@@ -209,14 +209,14 @@ public:
* else SCAN_CONTINUE; * else SCAN_CONTINUE;
* *
* implement in derived class: * implement in derived class:
SEARCH_RESULT virtual Inspect( EDA_BaseStruct* testItem, SEARCH_RESULT virtual Inspect( EDA_BaseStruct* testItem,
const void* testData ) = 0; const void* testData ) = 0;
*/ */
/** /**
* Function Collect * Function Collect
* scans an EDA_BaseStruct using this class's Inspector method, which does * scans an EDA_BaseStruct using this class's Inspector method, which does
* the collection. * the collection.
* @param container An EDA_BaseStruct to scan, including those items it contains. * @param container An EDA_BaseStruct to scan, including those items it contains.
* @param aRefPos A wxPoint to use in hit-testing. * @param aRefPos A wxPoint to use in hit-testing.
...@@ -226,14 +226,14 @@ public: ...@@ -226,14 +226,14 @@ public:
virtual void Collect( EDA_BaseStruct* container, const wxPoint& aRefPos ) virtual void Collect( EDA_BaseStruct* container, const wxPoint& aRefPos )
{ {
example implementation: example implementation:
SetRefPos( aRefPos ); // remember where the snapshot was taken from SetRefPos( aRefPos ); // remember where the snapshot was taken from
Empty(); // empty the collection Empty(); // empty the collection
// visit the board with the INSPECTOR (me). // visit the board with the INSPECTOR (me).
container->Visit( this, // INSPECTOR* inspector container->Visit( this, // INSPECTOR* inspector
NULL, // const void* testData, NULL, // const void* testData,
m_ScanTypes); m_ScanTypes);
SetTimeNow(); // when it was taken SetTimeNow(); // when it was taken
} }
......
...@@ -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,13 +62,14 @@ public: ...@@ -59,13 +62,14 @@ 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.
* So this function can be called to remove old commands * So this function can be called to remove old commands
*/ */
void ClearUndoORRedoList( UNDO_REDO_CONTAINER& aList, int aItemCount = -1 ); void ClearUndoORRedoList( UNDO_REDO_CONTAINER& aList, int aItemCount = -1 );
}; };
......
/********************/ /************/
/* 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,14 +101,13 @@ static inline wxColour MakeColour( int aColor ) ...@@ -102,14 +101,13 @@ 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)
,(unsigned char) alpha ,(unsigned char) alpha
#endif #endif
); );
} }
#endif /* ifndef _COLORS_H */ #endif /* ifndef _COLORS_H */
This diff is collapsed.
...@@ -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,29 +8,27 @@ ...@@ -8,29 +8,27 @@
#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 );
/** Function GetAssociatedDocument /** Function GetAssociatedDocument
* 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.
*/ */
bool GetAssociatedDocument( wxFrame* aFrame, bool GetAssociatedDocument( wxFrame* aFrame,
const wxString& aDocName, const wxString& aDocName,
const wxPathList* aPaths = NULL ); const wxPathList* aPaths = NULL );
#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,9 +56,10 @@ ...@@ -56,9 +56,10 @@
#define USE_RESIZE_BORDER #define USE_RESIZE_BORDER
#if defined(__UNIX__) || defined(USE_RESIZE_BORDER) #if defined(__UNIX__) || defined(USE_RESIZE_BORDER)
#define MAYBE_RESIZE_BORDER wxRESIZE_BORDER // linux users like resizeable borders #define MAYBE_RESIZE_BORDER wxRESIZE_BORDER // linux users like resizeable
// borders
#else #else
#define MAYBE_RESIZE_BORDER 0 // no resizeable border #define MAYBE_RESIZE_BORDER 0 // no resizeable border
#endif #endif
#include "config.h" #include "config.h"
......
/** /**
* 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
...@@ -21,77 +21,56 @@ class WinEDAListBox; ...@@ -21,77 +21,56 @@ class WinEDAListBox;
* @param file = PDF file to open * @param file = PDF file to open
* @return true is success, false if no PDF viewer found * @return true is success, false if no PDF viewer found
*/ */
bool OpenPDF( const wxString& file ); bool OpenPDF( const wxString& file );
void OpenFile( const wxString& file );
bool EDA_DirectorySelector( const wxString& Title, /* Titre de la fenetre */
wxString& Path, /* Chemin par defaut */
int flag, /* reserve */
wxWindow* Frame, /* parent frame */
const wxPoint& Pos );
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
*
* retourne la chaine calculee */
wxString MakeReducedFileName( const wxString& fullfilename, void OpenFile( const wxString& file );
const wxString& default_path,
const wxString& default_ext );
/* Calcule le nom "reduit" d'un file d'apres les chaines bool EDA_DirectorySelector( const wxString& Title,
* fullfilename = nom complet wxString& Path,
* default_path = prefixe (chemin) par defaut int flag, /* reserve */
* default_ext = extension par defaut wxWindow* Frame,
* const wxPoint& Pos );
* retourne le nom reduit, c'est a dire:
* sans le chemin si le chemin est default_path wxString EDA_FileSelector( const wxString& Title,
* avec ./ si si le chemin est le chemin courant const wxString& Path,
* sans l'extension si l'extension est default_ext 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.
* *
* Renvoie un chemin en notation unix ('/' en separateur de repertoire) * If the path is in the default kicad path, ./ is prepended to the
* file name. If the file name has the default extension, the file
* name is returned without an extension.
*/ */
WinEDAListBox* GetFileNames( char* Directory, char* Mask ); wxString MakeReducedFileName( const wxString& fullfilename,
const wxString& default_path,
const wxString& default_ext );
WinEDAListBox* GetFileNames( char* Directory, char* Mask );
/* Change l'extension du "filename FullFileName" en NewExt.
* Retourne FullFileName */
int ExecuteFile( wxWindow* frame, const wxString& ExecFile, int ExecuteFile( wxWindow* frame, const wxString& ExecFile,
const wxString& param = wxEmptyString ); const wxString& param = wxEmptyString );
void AddDelimiterString( wxString& string ); void AddDelimiterString( wxString& string );
wxString FindKicadHelpPath();
/* Find absolute path for kicad/help (or kicad/help/<language>) */ /* Find absolute path for kicad/help (or kicad/help/<language>) */
wxString FindKicadHelpPath();
wxString ReturnKicadDatasPath();
/* Retourne le chemin des donnees communes de kicad. */ /* Return the kicad common data path. */
wxString ReturnKicadDatasPath();
wxString FindKicadFile( const wxString& shortname );
/* Search the executable file shortname in kicad binary path and return /* 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
...@@ -10,78 +10,74 @@ ...@@ -10,78 +10,74 @@
#define __INCLUDE__KICAD_STRING_H__ 1 #define __INCLUDE__KICAD_STRING_H__ 1
char* strupper( char* Text ); char* strupper( char* Text );
char* strlower( char* Text ); char* strlower( char* Text );
int ReadDelimitedText( char* dest, /* Read string delimited with (") character.
char* source, * Upload NbMaxChar max
int NbMaxChar ); * Returns the number of codes read in source
* dest is terminated by NULL
/* lit et place dans dest la chaine de caractere trouvee dans source, */
* delimitee par " . int ReadDelimitedText( char* dest,
* transfere NbMaxChar max char* source,
* retourne le nombre de codes lus dans source int NbMaxChar );
* dest est termine par NULL */
char* GetLine( FILE* File,
char* Line,
int* LineNum = NULL,
int SizeLine = 255 );
/* Routine de lecture de 1 ligne utile /* Read one line line from a file.
* retourne la 1ere ligne utile lue. * Returns the first useful line read by eliminating blank lines and comments.
* elimine lignes vides et commentaires */ */
char* StrPurge( char* text ); char* GetLine( FILE* File,
char* Line,
int* LineNum = NULL,
int SizeLine = 255 );
/* Supprime les caracteres Space en debut de la ligne text /* Remove leading and trailing whitespace.
* retourne un pointeur sur le 1er caractere non Space de text */ */
char* StrPurge( char* text );
char* DateAndTime( char* line );
wxString DateAndTime();
/* Retourne la chaine de caractere donnant date+heure */ /*Return a string giving the current date and time.
*/
char* DateAndTime( char* line );
wxString DateAndTime();
int StrLenNumCmp( const wxChar* str1,
const wxChar* str2,
int NbMax );
/* /*
* routine (compatible qsort() ) de comparaision pour classement alphab�tique * Routine (compatible with qsort ()) to sort by alphabetical order.
* Analogue a strncmp() mais les nombres sont compar�s selon leur valeur num�rique * Equivalent to strncmp () but the numbers are compared by their integer
* et non pas par leur code ascii */ * value not by their ASCII code.
*/
int StrNumICmp( const wxChar* str1, int StrLenNumCmp( const wxChar* str1,
const wxChar* str2 ); 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 */
int StrLenNumICmp( const wxChar* str1, /*
const wxChar* str2, * Routine (compatible with qsort ()) to sort by case insensitive alphabetical
int NbMax ); * 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 */
bool WildCompareString( const wxString& pattern, int StrLenNumICmp( const wxChar* str1,
const wxString& string_to_tst, const wxChar* str2,
bool case_sensitive = TRUE ); int NbMax );
/* compare 2 noms de composants, selon regles usuelles /* Compare string against wild card pattern using the usual rules.
* ( Jokers * , ? , autorises). * (Wildcards *,?).
* la chaine de reference est "pattern" * The reference string is "pattern"
* si case_sensitive == TRUE (default), comparaison exacte * If case_sensitive == TRUE (default), exact comparison
* retourne TRUE si match FALSE si differences */ * Returns TRUE if pattern matched otherwise FALSE.
*/
char* to_point( char* Text ); bool WildCompareString( const wxString& pattern,
const wxString& string_to_tst,
bool case_sensitive = TRUE );
/* convertit les , en . dans une chaine. utilise pour compenser la fct printf /* Replaces decimal point with commas to generated international numbers.
* qui genere les flottants avec une virgule au lieu du point en mode international */ */
char* to_point( char* Text );
#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 */
......
This diff is collapsed.
/****************************/ /****************************/
/* pyhandler.h */ /* pyhandler.h */
/****************************/ /****************************/
#ifndef PYHANDLER_H #ifndef PYHANDLER_H
...@@ -37,15 +37,15 @@ protected: ...@@ -37,15 +37,15 @@ protected:
wxString name; wxString name;
std::vector< initfunc_t > registry; std::vector< initfunc_t > registry;
ModuleRecord( const wxString &modName ) : ModuleRecord( const wxString &modName ) :
name( modName ) name( modName )
{ {
} }
}; };
std::vector< ModuleRecord > m_ModuleRegistry; std::vector< ModuleRecord > m_ModuleRegistry;
void DoInitModules(); void DoInitModules();
// Events // Events
...@@ -54,17 +54,17 @@ protected: ...@@ -54,17 +54,17 @@ protected:
wxString key; wxString key;
std::vector< boost::python::object > functors; std::vector< boost::python::object > functors;
Event( const wxString &strKey ) : Event( const wxString &strKey ) :
key( strKey ) key( strKey )
{ {
} }
}; };
std::vector< Event > m_EventRegistry; std::vector< Event > m_EventRegistry;
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