diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index 59d11309f9..13fd130157 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -45,10 +45,11 @@ static GLfloat Get3DLayerSide( int act_layer ); #endif // CALLBACK functions for GLU_TESS -void CALLBACK tessBeginCB( GLenum which ); -void CALLBACK tessEndCB(); -void CALLBACK tessErrorCB( GLenum errorCode ); -void CALLBACK tessVertexCB( const GLvoid* data ); +static void CALLBACK tessBeginCB( GLenum which ); +static void CALLBACK tessEndCB(); +static void CALLBACK tessErrorCB( GLenum errorCode ); +static void CALLBACK tessCPolyPt2Vertex( const GLvoid* data ); +static void CALLBACK tesswxPoint2Vertex( const GLvoid* data ); void Pcb3D_GLCanvas::Redraw( bool finish ) { @@ -241,7 +242,8 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List() { ZONE_CONTAINER* curr_zone = pcb->GetArea( ii ); if( curr_zone->m_FillMode == 0 ) - { // solid polygons only are used to fill areas + { + // solid polygons only are used to fill areas if( curr_zone->m_FilledPolysList.size() > 3 ) { Draw3D_SolidPolygonsInZones( curr_zone ); @@ -249,7 +251,7 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List() } else { - // segments are used to fill ares + // segments are used to fill areas for( unsigned iseg = 0; iseg < curr_zone->m_FillSegmList.size(); iseg++ ) { SEGZONE dummysegment( pcb ); @@ -363,7 +365,7 @@ void Pcb3D_GLCanvas::Draw3D_Track( TRACK* track ) if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) == false ) return; - int color = g_ColorsSettings.GetLayerColor(layer); + int color = g_ColorsSettings.GetLayerColor( layer ); if( layer == LAST_COPPER_LAYER ) layer = g_Parm_3D_Visu.m_Layers - 1; @@ -384,7 +386,7 @@ void Pcb3D_GLCanvas::Draw3D_Track( TRACK* track ) /** Function Draw3D_SolidPolygonsInZones * draw all solid polygons used as filles areas in a zone * @param aZone_c = the zone to draw -*/ + */ void Pcb3D_GLCanvas::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* zone_c ) { double zpos; @@ -393,7 +395,7 @@ void Pcb3D_GLCanvas::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* zone_c ) if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) == false ) return; - int color = g_ColorsSettings.GetLayerColor(layer); + int color = g_ColorsSettings.GetLayerColor( layer ); if( layer == LAST_COPPER_LAYER ) layer = g_Parm_3D_Visu.m_Layers - 1; @@ -408,25 +410,25 @@ void Pcb3D_GLCanvas::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* zone_c ) gluTessCallback( tess, GLU_TESS_BEGIN, ( void (CALLBACK*)() )tessBeginCB ); gluTessCallback( tess, GLU_TESS_END, ( void (CALLBACK*)() )tessEndCB ); gluTessCallback( tess, GLU_TESS_ERROR, ( void (CALLBACK*)() )tessErrorCB ); - gluTessCallback( tess, GLU_TESS_VERTEX, ( void (CALLBACK*)() )tessVertexCB ); + gluTessCallback( tess, GLU_TESS_VERTEX, ( void (CALLBACK*)() )tessCPolyPt2Vertex ); GLdouble v_data[3]; + v_data[2] = zpos; //gluTessProperty(tess, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_NONZERO); // Draw solid areas contained in this zone - int StartContour = 1; + int StartContour = 1; for( unsigned ii = 0; ii < zone_c->m_FilledPolysList.size(); ii++ ) { if( StartContour == 1 ) { - gluTessBeginPolygon( tess, 0 ); + gluTessBeginPolygon( tess, NULL ); gluTessBeginContour( tess ); StartContour = 0; } v_data[0] = zone_c->m_FilledPolysList[ii].x * g_Parm_3D_Visu.m_BoardScale; - v_data[1] = zone_c->m_FilledPolysList[ii].y * g_Parm_3D_Visu.m_BoardScale * -1; - v_data[2] = zpos; + v_data[1] = -zone_c->m_FilledPolysList[ii].y * g_Parm_3D_Visu.m_BoardScale; gluTessVertex( tess, v_data, &zone_c->m_FilledPolysList[ii] ); if( zone_c->m_FilledPolysList[ii].end_contour == 1 ) @@ -467,14 +469,14 @@ void Pcb3D_GLCanvas::Draw3D_Via( SEGVIA* via ) if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) == false ) continue; - color = g_ColorsSettings.GetLayerColor(layer); + color = g_ColorsSettings.GetLayerColor( layer ); } else { if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( LAYER_N_FRONT ) == false ) continue; - color = g_ColorsSettings.GetLayerColor(LAYER_N_FRONT); + color = g_ColorsSettings.GetLayerColor( LAYER_N_FRONT ); } SetGLColor( color ); @@ -491,7 +493,7 @@ void Pcb3D_GLCanvas::Draw3D_Via( SEGVIA* via ) } // Drawing hole: - color = g_ColorsSettings.GetItemColor(VIAS_VISIBLE + via->m_Shape); + color = g_ColorsSettings.GetItemColor( VIAS_VISIBLE + via->m_Shape ); SetGLColor( color ); height = g_Parm_3D_Visu.m_LayerZcoord[top_layer] - g_Parm_3D_Visu.m_LayerZcoord[bottom_layer]; @@ -510,7 +512,7 @@ void Pcb3D_GLCanvas::Draw3D_DrawSegment( DRAWSEGMENT* segment ) if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) == false ) return; - int color = g_ColorsSettings.GetLayerColor(layer); + int color = g_ColorsSettings.GetLayerColor( layer ); SetGLColor( color ); w = segment->m_Width * g_Parm_3D_Visu.m_BoardScale; @@ -596,7 +598,7 @@ void Pcb3D_GLCanvas::Draw3D_DrawText( TEXTE_PCB* text ) if( !Get3DLayerEnable( layer ) ) return; - int color = g_ColorsSettings.GetLayerColor(layer); + int color = g_ColorsSettings.GetLayerColor( layer ); SetGLColor( color ); @@ -712,17 +714,16 @@ void EDGE_MODULE::Draw3D( Pcb3D_GLCanvas* glcanvas ) { wxString s; int dx, dy; - double scale, x, y, fx, fy, w, zpos; + double x, y, fx, fy, w, zpos; if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( m_Layer ) == false ) return; - int color = g_ColorsSettings.GetLayerColor(m_Layer); + int color = g_ColorsSettings.GetLayerColor( m_Layer ); SetGLColor( color ); glNormal3f( 0.0, 0.0, (m_Layer == LAYER_N_BACK) ? -1.0 : 1.0 ); - scale = g_Parm_3D_Visu.m_BoardScale; dx = m_End.x; dy = m_End.y; @@ -748,6 +749,26 @@ void EDGE_MODULE::Draw3D( Pcb3D_GLCanvas* glcanvas ) Draw3D_ArcSegment( x, -y, fx, -fy, (double) m_Angle, w, zpos ); break; + case S_POLYGON: + { + // We must compute true coordinates from m_PolyPoints + // which are relative to module position and module orientation = 0 + std::vector points = m_PolyPoints; + MODULE* module = (MODULE*) m_Parent; + if( module == NULL ) + break; + for( unsigned ii = 0; ii < points.size(); ii++ ) + { + wxPoint& pt = points[ii]; + + RotatePoint( &pt.x, &pt.y, module->m_Orient ); + pt += module->m_Pos; + } + + glcanvas->Draw3D_Polygon( points, zpos ); + } + break; + default: s.Printf( wxT( "Error: Shape nr %d not implemented!\n" ), m_Shape ); D( printf( "%s", CONV_TO_UTF8( s ) ); ) @@ -825,7 +846,7 @@ void D_PAD::Draw3D( Pcb3D_GLCanvas* glcanvas ) if( (layer > FIRST_COPPER_LAYER) && (layer < LAST_COPPER_LAYER) && !Both ) continue; - color = g_ColorsSettings.GetLayerColor(layer); + color = g_ColorsSettings.GetLayerColor( layer ); if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) == false ) continue; @@ -877,7 +898,7 @@ void D_PAD::Draw3D( Pcb3D_GLCanvas* glcanvas ) if( (layer > FIRST_COPPER_LAYER) && (layer < LAST_COPPER_LAYER) && !Both ) continue; - color = g_ColorsSettings.GetLayerColor(layer); + color = g_ColorsSettings.GetLayerColor( layer ); glNormal3f( 0.0, 0.0, (layer == LAYER_N_BACK) ? -1.0 : 1.0 ); if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) == false ) @@ -921,8 +942,8 @@ void D_PAD::Draw3D( Pcb3D_GLCanvas* glcanvas ) coord[ii][0] += ux0; coord[ii][1] += uy0; ll = ii * 2; - fcoord[ll][0] = coord[ii][0] * scale; - fcoord[ll][1] = coord[ii][1] * scale; + fcoord[ll][0] = coord[ii][0] *scale; + fcoord[ll][1] = coord[ii][1] *scale; } for( ii = 0; ii < 7; ii += 2 ) @@ -955,7 +976,7 @@ void D_PAD::Draw3D( Pcb3D_GLCanvas* glcanvas ) if( (layer > FIRST_COPPER_LAYER) && (layer < LAST_COPPER_LAYER) && !Both ) continue; - color = g_ColorsSettings.GetLayerColor(layer); + color = g_ColorsSettings.GetLayerColor( layer ); glNormal3f( 0.0, 0.0, (layer == LAYER_N_BACK) ? -1.0 : 1.0 ); if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) == false ) @@ -1188,7 +1209,7 @@ static void Draw3D_ArcSegment( double startx, double starty, double centrex, int ii; int slice = 36; // Number of segments to approximate a circle by segments double hole, rayon; - double arcStart_Angle; + double arcStart_Angle; arcStart_Angle = (atan2( startx - centrex, starty - centrey ) * 1800 / M_PI ); rayon = hypot( startx - centrex, starty - centrey ) + ( width / 2); @@ -1198,7 +1219,7 @@ static void Draw3D_ArcSegment( double startx, double starty, double centrex, int imax = (int) ( (double) arc_angle * slice / 3600.0 ); if( imax < 0 ) imax = -imax; - if (imax == 0 ) + if( imax == 0 ) imax = 1; // Adjust delta_angle to have exactly imax segments in arc_angle @@ -1212,11 +1233,11 @@ static void Draw3D_ArcSegment( double startx, double starty, double centrex, angle += arcStart_Angle + 900; double dx = hole; double dy = 0.0; - RotatePoint( &dx, &dy, (int)angle ); + RotatePoint( &dx, &dy, (int) angle ); glVertex3f( dx + startx, dy + starty, zpos ); dx = rayon; dy = 0.0; - RotatePoint( &dx, &dy, (int)angle ); + RotatePoint( &dx, &dy, (int) angle ); glVertex3f( dx + startx, dy + starty, zpos ); } @@ -1248,6 +1269,46 @@ static void Draw3D_CircleSegment( double startx, double starty, double endx, } +/** Function Pcb3D_GLCanvas::Draw3D_Polygon + * draw one solid polygon + * @param aCornersList = a std::vector liste of corners, in physical coordinates + * @param aZpos = the z position in 3D units + */ +void Pcb3D_GLCanvas::Draw3D_Polygon( std::vector& aCornersList, double aZpos ) +{ + g_Parm_3D_Visu.m_ActZpos = aZpos; + + GLUtesselator* tess = gluNewTess(); + gluTessCallback( tess, GLU_TESS_BEGIN, ( void (CALLBACK*)() )tessBeginCB ); + gluTessCallback( tess, GLU_TESS_END, ( void (CALLBACK*)() )tessEndCB ); + gluTessCallback( tess, GLU_TESS_ERROR, ( void (CALLBACK*)() )tessErrorCB ); + gluTessCallback( tess, GLU_TESS_VERTEX, ( void (CALLBACK*)() )tesswxPoint2Vertex ); + + GLdouble v_data[3]; + v_data[2] = aZpos; + + //gluTessProperty(tess, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_NONZERO); + + // Draw solid polygon + gluTessBeginPolygon( tess, NULL ); + gluTessBeginContour( tess ); + for( unsigned ii = 0; ii < aCornersList.size(); ii++ ) + { + v_data[0] = aCornersList[ii].x * g_Parm_3D_Visu.m_BoardScale; + v_data[1] = -aCornersList[ii].y * g_Parm_3D_Visu.m_BoardScale; + // gluTessVertex store pointers on data, not data, so do not store + // different corners values in a temporary variable + // but send pointer on each corner value in aCornersList + gluTessVertex( tess, v_data, &aCornersList[ii] ); + } + + gluTessEndContour( tess ); + gluTessEndPolygon( tess ); + + gluDeleteTess( tess ); +} + + static int Get3DLayerEnable( int act_layer ) { bool enablelayer; @@ -1297,14 +1358,23 @@ void CALLBACK tessEndCB() } -void CALLBACK tessVertexCB( const GLvoid* data ) +void CALLBACK tessCPolyPt2Vertex( const GLvoid* data ) { // cast back to double type const CPolyPt* ptr = (const CPolyPt*) data; - glVertex3f( (*ptr).x * g_Parm_3D_Visu.m_BoardScale, - (*ptr).y * g_Parm_3D_Visu.m_BoardScale * -1, - g_Parm_3D_Visu.m_ActZpos ); + glVertex3f( ptr->x * g_Parm_3D_Visu.m_BoardScale, + -ptr->y * g_Parm_3D_Visu.m_BoardScale, + g_Parm_3D_Visu.m_ActZpos ); +} + +void CALLBACK tesswxPoint2Vertex( const GLvoid* data ) +{ + const wxPoint* ptr = (const wxPoint*) data; + + glVertex3f( ptr->x * g_Parm_3D_Visu.m_BoardScale, + -ptr->y * g_Parm_3D_Visu.m_BoardScale, + g_Parm_3D_Visu.m_ActZpos ); } diff --git a/3d-viewer/3d_viewer.h b/3d-viewer/3d_viewer.h index b9477cc39f..cdbfd9b5e1 100644 --- a/3d-viewer/3d_viewer.h +++ b/3d-viewer/3d_viewer.h @@ -171,6 +171,13 @@ public: * @param aZone_c = the zone to draw */ void Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* aZone_c ); + + /** Function Draw3D_Polygon + * draw one solid polygon + * @param aCornersList = a std::vector liste of corners, in physical coordinates + * @param aZpos = the z position in 3D units + */ + void Draw3D_Polygon( std::vector& aCornersList, double aZpos ); void Draw3D_Via( SEGVIA* via ); void Draw3D_DrawSegment( DRAWSEGMENT* segment ); void Draw3D_DrawText( TEXTE_PCB* text ); diff --git a/pcbnew/block.cpp b/pcbnew/block.cpp index 596f70b466..2b3dce01b6 100644 --- a/pcbnew/block.cpp +++ b/pcbnew/block.cpp @@ -115,7 +115,7 @@ WinEDA_ExecBlockCmdFrame::WinEDA_ExecBlockCmdFrame( WinEDA_BasePcbFrame* parent, /* Sizer 1 creation */ wxFlexGridSizer* fgSizer1; - fgSizer1 = new wxFlexGridSizer( 1, 1, 0, 0 ); + fgSizer1 = new wxFlexGridSizer( 7, 1, 0, 0 ); fgSizer1->SetFlexibleDirection( wxBOTH ); fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); diff --git a/pcbnew/dialog_edit_module_for_BoardEditor_base.cpp b/pcbnew/dialog_edit_module_for_BoardEditor_base.cpp index 5502ecfffd..616d48c6b2 100644 --- a/pcbnew/dialog_edit_module_for_BoardEditor_base.cpp +++ b/pcbnew/dialog_edit_module_for_BoardEditor_base.cpp @@ -1,307 +1,307 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#include "dialog_edit_module_for_BoardEditor_base.h" - -/////////////////////////////////////////////////////////////////////////// - -DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - m_GeneralBoxSizer = new wxBoxSizer( wxVERTICAL ); - - m_NoteBook = new wxNotebook( this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize, 0 ); - m_PanelProperties = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); - wxBoxSizer* m_PanelPropertiesBoxSizer; - m_PanelPropertiesBoxSizer = new wxBoxSizer( wxHORIZONTAL ); - - wxStaticBoxSizer* PropLeftSizer; - PropLeftSizer = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Fields:") ), wxVERTICAL ); - - wxStaticBoxSizer* sbSizerRef; - sbSizerRef = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Reference") ), wxHORIZONTAL ); - - m_ReferenceCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); - sbSizerRef->Add( m_ReferenceCtrl, 1, 0, 5 ); - - m_button4 = new wxButton( m_PanelProperties, wxID_ANY, _("Edit"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); - sbSizerRef->Add( m_button4, 0, 0, 5 ); - - PropLeftSizer->Add( sbSizerRef, 0, wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizerValue; - sbSizerValue = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Value") ), wxHORIZONTAL ); - - m_ValueCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); - sbSizerValue->Add( m_ValueCtrl, 1, 0, 5 ); - - m_button5 = new wxButton( m_PanelProperties, wxID_ANY, _("Edit"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); - sbSizerValue->Add( m_button5, 0, 0, 5 ); - - PropLeftSizer->Add( sbSizerValue, 0, wxEXPAND, 5 ); - - wxString m_LayerCtrlChoices[] = { _("Top"), _("Bottom") }; - int m_LayerCtrlNChoices = sizeof( m_LayerCtrlChoices ) / sizeof( wxString ); - m_LayerCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Side Select"), wxDefaultPosition, wxDefaultSize, m_LayerCtrlNChoices, m_LayerCtrlChoices, 1, wxRA_SPECIFY_COLS ); - m_LayerCtrl->SetSelection( 0 ); - PropLeftSizer->Add( m_LayerCtrl, 0, wxALL|wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizerOrientation; - sbSizerOrientation = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Orientation") ), wxVERTICAL ); - - wxString m_OrientCtrlChoices[] = { _("Normal"), _("+ 90.0"), _("- 90.0"), _("180.0"), _("User") }; - int m_OrientCtrlNChoices = sizeof( m_OrientCtrlChoices ) / sizeof( wxString ); - m_OrientCtrl = new wxRadioBox( m_PanelProperties, ID_LISTBOX_ORIENT_SELECT, _("Orientation"), wxDefaultPosition, wxDefaultSize, m_OrientCtrlNChoices, m_OrientCtrlChoices, 1, wxRA_SPECIFY_COLS ); - m_OrientCtrl->SetSelection( 0 ); - sbSizerOrientation->Add( m_OrientCtrl, 0, wxALL|wxEXPAND, 5 ); - - m_staticText4 = new wxStaticText( m_PanelProperties, wxID_ANY, _("Orientation (in 0.1 degrees)"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText4->Wrap( -1 ); - sbSizerOrientation->Add( m_staticText4, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_OrientValue = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - sbSizerOrientation->Add( m_OrientValue, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - PropLeftSizer->Add( sbSizerOrientation, 0, wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizerPosition; - sbSizerPosition = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Position") ), wxVERTICAL ); - - XPositionStatic = new wxStaticText( m_PanelProperties, wxID_ANY, _("X"), wxDefaultPosition, wxDefaultSize, 0 ); - XPositionStatic->Wrap( -1 ); - sbSizerPosition->Add( XPositionStatic, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_ModPositionX = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - sbSizerPosition->Add( m_ModPositionX, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - YPositionStatic = new wxStaticText( m_PanelProperties, wxID_ANY, _("Y"), wxDefaultPosition, wxDefaultSize, 0 ); - YPositionStatic->Wrap( -1 ); - sbSizerPosition->Add( YPositionStatic, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_ModPositionY = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - sbSizerPosition->Add( m_ModPositionY, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - PropLeftSizer->Add( sbSizerPosition, 0, wxEXPAND, 5 ); - - m_PanelPropertiesBoxSizer->Add( PropLeftSizer, 1, wxEXPAND, 5 ); - - m_PropRightSizer = new wxBoxSizer( wxVERTICAL ); - - m_buttonExchange = new wxButton( m_PanelProperties, ID_MODULE_PROPERTIES_EXCHANGE, _("Change Module(s)"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PropRightSizer->Add( m_buttonExchange, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_buttonModuleEditor = new wxButton( m_PanelProperties, ID_GOTO_MODULE_EDITOR, _("Module Editor"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PropRightSizer->Add( m_buttonModuleEditor, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - wxString m_AttributsCtrlChoices[] = { _("Normal"), _("Normal+Insert"), _("Virtual") }; - int m_AttributsCtrlNChoices = sizeof( m_AttributsCtrlChoices ) / sizeof( wxString ); - m_AttributsCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Attributs:"), wxDefaultPosition, wxDefaultSize, m_AttributsCtrlNChoices, m_AttributsCtrlChoices, 1, wxRA_SPECIFY_COLS ); - m_AttributsCtrl->SetSelection( 1 ); - m_PropRightSizer->Add( m_AttributsCtrl, 0, wxALL|wxEXPAND, 5 ); - - wxString m_AutoPlaceCtrlChoices[] = { _("Free"), _("Locked") }; - int m_AutoPlaceCtrlNChoices = sizeof( m_AutoPlaceCtrlChoices ) / sizeof( wxString ); - m_AutoPlaceCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Move and Auto Place"), wxDefaultPosition, wxDefaultSize, m_AutoPlaceCtrlNChoices, m_AutoPlaceCtrlChoices, 1, wxRA_SPECIFY_COLS ); - m_AutoPlaceCtrl->SetSelection( 0 ); - m_PropRightSizer->Add( m_AutoPlaceCtrl, 0, wxALL|wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizerAutoplace; - sbSizerAutoplace = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Auto Move and Place") ), wxHORIZONTAL ); - - wxBoxSizer* bSizerRotOpt; - bSizerRotOpt = new wxBoxSizer( wxVERTICAL ); - - m_staticText11 = new wxStaticText( m_PanelProperties, wxID_ANY, _("Rotation 90 degree"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText11->Wrap( -1 ); - bSizerRotOpt->Add( m_staticText11, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); - - m_CostRot90Ctrl = new wxSlider( m_PanelProperties, wxID_ANY, 0, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS ); - bSizerRotOpt->Add( m_CostRot90Ctrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - sbSizerAutoplace->Add( bSizerRotOpt, 1, wxEXPAND, 5 ); - - wxBoxSizer* bSizerMoveOpt; - bSizerMoveOpt = new wxBoxSizer( wxVERTICAL ); - - m_staticText12 = new wxStaticText( m_PanelProperties, wxID_ANY, _("Rotation 180 degree"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText12->Wrap( -1 ); - bSizerMoveOpt->Add( m_staticText12, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); - - m_CostRot180Ctrl = new wxSlider( m_PanelProperties, wxID_ANY, 0, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS ); - bSizerMoveOpt->Add( m_CostRot180Ctrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - sbSizerAutoplace->Add( bSizerMoveOpt, 1, wxEXPAND, 5 ); - - m_PropRightSizer->Add( sbSizerAutoplace, 1, wxEXPAND|wxALL, 5 ); - - wxStaticBoxSizer* sbSizerLocalProperties; - sbSizerLocalProperties = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Masks clearances local values:") ), wxVERTICAL ); - - m_staticTextInfo = new wxStaticText( m_PanelProperties, wxID_ANY, _("Set these values to 0 to use global values"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextInfo->Wrap( -1 ); - m_staticTextInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); - - sbSizerLocalProperties->Add( m_staticTextInfo, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxFlexGridSizer* fgSizerClearances; - fgSizerClearances = new wxFlexGridSizer( 3, 3, 0, 0 ); - fgSizerClearances->SetFlexibleDirection( wxBOTH ); - fgSizerClearances->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_staticTextNetClearance = new wxStaticText( m_PanelProperties, wxID_ANY, _("All pads nets clearance"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextNetClearance->Wrap( -1 ); - m_staticTextNetClearance->SetToolTip( _("This is the local net clearance for all pad of this footprint\nIf 0, the Netclass values are used\nThis value can be superseded by a pad local value.") ); - - fgSizerClearances->Add( m_staticTextNetClearance, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - m_NetClearanceValueCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerClearances->Add( m_NetClearanceValueCtrl, 0, wxALL, 5 ); - - m_NetClearanceUnits = new wxStaticText( m_PanelProperties, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_NetClearanceUnits->Wrap( -1 ); - fgSizerClearances->Add( m_NetClearanceUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - - m_staticline1 = new wxStaticLine( m_PanelProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - fgSizerClearances->Add( m_staticline1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_staticline2 = new wxStaticLine( m_PanelProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - fgSizerClearances->Add( m_staticline2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_staticline3 = new wxStaticLine( m_PanelProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - fgSizerClearances->Add( m_staticline3, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_MaskClearanceTitle = new wxStaticText( m_PanelProperties, wxID_ANY, _("Solder mask clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_MaskClearanceTitle->Wrap( -1 ); - m_MaskClearanceTitle->SetToolTip( _("This is the local clearance between pads and the solder mask\nfor this footprint\nThis value can be superseded by a pad local value.\nIf 0, the global value is used") ); - - fgSizerClearances->Add( m_MaskClearanceTitle, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_SolderMaskMarginCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerClearances->Add( m_SolderMaskMarginCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_SolderMaskMarginUnits = new wxStaticText( m_PanelProperties, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_SolderMaskMarginUnits->Wrap( -1 ); - fgSizerClearances->Add( m_SolderMaskMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - - m_staticTextSolderPaste = new wxStaticText( m_PanelProperties, wxID_ANY, _("Solder paste clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextSolderPaste->Wrap( -1 ); - m_staticTextSolderPaste->SetToolTip( _("This is the local clearance between pads and the solder paste\nfor this footprint.\nThis value can be superseded by a pad local values.\nThe final clearance value is the sum of this value and the clearance value ratio\nA negative value means a smaller mask size than pad size") ); - - fgSizerClearances->Add( m_staticTextSolderPaste, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_SolderPasteMarginCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerClearances->Add( m_SolderPasteMarginCtrl, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_SolderPasteMarginUnits = new wxStaticText( m_PanelProperties, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_SolderPasteMarginUnits->Wrap( -1 ); - fgSizerClearances->Add( m_SolderPasteMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 ); - - m_staticTextRatio = new wxStaticText( m_PanelProperties, wxID_ANY, _("Solder mask ratio clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextRatio->Wrap( -1 ); - m_staticTextRatio->SetToolTip( _("This is the local clearance ratio in per cent between pads and the solder paste\nfor this footprint.\nA value of 10 means the clearance value is 10 per cent of the pad size\nThis value can be superseded by a pad local value.\nThe final clearance value is the sum of this value and the clearance value\nA negative value means a smaller mask size than pad size.") ); - - fgSizerClearances->Add( m_staticTextRatio, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_SolderPasteMarginRatioCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerClearances->Add( m_SolderPasteMarginRatioCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - m_SolderPasteRatioMarginUnits = new wxStaticText( m_PanelProperties, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 ); - m_SolderPasteRatioMarginUnits->Wrap( -1 ); - fgSizerClearances->Add( m_SolderPasteRatioMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - - sbSizerLocalProperties->Add( fgSizerClearances, 1, wxEXPAND, 5 ); - - m_PropRightSizer->Add( sbSizerLocalProperties, 0, wxEXPAND|wxALL, 5 ); - - m_PanelPropertiesBoxSizer->Add( m_PropRightSizer, 0, 0, 5 ); - - m_PanelProperties->SetSizer( m_PanelPropertiesBoxSizer ); - m_PanelProperties->Layout(); - m_PanelPropertiesBoxSizer->Fit( m_PanelProperties ); - m_NoteBook->AddPage( m_PanelProperties, _("Properties"), true ); - m_Panel3D = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); - wxBoxSizer* bSizerMain3D; - bSizerMain3D = new wxBoxSizer( wxVERTICAL ); - - m_staticText3Dname = new wxStaticText( m_Panel3D, wxID_ANY, _("3D Shape Name"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText3Dname->Wrap( -1 ); - bSizerMain3D->Add( m_staticText3Dname, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_3D_ShapeNameListBox = new wxListBox( m_Panel3D, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE ); - bSizerMain3D->Add( m_3D_ShapeNameListBox, 0, wxALL|wxEXPAND, 5 ); - - wxBoxSizer* bLowerSizer3D; - bLowerSizer3D = new wxBoxSizer( wxHORIZONTAL ); - - m_Sizer3DValues = new wxStaticBoxSizer( new wxStaticBox( m_Panel3D, wxID_ANY, _("3D Scale and Pos") ), wxVERTICAL ); - - bLowerSizer3D->Add( m_Sizer3DValues, 1, wxEXPAND, 5 ); - - wxBoxSizer* bSizer3DButtons; - bSizer3DButtons = new wxBoxSizer( wxVERTICAL ); - - m_buttonBrowse = new wxButton( m_Panel3D, ID_BROWSE_3D_LIB, _("Browse Shapes"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer3DButtons->Add( m_buttonBrowse, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_buttonAdd = new wxButton( m_Panel3D, ID_ADD_3D_SHAPE, _("Add 3D Shape"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer3DButtons->Add( m_buttonAdd, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_buttonRemove = new wxButton( m_Panel3D, ID_REMOVE_3D_SHAPE, _("Remove 3D Shape"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer3DButtons->Add( m_buttonRemove, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - bLowerSizer3D->Add( bSizer3DButtons, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizerMain3D->Add( bLowerSizer3D, 1, wxEXPAND, 5 ); - - m_Panel3D->SetSizer( bSizerMain3D ); - m_Panel3D->Layout(); - bSizerMain3D->Fit( m_Panel3D ); - m_NoteBook->AddPage( m_Panel3D, _("3D settings"), false ); - - m_GeneralBoxSizer->Add( m_NoteBook, 1, wxEXPAND | wxALL, 5 ); - - m_sdbSizerStdButtons = new wxStdDialogButtonSizer(); - m_sdbSizerStdButtonsOK = new wxButton( this, wxID_OK ); - m_sdbSizerStdButtons->AddButton( m_sdbSizerStdButtonsOK ); - m_sdbSizerStdButtonsCancel = new wxButton( this, wxID_CANCEL ); - m_sdbSizerStdButtons->AddButton( m_sdbSizerStdButtonsCancel ); - m_sdbSizerStdButtons->Realize(); - m_GeneralBoxSizer->Add( m_sdbSizerStdButtons, 0, wxEXPAND|wxALIGN_RIGHT|wxALL, 5 ); - - this->SetSizer( m_GeneralBoxSizer ); - this->Layout(); - - // Connect Events - m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditReference ), NULL, this ); - m_button5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditValue ), NULL, this ); - m_OrientCtrl->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this ); - m_buttonExchange->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ExchangeModule ), NULL, this ); - m_buttonModuleEditor->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this ); - m_3D_ShapeNameListBox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::On3DShapeNameSelected ), NULL, this ); - m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Browse3DLib ), NULL, this ); - m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Add3DShape ), NULL, this ); - m_buttonRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Remove3DShape ), NULL, this ); - m_sdbSizerStdButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnCancelClick ), NULL, this ); - m_sdbSizerStdButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnOkClick ), NULL, this ); -} - -DIALOG_MODULE_BOARD_EDITOR_BASE::~DIALOG_MODULE_BOARD_EDITOR_BASE() -{ - // Disconnect Events - m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditReference ), NULL, this ); - m_button5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditValue ), NULL, this ); - m_OrientCtrl->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this ); - m_buttonExchange->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ExchangeModule ), NULL, this ); - m_buttonModuleEditor->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this ); - m_3D_ShapeNameListBox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::On3DShapeNameSelected ), NULL, this ); - m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Browse3DLib ), NULL, this ); - m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Add3DShape ), NULL, this ); - m_buttonRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Remove3DShape ), NULL, this ); - m_sdbSizerStdButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnCancelClick ), NULL, this ); - m_sdbSizerStdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnOkClick ), NULL, this ); -} +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 16 2008) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_edit_module_for_BoardEditor_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + m_GeneralBoxSizer = new wxBoxSizer( wxVERTICAL ); + + m_NoteBook = new wxNotebook( this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize, 0 ); + m_PanelProperties = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); + wxBoxSizer* m_PanelPropertiesBoxSizer; + m_PanelPropertiesBoxSizer = new wxBoxSizer( wxHORIZONTAL ); + + wxStaticBoxSizer* PropLeftSizer; + PropLeftSizer = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Fields:") ), wxVERTICAL ); + + wxStaticBoxSizer* sbSizerRef; + sbSizerRef = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Reference") ), wxHORIZONTAL ); + + m_ReferenceCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); + sbSizerRef->Add( m_ReferenceCtrl, 1, 0, 5 ); + + m_button4 = new wxButton( m_PanelProperties, wxID_ANY, _("Edit"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + sbSizerRef->Add( m_button4, 0, 0, 5 ); + + PropLeftSizer->Add( sbSizerRef, 0, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizerValue; + sbSizerValue = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Value") ), wxHORIZONTAL ); + + m_ValueCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); + sbSizerValue->Add( m_ValueCtrl, 1, 0, 5 ); + + m_button5 = new wxButton( m_PanelProperties, wxID_ANY, _("Edit"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + sbSizerValue->Add( m_button5, 0, 0, 5 ); + + PropLeftSizer->Add( sbSizerValue, 0, wxEXPAND, 5 ); + + wxString m_LayerCtrlChoices[] = { _("Top"), _("Bottom") }; + int m_LayerCtrlNChoices = sizeof( m_LayerCtrlChoices ) / sizeof( wxString ); + m_LayerCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Side Select"), wxDefaultPosition, wxDefaultSize, m_LayerCtrlNChoices, m_LayerCtrlChoices, 1, wxRA_SPECIFY_COLS ); + m_LayerCtrl->SetSelection( 0 ); + PropLeftSizer->Add( m_LayerCtrl, 0, wxALL|wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizerOrientation; + sbSizerOrientation = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Orientation") ), wxVERTICAL ); + + wxString m_OrientCtrlChoices[] = { _("Normal"), _("+ 90.0"), _("- 90.0"), _("180.0"), _("User") }; + int m_OrientCtrlNChoices = sizeof( m_OrientCtrlChoices ) / sizeof( wxString ); + m_OrientCtrl = new wxRadioBox( m_PanelProperties, ID_LISTBOX_ORIENT_SELECT, _("Orientation"), wxDefaultPosition, wxDefaultSize, m_OrientCtrlNChoices, m_OrientCtrlChoices, 1, wxRA_SPECIFY_COLS ); + m_OrientCtrl->SetSelection( 0 ); + sbSizerOrientation->Add( m_OrientCtrl, 0, wxALL|wxEXPAND, 5 ); + + m_staticText4 = new wxStaticText( m_PanelProperties, wxID_ANY, _("Orientation (in 0.1 degrees)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText4->Wrap( -1 ); + sbSizerOrientation->Add( m_staticText4, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_OrientValue = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizerOrientation->Add( m_OrientValue, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + PropLeftSizer->Add( sbSizerOrientation, 0, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizerPosition; + sbSizerPosition = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Position") ), wxVERTICAL ); + + XPositionStatic = new wxStaticText( m_PanelProperties, wxID_ANY, _("X"), wxDefaultPosition, wxDefaultSize, 0 ); + XPositionStatic->Wrap( -1 ); + sbSizerPosition->Add( XPositionStatic, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_ModPositionX = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizerPosition->Add( m_ModPositionX, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + YPositionStatic = new wxStaticText( m_PanelProperties, wxID_ANY, _("Y"), wxDefaultPosition, wxDefaultSize, 0 ); + YPositionStatic->Wrap( -1 ); + sbSizerPosition->Add( YPositionStatic, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_ModPositionY = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizerPosition->Add( m_ModPositionY, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + PropLeftSizer->Add( sbSizerPosition, 0, wxEXPAND, 5 ); + + m_PanelPropertiesBoxSizer->Add( PropLeftSizer, 1, wxEXPAND, 5 ); + + m_PropRightSizer = new wxBoxSizer( wxVERTICAL ); + + m_buttonExchange = new wxButton( m_PanelProperties, ID_MODULE_PROPERTIES_EXCHANGE, _("Change Module(s)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_PropRightSizer->Add( m_buttonExchange, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_buttonModuleEditor = new wxButton( m_PanelProperties, ID_GOTO_MODULE_EDITOR, _("Module Editor"), wxDefaultPosition, wxDefaultSize, 0 ); + m_PropRightSizer->Add( m_buttonModuleEditor, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + wxString m_AttributsCtrlChoices[] = { _("Normal"), _("Normal+Insert"), _("Virtual") }; + int m_AttributsCtrlNChoices = sizeof( m_AttributsCtrlChoices ) / sizeof( wxString ); + m_AttributsCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Attributs:"), wxDefaultPosition, wxDefaultSize, m_AttributsCtrlNChoices, m_AttributsCtrlChoices, 1, wxRA_SPECIFY_COLS ); + m_AttributsCtrl->SetSelection( 1 ); + m_PropRightSizer->Add( m_AttributsCtrl, 0, wxALL|wxEXPAND, 5 ); + + wxString m_AutoPlaceCtrlChoices[] = { _("Free"), _("Locked") }; + int m_AutoPlaceCtrlNChoices = sizeof( m_AutoPlaceCtrlChoices ) / sizeof( wxString ); + m_AutoPlaceCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Move and Auto Place"), wxDefaultPosition, wxDefaultSize, m_AutoPlaceCtrlNChoices, m_AutoPlaceCtrlChoices, 1, wxRA_SPECIFY_COLS ); + m_AutoPlaceCtrl->SetSelection( 0 ); + m_PropRightSizer->Add( m_AutoPlaceCtrl, 0, wxALL|wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizerAutoplace; + sbSizerAutoplace = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Auto Move and Place") ), wxHORIZONTAL ); + + wxBoxSizer* bSizerRotOpt; + bSizerRotOpt = new wxBoxSizer( wxVERTICAL ); + + m_staticText11 = new wxStaticText( m_PanelProperties, wxID_ANY, _("Rotation 90 degree"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText11->Wrap( -1 ); + bSizerRotOpt->Add( m_staticText11, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); + + m_CostRot90Ctrl = new wxSlider( m_PanelProperties, wxID_ANY, 0, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS ); + bSizerRotOpt->Add( m_CostRot90Ctrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + sbSizerAutoplace->Add( bSizerRotOpt, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizerMoveOpt; + bSizerMoveOpt = new wxBoxSizer( wxVERTICAL ); + + m_staticText12 = new wxStaticText( m_PanelProperties, wxID_ANY, _("Rotation 180 degree"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText12->Wrap( -1 ); + bSizerMoveOpt->Add( m_staticText12, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); + + m_CostRot180Ctrl = new wxSlider( m_PanelProperties, wxID_ANY, 0, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS ); + bSizerMoveOpt->Add( m_CostRot180Ctrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + sbSizerAutoplace->Add( bSizerMoveOpt, 1, wxEXPAND, 5 ); + + m_PropRightSizer->Add( sbSizerAutoplace, 1, wxEXPAND|wxALL, 5 ); + + wxStaticBoxSizer* sbSizerLocalProperties; + sbSizerLocalProperties = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Masks clearances local values:") ), wxVERTICAL ); + + m_staticTextInfo = new wxStaticText( m_PanelProperties, wxID_ANY, _("Set these values to 0 to use global values"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextInfo->Wrap( -1 ); + m_staticTextInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); + + sbSizerLocalProperties->Add( m_staticTextInfo, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + wxFlexGridSizer* fgSizerClearances; + fgSizerClearances = new wxFlexGridSizer( 5, 3, 0, 0 ); + fgSizerClearances->SetFlexibleDirection( wxBOTH ); + fgSizerClearances->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticTextNetClearance = new wxStaticText( m_PanelProperties, wxID_ANY, _("All pads nets clearance"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextNetClearance->Wrap( -1 ); + m_staticTextNetClearance->SetToolTip( _("This is the local net clearance for all pad of this footprint\nIf 0, the Netclass values are used\nThis value can be superseded by a pad local value.") ); + + fgSizerClearances->Add( m_staticTextNetClearance, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + m_NetClearanceValueCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerClearances->Add( m_NetClearanceValueCtrl, 0, wxALL, 5 ); + + m_NetClearanceUnits = new wxStaticText( m_PanelProperties, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_NetClearanceUnits->Wrap( -1 ); + fgSizerClearances->Add( m_NetClearanceUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + m_staticline1 = new wxStaticLine( m_PanelProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + fgSizerClearances->Add( m_staticline1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_staticline2 = new wxStaticLine( m_PanelProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + fgSizerClearances->Add( m_staticline2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_staticline3 = new wxStaticLine( m_PanelProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + fgSizerClearances->Add( m_staticline3, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_MaskClearanceTitle = new wxStaticText( m_PanelProperties, wxID_ANY, _("Solder mask clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_MaskClearanceTitle->Wrap( -1 ); + m_MaskClearanceTitle->SetToolTip( _("This is the local clearance between pads and the solder mask\nfor this footprint\nThis value can be superseded by a pad local value.\nIf 0, the global value is used") ); + + fgSizerClearances->Add( m_MaskClearanceTitle, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_SolderMaskMarginCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerClearances->Add( m_SolderMaskMarginCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_SolderMaskMarginUnits = new wxStaticText( m_PanelProperties, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_SolderMaskMarginUnits->Wrap( -1 ); + fgSizerClearances->Add( m_SolderMaskMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + m_staticTextSolderPaste = new wxStaticText( m_PanelProperties, wxID_ANY, _("Solder paste clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextSolderPaste->Wrap( -1 ); + m_staticTextSolderPaste->SetToolTip( _("This is the local clearance between pads and the solder paste\nfor this footprint.\nThis value can be superseded by a pad local values.\nThe final clearance value is the sum of this value and the clearance value ratio\nA negative value means a smaller mask size than pad size") ); + + fgSizerClearances->Add( m_staticTextSolderPaste, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_SolderPasteMarginCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerClearances->Add( m_SolderPasteMarginCtrl, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_SolderPasteMarginUnits = new wxStaticText( m_PanelProperties, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_SolderPasteMarginUnits->Wrap( -1 ); + fgSizerClearances->Add( m_SolderPasteMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 ); + + m_staticTextRatio = new wxStaticText( m_PanelProperties, wxID_ANY, _("Solder mask ratio clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextRatio->Wrap( -1 ); + m_staticTextRatio->SetToolTip( _("This is the local clearance ratio in per cent between pads and the solder paste\nfor this footprint.\nA value of 10 means the clearance value is 10 per cent of the pad size\nThis value can be superseded by a pad local value.\nThe final clearance value is the sum of this value and the clearance value\nA negative value means a smaller mask size than pad size.") ); + + fgSizerClearances->Add( m_staticTextRatio, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_SolderPasteMarginRatioCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerClearances->Add( m_SolderPasteMarginRatioCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_SolderPasteRatioMarginUnits = new wxStaticText( m_PanelProperties, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 ); + m_SolderPasteRatioMarginUnits->Wrap( -1 ); + fgSizerClearances->Add( m_SolderPasteRatioMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + sbSizerLocalProperties->Add( fgSizerClearances, 1, wxEXPAND, 5 ); + + m_PropRightSizer->Add( sbSizerLocalProperties, 0, wxEXPAND|wxALL, 5 ); + + m_PanelPropertiesBoxSizer->Add( m_PropRightSizer, 0, 0, 5 ); + + m_PanelProperties->SetSizer( m_PanelPropertiesBoxSizer ); + m_PanelProperties->Layout(); + m_PanelPropertiesBoxSizer->Fit( m_PanelProperties ); + m_NoteBook->AddPage( m_PanelProperties, _("Properties"), true ); + m_Panel3D = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); + wxBoxSizer* bSizerMain3D; + bSizerMain3D = new wxBoxSizer( wxVERTICAL ); + + m_staticText3Dname = new wxStaticText( m_Panel3D, wxID_ANY, _("3D Shape Name"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText3Dname->Wrap( -1 ); + bSizerMain3D->Add( m_staticText3Dname, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_3D_ShapeNameListBox = new wxListBox( m_Panel3D, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE ); + bSizerMain3D->Add( m_3D_ShapeNameListBox, 0, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* bLowerSizer3D; + bLowerSizer3D = new wxBoxSizer( wxHORIZONTAL ); + + m_Sizer3DValues = new wxStaticBoxSizer( new wxStaticBox( m_Panel3D, wxID_ANY, _("3D Scale and Pos") ), wxVERTICAL ); + + bLowerSizer3D->Add( m_Sizer3DValues, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer3DButtons; + bSizer3DButtons = new wxBoxSizer( wxVERTICAL ); + + m_buttonBrowse = new wxButton( m_Panel3D, ID_BROWSE_3D_LIB, _("Browse Shapes"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3DButtons->Add( m_buttonBrowse, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_buttonAdd = new wxButton( m_Panel3D, ID_ADD_3D_SHAPE, _("Add 3D Shape"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3DButtons->Add( m_buttonAdd, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_buttonRemove = new wxButton( m_Panel3D, ID_REMOVE_3D_SHAPE, _("Remove 3D Shape"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3DButtons->Add( m_buttonRemove, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + bLowerSizer3D->Add( bSizer3DButtons, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizerMain3D->Add( bLowerSizer3D, 1, wxEXPAND, 5 ); + + m_Panel3D->SetSizer( bSizerMain3D ); + m_Panel3D->Layout(); + bSizerMain3D->Fit( m_Panel3D ); + m_NoteBook->AddPage( m_Panel3D, _("3D settings"), false ); + + m_GeneralBoxSizer->Add( m_NoteBook, 1, wxEXPAND | wxALL, 5 ); + + m_sdbSizerStdButtons = new wxStdDialogButtonSizer(); + m_sdbSizerStdButtonsOK = new wxButton( this, wxID_OK ); + m_sdbSizerStdButtons->AddButton( m_sdbSizerStdButtonsOK ); + m_sdbSizerStdButtonsCancel = new wxButton( this, wxID_CANCEL ); + m_sdbSizerStdButtons->AddButton( m_sdbSizerStdButtonsCancel ); + m_sdbSizerStdButtons->Realize(); + m_GeneralBoxSizer->Add( m_sdbSizerStdButtons, 0, wxEXPAND|wxALIGN_RIGHT|wxALL, 5 ); + + this->SetSizer( m_GeneralBoxSizer ); + this->Layout(); + + // Connect Events + m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditReference ), NULL, this ); + m_button5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditValue ), NULL, this ); + m_OrientCtrl->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this ); + m_buttonExchange->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ExchangeModule ), NULL, this ); + m_buttonModuleEditor->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this ); + m_3D_ShapeNameListBox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::On3DShapeNameSelected ), NULL, this ); + m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Browse3DLib ), NULL, this ); + m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Add3DShape ), NULL, this ); + m_buttonRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Remove3DShape ), NULL, this ); + m_sdbSizerStdButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnCancelClick ), NULL, this ); + m_sdbSizerStdButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnOkClick ), NULL, this ); +} + +DIALOG_MODULE_BOARD_EDITOR_BASE::~DIALOG_MODULE_BOARD_EDITOR_BASE() +{ + // Disconnect Events + m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditReference ), NULL, this ); + m_button5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditValue ), NULL, this ); + m_OrientCtrl->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this ); + m_buttonExchange->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ExchangeModule ), NULL, this ); + m_buttonModuleEditor->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this ); + m_3D_ShapeNameListBox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::On3DShapeNameSelected ), NULL, this ); + m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Browse3DLib ), NULL, this ); + m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Add3DShape ), NULL, this ); + m_buttonRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Remove3DShape ), NULL, this ); + m_sdbSizerStdButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnCancelClick ), NULL, this ); + m_sdbSizerStdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnOkClick ), NULL, this ); +} diff --git a/pcbnew/dialog_edit_module_for_BoardEditor_base.fbp b/pcbnew/dialog_edit_module_for_BoardEditor_base.fbp index 24dc7dd9a5..871cb71b49 100644 --- a/pcbnew/dialog_edit_module_for_BoardEditor_base.fbp +++ b/pcbnew/dialog_edit_module_for_BoardEditor_base.fbp @@ -1,2635 +1,2635 @@ - - - - - - C++ - 1 - UTF-8 - connect - dialog_edit_module_for_BoardEditor_base - 1000 - none - 1 - dialog_edit_module_for_BoardEditor_base - - . - - 1 - 0 - 0 - - - - - 1 - - - - 0 - wxID_ANY - - - DIALOG_MODULE_BOARD_EDITOR_BASE - - 474,607 - wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - - Module properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - m_GeneralBoxSizer - wxVERTICAL - private - - 5 - wxEXPAND | wxALL - 1 - - - - - 1 - - - 0 - ID_NOTEBOOK - - - m_NoteBook - protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Properties - 1 - - - - 1 - - - 0 - wxID_ANY - - - m_PanelProperties - protected - - - - - - - wxSUNKEN_BORDER|wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - - m_PanelPropertiesBoxSizer - wxHORIZONTAL - none - - 5 - wxEXPAND - 1 - - wxID_ANY - Fields: - - PropLeftSizer - wxVERTICAL - none - - - 5 - wxEXPAND - 0 - - wxID_ANY - Reference - - sbSizerRef - wxHORIZONTAL - none - - - 5 - - 1 - - - - 1 - - - 0 - wxID_ANY - - 0 - - m_ReferenceCtrl - protected - - - wxTE_READONLY - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - 0 - - - - 0 - 1 - - - 0 - wxID_ANY - Edit - - - m_button4 - protected - - - wxBU_EXACTFIT - - - - - - OnEditReference - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - wxID_ANY - Value - - sbSizerValue - wxHORIZONTAL - none - - - 5 - - 1 - - - - 1 - - - 0 - wxID_ANY - - 0 - - m_ValueCtrl - protected - - - wxTE_READONLY - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - 0 - - - - 0 - 1 - - - 0 - wxID_ANY - Edit - - - m_button5 - protected - - - wxBU_EXACTFIT - - - - - - OnEditValue - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - - "Top" "Bottom" - - 1 - - - 0 - wxID_ANY - Side Select - 1 - - - m_LayerCtrl - protected - - 0 - - wxRA_SPECIFY_COLS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - wxID_ANY - Orientation - - sbSizerOrientation - wxVERTICAL - none - - - 5 - wxALL|wxEXPAND - 0 - - - "Normal" "+ 90.0" "- 90.0" "180.0" "User" - - 1 - - - 0 - ID_LISTBOX_ORIENT_SELECT - Orientation - 1 - - - m_OrientCtrl - protected - - 0 - - wxRA_SPECIFY_COLS - - - - - - - - - - - - - - - - - - - - - - - ModuleOrientEvent - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - Orientation (in 0.1 degrees) - - - m_staticText4 - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - - m_OrientValue - protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - wxID_ANY - Position - - sbSizerPosition - wxVERTICAL - none - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - X - - - XPositionStatic - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - - m_ModPositionX - protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - Y - - - YPositionStatic - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - - m_ModPositionY - protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - 0 - - - m_PropRightSizer - wxVERTICAL - private - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND - 0 - - - - 0 - 1 - - - 0 - ID_MODULE_PROPERTIES_EXCHANGE - Change Module(s) - - - m_buttonExchange - protected - - - - - - - - - ExchangeModule - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND - 0 - - - - 0 - 1 - - - 0 - ID_GOTO_MODULE_EDITOR - Module Editor - - - m_buttonModuleEditor - protected - - - - - - - - - GotoModuleEditor - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - - "Normal" "Normal+Insert" "Virtual" - - 1 - - - 0 - wxID_ANY - Attributs: - 1 - - - m_AttributsCtrl - protected - - 1 - - wxRA_SPECIFY_COLS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - - "Free" "Locked" - - 1 - - - 0 - wxID_ANY - Move and Auto Place - 1 - - - m_AutoPlaceCtrl - protected - - 0 - - wxRA_SPECIFY_COLS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxALL - 1 - - wxID_ANY - Auto Move and Place - - sbSizerAutoplace - wxHORIZONTAL - none - - - 5 - wxEXPAND - 1 - - - bSizerRotOpt - wxVERTICAL - none - - 5 - wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - Rotation 90 degree - - - m_staticText11 - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND - 0 - - - - 1 - - - 0 - wxID_ANY - 10 - - 0 - - m_CostRot90Ctrl - protected - - - wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - - bSizerMoveOpt - wxVERTICAL - none - - 5 - wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - Rotation 180 degree - - - m_staticText12 - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND - 0 - - - - 1 - - - 0 - wxID_ANY - 10 - - 0 - - m_CostRot180Ctrl - protected - - - wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxALL - 0 - - wxID_ANY - Masks clearances local values: - - sbSizerLocalProperties - wxVERTICAL - none - - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL - 0 - - - - 1 - - ,90,92,-1,70,0 - 0 - wxID_ANY - Set these values to 0 to use global values - - - m_staticTextInfo - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - 3 - wxBOTH - - - 0 - - fgSizerClearances - wxFLEX_GROWMODE_SPECIFIED - none - 3 - 0 - - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - All pads nets clearance - - - m_staticTextNetClearance - protected - - - - - This is the local net clearance for all pad of this footprint If 0, the Netclass values are used This value can be superseded by a pad local value. - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - - m_NetClearanceValueCtrl - protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT - 0 - - - - 1 - - - 0 - wxID_ANY - Inch - - - m_NetClearanceUnits - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - - - m_staticline1 - protected - - - wxLI_HORIZONTAL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - - - m_staticline2 - protected - - - wxLI_HORIZONTAL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - - - m_staticline3 - protected - - - wxLI_HORIZONTAL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - Solder mask clearance: - - - m_MaskClearanceTitle - protected - - - - - This is the local clearance between pads and the solder mask for this footprint This value can be superseded by a pad local value. If 0, the global value is used - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - - m_SolderMaskMarginCtrl - protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT - 0 - - - - 1 - - - 0 - wxID_ANY - Inch - - - m_SolderMaskMarginUnits - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - Solder paste clearance: - - - m_staticTextSolderPaste - protected - - - - - This is the local clearance between pads and the solder paste for this footprint. This value can be superseded by a pad local values. The final clearance value is the sum of this value and the clearance value ratio A negative value means a smaller mask size than pad size - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - - m_SolderPasteMarginCtrl - protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT - 0 - - - - 1 - - - 0 - wxID_ANY - Inch - - - m_SolderPasteMarginUnits - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - Solder mask ratio clearance: - - - m_staticTextRatio - protected - - - - - This is the local clearance ratio in per cent between pads and the solder paste for this footprint. A value of 10 means the clearance value is 10 per cent of the pad size This value can be superseded by a pad local value. The final clearance value is the sum of this value and the clearance value A negative value means a smaller mask size than pad size. - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - - m_SolderPasteMarginRatioCtrl - protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT - 0 - - - - 1 - - - 0 - wxID_ANY - % - - - m_SolderPasteRatioMarginUnits - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3D settings - 0 - - - - 1 - - - 0 - wxID_ANY - - - m_Panel3D - protected - - - - - - - wxSUNKEN_BORDER|wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - - bSizerMain3D - wxVERTICAL - none - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - 3D Shape Name - - - m_staticText3Dname - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - - - - 1 - - - 0 - wxID_ANY - - - m_3D_ShapeNameListBox - protected - - - wxLB_SINGLE - - - - - - - - - - - - - - - - On3DShapeNameSelected - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - - bLowerSizer3D - wxHORIZONTAL - none - - 5 - wxEXPAND - 1 - - wxID_ANY - 3D Scale and Pos - - m_Sizer3DValues - wxVERTICAL - public - - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - - bSizer3DButtons - wxVERTICAL - none - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND - 0 - - - - 0 - 1 - - - 0 - ID_BROWSE_3D_LIB - Browse Shapes - - - m_buttonBrowse - protected - - - - - - - - - Browse3DLib - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND - 0 - - - - 0 - 1 - - - 0 - ID_ADD_3D_SHAPE - Add 3D Shape - - - m_buttonAdd - protected - - - - - - - - - Add3DShape - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND - 0 - - - - 0 - 1 - - - 0 - ID_REMOVE_3D_SHAPE - Remove 3D Shape - - - m_buttonRemove - protected - - - - - - - - - Remove3DShape - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxALIGN_RIGHT|wxALL - 0 - - 0 - 1 - 0 - 0 - 0 - 1 - 0 - 0 - - m_sdbSizerStdButtons - protected - - OnCancelClick - - - - OnOkClick - - - - - - - - + + + + + + C++ + 1 + UTF-8 + connect + dialog_edit_module_for_BoardEditor_base + 1000 + none + 1 + dialog_edit_module_for_BoardEditor_base + + . + + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + DIALOG_MODULE_BOARD_EDITOR_BASE + + 474,607 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + + Module properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + m_GeneralBoxSizer + wxVERTICAL + private + + 5 + wxEXPAND | wxALL + 1 + + + + + 1 + + + 0 + ID_NOTEBOOK + + + m_NoteBook + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Properties + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_PanelProperties + protected + + + + + + + wxSUNKEN_BORDER|wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + m_PanelPropertiesBoxSizer + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + wxID_ANY + Fields: + + PropLeftSizer + wxVERTICAL + none + + + 5 + wxEXPAND + 0 + + wxID_ANY + Reference + + sbSizerRef + wxHORIZONTAL + none + + + 5 + + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_ReferenceCtrl + protected + + + wxTE_READONLY + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Edit + + + m_button4 + protected + + + wxBU_EXACTFIT + + + + + + OnEditReference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + wxID_ANY + Value + + sbSizerValue + wxHORIZONTAL + none + + + 5 + + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_ValueCtrl + protected + + + wxTE_READONLY + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Edit + + + m_button5 + protected + + + wxBU_EXACTFIT + + + + + + OnEditValue + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + "Top" "Bottom" + + 1 + + + 0 + wxID_ANY + Side Select + 1 + + + m_LayerCtrl + protected + + 0 + + wxRA_SPECIFY_COLS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + wxID_ANY + Orientation + + sbSizerOrientation + wxVERTICAL + none + + + 5 + wxALL|wxEXPAND + 0 + + + "Normal" "+ 90.0" "- 90.0" "180.0" "User" + + 1 + + + 0 + ID_LISTBOX_ORIENT_SELECT + Orientation + 1 + + + m_OrientCtrl + protected + + 0 + + wxRA_SPECIFY_COLS + + + + + + + + + + + + + + + + + + + + + + + ModuleOrientEvent + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Orientation (in 0.1 degrees) + + + m_staticText4 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_OrientValue + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + wxID_ANY + Position + + sbSizerPosition + wxVERTICAL + none + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + X + + + XPositionStatic + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_ModPositionX + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Y + + + YPositionStatic + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_ModPositionY + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + + m_PropRightSizer + wxVERTICAL + private + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + + + 0 + 1 + + + 0 + ID_MODULE_PROPERTIES_EXCHANGE + Change Module(s) + + + m_buttonExchange + protected + + + + + + + + + ExchangeModule + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + + + 0 + 1 + + + 0 + ID_GOTO_MODULE_EDITOR + Module Editor + + + m_buttonModuleEditor + protected + + + + + + + + + GotoModuleEditor + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + "Normal" "Normal+Insert" "Virtual" + + 1 + + + 0 + wxID_ANY + Attributs: + 1 + + + m_AttributsCtrl + protected + + 1 + + wxRA_SPECIFY_COLS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + "Free" "Locked" + + 1 + + + 0 + wxID_ANY + Move and Auto Place + 1 + + + m_AutoPlaceCtrl + protected + + 0 + + wxRA_SPECIFY_COLS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALL + 1 + + wxID_ANY + Auto Move and Place + + sbSizerAutoplace + wxHORIZONTAL + none + + + 5 + wxEXPAND + 1 + + + bSizerRotOpt + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Rotation 90 degree + + + m_staticText11 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + 10 + + 0 + + m_CostRot90Ctrl + protected + + + wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizerMoveOpt + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Rotation 180 degree + + + m_staticText12 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + 10 + + 0 + + m_CostRot180Ctrl + protected + + + wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALL + 0 + + wxID_ANY + Masks clearances local values: + + sbSizerLocalProperties + wxVERTICAL + none + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + + + 1 + + ,90,92,-1,70,0 + 0 + wxID_ANY + Set these values to 0 to use global values + + + m_staticTextInfo + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 3 + wxBOTH + + + 0 + + fgSizerClearances + wxFLEX_GROWMODE_SPECIFIED + none + 5 + 0 + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + All pads nets clearance + + + m_staticTextNetClearance + protected + + + + + This is the local net clearance for all pad of this footprint If 0, the Netclass values are used This value can be superseded by a pad local value. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_NetClearanceValueCtrl + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT + 0 + + + + 1 + + + 0 + wxID_ANY + Inch + + + m_NetClearanceUnits + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline2 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline3 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Solder mask clearance: + + + m_MaskClearanceTitle + protected + + + + + This is the local clearance between pads and the solder mask for this footprint This value can be superseded by a pad local value. If 0, the global value is used + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_SolderMaskMarginCtrl + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT + 0 + + + + 1 + + + 0 + wxID_ANY + Inch + + + m_SolderMaskMarginUnits + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Solder paste clearance: + + + m_staticTextSolderPaste + protected + + + + + This is the local clearance between pads and the solder paste for this footprint. This value can be superseded by a pad local values. The final clearance value is the sum of this value and the clearance value ratio A negative value means a smaller mask size than pad size + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_SolderPasteMarginCtrl + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT + 0 + + + + 1 + + + 0 + wxID_ANY + Inch + + + m_SolderPasteMarginUnits + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Solder mask ratio clearance: + + + m_staticTextRatio + protected + + + + + This is the local clearance ratio in per cent between pads and the solder paste for this footprint. A value of 10 means the clearance value is 10 per cent of the pad size This value can be superseded by a pad local value. The final clearance value is the sum of this value and the clearance value A negative value means a smaller mask size than pad size. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_SolderPasteMarginRatioCtrl + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT + 0 + + + + 1 + + + 0 + wxID_ANY + % + + + m_SolderPasteRatioMarginUnits + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3D settings + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_Panel3D + protected + + + + + + + wxSUNKEN_BORDER|wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizerMain3D + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + 3D Shape Name + + + m_staticText3Dname + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + + 1 + + + 0 + wxID_ANY + + + m_3D_ShapeNameListBox + protected + + + wxLB_SINGLE + + + + + + + + + + + + + + + + On3DShapeNameSelected + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bLowerSizer3D + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + wxID_ANY + 3D Scale and Pos + + m_Sizer3DValues + wxVERTICAL + public + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + + bSizer3DButtons + wxVERTICAL + none + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + + + 0 + 1 + + + 0 + ID_BROWSE_3D_LIB + Browse Shapes + + + m_buttonBrowse + protected + + + + + + + + + Browse3DLib + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + + + 0 + 1 + + + 0 + ID_ADD_3D_SHAPE + Add 3D Shape + + + m_buttonAdd + protected + + + + + + + + + Add3DShape + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + + + 0 + 1 + + + 0 + ID_REMOVE_3D_SHAPE + Remove 3D Shape + + + m_buttonRemove + protected + + + + + + + + + Remove3DShape + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_RIGHT|wxALL + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_sdbSizerStdButtons + protected + + OnCancelClick + + + + OnOkClick + + + + + + + + diff --git a/pcbnew/dialog_edit_module_for_BoardEditor_base.h b/pcbnew/dialog_edit_module_for_BoardEditor_base.h index c39363a774..4771747ebd 100644 --- a/pcbnew/dialog_edit_module_for_BoardEditor_base.h +++ b/pcbnew/dialog_edit_module_for_BoardEditor_base.h @@ -1,123 +1,123 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#ifndef __dialog_edit_module_for_BoardEditor_base__ -#define __dialog_edit_module_for_BoardEditor_base__ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/////////////////////////////////////////////////////////////////////////// - -#define ID_NOTEBOOK 1000 -#define ID_LISTBOX_ORIENT_SELECT 1001 -#define ID_MODULE_PROPERTIES_EXCHANGE 1002 -#define ID_GOTO_MODULE_EDITOR 1003 -#define ID_BROWSE_3D_LIB 1004 -#define ID_ADD_3D_SHAPE 1005 -#define ID_REMOVE_3D_SHAPE 1006 - -/////////////////////////////////////////////////////////////////////////////// -/// Class DIALOG_MODULE_BOARD_EDITOR_BASE -/////////////////////////////////////////////////////////////////////////////// -class DIALOG_MODULE_BOARD_EDITOR_BASE : public wxDialog -{ - private: - wxBoxSizer* m_GeneralBoxSizer; - wxBoxSizer* m_PropRightSizer; - - protected: - wxNotebook* m_NoteBook; - wxPanel* m_PanelProperties; - wxTextCtrl* m_ReferenceCtrl; - wxButton* m_button4; - wxTextCtrl* m_ValueCtrl; - wxButton* m_button5; - wxRadioBox* m_LayerCtrl; - wxRadioBox* m_OrientCtrl; - wxStaticText* m_staticText4; - wxTextCtrl* m_OrientValue; - wxStaticText* XPositionStatic; - wxTextCtrl* m_ModPositionX; - wxStaticText* YPositionStatic; - wxTextCtrl* m_ModPositionY; - wxButton* m_buttonExchange; - wxButton* m_buttonModuleEditor; - wxRadioBox* m_AttributsCtrl; - wxRadioBox* m_AutoPlaceCtrl; - wxStaticText* m_staticText11; - wxSlider* m_CostRot90Ctrl; - wxStaticText* m_staticText12; - wxSlider* m_CostRot180Ctrl; - wxStaticText* m_staticTextInfo; - wxStaticText* m_staticTextNetClearance; - wxTextCtrl* m_NetClearanceValueCtrl; - wxStaticText* m_NetClearanceUnits; - wxStaticLine* m_staticline1; - wxStaticLine* m_staticline2; - wxStaticLine* m_staticline3; - wxStaticText* m_MaskClearanceTitle; - wxTextCtrl* m_SolderMaskMarginCtrl; - wxStaticText* m_SolderMaskMarginUnits; - wxStaticText* m_staticTextSolderPaste; - wxTextCtrl* m_SolderPasteMarginCtrl; - wxStaticText* m_SolderPasteMarginUnits; - wxStaticText* m_staticTextRatio; - wxTextCtrl* m_SolderPasteMarginRatioCtrl; - wxStaticText* m_SolderPasteRatioMarginUnits; - wxPanel* m_Panel3D; - wxStaticText* m_staticText3Dname; - wxListBox* m_3D_ShapeNameListBox; - wxButton* m_buttonBrowse; - wxButton* m_buttonAdd; - wxButton* m_buttonRemove; - wxStdDialogButtonSizer* m_sdbSizerStdButtons; - wxButton* m_sdbSizerStdButtonsOK; - wxButton* m_sdbSizerStdButtonsCancel; - - // Virtual event handlers, overide them in your derived class - virtual void OnEditReference( wxCommandEvent& event ){ event.Skip(); } - virtual void OnEditValue( wxCommandEvent& event ){ event.Skip(); } - virtual void ModuleOrientEvent( wxCommandEvent& event ){ event.Skip(); } - virtual void ExchangeModule( wxCommandEvent& event ){ event.Skip(); } - virtual void GotoModuleEditor( wxCommandEvent& event ){ event.Skip(); } - virtual void On3DShapeNameSelected( wxCommandEvent& event ){ event.Skip(); } - virtual void Browse3DLib( wxCommandEvent& event ){ event.Skip(); } - virtual void Add3DShape( wxCommandEvent& event ){ event.Skip(); } - virtual void Remove3DShape( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); } - virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); } - - - public: - wxStaticBoxSizer* m_Sizer3DValues; - DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Module properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 474,607 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~DIALOG_MODULE_BOARD_EDITOR_BASE(); - -}; - -#endif //__dialog_edit_module_for_BoardEditor_base__ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 16 2008) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __dialog_edit_module_for_BoardEditor_base__ +#define __dialog_edit_module_for_BoardEditor_base__ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +#define ID_NOTEBOOK 1000 +#define ID_LISTBOX_ORIENT_SELECT 1001 +#define ID_MODULE_PROPERTIES_EXCHANGE 1002 +#define ID_GOTO_MODULE_EDITOR 1003 +#define ID_BROWSE_3D_LIB 1004 +#define ID_ADD_3D_SHAPE 1005 +#define ID_REMOVE_3D_SHAPE 1006 + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_MODULE_BOARD_EDITOR_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_MODULE_BOARD_EDITOR_BASE : public wxDialog +{ + private: + wxBoxSizer* m_GeneralBoxSizer; + wxBoxSizer* m_PropRightSizer; + + protected: + wxNotebook* m_NoteBook; + wxPanel* m_PanelProperties; + wxTextCtrl* m_ReferenceCtrl; + wxButton* m_button4; + wxTextCtrl* m_ValueCtrl; + wxButton* m_button5; + wxRadioBox* m_LayerCtrl; + wxRadioBox* m_OrientCtrl; + wxStaticText* m_staticText4; + wxTextCtrl* m_OrientValue; + wxStaticText* XPositionStatic; + wxTextCtrl* m_ModPositionX; + wxStaticText* YPositionStatic; + wxTextCtrl* m_ModPositionY; + wxButton* m_buttonExchange; + wxButton* m_buttonModuleEditor; + wxRadioBox* m_AttributsCtrl; + wxRadioBox* m_AutoPlaceCtrl; + wxStaticText* m_staticText11; + wxSlider* m_CostRot90Ctrl; + wxStaticText* m_staticText12; + wxSlider* m_CostRot180Ctrl; + wxStaticText* m_staticTextInfo; + wxStaticText* m_staticTextNetClearance; + wxTextCtrl* m_NetClearanceValueCtrl; + wxStaticText* m_NetClearanceUnits; + wxStaticLine* m_staticline1; + wxStaticLine* m_staticline2; + wxStaticLine* m_staticline3; + wxStaticText* m_MaskClearanceTitle; + wxTextCtrl* m_SolderMaskMarginCtrl; + wxStaticText* m_SolderMaskMarginUnits; + wxStaticText* m_staticTextSolderPaste; + wxTextCtrl* m_SolderPasteMarginCtrl; + wxStaticText* m_SolderPasteMarginUnits; + wxStaticText* m_staticTextRatio; + wxTextCtrl* m_SolderPasteMarginRatioCtrl; + wxStaticText* m_SolderPasteRatioMarginUnits; + wxPanel* m_Panel3D; + wxStaticText* m_staticText3Dname; + wxListBox* m_3D_ShapeNameListBox; + wxButton* m_buttonBrowse; + wxButton* m_buttonAdd; + wxButton* m_buttonRemove; + wxStdDialogButtonSizer* m_sdbSizerStdButtons; + wxButton* m_sdbSizerStdButtonsOK; + wxButton* m_sdbSizerStdButtonsCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnEditReference( wxCommandEvent& event ){ event.Skip(); } + virtual void OnEditValue( wxCommandEvent& event ){ event.Skip(); } + virtual void ModuleOrientEvent( wxCommandEvent& event ){ event.Skip(); } + virtual void ExchangeModule( wxCommandEvent& event ){ event.Skip(); } + virtual void GotoModuleEditor( wxCommandEvent& event ){ event.Skip(); } + virtual void On3DShapeNameSelected( wxCommandEvent& event ){ event.Skip(); } + virtual void Browse3DLib( wxCommandEvent& event ){ event.Skip(); } + virtual void Add3DShape( wxCommandEvent& event ){ event.Skip(); } + virtual void Remove3DShape( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); } + virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); } + + + public: + wxStaticBoxSizer* m_Sizer3DValues; + DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Module properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 474,607 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_MODULE_BOARD_EDITOR_BASE(); + +}; + +#endif //__dialog_edit_module_for_BoardEditor_base__