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)
......
This diff is collapsed.
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,45 +56,56 @@ typedef enum {
class BLOCK_SELECTOR : public EDA_BaseStruct, public EDA_Rect
{
public:
BlockState m_State; /* Stae (enum BlockState) of the block */
CmdBlockType m_Command; /* Type (enum CmdBlockType) d'operation */
PICKED_ITEMS_LIST m_ItemsSelection; /* list of items selected in this block */
int m_Color; /* Block Color (for drawings) */
wxPoint m_MoveVector; /* Move distance in move, drag, copy ... command */
wxPoint m_BlockLastCursorPosition; /* Last Mouse position in block command
* = last cursor position in move commands
* = 0,0 in block paste */
BlockState m_State; /* State (enum BlockState)
* of the block */
CmdBlockType m_Command; /* Type (enum CmdBlockType)
* operation */
PICKED_ITEMS_LIST m_ItemsSelection; /* list of items selected
* in this block */
int m_Color; /* Block Color (for
* drawings) */
wxPoint m_MoveVector; /* Move distance in move,
* drag, copy ... command */
wxPoint m_BlockLastCursorPosition; /* Last Mouse position in
* block command
* = last cursor position in
* move commands
* = 0,0 in block paste */
public:
BLOCK_SELECTOR();
~BLOCK_SELECTOR();
/** function InitData
* Init the initial values of a BLOCK_SELECTOR, before starting a block command
* Init the initial values of a BLOCK_SELECTOR, before starting a block
*command
*/
void InitData( WinEDA_DrawPanel* Panel, const wxPoint& startpos );
/** Function SetMessageBlock
* Displays the type of block command in the status bar of the window
*/
void SetMessageBlock( WinEDA_DrawFrame* frame );
*/
void SetMessageBlock( WinEDA_DrawFrame* frame );
void Draw( WinEDA_DrawPanel* aPanel,
wxDC* aDC, const wxPoint& aOffset,
int aDrawMode,
int aColor );
void Draw( WinEDA_DrawPanel* aPanel,
wxDC* aDC, const wxPoint& aOffset,
int aDrawMode,
int aColor );
/** Function PushItem
* Add aItem to the list of items
* @param aItem = an ITEM_PICKER to add to the list
*/
void PushItem( ITEM_PICKER& aItem );
void PushItem( ITEM_PICKER& aItem );
/** Function ClearListAndDeleteItems
* delete only the list of EDA_BaseStruct * pointers, AND the data pinted by m_Item
* delete only the list of EDA_BaseStruct * pointers, AND the data printed
* by m_Item
*/
void ClearListAndDeleteItems();
void ClearListAndDeleteItems();
void ClearItemsList();
void ClearItemsList();
unsigned GetCount()
{
return m_ItemsSelection.GetCount();
......@@ -100,17 +114,17 @@ public:
/* Cancel Current block operation.
*/
void AbortBlockCurrentCommand( WinEDA_DrawPanel* Panel, wxDC* DC );
*/
void AbortBlockCurrentCommand( WinEDA_DrawPanel* Panel, wxDC* DC );
/* Redraw the outlines of the block which shows the search area for block commands
* The first point of the rectangle showing the area is initialised
/* Redraw the outlines of the block which shows the search area for block
* commands
* The first point of the rectangle showing the area is initialized
* by InitBlockLocateDatas().
* The other point of the rectangle is the mouse cursor
*/
void DrawAndSizingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
void DrawAndSizingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
#endif /* __INCLUDE__BLOCK_COMMANDE_H__ */
This diff is collapsed.
......@@ -3,22 +3,22 @@
*
* Copyright (C) 2007-2008 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2004-2007 Kicad Developers, see change_log.txt for contributors.
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
......@@ -37,14 +37,14 @@ class EDA_BaseStruct;
/**
* Class COLLECTOR
* is an abstract class that will find and hold all the objects according to
* is an abstract class that will find and hold all the objects according to
* an inspection done by the Inspect() function which must be implemented by
* any derived class. When Inspect() finds an object that it wants to collect,
* i.e. one that it "likes", then it only has to do an Append( testItem )
* i.e. one that it "likes", then it only has to do an Append( testItem )
* on it to add it to its collection, but in all cases for the scan to continue,
* Inspect() must return SEARCH_CONTINUE.
*
* Later, after collection, the user can iterate through all the objects
* Later, after collection, the user can iterate through all the objects
* in the remembered collection using GetCount() and the [int] operator.
*/
class COLLECTOR : public INSPECTOR
......@@ -61,11 +61,11 @@ protected:
/// A bounding box to test against, and that was used to make the collection.
EDA_Rect m_RefBox;
/// The time at which the collection was made.
int m_TimeAtCollection;
public:
COLLECTOR()
......@@ -77,7 +77,7 @@ public:
{
}
/**
* Function GetCount
* returns the number of objects in the list
......@@ -87,7 +87,7 @@ public:
return (int) m_List.size();
}
/**
* Function Empty
* sets the list to empty
......@@ -97,7 +97,7 @@ public:
m_List.clear();
}
/**
* Function Append
* adds an item to the end of the list.
......@@ -142,7 +142,7 @@ public:
return &m_List[0];
}
/**
* Function SetScanTypes
* records the list of KICAD_T types to consider for collection by
......@@ -154,7 +154,7 @@ public:
{
m_ScanTypes = scanTypes;
}
void SetTimeNow()
{
m_TimeAtCollection = GetTimeStamp();
......@@ -169,12 +169,12 @@ public:
void SetBoundingBox( const EDA_Rect& aRefBox ) { m_RefBox = aRefBox; }
const EDA_Rect& GetBoundingBox() const { return m_RefBox; }
/**
* Function IsSimilarPointAndTime
* returns true if the given reference point is "similar" (defined here)
* to the internal reference point and the current time is within a few
* returns true if the given reference point is "similar" (defined here)
* to the internal reference point and the current time is within a few
* seconds of the internal m_TimeAtCollection.
*
* @param aRefPos A wxPoint to compare to.
......@@ -184,21 +184,21 @@ public:
{
const int distMax = 2; // adjust these here
const int timeMax = 3; // seconds, I think
int dx = abs( aRefPos.x - m_RefPos.x );
int dy = abs( aRefPos.y - m_RefPos.y );
if( dx <= distMax && dy <= distMax
if( dx <= distMax && dy <= distMax
&& GetTimeStamp()-m_TimeAtCollection <= timeMax )
return true;
else
return false;
}
/**
* Function Inspect
* is the examining function within the INSPECTOR which is passed to the
* is the examining function within the INSPECTOR which is passed to the
* Iterate function. It is used primarily for searching, but not limited to
* that. It can also collect or modify the scanned objects.
*
......@@ -209,14 +209,14 @@ public:
* else SCAN_CONTINUE;
*
* implement in derived class:
SEARCH_RESULT virtual Inspect( EDA_BaseStruct* testItem,
SEARCH_RESULT virtual Inspect( EDA_BaseStruct* testItem,
const void* testData ) = 0;
*/
*/
/**
* Function Collect
* scans an EDA_BaseStruct using this class's Inspector method, which does
* scans an EDA_BaseStruct using this class's Inspector method, which does
* the collection.
* @param container An EDA_BaseStruct to scan, including those items it contains.
* @param aRefPos A wxPoint to use in hit-testing.
......@@ -226,14 +226,14 @@ public:
virtual void Collect( EDA_BaseStruct* container, const wxPoint& aRefPos )
{
example implementation:
SetRefPos( aRefPos ); // remember where the snapshot was taken from
Empty(); // empty the collection
// visit the board with the INSPECTOR (me).
container->Visit( this, // INSPECTOR* inspector
NULL, // const void* testData,
NULL, // const void* testData,
m_ScanTypes);
SetTimeNow(); // when it was taken
}
......
......@@ -3,9 +3,6 @@
* define class WinEDA_DrawPanel
*************************************/
/* Doit etre inclus dans "wxstruch.h"
*/
#ifndef PANEL_WXSTRUCT_H
#define PANEL_WXSTRUCT_H
......@@ -17,49 +14,64 @@ class BASE_SCREEN;
class PCB_SCREEN;
/****************************************************/
/* classe representant un ecran graphique de dessin */
/****************************************************/
class WinEDA_DrawPanel : public wxScrolledWindow
{
public:
WinEDA_DrawFrame* m_Parent;
EDA_Rect m_ClipBox; // the clipbox used in screen redraw (usually gives the visible area in internal units)
wxPoint m_CursorStartPos; // utile dans controles du mouvement curseur
int m_ScrollButt_unit; // Valeur de l'unite de scroll en pixels pour les boutons de scroll
EDA_Rect m_ClipBox; // the clipbox used in screen
// redraw (usually gives the
// visible area in internal units)
wxPoint m_CursorStartPos; // useful in testing the cursor
// movement
int m_ScrollButt_unit; // scroll bar pixels per unit value
bool m_AbortRequest; // Flag to abort long commands
bool m_AbortEnable; // TRUE if abort button or menu to
// be displayed
bool m_AbortRequest; // Flag d'arret de commandes longues
bool m_AbortEnable; // TRUE si menu ou bouton Abort doit etre affiche
bool m_AutoPAN_Enable; // TRUE to allow auto pan
bool m_AutoPAN_Request; // TRUE to request an auto pan (will be made only if m_AutoPAN_Enable = true)
bool m_AutoPAN_Request; // TRUE to request an auto pan
// (will be made only if
// m_AutoPAN_Enable = true)
int m_IgnoreMouseEvents; // when non-zero (true), then ignore mouse events
int m_IgnoreMouseEvents; // when non-zero (true), then
// ignore mouse events
bool m_Block_Enable; // TRUE to accept Block Commands
int m_CanStartBlock; // >= 0 (or >= n) if a block can start
bool m_PrintIsMirrored; // True when drawing in mirror mode. Used in draw arc function,
// because arcs are oriented, and in mirror mode, orientations are reversed
// usefull to avoid false start block in certain cases (like switch from a sheet to an other scheet
int m_PanelDefaultCursor; // Current mouse cursor default shape id for this window
int m_PanelCursor; // Current mouse cursor shape id for this window
int m_CursorLevel; // Index for cursor redraw in XOR mode
int m_CanStartBlock; // >= 0 (or >= n) if a block can
// start
bool m_PrintIsMirrored; // True when drawing in mirror
// mode. Used in draw arc function,
// because arcs are oriented, and
// in mirror mode, orientations are
// reversed
// useful to avoid false start block in certain cases (like switch from a
// sheet to an other sheet
int m_PanelDefaultCursor; // Current mouse cursor default
// shape id for this window
int m_PanelCursor; // Current mouse cursor shape id
// for this window
int m_CursorLevel; // Index for cursor redraw in XOR
// mode
/* Cursor management (used in editing functions) */
void (*ManageCurseur)( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); /* Fonction d'affichage sur deplacement souris
* si erase : effacement ancien affichage */
void (*ForceCloseManageCurseur)( WinEDA_DrawPanel* panel, wxDC* DC ); /* Fonction de fermeture forc�
* 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,13 +62,14 @@ public:
* free the undo or redo list from List element
* Wrappers are deleted.
* datas pointed by wrappers are deleted if not in use in schematic
* i.e. when they are copy of a schematic item or they are no more in use (DELETED)
* i.e. when they are copy of a schematic item or they are no more in use
* (DELETED)
* @param aList = the UNDO_REDO_CONTAINER to clear
* @param aItemCount = the count of items to remove. < 0 for all items
* items are removed from the beginning of the list.
* So this function can be called to remove old commands
*/
void ClearUndoORRedoList( UNDO_REDO_CONTAINER& aList, int aItemCount = -1 );
void ClearUndoORRedoList( UNDO_REDO_CONTAINER& aList, int aItemCount = -1 );
};
......
/********************/
/* Fichier colors.h */
/********************/
/************/
/* colors.h */
/************/
#ifndef _COLORS_H
#define _COLORS_H
/* Definitions des Numeros des Couleurs ( palette de 32) */
/* Number of colors ( 32 bit palette. ) */
#define NBCOLOR 24
#define MASKCOLOR 31 ///< mask for color index into ColorRefs[]
#define MASKCOLOR 31 ///< mask for color index into ColorRefs[]
/// bit indicateur d'affichage (vu / non vu) des items : (defini dans les valeurs des couleurs
//IMB: Not used anymore #define ITEM_NOT_SHOW (1<<18) // 0x40000
/// Flag bit display (seen / not seen) items: (defined in the color values
//IMB: Not used anymore #define ITEM_NOT_SHOW (1<<18) // 0x40000
/// Definition du bit de surbrillance
#define HIGHT_LIGHT_FLAG (1<<19) // 0x80000
#define HIGHT_LIGHT_FLAG ( 1<<19 ) // 0x80000
/**
......@@ -102,14 +101,13 @@ static inline wxColour MakeColour( int aColor )
#endif
int ndx = aColor & MASKCOLOR;
return wxColour(
ColorRefs[ndx].m_Red,
ColorRefs[ndx].m_Green,
ColorRefs[ndx].m_Blue
return wxColour( ColorRefs[ndx].m_Red,
ColorRefs[ndx].m_Green,
ColorRefs[ndx].m_Blue
#if wxCHECK_VERSION(2,8,5)
,(unsigned char) alpha
,(unsigned char) alpha
#endif
);
);
}
#endif /* ifndef _COLORS_H */
This diff is collapsed.
......@@ -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,29 +8,27 @@
#define __INCLUDE__EDA_DOC_H__ 1
/* Recherche si dans le texte Database on retrouve tous les mots
* cles donnes dans KeyList ( KeyList = suite de mots cles
* separes par des espaces
* Retourne:
* 0 si aucun mot cle trouve
* 1 si mot cle trouve
/* Search the text Database for found all the key words in the KeyList.
*
* Returns:
* 0 if no keyword is found
* 1 if keyword found.
*/
int KeyWordOk( const wxString& KeyList,
const wxString& Database );
int KeyWordOk( const wxString& KeyList,
const wxString& Database );
/** Function GetAssociatedDocument
* open a document (file) with the suitable browser
* @param aFrame = main frame
* @param aDocName = filename of file to open (Full filename or short filename)
* if DocName is starting by http: or ftp: or www. the default internet browser is launched
* if DocName is starting by http: or ftp: or www. the default internet
* browser is launched
* @param aPaths = a wxPathList to explore.
* if NULL or aDocName is a full filename, aPath is not used.
*/
bool GetAssociatedDocument( wxFrame* aFrame,
const wxString& aDocName,
const wxPathList* aPaths = NULL );
*/
bool GetAssociatedDocument( wxFrame* aFrame,
const wxString& aDocName,
const wxPathList* aPaths = NULL );
#endif /* __INCLUDE__EDA_DOC_H__ */
/********************/
/* includes systeme */
/* System includes. */
/********************/
#ifndef FCTSYS_H
#define FCTSYS_H
......@@ -56,9 +56,10 @@
#define USE_RESIZE_BORDER
#if defined(__UNIX__) || defined(USE_RESIZE_BORDER)
#define MAYBE_RESIZE_BORDER wxRESIZE_BORDER // linux users like resizeable borders
#define MAYBE_RESIZE_BORDER wxRESIZE_BORDER // linux users like resizeable
// borders
#else
#define MAYBE_RESIZE_BORDER 0 // no resizeable border
#define MAYBE_RESIZE_BORDER 0 // no resizeable border
#endif
#include "config.h"
......
/**
* This file is part of the common libary
* This file is part of the common library
* TODO brief description
* @file gestfich.h
* @see common.h
......@@ -21,77 +21,56 @@ class WinEDAListBox;
* @param file = PDF file to open
* @return true is success, false if no PDF viewer found
*/
bool OpenPDF( const wxString& file );
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 */
bool OpenPDF( const wxString& file );
wxString MakeReducedFileName( const wxString& fullfilename,
const wxString& default_path,
const wxString& default_ext );
void OpenFile( const wxString& file );
/* 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
bool EDA_DirectorySelector( const wxString& Title,
wxString& Path,
int flag, /* reserve */
wxWindow* Frame,
const wxPoint& Pos );
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.
*
* Renvoie un chemin en notation unix ('/' en separateur de repertoire)
* If the path is in the default kicad path, ./ is prepended to the
* file name. If the file name has the default extension, the file
* name is returned without an extension.
*/
WinEDAListBox* GetFileNames( char* Directory, char* Mask );
wxString MakeReducedFileName( const wxString& fullfilename,
const wxString& default_path,
const wxString& default_ext );
WinEDAListBox* GetFileNames( char* Directory, char* Mask );
/* Change l'extension du "filename FullFileName" en NewExt.
* Retourne FullFileName */
int ExecuteFile( wxWindow* frame, const wxString& ExecFile,
int ExecuteFile( wxWindow* frame, const wxString& ExecFile,
const wxString& param = wxEmptyString );
void AddDelimiterString( wxString& string );
wxString FindKicadHelpPath();
void AddDelimiterString( wxString& string );
/* Find absolute path for kicad/help (or kicad/help/<language>) */
wxString FindKicadHelpPath();
wxString ReturnKicadDatasPath();
/* Retourne le chemin des donnees communes de kicad. */
/* Return the kicad common data path. */
wxString ReturnKicadDatasPath();
wxString FindKicadFile( const wxString& shortname );
/* Search the executable file shortname in kicad binary path and return
* full file name if found or shortname */
* full file name if found or shortname */
wxString FindKicadFile( const wxString& shortname );
/**
......@@ -105,4 +84,3 @@ extern wxString QuoteFullPath( wxFileName& fn,
wxPathFormat format = wxPATH_NATIVE );
#endif /* __INCLUDE__GESTFICH_H__ */
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
......@@ -10,78 +10,74 @@
#define __INCLUDE__KICAD_STRING_H__ 1
char* strupper( char* Text );
char* strlower( char* Text );
char* strupper( char* Text );
char* strlower( char* Text );
int ReadDelimitedText( char* dest,
char* source,
int NbMaxChar );
/* 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 */
char* GetLine( FILE* File,
char* Line,
int* LineNum = NULL,
int SizeLine = 255 );
/* 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 );
/* Routine de lecture de 1 ligne utile
* retourne la 1ere ligne utile lue.
* elimine lignes vides et commentaires */
char* StrPurge( char* text );
/* 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 );
/* Supprime les caracteres Space en debut de la ligne text
* retourne un pointeur sur le 1er caractere non Space de text */
/* Remove leading and trailing whitespace.
*/
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
* Analogue a strncmp() mais les nombres sont compar�s selon leur valeur num�rique
* et non pas par leur code ascii */
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 */
* Routine (compatible with qsort ()) to sort by alphabetical order.
* Equivalent to strncmp () but the numbers are compared by their integer
* value not by their ASCII code.
*/
int StrLenNumCmp( const wxChar* str1,
const wxChar* str2,
int NbMax );
int StrLenNumICmp( const wxChar* str1,
const wxChar* str2,
int NbMax );
/*
* 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 */
bool WildCompareString( const wxString& pattern,
const wxString& string_to_tst,
bool case_sensitive = TRUE );
int StrLenNumICmp( const wxChar* str1,
const wxChar* str2,
int NbMax );
/* 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 */
/* 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.
*/
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
* qui genere les flottants avec une virgule au lieu du point en mode international */
/* Replaces decimal point with commas to generated international numbers.
*/
char* to_point( char* Text );
#endif /* __INCLUDE__KICAD_STRING_H__ */
......@@ -5,7 +5,7 @@
#include "pcbstruct.h"
#include "dlist.h"
#define L_MIN_DESSIN 1 /* Min width segments to allow draws with tickness */
#define L_MIN_DESSIN 1 /* Min width segments to allow draws with thickness */
class DPAD;
class BOARD_ITEM;
......@@ -44,8 +44,6 @@ extern int g_PadCUColor;
extern int g_PadCMPColor;
/* variables generales */
extern int g_TimeOut; // Timer for automatic saving
extern int g_SaveTime; // Time for next saving
......@@ -59,7 +57,7 @@ extern DLIST<TRACK> g_CurrentTrackList;
#define g_FirstTrackSegment \
g_CurrentTrackList.GetFirst() ///< first segment created
extern PCB_SCREEN* ScreenPcb; /* Ecran principal */
extern PCB_SCREEN* ScreenPcb;
extern BOARD* g_ModuleEditor_Pcb;
/* Pad editing */
......
This diff is collapsed.
/****************************/
/* pyhandler.h */
/* pyhandler.h */
/****************************/
#ifndef PYHANDLER_H
......@@ -37,15 +37,15 @@ protected:
wxString name;
std::vector< initfunc_t > registry;
ModuleRecord( const wxString &modName ) :
name( modName )
ModuleRecord( const wxString &modName ) :
name( modName )
{
}
};
std::vector< ModuleRecord > m_ModuleRegistry;
void DoInitModules();
// Events
......@@ -54,17 +54,17 @@ protected:
wxString key;
std::vector< boost::python::object > functors;
Event( const wxString &strKey ) :
key( strKey )
Event( const wxString &strKey ) :
key( strKey )
{
}
};
std::vector< Event > m_EventRegistry;
public:
// Singletton handling:
// Singleton handling:
static PyHandler* GetInstance();
~PyHandler();
......
/****************************************************/
/* 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