2007-08-06 20:26:59 +00:00
|
|
|
/**********************************/
|
|
|
|
/* class_pad.h : Pads description */
|
|
|
|
/**********************************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
class Pcb3D_GLCanvas;
|
|
|
|
|
2008-01-05 17:30:56 +00:00
|
|
|
#include "pad_shapes.h"
|
2009-11-16 13:57:25 +00:00
|
|
|
#include "PolyLine.h"
|
2011-01-14 17:43:30 +00:00
|
|
|
#include "richio.h"
|
2008-01-05 17:30:56 +00:00
|
|
|
|
2009-11-12 15:43:38 +00:00
|
|
|
/* Default layers used for pads, according to the pad type.
|
2009-09-23 06:02:37 +00:00
|
|
|
* this is default values only, they can be changed for a given pad
|
|
|
|
*/
|
2009-11-04 19:08:08 +00:00
|
|
|
|
2009-09-23 06:02:37 +00:00
|
|
|
// PAD_STANDARD:
|
2009-12-21 18:51:37 +00:00
|
|
|
#define PAD_STANDARD_DEFAULT_LAYERS ALL_CU_LAYERS | SILKSCREEN_LAYER_FRONT | SOLDERMASK_LAYER_BACK | \
|
|
|
|
SOLDERMASK_LAYER_FRONT
|
2009-09-23 06:02:37 +00:00
|
|
|
|
|
|
|
// PAD_CONN:
|
2009-12-21 18:51:37 +00:00
|
|
|
#define PAD_CONN_DEFAULT_LAYERS LAYER_FRONT | SOLDERPASTE_LAYER_FRONT | SOLDERMASK_LAYER_FRONT
|
2009-09-23 06:02:37 +00:00
|
|
|
|
|
|
|
// PAD_SMD:
|
2009-12-21 18:51:37 +00:00
|
|
|
#define PAD_SMD_DEFAULT_LAYERS LAYER_FRONT | SOLDERMASK_LAYER_FRONT
|
2009-09-23 06:02:37 +00:00
|
|
|
|
|
|
|
//PAD_HOLE_NOT_PLATED:
|
2009-12-21 18:51:37 +00:00
|
|
|
#define PAD_HOLE_NOT_PLATED_DEFAULT_LAYERS LAYER_BACK | SILKSCREEN_LAYER_FRONT | \
|
|
|
|
SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT
|
2009-09-23 06:02:37 +00:00
|
|
|
|
2010-09-11 16:33:43 +00:00
|
|
|
// Helper class to staore parameters used to draw a pad
|
|
|
|
class PAD_DRAWINFO
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
WinEDA_DrawPanel * m_DrawPanel; // the WinEDA_DrawPanel used to draw a PAD ; can be null
|
|
|
|
int m_DrawMode; // the draw mode
|
|
|
|
int m_Color; // color used to draw the pad shape , from pad layers and visible layers
|
|
|
|
int m_HoleColor; // color used to draw the pad hole
|
|
|
|
int m_PadClearance; // clearance value, used to draw the pad area outlines
|
|
|
|
wxSize m_Mask_margin; // margin, used to draw solder paste when only one layer is shown
|
|
|
|
bool m_Display_padnum; // true to show pad number
|
|
|
|
bool m_Display_netname; // true to show net name
|
|
|
|
bool m_ShowPadFilled; // true to show pad as solid area, false to show pas in sketch mode
|
|
|
|
bool m_ShowNCMark; // true to show pad not connected mark
|
|
|
|
bool m_IsPrinting; // true to print, false to display on screen.
|
|
|
|
wxPoint m_Offset; // general draw offset
|
|
|
|
#ifndef USE_WX_ZOOM
|
|
|
|
double m_Scale; // Draw scaling factor
|
|
|
|
#endif
|
|
|
|
PAD_DRAWINFO( );
|
|
|
|
};
|
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2008-11-18 18:13:55 +00:00
|
|
|
class D_PAD : public BOARD_CONNECTED_ITEM
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2007-10-13 06:18:44 +00:00
|
|
|
private:
|
2009-03-23 19:54:15 +00:00
|
|
|
wxString m_Netname; // Full net name like /mysheet/mysubsheet/vout used by eeschema
|
|
|
|
wxString m_ShortNetname; // short net name, like vout from /mysheet/mysubsheet/vout
|
2008-01-28 18:44:14 +00:00
|
|
|
|
2007-12-01 03:42:52 +00:00
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
public:
|
2007-12-01 03:42:52 +00:00
|
|
|
wxPoint m_Pos; // pad Position on board
|
|
|
|
|
2007-08-06 20:26:59 +00:00
|
|
|
union
|
|
|
|
{
|
|
|
|
unsigned long m_NumPadName;
|
2007-08-30 08:15:05 +00:00
|
|
|
char m_Padname[4]; /* Pad name (4 char) or a long identifier
|
|
|
|
* (used in pad name comparisons because this is faster than string comparison)
|
|
|
|
*/
|
2007-08-06 20:26:59 +00:00
|
|
|
};
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2009-03-23 19:54:15 +00:00
|
|
|
int m_Masque_Layer; // Bitwise layer :1= copper layer, 15= cmp,
|
2007-08-30 08:15:05 +00:00
|
|
|
// 2..14 = internal layers
|
|
|
|
// 16 .. 31 = technical layers
|
|
|
|
|
2009-03-23 19:54:15 +00:00
|
|
|
int m_PadShape; // Shape: PAD_CIRCLE, PAD_RECT, PAD_OVAL, PAD_TRAPEZOID
|
|
|
|
int m_DrillShape; // Shape PAD_CIRCLE, PAD_OVAL
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2009-03-23 19:54:15 +00:00
|
|
|
wxSize m_Drill; // Drill diam (drill shape = PAD_CIRCLE) or drill size(shape = OVAL)
|
2008-01-05 17:30:56 +00:00
|
|
|
// for drill shape = PAD_CIRCLE, drill diam = m_Drill.x
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2009-11-12 15:43:38 +00:00
|
|
|
wxSize m_Offset; /* This parameter is useful only for oblong pads (it can be used for other
|
2008-01-28 18:44:14 +00:00
|
|
|
* shapes, but without any interest).
|
|
|
|
* this is the offset between the pad hole and the pad shape (you must
|
|
|
|
* understand here pad shape = copper area around the hole)
|
2009-11-12 15:43:38 +00:00
|
|
|
* Most of cases, the hole is the center of the shape (m_Offset = 0).
|
2008-01-28 18:44:14 +00:00
|
|
|
* But some board designers use oblong pads with a hole moved to one of the
|
|
|
|
* oblong pad shape ends.
|
|
|
|
* In all cases the pad position is the pad hole.
|
|
|
|
* The physical shape position (used to draw it for instance) is pad
|
|
|
|
* position (m_Pos) + m_Offset.
|
|
|
|
* D_PAD::ReturnShapePos() returns the physical shape position according to
|
|
|
|
* the offset and the pad rotation.*/
|
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
wxSize m_Size; // X and Y size ( relative to orient 0)
|
|
|
|
|
2009-11-12 15:43:38 +00:00
|
|
|
wxSize m_DeltaSize; // delta on rectangular shapes
|
2007-08-30 08:15:05 +00:00
|
|
|
|
|
|
|
wxPoint m_Pos0; // Initial Pad position (i.e. pas position relative to the module anchor, orientation 0
|
|
|
|
|
2010-09-18 17:55:08 +00:00
|
|
|
int m_ShapeMaxRadius; // radius of the circle containing the pad shape
|
2008-01-05 17:30:56 +00:00
|
|
|
int m_Attribut; // NORMAL, PAD_SMD, PAD_CONN
|
2007-08-30 08:15:05 +00:00
|
|
|
int m_Orient; // in 1/10 degrees
|
2010-02-22 19:56:32 +00:00
|
|
|
static int m_PadSketchModePenSize; // Pen size used to draw pads in sketch mode
|
|
|
|
// (mode used to print pads on silkscreen layer)
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2009-11-04 19:08:08 +00:00
|
|
|
// Local clearance. When null, the module default value is used.
|
|
|
|
// when the module default value is null, the netclass value is used
|
|
|
|
// Usually the local clearance is null
|
|
|
|
int m_LocalClearance;
|
|
|
|
|
|
|
|
// Local mask margins: when NULL, the parent footprint design values are used
|
|
|
|
int m_LocalSolderMaskMargin; // Local solder mask margin
|
|
|
|
int m_LocalSolderPasteMargin; // Local solder paste margin absolute value
|
2009-11-12 15:43:38 +00:00
|
|
|
double m_LocalSolderPasteMarginRatio; // Local solder mask margin ratio value of pad size
|
2009-11-04 19:08:08 +00:00
|
|
|
// The final margin is the sum of these 2 values
|
|
|
|
|
2008-11-18 18:13:55 +00:00
|
|
|
private:
|
2009-11-04 19:08:08 +00:00
|
|
|
int m_SubRatsnest; // variable used in rats nest computations
|
2009-03-23 19:54:15 +00:00
|
|
|
// handle subnet (block) number in ratsnet connection
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
public:
|
2007-08-06 20:26:59 +00:00
|
|
|
D_PAD( MODULE* parent );
|
|
|
|
D_PAD( D_PAD* pad );
|
2007-09-01 12:00:30 +00:00
|
|
|
~D_PAD();
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-03-23 19:54:15 +00:00
|
|
|
void Copy( D_PAD* source );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-09-01 12:00:30 +00:00
|
|
|
D_PAD* Next() { return (D_PAD*) Pnext; }
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2008-12-14 19:45:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function GetNetname
|
|
|
|
* @return const wxString * , a pointer to the full netname
|
|
|
|
*/
|
|
|
|
wxString GetNetname() const { return m_Netname; }
|
2009-03-23 19:54:15 +00:00
|
|
|
|
2008-12-14 19:45:05 +00:00
|
|
|
/**
|
|
|
|
* Function GetShortNetname
|
|
|
|
* @return const wxString * , a pointer to the short netname
|
|
|
|
*/
|
|
|
|
wxString GetShortNetname() const { return m_ShortNetname; }
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Function SetNetname
|
2010-12-29 17:47:32 +00:00
|
|
|
* @param aNetname: the new netname
|
2008-12-14 19:45:05 +00:00
|
|
|
*/
|
2009-03-23 19:54:15 +00:00
|
|
|
void SetNetname( const wxString& aNetname );
|
2008-12-14 19:45:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function GetShape
|
|
|
|
* @return the shape of this pad.
|
|
|
|
*/
|
2010-09-20 16:21:47 +00:00
|
|
|
int GetShape() const { return m_PadShape & 0xFF; }
|
2008-12-14 19:45:05 +00:00
|
|
|
|
2007-12-01 03:42:52 +00:00
|
|
|
/**
|
|
|
|
* Function GetPosition
|
|
|
|
* returns the position of this object.
|
|
|
|
* @return const wxPoint& - The position of this object.
|
|
|
|
*/
|
|
|
|
wxPoint& GetPosition()
|
|
|
|
{
|
|
|
|
return m_Pos;
|
|
|
|
}
|
2008-01-28 18:44:14 +00:00
|
|
|
|
|
|
|
|
2007-12-01 03:42:52 +00:00
|
|
|
void SetPosition( const wxPoint& aPos )
|
|
|
|
{
|
|
|
|
m_Pos = aPos;
|
|
|
|
}
|
2008-01-28 18:44:14 +00:00
|
|
|
|
2010-11-12 15:17:10 +00:00
|
|
|
/**
|
|
|
|
* Function TransformShapeWithClearanceToPolygon
|
2009-11-14 19:47:52 +00:00
|
|
|
* Convert the pad shape to a closed polygon
|
|
|
|
* Used in filling zones calculations
|
|
|
|
* Circles and arcs are approximated by segments
|
|
|
|
* @param aCornerBuffer = a buffer to store the polygon
|
|
|
|
* @param aClearanceValue = the clearance around the pad
|
|
|
|
* @param aCircleToSegmentsCount = the number of segments to approximate a circle
|
|
|
|
* @param aCorrectionFactor = the correction to apply to circles radius to keep
|
|
|
|
* clearance when the circle is approxiamted by segment bigger or equal
|
|
|
|
* to the real clearance value (usually near from 1.0)
|
|
|
|
*/
|
2009-11-16 08:13:40 +00:00
|
|
|
void TransformShapeWithClearanceToPolygon( std::vector <CPolyPt>& aCornerBuffer,
|
2009-11-14 19:47:52 +00:00
|
|
|
int aClearanceValue, int aCircleToSegmentsCount, double aCorrectionFactor );
|
2009-03-23 19:54:15 +00:00
|
|
|
|
2009-11-05 20:59:42 +00:00
|
|
|
/**
|
|
|
|
* Function GetClearance
|
2010-04-08 11:33:43 +00:00
|
|
|
* returns the clearance in internal units. If \a aItem is not NULL then the
|
|
|
|
* returned clearance is the greater of this object's clearance and
|
|
|
|
* aItem's clearance. If \a aItem is NULL, then this objects clearance
|
2009-11-05 20:59:42 +00:00
|
|
|
* is returned.
|
|
|
|
* @param aItem is another BOARD_CONNECTED_ITEM or NULL
|
2010-04-08 11:33:43 +00:00
|
|
|
* @return int - the clearance in internal units.
|
2009-11-05 20:59:42 +00:00
|
|
|
*/
|
|
|
|
virtual int GetClearance( BOARD_CONNECTED_ITEM* aItem = NULL ) const;
|
|
|
|
|
|
|
|
// Mask margins handling:
|
2009-11-04 19:08:08 +00:00
|
|
|
|
2010-11-12 15:17:10 +00:00
|
|
|
/**
|
|
|
|
* Function GetSolderMaskMargin
|
2009-11-04 19:08:08 +00:00
|
|
|
* @return the margin for the solder mask layer
|
|
|
|
* usually > 0 (mask shape bigger than pad
|
|
|
|
* value is
|
|
|
|
* 1 - the local value
|
|
|
|
* 2 - if null, the parent footprint value
|
|
|
|
* 1 - if null, the global value
|
|
|
|
*/
|
|
|
|
int GetSolderMaskMargin();
|
|
|
|
|
2010-11-12 15:17:10 +00:00
|
|
|
/**
|
|
|
|
* Function GetSolderPasteMargin
|
2009-11-04 19:08:08 +00:00
|
|
|
* @return the margin for the solder mask layer
|
|
|
|
* usually < 0 (mask shape smaller than pad
|
2009-11-12 15:43:38 +00:00
|
|
|
* because the margin can be dependent on the pad size, the margin has a x and a y value
|
2009-11-04 19:08:08 +00:00
|
|
|
* value is
|
|
|
|
* 1 - the local value
|
|
|
|
* 2 - if null, the parent footprint value
|
|
|
|
* 1 - if null, the global value
|
|
|
|
*/
|
|
|
|
wxSize GetSolderPasteMargin();
|
|
|
|
|
2007-08-07 06:21:19 +00:00
|
|
|
/* Reading and writing data on files */
|
2011-01-14 17:43:30 +00:00
|
|
|
int ReadDescr( LINE_READER* aReader );
|
2008-01-28 18:44:14 +00:00
|
|
|
|
2007-10-30 21:30:58 +00:00
|
|
|
/**
|
|
|
|
* Function Save
|
2007-10-31 14:14:21 +00:00
|
|
|
* writes the data structures for this object out to a FILE in "*.brd" format.
|
2007-10-30 21:30:58 +00:00
|
|
|
* @param aFile The FILE to write to.
|
|
|
|
* @return bool - true if success writing else false.
|
2008-01-28 18:44:14 +00:00
|
|
|
*/
|
2009-03-23 19:54:15 +00:00
|
|
|
bool Save( FILE* aFile ) const;
|
2008-01-28 18:44:14 +00:00
|
|
|
|
2007-12-01 03:42:52 +00:00
|
|
|
|
2007-08-06 20:26:59 +00:00
|
|
|
/* drawing functions */
|
2010-12-29 17:47:32 +00:00
|
|
|
/** Draw a pad:
|
|
|
|
* @param aPanel = the WinEDA_DrawPanel panel
|
|
|
|
* @param aDC = the current device context
|
|
|
|
* @param aDraw_mode = mode: GR_OR, GR_XOR, GR_AND...
|
|
|
|
* @param aOffset = draw offset
|
|
|
|
*/
|
|
|
|
void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC,
|
|
|
|
int aDrawMode, const wxPoint& aOffset = ZeroOffset );
|
2008-04-01 05:21:50 +00:00
|
|
|
|
2009-03-23 19:54:15 +00:00
|
|
|
void Draw3D( Pcb3D_GLCanvas* glcanvas );
|
2007-08-06 20:26:59 +00:00
|
|
|
|
2010-11-12 15:17:10 +00:00
|
|
|
/**
|
|
|
|
* Function DrawShape
|
2010-09-11 16:33:43 +00:00
|
|
|
* basic function to draw a pad.
|
|
|
|
* used by Draw after calculation of parameters (color, ) final orientation ...
|
|
|
|
*/
|
|
|
|
void DrawShape( EDA_Rect* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo );
|
|
|
|
|
2010-11-12 15:17:10 +00:00
|
|
|
/**
|
|
|
|
* Function BuildPadPolygon
|
2010-09-20 16:21:47 +00:00
|
|
|
* Has meaning only for polygonal pads (trapezoid and rectangular)
|
2010-09-11 16:33:43 +00:00
|
|
|
* Build the Corner list of the polygonal shape,
|
|
|
|
* depending on shape, extra size (clearance ...) and orientation
|
2010-12-29 17:47:32 +00:00
|
|
|
* @param aCoord = a buffer to fill (4 corners).
|
2010-09-11 16:33:43 +00:00
|
|
|
* @param aInflateValue = wxSize: the clearance or margin value. value > 0: inflate, < 0 deflate
|
|
|
|
* @param aRotation = full rotation of the polygon
|
|
|
|
*/
|
2010-09-20 16:21:47 +00:00
|
|
|
void BuildPadPolygon( wxPoint aCoord[4], wxSize aInflateValue, int aRotation ) const;
|
|
|
|
|
2010-11-12 15:17:10 +00:00
|
|
|
/**
|
|
|
|
* Function BuildSegmentFromOvalShape
|
2010-09-20 16:21:47 +00:00
|
|
|
* Has meaning only for OVAL (and ROUND) pads
|
|
|
|
* Build an equivalent segment having the same shape as the OVAL shape,
|
|
|
|
* Useful in draw function and in DRC and HitTest functions,
|
|
|
|
* because segments are already well handled by track tests
|
|
|
|
* @param aSegStart = the starting point of the equivalent segment, relative to the shape position.
|
|
|
|
* @param aSegEnd = the ending point of the equivalent segment, relative to the shape position
|
|
|
|
* @param aRotation = full rotation of the segment
|
|
|
|
* @return the width of the segment
|
|
|
|
*/
|
|
|
|
int BuildSegmentFromOvalShape(wxPoint& aSegStart, wxPoint& aSegEnd, int aRotation) const;
|
2010-09-11 16:33:43 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
// others
|
2009-03-23 19:54:15 +00:00
|
|
|
void SetPadName( const wxString& name ); // Change pad name
|
|
|
|
wxString ReturnStringPadName(); // Return pad name as string in a wxString
|
|
|
|
void ReturnStringPadName( wxString& text ); // Return pad name as string in a buffer
|
2010-09-18 17:55:08 +00:00
|
|
|
void ComputeShapeMaxRadius(); // compute radius
|
2010-12-10 19:47:44 +00:00
|
|
|
|
|
|
|
int GetMaxRadius() const;
|
|
|
|
|
2009-11-12 15:43:38 +00:00
|
|
|
const wxPoint ReturnShapePos();
|
2008-01-28 18:44:14 +00:00
|
|
|
|
2007-08-06 20:26:59 +00:00
|
|
|
|
2007-10-13 06:18:44 +00:00
|
|
|
/**
|
|
|
|
* Function GetNet
|
|
|
|
* @return int - the netcode
|
|
|
|
*/
|
2008-11-18 18:13:55 +00:00
|
|
|
int GetSubRatsnest() const { return m_SubRatsnest; }
|
|
|
|
void SetSubRatsnest( int aSubRatsnest ) { m_SubRatsnest = aSubRatsnest; }
|
2008-01-28 18:44:14 +00:00
|
|
|
|
|
|
|
|
2007-08-20 19:33:15 +00:00
|
|
|
/**
|
2009-04-17 08:51:02 +00:00
|
|
|
* Function DisplayInfo
|
2007-08-20 19:33:15 +00:00
|
|
|
* has knowledge about the frame and how and where to put status information
|
|
|
|
* about this object into the frame's message panel.
|
2010-12-08 20:12:46 +00:00
|
|
|
* Is virtual from EDA_ITEM.
|
2007-08-30 22:20:52 +00:00
|
|
|
* @param frame A WinEDA_DrawFrame in which to print status information.
|
2008-01-28 18:44:14 +00:00
|
|
|
*/
|
2009-04-17 08:51:02 +00:00
|
|
|
void DisplayInfo( WinEDA_DrawFrame* frame );
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2008-01-28 18:44:14 +00:00
|
|
|
|
2007-08-30 22:20:52 +00:00
|
|
|
/**
|
|
|
|
* Function IsOnLayer
|
|
|
|
* tests to see if this object is on the given layer. Is virtual so
|
|
|
|
* objects like D_PAD, which reside on multiple layers can do their own
|
|
|
|
* form of testing.
|
|
|
|
* @param aLayer The layer to test for.
|
|
|
|
* @return bool - true if on given layer, else false.
|
|
|
|
*/
|
2009-03-23 19:54:15 +00:00
|
|
|
bool IsOnLayer( int aLayer ) const;
|
2008-01-28 18:44:14 +00:00
|
|
|
|
2007-08-30 22:20:52 +00:00
|
|
|
|
2007-08-08 03:50:44 +00:00
|
|
|
/**
|
|
|
|
* Function HitTest
|
|
|
|
* tests if the given wxPoint is within the bounds of this object.
|
|
|
|
* @param refPos A wxPoint to test
|
|
|
|
* @return bool - true if a hit, else false
|
|
|
|
*/
|
2009-03-23 19:54:15 +00:00
|
|
|
bool HitTest( const wxPoint& refPos );
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2007-08-07 06:21:19 +00:00
|
|
|
/**
|
|
|
|
* Function GetClass
|
|
|
|
* returns the class name.
|
|
|
|
* @return wxString
|
|
|
|
*/
|
|
|
|
virtual wxString GetClass() const
|
|
|
|
{
|
|
|
|
return wxT( "PAD" );
|
|
|
|
}
|
2008-01-28 18:44:14 +00:00
|
|
|
|
2008-04-18 13:28:56 +00:00
|
|
|
/**
|
|
|
|
* Function GetBoundingBox
|
2008-10-19 18:18:45 +00:00
|
|
|
* returns the bounding box of this pad
|
2009-11-12 15:43:38 +00:00
|
|
|
* Mainly used to redraw the screen area occupied by the pad
|
2008-04-18 13:28:56 +00:00
|
|
|
*/
|
2010-12-10 19:47:44 +00:00
|
|
|
EDA_Rect GetBoundingBox() const;
|
2008-04-18 13:28:56 +00:00
|
|
|
|
2008-01-24 21:50:12 +00:00
|
|
|
/**
|
|
|
|
* Function Compare
|
|
|
|
* compares two pads and return 0 if they are equal.
|
|
|
|
* @return int - <0 if left less than right, 0 if equal, >0 if left greater than right.
|
|
|
|
*/
|
2008-01-28 18:44:14 +00:00
|
|
|
static int Compare( const D_PAD* padref, const D_PAD* padcmp );
|
2008-01-24 21:50:12 +00:00
|
|
|
|
2009-08-01 19:26:05 +00:00
|
|
|
/**
|
|
|
|
* Function Move
|
|
|
|
* move this object.
|
2010-12-29 17:47:32 +00:00
|
|
|
* @param aMoveVector - the move vector for this object.
|
2009-08-01 19:26:05 +00:00
|
|
|
*/
|
2009-11-04 19:08:08 +00:00
|
|
|
virtual void Move( const wxPoint& aMoveVector )
|
2009-08-01 19:26:05 +00:00
|
|
|
{
|
|
|
|
m_Pos += aMoveVector;
|
|
|
|
}
|
2007-08-07 06:21:19 +00:00
|
|
|
|
2009-11-04 19:08:08 +00:00
|
|
|
|
2009-03-23 19:54:15 +00:00
|
|
|
#if defined(DEBUG)
|
2008-01-28 18:44:14 +00:00
|
|
|
|
2007-08-07 06:21:19 +00:00
|
|
|
/**
|
|
|
|
* Function Show
|
|
|
|
* is used to output the object tree, currently for debugging only.
|
2007-08-30 08:15:05 +00:00
|
|
|
* @param nestLevel An aid to prettier tree indenting, and is the level
|
2007-08-07 06:21:19 +00:00
|
|
|
* of nesting of this object within the overall tree.
|
|
|
|
* @param os The ostream& to output to.
|
|
|
|
*/
|
|
|
|
virtual void Show( int nestLevel, std::ostream& os );
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2007-08-07 06:21:19 +00:00
|
|
|
#endif
|
2007-06-05 12:10:51 +00:00
|
|
|
};
|
|
|
|
|
2009-03-23 19:54:15 +00:00
|
|
|
typedef class D_PAD* LISTE_PAD;
|