2012-01-14 19:50:32 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
|
|
|
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2011-09-15 17:58:35 +00:00
|
|
|
/**
|
|
|
|
* @file class_module.h
|
|
|
|
* @brief Module description (excepted pads)
|
|
|
|
*/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
|
2012-02-19 04:02:19 +00:00
|
|
|
#ifndef MODULE_H_
|
|
|
|
#define MODULE_H_
|
2011-08-01 15:29:27 +00:00
|
|
|
|
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <dlist.h>
|
|
|
|
#include <layers_id_colors_and_visibility.h> // ALL_LAYERS definition.
|
|
|
|
#include <class_board_item.h>
|
2011-01-14 17:43:30 +00:00
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <class_text_mod.h>
|
2012-02-24 23:23:46 +00:00
|
|
|
#include "zones.h"
|
2011-09-23 13:57:12 +00:00
|
|
|
|
|
|
|
class LINE_READER;
|
2011-09-17 15:31:21 +00:00
|
|
|
class EDA_3D_CANVAS;
|
|
|
|
class S3D_MASTER;
|
2011-09-23 13:57:12 +00:00
|
|
|
class EDA_DRAW_PANEL;
|
|
|
|
class D_PAD;
|
|
|
|
class BOARD;
|
2013-01-12 17:32:24 +00:00
|
|
|
class MSG_PANEL_ITEM;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
|
2011-12-12 08:37:05 +00:00
|
|
|
/**
|
|
|
|
* Enum MODULE_ATTR_T
|
|
|
|
* is the set of attributes allowed within a MODULE, using MODULE::SetAttributes()
|
|
|
|
* and MODULE::GetAttributes(). These are to be ORed together when calling
|
2012-04-05 18:27:56 +00:00
|
|
|
* MODULE::SetAttributes()
|
2011-12-12 08:37:05 +00:00
|
|
|
*/
|
|
|
|
enum MODULE_ATTR_T
|
2007-06-15 16:08:55 +00:00
|
|
|
{
|
2011-12-12 08:37:05 +00:00
|
|
|
MOD_DEFAULT = 0, ///< default
|
|
|
|
MOD_CMS = 1, ///< Set for modules listed in the automatic insertion list
|
|
|
|
///< (usually SMD footprints)
|
|
|
|
MOD_VIRTUAL = 2 ///< Virtual component: when created by copper shapes on
|
|
|
|
///< board (Like edge card connectors, mounting hole...)
|
2007-06-15 16:08:55 +00:00
|
|
|
};
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-08-07 06:21:19 +00:00
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
class MODULE : public BOARD_ITEM
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2011-11-29 17:25:30 +00:00
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
public:
|
2011-12-14 04:29:25 +00:00
|
|
|
double m_Orient; // orientation in 0.1 degrees
|
2009-11-12 15:43:38 +00:00
|
|
|
wxPoint m_Pos; // Real coord on board
|
|
|
|
DLIST<D_PAD> m_Pads; /* Pad list (linked list) */
|
|
|
|
DLIST<BOARD_ITEM> m_Drawings; /* Graphic items list (linked list) */
|
2011-09-17 15:31:21 +00:00
|
|
|
DLIST<S3D_MASTER> m_3D_Drawings; /* First item of the 3D shapes (linked list)*/
|
2009-11-12 15:43:38 +00:00
|
|
|
TEXTE_MODULE* m_Reference; // Component reference (U34, R18..)
|
|
|
|
TEXTE_MODULE* m_Value; // Component value (74LS00, 22K..)
|
|
|
|
wxString m_LibRef; /* Name of the module in library (and
|
|
|
|
* the default value when loading a
|
2011-09-17 15:31:21 +00:00
|
|
|
* module from the library) */
|
2011-12-12 08:37:05 +00:00
|
|
|
int m_Attributs; ///< Flag bits ( see Mod_Attribut )
|
2011-09-17 15:31:21 +00:00
|
|
|
int flag; /* Use to trace ratsnest and auto routing. */
|
2011-12-12 08:37:05 +00:00
|
|
|
|
|
|
|
int m_ModuleStatus; ///< For autoplace: flags (LOCKED, AUTOPLACED)
|
|
|
|
|
|
|
|
// m_ModuleStatus bits:
|
|
|
|
#define MODULE_is_LOCKED 0x01 ///< module LOCKED: no autoplace allowed
|
|
|
|
#define MODULE_is_PLACED 0x02 ///< In autoplace: module automatically placed
|
|
|
|
#define MODULE_to_PLACE 0x04 ///< In autoplace: module waiting for autoplace
|
|
|
|
|
|
|
|
|
2011-09-17 15:31:21 +00:00
|
|
|
EDA_RECT m_BoundaryBox; // Bounding box : coordinates on board, real orientation.
|
2008-10-29 15:26:53 +00:00
|
|
|
int m_PadNum; // Pad count
|
2011-09-17 15:31:21 +00:00
|
|
|
int m_AltPadNum; /* Pad with netcode > 0 (active pads) count */
|
2009-11-12 15:43:38 +00:00
|
|
|
|
2011-12-12 08:37:05 +00:00
|
|
|
int m_CntRot90; ///< Automatic placement : cost ( 0..10 )
|
|
|
|
///< for 90 degrees rotation (Horiz<->Vertical)
|
|
|
|
|
|
|
|
int m_CntRot180; ///< Automatic placement : cost ( 0..10 )
|
|
|
|
///< for 180 degrees rotation (UP <->Down)
|
|
|
|
|
2012-05-25 06:58:52 +00:00
|
|
|
wxSize m_Ext; // Margin around the module, in automatic placement
|
2011-09-23 13:57:12 +00:00
|
|
|
double m_Surface; // Bounding box area
|
2011-09-17 15:31:21 +00:00
|
|
|
|
2012-05-25 06:58:52 +00:00
|
|
|
time_t m_Link; // Temporary logical link used in edition
|
2012-09-05 12:13:33 +00:00
|
|
|
time_t m_LastEdit_Time;
|
2008-03-31 13:43:54 +00:00
|
|
|
wxString m_Path;
|
2007-08-06 02:02:39 +00:00
|
|
|
|
2008-10-29 15:26:53 +00:00
|
|
|
wxString m_Doc; // Module Description (info for users)
|
|
|
|
wxString m_KeyWord; // Keywords to select the module in lib
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-11-04 19:08:08 +00:00
|
|
|
// The final margin is the sum of these 2 values
|
|
|
|
|
2012-02-24 23:23:46 +00:00
|
|
|
ZoneConnection m_ZoneConnection;
|
2012-03-08 20:44:03 +00:00
|
|
|
int m_ThermalWidth, m_ThermalGap;
|
2012-02-24 23:23:46 +00:00
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
public:
|
2007-08-06 02:02:39 +00:00
|
|
|
MODULE( BOARD* parent );
|
2012-01-14 19:50:32 +00:00
|
|
|
|
|
|
|
MODULE( const MODULE& aModule );
|
|
|
|
|
2007-09-01 12:00:30 +00:00
|
|
|
~MODULE();
|
2007-08-06 02:02:39 +00:00
|
|
|
|
2009-11-04 19:08:08 +00:00
|
|
|
MODULE* Next() const { return (MODULE*) Pnext; }
|
|
|
|
MODULE* Back() const { return (MODULE*) Pback; }
|
2008-11-24 06:53:43 +00:00
|
|
|
|
2009-11-04 19:08:08 +00:00
|
|
|
void Copy( MODULE* Module ); // Copy structure
|
2007-06-15 16:08:55 +00:00
|
|
|
|
2010-12-29 17:47:32 +00:00
|
|
|
/*
|
2008-11-24 06:53:43 +00:00
|
|
|
* Function Add
|
|
|
|
* adds the given item to this MODULE and takes ownership of its memory.
|
|
|
|
* @param aBoardItem The item to add to this board.
|
|
|
|
* @param doInsert If true, then insert, else append
|
2009-11-04 19:08:08 +00:00
|
|
|
* void Add( BOARD_ITEM* aBoardItem, bool doInsert = true );
|
2008-11-24 06:53:43 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2011-09-07 19:41:04 +00:00
|
|
|
* Function CalculateBoundingBox
|
2011-09-01 21:39:38 +00:00
|
|
|
* calculates the bounding box in board coordinates.
|
2008-11-24 06:53:43 +00:00
|
|
|
*/
|
2011-09-15 17:58:35 +00:00
|
|
|
void CalculateBoundingBox();
|
2007-06-15 16:08:55 +00:00
|
|
|
|
2010-12-10 19:47:44 +00:00
|
|
|
/**
|
|
|
|
* Function GetFootPrintRect()
|
|
|
|
* Returns the area of the module footprint excluding any text.
|
2011-09-01 21:39:38 +00:00
|
|
|
* @return EDA_RECT - The rectangle containing the footprint.
|
2010-12-10 19:47:44 +00:00
|
|
|
*/
|
2011-03-29 19:33:07 +00:00
|
|
|
EDA_RECT GetFootPrintRect() const;
|
2010-12-10 19:47:44 +00:00
|
|
|
|
2011-03-29 19:33:07 +00:00
|
|
|
EDA_RECT GetBoundingBox() const;
|
2007-06-15 16:08:55 +00:00
|
|
|
|
2012-02-20 04:33:54 +00:00
|
|
|
void SetPosition( const wxPoint& aPos ); // was overload
|
|
|
|
const wxPoint& GetPosition() const { return m_Pos; } // was overload
|
2007-12-01 03:42:52 +00:00
|
|
|
|
2011-12-14 04:29:25 +00:00
|
|
|
void SetOrientation( double newangle );
|
|
|
|
double GetOrientation() const { return m_Orient; }
|
2011-11-29 17:25:30 +00:00
|
|
|
|
2011-12-12 08:37:05 +00:00
|
|
|
const wxString& GetLibRef() const { return m_LibRef; }
|
|
|
|
void SetLibRef( const wxString& aLibRef ) { m_LibRef = aLibRef; }
|
|
|
|
|
|
|
|
const wxString& GetDescription() const { return m_Doc; }
|
|
|
|
void SetDescription( const wxString& aDoc ) { m_Doc = aDoc; }
|
|
|
|
|
|
|
|
const wxString& GetKeywords() const { return m_KeyWord; }
|
|
|
|
void SetKeywords( const wxString& aKeywords ) { m_KeyWord = aKeywords; }
|
|
|
|
|
|
|
|
const wxString& GetPath() const { return m_Path; }
|
|
|
|
void SetPath( const wxString& aPath ) { m_Path = aPath; }
|
|
|
|
|
|
|
|
int GetLocalSolderMaskMargin() const { return m_LocalSolderMaskMargin; }
|
|
|
|
void SetLocalSolderMaskMargin( int aMargin ) { m_LocalSolderMaskMargin = aMargin; }
|
|
|
|
|
|
|
|
int GetLocalClearance() const { return m_LocalClearance; }
|
|
|
|
void SetLocalClearance( int aClearance ) { m_LocalClearance = aClearance; }
|
|
|
|
|
|
|
|
int GetLocalSolderPasteMargin() const { return m_LocalSolderPasteMargin; }
|
|
|
|
void SetLocalSolderPasteMargin( int aMargin ) { m_LocalSolderPasteMargin = aMargin; }
|
|
|
|
|
|
|
|
double GetLocalSolderPasteMarginRatio() const { return m_LocalSolderPasteMarginRatio; }
|
|
|
|
void SetLocalSolderPasteMarginRatio( double aRatio ) { m_LocalSolderPasteMarginRatio = aRatio; }
|
|
|
|
|
2012-02-24 23:23:46 +00:00
|
|
|
void SetZoneConnection( ZoneConnection aType ) { m_ZoneConnection = aType; }
|
|
|
|
ZoneConnection GetZoneConnection() const { return m_ZoneConnection; }
|
|
|
|
|
2012-03-08 20:44:03 +00:00
|
|
|
void SetThermalWidth( int aWidth ) { m_ThermalWidth = aWidth; }
|
|
|
|
int GetThermalWidth() const { return m_ThermalWidth; }
|
|
|
|
|
|
|
|
void SetThermalGap( int aGap ) { m_ThermalGap = aGap; }
|
|
|
|
int GetThermalGap() const { return m_ThermalGap; }
|
|
|
|
|
2011-12-12 08:37:05 +00:00
|
|
|
int GetAttributes() const { return m_Attributs; }
|
|
|
|
void SetAttributes( int aAttributes ) { m_Attributs = aAttributes; }
|
|
|
|
|
2012-03-26 23:47:08 +00:00
|
|
|
void Move( const wxPoint& aMoveVector );
|
2007-06-15 16:08:55 +00:00
|
|
|
|
2012-03-26 23:47:08 +00:00
|
|
|
void Rotate( const wxPoint& aRotCentre, double aAngle );
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2012-03-26 23:47:08 +00:00
|
|
|
void Flip( const wxPoint& aCentre );
|
2007-06-15 16:08:55 +00:00
|
|
|
|
2012-09-11 07:33:17 +00:00
|
|
|
/**
|
|
|
|
* function IsFlipped
|
|
|
|
* @return true if the module is flipped, i.e. on the back side of the board
|
|
|
|
*/
|
|
|
|
bool IsFlipped() const {return GetLayer() == LAYER_N_BACK; }
|
|
|
|
|
2007-08-24 03:40:04 +00:00
|
|
|
bool IsLocked() const
|
2007-06-15 16:08:55 +00:00
|
|
|
{
|
|
|
|
return (m_ModuleStatus & MODULE_is_LOCKED) != 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Function SetLocked
|
|
|
|
* sets the MODULE_is_LOCKED bit in the m_ModuleStatus
|
2011-12-12 08:37:05 +00:00
|
|
|
* @param isLocked When true means turn on locked status, else unlock
|
2007-06-15 16:08:55 +00:00
|
|
|
*/
|
2011-12-12 08:37:05 +00:00
|
|
|
void SetLocked( bool isLocked )
|
2007-06-15 16:08:55 +00:00
|
|
|
{
|
2011-12-12 08:37:05 +00:00
|
|
|
if( isLocked )
|
2007-06-15 16:08:55 +00:00
|
|
|
m_ModuleStatus |= MODULE_is_LOCKED;
|
|
|
|
else
|
|
|
|
m_ModuleStatus &= ~MODULE_is_LOCKED;
|
|
|
|
}
|
|
|
|
|
2011-12-01 06:04:23 +00:00
|
|
|
bool IsPlaced() const { return (m_ModuleStatus & MODULE_is_PLACED); }
|
|
|
|
void SetIsPlaced( bool isPlaced )
|
|
|
|
{
|
|
|
|
if( isPlaced )
|
|
|
|
m_ModuleStatus |= MODULE_is_PLACED;
|
|
|
|
else
|
|
|
|
m_ModuleStatus &= ~MODULE_is_PLACED;
|
|
|
|
}
|
|
|
|
|
2012-09-05 12:13:33 +00:00
|
|
|
void SetLastEditTime( time_t aTime ) { m_LastEdit_Time = aTime; }
|
|
|
|
void SetLastEditTime( ) { m_LastEdit_Time = time( NULL ); }
|
|
|
|
time_t GetLastEditTime() const { return m_LastEdit_Time; }
|
2007-08-06 02:02:39 +00:00
|
|
|
|
2007-06-15 16:08:55 +00:00
|
|
|
/* drawing functions */
|
2009-11-04 19:08:08 +00:00
|
|
|
|
2011-01-21 19:30:59 +00:00
|
|
|
void Draw( EDA_DRAW_PANEL* aPanel,
|
|
|
|
wxDC* aDC,
|
2012-09-01 13:38:27 +00:00
|
|
|
GR_DRAWMODE aDrawMode,
|
2011-01-21 19:30:59 +00:00
|
|
|
const wxPoint& aOffset = ZeroOffset );
|
2008-04-01 05:21:50 +00:00
|
|
|
|
2011-09-17 15:31:21 +00:00
|
|
|
void Draw3D( EDA_3D_CANVAS* glcanvas );
|
2011-09-15 17:58:35 +00:00
|
|
|
|
2012-09-01 13:38:27 +00:00
|
|
|
void DrawEdgesOnly( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset,
|
|
|
|
GR_DRAWMODE draw_mode );
|
2011-09-15 17:58:35 +00:00
|
|
|
|
2011-01-21 19:30:59 +00:00
|
|
|
void DrawAncre( EDA_DRAW_PANEL* panel, wxDC* DC,
|
2012-09-01 13:38:27 +00:00
|
|
|
const wxPoint& offset, int dim_ancre, GR_DRAWMODE draw_mode );
|
2007-06-15 16:08:55 +00:00
|
|
|
|
2013-01-12 17:32:24 +00:00
|
|
|
void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2012-03-26 23:47:08 +00:00
|
|
|
bool HitTest( const wxPoint& aPosition );
|
2007-08-08 03:50:44 +00:00
|
|
|
|
2012-03-26 23:47:08 +00:00
|
|
|
bool HitTest( const EDA_RECT& aRect ) const;
|
2008-01-06 12:43:57 +00:00
|
|
|
|
2008-01-20 19:55:22 +00:00
|
|
|
/**
|
2007-08-24 03:40:04 +00:00
|
|
|
* Function GetReference
|
2008-01-29 22:09:09 +00:00
|
|
|
* @return const wxString& - the reference designator text.
|
2007-08-24 03:40:04 +00:00
|
|
|
*/
|
2011-07-14 15:42:44 +00:00
|
|
|
const wxString& GetReference() const
|
2007-08-24 03:40:04 +00:00
|
|
|
{
|
|
|
|
return m_Reference->m_Text;
|
|
|
|
}
|
2008-01-20 19:55:22 +00:00
|
|
|
|
2012-02-17 19:43:43 +00:00
|
|
|
/**
|
|
|
|
* Function SetReference
|
2012-03-17 14:39:27 +00:00
|
|
|
* @param aReference A reference to a wxString object containing the reference designator
|
|
|
|
* text.
|
2012-02-17 19:43:43 +00:00
|
|
|
*/
|
2012-03-17 14:39:27 +00:00
|
|
|
void SetReference( const wxString& aReference )
|
2012-02-17 19:43:43 +00:00
|
|
|
{
|
|
|
|
m_Reference->m_Text = aReference;
|
|
|
|
}
|
2009-11-04 19:08:08 +00:00
|
|
|
|
2008-01-29 22:09:09 +00:00
|
|
|
/**
|
|
|
|
* Function GetValue
|
|
|
|
* @return const wxString& - the value text.
|
|
|
|
*/
|
|
|
|
const wxString& GetValue()
|
|
|
|
{
|
|
|
|
return m_Value->m_Text;
|
|
|
|
}
|
2008-01-20 19:55:22 +00:00
|
|
|
|
2012-02-17 19:43:43 +00:00
|
|
|
/**
|
|
|
|
* Function SetValue
|
2012-03-17 14:39:27 +00:00
|
|
|
* @param aValue A reference to a wxString object containing the value text.
|
2012-02-17 19:43:43 +00:00
|
|
|
*/
|
|
|
|
void SetValue( const wxString& aValue )
|
|
|
|
{
|
|
|
|
m_Value->m_Text = aValue;
|
|
|
|
}
|
2008-03-04 04:22:27 +00:00
|
|
|
|
2012-05-22 17:51:18 +00:00
|
|
|
/// read/write accessors:
|
|
|
|
TEXTE_MODULE& Value() { return *m_Value; }
|
|
|
|
TEXTE_MODULE& Reference() { return *m_Reference; }
|
|
|
|
|
|
|
|
|
2008-03-04 04:22:27 +00:00
|
|
|
/**
|
|
|
|
* Function FindPadByName
|
|
|
|
* returns a D_PAD* with a matching name. Note that names may not be
|
|
|
|
* unique, depending on how the foot print was created.
|
2010-12-29 17:47:32 +00:00
|
|
|
* @param aPadName the pad name to find
|
2009-11-12 15:43:38 +00:00
|
|
|
* @return D_PAD* - The first matching name is returned, or NULL if not
|
|
|
|
* found.
|
2008-03-04 04:22:27 +00:00
|
|
|
*/
|
2011-09-15 17:58:35 +00:00
|
|
|
D_PAD* FindPadByName( const wxString& aPadName ) const;
|
2008-03-04 04:22:27 +00:00
|
|
|
|
2011-09-15 17:58:35 +00:00
|
|
|
/**
|
|
|
|
* Function GetPad
|
|
|
|
* get a pad at \a aPosition on \a aLayer in the footprint.
|
|
|
|
*
|
|
|
|
* @param aPosition A wxPoint object containing the position to hit test.
|
|
|
|
* @param aLayerMask A layer or layers to mask the hit test.
|
|
|
|
* @return A pointer to a D_PAD object if found otherwise NULL.
|
|
|
|
*/
|
|
|
|
D_PAD* GetPad( const wxPoint& aPosition, int aLayerMask = ALL_LAYERS );
|
2008-03-04 04:22:27 +00:00
|
|
|
|
2012-04-16 03:18:41 +00:00
|
|
|
/**
|
|
|
|
* GetPadCount
|
|
|
|
* returns the number of pads.
|
|
|
|
*/
|
|
|
|
unsigned GetPadCount() const { return m_Pads.GetCount() ; }
|
|
|
|
|
2012-06-09 17:00:13 +00:00
|
|
|
/**
|
|
|
|
* Function Add3DModel
|
|
|
|
* adds \a a3DModel definition to the end of the 3D model list.
|
|
|
|
*
|
|
|
|
* @param a3DModel A pointer to a #S3D_MASTER to add to the list.
|
|
|
|
*/
|
|
|
|
void Add3DModel( S3D_MASTER* a3DModel );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Function AddPad
|
|
|
|
* adds \a aPad to the end of the pad list.
|
|
|
|
*
|
|
|
|
* @param aPad A pointer to a #D_PAD to add to the list.
|
|
|
|
*/
|
|
|
|
void AddPad( D_PAD* aPad );
|
|
|
|
|
2008-01-20 19:55:22 +00:00
|
|
|
SEARCH_RESULT Visit( INSPECTOR* inspector, const void* testData,
|
|
|
|
const KICAD_T scanTypes[] );
|
|
|
|
|
2012-03-26 23:47:08 +00:00
|
|
|
wxString GetClass() const
|
2007-08-07 06:21:19 +00:00
|
|
|
{
|
|
|
|
return wxT( "MODULE" );
|
|
|
|
}
|
|
|
|
|
2012-03-26 23:47:08 +00:00
|
|
|
wxString GetSelectMenuText() const;
|
2008-01-20 19:55:22 +00:00
|
|
|
|
2012-03-26 23:47:08 +00:00
|
|
|
BITMAP_DEF GetMenuImage() const { return module_xpm; }
|
2011-08-01 15:29:27 +00:00
|
|
|
|
2012-03-26 23:47:08 +00:00
|
|
|
EDA_ITEM* Clone() const;
|
2012-03-17 14:39:27 +00:00
|
|
|
|
2012-12-10 11:18:42 +00:00
|
|
|
/**
|
|
|
|
* static function IsLibNameValid
|
|
|
|
* Test for validity of a name of a footprint to be used in a footprint library
|
|
|
|
* ( no spaces, dir separators ... )
|
|
|
|
* @param aName = the name in library to validate
|
|
|
|
* @return true if the given name is valid
|
|
|
|
*/
|
|
|
|
static bool IsLibNameValid( const wxString & aName );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* static function ReturnStringLibNameInvalidChars
|
|
|
|
* Test for validity of the name in a library of the footprint
|
|
|
|
* ( no spaces, dir separators ... )
|
2012-12-18 13:54:44 +00:00
|
|
|
* @param aUserReadable = false to get the list of invalid chars
|
|
|
|
* true to get a readable form (i.e ' ' = 'space' '\\t'= 'tab')
|
2012-12-10 11:18:42 +00:00
|
|
|
* @return a constant std::string giving the list of invalid chars in lib name
|
|
|
|
*/
|
|
|
|
static const wxChar* ReturnStringLibNameInvalidChars( bool aUserReadable );
|
|
|
|
|
2011-12-12 08:37:05 +00:00
|
|
|
#if defined(DEBUG)
|
2011-12-14 17:25:42 +00:00
|
|
|
void Show( int nestLevel, std::ostream& os ) const; // overload
|
2007-08-06 02:02:39 +00:00
|
|
|
#endif
|
2011-08-01 15:29:27 +00:00
|
|
|
|
2012-04-17 01:35:43 +00:00
|
|
|
private:
|
|
|
|
// Local tolerances. When zero, this means the corresponding netclass value
|
|
|
|
// is used. Usually theses local tolerances zero, in deference to the
|
|
|
|
// corresponding netclass values.
|
|
|
|
int m_LocalClearance;
|
|
|
|
int m_LocalSolderMaskMargin; ///< Solder mask margin
|
|
|
|
int m_LocalSolderPasteMargin; ///< Solder paste margin
|
|
|
|
///< absolute value
|
|
|
|
|
|
|
|
double m_LocalSolderPasteMarginRatio; ///< Solder mask margin ratio
|
|
|
|
///< value of pad size
|
|
|
|
};
|
2011-08-01 15:29:27 +00:00
|
|
|
|
2012-02-19 04:02:19 +00:00
|
|
|
#endif // MODULE_H_
|