replace "BasicShape" by "Primitive" in code, a better name
This commit is contained in:
parent
4122aa1c01
commit
a43f3ab1fe
|
@ -499,7 +499,7 @@ void CINFO3D_VISU::createNewPadWithClearance( const D_PAD* aPad,
|
||||||
{
|
{
|
||||||
SHAPE_POLY_SET polyList; // Will contain the pad outlines in board coordinates
|
SHAPE_POLY_SET polyList; // Will contain the pad outlines in board coordinates
|
||||||
polyList.Append( aPad->GetCustomShapeAsPolygon() );
|
polyList.Append( aPad->GetCustomShapeAsPolygon() );
|
||||||
aPad->BasicShapesAsPolygonToBoardPosition( &polyList, aPad->ShapePos(), aPad->GetOrientation() );
|
aPad->CustomShapeAsPolygonToBoardPosition( &polyList, aPad->ShapePos(), aPad->GetOrientation() );
|
||||||
|
|
||||||
if( aClearanceValue )
|
if( aClearanceValue )
|
||||||
polyList.Inflate( aClearanceValue, 32 );
|
polyList.Inflate( aClearanceValue, 32 );
|
||||||
|
|
|
@ -79,7 +79,7 @@ void CINFO3D_VISU::buildPadShapePolygon( const D_PAD* aPad,
|
||||||
{
|
{
|
||||||
SHAPE_POLY_SET polyList; // Will contain the pad outlines in board coordinates
|
SHAPE_POLY_SET polyList; // Will contain the pad outlines in board coordinates
|
||||||
polyList.Append( aPad->GetCustomShapeAsPolygon() );
|
polyList.Append( aPad->GetCustomShapeAsPolygon() );
|
||||||
aPad->BasicShapesAsPolygonToBoardPosition( &polyList, aPad->ShapePos(), aPad->GetOrientation() );
|
aPad->CustomShapeAsPolygonToBoardPosition( &polyList, aPad->ShapePos(), aPad->GetOrientation() );
|
||||||
aCornerBuffer.Append( polyList );
|
aCornerBuffer.Append( polyList );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -711,7 +711,7 @@ void D_PAD::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
|
||||||
|
|
||||||
SHAPE_POLY_SET outline; // Will contain the corners in board coordinates
|
SHAPE_POLY_SET outline; // Will contain the corners in board coordinates
|
||||||
outline.Append( m_customShapeAsPolygon );
|
outline.Append( m_customShapeAsPolygon );
|
||||||
BasicShapesAsPolygonToBoardPosition( &outline, GetPosition(), GetOrientation() );
|
CustomShapeAsPolygonToBoardPosition( &outline, GetPosition(), GetOrientation() );
|
||||||
outline.Inflate( clearance, aCircleToSegmentsCount );
|
outline.Inflate( clearance, aCircleToSegmentsCount );
|
||||||
aCornerBuffer.Append( outline );
|
aCornerBuffer.Append( outline );
|
||||||
}
|
}
|
||||||
|
|
|
@ -328,7 +328,7 @@ const EDA_RECT D_PAD::GetBoundingBox() const
|
||||||
{
|
{
|
||||||
SHAPE_POLY_SET polySet( m_customShapeAsPolygon );
|
SHAPE_POLY_SET polySet( m_customShapeAsPolygon );
|
||||||
// Move shape to actual position
|
// Move shape to actual position
|
||||||
BasicShapesAsPolygonToBoardPosition( &polySet, GetPosition(), GetOrientation() );
|
CustomShapeAsPolygonToBoardPosition( &polySet, GetPosition(), GetOrientation() );
|
||||||
quadrant1 = m_Pos;
|
quadrant1 = m_Pos;
|
||||||
quadrant2 = m_Pos;
|
quadrant2 = m_Pos;
|
||||||
|
|
||||||
|
@ -424,14 +424,14 @@ void D_PAD::Flip( const wxPoint& aCentre )
|
||||||
SetLayerSet( FlipLayerMask( m_layerMask ) );
|
SetLayerSet( FlipLayerMask( m_layerMask ) );
|
||||||
|
|
||||||
// Flip the basic shapes, in custom pads
|
// Flip the basic shapes, in custom pads
|
||||||
FlipBasicShapes();
|
FlipPrimitives();
|
||||||
|
|
||||||
// m_boundingRadius = -1; the shape has not been changed
|
// m_boundingRadius = -1; the shape has not been changed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Flip the basic shapes, in custom pads
|
// Flip the basic shapes, in custom pads
|
||||||
void D_PAD::FlipBasicShapes()
|
void D_PAD::FlipPrimitives()
|
||||||
{
|
{
|
||||||
// Flip custom shapes
|
// Flip custom shapes
|
||||||
for( unsigned ii = 0; ii < m_basicShapes.size(); ++ii )
|
for( unsigned ii = 0; ii < m_basicShapes.size(); ++ii )
|
||||||
|
@ -1388,7 +1388,7 @@ void D_PAD::ImportSettingsFromMaster( const D_PAD& aMasterPad )
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add or remove custom pad shapes:
|
// Add or remove custom pad shapes:
|
||||||
SetBasicShapes( aMasterPad.GetBasicShapes() );
|
SetPrimitives( aMasterPad.GetPrimitives() );
|
||||||
SetAnchorPadShape( aMasterPad.GetAnchorPadShape() );
|
SetAnchorPadShape( aMasterPad.GetAnchorPadShape() );
|
||||||
MergeBasicShapesAsPolygon();
|
MergePrimitivesAsPolygon();
|
||||||
}
|
}
|
||||||
|
|
|
@ -271,10 +271,10 @@ public:
|
||||||
* a filled circle or ring ( if thickness == 0, this is a filled circle, else a ring)
|
* a filled circle or ring ( if thickness == 0, this is a filled circle, else a ring)
|
||||||
* a arc
|
* a arc
|
||||||
*/
|
*/
|
||||||
void AddBasicShape( std::vector<wxPoint>& aPoly, int aThickness ); ///< add a polygonal basic shape
|
void AddPrimitive( std::vector<wxPoint>& aPoly, int aThickness ); ///< add a polygonal basic shape
|
||||||
void AddBasicShape( wxPoint aStart, wxPoint aEnd, int aThickness ); ///< segment basic shape
|
void AddPrimitive( wxPoint aStart, wxPoint aEnd, int aThickness ); ///< segment basic shape
|
||||||
void AddBasicShape( wxPoint aCenter, int aRadius, int aThickness ); ///< ring or circle basic shape
|
void AddPrimitive( wxPoint aCenter, int aRadius, int aThickness ); ///< ring or circle basic shape
|
||||||
void AddBasicShape( wxPoint aCenter, wxPoint aStart,
|
void AddPrimitive( wxPoint aCenter, wxPoint aStart,
|
||||||
int aArcAngle, int aThickness ); ///< arc basic shape
|
int aArcAngle, int aThickness ); ///< arc basic shape
|
||||||
|
|
||||||
|
|
||||||
|
@ -289,18 +289,18 @@ public:
|
||||||
* (default = 32)
|
* (default = 32)
|
||||||
* Note: The corners coordinates are relative to the pad position, orientation 0,
|
* Note: The corners coordinates are relative to the pad position, orientation 0,
|
||||||
*/
|
*/
|
||||||
bool MergeBasicShapesAsPolygon( SHAPE_POLY_SET * aMergedPolygon = NULL,
|
bool MergePrimitivesAsPolygon( SHAPE_POLY_SET * aMergedPolygon = NULL,
|
||||||
int aCircleToSegmentsCount = 32 );
|
int aCircleToSegmentsCount = 32 );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clear the basic shapes list
|
* clear the basic shapes list
|
||||||
*/
|
*/
|
||||||
void DeleteBasicShapesList();
|
void DeletePrimitivesList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When created, the corners coordinates are relative to the pad position, orientation 0,
|
* When created, the corners coordinates are relative to the pad position, orientation 0,
|
||||||
* in m_customShapeAsPolygon
|
* in m_customShapeAsPolygon
|
||||||
* BasicShapesAsPolygonToBoardPosition transform these coordinates to actual
|
* CustomShapeAsPolygonToBoardPosition transform these coordinates to actual
|
||||||
* (board) coordinates
|
* (board) coordinates
|
||||||
* @param aMergedPolygon = the corners coordinates, relative to aPosition and
|
* @param aMergedPolygon = the corners coordinates, relative to aPosition and
|
||||||
* rotated by aRotation
|
* rotated by aRotation
|
||||||
|
@ -309,13 +309,13 @@ public:
|
||||||
* @param aRotation = the rotation of the shape (usually the pad rotation, but
|
* @param aRotation = the rotation of the shape (usually the pad rotation, but
|
||||||
* not always, in DRC)
|
* not always, in DRC)
|
||||||
*/
|
*/
|
||||||
void BasicShapesAsPolygonToBoardPosition( SHAPE_POLY_SET * aMergedPolygon,
|
void CustomShapeAsPolygonToBoardPosition( SHAPE_POLY_SET * aMergedPolygon,
|
||||||
wxPoint aPosition, double aRotation ) const;
|
wxPoint aPosition, double aRotation ) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Accessor to the basic shape list
|
* Accessor to the basic shape list
|
||||||
*/
|
*/
|
||||||
const std::vector<PAD_CS_PRIMITIVE>& GetBasicShapes() const { return m_basicShapes; }
|
const std::vector<PAD_CS_PRIMITIVE>& GetPrimitives() const { return m_basicShapes; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Accessor to the custom shape as one polygon
|
* Accessor to the custom shape as one polygon
|
||||||
|
@ -327,14 +327,14 @@ public:
|
||||||
/**
|
/**
|
||||||
* Flip the basic shapes, in custom pads
|
* Flip the basic shapes, in custom pads
|
||||||
*/
|
*/
|
||||||
void FlipBasicShapes();
|
void FlipPrimitives();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Import to the basic shape list
|
* Import to the basic shape list
|
||||||
* @return true if OK, false if issues
|
* @return true if OK, false if issues
|
||||||
* (more than one polygon to build the polygon shape list)
|
* (more than one polygon to build the polygon shape list)
|
||||||
*/
|
*/
|
||||||
bool SetBasicShapes( const std::vector<PAD_CS_PRIMITIVE>& aBasicShapesList );
|
bool SetPrimitives( const std::vector<PAD_CS_PRIMITIVE>& aPrimitivesList );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -66,18 +66,18 @@ void PAD_CS_PRIMITIVE::ExportTo( DRAWSEGMENT* aTarget )
|
||||||
* add a free shape to the shape list.
|
* add a free shape to the shape list.
|
||||||
* the shape is a polygon (can be with thick outline), segment, circle or arc
|
* the shape is a polygon (can be with thick outline), segment, circle or arc
|
||||||
*/
|
*/
|
||||||
void D_PAD::AddBasicShape( std::vector<wxPoint>& aPoly, int aThickness )
|
void D_PAD::AddPrimitive( std::vector<wxPoint>& aPoly, int aThickness )
|
||||||
{
|
{
|
||||||
PAD_CS_PRIMITIVE shape( S_POLYGON );
|
PAD_CS_PRIMITIVE shape( S_POLYGON );
|
||||||
shape.m_Poly = aPoly;
|
shape.m_Poly = aPoly;
|
||||||
shape.m_Thickness = aThickness;
|
shape.m_Thickness = aThickness;
|
||||||
m_basicShapes.push_back( shape );
|
m_basicShapes.push_back( shape );
|
||||||
|
|
||||||
MergeBasicShapesAsPolygon();
|
MergePrimitivesAsPolygon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void D_PAD::AddBasicShape( wxPoint aStart, wxPoint aEnd, int aThickness )
|
void D_PAD::AddPrimitive( wxPoint aStart, wxPoint aEnd, int aThickness )
|
||||||
{
|
{
|
||||||
PAD_CS_PRIMITIVE shape( S_SEGMENT );
|
PAD_CS_PRIMITIVE shape( S_SEGMENT );
|
||||||
shape.m_Start = aStart;
|
shape.m_Start = aStart;
|
||||||
|
@ -85,11 +85,11 @@ void D_PAD::AddBasicShape( wxPoint aStart, wxPoint aEnd, int aThickness )
|
||||||
shape.m_Thickness = aThickness;
|
shape.m_Thickness = aThickness;
|
||||||
m_basicShapes.push_back( shape );
|
m_basicShapes.push_back( shape );
|
||||||
|
|
||||||
MergeBasicShapesAsPolygon();
|
MergePrimitivesAsPolygon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void D_PAD::AddBasicShape( wxPoint aCenter, wxPoint aStart, int aArcAngle, int aThickness )
|
void D_PAD::AddPrimitive( wxPoint aCenter, wxPoint aStart, int aArcAngle, int aThickness )
|
||||||
{
|
{
|
||||||
PAD_CS_PRIMITIVE shape( S_ARC );
|
PAD_CS_PRIMITIVE shape( S_ARC );
|
||||||
shape.m_Start = aCenter;
|
shape.m_Start = aCenter;
|
||||||
|
@ -98,11 +98,11 @@ void D_PAD::AddBasicShape( wxPoint aCenter, wxPoint aStart, int aArcAngle, int a
|
||||||
shape.m_Thickness = aThickness;
|
shape.m_Thickness = aThickness;
|
||||||
m_basicShapes.push_back( shape );
|
m_basicShapes.push_back( shape );
|
||||||
|
|
||||||
MergeBasicShapesAsPolygon();
|
MergePrimitivesAsPolygon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void D_PAD::AddBasicShape( wxPoint aCenter, int aRadius, int aThickness )
|
void D_PAD::AddPrimitive( wxPoint aCenter, int aRadius, int aThickness )
|
||||||
{
|
{
|
||||||
PAD_CS_PRIMITIVE shape( S_CIRCLE );
|
PAD_CS_PRIMITIVE shape( S_CIRCLE );
|
||||||
shape.m_Start = aCenter;
|
shape.m_Start = aCenter;
|
||||||
|
@ -110,25 +110,25 @@ void D_PAD::AddBasicShape( wxPoint aCenter, int aRadius, int aThickness )
|
||||||
shape.m_Thickness = aThickness;
|
shape.m_Thickness = aThickness;
|
||||||
m_basicShapes.push_back( shape );
|
m_basicShapes.push_back( shape );
|
||||||
|
|
||||||
MergeBasicShapesAsPolygon();
|
MergePrimitivesAsPolygon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool D_PAD::SetBasicShapes( const std::vector<PAD_CS_PRIMITIVE>& aBasicShapesList )
|
bool D_PAD::SetPrimitives( const std::vector<PAD_CS_PRIMITIVE>& aPrimitivesList )
|
||||||
{
|
{
|
||||||
// clear old list
|
// clear old list
|
||||||
m_basicShapes.clear();
|
m_basicShapes.clear();
|
||||||
|
|
||||||
// Import to the basic shape list
|
// Import to the basic shape list
|
||||||
if( aBasicShapesList.size() )
|
if( aPrimitivesList.size() )
|
||||||
m_basicShapes = aBasicShapesList;
|
m_basicShapes = aPrimitivesList;
|
||||||
|
|
||||||
// Only one polygon is expected (pad area = only one copper area)
|
// Only one polygon is expected (pad area = only one copper area)
|
||||||
return MergeBasicShapesAsPolygon();
|
return MergePrimitivesAsPolygon();
|
||||||
}
|
}
|
||||||
|
|
||||||
// clear the basic shapes list and associated data
|
// clear the basic shapes list and associated data
|
||||||
void D_PAD::DeleteBasicShapesList()
|
void D_PAD::DeletePrimitivesList()
|
||||||
{
|
{
|
||||||
m_basicShapes.clear();
|
m_basicShapes.clear();
|
||||||
m_customShapeAsPolygon.RemoveAllContours();
|
m_customShapeAsPolygon.RemoveAllContours();
|
||||||
|
@ -139,7 +139,7 @@ void D_PAD::DeleteBasicShapesList()
|
||||||
* return true if OK, false in there is more than one polygon
|
* return true if OK, false in there is more than one polygon
|
||||||
* in aMergedPolygon
|
* in aMergedPolygon
|
||||||
*/
|
*/
|
||||||
bool D_PAD::MergeBasicShapesAsPolygon( SHAPE_POLY_SET* aMergedPolygon,
|
bool D_PAD::MergePrimitivesAsPolygon( SHAPE_POLY_SET* aMergedPolygon,
|
||||||
int aCircleToSegmentsCount )
|
int aCircleToSegmentsCount )
|
||||||
{
|
{
|
||||||
// if aMergedPolygon == NULL, use m_customShapeAsPolygon as target
|
// if aMergedPolygon == NULL, use m_customShapeAsPolygon as target
|
||||||
|
@ -242,7 +242,7 @@ bool D_PAD::MergeBasicShapesAsPolygon( SHAPE_POLY_SET* aMergedPolygon,
|
||||||
return aMergedPolygon->OutlineCount() <= 1;
|
return aMergedPolygon->OutlineCount() <= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void D_PAD::BasicShapesAsPolygonToBoardPosition( SHAPE_POLY_SET * aMergedPolygon,
|
void D_PAD::CustomShapeAsPolygonToBoardPosition( SHAPE_POLY_SET * aMergedPolygon,
|
||||||
wxPoint aPosition, double aRotation ) const
|
wxPoint aPosition, double aRotation ) const
|
||||||
{
|
{
|
||||||
if( aMergedPolygon->OutlineCount() == 0 )
|
if( aMergedPolygon->OutlineCount() == 0 )
|
||||||
|
|
|
@ -500,7 +500,7 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo )
|
||||||
|
|
||||||
SHAPE_POLY_SET outline; // Will contain the corners in board coordinates
|
SHAPE_POLY_SET outline; // Will contain the corners in board coordinates
|
||||||
outline.Append( m_customShapeAsPolygon );
|
outline.Append( m_customShapeAsPolygon );
|
||||||
BasicShapesAsPolygonToBoardPosition( &outline, pad_pos, GetOrientation() );
|
CustomShapeAsPolygonToBoardPosition( &outline, pad_pos, GetOrientation() );
|
||||||
SHAPE_LINE_CHAIN* poly;
|
SHAPE_LINE_CHAIN* poly;
|
||||||
|
|
||||||
const int segmentToCircleCount = 32;
|
const int segmentToCircleCount = 32;
|
||||||
|
|
|
@ -44,9 +44,9 @@
|
||||||
|
|
||||||
#include <dialog_pad_properties.h>
|
#include <dialog_pad_properties.h>
|
||||||
|
|
||||||
DIALOG_PAD_BASICSHAPES_PROPERTIES::DIALOG_PAD_BASICSHAPES_PROPERTIES(
|
DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES(
|
||||||
wxWindow* aParent, PAD_CS_PRIMITIVE * aShape )
|
wxWindow* aParent, PAD_CS_PRIMITIVE * aShape )
|
||||||
: DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE( aParent )
|
: DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE( aParent )
|
||||||
{
|
{
|
||||||
m_shape = aShape;
|
m_shape = aShape;
|
||||||
TransferDataToWindow();
|
TransferDataToWindow();
|
||||||
|
@ -55,7 +55,7 @@ DIALOG_PAD_BASICSHAPES_PROPERTIES::DIALOG_PAD_BASICSHAPES_PROPERTIES(
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DIALOG_PAD_BASICSHAPES_PROPERTIES::TransferDataToWindow()
|
bool DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataToWindow()
|
||||||
{
|
{
|
||||||
if( m_shape == NULL )
|
if( m_shape == NULL )
|
||||||
return false;
|
return false;
|
||||||
|
@ -139,7 +139,7 @@ bool DIALOG_PAD_BASICSHAPES_PROPERTIES::TransferDataToWindow()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DIALOG_PAD_BASICSHAPES_PROPERTIES::TransferDataFromWindow()
|
bool DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataFromWindow()
|
||||||
{
|
{
|
||||||
// Transfer data out of the GUI.
|
// Transfer data out of the GUI.
|
||||||
m_shape->m_Thickness = ValueFromString( g_UserUnit, m_textCtrlThickness->GetValue() );
|
m_shape->m_Thickness = ValueFromString( g_UserUnit, m_textCtrlThickness->GetValue() );
|
||||||
|
@ -183,9 +183,9 @@ bool DIALOG_PAD_BASICSHAPES_PROPERTIES::TransferDataFromWindow()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DIALOG_PAD_BASIC_SHP_POLY_PROPS::DIALOG_PAD_BASIC_SHP_POLY_PROPS(
|
DIALOG_PAD_PRIMITIVE_POLY_PROPS::DIALOG_PAD_PRIMITIVE_POLY_PROPS(
|
||||||
wxWindow* aParent, PAD_CS_PRIMITIVE * aShape )
|
wxWindow* aParent, PAD_CS_PRIMITIVE * aShape )
|
||||||
: DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE( aParent ),
|
: DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( aParent ),
|
||||||
m_shape( aShape ), m_currshape( *m_shape )
|
m_shape( aShape ), m_currshape( *m_shape )
|
||||||
{
|
{
|
||||||
TransferDataToWindow();
|
TransferDataToWindow();
|
||||||
|
@ -195,18 +195,18 @@ DIALOG_PAD_BASIC_SHP_POLY_PROPS::DIALOG_PAD_BASIC_SHP_POLY_PROPS(
|
||||||
|
|
||||||
// TODO: move wxEVT_GRID_CELL_CHANGING in wxFormbuilder, when it support it
|
// TODO: move wxEVT_GRID_CELL_CHANGING in wxFormbuilder, when it support it
|
||||||
m_gridCornersList->Connect( wxEVT_GRID_CELL_CHANGING,
|
m_gridCornersList->Connect( wxEVT_GRID_CELL_CHANGING,
|
||||||
wxGridEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS::onCellChanging ), NULL, this );
|
wxGridEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS::onCellChanging ), NULL, this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DIALOG_PAD_BASIC_SHP_POLY_PROPS::~DIALOG_PAD_BASIC_SHP_POLY_PROPS()
|
DIALOG_PAD_PRIMITIVE_POLY_PROPS::~DIALOG_PAD_PRIMITIVE_POLY_PROPS()
|
||||||
{
|
{
|
||||||
m_gridCornersList->Disconnect( wxEVT_GRID_CELL_CHANGING,
|
m_gridCornersList->Disconnect( wxEVT_GRID_CELL_CHANGING,
|
||||||
wxGridEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS::onCellChanging ), NULL, this );
|
wxGridEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS::onCellChanging ), NULL, this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool DIALOG_PAD_BASIC_SHP_POLY_PROPS::TransferDataToWindow()
|
bool DIALOG_PAD_PRIMITIVE_POLY_PROPS::TransferDataToWindow()
|
||||||
{
|
{
|
||||||
if( m_shape == NULL )
|
if( m_shape == NULL )
|
||||||
return false;
|
return false;
|
||||||
|
@ -256,7 +256,7 @@ bool DIALOG_PAD_BASIC_SHP_POLY_PROPS::TransferDataToWindow()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DIALOG_PAD_BASIC_SHP_POLY_PROPS::TransferDataFromWindow()
|
bool DIALOG_PAD_PRIMITIVE_POLY_PROPS::TransferDataFromWindow()
|
||||||
{
|
{
|
||||||
if( !Validate() )
|
if( !Validate() )
|
||||||
return false;
|
return false;
|
||||||
|
@ -270,7 +270,7 @@ bool DIALOG_PAD_BASIC_SHP_POLY_PROPS::TransferDataFromWindow()
|
||||||
|
|
||||||
|
|
||||||
// test for a valid polygon (a not self intersectiong polygon)
|
// test for a valid polygon (a not self intersectiong polygon)
|
||||||
bool DIALOG_PAD_BASIC_SHP_POLY_PROPS::Validate()
|
bool DIALOG_PAD_PRIMITIVE_POLY_PROPS::Validate()
|
||||||
{
|
{
|
||||||
if( m_currshape.m_Poly.size() < 3 )
|
if( m_currshape.m_Poly.size() < 3 )
|
||||||
{
|
{
|
||||||
|
@ -321,7 +321,7 @@ bool DIALOG_PAD_BASIC_SHP_POLY_PROPS::Validate()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_PAD_BASIC_SHP_POLY_PROPS::onButtonAdd( wxCommandEvent& event )
|
void DIALOG_PAD_PRIMITIVE_POLY_PROPS::onButtonAdd( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
// Insert a new corner after the currently selected:
|
// Insert a new corner after the currently selected:
|
||||||
int row = -1;
|
int row = -1;
|
||||||
|
@ -361,7 +361,7 @@ void DIALOG_PAD_BASIC_SHP_POLY_PROPS::onButtonAdd( wxCommandEvent& event )
|
||||||
m_panelPoly->Refresh();
|
m_panelPoly->Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DIALOG_PAD_BASIC_SHP_POLY_PROPS::OnButtonDelete( wxCommandEvent& event )
|
void DIALOG_PAD_PRIMITIVE_POLY_PROPS::OnButtonDelete( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
wxArrayInt selections = m_gridCornersList->GetSelectedRows();
|
wxArrayInt selections = m_gridCornersList->GetSelectedRows();
|
||||||
std::sort( selections.begin(), selections.end() );
|
std::sort( selections.begin(), selections.end() );
|
||||||
|
@ -380,7 +380,7 @@ void DIALOG_PAD_BASIC_SHP_POLY_PROPS::OnButtonDelete( wxCommandEvent& event )
|
||||||
m_panelPoly->Refresh();
|
m_panelPoly->Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DIALOG_PAD_BASIC_SHP_POLY_PROPS::onPaintPolyPanel( wxPaintEvent& event )
|
void DIALOG_PAD_PRIMITIVE_POLY_PROPS::onPaintPolyPanel( wxPaintEvent& event )
|
||||||
{
|
{
|
||||||
wxPaintDC dc( m_panelPoly );
|
wxPaintDC dc( m_panelPoly );
|
||||||
wxSize dc_size = dc.GetSize();
|
wxSize dc_size = dc.GetSize();
|
||||||
|
@ -450,18 +450,18 @@ void DIALOG_PAD_BASIC_SHP_POLY_PROPS::onPaintPolyPanel( wxPaintEvent& event )
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DIALOG_PAD_BASIC_SHP_POLY_PROPS::onPolyPanelResize( wxSizeEvent& event )
|
void DIALOG_PAD_PRIMITIVE_POLY_PROPS::onPolyPanelResize( wxSizeEvent& event )
|
||||||
{
|
{
|
||||||
m_panelPoly->Refresh();
|
m_panelPoly->Refresh();
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DIALOG_PAD_BASIC_SHP_POLY_PROPS::onGridSelect( wxGridRangeSelectEvent& event )
|
void DIALOG_PAD_PRIMITIVE_POLY_PROPS::onGridSelect( wxGridRangeSelectEvent& event )
|
||||||
{
|
{
|
||||||
m_panelPoly->Refresh();
|
m_panelPoly->Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DIALOG_PAD_BASIC_SHP_POLY_PROPS::onCellChanging( wxGridEvent& event )
|
void DIALOG_PAD_PRIMITIVE_POLY_PROPS::onCellChanging( wxGridEvent& event )
|
||||||
{
|
{
|
||||||
int row = event.GetRow();
|
int row = event.GetRow();
|
||||||
int col = event.GetCol();
|
int col = event.GetCol();
|
||||||
|
@ -488,10 +488,10 @@ void DIALOG_PAD_BASIC_SHP_POLY_PROPS::onCellChanging( wxGridEvent& event )
|
||||||
|
|
||||||
// A dialog to apply geometry transforms to a shape or set of shapes
|
// A dialog to apply geometry transforms to a shape or set of shapes
|
||||||
// (move, rotate around origin, scaling factor, duplication).
|
// (move, rotate around origin, scaling factor, duplication).
|
||||||
DIALOG_PAD_BASICSHAPES_TRANSFORM::DIALOG_PAD_BASICSHAPES_TRANSFORM(
|
DIALOG_PAD_PRIMITIVES_TRANSFORM::DIALOG_PAD_PRIMITIVES_TRANSFORM(
|
||||||
wxWindow* aParent,
|
wxWindow* aParent,
|
||||||
std::vector<PAD_CS_PRIMITIVE*>& aList, bool aShowDuplicate )
|
std::vector<PAD_CS_PRIMITIVE*>& aList, bool aShowDuplicate )
|
||||||
:DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE( aParent ), m_list( aList )
|
:DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE( aParent ), m_list( aList )
|
||||||
{
|
{
|
||||||
wxString unit = GetAbbreviatedUnitsLabel();
|
wxString unit = GetAbbreviatedUnitsLabel();
|
||||||
m_staticTextMoveUnit->SetLabel( unit );
|
m_staticTextMoveUnit->SetLabel( unit );
|
||||||
|
@ -515,7 +515,7 @@ inline void geom_transf( wxPoint& aCoord, wxPoint& aMove, double aScale, double
|
||||||
RotatePoint( &aCoord, aRotation );
|
RotatePoint( &aCoord, aRotation );
|
||||||
}
|
}
|
||||||
|
|
||||||
void DIALOG_PAD_BASICSHAPES_TRANSFORM::Transform( std::vector<PAD_CS_PRIMITIVE>* aList, int aDuplicateCount )
|
void DIALOG_PAD_PRIMITIVES_TRANSFORM::Transform( std::vector<PAD_CS_PRIMITIVE>* aList, int aDuplicateCount )
|
||||||
{
|
{
|
||||||
// Get parameters from dlg:
|
// Get parameters from dlg:
|
||||||
wxPoint moveVect;
|
wxPoint moveVect;
|
||||||
|
|
|
@ -274,7 +274,7 @@ void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event )
|
||||||
|
|
||||||
// draw selected primitives:
|
// draw selected primitives:
|
||||||
COLOR4D hcolor = CYAN;
|
COLOR4D hcolor = CYAN;
|
||||||
long select = m_listCtrlShapes->GetFirstSelected();
|
long select = m_listCtrlPrimitives->GetFirstSelected();
|
||||||
wxPoint start, end, center;
|
wxPoint start, end, center;
|
||||||
|
|
||||||
while( select >= 0 )
|
while( select >= 0 )
|
||||||
|
@ -325,7 +325,7 @@ void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
select = m_listCtrlShapes->GetNextSelected( select );
|
select = m_listCtrlPrimitives->GetNextSelected( select );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw X and Y axis. This is particularly useful to show the
|
// Draw X and Y axis. This is particularly useful to show the
|
||||||
|
@ -457,10 +457,10 @@ void DIALOG_PAD_PROPERTIES::initValues()
|
||||||
m_dummyPad->SetLayerSet( FlipLayerMask( m_dummyPad->GetLayerSet() ) );
|
m_dummyPad->SetLayerSet( FlipLayerMask( m_dummyPad->GetLayerSet() ) );
|
||||||
|
|
||||||
// flip custom pad shapes
|
// flip custom pad shapes
|
||||||
m_dummyPad->FlipBasicShapes();
|
m_dummyPad->FlipPrimitives();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_primitives = m_dummyPad->GetBasicShapes();
|
m_primitives = m_dummyPad->GetPrimitives();
|
||||||
|
|
||||||
m_staticTextWarningPadFlipped->Show(m_isFlipped);
|
m_staticTextWarningPadFlipped->Show(m_isFlipped);
|
||||||
|
|
||||||
|
@ -664,7 +664,7 @@ void DIALOG_PAD_PROPERTIES::initValues()
|
||||||
updateRoundRectCornerValues();
|
updateRoundRectCornerValues();
|
||||||
|
|
||||||
// Update basic shapes list
|
// Update basic shapes list
|
||||||
displayBasicShapesList();
|
displayPrimitivesList();
|
||||||
}
|
}
|
||||||
|
|
||||||
// A small helper function, to display coordinates:
|
// A small helper function, to display coordinates:
|
||||||
|
@ -675,15 +675,15 @@ static wxString formatCoord( wxPoint aCoord )
|
||||||
CoordinateToString( aCoord.y, true ) );
|
CoordinateToString( aCoord.y, true ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void DIALOG_PAD_PROPERTIES::displayBasicShapesList()
|
void DIALOG_PAD_PROPERTIES::displayPrimitivesList()
|
||||||
{
|
{
|
||||||
m_listCtrlShapes->ClearAll();
|
m_listCtrlPrimitives->ClearAll();
|
||||||
|
|
||||||
wxListItem itemCol;
|
wxListItem itemCol;
|
||||||
itemCol.SetImage(-1);
|
itemCol.SetImage(-1);
|
||||||
|
|
||||||
for( int ii = 0; ii < 5; ++ii )
|
for( int ii = 0; ii < 5; ++ii )
|
||||||
m_listCtrlShapes->InsertColumn(ii, itemCol);
|
m_listCtrlPrimitives->InsertColumn(ii, itemCol);
|
||||||
|
|
||||||
wxString bs_info[5];
|
wxString bs_info[5];
|
||||||
|
|
||||||
|
@ -733,18 +733,18 @@ void DIALOG_PAD_PROPERTIES::displayBasicShapesList()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
long tmp = m_listCtrlShapes->InsertItem(ii, bs_info[0]);
|
long tmp = m_listCtrlPrimitives->InsertItem(ii, bs_info[0]);
|
||||||
m_listCtrlShapes->SetItemData(tmp, ii);
|
m_listCtrlPrimitives->SetItemData(tmp, ii);
|
||||||
|
|
||||||
for( int jj = 0, col = 0; jj < 5; ++jj )
|
for( int jj = 0, col = 0; jj < 5; ++jj )
|
||||||
{
|
{
|
||||||
m_listCtrlShapes->SetItem(tmp, col++, bs_info[jj]);
|
m_listCtrlPrimitives->SetItem(tmp, col++, bs_info[jj]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now columns are filled, ensure correct width of columns
|
// Now columns are filled, ensure correct width of columns
|
||||||
for( unsigned ii = 0; ii < 5; ++ii )
|
for( unsigned ii = 0; ii < 5; ++ii )
|
||||||
m_listCtrlShapes->SetColumnWidth( ii, wxLIST_AUTOSIZE );
|
m_listCtrlPrimitives->SetColumnWidth( ii, wxLIST_AUTOSIZE );
|
||||||
}
|
}
|
||||||
|
|
||||||
void DIALOG_PAD_PROPERTIES::OnResize( wxSizeEvent& event )
|
void DIALOG_PAD_PROPERTIES::OnResize( wxSizeEvent& event )
|
||||||
|
@ -1073,7 +1073,7 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK()
|
||||||
|
|
||||||
if( m_dummyPad->GetShape() == PAD_SHAPE_CUSTOM )
|
if( m_dummyPad->GetShape() == PAD_SHAPE_CUSTOM )
|
||||||
{
|
{
|
||||||
if( !m_dummyPad->MergeBasicShapesAsPolygon( ) )
|
if( !m_dummyPad->MergePrimitivesAsPolygon( ) )
|
||||||
error_msgs.Add(
|
error_msgs.Add(
|
||||||
_( "Incorrect pad shape: the shape must be equivalent to only one polygon" ) );
|
_( "Incorrect pad shape: the shape must be equivalent to only one polygon" ) );
|
||||||
}
|
}
|
||||||
|
@ -1109,7 +1109,7 @@ void DIALOG_PAD_PROPERTIES::redraw()
|
||||||
}
|
}
|
||||||
|
|
||||||
// highlight selected primitives:
|
// highlight selected primitives:
|
||||||
long select = m_listCtrlShapes->GetFirstSelected();
|
long select = m_listCtrlPrimitives->GetFirstSelected();
|
||||||
|
|
||||||
while( select >= 0 )
|
while( select >= 0 )
|
||||||
{
|
{
|
||||||
|
@ -1163,7 +1163,7 @@ void DIALOG_PAD_PROPERTIES::redraw()
|
||||||
m_highligth.push_back( dummySegment );
|
m_highligth.push_back( dummySegment );
|
||||||
}
|
}
|
||||||
|
|
||||||
select = m_listCtrlShapes->GetNextSelected( select );
|
select = m_listCtrlPrimitives->GetNextSelected( select );
|
||||||
}
|
}
|
||||||
|
|
||||||
BOX2I bbox = m_dummyPad->ViewBBox();
|
BOX2I bbox = m_dummyPad->ViewBBox();
|
||||||
|
@ -1283,16 +1283,16 @@ bool DIALOG_PAD_PROPERTIES::TransferDataFromWindow()
|
||||||
m_currentPad->SetPadToDieLength( m_padMaster->GetPadToDieLength() );
|
m_currentPad->SetPadToDieLength( m_padMaster->GetPadToDieLength() );
|
||||||
|
|
||||||
if( m_padMaster->GetShape() != PAD_SHAPE_CUSTOM )
|
if( m_padMaster->GetShape() != PAD_SHAPE_CUSTOM )
|
||||||
m_padMaster->DeleteBasicShapesList();
|
m_padMaster->DeletePrimitivesList();
|
||||||
|
|
||||||
|
|
||||||
m_currentPad->SetAnchorPadShape( m_padMaster->GetAnchorPadShape() );
|
m_currentPad->SetAnchorPadShape( m_padMaster->GetAnchorPadShape() );
|
||||||
m_currentPad->SetBasicShapes( m_padMaster->GetBasicShapes() );
|
m_currentPad->SetPrimitives( m_padMaster->GetPrimitives() );
|
||||||
|
|
||||||
if( m_isFlipped )
|
if( m_isFlipped )
|
||||||
{
|
{
|
||||||
m_currentPad->SetLayerSet( FlipLayerMask( m_currentPad->GetLayerSet() ) );
|
m_currentPad->SetLayerSet( FlipLayerMask( m_currentPad->GetLayerSet() ) );
|
||||||
m_currentPad->FlipBasicShapes();
|
m_currentPad->FlipPrimitives();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_currentPad->GetLayerSet() != m_padMaster->GetLayerSet() )
|
if( m_currentPad->GetLayerSet() != m_padMaster->GetLayerSet() )
|
||||||
|
@ -1386,7 +1386,7 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad )
|
||||||
PAD_SHAPE_RECT : PAD_SHAPE_CIRCLE );
|
PAD_SHAPE_RECT : PAD_SHAPE_CIRCLE );
|
||||||
|
|
||||||
if( aPad->GetShape() == PAD_SHAPE_CUSTOM )
|
if( aPad->GetShape() == PAD_SHAPE_CUSTOM )
|
||||||
aPad->SetBasicShapes( m_primitives );
|
aPad->SetPrimitives( m_primitives );
|
||||||
|
|
||||||
// Read pad clearances values:
|
// Read pad clearances values:
|
||||||
aPad->SetLocalClearance( ValueFromTextCtrl( *m_NetClearanceValueCtrl ) );
|
aPad->SetLocalClearance( ValueFromTextCtrl( *m_NetClearanceValueCtrl ) );
|
||||||
|
@ -1683,9 +1683,9 @@ void DIALOG_PAD_PROPERTIES::OnValuesChanged( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DIALOG_PAD_PROPERTIES::editBasicShape()
|
void DIALOG_PAD_PROPERTIES::editPrimitive()
|
||||||
{
|
{
|
||||||
long select = m_listCtrlShapes->GetFirstSelected();
|
long select = m_listCtrlPrimitives->GetFirstSelected();
|
||||||
|
|
||||||
if( select < 0 )
|
if( select < 0 )
|
||||||
{
|
{
|
||||||
|
@ -1697,7 +1697,7 @@ void DIALOG_PAD_PROPERTIES::editBasicShape()
|
||||||
|
|
||||||
if( shape.m_Shape == S_POLYGON )
|
if( shape.m_Shape == S_POLYGON )
|
||||||
{
|
{
|
||||||
DIALOG_PAD_BASIC_SHP_POLY_PROPS dlg( this, &shape );
|
DIALOG_PAD_PRIMITIVE_POLY_PROPS dlg( this, &shape );
|
||||||
|
|
||||||
if( dlg.ShowModal() != wxID_OK )
|
if( dlg.ShowModal() != wxID_OK )
|
||||||
return;
|
return;
|
||||||
|
@ -1707,7 +1707,7 @@ void DIALOG_PAD_PROPERTIES::editBasicShape()
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DIALOG_PAD_BASICSHAPES_PROPERTIES dlg( this, &shape );
|
DIALOG_PAD_PRIMITIVES_PROPERTIES dlg( this, &shape );
|
||||||
|
|
||||||
if( dlg.ShowModal() != wxID_OK )
|
if( dlg.ShowModal() != wxID_OK )
|
||||||
return;
|
return;
|
||||||
|
@ -1715,7 +1715,7 @@ void DIALOG_PAD_PROPERTIES::editBasicShape()
|
||||||
dlg.TransferDataFromWindow();
|
dlg.TransferDataFromWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
displayBasicShapesList();
|
displayPrimitivesList();
|
||||||
|
|
||||||
if( m_canUpdate )
|
if( m_canUpdate )
|
||||||
{
|
{
|
||||||
|
@ -1734,22 +1734,22 @@ void DIALOG_PAD_PROPERTIES::OnPrimitiveSelection( wxListEvent& event )
|
||||||
|
|
||||||
|
|
||||||
/// Called on a double click on the basic shapes list
|
/// Called on a double click on the basic shapes list
|
||||||
void DIALOG_PAD_PROPERTIES::onCustomShapeDClick( wxMouseEvent& event )
|
void DIALOG_PAD_PROPERTIES::onPrimitiveDClick( wxMouseEvent& event )
|
||||||
{
|
{
|
||||||
editBasicShape();
|
editPrimitive();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Called on a click on basic shapes list panel button
|
// Called on a click on basic shapes list panel button
|
||||||
void DIALOG_PAD_PROPERTIES::onEditShape( wxCommandEvent& event )
|
void DIALOG_PAD_PROPERTIES::onEditPrimitive( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
editBasicShape();
|
editPrimitive();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called on a click on basic shapes list panel button
|
// Called on a click on basic shapes list panel button
|
||||||
void DIALOG_PAD_PROPERTIES::onDeleteShape( wxCommandEvent& event )
|
void DIALOG_PAD_PROPERTIES::onDeletePrimitive( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
long select = m_listCtrlShapes->GetFirstSelected();
|
long select = m_listCtrlPrimitives->GetFirstSelected();
|
||||||
|
|
||||||
if( select < 0 )
|
if( select < 0 )
|
||||||
return;
|
return;
|
||||||
|
@ -1758,14 +1758,14 @@ void DIALOG_PAD_PROPERTIES::onDeleteShape( wxCommandEvent& event )
|
||||||
std::vector<long> indexes;
|
std::vector<long> indexes;
|
||||||
indexes.push_back( select );
|
indexes.push_back( select );
|
||||||
|
|
||||||
while( ( select = m_listCtrlShapes->GetNextSelected( select ) ) >= 0 )
|
while( ( select = m_listCtrlPrimitives->GetNextSelected( select ) ) >= 0 )
|
||||||
indexes.push_back( select );
|
indexes.push_back( select );
|
||||||
|
|
||||||
// Erase all select shapes
|
// Erase all select shapes
|
||||||
for( unsigned ii = indexes.size(); ii > 0; --ii )
|
for( unsigned ii = indexes.size(); ii > 0; --ii )
|
||||||
m_primitives.erase( m_primitives.begin() + indexes[ii-1] );
|
m_primitives.erase( m_primitives.begin() + indexes[ii-1] );
|
||||||
|
|
||||||
displayBasicShapesList();
|
displayPrimitivesList();
|
||||||
|
|
||||||
if( m_canUpdate )
|
if( m_canUpdate )
|
||||||
{
|
{
|
||||||
|
@ -1775,7 +1775,7 @@ void DIALOG_PAD_PROPERTIES::onDeleteShape( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_PAD_PROPERTIES::onAddShape( wxCommandEvent& event )
|
void DIALOG_PAD_PROPERTIES::onAddPrimitive( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
// Ask user for shape type
|
// Ask user for shape type
|
||||||
wxString shapelist[] =
|
wxString shapelist[] =
|
||||||
|
@ -1791,26 +1791,26 @@ void DIALOG_PAD_PROPERTIES::onAddShape( wxCommandEvent& event )
|
||||||
S_SEGMENT, S_ARC, S_CIRCLE, S_POLYGON
|
S_SEGMENT, S_ARC, S_CIRCLE, S_POLYGON
|
||||||
};
|
};
|
||||||
|
|
||||||
PAD_CS_PRIMITIVE basicShape( listtype[type] );
|
PAD_CS_PRIMITIVE primitive( listtype[type] );
|
||||||
|
|
||||||
if( listtype[type] == S_POLYGON )
|
if( listtype[type] == S_POLYGON )
|
||||||
{
|
{
|
||||||
DIALOG_PAD_BASIC_SHP_POLY_PROPS dlg( this, &basicShape );
|
DIALOG_PAD_PRIMITIVE_POLY_PROPS dlg( this, &primitive );
|
||||||
|
|
||||||
if( dlg.ShowModal() != wxID_OK )
|
if( dlg.ShowModal() != wxID_OK )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DIALOG_PAD_BASICSHAPES_PROPERTIES dlg( this, &basicShape );
|
DIALOG_PAD_PRIMITIVES_PROPERTIES dlg( this, &primitive );
|
||||||
|
|
||||||
if( dlg.ShowModal() != wxID_OK )
|
if( dlg.ShowModal() != wxID_OK )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_primitives.push_back( basicShape );
|
m_primitives.push_back( primitive );
|
||||||
|
|
||||||
displayBasicShapesList();
|
displayPrimitivesList();
|
||||||
|
|
||||||
if( m_canUpdate )
|
if( m_canUpdate )
|
||||||
{
|
{
|
||||||
|
@ -1820,7 +1820,7 @@ void DIALOG_PAD_PROPERTIES::onAddShape( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_PAD_PROPERTIES::onImportShape( wxCommandEvent& event )
|
void DIALOG_PAD_PROPERTIES::onImportPrimitives( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
wxMessageBox( "Not yet available" );
|
wxMessageBox( "Not yet available" );
|
||||||
}
|
}
|
||||||
|
@ -1828,7 +1828,7 @@ void DIALOG_PAD_PROPERTIES::onImportShape( wxCommandEvent& event )
|
||||||
|
|
||||||
void DIALOG_PAD_PROPERTIES::onGeometryTransform( wxCommandEvent& event )
|
void DIALOG_PAD_PROPERTIES::onGeometryTransform( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
long select = m_listCtrlShapes->GetFirstSelected();
|
long select = m_listCtrlPrimitives->GetFirstSelected();
|
||||||
|
|
||||||
if( select < 0 )
|
if( select < 0 )
|
||||||
{
|
{
|
||||||
|
@ -1843,13 +1843,13 @@ void DIALOG_PAD_PROPERTIES::onGeometryTransform( wxCommandEvent& event )
|
||||||
std::vector<PAD_CS_PRIMITIVE*> shapeList;
|
std::vector<PAD_CS_PRIMITIVE*> shapeList;
|
||||||
shapeList.push_back( &m_primitives[select] );
|
shapeList.push_back( &m_primitives[select] );
|
||||||
|
|
||||||
while( ( select = m_listCtrlShapes->GetNextSelected( select ) ) >= 0 )
|
while( ( select = m_listCtrlPrimitives->GetNextSelected( select ) ) >= 0 )
|
||||||
{
|
{
|
||||||
indexes.push_back( select );
|
indexes.push_back( select );
|
||||||
shapeList.push_back( &m_primitives[select] );
|
shapeList.push_back( &m_primitives[select] );
|
||||||
}
|
}
|
||||||
|
|
||||||
DIALOG_PAD_BASICSHAPES_TRANSFORM dlg( this, shapeList );
|
DIALOG_PAD_PRIMITIVES_TRANSFORM dlg( this, shapeList );
|
||||||
|
|
||||||
if( dlg.ShowModal() != wxID_OK )
|
if( dlg.ShowModal() != wxID_OK )
|
||||||
return;
|
return;
|
||||||
|
@ -1857,7 +1857,7 @@ void DIALOG_PAD_PROPERTIES::onGeometryTransform( wxCommandEvent& event )
|
||||||
// Transfert new settings:
|
// Transfert new settings:
|
||||||
dlg.Transform();
|
dlg.Transform();
|
||||||
|
|
||||||
displayBasicShapesList();
|
displayPrimitivesList();
|
||||||
|
|
||||||
if( m_canUpdate )
|
if( m_canUpdate )
|
||||||
{
|
{
|
||||||
|
@ -1867,9 +1867,9 @@ void DIALOG_PAD_PROPERTIES::onGeometryTransform( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_PAD_PROPERTIES::onDuplicateShape( wxCommandEvent& event )
|
void DIALOG_PAD_PROPERTIES::onDuplicatePrimitive( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
long select = m_listCtrlShapes->GetFirstSelected();
|
long select = m_listCtrlPrimitives->GetFirstSelected();
|
||||||
|
|
||||||
if( select < 0 )
|
if( select < 0 )
|
||||||
{
|
{
|
||||||
|
@ -1884,13 +1884,13 @@ void DIALOG_PAD_PROPERTIES::onDuplicateShape( wxCommandEvent& event )
|
||||||
std::vector<PAD_CS_PRIMITIVE*> shapeList;
|
std::vector<PAD_CS_PRIMITIVE*> shapeList;
|
||||||
shapeList.push_back( &m_primitives[select] );
|
shapeList.push_back( &m_primitives[select] );
|
||||||
|
|
||||||
while( ( select = m_listCtrlShapes->GetNextSelected( select ) ) >= 0 )
|
while( ( select = m_listCtrlPrimitives->GetNextSelected( select ) ) >= 0 )
|
||||||
{
|
{
|
||||||
indexes.push_back( select );
|
indexes.push_back( select );
|
||||||
shapeList.push_back( &m_primitives[select] );
|
shapeList.push_back( &m_primitives[select] );
|
||||||
}
|
}
|
||||||
|
|
||||||
DIALOG_PAD_BASICSHAPES_TRANSFORM dlg( this, shapeList, true );
|
DIALOG_PAD_PRIMITIVES_TRANSFORM dlg( this, shapeList, true );
|
||||||
|
|
||||||
if( dlg.ShowModal() != wxID_OK )
|
if( dlg.ShowModal() != wxID_OK )
|
||||||
return;
|
return;
|
||||||
|
@ -1898,7 +1898,7 @@ void DIALOG_PAD_PROPERTIES::onDuplicateShape( wxCommandEvent& event )
|
||||||
// Transfert new settings:
|
// Transfert new settings:
|
||||||
dlg.Transform( &m_primitives, dlg.GetDuplicateCount() );
|
dlg.Transform( &m_primitives, dlg.GetDuplicateCount() );
|
||||||
|
|
||||||
displayBasicShapesList();
|
displayPrimitivesList();
|
||||||
|
|
||||||
if( m_canUpdate )
|
if( m_canUpdate )
|
||||||
{
|
{
|
||||||
|
|
|
@ -93,10 +93,10 @@ private:
|
||||||
private:
|
private:
|
||||||
void prepareCanvas(); // Initialize the canvases (legacy or gal) to display the pad
|
void prepareCanvas(); // Initialize the canvases (legacy or gal) to display the pad
|
||||||
void initValues();
|
void initValues();
|
||||||
void displayBasicShapesList();
|
void displayPrimitivesList();
|
||||||
bool padValuesOK(); ///< test if all values are acceptable for the pad
|
bool padValuesOK(); ///< test if all values are acceptable for the pad
|
||||||
void redraw();
|
void redraw();
|
||||||
void editBasicShape();
|
void editPrimitive();
|
||||||
void updateRoundRectCornerValues();
|
void updateRoundRectCornerValues();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -136,15 +136,15 @@ private:
|
||||||
bool TransferDataToWindow() override;
|
bool TransferDataToWindow() override;
|
||||||
|
|
||||||
/// Event handlers of basic shapes list panel
|
/// Event handlers of basic shapes list panel
|
||||||
void onDeleteShape( wxCommandEvent& event ) override;
|
void onDeletePrimitive( wxCommandEvent& event ) override;
|
||||||
void onEditShape( wxCommandEvent& event ) override;
|
void onEditPrimitive( wxCommandEvent& event ) override;
|
||||||
void onAddShape( wxCommandEvent& event ) override;
|
void onAddPrimitive( wxCommandEvent& event ) override;
|
||||||
void onImportShape( wxCommandEvent& event ) override;
|
void onImportPrimitives( wxCommandEvent& event ) override;
|
||||||
void onGeometryTransform( wxCommandEvent& event ) override;
|
void onGeometryTransform( wxCommandEvent& event ) override;
|
||||||
void onDuplicateShape( wxCommandEvent& event ) override;
|
void onDuplicatePrimitive( wxCommandEvent& event ) override;
|
||||||
|
|
||||||
/// Called on a double click on the basic shapes list
|
/// Called on a double click on the basic shapes list
|
||||||
void onCustomShapeDClick( wxMouseEvent& event ) override;
|
void onPrimitiveDClick( wxMouseEvent& event ) override;
|
||||||
/// Called on selection/deselection of a basic shape
|
/// Called on selection/deselection of a basic shape
|
||||||
void OnPrimitiveSelection( wxListEvent& event ) override;
|
void OnPrimitiveSelection( wxListEvent& event ) override;
|
||||||
};
|
};
|
||||||
|
@ -153,10 +153,10 @@ private:
|
||||||
* a dialog to edit basics shapes parameters.
|
* a dialog to edit basics shapes parameters.
|
||||||
* Polygonal shape is not handles by this dialog
|
* Polygonal shape is not handles by this dialog
|
||||||
*/
|
*/
|
||||||
class DIALOG_PAD_BASICSHAPES_PROPERTIES: public DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE
|
class DIALOG_PAD_PRIMITIVES_PROPERTIES: public DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DIALOG_PAD_BASICSHAPES_PROPERTIES( wxWindow* aParent, PAD_CS_PRIMITIVE * aShape );
|
DIALOG_PAD_PRIMITIVES_PROPERTIES( wxWindow* aParent, PAD_CS_PRIMITIVE * aShape );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function TransferDataFromWindow
|
* Function TransferDataFromWindow
|
||||||
|
@ -179,7 +179,7 @@ private:
|
||||||
/**
|
/**
|
||||||
* a dialog to edit basic polygonal shape parameters
|
* a dialog to edit basic polygonal shape parameters
|
||||||
*/
|
*/
|
||||||
class DIALOG_PAD_BASIC_SHP_POLY_PROPS: public DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE
|
class DIALOG_PAD_PRIMITIVE_POLY_PROPS: public DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE
|
||||||
{
|
{
|
||||||
// The basic shape currently edited
|
// The basic shape currently edited
|
||||||
PAD_CS_PRIMITIVE * m_shape;
|
PAD_CS_PRIMITIVE * m_shape;
|
||||||
|
@ -188,8 +188,8 @@ class DIALOG_PAD_BASIC_SHP_POLY_PROPS: public DIALOG_PAD_BASIC_SHP_POLY_PROPS_BA
|
||||||
PAD_CS_PRIMITIVE m_currshape;
|
PAD_CS_PRIMITIVE m_currshape;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DIALOG_PAD_BASIC_SHP_POLY_PROPS( wxWindow* aParent, PAD_CS_PRIMITIVE * aShape );
|
DIALOG_PAD_PRIMITIVE_POLY_PROPS( wxWindow* aParent, PAD_CS_PRIMITIVE * aShape );
|
||||||
~DIALOG_PAD_BASIC_SHP_POLY_PROPS();
|
~DIALOG_PAD_PRIMITIVE_POLY_PROPS();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function TransferDataFromWindow
|
* Function TransferDataFromWindow
|
||||||
|
@ -231,10 +231,10 @@ private:
|
||||||
* if aShowDuplicate == false, the parameter "Duplicate count" is disabled
|
* if aShowDuplicate == false, the parameter "Duplicate count" is disabled
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class DIALOG_PAD_BASICSHAPES_TRANSFORM : public DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE
|
class DIALOG_PAD_PRIMITIVES_TRANSFORM : public DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DIALOG_PAD_BASICSHAPES_TRANSFORM( wxWindow* aParent,
|
DIALOG_PAD_PRIMITIVES_TRANSFORM( wxWindow* aParent,
|
||||||
std::vector<PAD_CS_PRIMITIVE*>& aList, bool aShowDuplicate = false );
|
std::vector<PAD_CS_PRIMITIVE*>& aList, bool aShowDuplicate = false );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Aug 4 2017)
|
// C++ code generated with wxFormBuilder (version Jul 2 2017)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
@ -66,7 +66,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
|
||||||
wxString m_PadShapeChoices[] = { _("Circular"), _("Oval"), _("Rectangular"), _("Trapezoidal"), _("Rounded Rectangle"), _("Custom Shape with Circular Anchor"), _("Custom Shape with Rectangular Anchor") };
|
wxString m_PadShapeChoices[] = { _("Circular"), _("Oval"), _("Rectangular"), _("Trapezoidal"), _("Rounded Rectangle"), _("Custom Shape with Circular Anchor"), _("Custom Shape with Rectangular Anchor") };
|
||||||
int m_PadShapeNChoices = sizeof( m_PadShapeChoices ) / sizeof( wxString );
|
int m_PadShapeNChoices = sizeof( m_PadShapeChoices ) / sizeof( wxString );
|
||||||
m_PadShape = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PadShapeNChoices, m_PadShapeChoices, 0 );
|
m_PadShape = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PadShapeNChoices, m_PadShapeChoices, 0 );
|
||||||
m_PadShape->SetSelection( 6 );
|
m_PadShape->SetSelection( 0 );
|
||||||
fgSizerPadType->Add( m_PadShape, 0, wxALL|wxEXPAND, 5 );
|
fgSizerPadType->Add( m_PadShape, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
@ -562,23 +562,23 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
|
||||||
m_localSettingsPanel->Layout();
|
m_localSettingsPanel->Layout();
|
||||||
bSizerPanelClearance->Fit( m_localSettingsPanel );
|
bSizerPanelClearance->Fit( m_localSettingsPanel );
|
||||||
m_notebook->AddPage( m_localSettingsPanel, _("Local Clearance and Settings"), false );
|
m_notebook->AddPage( m_localSettingsPanel, _("Local Clearance and Settings"), false );
|
||||||
m_panelCustomShape = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
m_panelCustomShapePrimitives = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||||
m_bSizerPanelShapes = new wxBoxSizer( wxVERTICAL );
|
m_bSizerPanelPrimitives = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_staticTextShapesList = new wxStaticText( m_panelCustomShape, wxID_ANY, _("Primitives list"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticTextPrimitivesList = new wxStaticText( m_panelCustomShapePrimitives, wxID_ANY, _("Primitives list"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticTextShapesList->Wrap( -1 );
|
m_staticTextPrimitivesList->Wrap( -1 );
|
||||||
m_staticTextShapesList->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
m_staticTextPrimitivesList->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||||
|
|
||||||
m_bSizerPanelShapes->Add( m_staticTextShapesList, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
m_bSizerPanelPrimitives->Add( m_staticTextPrimitivesList, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||||
|
|
||||||
m_staticTextShapesListWraning = new wxStaticText( m_panelCustomShape, wxID_ANY, _(" Coordinates are relative to anchor pad, orientation 0"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticTextPrimitiveListWarning = new wxStaticText( m_panelCustomShapePrimitives, wxID_ANY, _(" Coordinates are relative to anchor pad, orientation 0"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticTextShapesListWraning->Wrap( -1 );
|
m_staticTextPrimitiveListWarning->Wrap( -1 );
|
||||||
m_staticTextShapesListWraning->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
m_staticTextPrimitiveListWarning->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||||
|
|
||||||
m_bSizerPanelShapes->Add( m_staticTextShapesListWraning, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
m_bSizerPanelPrimitives->Add( m_staticTextPrimitiveListWarning, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||||
|
|
||||||
m_listCtrlShapes = new wxListView( m_panelCustomShape, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_NO_HEADER|wxLC_REPORT );
|
m_listCtrlPrimitives = new wxListView( m_panelCustomShapePrimitives, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_NO_HEADER|wxLC_REPORT );
|
||||||
m_bSizerPanelShapes->Add( m_listCtrlShapes, 1, wxALL|wxEXPAND, 5 );
|
m_bSizerPanelPrimitives->Add( m_listCtrlPrimitives, 1, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
wxBoxSizer* bSizerButtons;
|
wxBoxSizer* bSizerButtons;
|
||||||
bSizerButtons = new wxBoxSizer( wxVERTICAL );
|
bSizerButtons = new wxBoxSizer( wxVERTICAL );
|
||||||
|
@ -586,16 +586,16 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
|
||||||
wxBoxSizer* bSizerButtonsUpper;
|
wxBoxSizer* bSizerButtonsUpper;
|
||||||
bSizerButtonsUpper = new wxBoxSizer( wxHORIZONTAL );
|
bSizerButtonsUpper = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
m_buttonDel = new wxButton( m_panelCustomShape, wxID_ANY, _("Delete Shape"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_buttonDel = new wxButton( m_panelCustomShapePrimitives, wxID_ANY, _("Delete Primitive"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizerButtonsUpper->Add( m_buttonDel, 0, wxALL, 5 );
|
bSizerButtonsUpper->Add( m_buttonDel, 0, wxALL, 5 );
|
||||||
|
|
||||||
m_buttonEditShape = new wxButton( m_panelCustomShape, wxID_ANY, _("Edit Shape"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_buttonEditShape = new wxButton( m_panelCustomShapePrimitives, wxID_ANY, _("Edit Primitive"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizerButtonsUpper->Add( m_buttonEditShape, 0, wxALL, 5 );
|
bSizerButtonsUpper->Add( m_buttonEditShape, 0, wxALL, 5 );
|
||||||
|
|
||||||
m_buttonAddShape = new wxButton( m_panelCustomShape, wxID_ANY, _("Add Shape"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_buttonAddShape = new wxButton( m_panelCustomShapePrimitives, wxID_ANY, _("Add Primitive"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizerButtonsUpper->Add( m_buttonAddShape, 0, wxALL, 5 );
|
bSizerButtonsUpper->Add( m_buttonAddShape, 0, wxALL, 5 );
|
||||||
|
|
||||||
m_buttonDup = new wxButton( m_panelCustomShape, wxID_ANY, _("Duplicate Shape"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_buttonDup = new wxButton( m_panelCustomShapePrimitives, wxID_ANY, _("Duplicate Primitive"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizerButtonsUpper->Add( m_buttonDup, 0, wxALL, 5 );
|
bSizerButtonsUpper->Add( m_buttonDup, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
@ -604,23 +604,23 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
|
||||||
wxBoxSizer* bSizerButtonsLower;
|
wxBoxSizer* bSizerButtonsLower;
|
||||||
bSizerButtonsLower = new wxBoxSizer( wxHORIZONTAL );
|
bSizerButtonsLower = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
m_buttonGeometry = new wxButton( m_panelCustomShape, wxID_ANY, _("Geometry Transform"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_buttonGeometry = new wxButton( m_panelCustomShapePrimitives, wxID_ANY, _("Geometry Transform"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizerButtonsLower->Add( m_buttonGeometry, 0, wxALL, 5 );
|
bSizerButtonsLower->Add( m_buttonGeometry, 0, wxALL, 5 );
|
||||||
|
|
||||||
m_buttonImport = new wxButton( m_panelCustomShape, wxID_ANY, _("Import Shapes"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_buttonImport = new wxButton( m_panelCustomShapePrimitives, wxID_ANY, _("Import Primitives"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizerButtonsLower->Add( m_buttonImport, 0, wxALL, 5 );
|
bSizerButtonsLower->Add( m_buttonImport, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizerButtons->Add( bSizerButtonsLower, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
|
bSizerButtons->Add( bSizerButtonsLower, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||||
|
|
||||||
|
|
||||||
m_bSizerPanelShapes->Add( bSizerButtons, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
|
m_bSizerPanelPrimitives->Add( bSizerButtons, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||||
|
|
||||||
|
|
||||||
m_panelCustomShape->SetSizer( m_bSizerPanelShapes );
|
m_panelCustomShapePrimitives->SetSizer( m_bSizerPanelPrimitives );
|
||||||
m_panelCustomShape->Layout();
|
m_panelCustomShapePrimitives->Layout();
|
||||||
m_bSizerPanelShapes->Fit( m_panelCustomShape );
|
m_bSizerPanelPrimitives->Fit( m_panelCustomShapePrimitives );
|
||||||
m_notebook->AddPage( m_panelCustomShape, _("Custom Shape"), false );
|
m_notebook->AddPage( m_panelCustomShapePrimitives, _("Custom Shape Primitives"), false );
|
||||||
|
|
||||||
bSizerUpper->Add( m_notebook, 0, wxALL|wxEXPAND, 5 );
|
bSizerUpper->Add( m_notebook, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
@ -694,15 +694,15 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
|
||||||
m_PadLayerECO1->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
|
m_PadLayerECO1->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
|
||||||
m_PadLayerECO2->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
|
m_PadLayerECO2->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
|
||||||
m_NetClearanceValueCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
|
m_NetClearanceValueCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
|
||||||
m_listCtrlShapes->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_PAD_PROPERTIES_BASE::onCustomShapeDClick ), NULL, this );
|
m_listCtrlPrimitives->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_PAD_PROPERTIES_BASE::onPrimitiveDClick ), NULL, this );
|
||||||
m_listCtrlShapes->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPrimitiveSelection ), NULL, this );
|
m_listCtrlPrimitives->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPrimitiveSelection ), NULL, this );
|
||||||
m_listCtrlShapes->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPrimitiveSelection ), NULL, this );
|
m_listCtrlPrimitives->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPrimitiveSelection ), NULL, this );
|
||||||
m_buttonDel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onDeleteShape ), NULL, this );
|
m_buttonDel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onDeletePrimitive ), NULL, this );
|
||||||
m_buttonEditShape->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onEditShape ), NULL, this );
|
m_buttonEditShape->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onEditPrimitive ), NULL, this );
|
||||||
m_buttonAddShape->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onAddShape ), NULL, this );
|
m_buttonAddShape->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onAddPrimitive ), NULL, this );
|
||||||
m_buttonDup->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onDuplicateShape ), NULL, this );
|
m_buttonDup->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onDuplicatePrimitive ), NULL, this );
|
||||||
m_buttonGeometry->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onGeometryTransform ), NULL, this );
|
m_buttonGeometry->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onGeometryTransform ), NULL, this );
|
||||||
m_buttonImport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onImportShape ), NULL, this );
|
m_buttonImport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onImportPrimitives ), NULL, this );
|
||||||
m_panelShowPad->Connect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPaintShowPanel ), NULL, this );
|
m_panelShowPad->Connect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPaintShowPanel ), NULL, this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -739,20 +739,20 @@ DIALOG_PAD_PROPERTIES_BASE::~DIALOG_PAD_PROPERTIES_BASE()
|
||||||
m_PadLayerECO1->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
|
m_PadLayerECO1->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
|
||||||
m_PadLayerECO2->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
|
m_PadLayerECO2->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
|
||||||
m_NetClearanceValueCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
|
m_NetClearanceValueCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
|
||||||
m_listCtrlShapes->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_PAD_PROPERTIES_BASE::onCustomShapeDClick ), NULL, this );
|
m_listCtrlPrimitives->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_PAD_PROPERTIES_BASE::onPrimitiveDClick ), NULL, this );
|
||||||
m_listCtrlShapes->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPrimitiveSelection ), NULL, this );
|
m_listCtrlPrimitives->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPrimitiveSelection ), NULL, this );
|
||||||
m_listCtrlShapes->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPrimitiveSelection ), NULL, this );
|
m_listCtrlPrimitives->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPrimitiveSelection ), NULL, this );
|
||||||
m_buttonDel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onDeleteShape ), NULL, this );
|
m_buttonDel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onDeletePrimitive ), NULL, this );
|
||||||
m_buttonEditShape->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onEditShape ), NULL, this );
|
m_buttonEditShape->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onEditPrimitive ), NULL, this );
|
||||||
m_buttonAddShape->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onAddShape ), NULL, this );
|
m_buttonAddShape->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onAddPrimitive ), NULL, this );
|
||||||
m_buttonDup->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onDuplicateShape ), NULL, this );
|
m_buttonDup->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onDuplicatePrimitive ), NULL, this );
|
||||||
m_buttonGeometry->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onGeometryTransform ), NULL, this );
|
m_buttonGeometry->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onGeometryTransform ), NULL, this );
|
||||||
m_buttonImport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onImportShape ), NULL, this );
|
m_buttonImport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onImportPrimitives ), NULL, this );
|
||||||
m_panelShowPad->Disconnect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPaintShowPanel ), NULL, this );
|
m_panelShowPad->Disconnect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPaintShowPanel ), NULL, this );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE::DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE::DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||||
{
|
{
|
||||||
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
||||||
|
|
||||||
|
@ -878,11 +878,11 @@ DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE::DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE(
|
||||||
this->Centre( wxBOTH );
|
this->Centre( wxBOTH );
|
||||||
}
|
}
|
||||||
|
|
||||||
DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE::~DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE()
|
DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE::~DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE::DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE::DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||||
{
|
{
|
||||||
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
||||||
|
|
||||||
|
@ -998,22 +998,22 @@ DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE::DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE( wx
|
||||||
this->Centre( wxBOTH );
|
this->Centre( wxBOTH );
|
||||||
}
|
}
|
||||||
|
|
||||||
DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE::~DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE()
|
DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE::~DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||||
{
|
{
|
||||||
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
||||||
|
|
||||||
wxBoxSizer* bSizerMain;
|
wxBoxSizer* bSizerMain;
|
||||||
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_staticTextShapesListWarning = new wxStaticText( this, wxID_ANY, _(" Coordinates are relative to anchor pad, orientation 0"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticTextCornerListWarning = new wxStaticText( this, wxID_ANY, _(" Coordinates are relative to anchor pad, orientation 0"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticTextShapesListWarning->Wrap( -1 );
|
m_staticTextCornerListWarning->Wrap( -1 );
|
||||||
m_staticTextShapesListWarning->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
m_staticTextCornerListWarning->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||||
|
|
||||||
bSizerMain->Add( m_staticTextShapesListWarning, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
bSizerMain->Add( m_staticTextCornerListWarning, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||||
|
|
||||||
m_staticTextValidate = new wxStaticText( this, wxID_ANY, _("Incorrect polygon"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticTextValidate = new wxStaticText( this, wxID_ANY, _("Incorrect polygon"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticTextValidate->Wrap( -1 );
|
m_staticTextValidate->Wrap( -1 );
|
||||||
|
@ -1132,22 +1132,22 @@ DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE( wxWi
|
||||||
this->Centre( wxBOTH );
|
this->Centre( wxBOTH );
|
||||||
|
|
||||||
// Connect Events
|
// Connect Events
|
||||||
m_gridCornersList->Connect( wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onGridSelect ), NULL, this );
|
m_gridCornersList->Connect( wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onGridSelect ), NULL, this );
|
||||||
m_gridCornersList->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onCellSelect ), NULL, this );
|
m_gridCornersList->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onCellSelect ), NULL, this );
|
||||||
m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onButtonAdd ), NULL, this );
|
m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onButtonAdd ), NULL, this );
|
||||||
m_buttonDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::OnButtonDelete ), NULL, this );
|
m_buttonDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::OnButtonDelete ), NULL, this );
|
||||||
m_panelPoly->Connect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onPaintPolyPanel ), NULL, this );
|
m_panelPoly->Connect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onPaintPolyPanel ), NULL, this );
|
||||||
m_panelPoly->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onPolyPanelResize ), NULL, this );
|
m_panelPoly->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onPolyPanelResize ), NULL, this );
|
||||||
}
|
}
|
||||||
|
|
||||||
DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::~DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE()
|
DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::~DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE()
|
||||||
{
|
{
|
||||||
// Disconnect Events
|
// Disconnect Events
|
||||||
m_gridCornersList->Disconnect( wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onGridSelect ), NULL, this );
|
m_gridCornersList->Disconnect( wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onGridSelect ), NULL, this );
|
||||||
m_gridCornersList->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onCellSelect ), NULL, this );
|
m_gridCornersList->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onCellSelect ), NULL, this );
|
||||||
m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onButtonAdd ), NULL, this );
|
m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onButtonAdd ), NULL, this );
|
||||||
m_buttonDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::OnButtonDelete ), NULL, this );
|
m_buttonDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::OnButtonDelete ), NULL, this );
|
||||||
m_panelPoly->Disconnect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onPaintPolyPanel ), NULL, this );
|
m_panelPoly->Disconnect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onPaintPolyPanel ), NULL, this );
|
||||||
m_panelPoly->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onPolyPanelResize ), NULL, this );
|
m_panelPoly->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onPolyPanelResize ), NULL, this );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -942,7 +942,7 @@
|
||||||
<property name="pin_button">1</property>
|
<property name="pin_button">1</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="resize">Resizable</property>
|
<property name="resize">Resizable</property>
|
||||||
<property name="selection">6</property>
|
<property name="selection">0</property>
|
||||||
<property name="show">1</property>
|
<property name="show">1</property>
|
||||||
<property name="size"></property>
|
<property name="size"></property>
|
||||||
<property name="style"></property>
|
<property name="style"></property>
|
||||||
|
@ -9183,7 +9183,7 @@
|
||||||
</object>
|
</object>
|
||||||
<object class="notebookpage" expanded="1">
|
<object class="notebookpage" expanded="1">
|
||||||
<property name="bitmap"></property>
|
<property name="bitmap"></property>
|
||||||
<property name="label">Custom Shape</property>
|
<property name="label">Custom Shape Primitives</property>
|
||||||
<property name="select">0</property>
|
<property name="select">0</property>
|
||||||
<object class="wxPanel" expanded="1">
|
<object class="wxPanel" expanded="1">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
|
@ -9220,7 +9220,7 @@
|
||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="moveable">1</property>
|
<property name="moveable">1</property>
|
||||||
<property name="name">m_panelCustomShape</property>
|
<property name="name">m_panelCustomShapePrimitives</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="pane_border">1</property>
|
||||||
<property name="pane_position"></property>
|
<property name="pane_position"></property>
|
||||||
<property name="pane_size"></property>
|
<property name="pane_size"></property>
|
||||||
|
@ -9261,7 +9261,7 @@
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
<object class="wxBoxSizer" expanded="1">
|
<object class="wxBoxSizer" expanded="1">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">m_bSizerPanelShapes</property>
|
<property name="name">m_bSizerPanelPrimitives</property>
|
||||||
<property name="orient">wxVERTICAL</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
<object class="sizeritem" expanded="0">
|
<object class="sizeritem" expanded="0">
|
||||||
|
@ -9304,7 +9304,7 @@
|
||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="moveable">1</property>
|
<property name="moveable">1</property>
|
||||||
<property name="name">m_staticTextShapesList</property>
|
<property name="name">m_staticTextPrimitivesList</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="pane_border">1</property>
|
||||||
<property name="pane_position"></property>
|
<property name="pane_position"></property>
|
||||||
<property name="pane_size"></property>
|
<property name="pane_size"></property>
|
||||||
|
@ -9387,7 +9387,7 @@
|
||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="moveable">1</property>
|
<property name="moveable">1</property>
|
||||||
<property name="name">m_staticTextShapesListWraning</property>
|
<property name="name">m_staticTextPrimitiveListWarning</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="pane_border">1</property>
|
||||||
<property name="pane_position"></property>
|
<property name="pane_position"></property>
|
||||||
<property name="pane_size"></property>
|
<property name="pane_size"></property>
|
||||||
|
@ -9469,7 +9469,7 @@
|
||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="moveable">1</property>
|
<property name="moveable">1</property>
|
||||||
<property name="name">m_listCtrlShapes</property>
|
<property name="name">m_listCtrlPrimitives</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="pane_border">1</property>
|
||||||
<property name="pane_position"></property>
|
<property name="pane_position"></property>
|
||||||
<property name="pane_size"></property>
|
<property name="pane_size"></property>
|
||||||
|
@ -9497,7 +9497,7 @@
|
||||||
<event name="OnKeyUp"></event>
|
<event name="OnKeyUp"></event>
|
||||||
<event name="OnKillFocus"></event>
|
<event name="OnKillFocus"></event>
|
||||||
<event name="OnLeaveWindow"></event>
|
<event name="OnLeaveWindow"></event>
|
||||||
<event name="OnLeftDClick">onCustomShapeDClick</event>
|
<event name="OnLeftDClick">onPrimitiveDClick</event>
|
||||||
<event name="OnLeftDown"></event>
|
<event name="OnLeftDown"></event>
|
||||||
<event name="OnLeftUp"></event>
|
<event name="OnLeftUp"></event>
|
||||||
<event name="OnListBeginDrag"></event>
|
<event name="OnListBeginDrag"></event>
|
||||||
|
@ -9586,7 +9586,7 @@
|
||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">Delete Shape</property>
|
<property name="label">Delete Primitive</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
|
@ -9615,7 +9615,7 @@
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
<event name="OnButtonClick">onDeleteShape</event>
|
<event name="OnButtonClick">onDeletePrimitive</event>
|
||||||
<event name="OnChar"></event>
|
<event name="OnChar"></event>
|
||||||
<event name="OnEnterWindow"></event>
|
<event name="OnEnterWindow"></event>
|
||||||
<event name="OnEraseBackground"></event>
|
<event name="OnEraseBackground"></event>
|
||||||
|
@ -9674,7 +9674,7 @@
|
||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">Edit Shape</property>
|
<property name="label">Edit Primitive</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
|
@ -9703,7 +9703,7 @@
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
<event name="OnButtonClick">onEditShape</event>
|
<event name="OnButtonClick">onEditPrimitive</event>
|
||||||
<event name="OnChar"></event>
|
<event name="OnChar"></event>
|
||||||
<event name="OnEnterWindow"></event>
|
<event name="OnEnterWindow"></event>
|
||||||
<event name="OnEraseBackground"></event>
|
<event name="OnEraseBackground"></event>
|
||||||
|
@ -9762,7 +9762,7 @@
|
||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">Add Shape</property>
|
<property name="label">Add Primitive</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
|
@ -9791,7 +9791,7 @@
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
<event name="OnButtonClick">onAddShape</event>
|
<event name="OnButtonClick">onAddPrimitive</event>
|
||||||
<event name="OnChar"></event>
|
<event name="OnChar"></event>
|
||||||
<event name="OnEnterWindow"></event>
|
<event name="OnEnterWindow"></event>
|
||||||
<event name="OnEraseBackground"></event>
|
<event name="OnEraseBackground"></event>
|
||||||
|
@ -9850,7 +9850,7 @@
|
||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">Duplicate Shape</property>
|
<property name="label">Duplicate Primitive</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
|
@ -9879,7 +9879,7 @@
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
<event name="OnButtonClick">onDuplicateShape</event>
|
<event name="OnButtonClick">onDuplicatePrimitive</event>
|
||||||
<event name="OnChar"></event>
|
<event name="OnChar"></event>
|
||||||
<event name="OnEnterWindow"></event>
|
<event name="OnEnterWindow"></event>
|
||||||
<event name="OnEraseBackground"></event>
|
<event name="OnEraseBackground"></event>
|
||||||
|
@ -10037,7 +10037,7 @@
|
||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">Import Shapes</property>
|
<property name="label">Import Primitives</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
|
@ -10066,7 +10066,7 @@
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
<event name="OnButtonClick">onImportShape</event>
|
<event name="OnButtonClick">onImportPrimitives</event>
|
||||||
<event name="OnChar"></event>
|
<event name="OnChar"></event>
|
||||||
<event name="OnEnterWindow"></event>
|
<event name="OnEnterWindow"></event>
|
||||||
<event name="OnEraseBackground"></event>
|
<event name="OnEraseBackground"></event>
|
||||||
|
@ -10406,7 +10406,7 @@
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE</property>
|
<property name="name">DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="size">561,243</property>
|
<property name="size">561,243</property>
|
||||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||||
|
@ -12285,7 +12285,7 @@
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE</property>
|
<property name="name">DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="size">472,208</property>
|
<property name="size">472,208</property>
|
||||||
<property name="style">wxDEFAULT_DIALOG_STYLE</property>
|
<property name="style">wxDEFAULT_DIALOG_STYLE</property>
|
||||||
|
@ -13705,7 +13705,7 @@
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE</property>
|
<property name="name">DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="size">503,396</property>
|
<property name="size">503,396</property>
|
||||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||||
|
@ -13796,7 +13796,7 @@
|
||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="moveable">1</property>
|
<property name="moveable">1</property>
|
||||||
<property name="name">m_staticTextShapesListWarning</property>
|
<property name="name">m_staticTextCornerListWarning</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="pane_border">1</property>
|
||||||
<property name="pane_position"></property>
|
<property name="pane_position"></property>
|
||||||
<property name="pane_size"></property>
|
<property name="pane_size"></property>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Aug 4 2017)
|
// C++ code generated with wxFormBuilder (version Jul 2 2017)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
@ -161,11 +161,11 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM
|
||||||
wxStaticText* m_staticTextcps;
|
wxStaticText* m_staticTextcps;
|
||||||
wxChoice* m_ZoneCustomPadShape;
|
wxChoice* m_ZoneCustomPadShape;
|
||||||
wxStaticText* m_staticTextWarning;
|
wxStaticText* m_staticTextWarning;
|
||||||
wxPanel* m_panelCustomShape;
|
wxPanel* m_panelCustomShapePrimitives;
|
||||||
wxBoxSizer* m_bSizerPanelShapes;
|
wxBoxSizer* m_bSizerPanelPrimitives;
|
||||||
wxStaticText* m_staticTextShapesList;
|
wxStaticText* m_staticTextPrimitivesList;
|
||||||
wxStaticText* m_staticTextShapesListWraning;
|
wxStaticText* m_staticTextPrimitiveListWarning;
|
||||||
wxListView* m_listCtrlShapes;
|
wxListView* m_listCtrlPrimitives;
|
||||||
wxButton* m_buttonDel;
|
wxButton* m_buttonDel;
|
||||||
wxButton* m_buttonEditShape;
|
wxButton* m_buttonEditShape;
|
||||||
wxButton* m_buttonAddShape;
|
wxButton* m_buttonAddShape;
|
||||||
|
@ -189,14 +189,14 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM
|
||||||
virtual void OnSetLayers( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnSetLayers( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void onCornerSizePercentChange( wxCommandEvent& event ) { event.Skip(); }
|
virtual void onCornerSizePercentChange( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnDrillShapeSelected( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnDrillShapeSelected( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void onCustomShapeDClick( wxMouseEvent& event ) { event.Skip(); }
|
virtual void onPrimitiveDClick( wxMouseEvent& event ) { event.Skip(); }
|
||||||
virtual void OnPrimitiveSelection( wxListEvent& event ) { event.Skip(); }
|
virtual void OnPrimitiveSelection( wxListEvent& event ) { event.Skip(); }
|
||||||
virtual void onDeleteShape( wxCommandEvent& event ) { event.Skip(); }
|
virtual void onDeletePrimitive( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void onEditShape( wxCommandEvent& event ) { event.Skip(); }
|
virtual void onEditPrimitive( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void onAddShape( wxCommandEvent& event ) { event.Skip(); }
|
virtual void onAddPrimitive( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void onDuplicateShape( wxCommandEvent& event ) { event.Skip(); }
|
virtual void onDuplicatePrimitive( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void onGeometryTransform( wxCommandEvent& event ) { event.Skip(); }
|
virtual void onGeometryTransform( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void onImportShape( wxCommandEvent& event ) { event.Skip(); }
|
virtual void onImportPrimitives( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnPaintShowPanel( wxPaintEvent& event ) { event.Skip(); }
|
virtual void OnPaintShowPanel( wxPaintEvent& event ) { event.Skip(); }
|
||||||
|
|
||||||
|
|
||||||
|
@ -208,9 +208,9 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM
|
||||||
};
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
/// Class DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE
|
/// Class DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
class DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE : public DIALOG_SHIM
|
class DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE : public DIALOG_SHIM
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -241,15 +241,15 @@ class DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE : public DIALOG_SHIM
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 561,243 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 561,243 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||||
~DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE();
|
~DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
/// Class DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE
|
/// Class DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
class DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE : public DIALOG_SHIM
|
class DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE : public DIALOG_SHIM
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -274,20 +274,20 @@ class DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE : public DIALOG_SHIM
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pad Custom Shape Geometry Transform"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 472,208 ), long style = wxDEFAULT_DIALOG_STYLE );
|
DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pad Custom Shape Geometry Transform"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 472,208 ), long style = wxDEFAULT_DIALOG_STYLE );
|
||||||
~DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE();
|
~DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
/// Class DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE
|
/// Class DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
class DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE : public DIALOG_SHIM
|
class DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE : public DIALOG_SHIM
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxStaticText* m_staticTextShapesListWarning;
|
wxStaticText* m_staticTextCornerListWarning;
|
||||||
wxStaticText* m_staticTextValidate;
|
wxStaticText* m_staticTextValidate;
|
||||||
wxGrid* m_gridCornersList;
|
wxGrid* m_gridCornersList;
|
||||||
wxButton* m_buttonAdd;
|
wxButton* m_buttonAdd;
|
||||||
|
@ -313,8 +313,8 @@ class DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE : public DIALOG_SHIM
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Basic Shape Polygon"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 503,396 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Basic Shape Polygon"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 503,396 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||||
~DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE();
|
~DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -708,7 +708,7 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad )
|
||||||
// The reference pad can be rotated. calculate the rotated
|
// The reference pad can be rotated. calculate the rotated
|
||||||
// coordiantes ( note, the ref pad position is the origin of
|
// coordiantes ( note, the ref pad position is the origin of
|
||||||
// coordinates for this drc test)
|
// coordinates for this drc test)
|
||||||
aRefPad->BasicShapesAsPolygonToBoardPosition( &polysetref,
|
aRefPad->CustomShapeAsPolygonToBoardPosition( &polysetref,
|
||||||
wxPoint( 0, 0 ), aRefPad->GetOrientation() );
|
wxPoint( 0, 0 ), aRefPad->GetOrientation() );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -738,7 +738,7 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad )
|
||||||
// The pad to compare can be rotated. calculate the rotated
|
// The pad to compare can be rotated. calculate the rotated
|
||||||
// coordinattes ( note, the pad to compare position
|
// coordinattes ( note, the pad to compare position
|
||||||
// is the relativePadPos for this drc test
|
// is the relativePadPos for this drc test
|
||||||
aPad->BasicShapesAsPolygonToBoardPosition( &polysetcompare,
|
aPad->CustomShapeAsPolygonToBoardPosition( &polysetcompare,
|
||||||
relativePadPos, aPad->GetOrientation() );
|
relativePadPos, aPad->GetOrientation() );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1079,7 +1079,7 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* aPad, int aSegmentWidth, int aMi
|
||||||
// relatives to the segment being tested
|
// relatives to the segment being tested
|
||||||
// Note, the pad position relative to the segment origin
|
// Note, the pad position relative to the segment origin
|
||||||
// is m_padToTestPos
|
// is m_padToTestPos
|
||||||
aPad->BasicShapesAsPolygonToBoardPosition( &polyset,
|
aPad->CustomShapeAsPolygonToBoardPosition( &polyset,
|
||||||
m_padToTestPos, orient );
|
m_padToTestPos, orient );
|
||||||
|
|
||||||
// Rotate all coordinates by m_segmAngle, because the segment orient
|
// Rotate all coordinates by m_segmAngle, because the segment orient
|
||||||
|
@ -1088,7 +1088,7 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* aPad, int aSegmentWidth, int aMi
|
||||||
// only the lenght and orientation+ of the segment
|
// only the lenght and orientation+ of the segment
|
||||||
// therefore all coordinates of the pad to test must be rotated by
|
// therefore all coordinates of the pad to test must be rotated by
|
||||||
// m_segmAngle (they are already relative to the segment origin)
|
// m_segmAngle (they are already relative to the segment origin)
|
||||||
aPad->BasicShapesAsPolygonToBoardPosition( &polyset,
|
aPad->CustomShapeAsPolygonToBoardPosition( &polyset,
|
||||||
wxPoint( 0, 0 ), m_segmAngle );
|
wxPoint( 0, 0 ), m_segmAngle );
|
||||||
|
|
||||||
const SHAPE_LINE_CHAIN& refpoly = polyset.COutline( 0 );
|
const SHAPE_LINE_CHAIN& refpoly = polyset.COutline( 0 );
|
||||||
|
|
|
@ -1376,11 +1376,11 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const
|
||||||
int nested_level = aNestLevel+2;
|
int nested_level = aNestLevel+2;
|
||||||
|
|
||||||
// Output all basic shapes
|
// Output all basic shapes
|
||||||
for( unsigned icnt = 0; icnt < aPad->GetBasicShapes().size(); ++icnt )
|
for( unsigned icnt = 0; icnt < aPad->GetPrimitives().size(); ++icnt )
|
||||||
{
|
{
|
||||||
m_out->Print( 0, "\n");
|
m_out->Print( 0, "\n");
|
||||||
|
|
||||||
const PAD_CS_PRIMITIVE& primitive = aPad->GetBasicShapes()[icnt];
|
const PAD_CS_PRIMITIVE& primitive = aPad->GetPrimitives()[icnt];
|
||||||
|
|
||||||
switch( primitive.m_Shape )
|
switch( primitive.m_Shape )
|
||||||
{
|
{
|
||||||
|
|
|
@ -364,7 +364,7 @@ MODULE* PCB_EDIT_FRAME::Create_MuWaveComponent( int shape_type )
|
||||||
// Close the polygon:
|
// Close the polygon:
|
||||||
polyPoints.push_back( polyPoints[0] );
|
polyPoints.push_back( polyPoints[0] );
|
||||||
|
|
||||||
pad->AddBasicShape( polyPoints, 0 ); // add a polygonal basic shape
|
pad->AddPrimitive( polyPoints, 0 ); // add a polygonal basic shape
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -73,9 +73,9 @@ void PCB_BASE_FRAME::Import_Pad_Settings( D_PAD* aPad, bool aDraw )
|
||||||
|
|
||||||
aPad->ImportSettingsFromMaster( mp );
|
aPad->ImportSettingsFromMaster( mp );
|
||||||
|
|
||||||
aPad->SetBasicShapes( mp.GetBasicShapes() );
|
aPad->SetPrimitives( mp.GetPrimitives() );
|
||||||
aPad->SetAnchorPadShape( mp.GetAnchorPadShape() );
|
aPad->SetAnchorPadShape( mp.GetAnchorPadShape() );
|
||||||
aPad->MergeBasicShapesAsPolygon();
|
aPad->MergePrimitivesAsPolygon();
|
||||||
|
|
||||||
if( aDraw )
|
if( aDraw )
|
||||||
m_canvas->RefreshDrawingRect( aPad->GetBoundingBox() );
|
m_canvas->RefreshDrawingRect( aPad->GetBoundingBox() );
|
||||||
|
|
|
@ -2504,25 +2504,25 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent )
|
||||||
{
|
{
|
||||||
case T_gr_arc:
|
case T_gr_arc:
|
||||||
dummysegm = parseDRAWSEGMENT();
|
dummysegm = parseDRAWSEGMENT();
|
||||||
pad->AddBasicShape( dummysegm->GetCenter(), dummysegm->GetArcStart(),
|
pad->AddPrimitive( dummysegm->GetCenter(), dummysegm->GetArcStart(),
|
||||||
dummysegm->GetAngle(), dummysegm->GetWidth() );
|
dummysegm->GetAngle(), dummysegm->GetWidth() );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_gr_line:
|
case T_gr_line:
|
||||||
dummysegm = parseDRAWSEGMENT();
|
dummysegm = parseDRAWSEGMENT();
|
||||||
pad->AddBasicShape( dummysegm->GetStart(), dummysegm->GetEnd(),
|
pad->AddPrimitive( dummysegm->GetStart(), dummysegm->GetEnd(),
|
||||||
dummysegm->GetWidth() );
|
dummysegm->GetWidth() );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_gr_circle:
|
case T_gr_circle:
|
||||||
dummysegm = parseDRAWSEGMENT();
|
dummysegm = parseDRAWSEGMENT();
|
||||||
pad->AddBasicShape( dummysegm->GetCenter(), dummysegm->GetRadius(),
|
pad->AddPrimitive( dummysegm->GetCenter(), dummysegm->GetRadius(),
|
||||||
dummysegm->GetWidth() );
|
dummysegm->GetWidth() );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_gr_poly:
|
case T_gr_poly:
|
||||||
dummysegm = parseDRAWSEGMENT();
|
dummysegm = parseDRAWSEGMENT();
|
||||||
pad->AddBasicShape( dummysegm->GetPolyPoints(), dummysegm->GetWidth() );
|
pad->AddPrimitive( dummysegm->GetPolyPoints(), dummysegm->GetWidth() );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -2543,7 +2543,7 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent )
|
||||||
|
|
||||||
// Be sure the custom shape polygon is built:
|
// Be sure the custom shape polygon is built:
|
||||||
if( pad->GetShape() == PAD_SHAPE_CUSTOM )
|
if( pad->GetShape() == PAD_SHAPE_CUSTOM )
|
||||||
pad->MergeBasicShapesAsPolygon();
|
pad->MergePrimitivesAsPolygon();
|
||||||
|
|
||||||
return pad.release();
|
return pad.release();
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,12 +185,12 @@ void BRDITEMS_PLOTTER::PlotPad( D_PAD* aPad, COLOR4D aColor, EDA_DRAW_MODE_T aPl
|
||||||
case PAD_SHAPE_CUSTOM:
|
case PAD_SHAPE_CUSTOM:
|
||||||
{
|
{
|
||||||
SHAPE_POLY_SET polygons;
|
SHAPE_POLY_SET polygons;
|
||||||
aPad->MergeBasicShapesAsPolygon(&polygons, 64 );
|
aPad->MergePrimitivesAsPolygon(&polygons, 64 );
|
||||||
|
|
||||||
if( polygons.OutlineCount() == 0 )
|
if( polygons.OutlineCount() == 0 )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
aPad->BasicShapesAsPolygonToBoardPosition( &polygons, shape_pos, aPad->GetOrientation() );
|
aPad->CustomShapeAsPolygonToBoardPosition( &polygons, shape_pos, aPad->GetOrientation() );
|
||||||
m_plotter->FlashPadCustom( shape_pos, aPad->GetSize(), &polygons, aPlotMode, &gbr_metadata );
|
m_plotter->FlashPadCustom( shape_pos, aPad->GetSize(), &polygons, aPlotMode, &gbr_metadata );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -630,7 +630,7 @@ std::unique_ptr<PNS::SOLID> PNS_KICAD_IFACE::syncPad( D_PAD* aPad )
|
||||||
{
|
{
|
||||||
SHAPE_POLY_SET outline;
|
SHAPE_POLY_SET outline;
|
||||||
outline.Append( aPad->GetCustomShapeAsPolygon() );
|
outline.Append( aPad->GetCustomShapeAsPolygon() );
|
||||||
aPad->BasicShapesAsPolygonToBoardPosition( &outline, wx_c, aPad->GetOrientation() );
|
aPad->CustomShapeAsPolygonToBoardPosition( &outline, wx_c, aPad->GetOrientation() );
|
||||||
|
|
||||||
for( int jj = 0; jj < outline.OutlineCount(); ++jj )
|
for( int jj = 0; jj < outline.OutlineCount(); ++jj )
|
||||||
{
|
{
|
||||||
|
@ -746,7 +746,7 @@ std::unique_ptr<PNS::SOLID> PNS_KICAD_IFACE::syncPad( D_PAD* aPad )
|
||||||
{
|
{
|
||||||
SHAPE_POLY_SET outline;
|
SHAPE_POLY_SET outline;
|
||||||
outline.Append( aPad->GetCustomShapeAsPolygon() );
|
outline.Append( aPad->GetCustomShapeAsPolygon() );
|
||||||
aPad->BasicShapesAsPolygonToBoardPosition( &outline, wx_c, aPad->GetOrientation() );
|
aPad->CustomShapeAsPolygonToBoardPosition( &outline, wx_c, aPad->GetOrientation() );
|
||||||
|
|
||||||
for( int jj = 0; jj < outline.OutlineCount(); ++jj )
|
for( int jj = 0; jj < outline.OutlineCount(); ++jj )
|
||||||
{
|
{
|
||||||
|
|
|
@ -204,7 +204,7 @@ void ZONE_CONTAINER::buildFeatureHoleList( BOARD* aPcb, SHAPE_POLY_SET& aFeature
|
||||||
// the shape itself
|
// the shape itself
|
||||||
SHAPE_POLY_SET outline( pad->GetCustomShapeAsPolygon() );
|
SHAPE_POLY_SET outline( pad->GetCustomShapeAsPolygon() );
|
||||||
outline.Inflate( KiROUND( clearance*correctionFactor) , segsPerCircle );
|
outline.Inflate( KiROUND( clearance*correctionFactor) , segsPerCircle );
|
||||||
pad->BasicShapesAsPolygonToBoardPosition( &outline,
|
pad->CustomShapeAsPolygonToBoardPosition( &outline,
|
||||||
pad->GetPosition(), pad->GetOrientation() );
|
pad->GetPosition(), pad->GetOrientation() );
|
||||||
|
|
||||||
if( pad->GetCustomShapeInZoneOpt() == CUST_PAD_SHAPE_IN_ZONE_CONVEXHULL )
|
if( pad->GetCustomShapeInZoneOpt() == CUST_PAD_SHAPE_IN_ZONE_CONVEXHULL )
|
||||||
|
@ -252,7 +252,7 @@ void ZONE_CONTAINER::buildFeatureHoleList( BOARD* aPcb, SHAPE_POLY_SET& aFeature
|
||||||
// the shape itself
|
// the shape itself
|
||||||
SHAPE_POLY_SET outline( pad->GetCustomShapeAsPolygon() );
|
SHAPE_POLY_SET outline( pad->GetCustomShapeAsPolygon() );
|
||||||
outline.Inflate( KiROUND( gap*correctionFactor) , segsPerCircle );
|
outline.Inflate( KiROUND( gap*correctionFactor) , segsPerCircle );
|
||||||
pad->BasicShapesAsPolygonToBoardPosition( &outline,
|
pad->CustomShapeAsPolygonToBoardPosition( &outline,
|
||||||
pad->GetPosition(), pad->GetOrientation() );
|
pad->GetPosition(), pad->GetOrientation() );
|
||||||
|
|
||||||
std::vector<wxPoint> convex_hull;
|
std::vector<wxPoint> convex_hull;
|
||||||
|
|
Loading…
Reference in New Issue